Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.runtime/src/org/eclipse/papyrus/views/properties/runtime/propertyeditor/CreatePropertyEditorOperation.java')
-rw-r--r--deprecated/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.runtime/src/org/eclipse/papyrus/views/properties/runtime/propertyeditor/CreatePropertyEditorOperation.java83
1 files changed, 0 insertions, 83 deletions
diff --git a/deprecated/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.runtime/src/org/eclipse/papyrus/views/properties/runtime/propertyeditor/CreatePropertyEditorOperation.java b/deprecated/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.runtime/src/org/eclipse/papyrus/views/properties/runtime/propertyeditor/CreatePropertyEditorOperation.java
deleted file mode 100644
index c91653d004c..00000000000
--- a/deprecated/deprecated-plugins/core.deprecated/org.eclipse.papyrus.views.properties.runtime/src/org/eclipse/papyrus/views/properties/runtime/propertyeditor/CreatePropertyEditorOperation.java
+++ /dev/null
@@ -1,83 +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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.views.properties.runtime.propertyeditor;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.core.service.IProvider;
-import org.eclipse.papyrus.views.properties.runtime.Activator;
-import org.eclipse.papyrus.views.properties.runtime.controller.PropertyEditorController;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * Operation that creates an {@link AbstractPropertyEditor} from a provider
- */
-public class CreatePropertyEditorOperation implements IOperation {
-
- /** parent composite for the created widgets */
- protected Composite parent;
-
- /** identifier of the specific editor to find */
- protected final String editorIdentifier;
-
- /** indicates if the property to edit is multi-valued */
- protected final boolean multiValue;
-
- /** controller which requires the property editor creation */
- protected PropertyEditorController controller;
-
- /**
- * Constructor.
- *
- * @param controller
- * the controller that manages the created editor
- * @param id
- * the identifier of the editor to find
- */
- public CreatePropertyEditorOperation(PropertyEditorController controller, String id) {
- this.controller = controller;
- this.editorIdentifier = id;
- this.multiValue = false;
- }
-
- /**
- * {@inheritDoc}
- */
- public AbstractPropertyEditor execute(IProvider provider) {
- if(provider instanceof PropertyEditorProvider) {
- AbstractPropertyEditor editor = ((PropertyEditorProvider)provider).createPropertyEditor(editorIdentifier, controller);
- return editor;
- } else {
- Activator.log.error("CreatePropertyEditorOperation should execute on a PropertyEditorProvider", null);
- }
- return null;
- }
-
- /**
- * Returns the identifier of the specific editor to find
- *
- * @return the identifier of the specific editor to find. It can be <code>null</code>. In this case, feature should not be <code>null</code>
- */
- public String getEditorIdentifier() {
- return editorIdentifier;
- }
-
- /**
- * Returns <code>true</code> if the property to edit is multi-valued
- *
- * @return <code>true</code> if the property to edit is multi-valued
- */
- public boolean isMultiValue() {
- return multiValue;
- }
-
-}

Back to the top