/******************************************************************************* * Copyright (c) 2013 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.jboss.tools.windup.ui.internal.handlers; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.core.di.annotations.Optional; import org.eclipse.e4.ui.services.IServiceConstants; import org.eclipse.jface.viewers.ISelection; import org.jboss.tools.windup.model.domain.ModelService; import org.jboss.tools.windup.ui.internal.Messages; import org.jboss.tools.windup.ui.internal.launch.LaunchUtils; /** * Generates a Windup report. */ public class GenerateWindupReportHandler { @Inject private ModelService modelService; @Execute public void execute(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional ISelection selection) { LaunchUtils.launch(selection, Messages.launchMode, modelService); } }