Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/Application.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/Application.xpt51
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/Application.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/Application.xpt
new file mode 100644
index 000000000..0543e7b46
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/Application.xpt
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2006 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:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2008/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+
+«DEFINE Application FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «className» implements org.eclipse.equinox.app.IApplication {
+
+«EXPAND run-»
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public void stop() {
+ }
+«EXPAND additions-»
+}
+«ENDDEFINE»
+
+«DEFINE run FOR gmfgen::GenApplication-»
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ public Object start(org.eclipse.equinox.app.IApplicationContext context) throws Exception {
+ org.eclipse.swt.widgets.Display display = org.eclipse.ui.PlatformUI.createDisplay();
+ try {
+ int returnCode = org.eclipse.ui.PlatformUI.createAndRunWorkbench(display,
+ new «getWorkbenchAdvisorQualifiedClassName()»());
+ if (returnCode == org.eclipse.ui.PlatformUI.RETURN_RESTART) {
+ return org.eclipse.equinox.app.IApplication.EXIT_RESTART;
+ }
+ return org.eclipse.equinox.app.IApplication.EXIT_OK;
+ } finally {
+ display.dispose();
+ }
+ }
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»

Back to the top