Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-05-24 10:57:46 -0400
committeratikhomirov2006-05-24 10:57:46 -0400
commiteec7a0123f6dc5f7f13077d7a13c0d5a710921e2 (patch)
tree596185d134ef11af893c1c4e19e19ce3f8d681a2 /plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal
parent0d7968b21287de8549ed0d89261b157435830069 (diff)
downloadorg.eclipse.gmf-tooling-eec7a0123f6dc5f7f13077d7a13c0d5a710921e2.tar.gz
org.eclipse.gmf-tooling-eec7a0123f6dc5f7f13077d7a13c0d5a710921e2.tar.xz
org.eclipse.gmf-tooling-eec7a0123f6dc5f7f13077d7a13c0d5a710921e2.zip
get rid of bogus config passing into ConverterOutcome
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java4
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryMirrorProcessor.java14
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryProcessor.java3
3 files changed, 15 insertions, 6 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
index 9a3a3f5f1..c70f5fbc8 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.gmfgraph.FigureAccessor;
import org.eclipse.gmf.gmfgraph.FigureGallery;
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
import org.eclipse.gmf.gmfgraph.Node;
+import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Config;
import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Processor;
import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.ProcessorCallback;
@@ -45,10 +46,11 @@ public class CanvasProcessor extends Processor {
return myOutcome;
}
- public void go(ProcessorCallback callback) throws InterruptedException {
+ public void go(ProcessorCallback callback, Config config) throws InterruptedException {
myCallback = callback;
myOutcomeGallery = GMFGraphFactory.eINSTANCE.createFigureGallery();
myOutcomeGallery.setName(myInput.getFigures().size() == 1 ? ((FigureGallery) myInput.getFigures().get(0)).getName() : "GeneratedGallery");
+ myOutcomeGallery.setImplementationBundle(config.getPluginID());
handleNodes();
handleLinks();
handleCompartments();
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryMirrorProcessor.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryMirrorProcessor.java
index 6730f8864..92f03b99d 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryMirrorProcessor.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryMirrorProcessor.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.gmfgraph.Figure;
import org.eclipse.gmf.gmfgraph.FigureGallery;
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Config;
+import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.ProcessorCallback;
/**
* In addition to {@link GalleryProcessor} activities, collects names of transformed figures and
@@ -29,24 +30,29 @@ import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Config;
*/
public class GalleryMirrorProcessor extends GalleryProcessor {
private final GenerationInfoImpl myGenerationInfo;
+ private String myGeneratedBundle;
public GalleryMirrorProcessor(FigureGallery[] input) {
super(input);
myGenerationInfo = new GenerationInfoImpl();
}
- public FigureGallery convertFigureGallery(Config config){
+ public void go(ProcessorCallback callback, Config config) throws InterruptedException {
+ super.go(callback, config);
+ myGeneratedBundle = config.getPluginID();
+ }
+
+ public FigureGallery convertFigureGallery(){
FigureGallery result = GMFGraphFactory.eINSTANCE.createFigureGallery();
- String generatedBundle = config.getPluginID();
result.setName("GeneratedGallery"); // FIXME smth reasonable
- result.setImplementationBundle(generatedBundle);
+ result.setImplementationBundle(myGeneratedBundle);
for (Enumeration originalFigures = myGenerationInfo.getProcessedFigures(); originalFigures.hasMoreElements();){
Figure nextOriginal = (Figure) originalFigures.nextElement();
String nextConvertedFqn = myGenerationInfo.getGeneratedClassFQN(nextOriginal);
CustomFigure custom = DiagramElementsCopier.createCustomFigure(nextOriginal);
custom.setName(nextOriginal.getName());
- custom.setBundleName(generatedBundle);
+ custom.setBundleName(myGeneratedBundle);
custom.setQualifiedClassName(nextConvertedFqn);
result.getFigures().add(custom);
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryProcessor.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryProcessor.java
index 4ece43f43..9ec4980fa 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryProcessor.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/GalleryProcessor.java
@@ -18,6 +18,7 @@ import java.util.Iterator;
import org.eclipse.gmf.gmfgraph.Figure;
import org.eclipse.gmf.gmfgraph.FigureGallery;
import org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch;
+import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Config;
import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.Processor;
import org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.ProcessorCallback;
@@ -37,7 +38,7 @@ public class GalleryProcessor extends Processor {
myInput = input;
}
- public void go(ProcessorCallback callback) throws InterruptedException {
+ public void go(ProcessorCallback callback, Config config) throws InterruptedException {
for (int i = 0; i < myInput.length; i++) {
for (Iterator it = myInput[i].getFigures().iterator(); it.hasNext();) {
Figure next = (Figure) it.next();

Back to the top