Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-08-21 11:43:07 +0000
committerCamille Letavernier2014-08-21 13:50:25 +0000
commitdbc038b44bcbb890ae256d15eb09eb285512f020 (patch)
tree757e736583eea3ae352ad9ac91a81df7e59b79ff /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src
parentea48a20561464c3cbb7895d430583669a9f82fcc (diff)
downloadorg.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.tar.gz
org.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.tar.xz
org.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.zip
[Code style] Apply clean-up and formatter on Main plug-ins
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreatedNavigableElement.java12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/ExistingNavigableElement.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IBaseNameSetter.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IModelLinker.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/INavigationRule.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Messages.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigableElement.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigationHelper.java40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecorator.java65
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecoratorProvider.java28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java82
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/INavigationPreferenceConstant.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferenceInitializer.java3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferencePage.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/provider/NavigationEditPolicyProvider.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/utils/Messages.java2
17 files changed, 157 insertions, 152 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java
index 4f62d238078..633c72af1bc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
*
- *
+ *
* 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
@@ -65,7 +65,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
@@ -74,12 +74,12 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the active workbench shell
- *
+ *
* @return the active workbench shell
*/
public static Shell getActiveWorkbenchShell() {
IWorkbenchWindow workBenchWindow = getActiveWorkbenchWindow();
- if(workBenchWindow == null) {
+ if (workBenchWindow == null) {
return null;
}
return workBenchWindow.getShell();
@@ -87,15 +87,15 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the active workbench window
- *
+ *
* @return the active workbench window
*/
public static IWorkbenchWindow getActiveWorkbenchWindow() {
- if(getDefault() == null) {
+ if (getDefault() == null) {
return null;
}
IWorkbench workBench = getDefault().getWorkbench();
- if(workBench == null) {
+ if (workBench == null) {
return null;
}
return workBench.getActiveWorkbenchWindow();
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreatedNavigableElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreatedNavigableElement.java
index b771a63e156..da4ee0fd020 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreatedNavigableElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreatedNavigableElement.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -21,9 +21,9 @@ import org.eclipse.emf.ecore.EStructuralFeature;
* This element is not currently linked to the model, but it can be by using
* linkToModel if the user decides to navigate to it, to create a diagram on it
* for example.
- *
+ *
* @author mvelten
- *
+ *
*/
public class CreatedNavigableElement extends NavigableElement {
@@ -37,7 +37,7 @@ public class CreatedNavigableElement extends NavigableElement {
* This constructor initiates a navigable element from a newly created
* element. This element is not directly linked to its container.
* linkToModel() needs to be defined and call when you want to link it.
- *
+ *
* @param element
* @param previousNavigableElement
*/
@@ -53,13 +53,13 @@ public class CreatedNavigableElement extends NavigableElement {
}
public void linkToModel() {
- if(modelLinker != null) {
+ if (modelLinker != null) {
modelLinker.linkToModel(getElement());
}
}
public void setBaseName(String base) {
- if(baseNameSetter != null) {
+ if (baseNameSetter != null) {
baseNameSetter.setBaseName(base, getElement());
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/ExistingNavigableElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/ExistingNavigableElement.java
index 2f2cc03dc07..305eda7c9bd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/ExistingNavigableElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/ExistingNavigableElement.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -18,16 +18,16 @@ import org.eclipse.emf.ecore.EStructuralFeature;
/**
* This class represents an element that already exists in the navigated model.
- *
+ *
* @author mvelten
- *
+ *
*/
public class ExistingNavigableElement extends NavigableElement {
/**
* This constructor initiates a navigable element from an existing model
* element.
- *
+ *
* @param element
*/
public ExistingNavigableElement(EObject element, EStructuralFeature feature) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IBaseNameSetter.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IBaseNameSetter.java
index 6277c8f6f28..e411785cbe8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IBaseNameSetter.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IBaseNameSetter.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -19,9 +19,9 @@ import org.eclipse.emf.ecore.EObject;
* This interface allows to set the base name of an element. The base can then
* be used to derive a more useful name, containing the name of the element type
* for example.
- *
+ *
* @author mvelten
- *
+ *
*/
public interface IBaseNameSetter {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IModelLinker.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IModelLinker.java
index 5d9531aee95..b2f840d872d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IModelLinker.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/IModelLinker.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -17,9 +17,9 @@ import org.eclipse.emf.ecore.EObject;
/**
* This interface is used to link an element to the original model.
- *
+ *
* @author mvelten
- *
+ *
*/
public interface IModelLinker {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/INavigationRule.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/INavigationRule.java
index 9742ba9b9cb..ca39db5ba05 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/INavigationRule.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/INavigationRule.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -19,15 +19,15 @@ import org.eclipse.emf.ecore.EObject;
/**
* This interface defines a navigation rule.
- *
+ *
* @author mvelten
- *
+ *
*/
public interface INavigationRule {
/**
* Tests if an element is supported by this rule.
- *
+ *
* @param element
* @return
*/
@@ -35,7 +35,7 @@ public interface INavigationRule {
/**
* Retrieve a list of the next possible navigation possibilities.
- *
+ *
* @param currentNavElement
* @return a list of navigable elements
*/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Messages.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Messages.java
index a9af823ee6f..6dd1e903ac8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Messages.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Messages.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2014 CEA LIST.
*
- *
+ *
* 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
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigableElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigableElement.java
index 7e0ba9887c5..a6d8fe21d4a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigableElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigableElement.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -19,9 +19,9 @@ import org.eclipse.emf.ecore.EStructuralFeature;
/**
* This class represents an element which can be accessed from an other element
* throught a feature using defined navigation rules.
- *
+ *
* @author mvelten
- *
+ *
*/
public abstract class NavigableElement implements Comparable<NavigableElement> {
@@ -38,7 +38,7 @@ public abstract class NavigableElement implements Comparable<NavigableElement> {
public NavigableElement(EObject element, NavigableElement previousNavigableElement, EStructuralFeature feature) {
this(element, feature);
- if(previousNavigableElement != null) {
+ if (previousNavigableElement != null) {
this.depth = previousNavigableElement.getDepth() + 1;
}
}
@@ -53,7 +53,7 @@ public abstract class NavigableElement implements Comparable<NavigableElement> {
/**
* Retrieve the navigation depth.
- *
+ *
* @return the navigation depth
*/
public int getDepth() {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigationHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigationHelper.java
index 7e2f6212a93..f891841e0e2 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigationHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/NavigationHelper.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -54,12 +54,12 @@ public class NavigationHelper {
private NavigationHelper() {
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
- for(IConfigurationElement configElement : configElements) {
- if(NAVIGATIONRULE_ID.equals(configElement.getName())) {
+ for (IConfigurationElement configElement : configElements) {
+ if (NAVIGATIONRULE_ID.equals(configElement.getName())) {
try {
Object obj = configElement.createExecutableExtension(RULE_ID);
- if(obj instanceof INavigationRule) {
- navigationRules.add((INavigationRule)obj);
+ if (obj instanceof INavigationRule) {
+ navigationRules.add((INavigationRule) obj);
}
} catch (CoreException e) {
}
@@ -71,10 +71,10 @@ public class NavigationHelper {
navElements.add(currentNavElement);
- for(INavigationRule navigationRule : navigationRules) {
- if(navigationRule.handle(currentNavElement.getElement())) {
+ for (INavigationRule navigationRule : navigationRules) {
+ if (navigationRule.handle(currentNavElement.getElement())) {
List<NavigableElement> nextNavigableElements = navigationRule.getNextPossibleElements(currentNavElement);
- for(NavigableElement nextNavigableElement : nextNavigableElements) {
+ for (NavigableElement nextNavigableElement : nextNavigableElements) {
addNextNavigableElements(nextNavigableElement, navElements);
}
}
@@ -84,14 +84,14 @@ public class NavigationHelper {
/**
* get all navigation possibilities (existing or "to create" elements) from
* the specified element.
- *
+ *
* @param element
- * the element
+ * the element
* @return a list of navigation possibilities
*/
public List<NavigableElement> getAllNavigableElements(EObject element) {
ArrayList<NavigableElement> navElements = new ArrayList<NavigableElement>();
- if(element != null) {
+ if (element != null) {
addNextNavigableElements(new ExistingNavigableElement(element, null), navElements);
}
return navElements;
@@ -102,13 +102,13 @@ public class NavigationHelper {
* hierarchy to link the parents between them. Ultimately the hierarchy will
* be attached to an {@link ExistingNavigableElement}, so to the original
* model.
- *
+ *
* @param createdNavElement
*/
public static void linkToModel(CreatedNavigableElement createdNavElement) {
NavigableElement navElement = createdNavElement;
- while(navElement instanceof CreatedNavigableElement) {
- CreatedNavigableElement cne = (CreatedNavigableElement)navElement;
+ while (navElement instanceof CreatedNavigableElement) {
+ CreatedNavigableElement cne = (CreatedNavigableElement) navElement;
cne.linkToModel();
navElement = cne.getPreviousNavigableElement();
}
@@ -117,14 +117,14 @@ public class NavigationHelper {
/**
* Same behavior as {@link NavigationHelper#linkToModel(CreatedNavigableElement)} but set the
* base name of the elements.
- *
+ *
* @param createdNavElement
* @param base
*/
public static void setBaseName(CreatedNavigableElement createdNavElement, String base) {
NavigableElement navElement = createdNavElement;
- while(navElement instanceof CreatedNavigableElement) {
- CreatedNavigableElement cne = (CreatedNavigableElement)navElement;
+ while (navElement instanceof CreatedNavigableElement) {
+ CreatedNavigableElement cne = (CreatedNavigableElement) navElement;
cne.setBaseName(base);
navElement = cne.getPreviousNavigableElement();
}
@@ -133,13 +133,13 @@ public class NavigationHelper {
public static CompositeCommand getLinkCreateAndOpenNavigableDiagramCommand(final NavigableElement navElement, ICreationCommand creationCommandInterface, final String diagramName, ModelSet modelSet) {
CompositeCommand compositeCommand = new CompositeCommand("Create diagram");
- if(navElement instanceof CreatedNavigableElement) {
+ if (navElement instanceof CreatedNavigableElement) {
compositeCommand.add(new AbstractTransactionalCommand(modelSet.getTransactionalEditingDomain(), "Create hierarchy", null) {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- NavigationHelper.linkToModel((CreatedNavigableElement)navElement);
- NavigationHelper.setBaseName((CreatedNavigableElement)navElement, "");
+ NavigationHelper.linkToModel((CreatedNavigableElement) navElement);
+ NavigationHelper.setBaseName((CreatedNavigableElement) navElement, "");
return CommandResult.newOKCommandResult();
}
});
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecorator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecorator.java
index 89f8477a03c..5110f2cec5c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecorator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecorator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010-2011 Atos Origin.
*
- *
+ *
* 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
@@ -39,6 +39,7 @@ import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.gmfdiag.common.DiagramsUtil;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.gmfdiag.navigation.ExistingNavigableElement;
import org.eclipse.papyrus.infra.gmfdiag.navigation.NavigableElement;
import org.eclipse.papyrus.infra.gmfdiag.navigation.NavigationHelper;
@@ -60,12 +61,12 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
static {
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
- for(IConfigurationElement configElement : configElements) {
- if(COLORPROVIDER_ID.equals(configElement.getName())) {
+ for (IConfigurationElement configElement : configElements) {
+ if (COLORPROVIDER_ID.equals(configElement.getName())) {
try {
Object obj = configElement.createExecutableExtension(PROVIDER_ID);
- if(obj instanceof IColorProvider) {
- navigationColorProviders.add((IColorProvider)obj);
+ if (obj instanceof IColorProvider) {
+ navigationColorProviders.add((IColorProvider) obj);
}
} catch (CoreException e) {
}
@@ -97,13 +98,13 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
public void activate() {
- EditPart editPart = (EditPart)getDecoratorTarget().getAdapter(EditPart.class);
- if(editPart instanceof IGraphicalEditPart) {
- gep = (IGraphicalEditPart)editPart;
+ EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(EditPart.class);
+ if (editPart instanceof IGraphicalEditPart) {
+ gep = (IGraphicalEditPart) editPart;
- if(editPart instanceof ShapeEditPart) {
+ if (editPart instanceof ShapeEditPart) {
setDecoration(getDecoratorTarget().addShapeDecoration(shortcutFigure, IDecoratorTarget.Direction.NORTH_EAST, -5, displayOnly));
- } else if(editPart instanceof ConnectionEditPart) {
+ } else if (editPart instanceof ConnectionEditPart) {
setDecoration(getDecoratorTarget().addConnectionDecoration(shortcutFigure, 20, displayOnly));
}
}
@@ -111,18 +112,18 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
public void refresh() {
- if(gep != null) {
+ if (gep != null) {
View view = gep.getNotationView();
EObject element = gep.resolveSemanticElement();
removeListenerFromAllResources();
Diagram currentDiagram = null;
- if(view != null) {
+ if (view != null) {
currentDiagram = view.getDiagram();
}
- if(currentDiagram != null) {
+ if (currentDiagram != null) {
addResourceListener(currentDiagram.eResource());
}
@@ -130,27 +131,27 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
Color shortcutColor = null;
- for(NavigableElement navElement : navElements) {
- if(navElement instanceof ExistingNavigableElement) {
+ for (NavigableElement navElement : navElements) {
+ if (navElement instanceof ExistingNavigableElement) {
EObject eObj = navElement.getElement();
Resource res = eObj.eResource();
- if(res != null && res.getResourceSet() instanceof ModelSet) {
- Resource notationResource = NotationUtils.getNotationResource(((ModelSet)res.getResourceSet()));
+ if (res != null && res.getResourceSet() instanceof ModelSet) {
+ Resource notationResource = NotationUtils.getNotationResource(((ModelSet) res.getResourceSet()));
addResourceListener(notationResource);
- List<Diagram> associatedDiagrams = DiagramsUtil.getAssociatedDiagramsFromNotationResource(eObj, notationResource);
+ List<Diagram> associatedDiagrams = DiagramUtils.getAssociatedDiagramsFromNotationResource(eObj, notationResource);
- if(associatedDiagrams != null) {
- for(Diagram diag : associatedDiagrams) {
+ if (associatedDiagrams != null) {
+ for (Diagram diag : associatedDiagrams) {
addResourceListener(diag.eResource());
- if(!diag.equals(currentDiagram)) {
- for(IColorProvider provider : navigationColorProviders) {
+ if (!diag.equals(currentDiagram)) {
+ for (IColorProvider provider : navigationColorProviders) {
Color color = provider.getBackground(navElement);
- if(color != null) {
- if(shortcutColor == null) {
+ if (color != null) {
+ if (shortcutColor == null) {
shortcutColor = color;
- } else if(!shortcutColor.equals(color)) {
+ } else if (!shortcutColor.equals(color)) {
// more than one color for this
// element :
// just use white in this case
@@ -166,7 +167,7 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
}
- if(shortcutColor == null) {
+ if (shortcutColor == null) {
shortcutFigure.setVisible(false);
} else {
shortcutFigure.setVisible(true);
@@ -176,9 +177,9 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
private void addResourceListener(Resource r) {
- if(r != null) {
- synchronized(listenedNotationResources) {
- if(listenedNotationResources.add(r)) {
+ if (r != null) {
+ synchronized (listenedNotationResources) {
+ if (listenedNotationResources.add(r)) {
r.eAdapters().add(this);
}
}
@@ -186,8 +187,8 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
private void removeListenerFromAllResources() {
- synchronized(listenedNotationResources) {
- for(Resource r : listenedNotationResources) {
+ synchronized (listenedNotationResources) {
+ for (Resource r : listenedNotationResources) {
r.eAdapters().remove(this);
}
listenedNotationResources.clear();
@@ -195,7 +196,7 @@ public class NavigationDecorator extends AbstractDecorator implements Adapter {
}
public void notifyChanged(Notification notification) {
- if(!notification.isTouch() && notification.getFeatureID(Resource.class) == Resource.RESOURCE__CONTENTS) {
+ if (!notification.isTouch() && notification.getFeatureID(Resource.class) == Resource.RESOURCE__CONTENTS) {
refresh();
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecoratorProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecoratorProvider.java
index ca572902504..a935aa4c6a9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecoratorProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/decorator/NavigationDecoratorProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 Atos Origin.
*
- *
+ *
* 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
@@ -47,7 +47,7 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
static {
// Reading data from plugins
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
- for(IConfigurationElement configElement : configElements) {
+ for (IConfigurationElement configElement : configElements) {
String className = configElement.getAttribute(CLASS_ID);
Class<?> class_ = null;
try {
@@ -55,10 +55,10 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
} catch (Exception e) {
}
- if(class_ != null) {
- if(FORBIDDENCLASS_ID.equals(configElement.getName())) {
+ if (class_ != null) {
+ if (FORBIDDENCLASS_ID.equals(configElement.getName())) {
forbiddenClasses.add(class_);
- } else if(DECORATEDCLASS_ID.equals(configElement.getName())) {
+ } else if (DECORATEDCLASS_ID.equals(configElement.getName())) {
decoratedClasses.add(class_);
}
}
@@ -67,20 +67,20 @@ public class NavigationDecoratorProvider extends AbstractProvider implements IDe
public boolean provides(IOperation operation) {
String decoratorVisibility = Activator.getDefault().getPreferenceStore().getString(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY);
- if(operation instanceof CreateDecoratorsOperation && !INavigationPreferenceConstant.DISABLED.equals(decoratorVisibility)) {
- IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
- EditPart editPart = (EditPart)decoratorTarget.getAdapter(EditPart.class);
- if(editPart instanceof IPrimaryEditPart) {
- EObject element = ((IGraphicalEditPart)editPart).resolveSemanticElement();
+ if (operation instanceof CreateDecoratorsOperation && !INavigationPreferenceConstant.DISABLED.equals(decoratorVisibility)) {
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
+ if (editPart instanceof IPrimaryEditPart) {
+ EObject element = ((IGraphicalEditPart) editPart).resolveSemanticElement();
boolean decorate = false;
- for(Class<?> class_ : decoratedClasses) {
- if(class_.isInstance(element)) {
+ for (Class<?> class_ : decoratedClasses) {
+ if (class_.isInstance(element)) {
decorate = true;
break;
}
}
- for(Class<?> class_ : forbiddenClasses) {
- if(class_.isInstance(element)) {
+ for (Class<?> class_ : forbiddenClasses) {
+ if (class_.isInstance(element)) {
decorate = false;
break;
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
index e70b2d52237..5cdba30ed22 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* 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
@@ -39,9 +39,9 @@ import org.eclipse.papyrus.views.modelexplorer.Activator;
/**
* An edit policy to use the {@link NavigationService} on GMF Diagrams
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class NavigationEditPolicy extends GraphicalEditPolicy {
@@ -54,19 +54,19 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
super.activate();
initViewerContext();
- if(viewerContext == null) {
+ if (viewerContext == null) {
return;
}
}
private void initViewerContext() {
- if(getHost() == getRoot()) {
+ if (getHost() == getRoot()) {
EditPartViewer viewer = getHost().getViewer();
viewerContext = new ViewerContext(viewer);
} else {
EditPolicy rootNavigationEditPolicy = getRoot().getEditPolicy(EDIT_POLICY_ID);
- if(rootNavigationEditPolicy instanceof NavigationEditPolicy) {
- this.viewerContext = ((NavigationEditPolicy)rootNavigationEditPolicy).viewerContext;
+ if (rootNavigationEditPolicy instanceof NavigationEditPolicy) {
+ this.viewerContext = ((NavigationEditPolicy) rootNavigationEditPolicy).viewerContext;
}
}
}
@@ -75,25 +75,25 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
public void showTargetFeedback(Request request) {
super.showTargetFeedback(request);
- if(viewerContext == null) {
+ if (viewerContext == null) {
return;
}
- //Do not install navigation on the root
- if(getRoot() == getHost()) {
+ // Do not install navigation on the root
+ if (getRoot() == getHost()) {
return;
}
- if(request instanceof SelectionRequest) {
- SelectionRequest selectionRequest = (SelectionRequest)request;
+ if (request instanceof SelectionRequest) {
+ SelectionRequest selectionRequest = (SelectionRequest) request;
viewerContext.handleRequest(selectionRequest);
}
}
@Override
public Command getCommand(Request request) {
- if(request instanceof SelectionRequest && viewerContext != null) {
- return viewerContext.navigate((SelectionRequest)request);
+ if (request instanceof SelectionRequest && viewerContext != null) {
+ return viewerContext.navigate((SelectionRequest) request);
}
return super.getCommand(request);
}
@@ -103,7 +103,7 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
return rootEditPart.getContents();
}
- //A Single ViewerContext for each diagram (Root EditPartViewer)
+ // A Single ViewerContext for each diagram (Root EditPartViewer)
private class ViewerContext {
private EditPartViewer editPartViewer;
@@ -117,22 +117,22 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
private WrappingLabel lastWrappingLabel;
public void handleRequest(SelectionRequest request) {
- if(isExitState(request)) {
+ if (isExitState(request)) {
exitItem();
}
- if(isEnterState(request)) {
+ if (isEnterState(request)) {
enterItem(currentModel, request);
}
}
public Command navigate(final SelectionRequest request) {
- if(!isAlt(request)) {
+ if (!isAlt(request)) {
return null;
}
final NavigableElement element = getElementToNavigate(request);
- if(element == null) {
+ if (element == null) {
return null;
}
@@ -153,17 +153,17 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
private NavigableElement getElementToNavigate(SelectionRequest request) {
try {
List<NavigableElement> navigableElements = getNavigationService(request).getNavigableElements(getEditPart(request));
- if(navigableElements.isEmpty()) {
+ if (navigableElements.isEmpty()) {
return null;
}
- for(NavigableElement element : navigableElements) {
- if(element.isEnabled()) {
+ for (NavigableElement element : navigableElements) {
+ if (element.isEnabled()) {
return element;
}
}
} catch (ServiceException ex) {
- //Ignore: the service is not available, do nothing
+ // Ignore: the service is not available, do nothing
}
return null;
}
@@ -177,20 +177,20 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
}
private boolean isExitState(SelectionRequest request) {
- if(currentModel == null) {
+ if (currentModel == null) {
return false;
}
EObject newModel = getModel(request);
- if(newModel == null) {
+ if (newModel == null) {
return true;
}
- if(newModel != currentModel) {
+ if (newModel != currentModel) {
return true;
}
- if(!isAlt(request)) {
+ if (!isAlt(request)) {
return true;
}
@@ -199,15 +199,15 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
private boolean isEnterState(SelectionRequest request) {
EObject model = getModel(request);
- if(model == currentModel) {
+ if (model == currentModel) {
return false;
}
- if(model == null) {
+ if (model == null) {
return false;
}
- if(!isAlt(request)) {
+ if (!isAlt(request)) {
return false;
}
@@ -230,14 +230,14 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
}
private void disposeCurrentMenu() {
- if(selectionMenu != null) {
+ if (selectionMenu != null) {
selectionMenu.dispose();
selectionMenu = null;
}
}
private void exitItem() {
- if(lastWrappingLabel != null) {
+ if (lastWrappingLabel != null) {
lastWrappingLabel.setTextUnderline(wasUnderlined);
}
wasUnderlined = false;
@@ -253,16 +253,16 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
final NavigationService navigation = getServicesRegistry().getService(NavigationService.class);
disposeCurrentMenu();
selectionMenu = navigation.createNavigationList(targetEditPart, editPartViewer.getControl());
- if(selectionMenu == null) {
+ if (selectionMenu == null) {
return;
}
wasUnderlined = false;
- if(targetEditPart instanceof IGraphicalEditPart) {
- IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart)targetEditPart;
+ if (targetEditPart instanceof IGraphicalEditPart) {
+ IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart) targetEditPart;
IFigure figure = graphicalEditPart.getFigure();
- if(figure instanceof WrappingLabel) {
- lastWrappingLabel = ((WrappingLabel)figure);
+ if (figure instanceof WrappingLabel) {
+ lastWrappingLabel = ((WrappingLabel) figure);
wasUnderlined = lastWrappingLabel.isTextUnderlined();
lastWrappingLabel.setTextUnderline(!wasUnderlined);
}
@@ -271,12 +271,12 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
selectionMenu.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
- if(event.getSelection().isEmpty()) {
+ if (event.getSelection().isEmpty()) {
return;
}
- Object selectedElement = ((IStructuredSelection)event.getSelection()).getFirstElement();
- if(selectedElement instanceof NavigableElement) {
- NavigableElement navigableElement = (NavigableElement)selectedElement;
+ Object selectedElement = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ if (selectedElement instanceof NavigableElement) {
+ NavigableElement navigableElement = (NavigableElement) selectedElement;
navigate(navigableElement, navigation);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/INavigationPreferenceConstant.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/INavigationPreferenceConstant.java
index 50d6630d143..4fad88a3cbe 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/INavigationPreferenceConstant.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/INavigationPreferenceConstant.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
*
- *
+ *
* 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
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferenceInitializer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferenceInitializer.java
index 25ff1590f81..79a74831568 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferenceInitializer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferenceInitializer.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 Atos Origin.
*
- *
+ *
* 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
@@ -25,6 +25,7 @@ public class NavigationPreferenceInitializer extends AbstractPreferenceInitializ
/**
* Initialize default preferences
*/
+ @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = getPreferenceStore();
store.setDefault(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND, INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferencePage.java
index e3a6ac35c59..f00979850a8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/preference/NavigationPreferencePage.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
*
- *
+ *
* 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
@@ -23,7 +23,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
* preference page for the navigation It proposes to choose among 3
* possibilities: no navigation, explicit navigation, or explicit + implicit
* naviagation
- *
+ *
*/
public class NavigationPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
@@ -37,11 +37,14 @@ public class NavigationPreferencePage extends FieldEditorPreferencePage implemen
@Override
protected void createFieldEditors() {
- dblClkFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND, Messages.DoubleClickNavigationText, 1, new String[][]{ { Messages.No_Navigation_Text, INavigationPreferenceConstant.NO_NAVIGATION }, { Messages.ExplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_NAVIGATION }, { Messages.Explicit_ImplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION } }, getFieldEditorParent());
+ dblClkFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DOUBLECLICK_KIND, Messages.DoubleClickNavigationText, 1, new String[][] { { Messages.No_Navigation_Text, INavigationPreferenceConstant.NO_NAVIGATION },
+ { Messages.ExplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_NAVIGATION }, { Messages.Explicit_ImplicitNavigation_Text, INavigationPreferenceConstant.EXPLICIT_IMPLICIT_NAVIGATION } }, getFieldEditorParent());
addField(dblClkFieldEditor);
dblClkFieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
- decoratorVisibilityFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY, Messages.DecoratorVisibilityText, 1, new String[][]{ { Messages.DecoratorDisabled_Text, INavigationPreferenceConstant.DISABLED }, { Messages.DisplayOnly_Text, INavigationPreferenceConstant.DISPLAY_ONLY }, { Messages.Everywhere_Text, INavigationPreferenceConstant.EVERYWHERE } }, getFieldEditorParent());
+ decoratorVisibilityFieldEditor = new RadioGroupFieldEditor(INavigationPreferenceConstant.PAPYRUS_NAVIGATION_DECORATOR_VISIBILITY, Messages.DecoratorVisibilityText, 1, new String[][] {
+ { Messages.DecoratorDisabled_Text, INavigationPreferenceConstant.DISABLED }, { Messages.DisplayOnly_Text, INavigationPreferenceConstant.DISPLAY_ONLY }, { Messages.Everywhere_Text, INavigationPreferenceConstant.EVERYWHERE } },
+ getFieldEditorParent());
addField(decoratorVisibilityFieldEditor);
decoratorVisibilityFieldEditor.setPreferenceStore(Activator.getDefault().getPreferenceStore());
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/provider/NavigationEditPolicyProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/provider/NavigationEditPolicyProvider.java
index 905b5209371..1660b1efbc9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/provider/NavigationEditPolicyProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/provider/NavigationEditPolicyProvider.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* 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
@@ -24,15 +24,15 @@ import org.eclipse.papyrus.infra.services.navigation.service.NavigationService;
public class NavigationEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
public boolean provides(IOperation operation) {
- if(operation instanceof CreateEditPoliciesOperation) {
+ if (operation instanceof CreateEditPoliciesOperation) {
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
EditPart editPart = epOperation.getEditPart();
try {
NavigationService navigationService = ServiceUtilsForEditPart.getInstance().getService(NavigationService.class, editPart);
return navigationService != null;
} catch (Exception ex) {
- //Ignore: The NavigationService is not available; do nothing
+ // Ignore: The NavigationService is not available; do nothing
}
}
return false;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/utils/Messages.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/utils/Messages.java
index fa534ae8843..5f7d146919d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/utils/Messages.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/utils/Messages.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2014 CEA LIST.
*
- *
+ *
* 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

Back to the top