diff options
Diffstat (limited to 'platform_specific/2019-12/org.eclipse.egf.emf.pattern/templates/pattern._PnCsEDG0Ed-kc8dEZsdm2w/method._PnCsGTG0Ed-kc8dEZsdm2w.pt')
-rw-r--r-- | platform_specific/2019-12/org.eclipse.egf.emf.pattern/templates/pattern._PnCsEDG0Ed-kc8dEZsdm2w/method._PnCsGTG0Ed-kc8dEZsdm2w.pt | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/platform_specific/2019-12/org.eclipse.egf.emf.pattern/templates/pattern._PnCsEDG0Ed-kc8dEZsdm2w/method._PnCsGTG0Ed-kc8dEZsdm2w.pt b/platform_specific/2019-12/org.eclipse.egf.emf.pattern/templates/pattern._PnCsEDG0Ed-kc8dEZsdm2w/method._PnCsGTG0Ed-kc8dEZsdm2w.pt new file mode 100644 index 000000000..fbf5dcc37 --- /dev/null +++ b/platform_specific/2019-12/org.eclipse.egf.emf.pattern/templates/pattern._PnCsEDG0Ed-kc8dEZsdm2w/method._PnCsGTG0Ed-kc8dEZsdm2w.pt @@ -0,0 +1,142 @@ + +<% +/** + * Copyright (c) 2002-2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * IBM - Initial API and implementation + */ +%> +<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%> +<%final boolean isJDK50 = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50;%> +<%@ egf:patternCall patternId="platform:/plugin/org.eclipse.egf.emf.pattern.base/egf/EMF_Pattern_Base.fcore#LogicalName=org.eclipse.egf.emf.pattern.base.HeaderJava" args="parameter:argument"%> +package <%=genModel.getEditorPluginPackageName()%>; + +<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%> +<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%> +<%genModel.markImportLocation(stringBuffer);%> + +/** + * This is the central singleton for the <%=genModel.getModelName()%> editor plugin. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> +<%if (genModel.hasAPITags()) {%> + * <%=genModel.getAPITags(genModel.getIndentation(stringBuffer))%> +<%}%> + * @generated + */ +<%if (isJDK50 && genModel.hasAPIDeprecatedTag()) {%> +@Deprecated +<%}%> +public final class <%=genModel.getEditorPluginClassName()%> extends EMFPlugin +{ +<%if (genModel.hasCopyrightField()) {%> + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%> + +<%}%> + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final <%=genModel.getEditorPluginClassName()%> INSTANCE = new <%=genModel.getEditorPluginClassName()%>(); + +<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%> + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static Implementation plugin; + +<%}%> + /** + * Create the instance. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public <%=genModel.getEditorPluginClassName()%>() + { + super + (new ResourceLocator [] + { +<%for (String pluginClassName : genModel.getEditResourceDelegateImportedPluginClassNames()) {%> + <%=pluginClassName%>.INSTANCE, +<%}%> + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the singleton instance. + * @generated + */ +<%if (genModel.useClassOverrideAnnotation()) {%> + @Override +<%}%> + public ResourceLocator getPluginResourceLocator() + { +<%if (genModel.getRuntimePlatform() == GenRuntimePlatform.GWT) {%> + return null; +<%} else {%> + return plugin; +<%}%> + } + +<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%> + /** + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() + { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static class Implementation extends <%=genModel.getImportedName("org.eclipse.emf.common.ui.EclipseUIPlugin")%> + { + /** + * Creates an instance. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> +<%if (genModel.needsRuntimeCompatibility()) {%> + * @param descriptor the description of the plugin. +<%}%> + * @generated + */ + public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>) + { + super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>); + + // Remember the static instance. + // + plugin = this; + } + } + +<%}%> +} +<%genModel.emitSortedImports();%> |