Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Davis2012-09-13 17:51:44 +0000
committerMatthew Davis2012-09-13 17:51:44 +0000
commit482e800710b1d27e99073c53bce1f1609a994bd3 (patch)
treea38cf3c4e933575e3443a9a2468887f9d2f74ad4
parentefed907e4a1d9b91ab1d5ae7bab59927bc2b7282 (diff)
downloadorg.eclipse.stem-482e800710b1d27e99073c53bce1f1609a994bd3.tar.gz
org.eclipse.stem-482e800710b1d27e99073c53bce1f1609a994bd3.tar.xz
org.eclipse.stem-482e800710b1d27e99073c53bce1f1609a994bd3.zip
Various fixes and cleanups
git-svn-id: http://dev.eclipse.org/svnroot/technology/org.eclipse.stem/trunk@3373 92a21009-5b66-0410-b83a-dc787c41c6e9
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/BuildProperties_.java96
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF_.java113
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PluginXML_.java421
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor_.java)195
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter_.java)6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory_.java)6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory_.java)6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory_.java)6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages_.java)6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties.java (renamed from developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties_.java)11
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/BuildProperties_.java93
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/Class_.java209
-rwxr-xr-xdeveloper_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/stem/model/codegen/STEMGenClass.java64
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/PropertyEditor.javajet6
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/WizardMessages.propertiesjet4
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/model/Class.javajet3
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.transform/src/org/eclipse/stem/model/transform/EPackageManager.java1
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/metamodel/presentation/MetamodelActionBarContributor.java4
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/views/ModelPackageView.java4
-rw-r--r--developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/wizards/ModelGeneratorWizard.java5
20 files changed, 307 insertions, 952 deletions
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/BuildProperties_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/BuildProperties_.java
deleted file mode 100644
index e51bacf65..000000000
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/BuildProperties_.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.eclipse.emf.codegen.ecore.templates.editor;
-
-import org.eclipse.emf.codegen.ecore.genmodel.*;
-import java.util.*;
-
-public class BuildProperties_
-{
- protected static String nl;
- public static synchronized BuildProperties_ create(String lineSeparator)
- {
- nl = lineSeparator;
- BuildProperties_ result = new BuildProperties_();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "# ";
- protected final String TEXT_2 = NL + "# <copyright>" + NL + "# </copyright>" + NL + "#" + NL + "# ";
- protected final String TEXT_3 = "Id";
- protected final String TEXT_4 = NL + NL + "bin.includes = ";
- protected final String TEXT_5 = ",\\" + NL + " icons/,\\";
- protected final String TEXT_6 = NL + " META-INF/,\\";
- protected final String TEXT_7 = NL + " plugin.xml,\\";
- protected final String TEXT_8 = NL + " plugin.properties" + NL + "jars.compile.order = ";
- protected final String TEXT_9 = NL + "source.";
- protected final String TEXT_10 = " = ";
- protected final String TEXT_11 = NL + "output.";
- protected final String TEXT_12 = " = ";
- protected final String TEXT_13 = "bin";
- protected final String TEXT_14 = "war/WEB-INF/classes";
- protected final String TEXT_15 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2008 IBM Corporation and others.
- * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-
- GenModel genModel = (GenModel)argument;
- String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getEditorPluginID()+".jar" : ".";
- List<String> sourceFolders = genModel.getEditorSourceFolders();
- {GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;
- if (copyrightHolder != null && copyrightHolder.hasCopyright()) {
- stringBuffer.append(TEXT_1);
- stringBuffer.append(copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer)));
- } else {
- stringBuffer.append(TEXT_2);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_3);
- stringBuffer.append("$");
- }}
- stringBuffer.append(TEXT_4);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_5);
- if (genModel.isBundleManifest()) {
- stringBuffer.append(TEXT_6);
- }
- if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {
- stringBuffer.append(TEXT_7);
- }
- stringBuffer.append(TEXT_8);
- stringBuffer.append(pluginClassesLocation);
- boolean first=true; for (Iterator<String> i = sourceFolders.iterator(); i.hasNext();) { String sourceFolder = i.next(); if (i.hasNext()){sourceFolder +=",\\";} if (first) {
- stringBuffer.append(TEXT_9);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_10);
- stringBuffer.append(sourceFolder);
- first=false;} else {
- stringBuffer.append(sourceFolder);
- }}
- stringBuffer.append(TEXT_11);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_12);
- if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {
- stringBuffer.append(TEXT_13);
- } else {
- stringBuffer.append(TEXT_14);
- }
- stringBuffer.append(TEXT_15);
- return stringBuffer.toString();
- }
-}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF_.java
deleted file mode 100644
index 5453d7540..000000000
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/ManifestMF_.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.emf.codegen.ecore.templates.editor;
-
-import java.util.*;
-import org.eclipse.stem.model.codegen.*;
-import org.eclipse.emf.codegen.ecore.genmodel.*;
-
-public class ManifestMF_
-{
- protected static String nl;
- public static synchronized ManifestMF_ create(String lineSeparator)
- {
- nl = lineSeparator;
- ManifestMF_ result = new ManifestMF_();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "Manifest-Version: 1.0" + NL + "Bundle-ManifestVersion: 2" + NL + "Bundle-Name: %pluginName" + NL + "Bundle-SymbolicName: ";
- protected final String TEXT_2 = ";singleton:=true" + NL + "Bundle-Version: 1.0.0.qualifier" + NL + "Bundle-ClassPath: ";
- protected final String TEXT_3 = ".jar";
- protected final String TEXT_4 = ".";
- protected final String TEXT_5 = NL + "Bundle-Activator: ";
- protected final String TEXT_6 = "$Implementation";
- protected final String TEXT_7 = NL + "Bundle-Vendor: %providerName" + NL + "Bundle-Localization: plugin";
- protected final String TEXT_8 = NL + "Bundle-RequiredExecutionEnvironment: J2SE-1.5";
- protected final String TEXT_9 = NL + "Bundle-RequiredExecutionEnvironment: JavaSE-1.6";
- protected final String TEXT_10 = NL + "Export-Package: ";
- protected final String TEXT_11 = ",";
- protected final String TEXT_12 = NL + " ";
- protected final String TEXT_13 = NL + "Require-Bundle: ";
- protected final String TEXT_14 = ";visibility:=reexport";
- protected final String TEXT_15 = ",";
- protected final String TEXT_16 = NL + " ";
- protected final String TEXT_17 = ";visibility:=reexport";
- protected final String TEXT_18 = NL + "Import-Package: org.eclipse.emf.common.ui," + NL + " org.eclipse.emf.common.ui.action," + NL + " org.eclipse.emf.common.ui.dialogs," + NL + " org.eclipse.emf.common.ui.editor," + NL + " org.eclipse.emf.common.ui.viewer," + NL + " org.eclipse.emf.edit.ui," + NL + " org.eclipse.emf.edit.ui.action," + NL + " org.eclipse.emf.edit.ui.celleditor," + NL + " org.eclipse.emf.edit.ui.dnd," + NL + " org.eclipse.emf.edit.ui.provider," + NL + " org.eclipse.emf.edit.ui.util," + NL + " org.eclipse.emf.edit.ui.view," + NL + " org.eclipse.jface.action," + NL + " org.eclipse.jface.dialogs," + NL + " org.eclipse.jface.operation," + NL + " org.eclipse.jface.viewers," + NL + " org.eclipse.jface.window," + NL + " org.eclipse.jface.wizard," + NL + " org.eclipse.swt," + NL + " org.eclipse.swt.custom," + NL + " org.eclipse.swt.dnd," + NL + " org.eclipse.swt.events," + NL + " org.eclipse.swt.graphics," + NL + " org.eclipse.swt.layout," + NL + " org.eclipse.swt.widgets," + NL + " org.eclipse.ui;ui.workbench=\"split\"," + NL + " org.eclipse.ui.actions;ui.workbench=\"split\"," + NL + " org.eclipse.ui.application," + NL + " org.eclipse.ui.part;ui.workbench=\"split\"," + NL + " org.eclipse.ui.views," + NL + " org.eclipse.ui.views.contentoutline," + NL + " org.eclipse.ui.views.properties;ui.views=\"split\"";
- protected final String TEXT_19 = NL + "Eclipse-LazyStart: true";
- protected final String TEXT_20 = NL + "Bundle-ActivationPolicy: lazy";
- protected final String TEXT_21 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- * <copyright>
- *
- * Copyright (c) 2005-2012 IBM Corporation and others.
- * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-
- GenModel genModel = (GenModel)argument; STEMGenModel stemGenModel = STEMGenModel.get(genModel);
- stringBuffer.append(TEXT_1);
- stringBuffer.append(genModel.getEditorPluginID());
- stringBuffer.append(TEXT_2);
- if (genModel.isRuntimeJar()) {
- stringBuffer.append(genModel.getEditorPluginID());
- stringBuffer.append(TEXT_3);
- }else{
- stringBuffer.append(TEXT_4);
- }
- if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(genModel.getQualifiedEditorPluginClassName());
- stringBuffer.append(TEXT_6);
- }
- stringBuffer.append(TEXT_7);
- if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {
- stringBuffer.append(TEXT_8);
- } else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {
- stringBuffer.append(TEXT_9);
- }
- Iterator<String> packagesIterator = genModel.getEditorQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();
- stringBuffer.append(TEXT_10);
- stringBuffer.append(pack);
- while(packagesIterator.hasNext()) { pack = packagesIterator.next();
- stringBuffer.append(TEXT_11);
- stringBuffer.append(TEXT_12);
- stringBuffer.append(pack);
- }
- }
- Iterator<String> requiredPluginIterator = stemGenModel.getEditorRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_13);
- stringBuffer.append(pluginID);
- if (!pluginID.startsWith("org.eclipse.core.runtime")){
- stringBuffer.append(TEXT_14);
- } while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();
- stringBuffer.append(TEXT_15);
- stringBuffer.append(TEXT_16);
- stringBuffer.append(pluginID);
- if (!pluginID.startsWith("org.eclipse.core.runtime")){
- stringBuffer.append(TEXT_17);
- }}
- }
- if (genModel.isRichAjaxPlatform()) {
- stringBuffer.append(TEXT_18);
- }
- if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {
- stringBuffer.append(TEXT_19);
- }
- stringBuffer.append(TEXT_20);
- stringBuffer.append(TEXT_21);
- return stringBuffer.toString();
- }
-}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PluginXML_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PluginXML_.java
deleted file mode 100644
index 9375ec928..000000000
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PluginXML_.java
+++ /dev/null
@@ -1,421 +0,0 @@
-package org.eclipse.emf.codegen.ecore.templates.editor;
-
-import java.util.*;
-import org.eclipse.stem.model.codegen.*;
-import org.eclipse.emf.codegen.ecore.genmodel.*;
-
-public class PluginXML_
-{
- protected static String nl;
- public static synchronized PluginXML_ create(String lineSeparator)
- {
- nl = lineSeparator;
- PluginXML_ result = new PluginXML_();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + NL + "<?eclipse version=\"3.0\"?>" + NL;
- protected final String TEXT_2 = NL;
- protected final String TEXT_3 = "<!--";
- protected final String TEXT_4 = NL + " ";
- protected final String TEXT_5 = NL + " <copyright>" + NL + " </copyright>" + NL;
- protected final String TEXT_6 = NL + " ";
- protected final String TEXT_7 = "Id";
- protected final String TEXT_8 = NL + "-->" + NL;
- protected final String TEXT_9 = NL + "<plugin>";
- protected final String TEXT_10 = NL + "<plugin" + NL + " name=\"%pluginName\"" + NL + " id=\"";
- protected final String TEXT_11 = "\"" + NL + " version=\"1.0.0\"" + NL + " provider-name=\"%providerName\"" + NL + " class=\"";
- protected final String TEXT_12 = "$Implementation\">" + NL + "" + NL + " <requires>";
- protected final String TEXT_13 = NL + " <import plugin=\"";
- protected final String TEXT_14 = "\"";
- protected final String TEXT_15 = " export=\"true\"";
- protected final String TEXT_16 = "/>";
- protected final String TEXT_17 = NL + " </requires>" + NL + "" + NL + " <runtime>";
- protected final String TEXT_18 = NL + " <library name=\"";
- protected final String TEXT_19 = ".jar\">";
- protected final String TEXT_20 = NL + " <library name=\".\">";
- protected final String TEXT_21 = NL + " <export name=\"*\"/>" + NL + " </library>" + NL + " </runtime>";
- protected final String TEXT_22 = NL + NL + " <extension point=\"org.eclipse.emf.edit.itemProviderAdapterFactories\">" + NL + " <factory" + NL + " uri=\"";
- protected final String TEXT_23 = "\"" + NL + " class=\"";
- protected final String TEXT_24 = "\"" + NL + " supportedTypes=";
- protected final String TEXT_25 = NL + " ";
- protected final String TEXT_26 = "\"/>";
- protected final String TEXT_27 = NL + " </extension>";
- protected final String TEXT_28 = NL + NL + " <extension point=\"org.eclipse.emf.edit.childCreationExtenders\">";
- protected final String TEXT_29 = NL + " <extender" + NL + " uri=\"";
- protected final String TEXT_30 = "\"" + NL + " class=\"";
- protected final String TEXT_31 = "$";
- protected final String TEXT_32 = "\"/>";
- protected final String TEXT_33 = NL + " </extension>";
- protected final String TEXT_34 = NL + NL + " <extension point=\"org.eclipse.emf.ecore.generated_package\">" + NL + " <package" + NL + " uri=\"";
- protected final String TEXT_35 = "\"";
- protected final String TEXT_36 = NL + " class=\"";
- protected final String TEXT_37 = "\"" + NL + " genModel=\"";
- protected final String TEXT_38 = "\"/>";
- protected final String TEXT_39 = NL + " class=\"";
- protected final String TEXT_40 = "\"/>";
- protected final String TEXT_41 = NL + " </extension>";
- protected final String TEXT_42 = NL + NL + " <extension point=\"org.eclipse.emf.ecore.content_parser\">" + NL + " <parser" + NL + " contentTypeIdentifier=\"";
- protected final String TEXT_43 = "\"" + NL + " class=\"";
- protected final String TEXT_44 = "\"/>" + NL + " </extension>" + NL + "" + NL + " <extension point=\"org.eclipse.core.contenttype.contentTypes\">" + NL + " <content-type" + NL + " base-type=\"";
- protected final String TEXT_45 = "\"" + NL + " file-extensions=\"";
- protected final String TEXT_46 = "\"" + NL + " id=\"";
- protected final String TEXT_47 = "\"" + NL + " name=\"%_UI_";
- protected final String TEXT_48 = "_content_type\"" + NL + " priority=\"normal\">" + NL + " <describer class=\"org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer\">";
- protected final String TEXT_49 = NL + " <parameter name=\"namespace\" value=\"";
- protected final String TEXT_50 = "\"/>";
- protected final String TEXT_51 = NL + " <parameter name=\"kind\" value=\"xmi\"/>";
- protected final String TEXT_52 = NL + " </describer>" + NL + " </content-type>" + NL + " </extension>";
- protected final String TEXT_53 = NL + NL + " <extension point=\"org.eclipse.emf.ecore.extension_parser\">" + NL + " <parser" + NL + " type=\"";
- protected final String TEXT_54 = "\"" + NL + " class=\"";
- protected final String TEXT_55 = "\"/>" + NL + " </extension>";
- protected final String TEXT_56 = NL + NL + " <extension" + NL + " point=\"org.eclipse.core.runtime.applications\"" + NL + " id=\"";
- protected final String TEXT_57 = "Application\">" + NL + " <application>" + NL + " <run class=\"";
- protected final String TEXT_58 = "$Application\"/>" + NL + " </application>" + NL + " </extension>" + NL + "" + NL + " <extension point=\"org.eclipse.ui.perspectives\">" + NL + " <perspective" + NL + " name=\"%_UI_Perspective_label\"" + NL + " class=\"";
- protected final String TEXT_59 = "$Perspective\"" + NL + " id=\"";
- protected final String TEXT_60 = "Perspective\">" + NL + " </perspective>" + NL + " </extension>" + NL + "" + NL + " <extension point=\"org.eclipse.ui.commands\">" + NL + " <command" + NL + " name=\"%_UI_Menu_OpenURI_label\"" + NL + " description=\"%_UI_Menu_OpenURI_description\"" + NL + " categoryId=\"org.eclipse.ui.category.file\"" + NL + " id=\"";
- protected final String TEXT_61 = "OpenURICommand\"/>";
- protected final String TEXT_62 = NL + " <command" + NL + " name=\"%_UI_Menu_Open_label\"" + NL + " description=\"%_UI_Menu_Open_description\"" + NL + " categoryId=\"org.eclipse.ui.category.file\"" + NL + " id=\"";
- protected final String TEXT_63 = "OpenCommand\"/>";
- protected final String TEXT_64 = NL + " </extension>" + NL;
- protected final String TEXT_65 = NL + " <extension point=\"org.eclipse.ui.bindings\">" + NL + " <key" + NL + " commandId=\"";
- protected final String TEXT_66 = "OpenURICommand\"" + NL + " sequence=\"M1+U\"" + NL + " schemeId=\"org.eclipse.ui.defaultAcceleratorConfiguration\"/>" + NL + " <key" + NL + " commandId=\"";
- protected final String TEXT_67 = "OpenCommand\"" + NL + " sequence=\"M1+O\"" + NL + " schemeId=\"org.eclipse.ui.defaultAcceleratorConfiguration\"/>" + NL + " </extension>";
- protected final String TEXT_68 = NL + NL + " <extension point=\"org.eclipse.ui.actionSets\">" + NL + " <actionSet" + NL + " label=\"%_UI_";
- protected final String TEXT_69 = "_ActionSet_label\"" + NL + " visible=\"true\"" + NL + " id=\"";
- protected final String TEXT_70 = "ActionSet\">" + NL + " <action" + NL + " label=\"%_UI_Menu_About_label\"" + NL + " class=\"";
- protected final String TEXT_71 = "$AboutAction\"" + NL + " menubarPath=\"help/additions\"" + NL + " id=\"";
- protected final String TEXT_72 = "AboutAction\"/>" + NL + " <action" + NL + " label=\"%_UI_Menu_OpenURI_label\"" + NL + " definitionId=\"";
- protected final String TEXT_73 = "OpenURICommand\"" + NL + " class=\"";
- protected final String TEXT_74 = "$OpenURIAction\"" + NL + " menubarPath=\"file/additions\"" + NL + " id=\"";
- protected final String TEXT_75 = "OpenURIAction\"/>";
- protected final String TEXT_76 = NL + " <action" + NL + " label=\"%_UI_Menu_Open_label\"" + NL + " definitionId=\"";
- protected final String TEXT_77 = "OpenCommand\"" + NL + " class=\"";
- protected final String TEXT_78 = "$OpenAction\"" + NL + " menubarPath=\"file/additions\"" + NL + " id=\"";
- protected final String TEXT_79 = "OpenAction\"/>";
- protected final String TEXT_80 = NL + " </actionSet>" + NL + " </extension>";
- protected final String TEXT_81 = NL + NL + " <extension point=\"org.eclipse.ui.actionSets\">" + NL + " <actionSet" + NL + " label=\"%_UI_";
- protected final String TEXT_82 = "_ActionSet_label\"" + NL + " visible=\"true\"" + NL + " id=\"";
- protected final String TEXT_83 = "ActionSet\">" + NL + " <action" + NL + " label=\"%_UI_";
- protected final String TEXT_84 = "_label\"" + NL + " class=\"";
- protected final String TEXT_85 = "$NewAction\"" + NL + " menubarPath=\"file/new/additions\"" + NL + " id=\"";
- protected final String TEXT_86 = "NewAction\"/>" + NL + " </actionSet>" + NL + " </extension>";
- protected final String TEXT_87 = NL + NL + " <extension point=\"org.eclipse.ui.newWizards\">" + NL + " <category" + NL + " id=\"org.eclipse.emf.ecore.Wizard.category.ID\"" + NL + " name=\"%_UI_Wizard_category\"/>" + NL + " <wizard" + NL + " id=\"";
- protected final String TEXT_88 = "ID\"" + NL + " name=\"%_UI_";
- protected final String TEXT_89 = "_label\"" + NL + " class=\"";
- protected final String TEXT_90 = "\"" + NL + " category=\"org.eclipse.emf.ecore.Wizard.category.ID\"" + NL + " icon=\"icons/full/obj16/";
- protected final String TEXT_91 = "ModelFile.gif\">" + NL + " <description>%_UI_";
- protected final String TEXT_92 = "_description</description>" + NL + " <selection class=\"org.eclipse.core.resources.IResource\"/>" + NL + " </wizard>" + NL + " </extension>";
- protected final String TEXT_93 = NL + NL + " <extension point=\"org.eclipse.ui.editors\">" + NL + " <editor" + NL + " id=\"";
- protected final String TEXT_94 = "ID\"" + NL + " name=\"%_UI_";
- protected final String TEXT_95 = "_label\"" + NL + " icon=\"icons/full/obj16/";
- protected final String TEXT_96 = "ModelFile.gif\"";
- protected final String TEXT_97 = NL + " extensions=\"";
- protected final String TEXT_98 = "\"";
- protected final String TEXT_99 = NL + " class=\"";
- protected final String TEXT_100 = "\"" + NL + " contributorClass=\"";
- protected final String TEXT_101 = "\">";
- protected final String TEXT_102 = NL + " <contentTypeBinding contentTypeId=\"";
- protected final String TEXT_103 = "\"/>";
- protected final String TEXT_104 = NL + " </editor>" + NL + " </extension>";
- protected final String TEXT_105 = NL;
- protected final String TEXT_106 = NL + "\t<extension point=\"";
- protected final String TEXT_107 = "\">" + NL + "\t\t<classdef class=\"";
- protected final String TEXT_108 = "\"></classdef>" + NL + "\t\t<dublin_core" + NL + "\t\t\tcreator=\"\"" + NL + "\t\t\tdescription=\"\"" + NL + "\t\t\tidentifier=\"\"" + NL + "\t\t\tsource=\"\"" + NL + "\t\t\ttitle=\"";
- protected final String TEXT_109 = "\"" + NL + "\t\t\tlicense=\"\"" + NL + "\t\t\tpublisher=\"\">" + NL + "\t\t</dublin_core>" + NL + "\t</extension>" + NL;
- protected final String TEXT_110 = NL + NL + " <extension" + NL + " point=\"org.eclipse.ui.startup\">";
- protected final String TEXT_111 = " " + NL + " <startup" + NL + " class=\"";
- protected final String TEXT_112 = ".";
- protected final String TEXT_113 = "PropertyEditorAdapterFactory\">" + NL + " </startup>" + NL + " <startup" + NL + " class=\"";
- protected final String TEXT_114 = ".";
- protected final String TEXT_115 = "RelativeValueProviderAdapterFactory\">" + NL + " </startup> ";
- protected final String TEXT_116 = NL + " </extension>" + NL + "" + NL + "" + NL + "</plugin>";
- protected final String TEXT_117 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2012 IBM Corporation and others.
- * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-
- GenModel genModel = (GenModel)argument;
- stringBuffer.append(TEXT_1);
- stringBuffer.append(TEXT_2);
- stringBuffer.append(TEXT_3);
- {GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;
- if (copyrightHolder != null && copyrightHolder.hasCopyright()) {
- stringBuffer.append(TEXT_4);
- stringBuffer.append(copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer)));
- } else {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(TEXT_6);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_7);
- stringBuffer.append("$");
- }}
- stringBuffer.append(TEXT_8);
- if (genModel.isBundleManifest()) {
- stringBuffer.append(TEXT_9);
- } else {
- stringBuffer.append(TEXT_10);
- stringBuffer.append(genModel.getEditorPluginID());
- stringBuffer.append(TEXT_11);
- stringBuffer.append(genModel.getQualifiedEditorPluginClassName());
- stringBuffer.append(TEXT_12);
- for (String pluginID : genModel.getEditorRequiredPlugins()) {
- stringBuffer.append(TEXT_13);
- stringBuffer.append(pluginID);
- stringBuffer.append(TEXT_14);
- if (!pluginID.startsWith("org.eclipse.core.runtime")) {
- stringBuffer.append(TEXT_15);
- }
- stringBuffer.append(TEXT_16);
- }
- stringBuffer.append(TEXT_17);
- if (genModel.isRuntimeJar()) {
- stringBuffer.append(TEXT_18);
- stringBuffer.append(genModel.getEditorPluginID());
- stringBuffer.append(TEXT_19);
- } else {
- stringBuffer.append(TEXT_20);
- }
- stringBuffer.append(TEXT_21);
- }
- if (genModel.sameEditEditorProject()) {
- for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {
- if (!genPackage.getGenClasses().isEmpty()) {
- stringBuffer.append(TEXT_22);
- stringBuffer.append(genPackage.getNSURI());
- stringBuffer.append(TEXT_23);
- stringBuffer.append(genPackage.getQualifiedItemProviderAdapterFactoryClassName());
- stringBuffer.append(TEXT_24);
- for (ListIterator<?> j = genPackage.getProviderSupportedTypes().listIterator(); j.hasNext(); ) {
- stringBuffer.append(TEXT_25);
- stringBuffer.append(j.hasPrevious() ? " " : "\"");
- stringBuffer.append(j.next());
- if (!j.hasNext()) {
- stringBuffer.append(TEXT_26);
- }
- }
- stringBuffer.append(TEXT_27);
- if (genPackage.isChildCreationExtenders()) { Map<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> extendedChildCreationData = genPackage.getExtendedChildCreationData();
- if (!extendedChildCreationData.isEmpty()) {
- stringBuffer.append(TEXT_28);
- for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> entry : extendedChildCreationData.entrySet()) {
- stringBuffer.append(TEXT_29);
- stringBuffer.append(entry.getKey().getNSURI());
- stringBuffer.append(TEXT_30);
- stringBuffer.append(genPackage.getQualifiedItemProviderAdapterFactoryClassName());
- stringBuffer.append(TEXT_31);
- stringBuffer.append(genPackage.getChildCreationExtenderName(entry.getKey()));
- stringBuffer.append(TEXT_32);
- }
- stringBuffer.append(TEXT_33);
- }
- }
- }
- }
- }
- if (genModel.sameModelEditorProject()) {
- for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {
- stringBuffer.append(TEXT_34);
- stringBuffer.append(genPackage.getNSURI());
- stringBuffer.append(TEXT_35);
- if (genModel.hasLocalGenModel()) {
- stringBuffer.append(TEXT_36);
- stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
- stringBuffer.append(TEXT_37);
- stringBuffer.append(genModel.getRelativeGenModelLocation());
- stringBuffer.append(TEXT_38);
- } else {
- stringBuffer.append(TEXT_39);
- stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
- stringBuffer.append(TEXT_40);
- }
- stringBuffer.append(TEXT_41);
- if (genPackage.isContentType()) {
- stringBuffer.append(TEXT_42);
- stringBuffer.append(genPackage.getContentTypeIdentifier());
- stringBuffer.append(TEXT_43);
- stringBuffer.append(genPackage.getQualifiedEffectiveResourceFactoryClassName());
- stringBuffer.append(TEXT_44);
- stringBuffer.append(genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml");
- stringBuffer.append(TEXT_45);
- stringBuffer.append(genPackage.getFileExtensions());
- stringBuffer.append(TEXT_46);
- stringBuffer.append(genPackage.getContentTypeIdentifier());
- stringBuffer.append(TEXT_47);
- stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_48);
- if (genPackage.hasTargetNamespace()) {
- stringBuffer.append(TEXT_49);
- stringBuffer.append(genPackage.getNSURI());
- stringBuffer.append(TEXT_50);
- }
- if (genPackage.isXMIResource()) {
- stringBuffer.append(TEXT_51);
- }
- stringBuffer.append(TEXT_52);
- } else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {
- stringBuffer.append(TEXT_53);
- stringBuffer.append(genPackage.getFileExtension());
- stringBuffer.append(TEXT_54);
- stringBuffer.append(genPackage.getQualifiedResourceFactoryClassName());
- stringBuffer.append(TEXT_55);
- }
- }
- }
- if (genModel.isRichClientPlatform()) {
- stringBuffer.append(TEXT_56);
- stringBuffer.append(genModel.getEditorAdvisorClassName());
- stringBuffer.append(TEXT_57);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_58);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_59);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_60);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_61);
- if (!genModel.isRichAjaxPlatform()) {
- stringBuffer.append(TEXT_62);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_63);
- }
- stringBuffer.append(TEXT_64);
- if (!genModel.isRichAjaxPlatform()) {
- stringBuffer.append(TEXT_65);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_66);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_67);
- }
- stringBuffer.append(TEXT_68);
- stringBuffer.append(genModel.getEditorAdvisorClassName());
- stringBuffer.append(TEXT_69);
- stringBuffer.append(genModel.getEditorAdvisorClassName());
- stringBuffer.append(TEXT_70);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_71);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_72);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_73);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_74);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_75);
- if (!genModel.isRichAjaxPlatform()) {
- stringBuffer.append(TEXT_76);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_77);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_78);
- stringBuffer.append(genModel.getQualifiedEditorAdvisorClassName());
- stringBuffer.append(TEXT_79);
- }
- stringBuffer.append(TEXT_80);
- }
- for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {
- if (genPackage.hasConcreteClasses()){
- if (genPackage.isGenerateModelWizard()) {
- if (genModel.isRichClientPlatform()) {
- stringBuffer.append(TEXT_81);
- stringBuffer.append(genPackage.getModelWizardClassName());
- stringBuffer.append(TEXT_82);
- stringBuffer.append(genPackage.getQualifiedActionBarContributorClassName());
- stringBuffer.append(TEXT_83);
- stringBuffer.append(genPackage.getModelWizardClassName());
- stringBuffer.append(TEXT_84);
- stringBuffer.append(genPackage.getQualifiedActionBarContributorClassName());
- stringBuffer.append(TEXT_85);
- stringBuffer.append(genPackage.getQualifiedActionBarContributorClassName());
- stringBuffer.append(TEXT_86);
- } else {
- stringBuffer.append(TEXT_87);
- stringBuffer.append(genPackage.getQualifiedModelWizardClassName());
- stringBuffer.append(TEXT_88);
- stringBuffer.append(genPackage.getModelWizardClassName());
- stringBuffer.append(TEXT_89);
- stringBuffer.append(genPackage.getQualifiedModelWizardClassName());
- stringBuffer.append(TEXT_90);
- stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_91);
- stringBuffer.append(genPackage.getModelWizardClassName());
- stringBuffer.append(TEXT_92);
- }
- }
- stringBuffer.append(TEXT_93);
- stringBuffer.append(genPackage.getQualifiedEditorClassName());
- stringBuffer.append(TEXT_94);
- stringBuffer.append(genPackage.getEditorClassName());
- stringBuffer.append(TEXT_95);
- stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_96);
- if (!genPackage.isContentType()) {
- stringBuffer.append(TEXT_97);
- stringBuffer.append(genPackage.getFileExtension());
- stringBuffer.append(TEXT_98);
- }
- stringBuffer.append(TEXT_99);
- stringBuffer.append(genPackage.getQualifiedEditorClassName());
- stringBuffer.append(TEXT_100);
- stringBuffer.append(genPackage.getQualifiedActionBarContributorClassName());
- stringBuffer.append(TEXT_101);
- if (genPackage.isContentType()) {
- stringBuffer.append(TEXT_102);
- stringBuffer.append(genPackage.getQualifiedContentTypeIdentifier());
- stringBuffer.append(TEXT_103);
- }
- stringBuffer.append(TEXT_104);
- }
- }
- stringBuffer.append(TEXT_105);
- if (genModel.sameEditEditorProject()) {
- for(GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {
- STEMGenPackage stemPkg = STEMGenPackage.get(genPackage);
- for(STEMGenClass stemGenClass : stemPkg.getComputationalModelClasses()) {
- GenClass genClass = stemGenClass.getGenClass();
- if (genClass.isAbstract() || genClass.isInterface()) { continue; }
- stringBuffer.append(TEXT_106);
- stringBuffer.append(stemGenClass.getExtensionPointName());
- stringBuffer.append(TEXT_107);
- stringBuffer.append(genClass.getQualifiedClassName());
- stringBuffer.append(TEXT_108);
- stringBuffer.append( genClass.getFormattedName() );
- stringBuffer.append(TEXT_109);
- }//endforcompmodels
- }//endforgenpackages
- }//endifsameproject
- stringBuffer.append(TEXT_110);
- for(GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {
- stringBuffer.append(TEXT_111);
- stringBuffer.append(genPackage.getPresentationPackageName() );
- stringBuffer.append(TEXT_112);
- stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_113);
- stringBuffer.append(genPackage.getPresentationPackageName() );
- stringBuffer.append(TEXT_114);
- stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_115);
- }
- stringBuffer.append(TEXT_116);
- stringBuffer.append(TEXT_117);
- return stringBuffer.toString();
- }
-}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor.java
index 5dc079b36..4f3784331 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditor.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class PropertyEditor_
+public class PropertyEditor
{
protected static String nl;
- public static synchronized PropertyEditor_ create(String lineSeparator)
+ public static synchronized PropertyEditor create(String lineSeparator)
{
nl = lineSeparator;
- PropertyEditor_ result = new PropertyEditor_();
+ PropertyEditor result = new PropertyEditor();
nl = null;
return result;
}
@@ -28,57 +28,62 @@ public class PropertyEditor_
protected final String TEXT_11 = " " + NL + "{" + NL + "\t/**" + NL + "\t * @param parent" + NL + "\t * @param style" + NL + "\t * @param model" + NL + "\t * @param projectValidator" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
protected final String TEXT_12 = "PropertyEditor(Composite parent, int style," + NL + "\t\t\t";
protected final String TEXT_13 = " model, ModifyListener projectValidator," + NL + "\t\t\tIProject project) {" + NL + "\t\tsuper(parent, style, model, projectValidator, project);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic void populate(";
- protected final String TEXT_14 = " object) {" + NL + "\t\tsuper.populate(object);" + NL + "" + NL + "\t\t";
- protected final String TEXT_15 = " model = (";
- protected final String TEXT_16 = ")object;";
- protected final String TEXT_17 = NL + " \t\t// Set value for ";
- protected final String TEXT_18 = " (";
- protected final String TEXT_19 = ")";
- protected final String TEXT_20 = NL + "\t\ttry {" + NL + "\t\t\t";
- protected final String TEXT_21 = " ";
- protected final String TEXT_22 = "Value = ";
- protected final String TEXT_23 = ".parse";
- protected final String TEXT_24 = "(" + NL + "\t\t\t\tmap.get(";
- protected final String TEXT_25 = ").getText());" + NL + "\t\t\tmodel.set";
- protected final String TEXT_26 = "(";
- protected final String TEXT_27 = "Value);" + NL + "\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t// empty" + NL + "\t\t}";
- protected final String TEXT_28 = NL + "\t\ttry {" + NL + "\t\t\tInteger ";
- protected final String TEXT_29 = "Value = Integer.parseInt(" + NL + "\t\t\t\t\tmap.get(";
+ protected final String TEXT_14 = " object) {" + NL + "\t\tsuper.populate(object);" + NL;
+ protected final String TEXT_15 = NL + "\t\t";
+ protected final String TEXT_16 = " model = (";
+ protected final String TEXT_17 = ")object;";
+ protected final String TEXT_18 = NL + "\t\t// Remove Comment If Adding Custom Code" + NL + "\t\t//";
+ protected final String TEXT_19 = " model = (";
+ protected final String TEXT_20 = ")object;";
+ protected final String TEXT_21 = NL;
+ protected final String TEXT_22 = NL + " \t\t// Set value for ";
+ protected final String TEXT_23 = " (";
+ protected final String TEXT_24 = ")";
+ protected final String TEXT_25 = NL + "\t\ttry {" + NL + "\t\t\t";
+ protected final String TEXT_26 = " ";
+ protected final String TEXT_27 = "Value = ";
+ protected final String TEXT_28 = ".parse";
+ protected final String TEXT_29 = "(" + NL + "\t\t\t\tmap.get(";
protected final String TEXT_30 = ").getText());" + NL + "\t\t\tmodel.set";
protected final String TEXT_31 = "(";
protected final String TEXT_32 = "Value);" + NL + "\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t// empty" + NL + "\t\t}";
- protected final String TEXT_33 = NL + "\t\tboolean ";
- protected final String TEXT_34 = "Value = booleanMap.get(";
- protected final String TEXT_35 = ").getSelection();" + NL + "\t\tmodel.set";
+ protected final String TEXT_33 = NL + "\t\ttry {" + NL + "\t\t\tInteger ";
+ protected final String TEXT_34 = "Value = Integer.parseInt(" + NL + "\t\t\t\t\tmap.get(";
+ protected final String TEXT_35 = ").getText());" + NL + "\t\t\tmodel.set";
protected final String TEXT_36 = "(";
- protected final String TEXT_37 = "Value);\t\t\t";
- protected final String TEXT_38 = NL + " \t\tString ";
- protected final String TEXT_39 = "Value = map.get(";
- protected final String TEXT_40 = ").getText();" + NL + "\t\tmodel.set";
+ protected final String TEXT_37 = "Value);" + NL + "\t\t} catch (NumberFormatException nfe) {" + NL + "\t\t\t// empty" + NL + "\t\t}";
+ protected final String TEXT_38 = NL + "\t\tboolean ";
+ protected final String TEXT_39 = "Value = booleanMap.get(";
+ protected final String TEXT_40 = ").getSelection();" + NL + "\t\tmodel.set";
protected final String TEXT_41 = "(";
- protected final String TEXT_42 = "Value);";
- protected final String TEXT_43 = NL + "\t\t// TODO Add code to set \"";
- protected final String TEXT_44 = "\" value" + NL + "\t\t// ";
- protected final String TEXT_45 = " ";
- protected final String TEXT_46 = "Value = ...;" + NL + "\t\t// model.set";
- protected final String TEXT_47 = "(";
- protected final String TEXT_48 = "Value);";
- protected final String TEXT_49 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean validate() {" + NL + "\t\tboolean valid = super.validate();" + NL;
- protected final String TEXT_50 = NL + "\t\tvalid = valid && validateFeatureConstraint(";
- protected final String TEXT_51 = ");";
- protected final String TEXT_52 = NL + NL + "\t\treturn valid;" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class ";
- protected final String TEXT_53 = "PropertyStringProviderAdapter" + NL + "\t\textends ";
- protected final String TEXT_54 = NL + "\t{" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd name of the property to display to the user" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyName(IItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_55 = "WizardMessages" + NL + "\t\t\t\t\t\t.getString(((EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t\t\t.getFeature(null)).getName(), \"";
- protected final String TEXT_56 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyName(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyName" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd tool tip text that describes the property" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyToolTip(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
- protected final String TEXT_57 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + TT_SUFFIX, \"";
- protected final String TEXT_58 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyToolTip(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyToolTip" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text that represents the units of the" + NL + "\t\t * property" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyUnits(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
- protected final String TEXT_59 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + UNIT_SUFFIX, \"";
- protected final String TEXT_60 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyUnits(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyUnits" + NL + "\t\t" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text for a missing property error message" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyMissing(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
- protected final String TEXT_61 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + MISSING_SUFFIX, \"";
- protected final String TEXT_62 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyMissing(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyMissing" + NL + "\t\t" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text for a missing property error message" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyInvalid(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
- protected final String TEXT_63 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + INVALID_SUFFIX, \"";
- protected final String TEXT_64 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {\t" + NL + "\t\t\t\treturn super.getPropertyInvalid(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyInvalid\t\t" + NL + "\t}" + NL + "" + NL + "}";
+ protected final String TEXT_42 = "Value);\t\t\t";
+ protected final String TEXT_43 = NL + " \t\tString ";
+ protected final String TEXT_44 = "Value = map.get(";
+ protected final String TEXT_45 = ").getText();" + NL + "\t\tmodel.set";
+ protected final String TEXT_46 = "(";
+ protected final String TEXT_47 = "Value);";
+ protected final String TEXT_48 = NL + "\t\t// TODO Add code to set \"";
+ protected final String TEXT_49 = "\" value" + NL + "\t\t// ";
+ protected final String TEXT_50 = " ";
+ protected final String TEXT_51 = "Value = ...;" + NL + "\t\t// model.set";
+ protected final String TEXT_52 = "(";
+ protected final String TEXT_53 = "Value);";
+ protected final String TEXT_54 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean validate() {" + NL + "\t\tboolean valid = super.validate();" + NL;
+ protected final String TEXT_55 = NL + "\t\tvalid = valid && validateFeatureConstraint(";
+ protected final String TEXT_56 = ");";
+ protected final String TEXT_57 = NL + NL + "\t\treturn valid;" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static class ";
+ protected final String TEXT_58 = "PropertyStringProviderAdapter" + NL + "\t\textends ";
+ protected final String TEXT_59 = NL + "\t{" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd name of the property to display to the user" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyName(IItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_60 = "WizardMessages" + NL + "\t\t\t\t\t\t.getString(((EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t\t\t.getFeature(null)).getName(), \"";
+ protected final String TEXT_61 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyName(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyName" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd tool tip text that describes the property" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyToolTip(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_62 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + TT_SUFFIX, \"";
+ protected final String TEXT_63 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyToolTip(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyToolTip" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text that represents the units of the" + NL + "\t\t * property" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyUnits(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_64 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + UNIT_SUFFIX, \"";
+ protected final String TEXT_65 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyUnits(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyUnits" + NL + "\t\t" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text for a missing property error message" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyMissing(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_66 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + MISSING_SUFFIX, \"";
+ protected final String TEXT_67 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {" + NL + "\t\t\t\treturn super.getPropertyMissing(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyMissing" + NL + "\t\t" + NL + "\t\t/**" + NL + "\t\t * @param descriptor" + NL + "\t\t * @return the NLS'd text for a missing property error message" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic String getPropertyInvalid(" + NL + "\t\t\t\tIItemPropertyDescriptor descriptor) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tfinal EStructuralFeature feature = (EStructuralFeature) descriptor" + NL + "\t\t\t\t\t\t.getFeature(null);" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_68 = "WizardMessages.getString(feature" + NL + "\t\t\t\t\t\t.getName() + INVALID_SUFFIX, \"";
+ protected final String TEXT_69 = "\");" + NL + "\t\t\t} catch (MissingResourceException e) {\t" + NL + "\t\t\t\treturn super.getPropertyInvalid(descriptor);" + NL + "\t\t\t}" + NL + "\t\t} // getPropertyInvalid\t\t" + NL + "\t}" + NL + "" + NL + "}";
public String generate(Object argument)
{
@@ -135,10 +140,20 @@ String importedModelClassName = genModel.getImportedName(stemGenClass.getModelTy
stringBuffer.append(TEXT_13);
stringBuffer.append(importedModelClassName);
stringBuffer.append(TEXT_14);
- stringBuffer.append(genClass.getName());
+ if (genClass.getImplementedGenFeatures().size() > 0) {
stringBuffer.append(TEXT_15);
stringBuffer.append(genClass.getName());
stringBuffer.append(TEXT_16);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_17);
+ }else{
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_19);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_20);
+ }
+ stringBuffer.append(TEXT_21);
for (GenFeature genFeature : genClass.getImplementedGenFeatures()) {
//STEMGenFeature stemFeature = STEMGenFeature.get(genFeature);
@@ -146,32 +161,22 @@ String importedModelClassName = genModel.getImportedName(stemGenClass.getModelTy
if (genFeature.isChangeable()) {
String rawType = STEMGenClass.getPrimitiveObjectName(genFeature.getImportedType(genClass));
- stringBuffer.append(TEXT_17);
+ stringBuffer.append(TEXT_22);
stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_18);
+ stringBuffer.append(TEXT_23);
stringBuffer.append(rawType);
- stringBuffer.append(TEXT_19);
+ stringBuffer.append(TEXT_24);
if (rawType.equals("Double") ||
rawType.equals("Float") || rawType.equals("Short") ||
rawType.equals("Long") || rawType.equals("Byte")) {
- stringBuffer.append(TEXT_20);
- stringBuffer.append(rawType);
- stringBuffer.append(TEXT_21);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_22);
- stringBuffer.append(rawType);
- stringBuffer.append(TEXT_23);
- stringBuffer.append(rawType);
- stringBuffer.append(TEXT_24);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
stringBuffer.append(TEXT_25);
- stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(rawType);
stringBuffer.append(TEXT_26);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_27);
- } else if (rawType.equals("Integer")) {
+ stringBuffer.append(rawType);
stringBuffer.append(TEXT_28);
- stringBuffer.append(genFeature.getName());
+ stringBuffer.append(rawType);
stringBuffer.append(TEXT_29);
stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
stringBuffer.append(TEXT_30);
@@ -179,7 +184,7 @@ String importedModelClassName = genModel.getImportedName(stemGenClass.getModelTy
stringBuffer.append(TEXT_31);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_32);
- } else if (rawType.equals("Boolean")) {
+ } else if (rawType.equals("Integer")) {
stringBuffer.append(TEXT_33);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_34);
@@ -189,7 +194,7 @@ String importedModelClassName = genModel.getImportedName(stemGenClass.getModelTy
stringBuffer.append(TEXT_36);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_37);
- } else if (rawType.equals("String")) {
+ } else if (rawType.equals("Boolean")) {
stringBuffer.append(TEXT_38);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_39);
@@ -199,54 +204,64 @@ String importedModelClassName = genModel.getImportedName(stemGenClass.getModelTy
stringBuffer.append(TEXT_41);
stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_42);
- } else {
+ } else if (rawType.equals("String")) {
stringBuffer.append(TEXT_43);
- stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(genFeature.getName());
stringBuffer.append(TEXT_44);
- stringBuffer.append(genFeature.getImportedType(genClass));
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
stringBuffer.append(TEXT_45);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_46);
stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_47);
+ stringBuffer.append(TEXT_46);
stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_47);
+ } else {
stringBuffer.append(TEXT_48);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append(genFeature.getImportedType(genClass));
+ stringBuffer.append(TEXT_50);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_52);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_53);
} //if type
} //if changeable
} //for feature
- stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_54);
for (GenFeature genFeature : genClass.getImplementedGenFeatures()) {
if (genFeature.isChangeable()) {
- stringBuffer.append(TEXT_50);
+ stringBuffer.append(TEXT_55);
stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_56);
} //if changeable
} //for feature
- stringBuffer.append(TEXT_52);
+ stringBuffer.append(TEXT_57);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_53);
+ stringBuffer.append(TEXT_58);
stringBuffer.append(genModel.getImportedName(stemGenClass.getStringProviderSuperClassName()));
- stringBuffer.append(TEXT_54);
+ stringBuffer.append(TEXT_59);
stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_55);
+ stringBuffer.append(TEXT_60);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_56);
+ stringBuffer.append(TEXT_61);
stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_57);
+ stringBuffer.append(TEXT_62);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_58);
+ stringBuffer.append(TEXT_63);
stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_59);
+ stringBuffer.append(TEXT_64);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_60);
+ stringBuffer.append(TEXT_65);
stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_61);
+ stringBuffer.append(TEXT_66);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_62);
+ stringBuffer.append(TEXT_67);
stringBuffer.append(genPackage.getPrefix());
- stringBuffer.append(TEXT_63);
+ stringBuffer.append(TEXT_68);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_64);
+ stringBuffer.append(TEXT_69);
genModel.emitSortedImports();
return stringBuffer.toString();
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter.java
index 16310f684..68d7309c8 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapter.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class PropertyEditorAdapter_
+public class PropertyEditorAdapter
{
protected static String nl;
- public static synchronized PropertyEditorAdapter_ create(String lineSeparator)
+ public static synchronized PropertyEditorAdapter create(String lineSeparator)
{
nl = lineSeparator;
- PropertyEditorAdapter_ result = new PropertyEditorAdapter_();
+ PropertyEditorAdapter result = new PropertyEditorAdapter();
nl = null;
return result;
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory.java
index 6c5b0e3e5..d282a5a58 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyEditorAdapterFactory.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class PropertyEditorAdapterFactory_
+public class PropertyEditorAdapterFactory
{
protected static String nl;
- public static synchronized PropertyEditorAdapterFactory_ create(String lineSeparator)
+ public static synchronized PropertyEditorAdapterFactory create(String lineSeparator)
{
nl = lineSeparator;
- PropertyEditorAdapterFactory_ result = new PropertyEditorAdapterFactory_();
+ PropertyEditorAdapterFactory result = new PropertyEditorAdapterFactory();
nl = null;
return result;
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory.java
index 5fca60a9b..551a2ceb1 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/PropertyStringProviderAdapterFactory.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class PropertyStringProviderAdapterFactory_
+public class PropertyStringProviderAdapterFactory
{
protected static String nl;
- public static synchronized PropertyStringProviderAdapterFactory_ create(String lineSeparator)
+ public static synchronized PropertyStringProviderAdapterFactory create(String lineSeparator)
{
nl = lineSeparator;
- PropertyStringProviderAdapterFactory_ result = new PropertyStringProviderAdapterFactory_();
+ PropertyStringProviderAdapterFactory result = new PropertyStringProviderAdapterFactory();
nl = null;
return result;
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory.java
index 2941d6277..26ba62832 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/RelativeValueProviderAdapterFactory.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class RelativeValueProviderAdapterFactory_
+public class RelativeValueProviderAdapterFactory
{
protected static String nl;
- public static synchronized RelativeValueProviderAdapterFactory_ create(String lineSeparator)
+ public static synchronized RelativeValueProviderAdapterFactory create(String lineSeparator)
{
nl = lineSeparator;
- RelativeValueProviderAdapterFactory_ result = new RelativeValueProviderAdapterFactory_();
+ RelativeValueProviderAdapterFactory result = new RelativeValueProviderAdapterFactory();
nl = null;
return result;
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages.java
index 30304b1f3..d64260811 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessages.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class WizardMessages_
+public class WizardMessages
{
protected static String nl;
- public static synchronized WizardMessages_ create(String lineSeparator)
+ public static synchronized WizardMessages create(String lineSeparator)
{
nl = lineSeparator;
- WizardMessages_ result = new WizardMessages_();
+ WizardMessages result = new WizardMessages();
nl = null;
return result;
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties.java
index f701d798f..1af9a36a0 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/editor/WizardMessagesProperties.java
@@ -3,13 +3,13 @@ package org.eclipse.emf.codegen.ecore.templates.editor;
import org.eclipse.stem.model.codegen.*;
import org.eclipse.emf.codegen.ecore.genmodel.*;
-public class WizardMessagesProperties_
+public class WizardMessagesProperties
{
protected static String nl;
- public static synchronized WizardMessagesProperties_ create(String lineSeparator)
+ public static synchronized WizardMessagesProperties create(String lineSeparator)
{
nl = lineSeparator;
- WizardMessagesProperties_ result = new WizardMessagesProperties_();
+ WizardMessagesProperties result = new WizardMessagesProperties();
nl = null;
return result;
}
@@ -18,7 +18,7 @@ public class WizardMessagesProperties_
protected final String TEXT_1 = "# ";
protected final String TEXT_2 = NL + "# <copyright>" + NL + "# </copyright>" + NL + "#" + NL + "# ";
protected final String TEXT_3 = "Id";
- protected final String TEXT_4 = NL;
+ protected final String TEXT_4 = NL + "# Messages for ";
protected final String TEXT_5 = NL;
protected final String TEXT_6 = ".";
protected final String TEXT_7 = " = ";
@@ -70,9 +70,10 @@ STEMGenPackage stemGenPackage = (STEMGenPackage)((Object[])argument)[0];
stringBuffer.append(TEXT_3);
stringBuffer.append("$");
}}
- stringBuffer.append(TEXT_4);
for(STEMGenClass stemGenClass : stemGenPackage.getComputationalModelClasses()){
GenClass genClass = stemGenClass.getGenClass();
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genClass.getName());
for(STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){
GenFeature genFeature = stemGenFeature.getGenFeature();
stringBuffer.append(TEXT_5);
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/BuildProperties_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/BuildProperties_.java
deleted file mode 100644
index 782253db5..000000000
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/BuildProperties_.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.eclipse.emf.codegen.ecore.templates.model;
-
-import org.eclipse.emf.codegen.ecore.genmodel.*;
-import java.util.*;
-
-public class BuildProperties_
-{
- protected static String nl;
- public static synchronized BuildProperties_ create(String lineSeparator)
- {
- nl = lineSeparator;
- BuildProperties_ result = new BuildProperties_();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "# ";
- protected final String TEXT_2 = NL + "# <copyright>" + NL + "# </copyright>" + NL + "#" + NL + "# ";
- protected final String TEXT_3 = "Id";
- protected final String TEXT_4 = NL + NL + "bin.includes = ";
- protected final String TEXT_5 = ",\\" + NL + " model/,\\";
- protected final String TEXT_6 = NL + " icons/,\\";
- protected final String TEXT_7 = NL + " META-INF/,\\";
- protected final String TEXT_8 = NL + " plugin.xml,\\";
- protected final String TEXT_9 = NL + " plugin.properties" + NL + "jars.compile.order = ";
- protected final String TEXT_10 = NL + "source.";
- protected final String TEXT_11 = " = ";
- protected final String TEXT_12 = NL + "output.";
- protected final String TEXT_13 = " = bin/";
- protected final String TEXT_14 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-
- GenModel genModel = (GenModel)argument;
- String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getModelPluginID()+".jar" : ".";
- List<String> sourceFolders = genModel.getModelSourceFolders();
- {GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;
- if (copyrightHolder != null && copyrightHolder.hasCopyright()) {
- stringBuffer.append(TEXT_1);
- stringBuffer.append(copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer)));
- } else {
- stringBuffer.append(TEXT_2);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_3);
- stringBuffer.append("$");
- }}
- stringBuffer.append(TEXT_4);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_5);
- if (genModel.sameModelEditProject() || genModel.sameModelEditorProject()) {
- stringBuffer.append(TEXT_6);
- }
- if (genModel.isBundleManifest()) {
- stringBuffer.append(TEXT_7);
- }
- if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {
- stringBuffer.append(TEXT_8);
- }
- stringBuffer.append(TEXT_9);
- stringBuffer.append(pluginClassesLocation);
- boolean first=true; for (Iterator<String> i = sourceFolders.iterator(); i.hasNext();) { String sourceFolder = i.next(); if (i.hasNext()){sourceFolder +=",\\";} if (first) {
- stringBuffer.append(TEXT_10);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_11);
- stringBuffer.append(sourceFolder);
- first=false;} else {
- stringBuffer.append(sourceFolder);
- }}
- stringBuffer.append(TEXT_12);
- stringBuffer.append(pluginClassesLocation);
- stringBuffer.append(TEXT_13);
- stringBuffer.append(TEXT_14);
- return stringBuffer.toString();
- }
-}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/Class_.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/Class_.java
index c37293827..cc14d0a2c 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/Class_.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/emf/codegen/ecore/templates/model/Class_.java
@@ -1787,7 +1787,7 @@ public class Class_
protected final String TEXT_1768 = "." + NL + "\t\tsuper.applyExternalDeltas(currentTime, continuousTime, timeDelta, labels);" + NL + "\t} // applyExternalDeltas" + NL + "" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic void doStochasticProcess(";
protected final String TEXT_1769 = " label, long timeDelta)" + NL + "\t{" + NL + "\t\t// TODO Auto-generated stub. Implement doStochasticProcess(...) for ";
protected final String TEXT_1770 = "." + NL + "\t\tsuper.doStochasticProcess(label, timeDelta);" + NL + "\t} // doStochasticProcess" + NL;
- protected final String TEXT_1771 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic void calculateDeltas(";
+ protected final String TEXT_1771 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@SuppressWarnings(\"unused\")" + NL + "\t@Override" + NL + "\tpublic void calculateDeltas(";
protected final String TEXT_1772 = " time, double t, long timeDelta, ";
protected final String TEXT_1773 = "<";
protected final String TEXT_1774 = "> labels)" + NL + "\t{" + NL + "\t\t// TODO Auto-generated stub. Implement calculateDeltas(...) for ";
@@ -1950,56 +1950,59 @@ public class Class_
protected final String TEXT_1931 = NL + "\t\t";
protected final String TEXT_1932 = ";";
protected final String TEXT_1933 = NL + "\t} // reset" + NL;
- protected final String TEXT_1934 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\t@Override" + NL + "\tpublic double getPopulationCount() {" + NL + "\t\tdouble count = super.getPopulationCount();" + NL + "\t\t";
- protected final String TEXT_1935 = NL + "\t\tcount += (double)";
- protected final String TEXT_1936 = ";";
- protected final String TEXT_1937 = NL + NL + "\t\treturn count;" + NL + "\t} // getPopulationCount";
- protected final String TEXT_1938 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean avoidNegative(";
- protected final String TEXT_1939 = " value) {" + NL + "\t\t";
- protected final String TEXT_1940 = " v = (";
- protected final String TEXT_1941 = ")value;" + NL + "\t\tboolean adjusted = super.avoidNegative(value);" + NL;
- protected final String TEXT_1942 = NL + "\t\tif ((double)(";
- protected final String TEXT_1943 = " + v.";
- protected final String TEXT_1944 = ") < 0.0) {" + NL + "\t\t\tadjusted = true;" + NL + "\t\t\t";
- protected final String TEXT_1945 = ";" + NL + "\t\t}" + NL;
- protected final String TEXT_1946 = NL + "\t\treturn adjusted;" + NL + "\t}" + NL;
- protected final String TEXT_1947 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean sameValue(";
- protected final String TEXT_1948 = " value) {" + NL + "\t\t";
- protected final String TEXT_1949 = " v = (";
- protected final String TEXT_1950 = ")value;" + NL + "\t\tif (!super.sameValue(v)) {" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL;
- protected final String TEXT_1951 = NL + "\t\tif (";
- protected final String TEXT_1952 = " != v.";
- protected final String TEXT_1953 = ") {" + NL + "\t\t\treturn false;" + NL + "\t\t}";
- protected final String TEXT_1954 = NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic ";
- protected final String TEXT_1955 = " copy() {" + NL + "\t\t";
- protected final String TEXT_1956 = " copy = ";
- protected final String TEXT_1957 = ".";
- protected final String TEXT_1958 = ".create";
- protected final String TEXT_1959 = "();" + NL + "\t\tcopy.set(this);" + NL + "\t\treturn copy;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\t@Override" + NL + "\tpublic void prepareCycle() {" + NL + "\t\tsuper.prepareCycle();";
- protected final String TEXT_1960 = NL + "\t\t";
- protected final String TEXT_1961 = ";";
- protected final String TEXT_1962 = NL + "\t}" + NL;
- protected final String TEXT_1963 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic ";
- protected final String TEXT_1964 = " ";
- protected final String TEXT_1965 = "(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
- protected final String TEXT_1966 = ") {";
- protected final String TEXT_1967 = NL + "\t\t\tcase ";
- protected final String TEXT_1968 = ":" + NL + "\t\t\t\treturn ";
- protected final String TEXT_1969 = "();";
- protected final String TEXT_1970 = NL + "\t\t}" + NL + "" + NL + "\t\treturn super.";
- protected final String TEXT_1971 = "(featureID);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic void ";
- protected final String TEXT_1972 = "(int featureID, ";
- protected final String TEXT_1973 = " newValue)" + NL + "\t{" + NL + "\t\tswitch (featureID";
- protected final String TEXT_1974 = ") {";
- protected final String TEXT_1975 = NL + "\t\t\tcase ";
- protected final String TEXT_1976 = ":" + NL + "\t\t\t\tset";
- protected final String TEXT_1977 = "(newValue);" + NL + "\t\t\t\treturn;";
- protected final String TEXT_1978 = NL + "\t\t}" + NL + "\t\t" + NL + "\t\tsuper.";
- protected final String TEXT_1979 = "(featureID,newValue);" + NL + "\t}" + NL;
- protected final String TEXT_1980 = "\t";
- protected final String TEXT_1981 = NL;
- protected final String TEXT_1982 = NL + "} //";
- protected final String TEXT_1983 = NL;
+ protected final String TEXT_1934 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\t@Override" + NL + "\tpublic double getPopulationCount() {";
+ protected final String TEXT_1935 = NL + "\t\tdouble count = 0; ";
+ protected final String TEXT_1936 = NL + "\t\tdouble count = super.getPopulationCount(); ";
+ protected final String TEXT_1937 = NL + "\t";
+ protected final String TEXT_1938 = NL + "\t\tcount += (double)";
+ protected final String TEXT_1939 = ";";
+ protected final String TEXT_1940 = NL + NL + "\t\treturn count;" + NL + "\t} // getPopulationCount";
+ protected final String TEXT_1941 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean avoidNegative(";
+ protected final String TEXT_1942 = " value) {" + NL + "\t\t";
+ protected final String TEXT_1943 = " v = (";
+ protected final String TEXT_1944 = ")value;" + NL + "\t\tboolean adjusted = super.avoidNegative(v);" + NL;
+ protected final String TEXT_1945 = NL + "\t\tif ((double)(";
+ protected final String TEXT_1946 = " + v.";
+ protected final String TEXT_1947 = ") < 0.0) {" + NL + "\t\t\tadjusted = true;" + NL + "\t\t\t";
+ protected final String TEXT_1948 = ";" + NL + "\t\t}" + NL;
+ protected final String TEXT_1949 = NL + "\t\treturn adjusted;" + NL + "\t}" + NL;
+ protected final String TEXT_1950 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic boolean sameValue(";
+ protected final String TEXT_1951 = " value) {" + NL + "\t\t";
+ protected final String TEXT_1952 = " v = (";
+ protected final String TEXT_1953 = ")value;" + NL + "\t\tif (!super.sameValue(v)) {" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL;
+ protected final String TEXT_1954 = NL + "\t\tif (";
+ protected final String TEXT_1955 = " != v.";
+ protected final String TEXT_1956 = ") {" + NL + "\t\t\treturn false;" + NL + "\t\t}";
+ protected final String TEXT_1957 = NL + "\t\treturn true;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic ";
+ protected final String TEXT_1958 = " copy() {" + NL + "\t\t";
+ protected final String TEXT_1959 = " copy = ";
+ protected final String TEXT_1960 = ".";
+ protected final String TEXT_1961 = ".create";
+ protected final String TEXT_1962 = "();" + NL + "\t\tcopy.set(this);" + NL + "\t\treturn copy;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\t@Override" + NL + "\tpublic void prepareCycle() {" + NL + "\t\tsuper.prepareCycle();";
+ protected final String TEXT_1963 = NL + "\t\t";
+ protected final String TEXT_1964 = ";";
+ protected final String TEXT_1965 = NL + "\t}" + NL;
+ protected final String TEXT_1966 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic ";
+ protected final String TEXT_1967 = " ";
+ protected final String TEXT_1968 = "(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
+ protected final String TEXT_1969 = ") {";
+ protected final String TEXT_1970 = NL + "\t\t\tcase ";
+ protected final String TEXT_1971 = ":" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_1972 = "();";
+ protected final String TEXT_1973 = NL + "\t\t}" + NL + "" + NL + "\t\treturn super.";
+ protected final String TEXT_1974 = "(featureID);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t@Override" + NL + "\tpublic void ";
+ protected final String TEXT_1975 = "(int featureID, ";
+ protected final String TEXT_1976 = " newValue)" + NL + "\t{" + NL + "\t\tswitch (featureID";
+ protected final String TEXT_1977 = ") {";
+ protected final String TEXT_1978 = NL + "\t\t\tcase ";
+ protected final String TEXT_1979 = ":" + NL + "\t\t\t\tset";
+ protected final String TEXT_1980 = "(newValue);" + NL + "\t\t\t\treturn;";
+ protected final String TEXT_1981 = NL + "\t\t}" + NL + "\t\t" + NL + "\t\tsuper.";
+ protected final String TEXT_1982 = "(featureID,newValue);" + NL + "\t}" + NL;
+ protected final String TEXT_1983 = "\t";
+ protected final String TEXT_1984 = NL;
+ protected final String TEXT_1985 = NL + "} //";
+ protected final String TEXT_1986 = NL;
public String generate(Object argument)
{
@@ -6575,130 +6578,136 @@ if (index != -1) { head = typeName.substring(0, index); tail = typeName.substrin
stringBuffer.append(TEXT_1933);
if ("DiseaseModel".equals(stemGenClass.getDescriptor().getModelType())){
stringBuffer.append(TEXT_1934);
+ if ("DiseaseModelLabelValue".equals(genClass.getBaseGenClass().getName())) {
+ stringBuffer.append(TEXT_1935);
+ }else{
+ stringBuffer.append(TEXT_1936);
+ }
+ stringBuffer.append(TEXT_1937);
for (org.eclipse.stem.model.codegen.STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){
if (stemGenFeature.getGenFeature().isChangeable() && !stemGenFeature.isIncidenceFeature() && !stemGenFeature.isDiseaseDeathsFeature()) {
if (stemGenFeature.hasPrimitiveAccessor()) {
- stringBuffer.append(TEXT_1935);
+ stringBuffer.append(TEXT_1938);
stringBuffer.append(stemGenFeature.getFullGetterName());
- stringBuffer.append(TEXT_1936);
+ stringBuffer.append(TEXT_1939);
}//endifprimitiveaccessor
}//endifchangeable
}//endforgenfeatures
- stringBuffer.append(TEXT_1937);
+ stringBuffer.append(TEXT_1940);
}
- stringBuffer.append(TEXT_1938);
+ stringBuffer.append(TEXT_1941);
stringBuffer.append(integrationLabelValueImportName);
- stringBuffer.append(TEXT_1939);
+ stringBuffer.append(TEXT_1942);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1940);
+ stringBuffer.append(TEXT_1943);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1941);
+ stringBuffer.append(TEXT_1944);
for (org.eclipse.stem.model.codegen.STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){
if (stemGenFeature.getGenFeature().isChangeable()) {
if (stemGenFeature.hasPrimitiveAccessor()) {
- stringBuffer.append(TEXT_1942);
+ stringBuffer.append(TEXT_1945);
stringBuffer.append(stemGenFeature.getFullGetterName());
- stringBuffer.append(TEXT_1943);
+ stringBuffer.append(TEXT_1946);
stringBuffer.append(stemGenFeature.getFullGetterName());
- stringBuffer.append(TEXT_1944);
+ stringBuffer.append(TEXT_1947);
stringBuffer.append(stemGenFeature.getFullSetterName("-v."+stemGenFeature.getFullGetterName()));
- stringBuffer.append(TEXT_1945);
+ stringBuffer.append(TEXT_1948);
}//endifprimitiveaccessor
}//endifchangeable
}//endforgenfeatures
- stringBuffer.append(TEXT_1946);
+ stringBuffer.append(TEXT_1949);
String labelValueImportName = genModel.getImportedName("org.eclipse.stem.core.graph.LabelValue");
- stringBuffer.append(TEXT_1947);
+ stringBuffer.append(TEXT_1950);
stringBuffer.append(labelValueImportName);
- stringBuffer.append(TEXT_1948);
+ stringBuffer.append(TEXT_1951);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1949);
+ stringBuffer.append(TEXT_1952);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1950);
+ stringBuffer.append(TEXT_1953);
for (org.eclipse.stem.model.codegen.STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){
if (stemGenFeature.getGenFeature().isChangeable()) {
if (stemGenFeature.hasPrimitiveAccessor()) {
- stringBuffer.append(TEXT_1951);
+ stringBuffer.append(TEXT_1954);
stringBuffer.append(stemGenFeature.getFullGetterName());
- stringBuffer.append(TEXT_1952);
+ stringBuffer.append(TEXT_1955);
stringBuffer.append(stemGenFeature.getFullGetterName());
- stringBuffer.append(TEXT_1953);
+ stringBuffer.append(TEXT_1956);
}//endifprimitiveaccessor
}//endifchangeable
}//endforgenfeatures
- stringBuffer.append(TEXT_1954);
+ stringBuffer.append(TEXT_1957);
stringBuffer.append(integrationLabelValueImportName);
- stringBuffer.append(TEXT_1955);
+ stringBuffer.append(TEXT_1958);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1956);
+ stringBuffer.append(TEXT_1959);
stringBuffer.append(genModel.getImportedName(genPackage.getInterfacePackageName() +"."+ genPackage.getFactoryName()));
- stringBuffer.append(TEXT_1957);
+ stringBuffer.append(TEXT_1960);
stringBuffer.append( genPackage.getFactoryInstanceName() );
- stringBuffer.append(TEXT_1958);
+ stringBuffer.append(TEXT_1961);
stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_1959);
+ stringBuffer.append(TEXT_1962);
for (org.eclipse.stem.model.codegen.STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){
if (stemGenFeature.getGenFeature().isChangeable() && stemGenFeature.isIncidenceFeature()) {
if (stemGenFeature.hasPrimitiveAccessor()) {
- stringBuffer.append(TEXT_1960);
+ stringBuffer.append(TEXT_1963);
stringBuffer.append(stemGenFeature.getFullSetterName("0.0"));
- stringBuffer.append(TEXT_1961);
+ stringBuffer.append(TEXT_1964);
}//endifprimitiveaccessor
}//endifchangeable
}//endforgenfeatures
- stringBuffer.append(TEXT_1962);
+ stringBuffer.append(TEXT_1965);
} // end if integration label value
/* If this class extends PrimitiveTypeOperations, then generate primitive accessors for features*/
for (String primitiveType : stemGenClass.getPrimitiveAccessorTypes()) {
if (stemGenClass.shouldGeneratePrimitiveAccessors(primitiveType)) {
- stringBuffer.append(TEXT_1963);
+ stringBuffer.append(TEXT_1966);
stringBuffer.append(primitiveType);
- stringBuffer.append(TEXT_1964);
+ stringBuffer.append(TEXT_1967);
stringBuffer.append(stemGenClass.getPrimitiveGetterName(primitiveType));
- stringBuffer.append(TEXT_1965);
+ stringBuffer.append(TEXT_1968);
stringBuffer.append(negativeOffsetCorrection);
- stringBuffer.append(TEXT_1966);
+ stringBuffer.append(TEXT_1969);
for (GenFeature genFeature : genClass.getEGetGenFeatures()) {
if (genFeature.getImportedType(genClass).equals(primitiveType)) {
- stringBuffer.append(TEXT_1967);
+ stringBuffer.append(TEXT_1970);
stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
- stringBuffer.append(TEXT_1968);
+ stringBuffer.append(TEXT_1971);
stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1969);
+ stringBuffer.append(TEXT_1972);
}
}
- stringBuffer.append(TEXT_1970);
+ stringBuffer.append(TEXT_1973);
stringBuffer.append(stemGenClass.getPrimitiveGetterName(primitiveType));
- stringBuffer.append(TEXT_1971);
+ stringBuffer.append(TEXT_1974);
stringBuffer.append(stemGenClass.getPrimitiveSetterName(primitiveType));
- stringBuffer.append(TEXT_1972);
+ stringBuffer.append(TEXT_1975);
stringBuffer.append(primitiveType);
- stringBuffer.append(TEXT_1973);
+ stringBuffer.append(TEXT_1976);
stringBuffer.append(negativeOffsetCorrection);
- stringBuffer.append(TEXT_1974);
+ stringBuffer.append(TEXT_1977);
for (GenFeature genFeature : genClass.getESetGenFeatures()) {
if (genFeature.isChangeable() && genFeature.getImportedType(genClass).equals(primitiveType)) {
- stringBuffer.append(TEXT_1975);
+ stringBuffer.append(TEXT_1978);
stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
- stringBuffer.append(TEXT_1976);
+ stringBuffer.append(TEXT_1979);
stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1977);
+ stringBuffer.append(TEXT_1980);
}
}
- stringBuffer.append(TEXT_1978);
+ stringBuffer.append(TEXT_1981);
stringBuffer.append(stemGenClass.getPrimitiveSetterName(primitiveType));
- stringBuffer.append(TEXT_1979);
+ stringBuffer.append(TEXT_1982);
} // end if should generate for primitive type
- stringBuffer.append(TEXT_1980);
+ stringBuffer.append(TEXT_1983);
} // end for primitive types
} // end if implementation
/************* End STEM Code **************/
- stringBuffer.append(TEXT_1981);
- stringBuffer.append(TEXT_1982);
+ stringBuffer.append(TEXT_1984);
+ stringBuffer.append(TEXT_1985);
stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
// TODO fix the space above
genModel.emitSortedImports();
- stringBuffer.append(TEXT_1983);
+ stringBuffer.append(TEXT_1986);
return stringBuffer.toString();
}
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/stem/model/codegen/STEMGenClass.java b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/stem/model/codegen/STEMGenClass.java
index 699845391..856e8c716 100755
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/stem/model/codegen/STEMGenClass.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/src/org/eclipse/stem/model/codegen/STEMGenClass.java
@@ -100,7 +100,7 @@ public class STEMGenClass {
public List<STEMGenFeature> getSTEMGenFeatures() {
List<STEMGenFeature> features = new ArrayList<STEMGenFeature>();
- for (GenFeature genFeature : genClass.getGenFeatures()) {
+ for (GenFeature genFeature : genClass.getDeclaredGenFeatures()) {
features.add(STEMGenFeature.get(genFeature, genClass));
}
return features;
@@ -191,10 +191,38 @@ public class STEMGenClass {
}
public String getStringProviderClassName() {
+ EAnnotation annotation = getAdaptersAnnotation();
+ if (annotation != null) {
+ String editorClass = annotation.getDetails().get(
+ CodeGenConstants.STRING_PROVIDER_CLASS_KEY);
+ if (!GeneratorUtils.isNullOrEmpty(editorClass)) {
+ if (editorClass.indexOf('.') > -1) {
+ return editorClass;
+ } else {
+ return genClass.getGenPackage()
+ .getPresentationPackageName() + "." + editorClass;
+ }
+ }
+ }
+
return getDefaultStringProviderClassName();
}
public String getStringProviderSuperClassName() {
+ EAnnotation annotation = getAdaptersAnnotation();
+ if (annotation != null) {
+ String editorClass = annotation.getDetails().get(
+ CodeGenConstants.STRING_PROVIDER_SUPER_CLASS_KEY);
+ if (!GeneratorUtils.isNullOrEmpty(editorClass)) {
+ if (editorClass.indexOf('.') > -1) {
+ return editorClass;
+ } else {
+ return genClass.getGenPackage()
+ .getPresentationPackageName() + "." + editorClass;
+ }
+ }
+ }
+
return getDefaultStringProviderSuperClassName();
}
@@ -203,8 +231,7 @@ public class STEMGenClass {
if (annotation != null) {
String editorClass = annotation.getDetails().get(
CodeGenConstants.PROPERTY_EDITOR_CLASS_KEY);
- if (editorClass != null
- && !CodeGenConstants.EMPTY_STRING.equals(editorClass)) {
+ if (!GeneratorUtils.isNullOrEmpty(editorClass)) {
if (editorClass.indexOf('.') > -1) {
return editorClass;
} else {
@@ -237,9 +264,6 @@ public class STEMGenClass {
className = getDefaultPropertyEditorSuperClassName();
}
- // System.out.println("[PROP_EDIT_PARENT] " + genClass.getName()
- // +" => "+ className);
-
return className;
}
@@ -324,11 +348,39 @@ public class STEMGenClass {
}
public String getLabelRelativeValueProviderSuperClassName() {
+ EAnnotation annotation = getAdaptersAnnotation();
+ if (annotation != null) {
+ String labelRVPClass = annotation.getDetails().get(
+ CodeGenConstants.LABEL_RV_PROVIDER_SUPER_CLASS_KEY);
+ if (!GeneratorUtils.isNullOrEmpty(labelRVPClass)) {
+ if (labelRVPClass.indexOf('.') > -1) {
+ return labelRVPClass;
+ } else {
+ return genClass.getGenPackage()
+ .getPresentationPackageName() + "." + labelRVPClass;
+ }
+ }
+ }
+
return GeneratorUtils.getQualifiedJavaNameForDescriptor(getDescriptor()
.getLabelRelativeValueProvider());
}
public String getLabelValueRelativeValueProviderSuperClassName() {
+ EAnnotation annotation = getAdaptersAnnotation();
+ if (annotation != null) {
+ String labelRVPClass = annotation.getDetails().get(
+ CodeGenConstants.LABEL_VALUE_RV_PROVIDER_SUPER_CLASS_KEY);
+ if (!GeneratorUtils.isNullOrEmpty(labelRVPClass)) {
+ if (labelRVPClass.indexOf('.') > -1) {
+ return labelRVPClass;
+ } else {
+ return genClass.getGenPackage()
+ .getPresentationPackageName() + "." + labelRVPClass;
+ }
+ }
+ }
+
return GeneratorUtils.getQualifiedJavaNameForDescriptor(getDescriptor()
.getLabelValueRelativeValueProvider());
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/PropertyEditor.javajet b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/PropertyEditor.javajet
index 66d735673..6f15c124b 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/PropertyEditor.javajet
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/PropertyEditor.javajet
@@ -61,7 +61,13 @@ public class <%=genClass.getName()%>PropertyEditor extends
public void populate(<%=importedModelClassName%> object) {
super.populate(object);
+<%if (genClass.getImplementedGenFeatures().size() > 0) {%>
<%=genClass.getName()%> model = (<%=genClass.getName()%>)object;
+<%}else{%>
+ // Remove Comment If Adding Custom Code
+ //<%=genClass.getName()%> model = (<%=genClass.getName()%>)object;
+<%}%>
+
<% for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { %>
<%
//STEMGenFeature stemFeature = STEMGenFeature.get(genFeature);
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/WizardMessages.propertiesjet b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/WizardMessages.propertiesjet
index 11dcc9fb0..c0c10fdcf 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/WizardMessages.propertiesjet
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/editor/WizardMessages.propertiesjet
@@ -17,12 +17,12 @@
%>
<%
STEMGenPackage stemGenPackage = (STEMGenPackage)((Object[])argument)[0];
-GenPackage genPackage = stemGenPackage.getGenPackage();
+//GenPackage genPackage = stemGenPackage.getGenPackage();
%>
<%@ include file="../Header.propertiesjetinc"%>
-
<%for(STEMGenClass stemGenClass : stemGenPackage.getComputationalModelClasses()){%>
<%GenClass genClass = stemGenClass.getGenClass();%>
+# Messages for <%=genClass.getName()%>
<%for(STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){%>
<%GenFeature genFeature = stemGenFeature.getGenFeature();%>
<%=genClass.getName()%>.<%=genFeature.getName()%> = <%=stemGenFeature.getNameMessage()%>
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/model/Class.javajet b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/model/Class.javajet
index c6fa860fa..882657572 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/model/Class.javajet
+++ b/developer_tools/modelgen/org.eclipse.stem.model.codegen/templates/model/Class.javajet
@@ -2381,6 +2381,7 @@ if (index != -1) { head = typeName.substring(0, index); tail = typeName.substrin
* <!-- end-user-doc -->
* @generated
*/
+ @SuppressWarnings("unused")
@Override
public void calculateDeltas(<%=stemTimeImportName%> time, double t, long timeDelta, <%=elistImportName%><<%=dynamicLabelImportName%>> labels)
{
@@ -2833,7 +2834,7 @@ if (index != -1) { head = typeName.substring(0, index); tail = typeName.substrin
@Override
public boolean avoidNegative(<%=integrationLabelValueImportName%> value) {
<%=genClass.getName()%> v = (<%=genClass.getName()%>)value;
- boolean adjusted = super.avoidNegative(value);
+ boolean adjusted = super.avoidNegative(v);
<%for (org.eclipse.stem.model.codegen.STEMGenFeature stemGenFeature : stemGenClass.getSTEMGenFeatures()){%>
<%if (stemGenFeature.getGenFeature().isChangeable()) {%>
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.transform/src/org/eclipse/stem/model/transform/EPackageManager.java b/developer_tools/modelgen/org.eclipse.stem.model.transform/src/org/eclipse/stem/model/transform/EPackageManager.java
index 80e156b77..6e482d00b 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.transform/src/org/eclipse/stem/model/transform/EPackageManager.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.transform/src/org/eclipse/stem/model/transform/EPackageManager.java
@@ -229,7 +229,6 @@ public class EPackageManager {
IResource file = proxy.requestResource();
if (file instanceof IFile) {
files.add((IFile) file);
- System.out.println(file);
}
}
return true;
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/metamodel/presentation/MetamodelActionBarContributor.java b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/metamodel/presentation/MetamodelActionBarContributor.java
index 8800900e6..46695be68 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/metamodel/presentation/MetamodelActionBarContributor.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/metamodel/presentation/MetamodelActionBarContributor.java
@@ -95,9 +95,9 @@ public class MetamodelActionBarContributor extends
WizardDialog wizardDialog = new WizardDialog(getPage()
.getActivePart().getSite().getShell(), wizard);
if (wizardDialog.open() == Window.OK) {
- System.out.println("Ok pressed");
+
} else {
- System.out.println("Cancel pressed");
+
}
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/views/ModelPackageView.java b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/views/ModelPackageView.java
index 7010beed4..cade44cff 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/views/ModelPackageView.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/views/ModelPackageView.java
@@ -174,9 +174,9 @@ public class ModelPackageView extends ViewPart
ModelGeneratorWizard wizard = new ModelGeneratorWizard(basePackage);
WizardDialog wizardDialog = new WizardDialog(getSite().getShell(),wizard);
if (wizardDialog.open() == Window.OK) {
- System.out.println("Ok pressed");
+
} else {
- System.out.println("Cancel pressed");
+
}
diff --git a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/wizards/ModelGeneratorWizard.java b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/wizards/ModelGeneratorWizard.java
index b47ad6a8c..3fc0bfb86 100644
--- a/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/wizards/ModelGeneratorWizard.java
+++ b/developer_tools/modelgen/org.eclipse.stem.model.ui/src/org/eclipse/stem/model/ui/wizards/ModelGeneratorWizard.java
@@ -114,11 +114,6 @@ public class ModelGeneratorWizard extends Wizard {
// };
// job.schedule();
//// job.join();
-//
-//
-//
-//
-//// System.out.println();
// //printPackageInfos(javaProject);
// }

Back to the top