Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt64
1 files changed, 64 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt
new file mode 100644
index 000000000..008477657
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2008 Borland Software Corporation
+ *
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Artem Tikhomirov (Borland) - [244419] custom parsers
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
+
+«DEFINE Main FOR gmfgen::CustomParser»
+«EXPAND xpt::Common::copyright FOR holder.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedName»
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND body»
+«EXPAND additions»
+}
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::CustomParser»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::CustomParser»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::CustomParser» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParser«ENDDEFINE»
+
+«DEFINE body FOR gmfgen::CustomParser»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public String getEditString(org.eclipse.core.runtime.IAdaptable element, int flags) {
+ return "";
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus isValidEditString(org.eclipse.core.runtime.IAdaptable element, String editString) {
+ // TODO change to EDITABLE_STATUS as appropriate
+ return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.UNEDITABLE_STATUS;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public org.eclipse.gmf.runtime.common.core.command.ICommand getParseCommand(org.eclipse.core.runtime.IAdaptable element, String newString, int flags) {
+ // TODO
+ throw new UnsupportedOperationException();
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public String getPrintString(org.eclipse.core.runtime.IAdaptable element, int flags) {
+ return "";
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public boolean isAffectingEvent(Object event, int flags) {
+ return false;
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public org.eclipse.jface.text.contentassist.IContentAssistProcessor getCompletionProcessor(org.eclipse.core.runtime.IAdaptable element) {
+ return null;
+ }
+«ENDDEFINE» \ No newline at end of file

Back to the top