diff options
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java')
-rw-r--r-- | plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java index dcd987d0c25..755079a8d47 100644 --- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java @@ -1,48 +1,48 @@ -/**
- * Copyright (c) 2011 Mia-Software.
- *
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * Nicolas Guyomar (Mia-Software) - Bug 349546 - EMF Facet facetSet editor
- */
-package org.eclipse.papyrus.emf.facet.efacet.ui.internal.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.emf.facet.efacet.ui.internal.IFacetUIFactory;
-import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.wizard.IFacetChildrenWizard;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class handle the action "Add facet reference"
- */
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class AddFacetReferenceHandler extends AbstractHandler {
-
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
-
- // Retrieve the editor
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- // Retrieve the editing domain
- EditingDomain editingDomain = ((IEditingDomainProvider) editor).getEditingDomain();
-
- IFacetChildrenWizard dialog = IFacetUIFactory.INSTANCE.createAddFacetReferenceWizardDialog(selection, editingDomain);
- dialog.canChangeFacet(false);
- dialog.setLowerBound(0);
- dialog.setUpperBound(0);
- dialog.open();
- return null;
- }
-
-}
+/** + * Copyright (c) 2011 Mia-Software. + * + * All rights reserved. This program and the accompanying materials + * are 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: + * Nicolas Guyomar (Mia-Software) - Bug 349546 - EMF Facet facetSet editor + */ +package org.eclipse.papyrus.emf.facet.efacet.ui.internal.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.papyrus.emf.facet.efacet.ui.internal.IFacetUIFactory; +import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.wizard.IFacetChildrenWizard; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; + +/** + * This class handle the action "Add facet reference" + */ +@Deprecated +// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601 +public class AddFacetReferenceHandler extends AbstractHandler { + + public Object execute(final ExecutionEvent event) throws ExecutionException { + ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); + + // Retrieve the editor + IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); + // Retrieve the editing domain + EditingDomain editingDomain = ((IEditingDomainProvider) editor).getEditingDomain(); + + IFacetChildrenWizard dialog = IFacetUIFactory.INSTANCE.createAddFacetReferenceWizardDialog(selection, editingDomain); + dialog.canChangeFacet(false); + dialog.setLowerBound(0); + dialog.setUpperBound(0); + dialog.open(); + return null; + } + +} |