Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java41
1 files changed, 26 insertions, 15 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
index c9cdab8dc61..081a4cbbc95 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,11 +8,13 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
import java.util.List;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.URI;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
@@ -27,25 +29,25 @@ import org.eclipse.swt.widgets.Listener;
* The Generator should also implement an heuristic, which will determine
* for each Property if it should be displayed in the Property view or not,
* for both Single and Multiple selection
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public interface IGenerator {
/**
* Generates the partial context, and persists it to the given target URI
- *
+ *
* @param targetURI
* @return The generated Context
*/
- public List<Context> generate(URI targetURI);
+ public List<Context> generate(List<URI> targetURI);
/**
* Creates the controls for this Generator. The generator is responsible
* for displaying any Control useful for editing its options, and listening
* for changes on them.
- *
+ *
* @param parent
* The Composite in which the controls will be displayed
*/
@@ -53,21 +55,21 @@ public interface IGenerator {
/**
* Gets the description for this Generator
- *
+ *
* @return The description
*/
public String getDescription();
/**
* Tests if this Generator's settings are all set and valid
- *
+ *
* @return true if all options are set and valid
*/
public boolean isReady();
/**
* Gets the name for this Generator
- *
+ *
* @return The name
*/
public String getName();
@@ -75,7 +77,7 @@ public interface IGenerator {
/**
* Tests if a field should be displayed for this Property when
* exactly one instance of this property's parent element is selected.
- *
+ *
* @param property
* @return
*/
@@ -84,7 +86,7 @@ public interface IGenerator {
/**
* Tests if a field should be displayed for this Property when
* at least two instances of this property's parent element are selected.
- *
+ *
* @param property
* @return
*/
@@ -95,7 +97,7 @@ public interface IGenerator {
* exactly one instance of the given element is selected. The difference
* with {@link #isSelectedSingle(Property)} is that this method takes the inheritance
* into account, i.e. the property belongs to a Superclass of the given DataContextElement
- *
+ *
* @param property
* @param element
* @return
@@ -107,7 +109,7 @@ public interface IGenerator {
* at least two instances of the given element are selected. The difference
* with {@link #isSelectedMultiple(Property)} is that this method takes the inheritance
* into account, i.e. the property belongs to a Superclass of the given DataContextElement
- *
+ *
* @param property
* @param element
* @return
@@ -117,15 +119,24 @@ public interface IGenerator {
/**
* Adds a Change Listener to this generator. The Listener should be notified
* each time the generator's {@link #isReady()} value changes
- *
+ *
* @param listener
*/
public void addListener(Listener listener);
/**
* Removes a Change Listener from this generator.
- *
+ *
* @param listener
*/
public void removeListener(Listener listener);
+
+ public List<Object> getExternalReference();
+
+ public IObservableValue getObservableValue();
+
+ public void setStrategy(int strategy);
+
+ public void addCheckElement(Object obj);
+
}

Back to the top