diff options
author | Camille Letavernier | 2014-03-26 17:39:45 +0000 |
---|---|---|
committer | Camille Letavernier | 2014-03-26 17:40:06 +0000 |
commit | dc568755a7a3c6f901dfdd728b531b006a0df57e (patch) | |
tree | bf816f2c982e3f1b447af1f09f3fdd47a186c68e | |
parent | f78037e380da4d2a71d5ac108379e3277dcde148 (diff) | |
parent | df246c52d356a904bbaa011d2fc8614f1740fb26 (diff) | |
download | org.eclipse.papyrus-dc568755a7a3c6f901dfdd728b531b006a0df57e.tar.gz org.eclipse.papyrus-dc568755a7a3c6f901dfdd728b531b006a0df57e.tar.xz org.eclipse.papyrus-dc568755a7a3c6f901dfdd728b531b006a0df57e.zip |
Synchronize with master
46 files changed, 628 insertions, 159 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java index 9076761efb6..a8b1c6aeb42 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageModel.java @@ -1,6 +1,17 @@ -/**
- *
- */
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * 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:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.contentprovider;
import org.eclipse.swt.graphics.Image;
@@ -38,5 +49,10 @@ public abstract interface IPageModel { * @return
*/
public Object getRawModel();
+
+ /**
+ * Dispose any resources that I have allocated, such as (for example), an {@linkplain #getTabIcon() image}.
+ */
+ public void dispose();
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ErrorComponentPart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ErrorComponentPart.java index 6f912300cf5..05db1f3c22f 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ErrorComponentPart.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/ErrorComponentPart.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.internal;
@@ -39,6 +41,10 @@ public class ErrorComponentPart extends ComponentPart { private static IComponentModel createErrorComponentPartModel() {
IComponentModel componentModel = new IComponentModel() {
+ public void dispose() {
+ // Pass. The tab icon is a workbench-shared icon
+ }
+
public String getTabTitle() {
return "Invalid tab";
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java index eda41017c48..9b1a97f0625 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderPart.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.internal;
@@ -28,6 +29,8 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabFolderEvent;
import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MenuDetectEvent;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackListener;
@@ -1041,7 +1044,7 @@ public class TabFolderPart extends AbstractTabFolderPart implements IFolder { private PagePart createChildPart(Object newModel) {
// Create the child PartModel. Delegate creation to this part PartModel.
- IPageModel partModel = getPartModel().createChildSashModel(newModel);
+ final IPageModel partModel = getPartModel().createChildSashModel(newModel);
if(partModel != null) {
// Delegate part creation to the container. This allow the container to provide appropriate
@@ -1053,6 +1056,18 @@ public class TabFolderPart extends AbstractTabFolderPart implements IFolder { newPart.createPartControl(getControl());
getSashWindowContainer().getLifeCycleEventProvider().firePageOpenedEvent(newPart);
+ if(newPart.getControl() != null) {
+ newPart.getControl().addDisposeListener(new DisposeListener() {
+
+ public void widgetDisposed(DisposeEvent e) {
+ // Dispose the model that generated the part
+ partModel.dispose();
+ }
+ });
+ } else {
+ // No part control? Dispose the model, now
+ partModel.dispose();
+ }
return newPart;
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editorsfactory/anytype/AnyTypeEditorFactory.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editorsfactory/anytype/AnyTypeEditorFactory.java index 787cfeea7f1..06ae4ae8adf 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editorsfactory/anytype/AnyTypeEditorFactory.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editorsfactory/anytype/AnyTypeEditorFactory.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.editorsfactory.anytype;
@@ -50,6 +51,11 @@ public class AnyTypeEditorFactory extends AbstractEditorFactory { private AnyType anyType = anyTypeModel;
+ @Override
+ public void dispose() {
+ // Pass. The tab icon is a workbench-shared image
+ }
+
public String getTabTitle() {
EClass eClass = anyType.eClass();
String label;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleDialog.java index d377eadece7..1129c431c78 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleDialog.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleDialog.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler;
@@ -17,7 +19,7 @@ import java.util.Map; import java.util.Map.Entry;
import org.eclipse.e4.ui.css.core.css2.CSS2ColorHelper;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TrayDialog;
@@ -396,7 +398,7 @@ public abstract class AbstractStyleDialog extends TrayDialog { protected Color getColor(HexColor color) {
RGBColor rgbColor = CSS2ColorHelper.getRGBColor("#" + color.getValue());
int intColor = ColorToGMFConverter.getIntColor(rgbColor);
- return FigureUtilities.integerToColor(intColor);
+ return ColorRegistry.getInstance().getColor(intColor);
}
public String getCSSClass() {
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java index aa01aa82e08..54a9b96a181 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.debug.views;
@@ -24,6 +26,7 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
@@ -463,7 +466,7 @@ public class CSSDebugView extends ViewPart implements ISelectionListener, ISelec String text = getValueAsText(feature, value);
cell.setText(text);
if(feature.getName().endsWith("Color") && value instanceof Integer) {
- Color color = FigureUtilities.integerToColor((Integer)value);
+ Color color = ColorRegistry.getInstance().getColor((Integer)value);
cell.setBackground(color);
int lightness = getLightness(color);
//Use a white font when the color is dark
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java index e6ee0c28f29..eaa9e63784d 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/converters/ColorToGMFConverter.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.converters;
@@ -68,11 +70,11 @@ public class ColorToGMFConverter extends AbstractCSSValueConverter { * A GMF-compatible integer color
*/
public static int getIntColor(RGBColor color) {
- int red = getInt(color.getRed());
- int green = getInt(color.getGreen());
- int blue = getInt(color.getBlue());
+ int red = getInt(color.getRed()) & 0xFF;
+ int green = getInt(color.getGreen()) & 0xFF;
+ int blue = getInt(color.getBlue()) & 0xFF;
- return blue * 256 * 256 + green * 256 + red;
+ return (blue << 16) | (green << 8) | red;
}
/**
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java index 5c7b9e57d0e..7774c4e12ec 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2008, 2013 CEA LIST.
+ * Copyright (c) 2008, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,7 @@ * Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
* Christian W. Damus (CEA) - service hook for integrating tools into graphical editor (CDO)
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common;
@@ -108,6 +109,8 @@ public class GmfEditorFactory extends AbstractEditorFactory { */
private ServicesRegistry servicesRegistry;
+ private Image tabIcon;
+
/**
*
* Constructor.
@@ -202,11 +205,14 @@ public class GmfEditorFactory extends AbstractEditorFactory { *
*/
public Image getTabIcon() {
- ImageDescriptor imageDescriptor = DiagramUtils.getPrototype(diagram).getIconDescriptor();
- if(imageDescriptor == null)
- return null;
+ if(tabIcon == null) {
+ ImageDescriptor imageDescriptor = DiagramUtils.getPrototype(diagram).getIconDescriptor();
+ if(imageDescriptor != null) {
+ tabIcon = imageDescriptor.createImage();
+ }
+ }
- return imageDescriptor.createImage();
+ return tabIcon;
}
/**
@@ -220,6 +226,13 @@ public class GmfEditorFactory extends AbstractEditorFactory { return diagram.getName();
}
+ @Override
+ public void dispose() {
+ if(tabIcon != null) {
+ tabIcon.dispose();
+ tabIcon = null;
+ }
+ }
}
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java index 7295bcd5476..70459bbaf75 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011 LIFL & CEA LIST.
+ * Copyright (c) 2011, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,8 @@ * Contributors:
* Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
* Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.common.factory;
@@ -100,6 +102,8 @@ public abstract class AbstractNattableEditorFactory extends AbstractEditorFactor * The raw model stored in the SashProvider.
*/
private Table rawModel;
+
+ private Image tabIcon;
/**
*
@@ -191,12 +195,14 @@ public abstract class AbstractNattableEditorFactory extends AbstractEditorFactor *
*/
public Image getTabIcon() {
- ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
- if(imageDescriptor == null) {
- return null;
+ if(tabIcon == null) {
+ ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
+ if(imageDescriptor != null) {
+ tabIcon = imageDescriptor.createImage();
+ }
}
-
- return imageDescriptor.createImage();
+
+ return tabIcon;
}
/**
@@ -209,5 +215,12 @@ public abstract class AbstractNattableEditorFactory extends AbstractEditorFactor public String getTabTitle() {
return this.rawModel.getName();
}
+
+ public void dispose() {
+ if(tabIcon != null) {
+ tabIcon.dispose();
+ tabIcon = null;
+ }
+ }
}
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java index a285f1e5203..475ac47d6ca 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011 LIFL & CEA LIST.
+ * Copyright (c) 2011, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,8 @@ * Contributors:
* Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
* Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.common.factory;
@@ -201,5 +203,10 @@ public class NattableEditorFactory extends AbstractEditorFactory { public String getTabTitle() {
return this.rawModel.getName();
}
+
+ @Override
+ public void dispose() {
+ // Pass. The tab icon is a plugin-shared image
+ }
}
}
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/editor/UnloadResourcesEditorModel.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/editor/UnloadResourcesEditorModel.java index c0fbb880675..814b9355eb3 100644 --- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/editor/UnloadResourcesEditorModel.java +++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/editor/UnloadResourcesEditorModel.java @@ -1,3 +1,17 @@ +/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin, CEA, and others.
+ *
+ * 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:
+ *
+ * Atos Origin - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.services.resourceloading.editor;
@@ -40,6 +54,10 @@ public class UnloadResourcesEditorModel implements IEditorModel { name = "Unresolved tab";
}
+ public void dispose() {
+ // Pass. The tab icon is a workbench-shared image
+ }
+
/**
* @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabTitle()
*
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java index b28f045cf98..983e48017e5 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2011 CEA LIST. + * Copyright (c) 2011, 2014 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,7 +8,8 @@ * * Contributors: * - * CEA LIST - Initial API and implementation + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.blockdefinition; @@ -23,6 +24,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.sysml.diagram.blockdefinition.part.BlockDefinitionDiagramEditor; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; @@ -47,6 +49,8 @@ public class BlockDefinitionDiagramForMultiEditor extends BlockDefinitionDiagram /** The editor splitter. */ private Composite splitter; + + private Image titleImage; /** * Constructor for SashSystem v2. Context and required objects are retrieved from the @@ -67,7 +71,18 @@ public class BlockDefinitionDiagramForMultiEditor extends BlockDefinitionDiagram public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); setPartName(getDiagram().getName()); - setTitleImage(DIAG_IMG_DESC.createImage()); + titleImage = DIAG_IMG_DESC.createImage(); + setTitleImage(titleImage); + } + + @Override + public void dispose() { + if(titleImage != null) { + titleImage.dispose(); + titleImage = null; + } + + super.dispose(); } /** diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java index a03f904324b..ad4eccd907e 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2011 CEA LIST. + * Copyright (c) 2011, 2014 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,7 +8,8 @@ * * Contributors: * - * CEA LIST - Initial API and implementation + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.internalblock; @@ -23,6 +24,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.sysml.diagram.internalblock.part.InternalBlockDiagramEditor; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; @@ -47,6 +49,8 @@ public class InternalBlockDiagramForMultiEditor extends InternalBlockDiagramEdit /** The editor splitter. */ private Composite splitter; + + private Image titleImage; /** * Constructor for SashSystem v2. Context and required objects are retrieved from the @@ -67,7 +71,18 @@ public class InternalBlockDiagramForMultiEditor extends InternalBlockDiagramEdit public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); setPartName(getDiagram().getName()); - setTitleImage(DIAG_IMG_DESC.createImage()); + titleImage = DIAG_IMG_DESC.createImage(); + setTitleImage(titleImage); + } + + @Override + public void dispose() { + if(titleImage != null) { + titleImage.dispose(); + titleImage = null; + } + + super.dispose(); } /** diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java index d07124d3046..0046556e84e 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2014 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -7,8 +7,9 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Régis CHEVREL: chevrel.regis <at> gmail.com - * CEA LIST - Initial API and implementation + * R�gis CHEVREL: chevrel.regis <at> gmail.com + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.parametric; @@ -23,6 +24,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.sysml.diagram.parametric.part.ParametricDiagramEditor; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; @@ -47,6 +49,8 @@ public class ParametricDiagramForMultiEditor extends ParametricDiagramEditor { /** The editor splitter. */ private Composite splitter; + + private Image titleImage; /** * Constructor for SashSystem v2. Context and required objects are retrieved from the @@ -67,7 +71,18 @@ public class ParametricDiagramForMultiEditor extends ParametricDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); setPartName(getDiagram().getName()); - setTitleImage(DIAG_IMG_DESC.createImage()); + titleImage = DIAG_IMG_DESC.createImage(); + setTitleImage(titleImage); + } + + @Override + public void dispose() { + if(titleImage != null) { + titleImage.dispose(); + titleImage = null; + } + + super.dispose(); } /** diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java index 84d75c57922..c80d84b0f74 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -8,8 +8,9 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * CEA LIST- Initial API and implementation - * Nizar GUEDIDI (CEA LIST)- modification + * CEA LIST- Initial API and implementation + * Nizar GUEDIDI (CEA LIST)- modification + * Christian W. Damus (CEA) - bug 392301 * ****************************************************************************/ package org.eclipse.papyrus.sysml.diagram.requirement; @@ -24,6 +25,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.sysml.diagram.requirement.part.RequirementDiagramEditor; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; @@ -48,6 +50,8 @@ public class RequirementDiagramForMultiEditor extends RequirementDiagramEditor { /** The editor splitter. */ private Composite splitter; + + private Image titleImage; /** * Constructor for SashSystem v2. Context and required objects are retrieved from the @@ -68,7 +72,18 @@ public class RequirementDiagramForMultiEditor extends RequirementDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); setPartName(getDiagram().getName()); - setTitleImage(DIAG_IMG_DESC.createImage()); + titleImage = DIAG_IMG_DESC.createImage(); + setTitleImage(titleImage); + } + + @Override + public void dispose() { + if(titleImage != null) { + titleImage.dispose(); + titleImage = null; + } + + super.dispose(); } /** diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java index 4ac1d771ee0..59d03946795 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2014 Atos Origin, CEA, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity;
@@ -35,6 +36,7 @@ import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes; import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -62,6 +64,8 @@ public class UmlActivityDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the
* ServiceRegistry.
@@ -82,7 +86,18 @@ public class UmlActivityDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java index 428b890d3f1..5ecbe4b445e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
+ * Copyright (c) 2010, 2014 Atos Origin, CEA, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity.figures;
@@ -17,7 +18,7 @@ import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.papyrus.uml.diagram.common.draw2d.RoundedRectangleDashedBorder;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
@@ -73,8 +74,8 @@ public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure impleme if(isUsingGradient()) {
applyTransparency(graphics);
boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
- graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1()));
- graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
graphics.fillGradient(rectangle, isVertical);
} else {
graphics.setBackgroundColor(getBackgroundColor());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java index 9e258a268ed..4d43400a719 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz;
@@ -23,6 +24,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -48,6 +50,8 @@ public class UmlClassDiagramForMultiEditor extends org.eclipse.papyrus.uml.diagr /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the
* ServiceRegistry.
@@ -67,9 +71,20 @@ public class UmlClassDiagramForMultiEditor extends org.eclipse.papyrus.uml.diagr public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
}
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DiamondNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DiamondNode.java index e88101e9b08..43a51c29828 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DiamondNode.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DiamondNode.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,8 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 + * */ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -19,7 +21,7 @@ import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.PointList; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; @@ -59,8 +61,8 @@ public class DiamondNode extends PapyrusNodeFigure implements IPapyrusNodeUMLEle ptList.addPoint(r.x, r.y + (r.height / 2)); if (isUsingGradient()) { - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); - // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); } else { graphics.setBackgroundColor(getBackgroundColor()); // graphics.setForegroundColor(getBackgroundColor); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java index 717e17e3e47..38caf89fc27 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,8 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 + * */ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -18,7 +20,7 @@ import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; @@ -48,8 +50,8 @@ public class FlowFinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLE graphics.setForegroundColor(getForegroundColor()); Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1)); if(isUsingGradient()) { - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); - // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); } else { graphics.setBackgroundColor(getBackgroundColor()); // graphics.setForegroundColor(getForegroundColor()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java index 06bdec50f9f..aacba2720fe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,7 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 */ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -18,7 +19,7 @@ import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; @@ -47,8 +48,8 @@ public class ForkNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElemen public void paintFigure(Graphics graphics) { Rectangle r = getBounds().getCopy().crop(new Insets(0,0,1,1)); if(isUsingGradient()) { - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); - // graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); } else { graphics.setBackgroundColor(getBackgroundColor()); // graphics.setForegroundColor(getForegroundColor()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PackageFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PackageFigure.java index 2c91da0a3cd..af86025bcf9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PackageFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PackageFigure.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 CEA List. + * Copyright (c) 2006, 2014 CEA List and others. * 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 @@ -7,6 +7,8 @@ * * Contributors: * CEA List - initial API and implementation + * Christian W. Damus (CEA) - bug 392301 + * *******************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -20,7 +22,7 @@ import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; @@ -224,11 +226,11 @@ public class PackageFigure extends NodeNamedElementFigure { protected void paintBackground(Graphics graphics, Rectangle rectangle) { if(isUsingGradient()) { applyTransparency(graphics); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRectangle(getHeader()); boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false; - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillGradient(getPackageableElementFigure().getBounds(), isVertical); } else { graphics.setBackgroundColor(getBackgroundColor()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java index 69727c0233b..572b6c2861c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009 CEA LIST. + * Copyright (c) 2009, 2014 CEA LIST, Atos Origin, and others. * * * All rights reserved. This program and the accompanying materials @@ -10,6 +10,7 @@ * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation * Atos Origin - Enable extending with a composite figure, by adding overrideable methods. + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -20,7 +21,7 @@ import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.LineBorder; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure; @@ -202,8 +203,8 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure if(isUsingGradient()) { applyTransparency(graphics); boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false; - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillGradient(rectangle, isVertical); } else { graphics.setBackgroundColor(getBackgroundColor()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusReceiveNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusReceiveNodeFigure.java index 74e0420fa5c..5595db9e862 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusReceiveNodeFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusReceiveNodeFigure.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,7 @@ * * Contributors: * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -18,8 +19,8 @@ import org.eclipse.draw2d.Border; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.swt.graphics.Color; /** @@ -76,32 +77,32 @@ public class PapyrusReceiveNodeFigure extends NodeNamedElementFigure { if(isVertical && rectangle.height>((3*corner)/2)){ Rectangle rect1= new Rectangle(rectangle.getLocation(),new Dimension(rectangle.width,corner)); Rectangle rect2= new Rectangle(rectangle.x,rectangle.y+rectangle.height-corner,rectangle.width,corner);; - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect= new Rectangle(rectangle.x,rectangle.y+corner/2,rectangle.width,rectangle.height-corner); graphics.fillGradient(rect, true); } else if(!isVertical && rectangle.width>((3*corner)/2)){ Rectangle rect1= new Rectangle(rectangle.getLocation(),new Dimension(corner,rectangle.height)); Rectangle rect2= new Rectangle(rectangle.x+rectangle.width-corner,rectangle.y,corner,rectangle.height); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect= new Rectangle(rectangle.x+corner/2, rectangle.y,rectangle.width-corner,rectangle.height); graphics.fillGradient(rect, false); } else{ - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rectangle,corner,corner); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusRoundedNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusRoundedNodeFigure.java index b356bd0edae..c7aef566667 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusRoundedNodeFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusRoundedNodeFigure.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,7 @@ * * Contributors: * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -18,8 +19,8 @@ import org.eclipse.draw2d.Border; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.swt.graphics.Color; /** @@ -76,32 +77,32 @@ public class PapyrusRoundedNodeFigure extends NodeNamedElementFigure { if(isVertical && rectangle.height>((3*corner)/2)){ Rectangle rect1= new Rectangle(rectangle.getLocation(),new Dimension(rectangle.width,corner)); Rectangle rect2= new Rectangle(rectangle.x,rectangle.y+rectangle.height-corner,rectangle.width,corner);; - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect= new Rectangle(rectangle.x,rectangle.y+corner/2,rectangle.width,rectangle.height-corner); graphics.fillGradient(rect, true); } else if(!isVertical && rectangle.width>((3*corner)/2)){ Rectangle rect1= new Rectangle(rectangle.getLocation(),new Dimension(corner,rectangle.height)); Rectangle rect2= new Rectangle(rectangle.x+rectangle.width-corner,rectangle.y,corner,rectangle.height); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2,corner,corner); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect= new Rectangle(rectangle.x+corner/2, rectangle.y,rectangle.width-corner,rectangle.height); graphics.fillGradient(rect, false); } else{ - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rectangle,corner,corner); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusSendNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusSendNodeFigure.java index 95b299644a8..1483535b114 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusSendNodeFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusSendNodeFigure.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2010 CEA LIST. + * Copyright (c) 2010, 2014 CEA LIST and others. * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,7 @@ * * Contributors: * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.figure.node; @@ -19,7 +20,7 @@ import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.PointList; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.swt.graphics.Color; /** * this class is used to display a sendNodeFigure, the gradient can be only @@ -77,13 +78,13 @@ public class PapyrusSendNodeFigure extends NodeNamedElementFigure { ptList.addPoint(getBounds().getBottomLeft()); if(isUsingGradient()) { applyTransparency(graphics); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.setForegroundColor(getForegroundColor()); graphics.fillPolygon(ptList); Rectangle rect1= new Rectangle(rectangle.getLocation(),new Dimension(getBounds().width-widthArrow,rectangle.height)); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillGradient(rect1, false); } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/UmlCommunicationDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/UmlCommunicationDiagramForMultiEditor.java index 7845cd81682..bfe221f6f00 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/UmlCommunicationDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/UmlCommunicationDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,8 @@ * Contributors:
* Cedric Dumoulin cedric.dumoulin@lifl.fr - Initial API and implementation
* Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Adapted from composite structure diagram
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication;
@@ -25,6 +27,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -57,6 +60,8 @@ public class UmlCommunicationDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
*
* Constructor. Context and required objects are retrieved from the
@@ -105,7 +110,18 @@ public class UmlCommunicationDiagramForMultiEditor extends UMLDiagramEditor { super.init(site, input);
// Set name after calling super.init()
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/UmlComponentDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/UmlComponentDiagramForMultiEditor.java index 875c2e62b2b..cacd0934c80 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/UmlComponentDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/UmlComponentDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -8,7 +8,9 @@ * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Amine EL KOUHEN (CEA LIST/LIFL) - Amine.El-Kouhen@lifl.fr
+ * Amine EL KOUHEN (CEA LIST/LIFL) - Amine.El-Kouhen@lifl.fr
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.component;
@@ -23,6 +25,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -46,6 +49,8 @@ public class UmlComponentDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the
* ServiceRegistry.
@@ -81,7 +86,18 @@ public class UmlComponentDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/UmlCompositeDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/UmlCompositeDiagramForMultiEditor.java index 08f94d2e67d..82fcef00279 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/UmlCompositeDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/UmlCompositeDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009-2011 CEA LIST.
+ * Copyright (c) 2009, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
@@ -25,6 +26,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -57,6 +59,8 @@ public class UmlCompositeDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor. Context and required objects are retrieved from the ServiceRegistry.
*
@@ -75,7 +79,18 @@ public class UmlCompositeDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/UmlDeploymentDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/UmlDeploymentDiagramForMultiEditor.java index fb1213574ba..e066e6d3e56 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/UmlDeploymentDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/UmlDeploymentDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -8,7 +8,9 @@ * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Amine EL KOUHEN (CEA LIST/LIFL) - Amine.El-Kouhen@lifl.fr
+ * Amine EL KOUHEN (CEA LIST/LIFL) - Amine.El-Kouhen@lifl.fr
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.deployment;
@@ -22,6 +24,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -44,6 +47,8 @@ public class UmlDeploymentDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the ServiceRegistry.
*
@@ -79,7 +84,18 @@ public class UmlDeploymentDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/EmfTreeDiagramEditorFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/EmfTreeDiagramEditorFactory.java index 3aa82703bd5..5a2ab1aa946 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/EmfTreeDiagramEditorFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/src/org/eclipse/papyrus/uml/diagram/emftree/EmfTreeDiagramEditorFactory.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@ *
* Contributors:
* CEA LIST - initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*******************************************************************************/
package org.eclipse.papyrus.uml.diagram.emftree;
@@ -109,6 +111,8 @@ public class EmfTreeDiagramEditorFactory implements IPluggableEditorFactory { private ServicesRegistry servicesRegistry;
+ private Image tabIcon;
+
/**
*
* Constructor.
@@ -188,12 +192,14 @@ public class EmfTreeDiagramEditorFactory implements IPluggableEditorFactory { *
*/
public Image getTabIcon() {
- ImageDescriptor imageDescriptor = editorDescriptor.getIcon();
- if(imageDescriptor == null) {
- return null;
+ if(tabIcon == null) {
+ ImageDescriptor imageDescriptor = editorDescriptor.getIcon();
+ if(imageDescriptor != null) {
+ tabIcon = imageDescriptor.createImage();
+ }
}
-
- return imageDescriptor.createImage();
+
+ return tabIcon;
}
/**
@@ -206,5 +212,12 @@ public class EmfTreeDiagramEditorFactory implements IPluggableEditorFactory { return "EmfTree";
}
+ public void dispose() {
+ if(tabIcon != null) {
+ tabIcon.dispose();
+ tabIcon = null;
+ }
+ }
+
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramForMultiEditor.java index da50407ad95..528ce825821 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramForMultiEditor.java @@ -1,11 +1,16 @@ /***************************************************************************** - * Copyright (c) 2013 CEA LIST. + * Copyright (c) 2013, 2014 CEA LIST and others. * * * 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: + * + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.interactionoverview; @@ -20,6 +25,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.uml.diagram.interactionoverview.part.InteractionOverviewDiagramEditor; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; @@ -45,6 +51,8 @@ public class InteractionOverviewDiagramForMultiEditor extends InteractionOvervie /** The editor splitter. */ private Composite splitter; + + private Image titleImage; /** * Constructor for SashSystem v2. Context and required objects are retrieved @@ -65,7 +73,18 @@ public class InteractionOverviewDiagramForMultiEditor extends InteractionOvervie public void init(final IEditorSite site, final IEditorInput input) throws PartInitException { super.init(site, input); setPartName(getDiagram().getName()); - setTitleImage(DIAG_IMG_DESC.createImage()); + titleImage = DIAG_IMG_DESC.createImage(); + setTitleImage(titleImage); + } + + @Override + public void dispose() { + if(titleImage != null) { + titleImage.dispose(); + titleImage = null; + } + + super.dispose(); } /** diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/UmlProfileDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/UmlProfileDiagramForMultiEditor.java index e860f6bbe6d..38edb1bab18 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/UmlProfileDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/UmlProfileDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,8 @@ * Cedric Dumoulin cedric.dumoulin@lifl.fr - Initial API and implementation
* Yann Tanguy yann.tanguy@cea.fr - Adapted from Class Diagram
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted from composite structure diagram
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.profile;
@@ -27,6 +29,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -61,6 +64,8 @@ public class UmlProfileDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor. Context and required objects are retrieved from the ServiceRegistry.
*
@@ -106,7 +111,18 @@ public class UmlProfileDiagramForMultiEditor extends UMLDiagramEditor { super.init(site, input);
// Set name after calling super.init()
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java index e9b91ea7be7..77bc739a873 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2014 Atos Origin, CEA, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence;
@@ -34,6 +35,7 @@ import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditor; import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.util.FixGateViewOnOpening;
import org.eclipse.papyrus.uml.diagram.sequence.util.FixInteractionOperandsOnOpening;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -58,6 +60,8 @@ public class UmlSequenceDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the
* ServiceRegistry.
@@ -80,7 +84,18 @@ public class UmlSequenceDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/UmlStateMachineDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/UmlStateMachineDiagramForMultiEditor.java index 47103300f13..185e91d51d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/UmlStateMachineDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/UmlStateMachineDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2008 Atos Origin.
+ * Copyright (c) 2008, 2014 Atos Origin, CEA, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.statemachine;
@@ -29,6 +30,7 @@ import org.eclipse.papyrus.uml.diagram.statemachine.custom.util.FixNestedStateAn import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -56,6 +58,8 @@ public class UmlStateMachineDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved
* from the ServiceRegistry.
@@ -96,7 +100,18 @@ public class UmlStateMachineDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java index b663cb24648..ca54c7bd905 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java @@ -1,3 +1,17 @@ +/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * 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:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
import org.eclipse.draw2d.Border;
@@ -7,7 +21,7 @@ import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
import org.eclipse.swt.graphics.Color;
@@ -60,8 +74,8 @@ public class PseudostateChoiceFigure extends PapyrusNodeFigure implements IPapyr pl.addPoint(r.getLeft());
if(isUsingGradient()) {
- graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ //graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
} else {
graphics.setBackgroundColor(getBackgroundColor());
//graphics.setForegroundColor(getBackgroundColor);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java index 74d876e6d91..dd5a3d4d7da 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java @@ -1,3 +1,17 @@ +/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * 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:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
import org.eclipse.draw2d.Border;
@@ -6,7 +20,7 @@ import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
import org.eclipse.swt.graphics.Color;
@@ -42,8 +56,8 @@ public class PseudostateJoinForkFigure extends PapyrusNodeFigure implements IPap public void paintFigure(Graphics graphics) {
Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1));
if(isUsingGradient()) {
- graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2()));
- //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2()));
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ //graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
} else {
graphics.setBackgroundColor(getBackgroundColor());
//graphics.setForegroundColor(getForegroundColor());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java index 709fc915050..5ab8ec9e377 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 CEA List. + * Copyright (c) 2006, 2014 CEA List and others. * 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 @@ -7,6 +7,8 @@ * * Contributors: * CEA List - initial API and implementation + * Christian W. Damus (CEA) - bug 392301 + * *******************************************************************************/ package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures; @@ -16,7 +18,7 @@ import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure; import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure; import org.eclipse.swt.graphics.Color; @@ -58,8 +60,8 @@ public class PseudostateTerminateFigure extends PapyrusNodeFigure implements IPa graphics.setForegroundColor(getForegroundColor()); Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1)); if(isUsingGradient()) { - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); - //graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); + //graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); } else { graphics.setBackgroundColor(getBackgroundColor()); //graphics.setForegroundColor(getForegroundColor()); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java index 2ac3d17e8fd..69c9b7fadb1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java @@ -1,3 +1,17 @@ +/***************************************************************************** + * Copyright (c) 2011, 2014 CEA LIST and others. + * + * 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: + * + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 392301 + * + *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures; import java.util.ArrayList; @@ -7,7 +21,7 @@ import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; +import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry; import org.eclipse.gmf.runtime.notation.GradientStyle; import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager; import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure; @@ -68,32 +82,32 @@ public class StateMachineFigure extends CompartmentFigure { if(isVertical && rectangle.height > ((3 * arcwidth) / 2)) { Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(rectangle.width, arcwidth)); Rectangle rect2 = new Rectangle(rectangle.x, rectangle.y + rectangle.height - arcwidth, rectangle.width, arcwidth);; - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1, arcwidth, arcwidth); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2, arcwidth, arcwidth); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect = new Rectangle(rectangle.x, rectangle.y + arcwidth / 2, rectangle.width, rectangle.height - arcwidth); graphics.fillGradient(rect, true); } else if(!isVertical && rectangle.width > ((3 * arcwidth) / 2)) { Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(arcwidth, rectangle.height)); Rectangle rect2 = new Rectangle(rectangle.x + rectangle.width - arcwidth, rectangle.y, arcwidth, rectangle.height); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rect1, arcwidth, arcwidth); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); graphics.fillRoundRectangle(rect2, arcwidth, arcwidth); - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); Rectangle rect = new Rectangle(rectangle.x + arcwidth / 2, rectangle.y, rectangle.width - arcwidth, rectangle.height); graphics.fillGradient(rect, false); } else { - graphics.setBackgroundColor(FigureUtilities.integerToColor(getGradientColor1())); - graphics.setForegroundColor(FigureUtilities.integerToColor(getGradientColor2())); + graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1())); + graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2())); graphics.fillRoundRectangle(rectangle, arcwidth, arcwidth); } } else { diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/UmlTimingDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/UmlTimingDiagramForMultiEditor.java index d70fee9babf..8cd5ce82884 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/UmlTimingDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/UmlTimingDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -7,6 +7,11 @@ * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.timing.custom;
@@ -20,6 +25,7 @@ import org.eclipse.papyrus.infra.core.editor.BackboneException; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.timing.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -38,6 +44,8 @@ public class UmlTimingDiagramForMultiEditor extends org.eclipse.papyrus.uml.diag /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the ServiceRegistry.
*
@@ -56,7 +64,18 @@ public class UmlTimingDiagramForMultiEditor extends org.eclipse.papyrus.uml.diag public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CompactStateFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CompactStateFigure.java index d0e6c45e69d..6505194f22a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CompactStateFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/figures/CompactStateFigure.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -7,14 +7,19 @@ * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.timing.custom.figures;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.gmf.tooling.runtime.draw2d.CenterLayout;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
@@ -86,9 +91,9 @@ public class CompactStateFigure extends PapyrusNodeFigure implements IPapyrusUML final int widthScaled = (int)(this.bounds.width * scale);
final int heightScaled = (int)(height * scale);
if(getGradientStyle() == GradientStyle.VERTICAL) {
- pattern = new Pattern(Display.getCurrent(), xScaled, yScaled, xScaled, yScaled + heightScaled, FigureUtilities.integerToColor(Integer.valueOf(getGradientColor2())), FigureUtilities.integerToColor(Integer.valueOf(getGradientColor1())));
+ pattern = new Pattern(Display.getCurrent(), xScaled, yScaled, xScaled, yScaled + heightScaled, ColorRegistry.getInstance().getColor(getGradientColor2()), ColorRegistry.getInstance().getColor(getGradientColor1()));
} else {
- pattern = new Pattern(Display.getCurrent(), xScaled, yScaled, xScaled + widthScaled, this.bounds.y, FigureUtilities.integerToColor(Integer.valueOf(getGradientColor2())), FigureUtilities.integerToColor(Integer.valueOf(getGradientColor1())));
+ pattern = new Pattern(Display.getCurrent(), xScaled, yScaled, xScaled + widthScaled, this.bounds.y, ColorRegistry.getInstance().getColor(getGradientColor2()), ColorRegistry.getInstance().getColor(getGradientColor1()));
}
g.setBackgroundPattern(pattern);
g.fillPolygon(polygon);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UmlUseCaseDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UmlUseCaseDiagramForMultiEditor.java index 8cfb3a76bf1..bcf0079c617 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UmlUseCaseDiagramForMultiEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UmlUseCaseDiagramForMultiEditor.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2008 Atos Origin.
+ * Copyright (c) 2008, 2014 Atos Origin, CEA, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.usecase;
@@ -24,6 +25,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorPlugin;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -51,6 +53,8 @@ public class UmlUseCaseDiagramForMultiEditor extends UMLDiagramEditor { /** The editor splitter. */
private Composite splitter;
+ private Image titleImage;
+
/**
* Constructor for SashSystem v2. Context and required objects are retrieved from the
* ServiceRegistry.
@@ -70,7 +74,18 @@ public class UmlUseCaseDiagramForMultiEditor extends UMLDiagramEditor { public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if(titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
}
/**
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java index 12e3de11f03..095f6774e71 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 CEA LIST & LIFL
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.contentprovider.simple;
@@ -62,4 +63,7 @@ public class FakePageModel implements IPageModel { return null;
}
+ public void dispose() {
+ // Pass
+ }
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java index 13e7919b3f9..48743bbda55 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java @@ -1,6 +1,17 @@ -/**
- *
- */
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 LIFL, CEA LIST, and others.
+ *
+ * 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:
+ *
+ * LIFL - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -28,6 +39,11 @@ public class FakeEditorModel implements IEditorModel { public FakeEditorModel() {
name = "noname";
}
+
+ public void dispose() {
+ // Pass
+ }
+
/**
* @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabTitle()
*
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java index 5cdd6ac0109..89961918174 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java @@ -1,3 +1,17 @@ +/*****************************************************************************
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
+ *
+ * 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:
+ *
+ * LIFL - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.editor;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
@@ -70,4 +84,7 @@ public class MessagePartModel implements IComponentModel { return this;
}
+ public void dispose() {
+ // Pass
+ }
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java index e57dc9c1f9a..3b050c935f4 100644 --- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java +++ b/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 CEA LIST & LIFL
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.sasheditor.tests.texteditor;
@@ -121,4 +122,8 @@ public class TextEditorPartModel implements IEditorModel { public EditorActionBarContributor getActionBarContributor() {
return null;
}
+
+ public void dispose() {
+ // Pass
+ }
}
|