Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-05-18 19:12:35 +0000
committeratikhomirov2006-05-18 19:12:35 +0000
commit84334f4ce186342282cb5820893a3b233ced9e92 (patch)
tree7d8cc70605c5360a810de379977329dc5bf6191b /plugins/org.eclipse.gmf.graphdef.codegen/templates
parent9eb98b387e47a29dfcb876ab93bc87a2e85080cd (diff)
downloadorg.eclipse.gmf-tooling-84334f4ce186342282cb5820893a3b233ced9e92.tar.gz
org.eclipse.gmf-tooling-84334f4ce186342282cb5820893a3b233ced9e92.tar.xz
org.eclipse.gmf-tooling-84334f4ce186342282cb5820893a3b233ced9e92.zip
Emitter became top-level entity (TextEmitter), oddness of JetAdapter and Emitter api were cleared.
GeneratorBase lost knowledge about JET. Parts of gmf.common made internal to avoid possible API issues. ImportAssistant refactored to know name of compilation unit to avoid problems like #134506. FigureGenerator's reuse of ImportAssistant removed. [mgolubev] Tests for #134506 and 142553
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/Plugin.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/manifest.mfjet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet3
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet3
4 files changed, 7 insertions, 3 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/Plugin.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/Plugin.javajet
index 42709b1f0..bcfa05018 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/Plugin.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/Plugin.javajet
@@ -25,7 +25,7 @@ import org.osgi.framework.BundleContext;
/**
* @generated
*/
-public class <%=config.getPluginActivatorClassName()%> extends Plugin {
+public class <%=importManager.getCompilationUnitName()%> extends Plugin {
<%
if (config.needsMapMode()){
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/manifest.mfjet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/manifest.mfjet
index e5d01d982..8b9fd5290 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/manifest.mfjet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/plugin/manifest.mfjet
@@ -32,7 +32,9 @@ Bundle-Activator: <%=config.getPluginActivatorPackageName()%>.<%=config.getPlugi
Bundle-Localization: plugin
<%
HashSet exportedPackages = new HashSet();
+ if (config.getMainPackageName() != null && config.getMainPackageName().trim().length() > 0) {
exportedPackages.add(config.getMainPackageName());
+ }
exportedPackages.add(config.getPluginActivatorPackageName());
%>
Export-Package: <%=listComposer.composeList(exportedPackages)%>
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
index 484a3eff1..b84b34cef 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Figure.javajet
@@ -7,13 +7,14 @@ final ImportAssistant importManager = (ImportAssistant) args[1];
final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
+<%importManager.emitPackageStatement(stringBuffer);%>
<%importManager.markImportLocation(stringBuffer);%>
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
+public class <%=importManager.getCompilationUnitName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
index ee087cb92..3ee0477b8 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/PolylineConnection.javajet
@@ -7,13 +7,14 @@ final ImportAssistant importManager = (ImportAssistant) args[1];
final FigureQualifiedNameSwitch fqnSwitch = (FigureQualifiedNameSwitch) args[2];
final GraphDefDispatcher dispatcher = (GraphDefDispatcher) args[3];
%>
+<%importManager.emitPackageStatement(stringBuffer);%>
<%importManager.markImportLocation(stringBuffer);%>
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
+public class <%=importManager.getCompilationUnitName()%> extends <%=fqnSwitch.get(figure, importManager)%> {
/**
* @generated

Back to the top