Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2007-04-18 13:03:15 -0400
committeratikhomirov2007-04-18 13:03:15 -0400
commit3c432fae4429b2dcab4f6ea32dd80b471f7a1d07 (patch)
tree646013a3497313934afb409ebae507158344e458
parentc1dfa267d35d8e3f9d32c98cafa5a5431bc29456 (diff)
downloadorg.eclipse.gmf-tooling-3c432fae4429b2dcab4f6ea32dd80b471f7a1d07.tar.gz
org.eclipse.gmf-tooling-3c432fae4429b2dcab4f6ea32dd80b471f7a1d07.tar.xz
org.eclipse.gmf-tooling-3c432fae4429b2dcab4f6ea32dd80b471f7a1d07.zip
no reason to generate empty edithelper advices unless we do generate some meaningful code within. Those willing to get empty classes generated can specify advice class name in the model
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/naming/gen/GenNamingMediatorImpl.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/naming/gen/GenNamingMediatorImpl.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/naming/gen/GenNamingMediatorImpl.java
index fc923a54a..f9709c6cd 100644
--- a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/naming/gen/GenNamingMediatorImpl.java
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/naming/gen/GenNamingMediatorImpl.java
@@ -37,12 +37,12 @@ import org.eclipse.gmf.internal.common.NamesDispenser;
*/
public class GenNamingMediatorImpl implements GenNamingMediator {
- private static final GMFGenPackage M = GMFGenPackage.eINSTANCE;
-
public static final int COLLECT_NAMES_MODE = 0;
public static final int DISPENSE_NAMES_MODE = 1;
+ private final GMFGenPackage M = GMFGenPackage.eINSTANCE;
+
private int mode;
private NamesDispenser dispenser;
@@ -175,9 +175,13 @@ public class GenNamingMediatorImpl implements GenNamingMediator {
if (element.getElementType() instanceof MetamodelType) {
MetamodelType type = (MetamodelType) element.getElementType();
feedName(type, M.getMetamodelType_EditHelperClassName(), getEditHelper(), element);
- } else if (element.getElementType() instanceof SpecializationType) {
- SpecializationType type = (SpecializationType) element.getElementType();
- feedName(type, M.getSpecializationType_EditHelperAdviceClassName(), getEditHelperAdvice(), element);
+// } else if (element.getElementType() instanceof SpecializationType) {
+// /*
+// * Uncoment once we generate anything reasonable in the advice's body;
+// * otherwise no reason to generate empty class
+// */
+// SpecializationType type = (SpecializationType) element.getElementType();
+// feedName(type, M.getSpecializationType_EditHelperAdviceClassName(), getEditHelperAdvice(), element);
}
}

Back to the top