Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java82
1 files changed, 8 insertions, 74 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java
index 0bca49b3326..8b9fde6609f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/preferences/PriorityEditorEditingSupport.java
@@ -1,6 +1,6 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST and others.
- *
+ * Copyright (c) 2015, 2018 CEA LIST and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,33 +10,23 @@
*
* Contributors:
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
- *
+ * Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Bug 533667
+ *
*****************************************************************************/
package org.eclipse.papyrus.extensionpoints.editors.preferences;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.papyrus.extensionpoints.editors.definition.IDirectEditorConfigurationIds;
-import org.eclipse.papyrus.extensionpoints.editors.definition.IDirectEditorExtensionPoint;
/**
* Editing Support for cell of Priority editor.
- *
+ *
* @author Gabriel Pascual
*
+ * @deprecated since 3.1. Use {@link org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.preferences.PriorityEditorEditingSupport} instead.
*/
-public class PriorityEditorEditingSupport extends EditingSupport {
-
- /** The Constant priorityItems. */
- private static final String[] priorityItems = new String[] { IDirectEditorConfigurationIds.PRIORITY_HIGHEST,
- IDirectEditorConfigurationIds.PRIORITY_HIGH, IDirectEditorConfigurationIds.PRIORITY_MEDIUM,
- IDirectEditorConfigurationIds.PRIORITY_LOW, IDirectEditorConfigurationIds.PRIORITY_LOWEST };
-
- /** The cell editor. */
- private CellEditor cellEditor;
+@Deprecated
+public class PriorityEditorEditingSupport extends org.eclipse.papyrus.infra.gmfdiag.extensionpoints.editors.preferences.PriorityEditorEditingSupport {
/**
* Constructor.
@@ -46,61 +36,5 @@ public class PriorityEditorEditingSupport extends EditingSupport {
*/
public PriorityEditorEditingSupport(TableViewer viewer) {
super(viewer);
-
- cellEditor = new ComboBoxCellEditor(viewer.getTable(), priorityItems);
}
-
- /**
- * @see org.eclipse.jface.viewers.EditingSupport#setValue(java.lang.Object, java.lang.Object)
- *
- * @param element
- * @param value
- */
- @Override
- protected void setValue(Object element, Object value) {
- if (element instanceof IDirectEditorExtensionPoint) {
- ((IDirectEditorExtensionPoint) element).setPriority((Integer) value);
- getViewer().refresh();
- }
- }
-
- /**
- * @see org.eclipse.jface.viewers.EditingSupport#getValue(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- protected Object getValue(Object element) {
- Object value = 0;
- if (element instanceof IDirectEditorExtensionPoint) {
- value = ((IDirectEditorExtensionPoint) element).getPriority();
- }
- return value;
- }
-
- /**
- * @see org.eclipse.jface.viewers.EditingSupport#getCellEditor(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- /**
- * @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- protected boolean canEdit(Object element) {
- return element instanceof IDirectEditorExtensionPoint;
-
- }
-
-
}

Back to the top