summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 10:07:44 (EDT)
committerLaurent Wouters2014-04-04 10:07:44 (EDT)
commit96a5df6bc01e67bb815c1422fa5b865ea5e54f85 (patch)
treee1a49a4ddd24513aae805baef705fe26af97f8ab
parent0745ddaf2273fb4d9f27238ea06fc6b423f6fb93 (diff)
downloadorg.eclipse.papyrus-96a5df6bc01e67bb815c1422fa5b865ea5e54f85.zip
org.eclipse.papyrus-96a5df6bc01e67bb815c1422fa5b865ea5e54f85.tar.gz
org.eclipse.papyrus-96a5df6bc01e67bb815c1422fa5b865ea5e54f85.tar.bz2
[clean] Retiring org.eclipse.papyrus.uml.properties.tabbedproperties.appearancelast/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.classpath7
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.project28
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/META-INF/MANIFEST.MF14
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/about.html28
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/build.properties7
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.properties12
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.xml5
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Activator.java61
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/GradientSection.java418
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/IPrimaryEditPartFilter.java17
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LabelNameIconAppearanceSection.java141
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentAppearanceSection.java212
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentSectionFilter.java44
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSection.java273
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSectionFilter.java36
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Messages.java47
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/NodeNamedElementFilter.java16
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/QualifiedNameAppearanceSection.java307
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/ShadowAppearanceSection.java196
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/messages.properties9
20 files changed, 0 insertions, 1878 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.classpath b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.classpath
deleted file mode 100644
index 2d1a430..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.project b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.project
deleted file mode 100644
index 2a95967..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.properties.tabbedproperties.appearance</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/META-INF/MANIFEST.MF b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/META-INF/MANIFEST.MF
deleted file mode 100644
index 24fbafd..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="0.9.0"
-Export-Package: org.eclipse.papyrus.uml.properties.tabbedproperties.appearance
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.9.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.properties.tabbedproperties.appearance.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/about.html b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/about.html
deleted file mode 100644
index 82d49bf..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/build.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/build.properties
deleted file mode 100644
index 3474d47..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:30:17 CEST 2011
-bin.includes=META-INF/,.,plugin.xml,about.html,plugin.properties
-output..=bin/
-src.includes=about.html,META-INF/,.,plugin.xml,plugin.properties
-source..=src/
-bin..=bin/
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.properties
deleted file mode 100644
index b54a6a2..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 CEA LIST.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - initial API and implementation
-##################################################################################
-pluginName=Papyrus Appearance TabbedProperties Plug in (Incubation)
-providerName=Eclipse Modeling Project \ No newline at end of file
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.xml b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.xml
deleted file mode 100644
index 6494301..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
-</plugin>
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Activator.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Activator.java
deleted file mode 100644
index 107e2e1..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008-2009 Atos Origin.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.properties.tabbedproperties.appearance";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/GradientSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/GradientSection.java
deleted file mode 100644
index 8e30288..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/GradientSection.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thibault Landre (Atos Origin) - Initial API and implementation
- *
- ****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorPalettePopup;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.notation.GradientStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A section that manages the Gradient.
- */
-public class GradientSection extends AbstractNotationPropertiesSection {
-
- private Button policyButton;
-
- private Composite styleCompo;
-
- private Spinner transparencyValueSpinner;
-
- private Button verticalStyle;
-
- private Button horizontalStyle;
-
- private Button colorButton;
-
- private GradientData gradientData = GradientData.getDefaultGradientData();
-
- private int transparency = -1;
-
- private boolean isGradientUsed = false;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection#
- * initializeControls(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void initializeControls(Composite parent) {
- super.initializeControls(parent);
- GridLayout layout = new GridLayout(2, false);
- Group gradientGroup = getWidgetFactory().createGroup(composite, Messages.GradientSection_Group_Gradient);
- gradientGroup.setLayout(layout);
-
- createGradientPolicy(gradientGroup);
- createColorGroup(gradientGroup);
- createStyleGroup(gradientGroup);
- createTransparencyGroup(gradientGroup);
- }
-
- /**
- * Create the GradientPolicy Group. It contained a SWT.CHECK button to specify if the gradient
- * is used or not and a label.
- *
- * @param parent
- * the parent
- */
- protected void createGradientPolicy(Composite parent) {
-
- // Create a label
- getWidgetFactory().createCLabel(parent, Messages.GradientSection_Button_ActivateGradient);
-
- // Create the check button
- policyButton = getWidgetFactory().createButton(parent, "", SWT.CHECK); //$NON-NLS-1$
-
- policyButton.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if(!policyButton.getSelection()) {
- isGradientUsed = false;
- gradientData = null;
- // Set transparency to 100 to have the background color correct.
- transparency = 100;
- } else {
- isGradientUsed = true;
- gradientData = new GradientData((GradientData)getSingleInput().getPreferredValue(
- NotationPackage.eINSTANCE.getFillStyle_Gradient()));
- transparency = (Integer)getSingleInput().getPreferredValue(
- NotationPackage.eINSTANCE.getFillStyle_Transparency());
- }
- updateGradient();
- updateTransparency();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
-
- /**
- * Create the transparency. It contained a label and a spinner to select a value for the
- * transparency. The transparency value must be contained in [0;100]
- *
- * @param parent
- * the composite containing the widgets
- */
- protected void createTransparencyGroup(Composite parent) {
-
- // Create the label
- getWidgetFactory().createCLabel(parent, Messages.GradientSection_Label_Transparency);
-
- // Create the Spinner
- transparencyValueSpinner = new Spinner(parent, SWT.BORDER);
- transparencyValueSpinner.setMinimum(0);
- transparencyValueSpinner.setMaximum(100);
- transparencyValueSpinner.setIncrement(1);
-
- transparencyValueSpinner.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent arg0) {
- transparency = transparencyValueSpinner.getSelection();
- updateTransparency();
- }
- });
-
- }
-
- /**
- * Create the color. It is in charge of selecting the color used by the gradient. It contained a
- * label and the color button
- *
- * @param parent
- * the parent composite
- */
- protected void createColorGroup(Composite parent) {
-
- // Create the label
- getWidgetFactory().createCLabel(parent, Messages.GradientSection_Label_FirstColor);
-
- // Create the color button
- colorButton = getWidgetFactory().createButton(parent, "", SWT.PUSH); //$NON-NLS-1$
- colorButton.addListener(SWT.Selection, new Listener() {
-
- public void handleEvent(Event event) {
- RGB color1 = changeColor(colorButton);
- if(color1 != null) {
- gradientData.setGradientColor1(FigureUtilities.RGBToInteger(color1));
- updateGradient();
- }
- }
- });
- }
-
- /**
- * Create the style. It contained the component in charge of the style of the gradient. Values
- * available are GradientStyle.VERTICAL and GradientStyle.HORIZONTAL.
- *
- * @param parent
- * the parent composite
- */
- protected void createStyleGroup(Composite parent) {
-
- // Create the label
- getWidgetFactory().createCLabel(parent, Messages.GradientSection_Label_Style);
-
- // Create the style composite
- styleCompo = getWidgetFactory().createComposite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, true);
- layout.marginWidth = 0;
- styleCompo.setLayout(layout);
- verticalStyle = getWidgetFactory().createButton(styleCompo, Messages.GradientSection_Style_Vertical, SWT.RADIO);
- horizontalStyle = getWidgetFactory().createButton(styleCompo, Messages.GradientSection_Style_Horizontal,
- SWT.RADIO);
-
- SelectionListener selectionListener = new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if(!((Button)e.widget).getSelection()) {
- // don't react on de-selection
- return;
- }
- if(verticalStyle.getSelection()) {
- gradientData.setGradientStyle(GradientStyle.VERTICAL);
- } else {
- gradientData.setGradientStyle(GradientStyle.HORIZONTAL);
- }
- updateGradient();
- }
- };
- verticalStyle.addSelectionListener(selectionListener);
- horizontalStyle.addSelectionListener(selectionListener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection#dispose
- * ()
- */
- @Override
- public void dispose() {
- disposeButtonImage(colorButton);
- super.dispose();
- }
-
- /**
- * Dispose the image associated with the given button
- *
- * @param btn
- * the button that contains the image
- */
- protected void disposeButtonImage(Button btn) {
- if(btn != null && !btn.isDisposed()) {
- Image imageColor1 = btn.getImage();
- if(imageColor1 != null && !imageColor1.isDisposed()) {
- imageColor1.dispose();
- }
- }
- }
-
- /**
- * Sets the image for a color button (square filled with the color that button represents)
- */
- protected void setButtonImage(Button btn, int intColor) {
- // First, dispose the current image, if any
- Image image = btn.getImage();
- if(image != null) {
- image.dispose();
- }
-
- Display display = btn.getParent().getShell().getDisplay();
- RGB rgbColor = FigureUtilities.integerToRGB(intColor);
- // Now set the new image based on rgbColor
- Color color1 = new Color(display, rgbColor);
- image = new Image(display, 16, 16);
- GC gc = new GC(image);
- gc.setBackground(color1);
- Rectangle rect = image.getBounds();
- gc.fillRectangle(rect);
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
- gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
- gc.dispose();
- color1.dispose();
- btn.setImage(image);
- }
-
- /**
- * Allow user to change the color of the given button.
- *
- * @param button
- * the button
- * @return the selected color or null
- * @see org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorPalettePopup
- */
- private RGB changeColor(Button button) {
- ColorPalettePopup popup = new ColorPalettePopup(button.getParent().getShell(),
- IDialogConstants.BUTTON_BAR_HEIGHT);
- Rectangle r = button.getBounds();
- Point location = button.getParent().toDisplay(r.x, r.y);
- popup.open(new Point(location.x, location.y + r.height));
- if(popup.getSelectedColor() == null && !popup.useDefaultColor()) {
- return null;
- }
- return popup.getSelectedColor();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- super.refresh();
- refreshComponent();
- }
-
- /**
- * Refresh the components and enable/disable them according to the isGradientUsed attribute
- */
- protected void refreshComponent() {
-
- if(gradientData != null) {
- if(transparency != transparencyValueSpinner.getSelection()) {
- transparencyValueSpinner.setSelection(transparency);
- }
-
- setButtonImage(colorButton, gradientData.getGradientColor1());
-
- if(horizontalStyle.getSelection() != (gradientData.getGradientStyle() == GradientStyle.HORIZONTAL)) {
- horizontalStyle.setSelection(gradientData.getGradientStyle() == GradientStyle.HORIZONTAL);
- }
- if(verticalStyle.getSelection() != (gradientData.getGradientStyle() == GradientStyle.VERTICAL)) {
- verticalStyle.setSelection(gradientData.getGradientStyle() == GradientStyle.VERTICAL);
- }
- }
-
- policyButton.setSelection(isGradientUsed);
- // Groups
- styleCompo.setEnabled(isGradientUsed);
-
- // Others
- transparencyValueSpinner.setEnabled(isGradientUsed);
- verticalStyle.setEnabled(isGradientUsed);
- horizontalStyle.setEnabled(isGradientUsed);
- colorButton.setEnabled(isGradientUsed);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.tabbed.ISection#setInput(org.eclipse. ui.IWorkbenchPart,
- * org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- executeAsReadAction(new Runnable() {
-
- public void run() {
- IGraphicalEditPart ep = getSingleInput();
- if(ep != null) {
- gradientData = new GradientData((GradientData)getSingleInput().getStructuralFeatureValue(
- NotationPackage.eINSTANCE.getFillStyle_Gradient()));
- transparency = (Integer)getSingleInput().getStructuralFeatureValue(
- NotationPackage.eINSTANCE.getFillStyle_Transparency());
- }
- }
- });
- isGradientUsed = !gradientData.equals(GradientData.getDefaultGradientData());
- }
-
- /**
- * Update the value of the given feature
- *
- * @param feature
- * the feature to update
- * @param value
- * the new value
- * @param commandName
- * the name of the command
- */
- protected void updateFeature(final EStructuralFeature feature, final Object value, String commandName) {
- List inputs = getInput();
- List<ICommand> commands = new ArrayList<ICommand>();
- for(Object input : inputs) {
- if(input instanceof IGraphicalEditPart) {
- final IGraphicalEditPart gep = (IGraphicalEditPart)input;
- if(!(input instanceof ConnectionNodeEditPart)) {
- commands.add(createCommand(commandName, ((View)gep.getModel()).eResource(), new Runnable() {
-
- public void run() {
- gep.setStructuralFeatureValue(feature, value);
- }
- }));
- }
- }
- }
- executeAsCompositeCommand(commandName, commands);
- }
-
- /**
- * Update transparency feature
- */
- protected void updateTransparency() {
- updateFeature(NotationPackage.eINSTANCE.getFillStyle_Transparency(), new Integer(transparency), "Change Transparency command");//$NON-NLS-1$
- }
-
- /**
- * Update Gradient feature
- */
- protected void updateGradient() {
- Object value = null;
- if(gradientData != null) {
- value = new GradientData(gradientData);
- }
- updateFeature(NotationPackage.eINSTANCE.getFillStyle_Gradient(), value, "Change Gradient command"); //$NON-NLS-1$
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/IPrimaryEditPartFilter.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/IPrimaryEditPartFilter.java
deleted file mode 100644
index 4d8f3c2..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/IPrimaryEditPartFilter.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.uml2.uml.NamedElement;
-
-public class IPrimaryEditPartFilter implements IFilter {
-
- public boolean select(Object object) {
- if(object instanceof IPrimaryEditPart && !(object instanceof ConnectionEditPart))
- return true;
-
- return false;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LabelNameIconAppearanceSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LabelNameIconAppearanceSection.java
deleted file mode 100644
index be83c6d..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LabelNameIconAppearanceSection.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Thibault Landré (Atos Origin) - fix Bug 291799
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.tools.utils.ui.command.SetNameLabelIconCommand;
-import org.eclipse.papyrus.uml.tools.utils.ui.helper.NameLabelIconHelper;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The Class QualifiedNameAppearanceSection allow users to customize the display of qualified name.
- */
-public class LabelNameIconAppearanceSection extends AbstractModelerPropertySection {
-
- /**
- * The stereotype appearance.
- */
- private CLabel ElementIconLabel;
-
- /**
- * The button Gradient appearance.
- */
- private org.eclipse.swt.widgets.Button checkBox;
-
- /**
- * The combo stereotype appearance listener.
- */
- private SelectionListener checkBoxListener;
-
- private GraphicalEditPart editPart;
-
- /**
- * Creates the controls.
- *
- * @param tabbedPropertySheetPage
- * the tabbed property sheet page
- * @param parent
- * the parent
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- super.createControls(parent, tabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data;
-
- ElementIconLabel = getWidgetFactory().createCLabel(composite, "Element icon :");
- data = new FormData();
- data.left = new FormAttachment(0, 0);
- ElementIconLabel.setLayoutData(data);
-
- checkBox = getWidgetFactory().createButton(composite, "", SWT.CHECK);
-
- data = new FormData();
- data.left = new FormAttachment(ElementIconLabel, 0);
- data.top = new FormAttachment(ElementIconLabel, 1, SWT.CENTER);
- checkBox.setLayoutData(data);
-
- checkBoxListener = new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- List inputs = getInput();
- for(Object input : inputs) {
- if(input instanceof IGraphicalEditPart) {
- IGraphicalEditPart gep = (IGraphicalEditPart)input;
- if(gep.getModel() instanceof View) {
- getEditingDomain().getCommandStack().execute(
- new SetNameLabelIconCommand(getEditingDomain(), (View)gep.getModel(), checkBox
- .getSelection()));
- }
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- };
- checkBox.addSelectionListener(checkBoxListener);
-
- }
-
- /*
- * @see org.eclipse.ui.views.properties.tabbed.view.ITabbedPropertySection#refresh()
- */
- /**
- * Refresh.
- */
- @Override
- public void refresh() {
- if((!checkBox.isDisposed())) {
- if(editPart != null) {
- if((editPart.getModel()) != null) {
- checkBox.setSelection(NameLabelIconHelper.showLabelIcon((EModelElement)editPart.getModel()));
-
- } else {
- checkBox.setEnabled(false);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Object input = ((IStructuredSelection)selection).getFirstElement();
- // look for modelManager
- if(input instanceof GraphicalEditPart) {
- editPart = ((GraphicalEditPart)input);
- }
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentAppearanceSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentAppearanceSection.java
deleted file mode 100644
index 0bb9508..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentAppearanceSection.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.common.helper.BasicClassifierCompartmentLayoutHelper;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IContributedContentsView;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-// TODO: Auto-generated Javadoc
-/**
- * This class is used to specify in the property view the kind of layout.
- */
-public class LayoutCompartmentAppearanceSection extends AbstractPropertySection {
-
- /** The stereotype appearance. */
- private CLabel layoutlabelkind;
-
- /** The button Gradient appearance. */
- private CCombo compartmentAppearence;
-
- /** The combo stereotype appearance listener. */
- private SelectionListener buttonListener;
-
- /** The edit part. */
- private GraphicalEditPart editPart;
-
- /** The editor. */
- private IMultiDiagramEditor editor;
-
- /** The editing domain. */
- private TransactionalEditingDomain editingDomain;
-
- /** The MANUAL. */
- private String MANUAL = "manual";
-
- /** The AUTOMATIC. */
- private String AUTOMATIC = "automatic";
-
- /**
- * Creates the controls.
- *
- * @param tabbedPropertySheetPage
- * the tabbed property sheet page
- * @param parent
- * the parent
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- super.createControls(parent, tabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data;
-
- layoutlabelkind = getWidgetFactory().createCLabel(composite, "Compartment Layout :"); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(0, 0);
- layoutlabelkind.setLayoutData(data);
-
- compartmentAppearence = getWidgetFactory().createCCombo(composite);
- compartmentAppearence.add(MANUAL);
- compartmentAppearence.add(AUTOMATIC);
- compartmentAppearence.setEditable(false);
-
-
- data = new FormData();
- data.left = new FormAttachment(layoutlabelkind, 0);
- data.top = new FormAttachment(layoutlabelkind, 1, SWT.CENTER);
- compartmentAppearence.setLayoutData(data);
-
- buttonListener = new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if(editPart != null) {
- if(((View)editPart.getModel()) != null) {
-
- // command creation
- if(editingDomain != null) {
- if(compartmentAppearence.getItem(compartmentAppearence.getSelectionIndex()).equals(AUTOMATIC)) {
- editingDomain.getCommandStack().execute(
- BasicClassifierCompartmentLayoutHelper.getInstances().setAutomaticLayoutKindOnView(editingDomain, ((View)editPart.getModel())));
- }
- else {
- editingDomain.getCommandStack().execute(
- BasicClassifierCompartmentLayoutHelper.getInstances().setManualLayoutKindOnView(editingDomain, ((View)editPart.getModel())));
- }
- refresh();
- }
- }
-
- }
-
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
- };
- compartmentAppearence.addSelectionListener(buttonListener);
-
- }
-
- /*
- * @see org.eclipse.ui.views.properties.tabbed.view.ITabbedPropertySection#refresh()
- */
- /**
- * Refresh.
- */
- @Override
- public void refresh() {
- if((!compartmentAppearence.isDisposed())) {
-
- compartmentAppearence.removeSelectionListener(buttonListener);
-
- if(editPart != null) {
-
- if((editPart.getModel()) != null) {
- if(BasicClassifierCompartmentLayoutHelper.getInstances().isManual((EModelElement)editPart.getModel())) {
- compartmentAppearence.select(0);
- } else if(BasicClassifierCompartmentLayoutHelper.getInstances().isManual((EModelElement)editPart.getModel())) {
- compartmentAppearence.select(1);
- } else {
- //default = automatic
- compartmentAppearence.select(1);
- }
- } else {
- compartmentAppearence.setEnabled(false);
- }
- }
- }
- compartmentAppearence.addSelectionListener(buttonListener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void dispose() {
- super.dispose();
- if(compartmentAppearence != null && !compartmentAppearence.isDisposed())
- compartmentAppearence.removeSelectionListener(buttonListener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Object input = ((IStructuredSelection)selection).getFirstElement();
- // look for modelManager
- if(input instanceof GraphicalEditPart) {
- editPart = ((GraphicalEditPart)input);
- // selectionChanged(selection);
- }
- // When the selection is computed from the outline, get the associated editor
- if(part instanceof ContentOutline) {
- IContributedContentsView contributedView = ((IContributedContentsView)((ContentOutline)part)
- .getAdapter(IContributedContentsView.class));
- if(contributedView != null) {
- part = (IWorkbenchPart)contributedView.getContributingPart();
- }
- }
- if(part instanceof IMultiDiagramEditor) {
- editor = (IMultiDiagramEditor)part;
- editingDomain = getTransactionalEditingDomain(editor);
- } else
- editingDomain = null;
- }
-
- /**
- * Get the {@link TransactionalEditingDomain} from the {@link IMultiDiagramEditor}.
- * @param editor
- * @return
- */
- private TransactionalEditingDomain getTransactionalEditingDomain(IMultiDiagramEditor editor) {
- try {
- return editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
- } catch (ServiceException e) {
- // TODO Log instead of showing the trace.
- e.printStackTrace();
- return null;
- }
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentSectionFilter.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentSectionFilter.java
deleted file mode 100644
index 11ec14b..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/LayoutCompartmentSectionFilter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
-
-/**
- * Filter for the {@link MaskManagedLabelSection} section
- */
-public class LayoutCompartmentSectionFilter implements IFilter {
-
- /**
- * {@inheritDoc}
- */
- public boolean select(Object object) {
- if(object instanceof IGraphicalEditPart && (!(object instanceof DiagramEditPart))) {
- if(((IGraphicalEditPart)object).getFigure().getChildren().size() > 0) {
- IFigure fig = (IFigure)(((IGraphicalEditPart)object).getFigure().getChildren().get(0));
- if(fig.getChildren().size() > 0) {
- IFigure primaryfig = (IFigure)(fig.getChildren().get(0));
- if(primaryfig instanceof CompartmentFigure) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSection.java
deleted file mode 100644
index a39fe0b..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSection.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Section for properties view, for label management. More precisely, these labels are manage with
- * masks, to say if, for exammple, the name must be displayed or not.
- */
-public class MaskManagedLabelSection extends AbstractNotationPropertiesSection {
-
- /** current edit policy of the edited object */
- protected IMaskManagedLabelEditPolicy editPolicy;
-
- /** current edit part */
- protected IGraphicalEditPart editPart;
-
- /** table that displays the possible masks */
- protected Table table;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void initializeControls(Composite parent) {
- super.initializeControls(parent);
- GridLayout layout = new GridLayout(2, false);
- Group gradientGroup = getWidgetFactory().createGroup(composite, "Label Customization");
- gradientGroup.setLayout(layout);
-
- Composite maskPolicyCompo = getWidgetFactory().createComposite(gradientGroup, SWT.NONE);
- maskPolicyCompo.setLayout(new GridLayout(2, false));
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- maskPolicyCompo.setLayoutData(gd);
-
- // create viewer composite
- table = getWidgetFactory().createTable(maskPolicyCompo, SWT.CHECK);
- gd = new GridData(SWT.FILL, SWT.CENTER, true, true);
- table.setData(gd);
- table.addSelectionListener(new SelectionListener() {
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- // do nothing
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- // check this is a check event
- if(e.detail != SWT.CHECK) {
- return;
- }
-
- Object source = e.getSource();
- Widget item = e.item;
- if(source instanceof Table && item instanceof TableItem) { // instanceof check also
- // that table and item
- // are not null
- int maskValue = (Integer)((TableItem)item).getData();
- applyMask(maskValue, ((TableItem)item).getChecked());
- }
- refresh();
- }
-
- });
- TableColumn column = new TableColumn(table, SWT.CENTER);
- column.setWidth(120);
-
- // composite for buttons
- Composite buttonComposite = getWidgetFactory().createComposite(maskPolicyCompo, SWT.NONE);
- buttonComposite.setLayout(new GridLayout(1, false));
- gd = new GridData(SWT.FILL, SWT.FILL, false, true);
- buttonComposite.setLayoutData(gd);
-
- // create the "Set Default" button
- Button setDefaultButton = getWidgetFactory().createButton(buttonComposite, "Set Default", SWT.NONE);
- setDefaultButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- setDefaultButton.addSelectionListener(new SelectionListener() {
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- // when selected, it removes the eannotation linked to the view
- editPolicy.setDefaultDisplayValue();
- refresh();
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- // does nothing
- }
- });
-
- // create the "View Preference" button
- Button viewPrefButton = getWidgetFactory().createButton(buttonComposite, "View Preferences", SWT.NONE);
- viewPrefButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- viewPrefButton.addSelectionListener(new SelectionListener() {
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- // when selected, open preference page
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getPart().getSite().getShell(),
- editPolicy.getPreferencePageID(), null, null);
- dialog.open();
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- // does nothing
- }
- });
- }
-
- /**
- * Applies the mask to the edited element label
- *
- * @param maskValue
- * the value of the mask
- * @param checked
- * {@link Boolean} set to <code>true</code> if the mask must be applied
- */
- protected void applyMask(int maskValue, boolean checked) {
- // computes the new value to set to the annotation (retrieve old value)
- int newValue = getMaskManagedLabelEditPolicy(editPart).getCurrentDisplayValue();
- // if checked, must add the mask to old one
- if(checked) {
- newValue = newValue | maskValue; // add the mask to the display value
- } else {
- newValue = newValue & ~maskValue; // remove the mask to the display value
- }
- editPolicy.updateDisplayValue(newValue);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- super.dispose();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void refresh() {
- super.refresh();
- refreshTable();
- }
-
- /**
- * Refresh the components and enable/disable them according to the isGradientUsed attribute
- */
- protected void refreshTable() {
- // retrieve the current display masks => either display annotation or preference if no
- // annotation
- int displayValue = editPolicy.getCurrentDisplayValue();
- // refreshes the different buttons
- for(TableItem item : table.getItems()) {
- int maskValue = (Integer)item.getData();
- item.setChecked((displayValue & maskValue) == maskValue);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- executeAsReadAction(new Runnable() {
-
- public void run() {
- editPart = getSingleInput();
- if(editPart != null) {
- // get the correct policy
- editPolicy = getMaskManagedLabelEditPolicy(editPart);
- if(editPolicy == null) {
- Activator.getDefault().getLog().log(
- new Status(IStatus.WARNING, Activator.PLUGIN_ID,
- "Trying to display the mask managed Section with an element that does not have the correct edit policy: "
- + editPart));
- } else {
- // dispose previous table items if necessary and create new ones
- manageTableItems();
- }
- }
-
- }
-
- });
- }
-
- /**
- * manages the table items
- */
- protected void manageTableItems() {
- // unload previous items
- for(TableItem item : table.getItems()) {
- item.dispose();
- }
-
- // create new items
- createItems();
- }
-
- /**
- * create the table items for the given edit policy
- */
- protected void createItems() {
- Map<Integer, String> masks = editPolicy.getMasks();
- for(int maskValue : masks.keySet()) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText("" + masks.get(maskValue)); // returns a default string: ""
- item.setData(maskValue);
- }
- }
-
- /**
- * Retrieves the edit policy that manages the mask for the specified edit part
- *
- * @param ep
- * the edit part currently selected for which we are displaying the section
- */
- private IMaskManagedLabelEditPolicy getMaskManagedLabelEditPolicy(IGraphicalEditPart ep) {
- return (IMaskManagedLabelEditPolicy)ep
- .getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSectionFilter.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSectionFilter.java
deleted file mode 100644
index e58fee7..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/MaskManagedLabelSectionFilter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IMaskManagedLabelEditPolicy;
-
-/**
- * Filter for the {@link MaskManagedLabelSection} section
- */
-public class MaskManagedLabelSectionFilter implements IFilter {
-
- /**
- * {@inheritDoc}
- */
- public boolean select(Object object) {
- if(object instanceof IGraphicalEditPart) {
- // if the edit part is a graphical edit part, it tests if it has the right edit policy
- return (((IGraphicalEditPart)object)
- .getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY) != null);
- }
- return false;
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Messages.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Messages.java
deleted file mode 100644
index a95792e..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/Messages.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- ****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = Activator.PLUGIN_ID + ".messages"; //$NON-NLS-1$
-
- public static String GradientSection_Button_ActivateGradient;
-
- public static String GradientSection_Label_FirstColor;
-
- public static String GradientSection_Group_Gradient;
-
- public static String GradientSection_Label_Style;
-
- public static String GradientSection_Label_Transparency;
-
- public static String GradientSection_Style_Horizontal;
-
- public static String GradientSection_Style_Vertical;
-
- /** label of the set default button in the MaskManagedLabelSection */
- // @unused
- public static String MaskManagedLabelSection_Button_SetDefault;
-
- /** label of the view preferences button in the MaskManagedLabelSection */
- // @unused
- public static String MaskManagedLabelSection_Button_ViewPreference;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/NodeNamedElementFilter.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/NodeNamedElementFilter.java
deleted file mode 100644
index 9af4f5c..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/NodeNamedElementFilter.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.uml2.uml.NamedElement;
-
-public class NodeNamedElementFilter implements IFilter {
-
- public boolean select(Object object) {
- if(object instanceof GraphicalEditPart
- && ((GraphicalEditPart)object).getNotationView().getElement() instanceof NamedElement)
- return true;
-
- return false;
- }
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/QualifiedNameAppearanceSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/QualifiedNameAppearanceSection.java
deleted file mode 100644
index 5dc3cb8..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/QualifiedNameAppearanceSection.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import java.util.List;
-
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.util.EMap;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.ui.VisualInformationPapyrusConstant;
-import org.eclipse.papyrus.uml.tools.utils.ui.command.SetQualifiedNameDepthCommand;
-import org.eclipse.papyrus.uml.tools.utils.ui.helper.QualifiedNameHelper;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IContributedContentsView;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * The Class QualifiedNameAppearanceSection allow users to customize the display of qualified name.
- *
- */
-public class QualifiedNameAppearanceSection extends AbstractPropertySection {
-
- /**
- * The stereotype appearance.
- */
- private CLabel qualifiedNameAppearance;
-
- /**
- * The combo stereotype appearance.
- */
- private CCombo comboQualifiedNameAppearance;
-
- /**
- * The combo stereotype appearance listener.
- */
- private SelectionListener comboQualifiedNameAppearanceListener;
-
- private GraphicalEditPart namedElementEditPart;
-
- private IMultiDiagramEditor editor;
-
- private TransactionalEditingDomain editingDomain;
-
- /**
- * Creates the controls.
- *
- * @param tabbedPropertySheetPage
- * the tabbed property sheet page
- * @param parent
- * the parent
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- super.createControls(parent, tabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data;
-
- qualifiedNameAppearance = getWidgetFactory().createCLabel(composite, "Qualified Name Depth:"); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(0, 0);
- // data.right = new FormAttachment(comboQualifiedNameAppearance,0);
- data.top = new FormAttachment(qualifiedNameAppearance, 1, SWT.CENTER);
- qualifiedNameAppearance.setLayoutData(data);
-
- comboQualifiedNameAppearance = getWidgetFactory().createCCombo(composite, SWT.BORDER);
- comboQualifiedNameAppearance.add("Full");
-
- data = new FormData();
- data.left = new FormAttachment(qualifiedNameAppearance, 0);
- data.top = new FormAttachment(0, 0);
- comboQualifiedNameAppearance.setLayoutData(data);
-
- comboQualifiedNameAppearanceListener = new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- updateSelectedElements();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- };
- comboQualifiedNameAppearance.addSelectionListener(comboQualifiedNameAppearanceListener);
-
- }
-
- // @unused
- public int getQualifiedNamedepth(View view) {
- EAnnotation stereotypeDisplayKind = (view).getEAnnotation(VisualInformationPapyrusConstant.QUALIFIED_NAME);
- if(stereotypeDisplayKind != null) {
- EMap<String, String> entries = stereotypeDisplayKind.getDetails();
-
- if(entries != null) {
- String depthString = entries.get(VisualInformationPapyrusConstant.QUALIFIED_NAME_DEPTH);
- if(depthString != null) {
- Integer i = new Integer(depthString);
- return i.intValue();
- }
- }
- }
- return 0;
- }
-
- /*
- * @see org.eclipse.ui.views.properties.tabbed.view.ITabbedPropertySection#refresh ()
- */
- /**
- * Refresh.
- */
- @Override
- public void refresh() {
- if((!comboQualifiedNameAppearance.isDisposed())) {
-
- comboQualifiedNameAppearance.removeSelectionListener(comboQualifiedNameAppearanceListener);
-
- if(namedElementEditPart != null) {
-
- if((namedElementEditPart.getModel()) != null
- && ((View)(namedElementEditPart.getModel())).getElement() != null) {
-
- org.eclipse.uml2.uml.Element element = (Element)((View)(namedElementEditPart.getModel()))
- .getElement();
-
- if(element instanceof NamedElement) {
-
- comboQualifiedNameAppearance.setEnabled(true);
- // delete all old items
- comboQualifiedNameAppearance.removeAll();
-
- // calculate the max depth of qualified name
- int depth = NamedElementUtil.getQualifiedNameMaxDepth((NamedElement)element);
-
- // build new items
- if(depth != 0) {
- comboQualifiedNameAppearance.add("Full");
- for(int i = 1; i < depth; i++) {
- comboQualifiedNameAppearance.add("-" + i);
- }
- comboQualifiedNameAppearance.add("None");
- } else {// case of root modelElement
- comboQualifiedNameAppearance.add("None");
- }
-
- int qualifiedNameDepth = QualifiedNameHelper
- .getQualifiedNameDepth((EModelElement)(namedElementEditPart.getModel()));
-
- if(depth != 0) {
- if(qualifiedNameDepth == 0) {
- comboQualifiedNameAppearance.setText("Full");
- } else if(qualifiedNameDepth >= depth) {
- comboQualifiedNameAppearance.setText("None");
- } else {
- comboQualifiedNameAppearance.setText("-" + qualifiedNameDepth);
- }
- } else {
- comboQualifiedNameAppearance.setText("None");
- }
-
- } else {
- comboQualifiedNameAppearance.setEnabled(false);
- comboQualifiedNameAppearance.setText("None");
- }
- }
- }
- comboQualifiedNameAppearance.addSelectionListener(comboQualifiedNameAppearanceListener);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- super.dispose();
- if(comboQualifiedNameAppearance != null && !comboQualifiedNameAppearance.isDisposed()) {
- comboQualifiedNameAppearance.removeSelectionListener(comboQualifiedNameAppearanceListener);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Object input = ((IStructuredSelection)selection).getFirstElement();
- // look for modelManager
- if(input instanceof GraphicalEditPart) {
- namedElementEditPart = ((GraphicalEditPart)input);
- // selectionChanged(selection);
- }
- // When the selection is computed from the outline, get the associated
- // editor
- if(part instanceof ContentOutline) {
- IContributedContentsView contributedView = ((IContributedContentsView)((ContentOutline)part)
- .getAdapter(IContributedContentsView.class));
- if(contributedView != null) {
- part = contributedView.getContributingPart();
- }
- }
- if(part instanceof IMultiDiagramEditor) {
- editor = (IMultiDiagramEditor)part;
- editingDomain = getTransactionalEditingDomain(editor);
- } else {
- editingDomain = null;
- }
- }
-
- /**
- * Get the {@link TransactionalEditingDomain} from the {@link IMultiDiagramEditor}.
- * @param editor
- * @return
- */
- private TransactionalEditingDomain getTransactionalEditingDomain(IMultiDiagramEditor editor) {
- try {
- return editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
- } catch (ServiceException e) {
- // TODO Log instead of showing the trace.
- e.printStackTrace();
- return null;
- }
- }
-
- /**
- * Create and execute commands that change the selected elements.
- */
- private void updateSelectedElements() {
-
- IStructuredSelection selection;
-
- if( getSelection() instanceof IStructuredSelection ) {
- selection = (IStructuredSelection)getSelection();
- }
- else {
- return;
- }
-
- // Iterate over selected elements
- CompoundCommand cc = new CompoundCommand();
- List<Object> selectedElements = selection.toList();
- for( Object element : selectedElements) {
-
- if(element instanceof GraphicalEditPart) {
- GraphicalEditPart namedElementEditPart = ((GraphicalEditPart)element);
- // selectionChanged(selection);
-
- String currentQualifiedNameDepth = comboQualifiedNameAppearance.getText();
- String currentQualifiedNameSpec;
-
- if("Full".equals(currentQualifiedNameDepth)) {
- currentQualifiedNameSpec = "0";
- } else if("None".equals(currentQualifiedNameDepth)) {
- NamedElement ne = (NamedElement)((View)namedElementEditPart.getModel()).getElement();
- currentQualifiedNameSpec = "" + NamedElementUtil.getQualifiedNameMaxDepth(ne);
- } else {
- currentQualifiedNameSpec = currentQualifiedNameDepth.substring(1);
- }
-
- int qualifiedNameDepth = Integer.parseInt(currentQualifiedNameSpec);
-
- // Add command
- cc.append(new SetQualifiedNameDepthCommand(editingDomain,((EModelElement)namedElementEditPart.getModel()), qualifiedNameDepth));
- }
-
- }
-
- if(editingDomain != null) {
- editingDomain.getCommandStack().execute( cc.unwrap() );
-
- }
-
- refresh();
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/ShadowAppearanceSection.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/ShadowAppearanceSection.java
deleted file mode 100644
index 4ef65df..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/ShadowAppearanceSection.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.tabbedproperties.appearance;
-
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.uml.tools.utils.ui.command.SetShadowFigureCommand;
-import org.eclipse.papyrus.uml.tools.utils.ui.helper.ShadowFigureHelper;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IContributedContentsView;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The Class QualifiedNameAppearanceSection allow users to customize the display of qualified name.
- */
-public class ShadowAppearanceSection extends AbstractPropertySection {
-
- /**
- * The stereotype appearance.
- */
- private CLabel shadowLabel;
-
- /**
- * The button Gradient appearance.
- */
- private org.eclipse.swt.widgets.Button checboxShadowAppearence;
-
- /**
- * The combo stereotype appearance listener.
- */
- private SelectionListener cheboxShadowAppearanceListener;
-
- private GraphicalEditPart editPart;
-
- private IMultiDiagramEditor editor;
-
- private TransactionalEditingDomain editingDomain;
-
- /**
- * Creates the controls.
- *
- * @param tabbedPropertySheetPage
- * the tabbed property sheet page
- * @param parent
- * the parent
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- super.createControls(parent, tabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- FormData data;
-
- shadowLabel = getWidgetFactory().createCLabel(composite, "Shadow :"); //$NON-NLS-1$
- data = new FormData();
- data.left = new FormAttachment(0, 0);
- shadowLabel.setLayoutData(data);
-
- checboxShadowAppearence = getWidgetFactory().createButton(composite, "", SWT.CHECK);
-
- data = new FormData();
- data.left = new FormAttachment(shadowLabel, 0);
- data.top = new FormAttachment(shadowLabel, 1, SWT.CENTER);
- checboxShadowAppearence.setLayoutData(data);
-
- cheboxShadowAppearanceListener = new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if(editPart != null) {
- if(((View)editPart.getModel()) != null) {
-
- Boolean isChecked = checboxShadowAppearence.getSelection();
-
- // createProperty value
- // updateStereotypeLocationProperty(diagramElement,currentQualifiedNameSpec);
- // command creation
- if(editingDomain != null) {
- editingDomain.getCommandStack().execute(
- new SetShadowFigureCommand(editingDomain, ((EModelElement)editPart.getModel()),
- isChecked));
- }
-
- refresh();
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- };
- checboxShadowAppearence.addSelectionListener(cheboxShadowAppearanceListener);
-
- }
-
- /*
- * @see org.eclipse.ui.views.properties.tabbed.view.ITabbedPropertySection#refresh()
- */
- /**
- * Refresh.
- */
- @Override
- public void refresh() {
- if((!checboxShadowAppearence.isDisposed())) {
-
- checboxShadowAppearence.removeSelectionListener(cheboxShadowAppearanceListener);
-
- if(editPart != null) {
-
- if((editPart.getModel()) != null) {
- checboxShadowAppearence.setSelection(ShadowFigureHelper
- .getShadowFigureValue((EModelElement)editPart.getModel()));
-
- } else {
- checboxShadowAppearence.setEnabled(false);
- }
- }
- }
- checboxShadowAppearence.addSelectionListener(cheboxShadowAppearanceListener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void dispose() {
- super.dispose();
- if(checboxShadowAppearence != null && !checboxShadowAppearence.isDisposed())
- checboxShadowAppearence.removeSelectionListener(cheboxShadowAppearanceListener);
- }
-
- /**
- * {@inheritDoc}
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Object input = ((IStructuredSelection)selection).getFirstElement();
- // look for modelManager
- if(input instanceof GraphicalEditPart) {
- editPart = ((GraphicalEditPart)input);
- // selectionChanged(selection);
- }
- // When the selection is computed from the outline, get the associated editor
- if(part instanceof ContentOutline) {
- IContributedContentsView contributedView = ((IContributedContentsView)((ContentOutline)part)
- .getAdapter(IContributedContentsView.class));
- if(contributedView != null) {
- part = (IWorkbenchPart)contributedView.getContributingPart();
- }
- }
- if(part instanceof IMultiDiagramEditor) {
- editor = (IMultiDiagramEditor)part;
- editingDomain = getTransactionalEditingDomain(editor);
- } else
- editingDomain = null;
- }
-
- /**
- * Get the {@link TransactionalEditingDomain} from the {@link IMultiDiagramEditor}.
- * @param editor
- * @return
- */
- private TransactionalEditingDomain getTransactionalEditingDomain(IMultiDiagramEditor editor) {
- try {
- return editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
- } catch (ServiceException e) {
- // TODO Log instead of showing the trace.
- e.printStackTrace();
- return null;
- }
- }
-
-}
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/messages.properties b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/messages.properties
deleted file mode 100644
index 2130143..0000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.uml.properties.tabbedproperties.appearance/src/org/eclipse/papyrus/uml/properties/tabbedproperties/appearance/messages.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-GradientSection_Button_ActivateGradient=Activate
-GradientSection_Label_FirstColor=Color
-GradientSection_Group_Gradient=Gradient
-GradientSection_Label_Style=Style
-GradientSection_Label_Transparency=Transparency
-GradientSection_Style_Horizontal=Horizontal
-GradientSection_Style_Vertical=Vertical
-MaskManagedLabelSection_Button_SetDefault=Set Default
-MaskManagedLabelSection_Button_ViewPreference=View Preferences \ No newline at end of file