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.preferences
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.preferences')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Activator.java8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Messages.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceInitializer.java9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceStore.java16
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/AbstractViewInitializer.java40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/LinkViewInitializer.java52
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/NodeViewInitializer.java18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/ColorFieldEditor.java36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/FontFieldEditor.java18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/GradientFieldEditor.java38
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/dialogs/GradientTransparencySelectionDialog.java30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/messages/Messages.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusElementPreferencePage.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusLinkPreferencePage.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusNodePreferencePage.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java49
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java33
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/PapyrusAllDiagramsPreferencePage.java87
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPathmapsPreferencePage.java9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPrintingPreferencePage.java9
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusUML2PreferencePage.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java54
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/BackgroundColor.java18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/ConnectionGroup.java42
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DecorationGroup.java14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DimensionGroup.java14
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/FontGroup.java18
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LabelGroup.java28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LinkColorGroup.java20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java19
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeCompartmentGroup.java28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedCompartmentGroup.java28
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedLabelGroup.java36
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/RulersAndGridGroup.java145
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramBackgroundColor.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramConnectionGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDecorationGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDimensionGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramFontGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramLinkColorGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramNodeColorGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramRulersAndGridGroup.java15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/dialog/ApplyValueOnPreferenceKeyDialog.java40
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/CLabelBooleanFieldEditor.java72
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorBackgroundColor.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorConnectionGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDecorationGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDimensionGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorFontGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorLinkColorGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorNodeColorGroup.java11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorRulersAndGridGroup.java13
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/FontHelper.java47
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/GradientPreferenceConverter.java62
55 files changed, 720 insertions, 685 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Activator.java
index eb4b7f111d8..282720a5a04 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Activator.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -62,7 +62,7 @@ public class Activator extends AbstractUIPlugin {
@Override
public IPreferenceStore getPreferenceStore() {
// Create the preference store lazily.
- if(papyrusPreferenceStore == null) {
+ if (papyrusPreferenceStore == null) {
papyrusPreferenceStore = new PapyrusPreferenceStore(new InstanceScope(), getBundle().getSymbolicName());
}
@@ -83,7 +83,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
@@ -95,7 +95,7 @@ public class Activator extends AbstractUIPlugin {
ImageRegistry registry = getDefault().getImageRegistry();
Image image = registry.get(key);
- if(image == null) {
+ if (image == null) {
ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, iconPath);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Messages.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Messages.java
index 9076ebdb250..1211a683f2d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Messages.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/Messages.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2009 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
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceInitializer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceInitializer.java
index 7ed0f90ecd5..de15e001991 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceInitializer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceInitializer.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
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.infra.gmfdiag.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.PapyrusAllDiagramsPreferencePage;
import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.internal.PapyrusPrintingPreferencePage;
@@ -21,7 +22,7 @@ import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.internal.PapyrusUML2P
/**
* This class is use to initialize the preference at the level Papyrus editor
- *
+ *
*/
public class PapyrusPreferenceInitializer extends AbstractPreferenceInitializer {
@@ -38,8 +39,8 @@ public class PapyrusPreferenceInitializer extends AbstractPreferenceInitializer
@Override
public void initializeDefaultPreferences() {
PapyrusAllDiagramsPreferencePage.initDefaults(store);
- // PapyrusRulersAndGridPreferencePage.initDefaults(store);
- PapyrusPrintingPreferencePage.initDefaults(store);
+ // PapyrusRulersAndGridPreferencePage.initDefaults(store);
+ PrintingPreferencePage.initDefaults(store);
PapyrusUML2PreferencePage.initDefaults(store);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceStore.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceStore.java
index 4b982b4cf8d..6b01b95b3f3 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceStore.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/PapyrusPreferenceStore.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
@@ -22,14 +22,14 @@ import org.eclipse.papyrus.infra.tools.preferences.ui.dialog.AbstractApplyValueO
/**
* this class is a specific store that is used to look for value of element
* by taking account the structure of preferences : papyrus editor-> Diagram -> Elements of Diagram
- *
+ *
*/
public class PapyrusPreferenceStore extends AbstractPapyrusPreferenceStore {
/**
- *
+ *
* Constructor.
- *
+ *
* @param context
* @param qualifier
* @param defaultQualifierPath
@@ -40,9 +40,9 @@ public class PapyrusPreferenceStore extends AbstractPapyrusPreferenceStore {
/**
- *
+ *
* Constructor.
- *
+ *
* @param context
* @param qualifier
*/
@@ -52,9 +52,9 @@ public class PapyrusPreferenceStore extends AbstractPapyrusPreferenceStore {
/**
- *
+ *
* @see org.eclipse.papyrus.infra.tools.preferences.AbstractPapyrusPreferenceStore#createPreferenceKeyDialog(java.lang.String[])
- *
+ *
* @param keys
* @return
*/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/AbstractViewInitializer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/AbstractViewInitializer.java
index 26d9fe8cde0..92cd1365e53 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/AbstractViewInitializer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/AbstractViewInitializer.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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,7 +25,7 @@ import org.eclipse.swt.graphics.RGB;
/**
* Initialize a view with the properties contained in a preference store
- *
+ *
* <p>
* The following properties can be initialized :
* <ul>
@@ -34,7 +34,7 @@ import org.eclipse.swt.graphics.RGB;
* <li>{@link org.eclipse.gmf.runtime.notation.LineStyle#getLineColor() <em>Line Color</em>}</li>
* </ul>
* </p>
- *
+ *
* @author tlandre
*/
public abstract class AbstractViewInitializer {
@@ -47,11 +47,11 @@ public abstract class AbstractViewInitializer {
/**
* Constructor
- *
+ *
* @param view
- * the view to initialize
+ * the view to initialize
* @param store
- * the preference store where the properties are.
+ * the preference store where the properties are.
*/
public AbstractViewInitializer(View view, IPreferenceStore store) {
this.view = view;
@@ -60,15 +60,15 @@ public abstract class AbstractViewInitializer {
/**
* Initialize the font.
- *
+ *
* @param preferenceFontName
- * the name of the preference where is stored the value of the font.
+ * the name of the preference where is stored the value of the font.
*/
// @unused
public void initFont(String preferenceFontName) {
- FontStyle fontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
+ FontStyle fontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE);
- if(fontStyle != null) {
+ if (fontStyle != null) {
// default font
FontData fontData = PreferenceConverter.getFontData(store, preferenceFontName);
fontStyle.setFontName(fontData.getName());
@@ -83,15 +83,15 @@ public abstract class AbstractViewInitializer {
/**
* Initialize the font color.
- *
+ *
* @param preferenceFontColorName
- * the name of the preference where is stored the value of the color.
+ * the name of the preference where is stored the value of the color.
*/
// @unused
public void initFontColor(String preferenceFontColorName) {
- FontStyle fontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
+ FontStyle fontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE);
- if(fontStyle != null) {
+ if (fontStyle != null) {
// font color
RGB fontRGB = PreferenceConverter.getColor(store, preferenceFontColorName);
fontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
@@ -100,14 +100,14 @@ public abstract class AbstractViewInitializer {
/**
* Initialize the line color.
- *
+ *
* @param preferenceLineColorName
- * the name of the preference where is stored the value of the color.
+ * the name of the preference where is stored the value of the color.
*/
// @unused
public void initLineColor(String preferenceLineColorName) {
- LineStyle lineStyle = (LineStyle)view.getStyle(NotationPackage.Literals.LINE_STYLE);
- if(lineStyle != null) {
+ LineStyle lineStyle = (LineStyle) view.getStyle(NotationPackage.Literals.LINE_STYLE);
+ if (lineStyle != null) {
// line color
RGB lineRGB = PreferenceConverter.getColor(store, preferenceLineColorName);
@@ -117,7 +117,7 @@ public abstract class AbstractViewInitializer {
/**
* Get the preference store used for this view
- *
+ *
* @return the preference store used
*/
public IPreferenceStore getStore() {
@@ -126,7 +126,7 @@ public abstract class AbstractViewInitializer {
/**
* Get the view for this initializer
- *
+ *
* @return the view used
*/
public View getView() {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/LinkViewInitializer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/LinkViewInitializer.java
index da48207887c..de3a6ff838c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/LinkViewInitializer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/LinkViewInitializer.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -24,7 +24,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle <em>Routing Style</em>} of a
* connection view with the properties contained in a preference store
- *
+ *
* <p>
* The following properties can be initialized :
* <ul>
@@ -37,7 +37,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
* <li>{@link org.eclipse.gmf.runtime.notation.RoutingStyle#isJumpLinksReverse <em>Jump Links Reverse</em>}</li>
* </ul>
* </p>
- *
+ *
* @author tlandre
*/
public class LinkViewInitializer extends AbstractViewInitializer {
@@ -49,30 +49,30 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Constructor
- *
+ *
* @param view
- * the view to initialize
+ * the view to initialize
* @param store
- * the preference store where the properties are.
+ * the preference store where the properties are.
*/
// @unused
public LinkViewInitializer(View view, IPreferenceStore store) {
super(view, store);
- routingStyle = (RoutingStyle)view.getStyle(NotationPackage.Literals.ROUTING_STYLE);
+ routingStyle = (RoutingStyle) view.getStyle(NotationPackage.Literals.ROUTING_STYLE);
}
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#getRouting
* <em>Routing</em>}
- *
+ *
* @param preferenceRoutingName
- * the name of the preference where is stored the value of the Routing
+ * the name of the preference where is stored the value of the Routing
*/
// @unused
public void initRouting(String preferenceRoutingName) {
- if(routingStyle != null) {
+ if (routingStyle != null) {
Routing routing = Routing.get(getStore().getInt(preferenceRoutingName));
- if(routing != null) {
+ if (routing != null) {
routingStyle.setRouting(routing);
}
}
@@ -81,9 +81,9 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#isAvoidObstructions
* <em>Avoid Obstructions</em>}
- *
+ *
* @param preferenceRoutingJumpName
- * the name of the preference where is stored the value.
+ * the name of the preference where is stored the value.
*/
// @unused
public void initAvoidObstructions(String preferenceRoutingJumpName) {
@@ -93,9 +93,9 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize {@link org.eclipse.gmf.runtime.notation.RoutingStyle#isClosestDistance
* <em>Closest Distance</em>}
- *
+ *
* @param preferenceClosestDistanceName
- * the name of the preference where is stored the value of the closest distance
+ * the name of the preference where is stored the value of the closest distance
*/
// @unused
public void initClosestDistance(String preferenceClosestDistanceName) {
@@ -105,9 +105,9 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#isJumpLinksReverse
* <em>Jump Links Reverse</em>}
- *
+ *
* @param preferenceJumpLinkReverseName
- * the name of the preference where is stored the value of the jumplink reverse
+ * the name of the preference where is stored the value of the jumplink reverse
*/
// @unused
public void initJumpLinkReverse(String preferenceJumpLinkReverseName) {
@@ -117,14 +117,14 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#getJumpLinkStatus
* <em>Jump Link Status</em>}
- *
+ *
* @param preferenceJumpLinkStatusName
- * the name of the preference where is stored the value of the jumplink status
+ * the name of the preference where is stored the value of the jumplink status
*/
// @unused
public void initJumpLinkStatus(String preferenceJumpLinkStatusName) {
JumpLinkStatus jumpLinkStatus = JumpLinkStatus.get(getStore().getInt(preferenceJumpLinkStatusName));
- if(jumpLinkStatus != null) {
+ if (jumpLinkStatus != null) {
routingStyle.setJumpLinkStatus(jumpLinkStatus);
}
}
@@ -132,14 +132,14 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#getJumpLinkType
* <em>Jump Link Type</em>}
- *
+ *
* @param preferenceJumpLinkTypeName
- * the name of the preference where is stored the value of the jumplink type
+ * the name of the preference where is stored the value of the jumplink type
*/
// @unused
public void initJumpLinkType(String preferenceJumpLinkTypeName) {
JumpLinkType jumpLinkType = JumpLinkType.get(getStore().getInt(preferenceJumpLinkTypeName));
- if(jumpLinkType != null) {
+ if (jumpLinkType != null) {
routingStyle.setJumpLinkType(jumpLinkType);
}
}
@@ -147,14 +147,14 @@ public class LinkViewInitializer extends AbstractViewInitializer {
/**
* Initialize the {@link org.eclipse.gmf.runtime.notation.RoutingStyle#getSmoothness
* <em>Smoothness</em>}
- *
+ *
* @param preferenceSmoothnessName
- * the name of the preference where is stored the value of the Smoothness
+ * the name of the preference where is stored the value of the Smoothness
*/
// @unused
public void initSmoothness(String preferenceSmoothnessName) {
Smoothness smoothness = Smoothness.get(getStore().getInt(preferenceSmoothnessName));
- if(smoothness != null) {
+ if (smoothness != null) {
routingStyle.setSmoothness(smoothness);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/NodeViewInitializer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/NodeViewInitializer.java
index 38e9354b7e1..26260bbc2dd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/NodeViewInitializer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/initializer/NodeViewInitializer.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.RGB;
* <li>{@link org.eclipse.gmf.runtime.notation.FillStyle#getFillColor() <em> FillColor</em>}</li>
* </ul>
* </p>
- *
+ *
* @author tlandre
*/
// @unused
@@ -36,11 +36,11 @@ public class NodeViewInitializer extends AbstractViewInitializer {
/**
* Default Constructor
- *
+ *
* @param view
- * the node view to initialize
+ * the node view to initialize
* @param store
- * the preference store to use
+ * the preference store to use
*/
// @unused
public NodeViewInitializer(View view, IPreferenceStore store) {
@@ -49,14 +49,14 @@ public class NodeViewInitializer extends AbstractViewInitializer {
/**
* Initialize the fill color.
- *
+ *
* @param preferenceFillColorName
- * the name of the preference where is stored the value of the color.
+ * the name of the preference where is stored the value of the color.
*/
// @unused
public void initFillColor(String preferenceFillColorName) {
- FillStyle fillStyle = (FillStyle)getView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if(fillStyle != null) {
+ FillStyle fillStyle = (FillStyle) getView().getStyle(NotationPackage.Literals.FILL_STYLE);
+ if (fillStyle != null) {
// fill color
RGB fillRGB = PreferenceConverter.getColor(getStore(), preferenceFillColorName);
fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/ColorFieldEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/ColorFieldEditor.java
index 51eed9f1653..1567935efbd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/ColorFieldEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/ColorFieldEditor.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -33,10 +33,10 @@ import org.eclipse.swt.widgets.Composite;
/**
* A field editor that display a button and a small rectangle under it to show the color selected.
- *
+ *
* This field editor is inspired by the class {@link org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorsAndFontsPropertySection
* <em>ColorsAndFontsPropertySection</em>}
- *
+ *
* @author tlandre
*/
@@ -52,13 +52,13 @@ public class ColorFieldEditor extends FieldEditor {
/**
* Default constructor
- *
+ *
* @param name
- * the preference name to use
+ * the preference name to use
* @param image
- * the image to display
+ * the image to display
* @param parent
- * the parent composite
+ * the parent composite
*/
public ColorFieldEditor(String name, Image image, Composite parent) {
super(name, "", parent); // $NON-NLS-1$
@@ -106,7 +106,7 @@ public class ColorFieldEditor extends FieldEditor {
private void doLoadColor(RGB rgb) {
updateButtonImage(rgb);
- if(colorSelector != null) {
+ if (colorSelector != null) {
colorSelector.setPreviousColor(FigureUtilities.RGBToInteger(rgb));
}
@@ -114,9 +114,9 @@ public class ColorFieldEditor extends FieldEditor {
@Override
protected void doStore() {
- if(colorSelector != null) {
+ if (colorSelector != null) {
RGB color = colorSelector.getSelectedColor();
- if(color == null) {
+ if (color == null) {
color = getDefaultColor();
}
PreferenceConverter.setValue(getPreferenceStore(), getPreferenceName(), color);
@@ -140,11 +140,11 @@ public class ColorFieldEditor extends FieldEditor {
Point location = button.getParent().toDisplay(r.x, r.y);
colorSelector.open(location);
- if(colorSelector.getSelectedColor() == null && !colorSelector.useDefaultColor()) {
+ if (colorSelector.getSelectedColor() == null && !colorSelector.useDefaultColor()) {
return;
}
- if(colorSelector.useDefaultColor()) {
+ if (colorSelector.useDefaultColor()) {
updateButtonImage(getDefaultColor());
} else {
updateButtonImage(colorSelector.getSelectedColor());
@@ -153,7 +153,7 @@ public class ColorFieldEditor extends FieldEditor {
}
private void updateButtonImage(RGB rgb) {
- if(!colorButton.isDisposed() && colorButton.getImage() != null && !colorButton.getImage().isDisposed()) {
+ if (!colorButton.isDisposed() && colorButton.getImage() != null && !colorButton.getImage().isDisposed()) {
colorButton.getImage().dispose();
Image overlyedImage = new ColorOverlayImageDescriptor(backgroundImage.getImageData(), rgb).createImage();
colorButton.setImage(overlyedImage);
@@ -173,11 +173,11 @@ public class ColorFieldEditor extends FieldEditor {
/**
* Creates a new color menu image descriptor
- *
+ *
* @param basicImgData
- * The basic Image data
+ * The basic Image data
* @param rgb
- * The color bar RGB value
+ * The color bar RGB value
*/
public ColorOverlayImageDescriptor(ImageData basicImgData, RGB rgb) {
this.basicImgData = basicImgData;
@@ -191,10 +191,10 @@ public class ColorFieldEditor extends FieldEditor {
protected void drawCompositeImage(int width, int height) {
// draw the thin color bar underneath
- if(rgb != null) {
+ if (rgb != null) {
ImageData colorBar = new ImageData(width, height / 5, 1,
- new PaletteData(new RGB[]{ rgb }));
+ new PaletteData(new RGB[] { rgb }));
drawImage(colorBar, 0, height - height / 5);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/FontFieldEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/FontFieldEditor.java
index fcbe653ecd5..8aadc7e999a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/FontFieldEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/FontFieldEditor.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Composite;
* </ul>
* This field editor is inspired by the class {@link org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorsAndFontsPropertySection
* <em>ColorsAndFontsPropertySection</em>}
- *
+ *
* @author tlandre
*/
public class FontFieldEditor extends FieldEditor {
@@ -65,11 +65,11 @@ public class FontFieldEditor extends FieldEditor {
/**
* Constructor
- *
+ *
* @param preferenceName
- * the preference used for the Font
+ * the preference used for the Font
* @param parent
- * the parent composite in which this field editor will be placed.
+ * the parent composite in which this field editor will be placed.
*/
public FontFieldEditor(String preferenceName, Composite parent) {
super(preferenceName, "", parent); //$NON-NLS-1$
@@ -120,13 +120,13 @@ public class FontFieldEditor extends FieldEditor {
int style = fontData.getStyle();
// Bold Button
- if((style & SWT.BOLD) == SWT.BOLD) {
+ if ((style & SWT.BOLD) == SWT.BOLD) {
fontBoldButton.setSelection(true);
} else {
fontBoldButton.setSelection(false);
}
// Italic Button
- if((style & SWT.ITALIC) == SWT.ITALIC) {
+ if ((style & SWT.ITALIC) == SWT.ITALIC) {
fontItalicButton.setSelection(true);
} else {
fontItalicButton.setSelection(false);
@@ -148,10 +148,10 @@ public class FontFieldEditor extends FieldEditor {
private int getStyle() {
int style = SWT.NORMAL;
- if(fontBoldButton.getSelection()) {
+ if (fontBoldButton.getSelection()) {
style |= SWT.BOLD;
}
- if(fontItalicButton.getSelection()) {
+ if (fontItalicButton.getSelection()) {
style |= SWT.ITALIC;
}
return style;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/GradientFieldEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/GradientFieldEditor.java
index 88d07676517..edaef20daae 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/GradientFieldEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/GradientFieldEditor.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2009 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
@@ -48,7 +48,7 @@ import org.eclipse.swt.widgets.Spinner;
* <li>Gradient style. The value is GradientStyle.HORIZONTAL or GradientStyle.VERTICAL</li>
* </ul>
* The second color of the gradient is set by default at RGB{255,255,255}
- *
+ *
* @author tlandre
*/
public class GradientFieldEditor extends FieldEditor {
@@ -71,11 +71,11 @@ public class GradientFieldEditor extends FieldEditor {
/**
* create a field to display gradient preference
- *
+ *
* @param gradientPreferenceName
- * the name of the gradient field
+ * the name of the gradient field
* @param parent
- * the parent composite
+ * the parent composite
*/
public GradientFieldEditor(String gradientPreferenceName, Composite parent) {
super(gradientPreferenceName, "", parent); //$NON-NLS-1$
@@ -91,9 +91,9 @@ public class GradientFieldEditor extends FieldEditor {
super.load();
setButtonImage(color1);
transparencyValueSpinner.setSelection(transparency);
- if(style == GradientStyle.HORIZONTAL) {
+ if (style == GradientStyle.HORIZONTAL) {
horizontalStyleButton.setSelection(true);
- } else if(style == GradientStyle.VERTICAL) {
+ } else if (style == GradientStyle.VERTICAL) {
verticalStyleButton.setSelection(true);
}
}
@@ -130,11 +130,11 @@ public class GradientFieldEditor extends FieldEditor {
@Override
public void widgetSelected(SelectionEvent e) {
- if(!((Button)e.widget).getSelection()) {
+ if (!((Button) e.widget).getSelection()) {
// don't react on de-selection
return;
}
- if(verticalStyleButton.getSelection()) {
+ if (verticalStyleButton.getSelection()) {
style = GradientStyle.VERTICAL;
} else {
style = GradientStyle.HORIZONTAL;
@@ -208,14 +208,14 @@ public class GradientFieldEditor extends FieldEditor {
/**
* Dispose the image associated with the given button
- *
+ *
* @param btn
- * the button that contains the image
+ * the button that contains the image
*/
protected void disposeButtonImage() {
- if(colorButton != null && !colorButton.isDisposed()) {
+ if (colorButton != null && !colorButton.isDisposed()) {
Image imageColor1 = colorButton.getImage();
- if(imageColor1 != null && !imageColor1.isDisposed()) {
+ if (imageColor1 != null && !imageColor1.isDisposed()) {
imageColor1.dispose();
}
}
@@ -227,7 +227,7 @@ public class GradientFieldEditor extends FieldEditor {
protected void setButtonImage(RGB rgb) {
// First, dispose the current image, if any
Image image = colorButton.getImage();
- if(image != null) {
+ if (image != null) {
image.dispose();
}
@@ -248,9 +248,9 @@ public class GradientFieldEditor extends FieldEditor {
/**
* Allow user to change the color of the given button.
- *
+ *
* @param button
- * the button
+ * the button
* @return the selected color or null
* @see org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorPalettePopup
*/
@@ -259,7 +259,7 @@ public class GradientFieldEditor extends FieldEditor {
Rectangle r = colorButton.getBounds();
Point location = colorButton.getParent().toDisplay(r.x, r.y);
popup.open(new Point(location.x, location.y + r.height));
- if(popup.getSelectedColor() == null && !popup.useDefaultColor()) {
+ if (popup.getSelectedColor() == null && !popup.useDefaultColor()) {
return null;
}
RGB rgb = popup.getSelectedColor();
@@ -269,9 +269,9 @@ public class GradientFieldEditor extends FieldEditor {
/**
* used to set disable this field editor
- *
+ *
* @param enabled
- * a boolean, ture to edit the field
+ * a boolean, ture to edit the field
*/
public void setEnabled(boolean enabled) {
colorButton.setEnabled(enabled);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/dialogs/GradientTransparencySelectionDialog.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/dialogs/GradientTransparencySelectionDialog.java
index 2cd6ff9684e..c59fb44fc7a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/dialogs/GradientTransparencySelectionDialog.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/jface/preference/dialogs/GradientTransparencySelectionDialog.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2009 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
@@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Spinner;
/**
* Add a transparency group to the {@link GradientSelectionDialog} allow users to set the
* transparency too.
- *
+ *
* @author tlandre
*/
// @unused
@@ -40,20 +40,20 @@ public class GradientTransparencySelectionDialog extends GradientSelectionDialog
/**
* Default Constructor
- *
+ *
* @param parent
- * the shell used
+ * the shell used
* @param style
- * the style of the shell.
+ * the style of the shell.
* @param initColor1
- * the first color used for the gradient
+ * the first color used for the gradient
* @param initColor2
- * the seconde color used for the gradient
+ * the seconde color used for the gradient
* @param defaultGradientStyle
- * initial Gradient style. The allowed values are GradientStyle.HORIZONTAL or
- * GradientStyle.VERTICAL
+ * initial Gradient style. The allowed values are GradientStyle.HORIZONTAL or
+ * GradientStyle.VERTICAL
* @param transparency
- * the transparency of the gradient. It is ignored if not within [0, 100] range
+ * the transparency of the gradient. It is ignored if not within [0, 100] range
*/
// @unused
public GradientTransparencySelectionDialog(Shell parent, int style, RGB initColor1, RGB initColor2, int defaultGradientStyle, int transparency) {
@@ -67,9 +67,9 @@ public class GradientTransparencySelectionDialog extends GradientSelectionDialog
/**
* Creates the controls of the dialog.
- *
+ *
* @param parent
- * Parent shell
+ * Parent shell
*/
@Override
protected void createDialogControls(Shell parent) {
@@ -91,11 +91,11 @@ public class GradientTransparencySelectionDialog extends GradientSelectionDialog
/**
* Create the transparency group
- *
+ *
* @param parent
- * the shell used
+ * the shell used
* @param topComposite
- * the parent composite
+ * the parent composite
*/
protected void createTransparencyGroup(Shell parent, Composite topComposite) {
Group transparencyGroup = new Group(topComposite, SWT.NONE);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/messages/Messages.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/messages/Messages.java
index 181355afe8a..12605091647 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/messages/Messages.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/messages/Messages.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
@@ -30,8 +30,8 @@ public class Messages extends NLS {
public static String RulersAndGridGroup_GridInFront;
public static String RulersAndGridGroup_GridStyle;
-
-
+
+
static {
// initialize resource bundle
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusElementPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusElementPreferencePage.java
index 0a4f2b5d5b5..086bab5f0de 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusElementPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusElementPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Layout;
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.preferences.jface.preference.ColorFieldEditor} <em>ColorFieldEditor</em></li>
* <li>{@link org.eclipse.papyrus.infra.gmfdiag.preferences.jface.preference.FontFieldEditor} <em>FontFieldEditor</em></li>
* </ul>
- *
+ *
* @author tlandre
*/
public abstract class AbstractPapyrusElementPreferencePage extends AbstractPapyrusPreferencePage {
@@ -43,7 +43,7 @@ public abstract class AbstractPapyrusElementPreferencePage extends AbstractPapyr
/**
* create a local composite
- *
+ *
* @param parent
* @return
*/
@@ -66,9 +66,9 @@ public abstract class AbstractPapyrusElementPreferencePage extends AbstractPapyr
/**
* Get the specified preference type associated with this preference page.
- *
+ *
* @param preferenceType
- * an int representing the preference type to retrieve. It must be a value defined in {@link PreferencesConstantsHelper}
+ * an int representing the preference type to retrieve. It must be a value defined in {@link PreferencesConstantsHelper}
* @return the preference constant used to store the given prefence type.
*/
protected String getPreferenceConstant(int preferenceType) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusLinkPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusLinkPreferencePage.java
index 263acb4ccc8..4c9ca6718a0 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusLinkPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusLinkPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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,7 +21,7 @@ import org.eclipse.swt.widgets.Composite;
/**
* An abstract implementation of a basic link preference page.
- *
+ *
* <p>
* This Preference page adds the preference for
* <ul>
@@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Composite;
* <li>{@link org.eclipse.gmf.runtime.notation.RoutingStyle#getJumpLinkType <em>Jump Link Type</em>}</li>
* <li>{@link org.eclipse.gmf.runtime.notation.RoutingStyle#isJumpLinksReverse <em>Jump Links Reverse</em>}</li>
* </ul>
- *
+ *
* @author tlandre
*/
public abstract class AbstractPapyrusLinkPreferencePage extends AbstractPapyrusElementPreferencePage {
@@ -50,8 +50,8 @@ public abstract class AbstractPapyrusLinkPreferencePage extends AbstractPapyrusE
ConnectionGroup connectionGroupComposite = new ConnectionGroup(parent, getPreferenceKey(), this);
addAbstractGroup(connectionGroupComposite);
- //Label role group
- if(!getLabelRole().isEmpty()) {
+ // Label role group
+ if (!getLabelRole().isEmpty()) {
LabelGroup compartmentGroup = new LabelGroup(parent, getPreferenceKey(), this, getLabelRole());
addAbstractGroup(compartmentGroup);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusNodePreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusNodePreferencePage.java
index 9ce24b81b6d..f63b3761991 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusNodePreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusNodePreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Composite;
* <p>
* This Preference page adds the preference for {@link org.eclipse.gmf.runtime.notation.FillStyle#getFillColor() <em>FillColor</em>}
* </p>
- *
+ *
* @author tlandre
*/
public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusElementPreferencePage {
@@ -38,9 +38,9 @@ public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusE
protected List<String> compartmentsList;
/**
- *
+ *
* Constructor.
- *
+ *
*/
public AbstractPapyrusNodePreferencePage() {
compartmentsList = new ArrayList<String>();
@@ -48,9 +48,9 @@ public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusE
}
/**
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusElementPreferencePage#createPageContents(org.eclipse.swt.widgets.Composite)
- *
+ *
* @param parent
*/
@Override
@@ -62,13 +62,13 @@ public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusE
addAbstractGroup(backgroundColorGroup);
DecorationGroup decorationGroup = new DecorationGroup(parent, getPreferenceKey(), this);
addAbstractGroup(decorationGroup);
- if(!compartmentsList.isEmpty()) {
+ if (!compartmentsList.isEmpty()) {
NodeCompartmentGroup compartmentGroup = new NodeCompartmentGroup(parent, getPreferenceKey(), this, compartmentsList, getCompartmentTitleVisibilityPreferences().keySet(), getPreferenceStore());
addAbstractGroup(compartmentGroup);
}
- //Label role group
- if(!getLabelRole().isEmpty()) {
+ // Label role group
+ if (!getLabelRole().isEmpty()) {
LabelGroup compartmentGroup = new LabelGroup(parent, getPreferenceKey(), this, getLabelRole());
addAbstractGroup(compartmentGroup);
}
@@ -78,11 +78,11 @@ public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusE
* Initialize {@link #compartmentsList} with the name of the compartment owned by the node
*/
protected void initializeCompartmentsList() {
- // TODO Auto-generated method stub
+ // TODO Auto-generated method stub
}
/**
- *
+ *
* @return
* the label roles
*/
@@ -91,7 +91,7 @@ public abstract class AbstractPapyrusNodePreferencePage extends AbstractPapyrusE
}
/**
- *
+ *
* @return
* the compartment title visibility
*/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java
index 8f89b3315c3..d5e274bb733 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/AbstractPapyrusPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -36,15 +36,14 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
* An abstract implementation of a Preference page.
- *
+ *
* This preference page allows clients to define preference page in the preference of Eclipse, and
* in the properties of a project in the workspace.
* <p>
* Clients must implement :
* <ul>
* <li><code>getBundleId()</code> method in order to define the preference scope (Project or Instance) of the preference page.</li>
- * <li><code>createPageContents()</code> method to populate the preference page with the different {@link AbstractGroup}. </br>Each group added has to
- * be declared through the <code>addAbstractGroup(AbstractGroup fe)</code> method</li>
+ * <li><code>createPageContents()</code> method to populate the preference page with the different {@link AbstractGroup}. </br>Each group added has to be declared through the <code>addAbstractGroup(AbstractGroup fe)</code> method</li>
* </ul>
* </p>
*/
@@ -71,6 +70,7 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
return this.key;
}
+ @Override
public IPreferenceStore getPreferenceStore() {
return Activator.getDefault().getPreferenceStore();
}
@@ -79,15 +79,16 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
*/
public void setElement(IAdaptable element) {
- project = (IProject)element.getAdapter(IResource.class);
+ project = (IProject) element.getAdapter(IResource.class);
}
/**
* @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
*/
+ @Override
protected IPreferenceStore doGetPreferenceStore() {
IPreferenceStore store;
- if(project != null) {
+ if (project != null) {
store = new ScopedPreferenceStore(new ProjectScope(project), getBundleId());
} else {
store = new ScopedPreferenceStore(new InstanceScope(), getBundleId());
@@ -97,12 +98,12 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
/**
* Initializes this preference page for the given workbench.
- *
+ *
* @param workbench
- * the workbench
- *
+ * the workbench
+ *
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- *
+ *
*/
public void init(IWorkbench workbench) {
// Do nothing
@@ -135,9 +136,9 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* <p>
* Each field added has to be declared through the <code>addEditorFields(FieldEditor fe)</code> method
* </p>
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
*/
protected abstract void createPageContents(Composite parent);
@@ -145,12 +146,13 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* Add the given field editor to the page.
*/
protected void addAbstractGroup(AbstractGroup fe) {
- if(groupSet == null) {
+ if (groupSet == null) {
groupSet = new HashSet<AbstractGroup>();
}
groupSet.add(fe);
}
+ @Override
public boolean performOk() {
VisiblePageSingleton.getInstance().store();
return super.performOk();
@@ -160,8 +162,8 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* Stores the values of the fields contained in this page into the preference store.
*/
protected void storePreferences() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.storePreferences();
}
}
@@ -180,6 +182,7 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
*
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
*/
+ @Override
protected void performDefaults() {
loadDefaultPreferences();
super.performDefaults();
@@ -189,8 +192,8 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* Load the default preferences of the fields contained in this page
*/
private void loadDefaultPreferences() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.loadDefault();
}
}
@@ -201,8 +204,8 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
* Init groups contained in this page.
*/
private void initGroup() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.setPreferenceStore(getPreferenceStore());
gs.load();
}
@@ -212,8 +215,8 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
@Override
public void dispose() {
super.dispose();
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.dispose();
}
}
@@ -224,7 +227,7 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
@Override
public void setVisible(boolean visible) {
// TODO Auto-generated method stub
- if(visible == true) {
+ if (visible == true) {
VisiblePageSingleton.getInstance().setVisiblePage(this);
initGroup();
}
@@ -234,7 +237,7 @@ public abstract class AbstractPapyrusPreferencePage extends PreferencePage imple
/**
* The bundle ID used to defined the preference store
- *
+ *
* @return String
*/
protected abstract String getBundleId();
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java
index 3df83f43f5b..955fbea5482 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/DiagramPreferencePage.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2009 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
@@ -45,6 +45,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
private Set<AbstractGroup> groupSet;
+ @Override
public void createControl(Composite parent) {
super.createControl(parent);
initGroup();
@@ -57,10 +58,10 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
Group contentGroup = new Group(parent, 2);
contentGroup.setLayout(new GridLayout(4, false));
- //FontGroup
+ // FontGroup
FontGroup fontGroupComposite = new DiagramFontGroup(contentGroup, getPreferenceKey(), this);
addAbstractGroup(fontGroupComposite);
- //color
+ // color
NodeColorGroup colorGroupForNodeComposite = new DiagramNodeColorGroup(contentGroup, getPreferenceKey(), this);
addAbstractGroup(colorGroupForNodeComposite);
@@ -69,7 +70,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
ConnectionGroup connectionGroupComposite = new DiagramConnectionGroup(contentGroup, getPreferenceKey(), this);
addAbstractGroup(connectionGroupComposite);
- //background
+ // background
BackgroundColor backgroundColorGroup = new DiagramBackgroundColor(contentGroup, getPreferenceKey(), this);
addAbstractGroup(backgroundColorGroup);
@@ -89,14 +90,15 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
* Init groups contained in this page.
*/
private void initGroup() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.setPreferenceStore(getPreferenceStore());
gs.load();
}
}
}
+ @Override
public boolean performOk() {
VisiblePageSingleton.getInstance().store();
return super.performOk();
@@ -106,8 +108,8 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
* Stores the values of the fields contained in this page into the preference store.
*/
public void storePreferences() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.storePreferences();
}
}
@@ -119,7 +121,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
*/
public void storeAllPreferences() {
storePreferences();
- ((PapyrusPreferenceStore)getPreferenceStore()).deleteAllSubPreference(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX);
+ ((PapyrusPreferenceStore) getPreferenceStore()).deleteAllSubPreference(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX);
}
@@ -130,8 +132,8 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
@Override
public void dispose() {
super.dispose();
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.dispose();
}
}
@@ -143,7 +145,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
* Add the given field editor to the page.
*/
protected void addAbstractGroup(AbstractGroup fe) {
- if(groupSet == null) {
+ if (groupSet == null) {
groupSet = new HashSet<AbstractGroup>();
}
groupSet.add(fe);
@@ -153,8 +155,8 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
* Load the default preferences of the fields contained in this page
*/
private void loadDefaultPreferences() {
- if(groupSet != null) {
- for(AbstractGroup gs : groupSet) {
+ if (groupSet != null) {
+ for (AbstractGroup gs : groupSet) {
gs.loadDefault();
}
}
@@ -166,6 +168,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
*
* @see org.eclipse.jface.preference.PreferencePage#performDefaults()
*/
+ @Override
protected void performDefaults() {
loadDefaultPreferences();
super.performDefaults();
@@ -173,7 +176,7 @@ public class DiagramPreferencePage extends DiagramsPreferencePage {
@Override
public void setVisible(boolean visible) {
- if(visible == true) {
+ if (visible == true) {
VisiblePageSingleton.getInstance().setVisiblePage(this);
initGroup();
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/PapyrusAllDiagramsPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/PapyrusAllDiagramsPreferencePage.java
index a545c8fcb02..026dd1c7b68 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/PapyrusAllDiagramsPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/PapyrusAllDiagramsPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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
@@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Group;
/**
* The default preference page all element of diagrams
- *
+ *
*/
public class PapyrusAllDiagramsPreferencePage extends AbstractPapyrusPreferencePage {
@@ -52,10 +52,10 @@ public class PapyrusAllDiagramsPreferencePage extends AbstractPapyrusPreferenceP
Group contentGroup = new Group(parent, 2);
contentGroup.setLayout(new GridLayout(4, false));
- //FontGroup
+ // FontGroup
FontGroup fontGroupComposite = new EditorFontGroup(contentGroup, getTitle(), this);
addAbstractGroup(fontGroupComposite);
- //color
+ // color
NodeColorGroup colorGroupForNodeComposite = new EditorNodeColorGroup(contentGroup, getTitle(), this);
addAbstractGroup(colorGroupForNodeComposite);
@@ -64,7 +64,7 @@ public class PapyrusAllDiagramsPreferencePage extends AbstractPapyrusPreferenceP
ConnectionGroup connectionGroupComposite = new EditorConnectionGroup(contentGroup, getTitle(), this);
addAbstractGroup(connectionGroupComposite);
- //background
+ // background
BackgroundColor backgroundColorGroup = new EditorBackgroundColor(contentGroup, getTitle(), this);
addAbstractGroup(backgroundColorGroup);
@@ -86,55 +86,56 @@ public class PapyrusAllDiagramsPreferencePage extends AbstractPapyrusPreferenceP
/**
* use to init default preferences at the papyrus level
- *
+ *
* @param store
- * the preference store
+ * the preference store
*/
public static void initDefaults(final IPreferenceStore store) {
- Display.getDefault().syncExec(new Runnable() { //to be in the thread ui
-
- public void run() {
-
- //Nodes
- PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
- PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
-
- // Set the default for the gradient
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRADIENT_POLICY), false);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(new org.eclipse.swt.graphics.RGB(255, 255, 255), new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
-
- // Links
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.SMOOTHNESS), Smoothness.NONE);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_STATUS), JumpLinkStatus.NONE);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_TYPE), JumpLinkStatus.NONE);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_REVERSE), false);
-
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_STYLE), Routing.MANUAL);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_POLICY_OBSTRUCTION), false);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_POLICY_DISTANCE), false);
-
- //decoration
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.SHADOW), false);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ELEMENTICON), false);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.QUALIFIEDNAME), false);
- //dimension
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.HEIGHT), 100);
-
- //Rulers and grid group
- RulersAndGridGroup.initDefaults(store);
- }
- });
+ Display.getDefault().syncExec(new Runnable() { // to be in the thread ui
+
+ public void run() {
+
+ // Nodes
+ PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_FILL), new org.eclipse.swt.graphics.RGB(255, 255, 255));
+ PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_LINE), new org.eclipse.swt.graphics.RGB(0, 0, 0));
+
+ // Set the default for the gradient
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRADIENT_POLICY), false);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(new org.eclipse.swt.graphics.RGB(255, 255, 255), new org.eclipse.swt.graphics.RGB(0, 0, 0), 0, 0);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.COLOR_GRADIENT), gradientPreferenceConverter.getPreferenceValue());
+
+ // Links
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.SMOOTHNESS), Smoothness.NONE);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_STATUS), JumpLinkStatus.NONE);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_TYPE), JumpLinkStatus.NONE);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.JUMPLINK_REVERSE), false);
+
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_STYLE), Routing.MANUAL);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_POLICY_OBSTRUCTION), false);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ROUTING_POLICY_DISTANCE), false);
+
+ // decoration
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.SHADOW), false);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.ELEMENTICON), false);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.QUALIFIEDNAME), false);
+ // dimension
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.HEIGHT), 100);
+
+ // Rulers and grid group
+ RulersAndGridGroup.initDefaults(store);
+ }
+ });
}
/**
* {@inheritDoc}
*/
+ @Override
public void storeAllPreferences() {
super.storeAllPreferences();
- ((PapyrusPreferenceStore)getPreferenceStore()).deleteAllSubPreference(PreferencesConstantsHelper.PAPYRUS_EDITOR_PREFERENCE_PREFIX);
+ ((PapyrusPreferenceStore) getPreferenceStore()).deleteAllSubPreference(PreferencesConstantsHelper.PAPYRUS_EDITOR_PREFERENCE_PREFIX);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPathmapsPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPathmapsPreferencePage.java
index dda5b6b60f6..0b2331e4e96 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPathmapsPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPathmapsPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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,7 +25,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
* The Papyrus Pathmaps preference page
- *
+ *
* @author tlandre
*/
public class PapyrusPathmapsPreferencePage extends PathmapsPreferencePage implements IWorkbenchPropertyPage {
@@ -50,15 +50,16 @@ public class PapyrusPathmapsPreferencePage extends PathmapsPreferencePage implem
* @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
*/
public void setElement(IAdaptable element) {
- project = (IProject)element.getAdapter(IResource.class);
+ project = (IProject) element.getAdapter(IResource.class);
}
/**
* @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
*/
+ @Override
protected IPreferenceStore doGetPreferenceStore() {
IPreferenceStore store;
- if(project != null) {
+ if (project != null) {
store = new ScopedPreferenceStore(new ProjectScope(project), getBundleId());
} else {
store = new ScopedPreferenceStore(new InstanceScope(), getBundleId());
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPrintingPreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPrintingPreferencePage.java
index dea1eadd2ca..c520fc2f895 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPrintingPreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusPrintingPreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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,7 +25,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
* The Papyrus printing preference page
- *
+ *
* @author tlandre
*/
public class PapyrusPrintingPreferencePage extends PrintingPreferencePage implements IWorkbenchPropertyPage {
@@ -50,15 +50,16 @@ public class PapyrusPrintingPreferencePage extends PrintingPreferencePage implem
* @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
*/
public void setElement(IAdaptable element) {
- project = (IProject)element.getAdapter(IResource.class);
+ project = (IProject) element.getAdapter(IResource.class);
}
/**
* @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
*/
+ @Override
protected IPreferenceStore doGetPreferenceStore() {
IPreferenceStore store;
- if(project != null) {
+ if (project != null) {
store = new ScopedPreferenceStore(new ProjectScope(project), getBundleId());
} else {
store = new ScopedPreferenceStore(new InstanceScope(), getBundleId());
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusUML2PreferencePage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusUML2PreferencePage.java
index 64aed575cb4..8f176dfe3cc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusUML2PreferencePage.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/PapyrusUML2PreferencePage.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2008 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,11 +19,11 @@ import org.eclipse.swt.widgets.Composite;
/**
* Represent the main preference page of the Papyrus UML2 editor
- *
+ *
* <p>
* This class shouldn't be overriden.
* </p>
- *
+ *
* @author tlandre
*/
public class PapyrusUML2PreferencePage extends AbstractPapyrusPreferencePage {
@@ -42,9 +42,9 @@ public class PapyrusUML2PreferencePage extends AbstractPapyrusPreferencePage {
/**
* Initialize the fields editor of this preference page. This method is call during the
* initialization of the preference page.
- *
+ *
* @param store
- * the preference store used
+ * the preference store used
*/
public static void initDefaults(IPreferenceStore store) {
// TODO Auto-generated method stub
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.java
index 506843da6dc..12248b9d021 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/pages/internal/VisiblePageSingleton.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
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage
* This singleton has bee created to manage the button ok and apply of preference page.
* In the case of button ok pressed, the behavior of eclipse try of apply in the first preference page found.
* Here each page has a specific behavior. So to store the preference, the active page is called
- *
+ *
*/
public class VisiblePageSingleton {
@@ -30,11 +30,11 @@ public class VisiblePageSingleton {
private IPreferencePage page;
/**
- *
+ *
* @return the instance of the {@link VisiblePageSingleton}
*/
public static VisiblePageSingleton getInstance() {
- if(instance == null) {
+ if (instance == null) {
instance = new VisiblePageSingleton();
}
return instance;
@@ -42,16 +42,16 @@ public class VisiblePageSingleton {
/**
* set the visible page
- *
+ *
* @param page
- * a {@link IPreferencePage} --> {@link DiagramPreferencePage} or {@link AbstractPapyrusPreferencePage}
+ * a {@link IPreferencePage} --> {@link DiagramPreferencePage} or {@link AbstractPapyrusPreferencePage}
*/
public void setVisiblePage(IPreferencePage page) {
this.page = page;
}
/**
- *
+ *
* @return the Visible Page
*/
public IPreferencePage getVisiblePage() {
@@ -62,12 +62,12 @@ public class VisiblePageSingleton {
* call the visisble page in order to store preferences
*/
public void store() {
- if(this.page != null) {
- if(this.page instanceof DiagramPreferencePage) {
- ((DiagramPreferencePage)(this.page)).storeAllPreferences();
+ if (this.page != null) {
+ if (this.page instanceof DiagramPreferencePage) {
+ ((DiagramPreferencePage) (this.page)).storeAllPreferences();
}
- if(this.page instanceof AbstractPapyrusPreferencePage) {
- ((AbstractPapyrusPreferencePage)(this.page)).storeAllPreferences();
+ if (this.page instanceof AbstractPapyrusPreferencePage) {
+ ((AbstractPapyrusPreferencePage) (this.page)).storeAllPreferences();
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java
index dfbfe516602..2704c6c91d1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/AbstractGroup.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -41,7 +41,7 @@ public abstract class AbstractGroup extends Composite {
/**
* Gets the dialog page.
- *
+ *
* @return the dialogPage
*/
protected DialogPage getDialogPage() {
@@ -53,7 +53,7 @@ public abstract class AbstractGroup extends Composite {
/**
* Gets the title.
- *
+ *
* @return the title
*/
public String getKey() {
@@ -62,9 +62,9 @@ public abstract class AbstractGroup extends Composite {
/**
* Sets the title.
- *
+ *
* @param title
- * the title to set
+ * the title to set
*/
protected void setKey(String title) {
this.key = title;
@@ -72,13 +72,13 @@ public abstract class AbstractGroup extends Composite {
/**
* Instantiates a new abstract group.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param String
- * the title of the page
+ * the title of the page
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
*/
public AbstractGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, SWT.None);
@@ -90,10 +90,10 @@ public abstract class AbstractGroup extends Composite {
/**
* Get the specified preference type associated with this preference page.
- *
+ *
* @param preferenceType
- * an int representing the preference type to retrieve. It must be a value defined in {@link PreferencesConstantsHelper}
- *
+ * an int representing the preference type to retrieve. It must be a value defined in {@link PreferencesConstantsHelper}
+ *
* @return the preference constant used to store the given preference type.
*/
protected String getPreferenceConstant(int preferenceType) {
@@ -103,10 +103,10 @@ public abstract class AbstractGroup extends Composite {
/**
* Gets an encapsulated compo. This composite is used to contain a FieldEditor and to allow
* developers to work with a FieldEditor like Composite element.
- *
+ *
* @param parent
- * the parent
- *
+ * the parent
+ *
* @return the encapsulated compo
*/
protected final Composite getEncapsulatedCompo(Composite parent) {
@@ -118,9 +118,9 @@ public abstract class AbstractGroup extends Composite {
/**
* Register field editor. It will add the fieldEditor to a map that will be used to
* store/load/loadDefault/set the PreferenceStore of contained fieldEditor
- *
+ *
* @param fieldEditor
- * the fieldEditor to add.
+ * the fieldEditor to add.
*/
protected void addFieldEditor(FieldEditor fieldEditor) {
fieldsEditor.add(fieldEditor);
@@ -128,44 +128,44 @@ public abstract class AbstractGroup extends Composite {
/**
* Load preferences of all registered fieldEditors.
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#addFieldEditor(FieldEditor)
*/
public void load() {
- for(FieldEditor fe : fieldsEditor) {
+ for (FieldEditor fe : fieldsEditor) {
fe.load();
}
}
/**
* Set the preference store of all registered fieldEditors.
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#addFieldEditor(FieldEditor)
*/
public final void setPreferenceStore(IPreferenceStore store) {
- for(FieldEditor fe : fieldsEditor) {
+ for (FieldEditor fe : fieldsEditor) {
fe.setPreferenceStore(store);
}
}
/**
* Load default preferences of all registered fieldEditors.
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#addFieldEditor(FieldEditor)
*/
public final void loadDefault() {
- for(FieldEditor fe : fieldsEditor) {
+ for (FieldEditor fe : fieldsEditor) {
fe.loadDefault();
}
}
/**
* Store preferences of the registered fieldEditors.
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#addFieldEditor(FieldEditor)
*/
public final void storePreferences() {
- for(FieldEditor fe : fieldsEditor) {
+ for (FieldEditor fe : fieldsEditor) {
fe.store();
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/BackgroundColor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/BackgroundColor.java
index 7a622bbc66c..d1039cc983c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/BackgroundColor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/BackgroundColor.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -34,13 +34,13 @@ public class BackgroundColor extends AbstractGroup {
/**
* Instantiates a new background color group.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param key
- * the key of the preference
+ * the key of the preference
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
**/
public BackgroundColor(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -57,9 +57,9 @@ public class BackgroundColor extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
public void createContent(Composite parent) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/ConnectionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/ConnectionGroup.java
index adad25c62b2..eff858b67ec 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/ConnectionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/ConnectionGroup.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -33,13 +33,13 @@ public class ConnectionGroup extends AbstractGroup {
/**
* Instantiates a new connection group composite.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param String
- * the title of the page
+ * the title of the page
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
**/
public ConnectionGroup(Composite parent, String title, DialogPage dialogPage) {
@@ -66,21 +66,21 @@ public class ConnectionGroup extends AbstractGroup {
private static final String ROUTING_DISTANCE_POLICY_BOOLEANFIELDEDITOR_LABEL = Messages.AbstractPapyrusLinkPreferencePage_ClosestDistance;
/** The Constant SMOOTHNESS_COMBOFIELDEDITOR_NAMES_AND_VALUES. */
- private static final String[][] SMOOTHNESS_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_None, "" + Smoothness.NONE }, //$NON-NLS-2$
- { Messages.AbstractPapyrusLinkPreferencePage_Less, "" + Smoothness.LESS }, { Messages.AbstractPapyrusLinkPreferencePage_Normal, "" + Smoothness.NORMAL }, { Messages.AbstractPapyrusLinkPreferencePage_More, "" + Smoothness.MORE } }; //$NON-NLS-2$ //$NON-NLS-4$ //$NON-NLS-6$
+ private static final String[][] SMOOTHNESS_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_None, "" + Smoothness.NONE },
+ { Messages.AbstractPapyrusLinkPreferencePage_Less, "" + Smoothness.LESS }, { Messages.AbstractPapyrusLinkPreferencePage_Normal, "" + Smoothness.NORMAL }, { Messages.AbstractPapyrusLinkPreferencePage_More, "" + Smoothness.MORE } }; //$NON-NLS-2$
/** The Constant JUMPLINK_STATUS_COMBOFIELDEDITOR_NAMES_AND_VALUES. */
- private static final String[][] JUMPLINK_STATUS_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_None, "" + JumpLinkStatus.NONE }, { Messages.AbstractPapyrusLinkPreferencePage_Below, "" + JumpLinkStatus.BELOW }, //$NON-NLS-2$ //$NON-NLS-4$
- { Messages.AbstractPapyrusLinkPreferencePage_All, "" + JumpLinkStatus.ALL }, { Messages.AbstractPapyrusLinkPreferencePage_Above, "" + JumpLinkStatus.ABOVE } }; //$NON-NLS-2$ //$NON-NLS-4$
+ private static final String[][] JUMPLINK_STATUS_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_None, "" + JumpLinkStatus.NONE }, { Messages.AbstractPapyrusLinkPreferencePage_Below, "" + JumpLinkStatus.BELOW }, //$NON-NLS-2$
+ { Messages.AbstractPapyrusLinkPreferencePage_All, "" + JumpLinkStatus.ALL }, { Messages.AbstractPapyrusLinkPreferencePage_Above, "" + JumpLinkStatus.ABOVE } }; //$NON-NLS-2$
/** The Constant JUMPLINK_TYPE_COMBOFIELDEDITOR_NAMES_AND_VALUES. */
- private static final String[][] JUMPLINK_TYPE_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_SemiCircle, "" + JumpLinkType.SEMICIRCLE }, { Messages.AbstractPapyrusLinkPreferencePage_Square, "" + JumpLinkType.SQUARE }, //$NON-NLS-2$ //$NON-NLS-4$
- { Messages.AbstractPapyrusLinkPreferencePage_Chamfered, "" + JumpLinkType.CHAMFERED } }; //$NON-NLS-2$
+ private static final String[][] JUMPLINK_TYPE_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_SemiCircle, "" + JumpLinkType.SEMICIRCLE }, { Messages.AbstractPapyrusLinkPreferencePage_Square, "" + JumpLinkType.SQUARE }, //$NON-NLS-2$
+ { Messages.AbstractPapyrusLinkPreferencePage_Chamfered, "" + JumpLinkType.CHAMFERED } };
// TODO : check if Tree is always a valid possibility
/** The Constant ROUTING_STYLES_COMBOFIELDEDITOR_NAMES_AND_VALUES. */
- private static final String[][] ROUTING_STYLES_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_Oblique, "" + Routing.MANUAL }, { Messages.AbstractPapyrusLinkPreferencePage_Rectilinear, "" + Routing.RECTILINEAR }, //$NON-NLS-2$ //$NON-NLS-4$
- { Messages.AbstractPapyrusLinkPreferencePage_Tree, "" + Routing.TREE } }; //$NON-NLS-2$
+ private static final String[][] ROUTING_STYLES_COMBOFIELDEDITOR_NAMES_AND_VALUES = { { Messages.AbstractPapyrusLinkPreferencePage_Oblique, "" + Routing.MANUAL }, { Messages.AbstractPapyrusLinkPreferencePage_Rectilinear, "" + Routing.RECTILINEAR }, //$NON-NLS-2$
+ { Messages.AbstractPapyrusLinkPreferencePage_Tree, "" + Routing.TREE } };
/** The routing styles combo field editor. */
private ComboFieldEditor routingStylesComboFieldEditor;
@@ -102,9 +102,9 @@ public class ConnectionGroup extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
public void createContent(Composite parent) {
Group connectionGroup = new Group(parent, 2);
@@ -121,9 +121,9 @@ public class ConnectionGroup extends AbstractGroup {
/**
* Creates the jump link group.
- *
+ *
* @param connectionGroup
- * the connection group
+ * the connection group
*/
private void createJumpLinkGroup(Group connectionGroup) {
@@ -149,9 +149,9 @@ public class ConnectionGroup extends AbstractGroup {
/**
* Creates the routing group.
- *
+ *
* @param connectionGroup
- * the connection group
+ * the connection group
*/
private void createRoutingGroup(Group connectionGroup) {
Group routingGroup = new Group(connectionGroup, 2);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DecorationGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DecorationGroup.java
index 66a965844c8..8776bba50d2 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DecorationGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DecorationGroup.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
@@ -46,13 +46,13 @@ public class DecorationGroup extends AbstractGroup {
/**
* Instantiates a new decoration group.
- *
+ *
* @param parent
- * the parent
+ * the parent
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DecorationGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -61,9 +61,9 @@ public class DecorationGroup extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
public void createContent(Composite parent) {
Group decorationGroup = new Group(parent, 2);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DimensionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DimensionGroup.java
index 594e44a6334..e46bfbcf783 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DimensionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/DimensionGroup.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
@@ -41,13 +41,13 @@ public class DimensionGroup extends AbstractGroup {
/**
* Instantiates a new dimension group.
- *
+ *
* @param parent
- * the parent
+ * the parent
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DimensionGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -56,9 +56,9 @@ public class DimensionGroup extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
public void createContent(Composite parent) {
Group decorationGroup = new Group(parent, 4);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/FontGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/FontGroup.java
index 6bf54fb1f9d..43b7cdbcfcf 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/FontGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/FontGroup.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -35,13 +35,13 @@ public class FontGroup extends AbstractGroup {
/**
* Instantiates a new font group composite.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param key
- * the key of the preference
+ * the key of the preference
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
**/
public FontGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -51,9 +51,9 @@ public class FontGroup extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
protected void createContent(Composite parent) {
Group fontGroup = new Group(parent, SWT.SHADOW_NONE);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LabelGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LabelGroup.java
index 7a39d492129..2a308726297 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LabelGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LabelGroup.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 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
@@ -31,9 +31,9 @@ import org.eclipse.swt.widgets.Group;
/**
* The class LabelGroup to manage the property of the label
- *
- *
- *
+ *
+ *
+ *
*/
public class LabelGroup extends AbstractGroup {
@@ -43,17 +43,17 @@ public class LabelGroup extends AbstractGroup {
private TreeMap<String, String> myRoles;
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param preferenceKey
- * the preference key
+ * the preference key
* @param dialogPage
- * the dialog page
+ * the dialog page
* @param roles
- * the roles for the labels
+ * the roles for the labels
*/
public LabelGroup(Composite parent, String preferenceKey, DialogPage dialogPage, TreeMap<String, String> roles) {
super(parent, preferenceKey, dialogPage);
@@ -63,19 +63,19 @@ public class LabelGroup extends AbstractGroup {
/**
* create the content.
- *
+ *
* @param parent
- * : the parent composite
+ * : the parent composite
*/
protected void createContent(Composite parent) {
Group group = new Group(parent, SWT.NONE);
group.setLayout(new GridLayout());
group.setText(Messages.LabelGroup_Labels_To_Display);
- for(String role : myRoles.keySet()) {
+ for (String role : myRoles.keySet()) {
String key = PreferencesConstantsHelper.getLabelElementConstant(getKey(), role, PreferencesConstantsHelper.LABEL_VISIBILITY);
Image im = null;
String iconPath = myRoles.get(role);
- if(iconPath != null && iconPath != "") { //$NON-NLS-1$
+ if (iconPath != null && iconPath != "") { //$NON-NLS-1$
try {
im = ImageDescriptor.createFromURL(new URL(iconPath)).createImage();
} catch (MalformedURLException e) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LinkColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LinkColorGroup.java
index 142b71f8bdb..5dadf7d6bf7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LinkColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/LinkColorGroup.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -39,13 +39,13 @@ public class LinkColorGroup extends AbstractGroup {
/**
* creation of a colorGroup Composite.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
* @param title
- * the title
+ * the title
*/
public LinkColorGroup(Composite parent, String title, DialogPage dialogPage) {
@@ -55,7 +55,7 @@ public class LinkColorGroup extends AbstractGroup {
/**
* Gets the toolbar.
- *
+ *
* @return the group that contains editors
*/
protected Group getToolbar() {
@@ -64,9 +64,9 @@ public class LinkColorGroup extends AbstractGroup {
/**
* Creates the content.
- *
+ *
* @param parent
- * the parent
+ * the parent
*/
protected void createContent(Composite parent) {
toolbar = new Group(parent, SWT.SHADOW_NONE);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java
index 8773bed4a82..8327041b728 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java
@@ -1,15 +1,15 @@
/*****************************************************************************
* Copyright (c) 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
- * Thibault Landre (Atos Origin)
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
@@ -35,13 +35,13 @@ public class NodeColorGroup extends LinkColorGroup {
/**
* create a composite to display the group color for a node.
- *
+ *
* @param parent
- * the parent of the composite
+ * the parent of the composite
* @param dialogPage
- * to set the page in field editor
+ * to set the page in field editor
* @param title
- * the title
+ * the title
*/
@@ -51,10 +51,11 @@ public class NodeColorGroup extends LinkColorGroup {
/**
* create the content.
- *
+ *
* @param parent
- * : the parent composite
+ * : the parent composite
*/
+ @Override
protected void createContent(Composite parent) {
super.createContent(parent);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeCompartmentGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeCompartmentGroup.java
index bac2da99fae..863e76f5f06 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeCompartmentGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeCompartmentGroup.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2009-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
@@ -45,9 +45,9 @@ public class NodeCompartmentGroup extends AbstractGroup {
private final Set<String> compartmentsWithTitle;
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* @param title
* @param dialogPage
@@ -63,18 +63,18 @@ public class NodeCompartmentGroup extends AbstractGroup {
/**
* create the content.
- *
+ *
* @param parent
- * : the parent composite
+ * : the parent composite
*/
protected void createContent(Composite parent) {
- for(String compartment : myCompartments) {
+ for (String compartment : myCompartments) {
addCompartmentVisibilityGroup(parent, compartment);
}
}
private void addCompartmentVisibilityGroup(Composite parent, String compartment) {
- // show Compartment Visibility and CompartmentName Visibility items in the same row
+ // show Compartment Visibility and CompartmentName Visibility items in the same row
Group group = new Group(parent, SWT.NONE);
group.setLayout(new GridLayout(2, true));
group.setText(compartment);
@@ -88,24 +88,24 @@ public class NodeCompartmentGroup extends AbstractGroup {
String compartmentVisibilityLabel = "Show compartment";
Button showCompartmentButton = addCheckboxField(group, compartmentVisibilityPreference, compartmentVisibilityLabel);
- if(this.compartmentsWithTitle.contains(compartment)) {
+ if (this.compartmentsWithTitle.contains(compartment)) {
String compartmentNameVisibilityPreference = PreferencesConstantsHelper.getCompartmentElementConstant(getKey(), compartment, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
String compartmentNameVisibilityLabel = "Show title";
Button showNameButton = addCheckboxField(group, compartmentNameVisibilityPreference, compartmentNameVisibilityLabel);
boolean showCompartmentIsNotChecked = !myPreferenceStore.getBoolean(compartmentVisibilityPreference);
- if(showCompartmentIsNotChecked) {
+ if (showCompartmentIsNotChecked) {
showNameButton.setEnabled(false);
}
- createDependency(showCompartmentButton, new Control[]{ showNameButton });
+ createDependency(showCompartmentButton, new Control[] { showNameButton });
}
}
private Button addCheckboxField(Composite parent, String preferenceKey, String label) {
- // show Compartment Visibility and CompartmentName Visibility items in the same row
- // as CheckBoxFieldEditor resets layout data to fit the grid we create this stub plate
- // @see #doFillIntoGrid
+ // show Compartment Visibility and CompartmentName Visibility items in the same row
+ // as CheckBoxFieldEditor resets layout data to fit the grid we create this stub plate
+ // @see #doFillIntoGrid
Composite plate = new Composite(parent, SWT.NONE);
plate.setLayoutData(new GridData());
@@ -121,7 +121,7 @@ public class NodeCompartmentGroup extends AbstractGroup {
public void widgetSelected(SelectionEvent e) {
boolean state = master.getSelection();
- for(int i = 0; i < slaves.length; i++) {
+ for (int i = 0; i < slaves.length; i++) {
slaves[i].setEnabled(state);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedCompartmentGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedCompartmentGroup.java
index d7899d772f4..30a259e2e1f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedCompartmentGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedCompartmentGroup.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2009-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
@@ -44,9 +44,9 @@ public class OrderedCompartmentGroup extends AbstractGroup {
private final List<String> compartmentsWithTitle;
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* @param title
* @param dialogPage
@@ -62,18 +62,18 @@ public class OrderedCompartmentGroup extends AbstractGroup {
/**
* create the content.
- *
+ *
* @param parent
- * : the parent composite
+ * : the parent composite
*/
protected void createContent(Composite parent) {
- for(String name : compartmentsName) {
+ for (String name : compartmentsName) {
addCompartmentVisibilityGroup(parent, name);
}
}
private void addCompartmentVisibilityGroup(Composite parent, String compartmentName) {
- // show Compartment Visibility and CompartmentName Visibility items in the same row
+ // show Compartment Visibility and CompartmentName Visibility items in the same row
Group group = new Group(parent, SWT.NONE);
group.setLayout(new GridLayout(2, true));
group.setText(compartmentName);
@@ -87,24 +87,24 @@ public class OrderedCompartmentGroup extends AbstractGroup {
String compartmentVisibilityLabel = "Show compartment";
Button showCompartmentButton = addCheckboxField(group, compartmentVisibilityPreference, compartmentVisibilityLabel);
- if(this.compartmentsWithTitle.contains(compartmentName)) {
+ if (this.compartmentsWithTitle.contains(compartmentName)) {
String compartmentNameVisibilityPreference = PreferencesConstantsHelper.getCompartmentElementConstant(getKey(), compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
String compartmentNameVisibilityLabel = "Show title";
Button showNameButton = addCheckboxField(group, compartmentNameVisibilityPreference, compartmentNameVisibilityLabel);
boolean showCompartmentIsNotChecked = !store.getBoolean(compartmentVisibilityPreference);
- if(showCompartmentIsNotChecked) {
+ if (showCompartmentIsNotChecked) {
showNameButton.setEnabled(false);
}
- createDependency(showCompartmentButton, new Control[]{ showNameButton });
+ createDependency(showCompartmentButton, new Control[] { showNameButton });
}
}
private Button addCheckboxField(Composite parent, String preferenceKey, String label) {
- // show Compartment Visibility and CompartmentName Visibility items in the same row
- // as CheckBoxFieldEditor resets layout data to fit the grid we create this stub plate
- // @see #doFillIntoGrid
+ // show Compartment Visibility and CompartmentName Visibility items in the same row
+ // as CheckBoxFieldEditor resets layout data to fit the grid we create this stub plate
+ // @see #doFillIntoGrid
Composite plate = new Composite(parent, SWT.NONE);
plate.setLayoutData(new GridData());
@@ -120,7 +120,7 @@ public class OrderedCompartmentGroup extends AbstractGroup {
public void widgetSelected(SelectionEvent e) {
boolean state = master.getSelection();
- for(int i = 0; i < slaves.length; i++) {
+ for (int i = 0; i < slaves.length; i++) {
slaves[i].setEnabled(state);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedLabelGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedLabelGroup.java
index 7f48655ef36..f8d211f7801 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedLabelGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/OrderedLabelGroup.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 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
@@ -42,17 +42,17 @@ public class OrderedLabelGroup extends AbstractGroup {
private Map<String, String> myRoles = new LinkedHashMap<String, String>();
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param preferenceKey
- * the preference key
+ * the preference key
* @param dialogPage
- * the dialog page
+ * the dialog page
* @param roles
- * the roles for the labels
+ * the roles for the labels
*/
public OrderedLabelGroup(Composite parent, String preferenceKey, DialogPage dialogPage, Map<String, String> roles) {
super(parent, preferenceKey, dialogPage);
@@ -61,21 +61,21 @@ public class OrderedLabelGroup extends AbstractGroup {
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param preferenceKey
- * the preference key
+ * the preference key
* @param dialogPage
- * the dialog page
+ * the dialog page
* @param roles
- * the roles for the labels
+ * the roles for the labels
*/
public OrderedLabelGroup(Composite parent, String preferenceKey, DialogPage dialogPage, List<String> roles) {
super(parent, preferenceKey, dialogPage);
- for(String role : roles) {
+ for (String role : roles) {
myRoles.put(role, ""); //$NON-NLS-1$
}
createContent(parent);
@@ -83,19 +83,19 @@ public class OrderedLabelGroup extends AbstractGroup {
/**
* create the content.
- *
+ *
* @param parent
- * : the parent composite
+ * : the parent composite
*/
protected void createContent(Composite parent) {
Group group = new Group(parent, SWT.NONE);
group.setLayout(new GridLayout());
group.setText(Messages.LabelGroup_Labels_To_Display);
- for(String role : myRoles.keySet()) {
+ for (String role : myRoles.keySet()) {
String key = PreferencesConstantsHelper.getLabelElementConstant(getKey(), role, PreferencesConstantsHelper.LABEL_VISIBILITY);
Image im = null;
String iconPath = myRoles.get(role);
- if(iconPath != null && iconPath != "") { //$NON-NLS-1$
+ if (iconPath != null && iconPath != "") { //$NON-NLS-1$
try {
im = ImageDescriptor.createFromURL(new URL(iconPath)).createImage();
} catch (MalformedURLException e) {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/RulersAndGridGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/RulersAndGridGroup.java
index 524d1516087..0f25d6f2856 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/RulersAndGridGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/RulersAndGridGroup.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
@@ -46,7 +46,7 @@ import org.eclipse.swt.widgets.Text;
import com.ibm.icu.text.NumberFormat;
/**
- *
+ *
* This group provides the elements to manage the grid of a diagram
* Adapter code from the Preference Page Rulers And Grid
*/
@@ -81,6 +81,7 @@ public class RulersAndGridGroup extends AbstractGroup {
private String GRID_SPACING_LABEL_PIXELS = DiagramUIMessages.GridRulerPreferencePage_gridSpacing_label_pixels;
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getElementConstant(getKey(), preferenceType);
}
@@ -108,18 +109,18 @@ public class RulersAndGridGroup extends AbstractGroup {
private ColorFieldEditor gridColorEditor = null;
/**
- *
+ *
* @param store
- * the preference store to initialize
+ * the preference store to initialize
*/
public static void initDefaults(IPreferenceStore store) {
- //rulers and grid
- // String defaultCountry = Locale.getDefault().getCountry();
- // if(defaultCountry == null || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry())) {
- // store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RULER_UNITS), RulerProvider.UNIT_INCHES);
- // } else {
- // store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RULER_UNITS), RulerProvider.UNIT_CENTIMETERS);
- // }
+ // rulers and grid
+ // String defaultCountry = Locale.getDefault().getCountry();
+ // if(defaultCountry == null || defaultCountry.equals(Locale.US.getCountry()) || defaultCountry.equals(Locale.CANADA.getCountry())) {
+ // store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RULER_UNITS), RulerProvider.UNIT_INCHES);
+ // } else {
+ // store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RULER_UNITS), RulerProvider.UNIT_CENTIMETERS);
+ // }
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RULER_UNITS), RulerProvider.UNIT_PIXELS);
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.VIEW_RULER), false);
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.VIEW_GRID), false);
@@ -127,7 +128,7 @@ public class RulersAndGridGroup extends AbstractGroup {
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.SNAP_TO_GEOMETRY), false);
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRID_LINE_STYLE), Graphics.LINE_CUSTOM);
store.setDefault(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRID_ORDER), false);
- //to force the refresh of the value
+ // to force the refresh of the value
PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRID_LINE_COLOR), new org.eclipse.swt.graphics.RGB(250, 0, 0));
final int rgbValue = 50;
PreferenceConverter.setDefault(store, PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.GRID_LINE_COLOR), new org.eclipse.swt.graphics.RGB(rgbValue, rgbValue, rgbValue));
@@ -136,9 +137,9 @@ public class RulersAndGridGroup extends AbstractGroup {
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* @param key
* @param dialogPage
@@ -149,7 +150,7 @@ public class RulersAndGridGroup extends AbstractGroup {
}
/**
- *
+ *
* @param parent
*/
public void createContents(final Composite parent) {
@@ -182,7 +183,7 @@ public class RulersAndGridGroup extends AbstractGroup {
rulerUnitsCombo.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
+ // do nothing
}
public void widgetSelected(SelectionEvent e) {
@@ -288,21 +289,22 @@ public class RulersAndGridGroup extends AbstractGroup {
* We are storing all values related to the page setup as doubles
* so we call this function when ever we are getting values from
* the dialog.
- *
+ *
* @param number
* @return
*/
private Double forceDouble(Number number) {
- if(!(number instanceof Double))
+ if (!(number instanceof Double)) {
return new Double(number.doubleValue());
- return (Double)number;
+ }
+ return (Double) number;
}
private void updateUnits() {
int units = getUnits();
- switch(units) {
+ switch (units) {
case RulerProvider.UNIT_INCHES:
gridSpacing.setLabelText(GRID_SPACING_LABEL_INCHES);
break;
@@ -327,72 +329,72 @@ public class RulersAndGridGroup extends AbstractGroup {
int units = rulerUnits.getComboControl().getSelectionIndex();
// IF no selection has been made
- if(units == -1) {
+ if (units == -1) {
// Read the preference store
- units = 1;//FIXME;
+ units = 1;// FIXME;
oldUnits = units;
}
return units;
}
- // private String convertUnits(int fromUnits, int toUnits) {
- // String valueStr = gridSpacing.getStringValue();
- // if(fromUnits == toUnits) {
- // return valueStr;
- // }
+ // private String convertUnits(int fromUnits, int toUnits) {
+ // String valueStr = gridSpacing.getStringValue();
+ // if(fromUnits == toUnits) {
+ // return valueStr;
+ // }
//
- // //Double value = Double.valueOf( valueStr );
- // NumberFormat numberFormatter = NumberFormat.getInstance();
- // Double value = new Double(0.125);
- // try {
- // value = forceDouble(numberFormatter.parse(valueStr));
- // } catch (ParseException e) {
- // // Use the default
- // }
- // double pixelValue = 0;
+ // //Double value = Double.valueOf( valueStr );
+ // NumberFormat numberFormatter = NumberFormat.getInstance();
+ // Double value = new Double(0.125);
+ // try {
+ // value = forceDouble(numberFormatter.parse(valueStr));
+ // } catch (ParseException e) {
+ // // Use the default
+ // }
+ // double pixelValue = 0;
//
- // Display display = getDisplay();
+ // Display display = getDisplay();
//
- // switch(fromUnits) {
- // case RulerProvider.UNIT_INCHES:
- // pixelValue = value.doubleValue() * display.getDPI().x;
- // break;
- // case RulerProvider.UNIT_CENTIMETERS:
- // pixelValue = value.doubleValue() * display.getDPI().x / UnitsUtils.INCH2CM;
- // break;
- // case RulerProvider.UNIT_PIXELS:
- // pixelValue = value.intValue();
- // }
+ // switch(fromUnits) {
+ // case RulerProvider.UNIT_INCHES:
+ // pixelValue = value.doubleValue() * display.getDPI().x;
+ // break;
+ // case RulerProvider.UNIT_CENTIMETERS:
+ // pixelValue = value.doubleValue() * display.getDPI().x / UnitsUtils.INCH2CM;
+ // break;
+ // case RulerProvider.UNIT_PIXELS:
+ // pixelValue = value.intValue();
+ // }
//
- // double returnValue = 0;
+ // double returnValue = 0;
//
- // switch(toUnits) {
- // case RulerProvider.UNIT_INCHES:
- // returnValue = pixelValue / display.getDPI().x;
- // break;
- // case RulerProvider.UNIT_CENTIMETERS:
- // returnValue = pixelValue * UnitsUtils.INCH2CM / display.getDPI().x;
- // break;
- // case RulerProvider.UNIT_PIXELS:
- // returnValue = pixelValue;
- // }
+ // switch(toUnits) {
+ // case RulerProvider.UNIT_INCHES:
+ // returnValue = pixelValue / display.getDPI().x;
+ // break;
+ // case RulerProvider.UNIT_CENTIMETERS:
+ // returnValue = pixelValue * UnitsUtils.INCH2CM / display.getDPI().x;
+ // break;
+ // case RulerProvider.UNIT_PIXELS:
+ // returnValue = pixelValue;
+ // }
//
- // return numberFormatter.format(returnValue);
- // }
+ // return numberFormatter.format(returnValue);
+ // }
/**
- *
+ *
* converts the current units used to a base unit value to be used (e.g. in validation)
- *
+ *
* @param number
- * Units to be converted to the base unit
+ * Units to be converted to the base unit
* @return
*/
private double convertToBase(double number) {
double returnValue = 0;
- switch(getUnits()) {
+ switch (getUnits()) {
case RulerProvider.UNIT_INCHES:
returnValue = number;
break;
@@ -420,18 +422,20 @@ public class RulersAndGridGroup extends AbstractGroup {
*
* @see org.eclipse.jface.preference.StringFieldEditor#doCheckState()
*/
+ @Override
protected boolean doCheckState() {
Text text = getTextControl();
- if(text == null)
+ if (text == null) {
return false;
+ }
try {
NumberFormat numberFormatter = NumberFormat.getInstance();
ParsePosition parsePosition = new ParsePosition(0);
Number parsedNumber = numberFormatter.parse(text.getText(), parsePosition);
- if(parsedNumber == null) {
+ if (parsedNumber == null) {
showErrorMessage();
return false;
}
@@ -439,7 +443,7 @@ public class RulersAndGridGroup extends AbstractGroup {
Double pageHeight = forceDouble(parsedNumber);
double number = pageHeight.doubleValue();
number = convertToBase(number);
- if(number >= minValidValue && number <= maxValidValue && parsePosition.getIndex() == text.getText().length()) {
+ if (number >= minValidValue && number <= maxValidValue && parsePosition.getIndex() == text.getText().length()) {
clearErrorMessage();
return true;
} else {
@@ -458,9 +462,10 @@ public class RulersAndGridGroup extends AbstractGroup {
*
* @see org.eclipse.jface.preference.StringFieldEditor#doLoadDefault()
*/
+ @Override
protected void doLoadDefault() {
Text text = getTextControl();
- if(text != null) {
+ if (text != null) {
double value = getPreferenceStore().getDefaultDouble(getPreferenceName());
NumberFormat numberFormatter = NumberFormat.getNumberInstance();
text.setText(numberFormatter.format(value));
@@ -472,15 +477,17 @@ public class RulersAndGridGroup extends AbstractGroup {
* (non-Javadoc)
* Method declared on FieldEditor.
*/
+ @Override
protected void doLoad() {
Text text = getTextControl();
- if(text != null) {
+ if (text != null) {
double value = getPreferenceStore().getDouble(getPreferenceName());
NumberFormat numberFormatter = NumberFormat.getNumberInstance();
text.setText(numberFormatter.format(value));
}
}
+ @Override
protected void doStore() {
NumberFormat numberFormatter = NumberFormat.getInstance();
Double gridWidth;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramBackgroundColor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramBackgroundColor.java
index b4ebd32d316..4f98bd0a690 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramBackgroundColor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramBackgroundColor.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
@@ -20,23 +20,24 @@ import org.eclipse.swt.widgets.Composite;
/**
* this class is a background group specialized for the level diagram
- *
+ *
*/
public class DiagramBackgroundColor extends BackgroundColor {
/**
* constructor
- *
+ *
* @param parent
- * the composite patent
+ * the composite patent
* @param key
- * the preference key the kind of diagram
+ * the preference key the kind of diagram
* @param dialogPage
*/
public DiagramBackgroundColor(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
}
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramConnectionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramConnectionGroup.java
index adeea8d27b4..dac185e25a1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramConnectionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramConnectionGroup.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
@@ -20,17 +20,17 @@ import org.eclipse.swt.widgets.Composite;
/**
* this clas is a specialiezation of the connection for the diagram level
- *
+ *
*/
public class DiagramConnectionGroup extends ConnectionGroup {
/**
* constructor
- *
+ *
* @param parent
- * the composite parent
+ * the composite parent
* @param key
- * the preference key the kind of diagram
+ * the preference key the kind of diagram
* @param dialogPage
*/
public DiagramConnectionGroup(Composite parent, String key, DialogPage dialogPage) {
@@ -38,6 +38,7 @@ public class DiagramConnectionGroup extends ConnectionGroup {
// TODO Auto-generated constructor stub
}
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDecorationGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDecorationGroup.java
index ddf17812025..0b933fb6919 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDecorationGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDecorationGroup.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
@@ -25,13 +25,13 @@ public class DiagramDecorationGroup extends DecorationGroup {
/**
* Instantiates a new diagram decoration group.
- *
+ *
* @param parent
- * the parent
+ * the parent
* @param key
- * the prefix preference key the kind of diagram
+ * the prefix preference key the kind of diagram
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DiagramDecorationGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class DiagramDecorationGroup extends DecorationGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDimensionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDimensionGroup.java
index dfe967e49b2..d0f4822dd7a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDimensionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramDimensionGroup.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
@@ -25,13 +25,13 @@ public class DiagramDimensionGroup extends DimensionGroup {
/**
* Instantiates a new diagram dimension group.
- *
+ *
* @param parent
- * the composite parent
+ * the composite parent
* @param key
- * the key the kind of the diagram
+ * the key the kind of the diagram
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DiagramDimensionGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class DiagramDimensionGroup extends DimensionGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramFontGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramFontGroup.java
index 6958bcf7f6e..9cc5f1adece 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramFontGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramFontGroup.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
@@ -25,13 +25,13 @@ public class DiagramFontGroup extends FontGroup {
/**
* Instantiates a new diagram font group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the kind of the diagram
+ * the kind of the diagram
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DiagramFontGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class DiagramFontGroup extends FontGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramLinkColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramLinkColorGroup.java
index c9f0adadc4f..0a8c7f505dc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramLinkColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramLinkColorGroup.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
@@ -25,13 +25,13 @@ public class DiagramLinkColorGroup extends LinkColorGroup {
/**
* Instantiates a new diagram link color group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the tkind of the diagram
+ * the tkind of the diagram
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DiagramLinkColorGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class DiagramLinkColorGroup extends LinkColorGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramNodeColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramNodeColorGroup.java
index 5cd417b0f30..9c51ba23fdb 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramNodeColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramNodeColorGroup.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
@@ -25,13 +25,13 @@ public class DiagramNodeColorGroup extends NodeColorGroup {
/**
* Instantiates a new diagram node color group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the kind of the diagram
+ * the kind of the diagram
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public DiagramNodeColorGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class DiagramNodeColorGroup extends NodeColorGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramRulersAndGridGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramRulersAndGridGroup.java
index b4c5a83b9f5..330965361a4 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramRulersAndGridGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/diagram/DiagramRulersAndGridGroup.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
@@ -19,16 +19,16 @@ import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.RulersAndGridGroup;
import org.eclipse.swt.widgets.Composite;
/**
- *
+ *
* @author vl222926
- *
+ *
*/
public class DiagramRulersAndGridGroup extends RulersAndGridGroup {
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* @param key
* @param dialogPage
@@ -38,12 +38,13 @@ public class DiagramRulersAndGridGroup extends RulersAndGridGroup {
}
/**
- *
+ *
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.RulersAndGridGroup#getPreferenceConstant(int)
- *
+ *
* @param preferenceType
* @return
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getDiagramConstant(getKey(), preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/dialog/ApplyValueOnPreferenceKeyDialog.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/dialog/ApplyValueOnPreferenceKeyDialog.java
index aadcc60934b..9eb6ca7593f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/dialog/ApplyValueOnPreferenceKeyDialog.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/dialog/ApplyValueOnPreferenceKeyDialog.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
@@ -47,9 +47,9 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
}
/**
- *
+ *
* @see org.eclipse.papyrus.infra.tools.preferences.ui.dialog.AbstractPreferenceKeyDialog#createContentProvider()
- *
+ *
* @return
*/
@Override
@@ -69,7 +69,7 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
* @see org.eclipse.jface.viewers.ITableColorProvider#getForeground(java.lang.Object, int)
*/
public Color getForeground(Object element, int columnIndex) {
- //nothing to do
+ // nothing to do
return null;
}
@@ -79,7 +79,7 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
* @see org.eclipse.jface.viewers.ITableColorProvider#getBackground(java.lang.Object, int)
*/
public Color getBackground(Object element, int columnIndex) {
- //nothing to do
+ // nothing to do
return null;
}
@@ -89,11 +89,11 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
*/
public Image getColumnImage(Object element, int columnIndex) {
- if(columnIndex == 0) {
- if(element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
+ if (columnIndex == 0) {
+ if (element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
return Activator.getPluginIconImage(Activator.PLUGIN_ID, "/icons/pref.gif"); //$NON-NLS-1$
}
- if(element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
+ if (element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
return Activator.getPluginIconImage(Activator.PLUGIN_ID, "/icons/diag.gif"); //$NON-NLS-1$
}
}
@@ -108,29 +108,29 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
public String getColumnText(Object element, int columnIndex) {
String initialKey = element.toString();
String out = initialKey.toString();
- if(columnIndex == 0) {
+ if (columnIndex == 0) {
out = out.substring(out.indexOf(".") + 1, out.length()).toUpperCase(); //$NON-NLS-1$
}
- if(columnIndex == 1) {
- if(element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
+ if (columnIndex == 1) {
+ if (element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
return Messages.ApplyValueOnPreferenceKeyDialog_ELEMENT;
}
- if(element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
+ if (element.toString().startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
return Messages.ApplyValueOnPreferenceKeyDialog_DIAGRAM;
}
}
- if(columnIndex == 2) {
- if(initialKey.startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
+ if (columnIndex == 2) {
+ if (initialKey.startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
out = initialKey.toString().replaceAll(PreferencesConstantsHelper.DIAGRAM_ELEMENT, ""); //$NON-NLS-1$
// Reorganize display
- if(out.indexOf(".") > 0) { //$NON-NLS-1$
+ if (out.indexOf(".") > 0) { //$NON-NLS-1$
String beforePoint = out.substring(0, out.indexOf(".")); //$NON-NLS-1$
- if(beforePoint.lastIndexOf("_") > 0) { //$NON-NLS-1$
+ if (beforePoint.lastIndexOf("_") > 0) { //$NON-NLS-1$
out = out.substring(beforePoint.lastIndexOf("_") + 1, out.indexOf(".")) + " (" + beforePoint.substring(0, beforePoint.lastIndexOf("_")) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
}
}
- if(initialKey.startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
+ if (initialKey.startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
out = initialKey.toString().replaceAll(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX, ""); //$NON-NLS-1$
out = out.substring(0, out.indexOf(".")); //$NON-NLS-1$
}
@@ -168,11 +168,11 @@ public class ApplyValueOnPreferenceKeyDialog extends AbstractApplyValueOnPrefere
*/
public Object[] getElements(Object inputElement) {
ArrayList<String> result = new ArrayList<String>();
- for(int i = 0; i < keys.length; i++) {
- if(keys[i].startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
+ for (int i = 0; i < keys.length; i++) {
+ if (keys[i].startsWith(PreferencesConstantsHelper.DIAGRAM_PREFERENCE_PREFIX)) {
result.add(keys[i]);
}
- if(keys[i].startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
+ if (keys[i].startsWith(PreferencesConstantsHelper.DIAGRAM_ELEMENT)) {
result.add(keys[i]);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/CLabelBooleanFieldEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/CLabelBooleanFieldEditor.java
index c0be4f6732b..c75122994b8 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/CLabelBooleanFieldEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/CLabelBooleanFieldEditor.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2011 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
@@ -59,16 +59,16 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
/**
* Creates a boolean field editor in the given style.
- *
+ *
* @param preferenceKey
- * the name of the preference this field editor works on
+ * the name of the preference this field editor works on
* @param labelText
- * the label text of the field editor
+ * the label text of the field editor
* @param style
- * the style, either <code>SWT.LEFT</code> or <code>SWT.RIGHT</code>. If style value is different, we use <code>SWT.RIGHT</code> The style
- * allows to define if the label is on the left side or in the right side
+ * the style, either <code>SWT.LEFT</code> or <code>SWT.RIGHT</code>. If style value is different, we use <code>SWT.RIGHT</code> The style
+ * allows to define if the label is on the left side or in the right side
* @param parent
- * the parent of the field editor's control
+ * the parent of the field editor's control
*/
public CLabelBooleanFieldEditor(String preferenceKey, String labelText, int style, Image im, Composite parent) {
this.image = im;
@@ -79,33 +79,33 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
}
/**
- *
+ *
* Constructor. This constructor build a CLabelFieldEditor with the label in the right of the checkbox.
- *
+ *
* @param preferenceKey
- * the key for the preference
+ * the key for the preference
* @param labelText
- * the label text
+ * the label text
* @param im
- * an image to illustrate the preference
+ * an image to illustrate the preference
* @param parent
- * the composite parent
+ * the composite parent
*/
public CLabelBooleanFieldEditor(String preferenceKey, String labelText, Image im, Composite parent) {
this(preferenceKey, labelText, SWT.RIGHT, im, parent);
}
/**
- *
+ *
* @see org.eclipse.jface.preference.BooleanFieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
- *
+ *
* @param parent
* @param numColumns
*/
@Override
protected void doFillIntoGrid(Composite parent, int numColumns) {
GridData gd = new GridData();
- switch(this.style) {
+ switch (this.style) {
case SWT.LEFT:
getCLabelControl(parent);
checkBox = getChangeControl(parent);
@@ -123,7 +123,7 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
/**
* Returns the label control.
- *
+ *
* @return the label control, or <code>null</code> if no label control has been created
*/
protected CLabel getCLabelControl() {
@@ -135,21 +135,21 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
* <p>
* The label is created if it does not already exist
* </p>
- *
+ *
* @param parent
- * the parent
+ * the parent
* @return the label control
*/
public CLabel getCLabelControl(Composite parent) {
- if(cLabel == null) {
+ if (cLabel == null) {
cLabel = new CLabel(parent, SWT.LEFT);
cLabel.setFont(parent.getFont());
- if(image != null) {
+ if (image != null) {
cLabel.setImage(image);
}
String text = getLabelText();
- if(text != null) {
+ if (text != null) {
cLabel.setText(text);
}
cLabel.addDisposeListener(new DisposeListener() {
@@ -171,7 +171,7 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
super.setLabelText(text);
Assert.isNotNull(text);
cLabel = getCLabelControl();
- if(cLabel == null && checkBox != null) {
+ if (cLabel == null && checkBox != null) {
checkBox.setText(text);
}
}
@@ -182,38 +182,38 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
*/
/**
- *
+ *
* @see org.eclipse.jface.preference.BooleanFieldEditor#adjustForNumColumns(int)
- *
+ *
* @param numColumns
*/
@Override
protected void adjustForNumColumns(int numColumns) {
- // if(style == SEPARATE_LABEL) {
- // numColumns--;
- // }
- // ((GridData)checkBox.getLayoutData()).horizontalSpan = numColumns;
+ // if(style == SEPARATE_LABEL) {
+ // numColumns--;
+ // }
+ // ((GridData)checkBox.getLayoutData()).horizontalSpan = numColumns;
}
/**
- *
+ *
* @see org.eclipse.jface.preference.BooleanFieldEditor#getDescriptionControl(org.eclipse.swt.widgets.Composite)
- *
+ *
* @param parent
* @return
*/
@Override
public Control getDescriptionControl(Composite parent) {
- if(style == SEPARATE_LABEL) {
+ if (style == SEPARATE_LABEL) {
return getLabelControl(parent);
}
return getChangeControl(parent);
}
/**
- *
+ *
* @see org.eclipse.jface.preference.BooleanFieldEditor#getNumberOfControls()
- *
+ *
* @return
*/
@Override
@@ -222,9 +222,9 @@ public class CLabelBooleanFieldEditor extends BooleanFieldEditor {
}
/**
- *
+ *
* @see org.eclipse.jface.preference.BooleanFieldEditor#setEnabled(boolean, org.eclipse.swt.widgets.Composite)
- *
+ *
* @param enabled
* @param parent
*/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorBackgroundColor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorBackgroundColor.java
index 013ef1d6970..d69fba49687 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorBackgroundColor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorBackgroundColor.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
@@ -25,13 +25,13 @@ public class EditorBackgroundColor extends BackgroundColor {
/**
* Instantiates a new editor background color.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key of the preference
+ * the key of the preference
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorBackgroundColor(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorBackgroundColor extends BackgroundColor {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorConnectionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorConnectionGroup.java
index a52aab81add..d273461d4f7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorConnectionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorConnectionGroup.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
@@ -25,13 +25,13 @@ public class EditorConnectionGroup extends ConnectionGroup {
/**
* Instantiates a new editor connection group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the title
+ * the title
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorConnectionGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorConnectionGroup extends ConnectionGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDecorationGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDecorationGroup.java
index e789b80b478..e6b61086ff5 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDecorationGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDecorationGroup.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
@@ -25,13 +25,13 @@ public class EditorDecorationGroup extends DecorationGroup {
/**
* Instantiates a new editor decoration group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorDecorationGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorDecorationGroup extends DecorationGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDimensionGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDimensionGroup.java
index 962d5c9539c..b3b0330d2cc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDimensionGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorDimensionGroup.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
@@ -25,13 +25,13 @@ public class EditorDimensionGroup extends DimensionGroup {
/**
* Instantiates a new editor dimension group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorDimensionGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorDimensionGroup extends DimensionGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorFontGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorFontGroup.java
index 87fd235e3ca..91f97e1d9fa 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorFontGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorFontGroup.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
@@ -25,13 +25,13 @@ public class EditorFontGroup extends FontGroup {
/**
* Instantiates a new editor font group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorFontGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorFontGroup extends FontGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorLinkColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorLinkColorGroup.java
index 5d9e42b413d..7dbab5171b1 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorLinkColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorLinkColorGroup.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
@@ -25,13 +25,13 @@ public class EditorLinkColorGroup extends LinkColorGroup {
/**
* Instantiates a new editor link color group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the title
+ * the title
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorLinkColorGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorLinkColorGroup extends LinkColorGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorNodeColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorNodeColorGroup.java
index 0e6326a96fc..4e379128d4f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorNodeColorGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorNodeColorGroup.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
@@ -25,13 +25,13 @@ public class EditorNodeColorGroup extends NodeColorGroup {
/**
* Instantiates a new editor node color group.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key
+ * the key
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorNodeColorGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -42,6 +42,7 @@ public class EditorNodeColorGroup extends NodeColorGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorRulersAndGridGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorRulersAndGridGroup.java
index 35f0d469373..d0c4840c95a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorRulersAndGridGroup.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/editor/EditorRulersAndGridGroup.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
@@ -26,13 +26,13 @@ public class EditorRulersAndGridGroup extends RulersAndGridGroup {
/**
* Instantiates a new editor background color.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param key
- * the key of the preference
+ * the key of the preference
* @param dialogPage
- * the dialog page
+ * the dialog page
*/
public EditorRulersAndGridGroup(Composite parent, String key, DialogPage dialogPage) {
super(parent, key, dialogPage);
@@ -43,7 +43,8 @@ public class EditorRulersAndGridGroup extends RulersAndGridGroup {
*
* @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#getPreferenceConstant(int)
*/
+ @Override
protected String getPreferenceConstant(int preferenceType) {
- return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
+ return PreferencesConstantsHelper.getPapyrusEditorConstant(preferenceType);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/FontHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/FontHelper.java
index a17e9806032..82e5062bcfe 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/FontHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/FontHelper.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.preferences.utils;
@@ -21,9 +21,9 @@ import org.eclipse.swt.widgets.Display;
/**
* Helper for fonts.
- *
+ *
* For now, it contains a method to get the font names.
- *
+ *
* @author wdiu, Wayne Diu
* @canBeSeenBy %level1
*/
@@ -35,36 +35,37 @@ public class FontHelper {
* array of font sizes
*/
protected static final String[] FONT_SIZES = { "8", //$NON-NLS-1$
- "9", //$NON-NLS-1$
- "10", //$NON-NLS-1$
- "11", //$NON-NLS-1$
- "12", //$NON-NLS-1$
- "14", //$NON-NLS-1$
- "16", //$NON-NLS-1$
- "18", //$NON-NLS-1$
- "20", //$NON-NLS-1$
- "22", //$NON-NLS-1$
- "24", //$NON-NLS-1$
- "26", //$NON-NLS-1$
- "28", //$NON-NLS-1$
- "36", //$NON-NLS-1$
- "48", //$NON-NLS-1$
- "72" }; //$NON-NLS-1$
+ "9", //$NON-NLS-1$
+ "10", //$NON-NLS-1$
+ "11", //$NON-NLS-1$
+ "12", //$NON-NLS-1$
+ "14", //$NON-NLS-1$
+ "16", //$NON-NLS-1$
+ "18", //$NON-NLS-1$
+ "20", //$NON-NLS-1$
+ "22", //$NON-NLS-1$
+ "24", //$NON-NLS-1$
+ "26", //$NON-NLS-1$
+ "28", //$NON-NLS-1$
+ "36", //$NON-NLS-1$
+ "48", //$NON-NLS-1$
+ "72" }; //$NON-NLS-1$
/**
* Return the font names for the default display.
- *
+ *
* @return String array of font names as String objects for the default display.
*/
static public String[] getFontNames() {
- if(FONT_NAMES != null)
+ if (FONT_NAMES != null) {
return FONT_NAMES;
+ }
// add the names into a set to get a set of unique names
Set<String> stringItems = new HashSet<String>();
FontData[] fontDatas = Display.getDefault().getFontList(null, true);
- for(int i = 0; i < fontDatas.length; i++) {
- if(fontDatas[i].getName() != null) {
+ for (int i = 0; i < fontDatas.length; i++) {
+ if (fontDatas[i].getName() != null) {
stringItems.add(fontDatas[i].getName());
}
}
@@ -72,7 +73,7 @@ public class FontHelper {
// add strings into the array
String strings[] = new String[stringItems.size()];
int i = 0;
- for(Iterator<String> it = stringItems.iterator(); it.hasNext();) {
+ for (Iterator<String> it = stringItems.iterator(); it.hasNext();) {
strings[i++] = it.next();
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/GradientPreferenceConverter.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/GradientPreferenceConverter.java
index ee1ef8ab3a0..4d745c9e192 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/GradientPreferenceConverter.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/utils/GradientPreferenceConverter.java
@@ -1,6 +1,6 @@
/****************************************************************************
* Copyright (c) 2009 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
@@ -22,9 +22,9 @@ import org.eclipse.swt.graphics.RGB;
/**
* An utility class to ease the use of gradient preference within Papyrus. It converts the
* preference into gradientData, RGB color and int (transparency and style) and vice versa
- *
+ *
* @author tlandre
- *
+ *
*/
public class GradientPreferenceConverter {
@@ -46,12 +46,12 @@ public class GradientPreferenceConverter {
/**
* Constructor
- *
+ *
* @param pPreference
- * the preference. It must be formated like this : <br>
- * <code>RGB {x, x, x};RGB {x, x,
+ * the preference. It must be formated like this : <br>
+ * <code>RGB {x, x, x};RGB {x, x,
* x};style;transparency</code> <br>
- * where style and transparency are <code>int</code>
+ * where style and transparency are <code>int</code>
*/
public GradientPreferenceConverter(String pPreference) {
initFieldFromPreference(pPreference);
@@ -59,16 +59,16 @@ public class GradientPreferenceConverter {
/**
* Constructor
- *
+ *
* @param pColor1
- * the first color used
+ * the first color used
* @param pColor2
- * the second color used
+ * the second color used
* @param pStyle
- * the style of the gradient. It can be GradientStyle.VERTICAL or
- * GradientStyle.HORIZONTAL
+ * the style of the gradient. It can be GradientStyle.VERTICAL or
+ * GradientStyle.HORIZONTAL
* @param pTransparency
- * the transparency. It must be contained in [0,100]
+ * the transparency. It must be contained in [0,100]
*/
public GradientPreferenceConverter(RGB pColor1, RGB pColor2, int pStyle, int pTransparency) {
fColor1 = pColor1;
@@ -79,16 +79,16 @@ public class GradientPreferenceConverter {
/**
* Constructor
- *
+ *
* @param pColor1
- * the first color used
+ * the first color used
* @param pColor2
- * the second color used
+ * the second color used
* @param pStyle
- * the style of the gradient. It can be GradientStyle.VERTICAL or
- * GradientStyle.HORIZONTAL
+ * the style of the gradient. It can be GradientStyle.VERTICAL or
+ * GradientStyle.HORIZONTAL
* @param pTransparency
- * the transparency. It must be contained in [0,100]
+ * the transparency. It must be contained in [0,100]
*/
// @unused
public GradientPreferenceConverter(int pColor1, int pColor2, int pStyle, int pTransparency) {
@@ -100,7 +100,7 @@ public class GradientPreferenceConverter {
private void initFieldFromPreference(String pPreference) {
String[] values = pPreference.split(";"); //$NON-NLS-1$
- if(values.length == 4) {
+ if (values.length == 4) {
fColor1 = getRGBColor(values[GRADIENT_COLOR1]);
fColor2 = getRGBColor(values[GRADIENT_COLOR2]);
fStyle = Integer.parseInt(values[GRADIENT_STYLE]);
@@ -110,7 +110,7 @@ public class GradientPreferenceConverter {
/**
* Get the transparency of the gradient
- *
+ *
* @return the transparency
*/
public int getTransparency() {
@@ -119,12 +119,12 @@ public class GradientPreferenceConverter {
/**
* Get the gradientData of the gradient
- *
+ *
* @return the gradientData
*/
public GradientData getGradientData() {
GradientData gd = GradientData.getDefaultGradientData();
- if(fColor1 != null && fColor2 != null) {
+ if (fColor1 != null && fColor2 != null) {
gd = new GradientData(FigureUtilities.RGBToInteger(fColor1), FigureUtilities.RGBToInteger(fColor2), fStyle);
}
return gd;
@@ -132,12 +132,12 @@ public class GradientPreferenceConverter {
/**
* Get the first color used for the gradient.
- *
+ *
* @return the RGB
*/
public RGB getColor1() {
RGB color;
- if(fColor1 != null) {
+ if (fColor1 != null) {
color = fColor1;
} else {
color = FigureUtilities.integerToRGB(GradientData.getDefaultGradientData().getGradientColor1());
@@ -147,13 +147,13 @@ public class GradientPreferenceConverter {
/**
* Get the second color used for the gradient.
- *
+ *
* @return the RGB
*/
// @unused
public RGB getColor2() {
RGB color;
- if(fColor1 != null) {
+ if (fColor1 != null) {
color = fColor2;
} else {
color = FigureUtilities.integerToRGB(GradientData.getDefaultGradientData().getGradientColor2());
@@ -163,7 +163,7 @@ public class GradientPreferenceConverter {
/**
* Get the style of the gradient
- *
+ *
* @return GradientStyle.HORIZONTAL or GradientStyle.VERTICAL
*/
public int getStyle() {
@@ -172,9 +172,9 @@ public class GradientPreferenceConverter {
/**
* Extract the values of the RGB color contained in the string "RGB {x, x, x}"
- *
+ *
* @param string
- * a string of format "RGB {x, x, x}"
+ * a string of format "RGB {x, x, x}"
* @return the corresponding color
*/
private static RGB getRGBColor(String string) {
@@ -190,7 +190,7 @@ public class GradientPreferenceConverter {
* Get a string that can be store The value is in the following format : <br>
* <b>RGB {x, x, x};RGB {x, x, x};style;transparency</b> <br>
* where style and transparency are <b>int</b>
- *
+ *
* @return the string
*/
public String getPreferenceValue() {

Back to the top