Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetAttributeHandler.java96
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetOperationHandler.java96
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetParameterOperationHandler.java94
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetReferenceHandler.java96
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/CreateFacetInFacetSetHandler.java88
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/FacetPropertyTester.java108
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/NavigationHandler.java138
7 files changed, 358 insertions, 358 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetAttributeHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetAttributeHandler.java
index 6ad9d902c0a..74e581149a5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetAttributeHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetAttributeHandler.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 attribute"
- */
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class AddFacetAttributeHandler 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.createAddFacetAttributeWizardDialog(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 attribute"
+ */
+@Deprecated
+// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
+public class AddFacetAttributeHandler 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.createAddFacetAttributeWizardDialog(selection, editingDomain);
+ dialog.canChangeFacet(false);
+ dialog.setLowerBound(0);
+ dialog.setUpperBound(0);
+ dialog.open();
+ return null;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetOperationHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetOperationHandler.java
index 1b780637067..e28f5a8e9b7 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetOperationHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetOperationHandler.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 operation"
- */
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class AddFacetOperationHandler 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.createAddFacetOperationWizardDialog(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 operation"
+ */
+@Deprecated
+// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
+public class AddFacetOperationHandler 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.createAddFacetOperationWizardDialog(selection, editingDomain);
+ dialog.canChangeFacet(false);
+ dialog.setLowerBound(0);
+ dialog.setUpperBound(0);
+ dialog.open();
+ return null;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetParameterOperationHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetParameterOperationHandler.java
index 294a7526e8a..ecf1148c8f2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetParameterOperationHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/AddFacetParameterOperationHandler.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 operation parameter"
- */
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class AddFacetParameterOperationHandler 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.createAddFacetOperationParameterWizardDialog(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 operation parameter"
+ */
+@Deprecated
+// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
+public class AddFacetParameterOperationHandler 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.createAddFacetOperationParameterWizardDialog(selection, editingDomain);
+ dialog.canChangeFacet(false);
+ dialog.setLowerBound(0);
+ dialog.setUpperBound(0);
+ dialog.open();
+ return null;
+ }
+
} \ No newline at end of file
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;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/CreateFacetInFacetSetHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/CreateFacetInFacetSetHandler.java
index 1a0abdf2bd0..3fcfdb0a349 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/CreateFacetInFacetSetHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/CreateFacetInFacetSetHandler.java
@@ -1,44 +1,44 @@
-/**
- * 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.ICreateFacetInFacetSetWizard;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class handle the action "Create a facet in a facetSet"
- */
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class CreateFacetInFacetSetHandler 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();
-
- ICreateFacetInFacetSetWizard dialog = IFacetUIFactory.INSTANCE.createCreateFacetInFacetSetWizardDialog(selection, editingDomain);
- 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.ICreateFacetInFacetSetWizard;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This class handle the action "Create a facet in a facetSet"
+ */
+@Deprecated
+// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
+public class CreateFacetInFacetSetHandler 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();
+
+ ICreateFacetInFacetSetWizard dialog = IFacetUIFactory.INSTANCE.createCreateFacetInFacetSetWizardDialog(selection, editingDomain);
+ dialog.open();
+ return null;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/FacetPropertyTester.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/FacetPropertyTester.java
index 41106b8eb63..97ccabc1b14 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/FacetPropertyTester.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/FacetPropertyTester.java
@@ -1,54 +1,54 @@
-/**
- * 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.expressions.PropertyTester;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.emf.facet.efacet.Facet;
-import org.eclipse.papyrus.emf.facet.efacet.FacetAttribute;
-import org.eclipse.papyrus.emf.facet.efacet.FacetOperation;
-import org.eclipse.papyrus.emf.facet.efacet.FacetReference;
-import org.eclipse.papyrus.emf.facet.efacet.FacetSet;
-
-@Deprecated
-// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
-public class FacetPropertyTester extends PropertyTester {
-
- private static final String IS_FACET = "isFacet"; //$NON-NLS-1$
- private static final String IS_FACET_SET = "isFacetSet"; //$NON-NLS-1$
- private static final String IS_FACET_OP = "isFacetOperation"; //$NON-NLS-1$
- private static final String IS_FACET_ATT = "isFacetAttribute"; //$NON-NLS-1$
- private static final String IS_FACET_REF = "isFacetReference"; //$NON-NLS-1$
-
- public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
- boolean result = false;
- if (expectedValue instanceof Boolean && receiver instanceof StructuredSelection) {
- final StructuredSelection selection = (StructuredSelection) receiver;
- Boolean test = null;
- if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET)) {
- test = Boolean.valueOf(selection.getFirstElement() instanceof Facet);
- } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_ATT)) {
- test = Boolean.valueOf(selection.getFirstElement() instanceof FacetAttribute);
- } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_OP)) {
- test = Boolean.valueOf(selection.getFirstElement() instanceof FacetOperation);
- } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_REF)) {
- test = Boolean.valueOf(selection.getFirstElement() instanceof FacetReference);
- } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_SET)) {
- test = Boolean.valueOf(selection.getFirstElement() instanceof FacetSet);
- }
- if (test != null) {
- result = expectedValue.equals(test);
- }
- }
- return result;
- }
-}
+/**
+ * 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.expressions.PropertyTester;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.emf.facet.efacet.Facet;
+import org.eclipse.papyrus.emf.facet.efacet.FacetAttribute;
+import org.eclipse.papyrus.emf.facet.efacet.FacetOperation;
+import org.eclipse.papyrus.emf.facet.efacet.FacetReference;
+import org.eclipse.papyrus.emf.facet.efacet.FacetSet;
+
+@Deprecated
+// TODO @Deprecated must be removed after a refactoring planed by https://bugs.eclipse.org/bugs/show_bug.cgi?id=364601
+public class FacetPropertyTester extends PropertyTester {
+
+ private static final String IS_FACET = "isFacet"; //$NON-NLS-1$
+ private static final String IS_FACET_SET = "isFacetSet"; //$NON-NLS-1$
+ private static final String IS_FACET_OP = "isFacetOperation"; //$NON-NLS-1$
+ private static final String IS_FACET_ATT = "isFacetAttribute"; //$NON-NLS-1$
+ private static final String IS_FACET_REF = "isFacetReference"; //$NON-NLS-1$
+
+ public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
+ boolean result = false;
+ if (expectedValue instanceof Boolean && receiver instanceof StructuredSelection) {
+ final StructuredSelection selection = (StructuredSelection) receiver;
+ Boolean test = null;
+ if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET)) {
+ test = Boolean.valueOf(selection.getFirstElement() instanceof Facet);
+ } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_ATT)) {
+ test = Boolean.valueOf(selection.getFirstElement() instanceof FacetAttribute);
+ } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_OP)) {
+ test = Boolean.valueOf(selection.getFirstElement() instanceof FacetOperation);
+ } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_REF)) {
+ test = Boolean.valueOf(selection.getFirstElement() instanceof FacetReference);
+ } else if (property.equalsIgnoreCase(FacetPropertyTester.IS_FACET_SET)) {
+ test = Boolean.valueOf(selection.getFirstElement() instanceof FacetSet);
+ }
+ if (test != null) {
+ result = expectedValue.equals(test);
+ }
+ }
+ return result;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/NavigationHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/NavigationHandler.java
index f9f1a2abc23..b22fd35df4d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/NavigationHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui/src/org/eclipse/papyrus/emf/facet/efacet/ui/internal/handlers/NavigationHandler.java
@@ -1,69 +1,69 @@
-/**
- * Copyright (c) 2011-2012 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:
- * Gregoire Dupe (Mia-Software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet.
- * Nicolas Bros (Mia-Software) - Bug 379395 - Navigate should replace elements
- */
-package org.eclipse.papyrus.emf.facet.efacet.ui.internal.handlers;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.view.INavigationView;
-import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.view.INavigationViewFactory;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class handle the action "Add facet attribute"
- */
-public class NavigationHandler extends AbstractHandler {
-
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- final ISelection selection = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getSelectionService()
- .getSelection();
-
- // Retrieve the editor
- final IEditorPart editor = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- // Retrieve the editing domain
-
- EditingDomain editingDomain = null;
- if (editor instanceof IEditingDomainProvider) {
- final IEditingDomainProvider edProvider = (IEditingDomainProvider) editor;
- editingDomain = edProvider.getEditingDomain();
- }
-
- final List<EObject> eObjects = new LinkedList<EObject>();
- final INavigationView view = INavigationViewFactory.DEFAULT
- .openNavigationView(editingDomain);
- if (selection instanceof IStructuredSelection) {
- final IStructuredSelection sSelection = (IStructuredSelection) selection;
- for (Object object : sSelection.toList()) {
- if (object instanceof EObject) {
- final EObject eObject = (EObject) object;
- eObjects.add(eObject);
- }
- }
- }
- view.removeAllEObjects();
- view.addEObjects(eObjects);
- return null;
- }
-
-}
+/**
+ * Copyright (c) 2011-2012 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:
+ * Gregoire Dupe (Mia-Software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet.
+ * Nicolas Bros (Mia-Software) - Bug 379395 - Navigate should replace elements
+ */
+package org.eclipse.papyrus.emf.facet.efacet.ui.internal.handlers;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.view.INavigationView;
+import org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.view.INavigationViewFactory;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This class handle the action "Add facet attribute"
+ */
+public class NavigationHandler extends AbstractHandler {
+
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final ISelection selection = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getSelectionService()
+ .getSelection();
+
+ // Retrieve the editor
+ final IEditorPart editor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ // Retrieve the editing domain
+
+ EditingDomain editingDomain = null;
+ if (editor instanceof IEditingDomainProvider) {
+ final IEditingDomainProvider edProvider = (IEditingDomainProvider) editor;
+ editingDomain = edProvider.getEditingDomain();
+ }
+
+ final List<EObject> eObjects = new LinkedList<EObject>();
+ final INavigationView view = INavigationViewFactory.DEFAULT
+ .openNavigationView(editingDomain);
+ if (selection instanceof IStructuredSelection) {
+ final IStructuredSelection sSelection = (IStructuredSelection) selection;
+ for (Object object : sSelection.toList()) {
+ if (object instanceof EObject) {
+ final EObject eObject = (EObject) object;
+ eObjects.add(eObject);
+ }
+ }
+ }
+ view.removeAllEObjects();
+ view.addEObjects(eObjects);
+ return null;
+ }
+
+}

Back to the top