Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2007-04-17 06:12:45 -0400
committerdstadnik2007-04-17 06:12:45 -0400
commitacf539507bdbb4aad82e59b0134bec09f6baf646 (patch)
tree1d45825118de05760d48892e03c02241ec2e87bd
parent928c4a8912adee0997fec951e3ff0cb710adfe02 (diff)
downloadorg.eclipse.gmf-tooling-acf539507bdbb4aad82e59b0134bec09f6baf646.tar.gz
org.eclipse.gmf-tooling-acf539507bdbb4aad82e59b0134bec09f6baf646.tar.xz
org.eclipse.gmf-tooling-acf539507bdbb4aad82e59b0134bec09f6baf646.zip
override correct methods
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeatureParserGenerator.java2
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeaturesParserGenerator.java2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeatureParser.javajet2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeaturesParser.javajet2
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeatureParserGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeatureParserGenerator.java
index 0f02e7977..32179a99e 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeatureParserGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeatureParserGenerator.java
@@ -22,7 +22,7 @@ public class StructuralFeatureParserGenerator
protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_6 = " extends ";
protected final String TEXT_7 = " {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final MessageFormat DEFAULT_PROCESSOR = new MessageFormat(\"{0}\"); //$NON-NLS-1$" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate EStructuralFeature feature;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_8 = "(EStructuralFeature feature) {" + NL + "\t\tthis.feature = feature;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MessageFormat getViewProcessor() {" + NL + "\t\tMessageFormat processor = super.getViewProcessor();" + NL + "\t\treturn processor == null ? DEFAULT_PROCESSOR : processor;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MessageFormat getEditProcessor() {" + NL + "\t\tMessageFormat processor = super.getEditProcessor();" + NL + "\t\treturn processor == null ? DEFAULT_PROCESSOR : processor;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EObject getDomainElement(EObject element) {" + NL + "\t\treturn element;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\telement = getDomainElement(element);" + NL + "\t\treturn getStringByPattern(element, feature, processor);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(EObject element, EStructuralFeature feature, MessageFormat processor) {" + NL + "\t\tObject value = element == null ? null : element.eGet(feature);" + NL + "\t\tvalue = getValidValue(feature, value);" + NL + "\t\treturn processor.format(new Object[] { value }, new StringBuffer(), new FieldPosition(0)).toString();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IParserEditStatus validateValues(Object[] values) {" + NL + "\t\tif (values.length > 1) {" + NL + "\t\t\treturn ParserEditStatus.UNEDITABLE_STATUS;" + NL + "\t\t}" + NL + "\t\tObject value = values.length == 1 ? values[0] : null;" + NL + "\t\tvalue = getValidNewValue(feature, value);" + NL + "\t\tif (value instanceof InvalidValue) {" + NL + "\t\t\treturn new ParserEditStatus(";
+ protected final String TEXT_8 = "(EStructuralFeature feature) {" + NL + "\t\tthis.feature = feature;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MessageFormat getViewProcessor() {" + NL + "\t\tMessageFormat processor = super.getViewProcessor();" + NL + "\t\treturn processor == null ? DEFAULT_PROCESSOR : processor;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected MessageFormat getEditProcessor() {" + NL + "\t\tMessageFormat processor = super.getEditProcessor();" + NL + "\t\treturn processor == null ? DEFAULT_PROCESSOR : processor;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EObject getDomainElement(EObject element) {" + NL + "\t\treturn element;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\telement = getDomainElement(element);" + NL + "\t\treturn getStringByPattern(element, feature, processor);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(EObject element, EStructuralFeature feature, MessageFormat processor) {" + NL + "\t\tObject value = element == null ? null : element.eGet(feature);" + NL + "\t\tvalue = getValidValue(feature, value);" + NL + "\t\treturn processor.format(new Object[] { value }, new StringBuffer(), new FieldPosition(0)).toString();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IParserEditStatus validateNewValues(Object[] values) {" + NL + "\t\tif (values.length > 1) {" + NL + "\t\t\treturn ParserEditStatus.UNEDITABLE_STATUS;" + NL + "\t\t}" + NL + "\t\tObject value = values.length == 1 ? values[0] : null;" + NL + "\t\tvalue = getValidNewValue(feature, value);" + NL + "\t\tif (value instanceof InvalidValue) {" + NL + "\t\t\treturn new ParserEditStatus(";
protected final String TEXT_9 = ".ID," + NL + "\t\t\t\tIParserEditStatus.UNEDITABLE, value.toString());" + NL + "\t\t}" + NL + "\t\treturn ParserEditStatus.EDITABLE_STATUS;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ICommand getParseCommand(IAdaptable adapter, Object[] values) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\telement = getDomainElement(element);" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t}" + NL + "\t\tTransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);" + NL + "\t\tif (editingDomain == null) {" + NL + "\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t}" + NL + "\t\tObject value = values.length == 1 ? values[0] : null;" + NL + "\t\tICommand command = getModificationCommand(element, feature, value);" + NL + "\t\treturn new CompositeTransactionalCommand(editingDomain, command.getLabel(), Collections.singletonList(command));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isAffectingEvent(Object event, int flags) {" + NL + "\t\tif (event instanceof Notification) {" + NL + "\t\t\treturn isAffectingFeature(((Notification) event).getFeature());" + NL + "\t\t}" + NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isAffectingFeature(Object eventFeature) {" + NL + "\t\treturn feature == eventFeature;" + NL + "\t}" + NL + "}";
protected final String TEXT_10 = NL;
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeaturesParserGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeaturesParserGenerator.java
index af2ea7ee1..ac74e02a8 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeaturesParserGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/StructuralFeaturesParserGenerator.java
@@ -22,7 +22,7 @@ public class StructuralFeaturesParserGenerator
protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_6 = " extends ";
protected final String TEXT_7 = " {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate List features;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_8 = "(List features) {" + NL + "\t\tthis.features = features;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\tList values = new ArrayList(features.size());" + NL + "\t\tfor (Iterator it = features.iterator(); it.hasNext();) {" + NL + "\t\t\tEStructuralFeature feature = (EStructuralFeature) it.next();" + NL + "\t\t\tObject value = element.eGet(feature);" + NL + "\t\t\tvalue = getValidValue(feature, value);" + NL + "\t\t\tvalues.add(value);" + NL + "\t\t}" + NL + "\t\treturn processor.format(values.toArray(new Object[values.size()]), new StringBuffer(), new FieldPosition(0)).toString();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IParserEditStatus validateValues(Object[] values) {" + NL + "\t\tif (values.length != features.size()) {" + NL + "\t\t\treturn ParserEditStatus.UNEDITABLE_STATUS;" + NL + "\t\t}" + NL + "\t\tfor (int i = 0; i < values.length; i++) {" + NL + "\t\t\tObject value = getValidNewValue((EStructuralFeature) features.get(i), values[i]);" + NL + "\t\t\tif (value instanceof InvalidValue) {" + NL + "\t\t\t\treturn new ParserEditStatus(";
+ protected final String TEXT_8 = "(List features) {" + NL + "\t\tthis.features = features;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\tList values = new ArrayList(features.size());" + NL + "\t\tfor (Iterator it = features.iterator(); it.hasNext();) {" + NL + "\t\t\tEStructuralFeature feature = (EStructuralFeature) it.next();" + NL + "\t\t\tObject value = element.eGet(feature);" + NL + "\t\t\tvalue = getValidValue(feature, value);" + NL + "\t\t\tvalues.add(value);" + NL + "\t\t}" + NL + "\t\treturn processor.format(values.toArray(new Object[values.size()]), new StringBuffer(), new FieldPosition(0)).toString();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IParserEditStatus validateNewValues(Object[] values) {" + NL + "\t\tif (values.length != features.size()) {" + NL + "\t\t\treturn ParserEditStatus.UNEDITABLE_STATUS;" + NL + "\t\t}" + NL + "\t\tfor (int i = 0; i < values.length; i++) {" + NL + "\t\t\tObject value = getValidNewValue((EStructuralFeature) features.get(i), values[i]);" + NL + "\t\t\tif (value instanceof InvalidValue) {" + NL + "\t\t\t\treturn new ParserEditStatus(";
protected final String TEXT_9 = ".ID," + NL + "\t\t\t\t\tIParserEditStatus.UNEDITABLE, value.toString());" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn ParserEditStatus.EDITABLE_STATUS;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ICommand getParseCommand(IAdaptable adapter, Object[] values) {" + NL + "\t\tEObject element = (EObject) adapter.getAdapter(EObject.class);" + NL + "\t\tif (element == null) {" + NL + "\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t}" + NL + "\t\tTransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element);" + NL + "\t\tif (editingDomain == null) {" + NL + "\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t}" + NL + "\t\tCompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, \"Set Values\"); //$NON-NLS-1$" + NL + "\t\tfor (int i = 0; i < values.length; i++) {" + NL + "\t\t\tEStructuralFeature feature = (EStructuralFeature) features.get(i);" + NL + "\t\t\tcommand.compose(getModificationCommand(element, feature, values[i]));" + NL + "\t\t}" + NL + "\t\treturn command;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isAffectingEvent(Object event, int flags) {" + NL + "\t\tif (event instanceof Notification) {" + NL + "\t\t\tObject feature = ((Notification) event).getFeature();" + NL + "\t\t\tif (features.contains(feature)) {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn false;" + NL + "\t}" + NL + "}";
protected final String TEXT_10 = NL;
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeatureParser.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeatureParser.javajet
index 3b6491316..147bc399a 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeatureParser.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeatureParser.javajet
@@ -90,7 +90,7 @@ public class <%=genDiagram.getStructuralFeatureParserClassName()%> extends <%=im
/**
* @generated
*/
- protected IParserEditStatus validateValues(Object[] values) {
+ protected IParserEditStatus validateNewValues(Object[] values) {
if (values.length > 1) {
return ParserEditStatus.UNEDITABLE_STATUS;
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeaturesParser.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeaturesParser.javajet
index 5ee55657c..79b11c733 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeaturesParser.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/StructuralFeaturesParser.javajet
@@ -61,7 +61,7 @@ public class <%=genDiagram.getStructuralFeaturesParserClassName()%> extends <%=i
/**
* @generated
*/
- protected IParserEditStatus validateValues(Object[] values) {
+ protected IParserEditStatus validateNewValues(Object[] values) {
if (values.length != features.size()) {
return ParserEditStatus.UNEDITABLE_STATUS;
}

Back to the top