eclipse plugin: update to xtext 1.0.0 (added missing files)
This commit is contained in:
parent
903a8da256
commit
0c51e1748a
48 changed files with 13073 additions and 0 deletions
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.xtext.Constants;
|
||||
import org.eclipse.xtext.service.DefaultRuntimeModule;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.name.Names;
|
||||
|
||||
/**
|
||||
* Manual modifications go to {org.wesnoth.WMLRuntimeModule}
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
|
||||
|
||||
protected Properties properties = null;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
properties = tryBindProperties(binder, "org/wesnoth/WML.properties");
|
||||
super.configure(binder);
|
||||
}
|
||||
|
||||
public void configureLanguageName(Binder binder) {
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.wesnoth.WML");
|
||||
}
|
||||
|
||||
public void configureFileExtensions(Binder binder) {
|
||||
if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("cfg");
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.grammarAccess.GrammarAccessFragment
|
||||
public Class<? extends org.eclipse.xtext.IGrammarAccess> bindIGrammarAccess() {
|
||||
return org.wesnoth.services.WMLGrammarAccess.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parseTreeConstructor.ParseTreeConstructorFragment
|
||||
public Class<? extends org.eclipse.xtext.parsetree.reconstr.IParseTreeConstructor> bindIParseTreeConstructor() {
|
||||
return org.wesnoth.parseTreeConstruction.WMLParsetreeConstructor.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
|
||||
return org.wesnoth.parser.antlr.WMLParser.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.ITokenToStringConverter> bindITokenToStringConverter() {
|
||||
return org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
|
||||
return org.wesnoth.parser.antlr.WMLAntlrTokenFileProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() {
|
||||
return org.wesnoth.parser.antlr.internal.InternalWMLLexer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public com.google.inject.Provider<org.wesnoth.parser.antlr.internal.InternalWMLLexer> provideInternalWMLLexer() {
|
||||
return org.eclipse.xtext.parser.antlr.LexerProvider.create(org.wesnoth.parser.antlr.internal.InternalWMLLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public void configureRuntimeLexer(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME)).to(org.wesnoth.parser.antlr.internal.InternalWMLLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.ITokenDefProvider> bindITokenDefProvider() {
|
||||
return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
|
||||
return org.eclipse.xtext.parser.antlr.UnorderedGroupHelper.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
|
||||
@org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.wesnoth.validation.WMLJavaValidator> bindWMLJavaValidator() {
|
||||
return org.wesnoth.validation.WMLJavaValidator.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
public Class<? extends org.eclipse.xtext.scoping.IScopeProvider> bindIScopeProvider() {
|
||||
return org.wesnoth.scoping.WMLScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named("org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.delegate")).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
public Class<? extends org.eclipse.xtext.scoping.IGlobalScopeProvider> bindIGlobalScopeProvider() {
|
||||
return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
|
||||
public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
|
||||
return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public Class<? extends org.eclipse.xtext.resource.IContainer.Manager> bindIContainer$Manager() {
|
||||
return org.eclipse.xtext.resource.containers.StateBasedContainerManager.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public Class<? extends org.eclipse.xtext.resource.containers.IAllContainersState.Provider> bindIAllContainersState$Provider() {
|
||||
return org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public void configureIResourceDescriptions(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
|
||||
public Class<? extends org.eclipse.xtext.formatting.IFormatter> bindIFormatter() {
|
||||
return org.wesnoth.formatting.WMLFormatter.class;
|
||||
}
|
||||
|
||||
}
|
47
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.ecore
Normal file
47
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.ecore
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ecore:EPackage xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="wML"
|
||||
nsURI="http://www.wesnoth.org/WML" nsPrefix="wML">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Root">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="textdomains" upperBound="-1"
|
||||
eType="#//TextDomain" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="preproc" upperBound="-1"
|
||||
eType="#//Preprocessor" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="roots" upperBound="-1"
|
||||
eType="#//RootType" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="TextDomain">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="DomainName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Preprocessor"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Macro" eSuperTypes="#//Preprocessor">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="macroName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="PathInclude" eSuperTypes="#//Preprocessor">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="RootType">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="startTag" eType="#//RootTag"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="subTypes" upperBound="-1"
|
||||
eType="#//RootType" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="at" upperBound="-1" eType="#//Attributes"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="okpreproc" upperBound="-1"
|
||||
eType="#//Preprocessor" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="endTag" eType="#//RootTag"
|
||||
containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="RootTag">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="tagName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="SimpleTag" eSuperTypes="#//RootTag">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endTag" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="AddedTag" eSuperTypes="#//RootTag"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Attributes">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attrName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="attrValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
45
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.genmodel
Normal file
45
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.genmodel
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<genmodel:GenModel xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.wesnoth.wml/src-gen"
|
||||
editDirectory="/org.wesnoth.wml.edit/src" editorDirectory="/org.wesnoth.wml.editor/src"
|
||||
modelPluginID="org.wesnoth.wml" forceOverwrite="true" modelName="WML" updateClasspath="false"
|
||||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="5.0"
|
||||
copyrightFields="false" editPluginID="org.wesnoth.wml.edit" editorPluginID="org.wesnoth.wml.editor">
|
||||
<genPackages prefix="WML" basePackage="org.wesnoth" disposableProviderFactory="true"
|
||||
ecorePackage="WML.ecore#/">
|
||||
<genClasses ecoreClass="WML.ecore#//Root">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//Root/textdomains"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//Root/preproc"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//Root/roots"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//TextDomain">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//TextDomain/DomainName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//Preprocessor"/>
|
||||
<genClasses ecoreClass="WML.ecore#//Macro">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//Macro/macroName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//PathInclude">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//PathInclude/path"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//RootType">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//RootType/startTag"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//RootType/subTypes"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//RootType/at"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//RootType/okpreproc"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//RootType/endTag"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//RootTag">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//RootTag/tagName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//SimpleTag">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//SimpleTag/endTag"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//AddedTag"/>
|
||||
<genClasses ecoreClass="WML.ecore#//Attributes">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//Attributes/attrName"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//Attributes/attrValue"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
350
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.xmi
Normal file
350
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/WML.xmi
Normal file
|
@ -0,0 +1,350 @@
|
|||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext" name="org.wesnoth.WML" definesHiddenTokens="true" hiddenTokens="//@rules.14 //@rules.13">
|
||||
<metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
|
||||
<ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
|
||||
</metamodelDeclarations>
|
||||
<metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="wML">
|
||||
<ePackage href="http://www.wesnoth.org/WML#/"/>
|
||||
</metamodelDeclarations>
|
||||
<rules xsi:type="xtext:ParserRule" name="Root">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//Root"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:UnorderedGroup">
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="textdomains" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="preproc" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="roots" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="TextDomain">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//TextDomain"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="#textdomain "/>
|
||||
<elements xsi:type="xtext:Assignment" feature="DomainName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="Preprocessor">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//Preprocessor"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.3"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.4"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="Macro">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//Macro"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="{"/>
|
||||
<elements xsi:type="xtext:Assignment" feature="macroName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="}"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="PathInclude">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//PathInclude"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="{"/>
|
||||
<elements xsi:type="xtext:Assignment" feature="path" operator="=">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.12"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="}"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="RootType">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//RootType"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:UnorderedGroup">
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="["/>
|
||||
<elements xsi:type="xtext:Assignment" feature="startTag" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="]"/>
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="subTypes" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="at" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Assignment" cardinality="*" feature="okpreproc" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="["/>
|
||||
<elements xsi:type="xtext:Keyword" value="/"/>
|
||||
<elements xsi:type="xtext:Assignment" feature="endTag" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="]"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="RootTag">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//RootTag"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.7"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.8"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="SimpleTag">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//SimpleTag"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Assignment" cardinality="?" feature="endTag" operator="?=">
|
||||
<terminal xsi:type="xtext:Keyword" value="/"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="tagName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="AddedTag">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//AddedTag"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="+"/>
|
||||
<elements xsi:type="xtext:Assignment" feature="tagName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="RootTagsList">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="Attributes">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//Attributes"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Assignment" feature="attrName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="="/>
|
||||
<elements xsi:type="xtext:Assignment" feature="attrValue" operator="=">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.11"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.17"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="TSTRING">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="_"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.17"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="HOMEPATH">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="~"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="#"/>
|
||||
<elements xsi:type="xtext:NegatedToken" cardinality="*">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Group" cardinality="?">
|
||||
<elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="WS">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Alternatives" cardinality="+">
|
||||
<elements xsi:type="xtext:Keyword" value=" "/>
|
||||
<elements xsi:type="xtext:Keyword" value="	"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="ID">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Alternatives" cardinality="+">
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="a"/>
|
||||
<right value="z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="A"/>
|
||||
<right value="Z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="_"/>
|
||||
<elements xsi:type="xtext:Keyword" value="-"/>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="0"/>
|
||||
<right value="9"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="IDLIST">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Group" cardinality="*">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<elements xsi:type="xtext:Keyword" value=","/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="STRING">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="""/>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="*">
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
<elements xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="b"/>
|
||||
<elements xsi:type="xtext:Keyword" value="t"/>
|
||||
<elements xsi:type="xtext:Keyword" value="n"/>
|
||||
<elements xsi:type="xtext:Keyword" value="f"/>
|
||||
<elements xsi:type="xtext:Keyword" value="r"/>
|
||||
<elements xsi:type="xtext:Keyword" value="""/>
|
||||
<elements xsi:type="xtext:Keyword" value="'"/>
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:NegatedToken">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
<elements xsi:type="xtext:Keyword" value="""/>
|
||||
</terminal>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="""/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="'"/>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="*">
|
||||
<elements xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
<elements xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="b"/>
|
||||
<elements xsi:type="xtext:Keyword" value="t"/>
|
||||
<elements xsi:type="xtext:Keyword" value="n"/>
|
||||
<elements xsi:type="xtext:Keyword" value="f"/>
|
||||
<elements xsi:type="xtext:Keyword" value="r"/>
|
||||
<elements xsi:type="xtext:Keyword" value="""/>
|
||||
<elements xsi:type="xtext:Keyword" value="'"/>
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:NegatedToken">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="\"/>
|
||||
<elements xsi:type="xtext:Keyword" value="'"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="'"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Wildcard"/>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="PATH">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Group" cardinality="*">
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="+">
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="a"/>
|
||||
<right value="z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="A"/>
|
||||
<right value="Z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="_"/>
|
||||
<elements xsi:type="xtext:Keyword" value="."/>
|
||||
<elements xsi:type="xtext:Keyword" value="-"/>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="0"/>
|
||||
<right value="9"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="/"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="+">
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="a"/>
|
||||
<right value="z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="A"/>
|
||||
<right value="Z"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="_"/>
|
||||
<elements xsi:type="xtext:Keyword" value="."/>
|
||||
<elements xsi:type="xtext:Keyword" value="-"/>
|
||||
<elements xsi:type="xtext:CharacterRange">
|
||||
<left value="0"/>
|
||||
<right value="9"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" cardinality="?" value="/"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
</xtext:Grammar>
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
package org.wesnoth;
|
||||
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.ISetup;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
* Generated from StandaloneSetup.xpt!
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class WMLStandaloneSetupGenerated implements ISetup {
|
||||
|
||||
public Injector createInjectorAndDoEMFRegistration() {
|
||||
// register default ePackages
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
"ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl());
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
"xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
|
||||
if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
|
||||
EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);
|
||||
|
||||
Injector injector = createInjector();
|
||||
register(injector);
|
||||
return injector;
|
||||
}
|
||||
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(new org.wesnoth.WMLRuntimeModule());
|
||||
}
|
||||
|
||||
public void register(Injector injector) {
|
||||
if (!EPackage.Registry.INSTANCE.containsKey("http://www.wesnoth.org/WML")) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.wesnoth.org/WML", org.wesnoth.wML.WMLPackage.eINSTANCE);
|
||||
}
|
||||
|
||||
org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
|
||||
org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("cfg", resourceFactory);
|
||||
org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("cfg", serviceProvider);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.parser.antlr;
|
||||
|
||||
import java.io.InputStream;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
|
||||
public class WMLAntlrTokenFileProvider implements IAntlrTokenFileProvider {
|
||||
|
||||
public InputStream getAntlrTokenFile() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
return classLoader.getResourceAsStream("org/wesnoth/parser/antlr/internal/InternalWML.tokens");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.parser.antlr;
|
||||
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.antlr.runtime.TokenSource;
|
||||
import org.eclipse.xtext.parser.IParseResult;
|
||||
import org.eclipse.xtext.parser.ParseException;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import org.wesnoth.services.WMLGrammarAccess;
|
||||
|
||||
public class WMLParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
|
||||
|
||||
@Inject
|
||||
private WMLGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
protected IParseResult parse(String ruleName, CharStream in) {
|
||||
TokenSource tokenSource = createLexer(in);
|
||||
XtextTokenStream tokenStream = createTokenStream(tokenSource);
|
||||
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_SL_COMMENT");
|
||||
org.wesnoth.parser.antlr.internal.InternalWMLParser parser = createParser(tokenStream);
|
||||
parser.setTokenTypeMap(getTokenDefProvider().getTokenDefMap());
|
||||
parser.setSyntaxErrorProvider(getSyntaxErrorProvider());
|
||||
parser.setUnorderedGroupHelper(getUnorderedGroupHelper().get());
|
||||
try {
|
||||
if(ruleName != null)
|
||||
return parser.parse(ruleName);
|
||||
return parser.parse();
|
||||
} catch (Exception re) {
|
||||
throw new ParseException(re.getMessage(),re);
|
||||
}
|
||||
}
|
||||
|
||||
protected org.wesnoth.parser.antlr.internal.InternalWMLParser createParser(XtextTokenStream stream) {
|
||||
return new org.wesnoth.parser.antlr.internal.InternalWMLParser(stream, getElementFactory(), getGrammarAccess());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultRuleName() {
|
||||
return "Root";
|
||||
}
|
||||
|
||||
public WMLGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(WMLGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,17 @@
|
|||
RULE_ID=4
|
||||
RULE_STRING=7
|
||||
RULE_IDLIST=6
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_PATH=5
|
||||
RULE_WS=9
|
||||
RULE_SL_COMMENT=8
|
||||
'}'=13
|
||||
'~'=20
|
||||
'='=18
|
||||
'/'=16
|
||||
'#textdomain '=11
|
||||
'['=14
|
||||
'+'=17
|
||||
'_'=19
|
||||
'{'=12
|
||||
']'=15
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,42 @@
|
|||
lexer grammar InternalWML;
|
||||
@header {
|
||||
package org.wesnoth.parser.antlr.internal;
|
||||
|
||||
// Hack: Use our own Lexer superclass by means of import.
|
||||
// Currently there is no other way to specify the superclass for the lexer.
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
}
|
||||
|
||||
T11 : '#textdomain ' ;
|
||||
T12 : '{' ;
|
||||
T13 : '}' ;
|
||||
T14 : '[' ;
|
||||
T15 : ']' ;
|
||||
T16 : '/' ;
|
||||
T17 : '+' ;
|
||||
T18 : '=' ;
|
||||
T19 : '_' ;
|
||||
T20 : '~' ;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1091
|
||||
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1093
|
||||
RULE_WS : (' '|'\t'|'\r'|'\n')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1095
|
||||
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1097
|
||||
RULE_IDLIST : (RULE_ID ',')* RULE_ID;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1099
|
||||
RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1101
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1103
|
||||
RULE_PATH : (('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/')* ('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/'?;
|
||||
|
||||
|
|
@ -0,0 +1,639 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
|
||||
package org.wesnoth.services;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import org.eclipse.xtext.*;
|
||||
import org.eclipse.xtext.service.GrammarProvider;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.*;
|
||||
|
||||
|
||||
@Singleton
|
||||
public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
|
||||
|
||||
public class RootElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Root");
|
||||
private final UnorderedGroup cUnorderedGroup = (UnorderedGroup)rule.eContents().get(1);
|
||||
private final Assignment cTextdomainsAssignment_0 = (Assignment)cUnorderedGroup.eContents().get(0);
|
||||
private final RuleCall cTextdomainsTextDomainParserRuleCall_0_0 = (RuleCall)cTextdomainsAssignment_0.eContents().get(0);
|
||||
private final Assignment cPreprocAssignment_1 = (Assignment)cUnorderedGroup.eContents().get(1);
|
||||
private final RuleCall cPreprocPreprocessorParserRuleCall_1_0 = (RuleCall)cPreprocAssignment_1.eContents().get(0);
|
||||
private final Assignment cRootsAssignment_2 = (Assignment)cUnorderedGroup.eContents().get(2);
|
||||
private final RuleCall cRootsRootTypeParserRuleCall_2_0 = (RuleCall)cRootsAssignment_2.eContents().get(0);
|
||||
|
||||
//Root:
|
||||
// textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*
|
||||
public UnorderedGroup getUnorderedGroup() { return cUnorderedGroup; }
|
||||
|
||||
//textdomains+=TextDomain*
|
||||
public Assignment getTextdomainsAssignment_0() { return cTextdomainsAssignment_0; }
|
||||
|
||||
//TextDomain
|
||||
public RuleCall getTextdomainsTextDomainParserRuleCall_0_0() { return cTextdomainsTextDomainParserRuleCall_0_0; }
|
||||
|
||||
//preproc+=Preprocessor*
|
||||
public Assignment getPreprocAssignment_1() { return cPreprocAssignment_1; }
|
||||
|
||||
//Preprocessor
|
||||
public RuleCall getPreprocPreprocessorParserRuleCall_1_0() { return cPreprocPreprocessorParserRuleCall_1_0; }
|
||||
|
||||
//roots+=RootType*
|
||||
public Assignment getRootsAssignment_2() { return cRootsAssignment_2; }
|
||||
|
||||
//RootType
|
||||
public RuleCall getRootsRootTypeParserRuleCall_2_0() { return cRootsRootTypeParserRuleCall_2_0; }
|
||||
}
|
||||
|
||||
public class TextDomainElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TextDomain");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cTextdomainKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final Assignment cDomainNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cDomainNameIDTerminalRuleCall_1_0 = (RuleCall)cDomainNameAssignment_1.eContents().get(0);
|
||||
|
||||
//TextDomain:
|
||||
// "#textdomain " DomainName=ID;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"#textdomain " DomainName=ID
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"#textdomain "
|
||||
public Keyword getTextdomainKeyword_0() { return cTextdomainKeyword_0; }
|
||||
|
||||
//DomainName=ID
|
||||
public Assignment getDomainNameAssignment_1() { return cDomainNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getDomainNameIDTerminalRuleCall_1_0() { return cDomainNameIDTerminalRuleCall_1_0; }
|
||||
}
|
||||
|
||||
public class PreprocessorElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Preprocessor");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final RuleCall cMacroParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
|
||||
private final RuleCall cPathIncludeParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
|
||||
|
||||
//Preprocessor:
|
||||
// Macro | PathInclude;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//Macro | PathInclude
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//Macro
|
||||
public RuleCall getMacroParserRuleCall_0() { return cMacroParserRuleCall_0; }
|
||||
|
||||
//PathInclude
|
||||
public RuleCall getPathIncludeParserRuleCall_1() { return cPathIncludeParserRuleCall_1; }
|
||||
}
|
||||
|
||||
public class MacroElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Macro");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cLeftCurlyBracketKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final Assignment cMacroNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cMacroNameIDTerminalRuleCall_1_0 = (RuleCall)cMacroNameAssignment_1.eContents().get(0);
|
||||
private final Keyword cRightCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
|
||||
|
||||
//Macro:
|
||||
// "{" macroName=ID "}";
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"{" macroName=ID "}"
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"{"
|
||||
public Keyword getLeftCurlyBracketKeyword_0() { return cLeftCurlyBracketKeyword_0; }
|
||||
|
||||
//macroName=ID
|
||||
public Assignment getMacroNameAssignment_1() { return cMacroNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getMacroNameIDTerminalRuleCall_1_0() { return cMacroNameIDTerminalRuleCall_1_0; }
|
||||
|
||||
//"}"
|
||||
public Keyword getRightCurlyBracketKeyword_2() { return cRightCurlyBracketKeyword_2; }
|
||||
}
|
||||
|
||||
public class PathIncludeElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "PathInclude");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cLeftCurlyBracketKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final Assignment cPathAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final Alternatives cPathAlternatives_1_0 = (Alternatives)cPathAssignment_1.eContents().get(0);
|
||||
private final RuleCall cPathHOMEPATHParserRuleCall_1_0_0 = (RuleCall)cPathAlternatives_1_0.eContents().get(0);
|
||||
private final RuleCall cPathPATHTerminalRuleCall_1_0_1 = (RuleCall)cPathAlternatives_1_0.eContents().get(1);
|
||||
private final Keyword cRightCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
|
||||
|
||||
//PathInclude:
|
||||
// "{" path=(HOMEPATH | PATH) "}";
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"{" path=(HOMEPATH | PATH) "}"
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"{"
|
||||
public Keyword getLeftCurlyBracketKeyword_0() { return cLeftCurlyBracketKeyword_0; }
|
||||
|
||||
//path=(HOMEPATH | PATH)
|
||||
public Assignment getPathAssignment_1() { return cPathAssignment_1; }
|
||||
|
||||
//HOMEPATH | PATH
|
||||
public Alternatives getPathAlternatives_1_0() { return cPathAlternatives_1_0; }
|
||||
|
||||
//HOMEPATH
|
||||
public RuleCall getPathHOMEPATHParserRuleCall_1_0_0() { return cPathHOMEPATHParserRuleCall_1_0_0; }
|
||||
|
||||
//PATH
|
||||
public RuleCall getPathPATHTerminalRuleCall_1_0_1() { return cPathPATHTerminalRuleCall_1_0_1; }
|
||||
|
||||
//"}"
|
||||
public Keyword getRightCurlyBracketKeyword_2() { return cRightCurlyBracketKeyword_2; }
|
||||
}
|
||||
|
||||
public class RootTypeElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RootType");
|
||||
private final UnorderedGroup cUnorderedGroup = (UnorderedGroup)rule.eContents().get(1);
|
||||
private final Group cGroup_0 = (Group)cUnorderedGroup.eContents().get(0);
|
||||
private final Keyword cLeftSquareBracketKeyword_0_0 = (Keyword)cGroup_0.eContents().get(0);
|
||||
private final Assignment cStartTagAssignment_0_1 = (Assignment)cGroup_0.eContents().get(1);
|
||||
private final RuleCall cStartTagRootTagParserRuleCall_0_1_0 = (RuleCall)cStartTagAssignment_0_1.eContents().get(0);
|
||||
private final Keyword cRightSquareBracketKeyword_0_2 = (Keyword)cGroup_0.eContents().get(2);
|
||||
private final Assignment cSubTypesAssignment_0_3 = (Assignment)cGroup_0.eContents().get(3);
|
||||
private final RuleCall cSubTypesRootTypeParserRuleCall_0_3_0 = (RuleCall)cSubTypesAssignment_0_3.eContents().get(0);
|
||||
private final Assignment cAtAssignment_1 = (Assignment)cUnorderedGroup.eContents().get(1);
|
||||
private final RuleCall cAtAttributesParserRuleCall_1_0 = (RuleCall)cAtAssignment_1.eContents().get(0);
|
||||
private final Group cGroup_2 = (Group)cUnorderedGroup.eContents().get(2);
|
||||
private final Assignment cOkpreprocAssignment_2_0 = (Assignment)cGroup_2.eContents().get(0);
|
||||
private final RuleCall cOkpreprocPreprocessorParserRuleCall_2_0_0 = (RuleCall)cOkpreprocAssignment_2_0.eContents().get(0);
|
||||
private final Keyword cLeftSquareBracketKeyword_2_1 = (Keyword)cGroup_2.eContents().get(1);
|
||||
private final Keyword cSolidusKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
|
||||
private final Assignment cEndTagAssignment_2_3 = (Assignment)cGroup_2.eContents().get(3);
|
||||
private final RuleCall cEndTagRootTagParserRuleCall_2_3_0 = (RuleCall)cEndTagAssignment_2_3.eContents().get(0);
|
||||
private final Keyword cRightSquareBracketKeyword_2_4 = (Keyword)cGroup_2.eContents().get(4);
|
||||
|
||||
//RootType:
|
||||
// "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
|
||||
public UnorderedGroup getUnorderedGroup() { return cUnorderedGroup; }
|
||||
|
||||
//"[" startTag=RootTag "]" subTypes+=RootType*
|
||||
public Group getGroup_0() { return cGroup_0; }
|
||||
|
||||
//"["
|
||||
public Keyword getLeftSquareBracketKeyword_0_0() { return cLeftSquareBracketKeyword_0_0; }
|
||||
|
||||
//startTag=RootTag
|
||||
public Assignment getStartTagAssignment_0_1() { return cStartTagAssignment_0_1; }
|
||||
|
||||
//RootTag
|
||||
public RuleCall getStartTagRootTagParserRuleCall_0_1_0() { return cStartTagRootTagParserRuleCall_0_1_0; }
|
||||
|
||||
//"]"
|
||||
public Keyword getRightSquareBracketKeyword_0_2() { return cRightSquareBracketKeyword_0_2; }
|
||||
|
||||
//subTypes+=RootType*
|
||||
public Assignment getSubTypesAssignment_0_3() { return cSubTypesAssignment_0_3; }
|
||||
|
||||
//RootType
|
||||
public RuleCall getSubTypesRootTypeParserRuleCall_0_3_0() { return cSubTypesRootTypeParserRuleCall_0_3_0; }
|
||||
|
||||
//at+=Attributes*
|
||||
public Assignment getAtAssignment_1() { return cAtAssignment_1; }
|
||||
|
||||
//Attributes
|
||||
public RuleCall getAtAttributesParserRuleCall_1_0() { return cAtAttributesParserRuleCall_1_0; }
|
||||
|
||||
//okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
|
||||
public Group getGroup_2() { return cGroup_2; }
|
||||
|
||||
//okpreproc+=Preprocessor*
|
||||
public Assignment getOkpreprocAssignment_2_0() { return cOkpreprocAssignment_2_0; }
|
||||
|
||||
//Preprocessor
|
||||
public RuleCall getOkpreprocPreprocessorParserRuleCall_2_0_0() { return cOkpreprocPreprocessorParserRuleCall_2_0_0; }
|
||||
|
||||
//"["
|
||||
public Keyword getLeftSquareBracketKeyword_2_1() { return cLeftSquareBracketKeyword_2_1; }
|
||||
|
||||
//"/"
|
||||
public Keyword getSolidusKeyword_2_2() { return cSolidusKeyword_2_2; }
|
||||
|
||||
//endTag=RootTag
|
||||
public Assignment getEndTagAssignment_2_3() { return cEndTagAssignment_2_3; }
|
||||
|
||||
//RootTag
|
||||
public RuleCall getEndTagRootTagParserRuleCall_2_3_0() { return cEndTagRootTagParserRuleCall_2_3_0; }
|
||||
|
||||
//"]"
|
||||
public Keyword getRightSquareBracketKeyword_2_4() { return cRightSquareBracketKeyword_2_4; }
|
||||
}
|
||||
|
||||
public class RootTagElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RootTag");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final RuleCall cSimpleTagParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
|
||||
private final RuleCall cAddedTagParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
|
||||
|
||||
//RootTag:
|
||||
// SimpleTag | AddedTag;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//SimpleTag | AddedTag
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//SimpleTag
|
||||
public RuleCall getSimpleTagParserRuleCall_0() { return cSimpleTagParserRuleCall_0; }
|
||||
|
||||
//AddedTag
|
||||
public RuleCall getAddedTagParserRuleCall_1() { return cAddedTagParserRuleCall_1; }
|
||||
}
|
||||
|
||||
public class SimpleTagElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SimpleTag");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cEndTagAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final Keyword cEndTagSolidusKeyword_0_0 = (Keyword)cEndTagAssignment_0.eContents().get(0);
|
||||
private final Assignment cTagNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cTagNameRootTagsListParserRuleCall_1_0 = (RuleCall)cTagNameAssignment_1.eContents().get(0);
|
||||
|
||||
//SimpleTag:
|
||||
// endTag?="/"? tagName=RootTagsList;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//endTag?="/"? tagName=RootTagsList
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//endTag?="/"?
|
||||
public Assignment getEndTagAssignment_0() { return cEndTagAssignment_0; }
|
||||
|
||||
//"/"
|
||||
public Keyword getEndTagSolidusKeyword_0_0() { return cEndTagSolidusKeyword_0_0; }
|
||||
|
||||
//tagName=RootTagsList
|
||||
public Assignment getTagNameAssignment_1() { return cTagNameAssignment_1; }
|
||||
|
||||
//RootTagsList
|
||||
public RuleCall getTagNameRootTagsListParserRuleCall_1_0() { return cTagNameRootTagsListParserRuleCall_1_0; }
|
||||
}
|
||||
|
||||
public class AddedTagElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "AddedTag");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cPlusSignKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final Assignment cTagNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cTagNameRootTagsListParserRuleCall_1_0 = (RuleCall)cTagNameAssignment_1.eContents().get(0);
|
||||
|
||||
//AddedTag:
|
||||
// "+" tagName=RootTagsList;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"+" tagName=RootTagsList
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"+"
|
||||
public Keyword getPlusSignKeyword_0() { return cPlusSignKeyword_0; }
|
||||
|
||||
//tagName=RootTagsList
|
||||
public Assignment getTagNameAssignment_1() { return cTagNameAssignment_1; }
|
||||
|
||||
//RootTagsList
|
||||
public RuleCall getTagNameRootTagsListParserRuleCall_1_0() { return cTagNameRootTagsListParserRuleCall_1_0; }
|
||||
}
|
||||
|
||||
public class RootTagsListElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RootTagsList");
|
||||
private final RuleCall cIDTerminalRuleCall = (RuleCall)rule.eContents().get(1);
|
||||
|
||||
////'about' | 'binary_path' | 'campaign' | 'textdomain' | 'units';
|
||||
//RootTagsList returns ecore::EString:
|
||||
// ID;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//ID
|
||||
public RuleCall getIDTerminalRuleCall() { return cIDTerminalRuleCall; }
|
||||
}
|
||||
|
||||
public class AttributesElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Attributes");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cAttrNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cAttrNameIDTerminalRuleCall_0_0 = (RuleCall)cAttrNameAssignment_0.eContents().get(0);
|
||||
private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
|
||||
private final Assignment cAttrValueAssignment_2 = (Assignment)cGroup.eContents().get(2);
|
||||
private final Alternatives cAttrValueAlternatives_2_0 = (Alternatives)cAttrValueAssignment_2.eContents().get(0);
|
||||
private final RuleCall cAttrValueIDTerminalRuleCall_2_0_0 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(0);
|
||||
private final RuleCall cAttrValueIDLISTTerminalRuleCall_2_0_1 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(1);
|
||||
private final RuleCall cAttrValueTSTRINGParserRuleCall_2_0_2 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(2);
|
||||
private final RuleCall cAttrValueSTRINGTerminalRuleCall_2_0_3 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(3);
|
||||
private final RuleCall cAttrValuePATHTerminalRuleCall_2_0_4 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(4);
|
||||
|
||||
//Attributes:
|
||||
// attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH);
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//attrName=ID
|
||||
public Assignment getAttrNameAssignment_0() { return cAttrNameAssignment_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getAttrNameIDTerminalRuleCall_0_0() { return cAttrNameIDTerminalRuleCall_0_0; }
|
||||
|
||||
//"="
|
||||
public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; }
|
||||
|
||||
//attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
|
||||
public Assignment getAttrValueAssignment_2() { return cAttrValueAssignment_2; }
|
||||
|
||||
//ID | IDLIST | TSTRING | STRING | PATH
|
||||
public Alternatives getAttrValueAlternatives_2_0() { return cAttrValueAlternatives_2_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getAttrValueIDTerminalRuleCall_2_0_0() { return cAttrValueIDTerminalRuleCall_2_0_0; }
|
||||
|
||||
//IDLIST
|
||||
public RuleCall getAttrValueIDLISTTerminalRuleCall_2_0_1() { return cAttrValueIDLISTTerminalRuleCall_2_0_1; }
|
||||
|
||||
//TSTRING
|
||||
public RuleCall getAttrValueTSTRINGParserRuleCall_2_0_2() { return cAttrValueTSTRINGParserRuleCall_2_0_2; }
|
||||
|
||||
//STRING
|
||||
public RuleCall getAttrValueSTRINGTerminalRuleCall_2_0_3() { return cAttrValueSTRINGTerminalRuleCall_2_0_3; }
|
||||
|
||||
//PATH
|
||||
public RuleCall getAttrValuePATHTerminalRuleCall_2_0_4() { return cAttrValuePATHTerminalRuleCall_2_0_4; }
|
||||
}
|
||||
|
||||
public class TSTRINGElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "TSTRING");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword c_Keyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final RuleCall cSTRINGTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
|
||||
|
||||
//// translatable string
|
||||
//TSTRING returns ecore::EString:
|
||||
// "_" STRING;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"_" STRING
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"_"
|
||||
public Keyword get_Keyword_0() { return c_Keyword_0; }
|
||||
|
||||
//STRING
|
||||
public RuleCall getSTRINGTerminalRuleCall_1() { return cSTRINGTerminalRuleCall_1; }
|
||||
}
|
||||
|
||||
public class HOMEPATHElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "HOMEPATH");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cTildeKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final RuleCall cPATHTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
|
||||
|
||||
//HOMEPATH returns ecore::EString:
|
||||
// "~" PATH;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//"~" PATH
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//"~"
|
||||
public Keyword getTildeKeyword_0() { return cTildeKeyword_0; }
|
||||
|
||||
//PATH
|
||||
public RuleCall getPATHTerminalRuleCall_1() { return cPATHTerminalRuleCall_1; }
|
||||
}
|
||||
|
||||
|
||||
private RootElements pRoot;
|
||||
private TextDomainElements pTextDomain;
|
||||
private PreprocessorElements pPreprocessor;
|
||||
private MacroElements pMacro;
|
||||
private PathIncludeElements pPathInclude;
|
||||
private RootTypeElements pRootType;
|
||||
private RootTagElements pRootTag;
|
||||
private SimpleTagElements pSimpleTag;
|
||||
private AddedTagElements pAddedTag;
|
||||
private RootTagsListElements pRootTagsList;
|
||||
private AttributesElements pAttributes;
|
||||
private TSTRINGElements pTSTRING;
|
||||
private HOMEPATHElements pHOMEPATH;
|
||||
private TerminalRule tSL_COMMENT;
|
||||
private TerminalRule tWS;
|
||||
private TerminalRule tID;
|
||||
private TerminalRule tIDLIST;
|
||||
private TerminalRule tSTRING;
|
||||
private TerminalRule tANY_OTHER;
|
||||
private TerminalRule tPATH;
|
||||
|
||||
private final GrammarProvider grammarProvider;
|
||||
|
||||
@Inject
|
||||
public WMLGrammarAccess(GrammarProvider grammarProvider) {
|
||||
this.grammarProvider = grammarProvider;
|
||||
}
|
||||
|
||||
public Grammar getGrammar() {
|
||||
return grammarProvider.getGrammar(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Root:
|
||||
// textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*;
|
||||
public RootElements getRootAccess() {
|
||||
return (pRoot != null) ? pRoot : (pRoot = new RootElements());
|
||||
}
|
||||
|
||||
public ParserRule getRootRule() {
|
||||
return getRootAccess().getRule();
|
||||
}
|
||||
|
||||
//TextDomain:
|
||||
// "#textdomain " DomainName=ID;
|
||||
public TextDomainElements getTextDomainAccess() {
|
||||
return (pTextDomain != null) ? pTextDomain : (pTextDomain = new TextDomainElements());
|
||||
}
|
||||
|
||||
public ParserRule getTextDomainRule() {
|
||||
return getTextDomainAccess().getRule();
|
||||
}
|
||||
|
||||
//Preprocessor:
|
||||
// Macro | PathInclude;
|
||||
public PreprocessorElements getPreprocessorAccess() {
|
||||
return (pPreprocessor != null) ? pPreprocessor : (pPreprocessor = new PreprocessorElements());
|
||||
}
|
||||
|
||||
public ParserRule getPreprocessorRule() {
|
||||
return getPreprocessorAccess().getRule();
|
||||
}
|
||||
|
||||
//Macro:
|
||||
// "{" macroName=ID "}";
|
||||
public MacroElements getMacroAccess() {
|
||||
return (pMacro != null) ? pMacro : (pMacro = new MacroElements());
|
||||
}
|
||||
|
||||
public ParserRule getMacroRule() {
|
||||
return getMacroAccess().getRule();
|
||||
}
|
||||
|
||||
//PathInclude:
|
||||
// "{" path=(HOMEPATH | PATH) "}";
|
||||
public PathIncludeElements getPathIncludeAccess() {
|
||||
return (pPathInclude != null) ? pPathInclude : (pPathInclude = new PathIncludeElements());
|
||||
}
|
||||
|
||||
public ParserRule getPathIncludeRule() {
|
||||
return getPathIncludeAccess().getRule();
|
||||
}
|
||||
|
||||
//RootType:
|
||||
// "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
|
||||
public RootTypeElements getRootTypeAccess() {
|
||||
return (pRootType != null) ? pRootType : (pRootType = new RootTypeElements());
|
||||
}
|
||||
|
||||
public ParserRule getRootTypeRule() {
|
||||
return getRootTypeAccess().getRule();
|
||||
}
|
||||
|
||||
//RootTag:
|
||||
// SimpleTag | AddedTag;
|
||||
public RootTagElements getRootTagAccess() {
|
||||
return (pRootTag != null) ? pRootTag : (pRootTag = new RootTagElements());
|
||||
}
|
||||
|
||||
public ParserRule getRootTagRule() {
|
||||
return getRootTagAccess().getRule();
|
||||
}
|
||||
|
||||
//SimpleTag:
|
||||
// endTag?="/"? tagName=RootTagsList;
|
||||
public SimpleTagElements getSimpleTagAccess() {
|
||||
return (pSimpleTag != null) ? pSimpleTag : (pSimpleTag = new SimpleTagElements());
|
||||
}
|
||||
|
||||
public ParserRule getSimpleTagRule() {
|
||||
return getSimpleTagAccess().getRule();
|
||||
}
|
||||
|
||||
//AddedTag:
|
||||
// "+" tagName=RootTagsList;
|
||||
public AddedTagElements getAddedTagAccess() {
|
||||
return (pAddedTag != null) ? pAddedTag : (pAddedTag = new AddedTagElements());
|
||||
}
|
||||
|
||||
public ParserRule getAddedTagRule() {
|
||||
return getAddedTagAccess().getRule();
|
||||
}
|
||||
|
||||
////'about' | 'binary_path' | 'campaign' | 'textdomain' | 'units';
|
||||
//RootTagsList returns ecore::EString:
|
||||
// ID;
|
||||
public RootTagsListElements getRootTagsListAccess() {
|
||||
return (pRootTagsList != null) ? pRootTagsList : (pRootTagsList = new RootTagsListElements());
|
||||
}
|
||||
|
||||
public ParserRule getRootTagsListRule() {
|
||||
return getRootTagsListAccess().getRule();
|
||||
}
|
||||
|
||||
//Attributes:
|
||||
// attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH);
|
||||
public AttributesElements getAttributesAccess() {
|
||||
return (pAttributes != null) ? pAttributes : (pAttributes = new AttributesElements());
|
||||
}
|
||||
|
||||
public ParserRule getAttributesRule() {
|
||||
return getAttributesAccess().getRule();
|
||||
}
|
||||
|
||||
//// translatable string
|
||||
//TSTRING returns ecore::EString:
|
||||
// "_" STRING;
|
||||
public TSTRINGElements getTSTRINGAccess() {
|
||||
return (pTSTRING != null) ? pTSTRING : (pTSTRING = new TSTRINGElements());
|
||||
}
|
||||
|
||||
public ParserRule getTSTRINGRule() {
|
||||
return getTSTRINGAccess().getRule();
|
||||
}
|
||||
|
||||
//HOMEPATH returns ecore::EString:
|
||||
// "~" PATH;
|
||||
public HOMEPATHElements getHOMEPATHAccess() {
|
||||
return (pHOMEPATH != null) ? pHOMEPATH : (pHOMEPATH = new HOMEPATHElements());
|
||||
}
|
||||
|
||||
public ParserRule getHOMEPATHRule() {
|
||||
return getHOMEPATHAccess().getRule();
|
||||
}
|
||||
|
||||
//// ==== TERMINAL RULES ====
|
||||
//terminal SL_COMMENT:
|
||||
// "#" !("\n" | "\r")* ("\r"? "\n")?;
|
||||
public TerminalRule getSL_COMMENTRule() {
|
||||
return (tSL_COMMENT != null) ? tSL_COMMENT : (tSL_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "SL_COMMENT"));
|
||||
}
|
||||
|
||||
//terminal WS:
|
||||
// (" " | "\t" | "\r" | "\n")+;
|
||||
public TerminalRule getWSRule() {
|
||||
return (tWS != null) ? tWS : (tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "WS"));
|
||||
}
|
||||
|
||||
//// no multiline comment defined on WML,
|
||||
//// terminal ML_COMMENT: '#' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
//terminal ID:
|
||||
// ("a".."z" | "A".."Z" | "_" | "-" | "0".."9")+;
|
||||
public TerminalRule getIDRule() {
|
||||
return (tID != null) ? tID : (tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ID"));
|
||||
}
|
||||
|
||||
//terminal IDLIST:
|
||||
// (ID ",")* ID;
|
||||
public TerminalRule getIDLISTRule() {
|
||||
return (tIDLIST != null) ? tIDLIST : (tIDLIST = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "IDLIST"));
|
||||
}
|
||||
|
||||
////terminal INT returns ecore::EInt: ('0'..'9')+;
|
||||
//terminal STRING:
|
||||
// "\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" | "n" |
|
||||
// "f" | "r" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
|
||||
public TerminalRule getSTRINGRule() {
|
||||
return (tSTRING != null) ? tSTRING : (tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "STRING"));
|
||||
}
|
||||
|
||||
//terminal ANY_OTHER:
|
||||
// .;
|
||||
public TerminalRule getANY_OTHERRule() {
|
||||
return (tANY_OTHER != null) ? tANY_OTHER : (tANY_OTHER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ANY_OTHER"));
|
||||
}
|
||||
|
||||
////terminal WORD_START: ' ' | '=';
|
||||
////terminal WORD_END : '#' | ' ';
|
||||
//// line end
|
||||
////('"')?
|
||||
////('"')?
|
||||
//terminal PATH:
|
||||
// (("a".."z" | "A".."Z" | "_" | "." | "-" | "0".."9")+ "/")* ("a".."z" | "A".."Z" | "_" | "." | "-" | "0".."9")+ "/"?;
|
||||
public TerminalRule getPATHRule() {
|
||||
return (tPATH != null) ? tPATH : (tPATH = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "PATH"));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.wesnoth.validation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
|
||||
import org.eclipse.xtext.validation.ComposedChecks;
|
||||
|
||||
@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class, org.eclipse.xtext.validation.NamesAreUniqueValidator.class})
|
||||
public class AbstractWMLJavaValidator extends AbstractDeclarativeValidator {
|
||||
|
||||
@Override
|
||||
protected List<EPackage> getEPackages() {
|
||||
List<EPackage> result = new ArrayList<EPackage>();
|
||||
result.add(org.wesnoth.wML.WMLPackage.eINSTANCE);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Added Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getAddedTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface AddedTag extends RootTag
|
||||
{
|
||||
} // AddedTag
|
|
@ -0,0 +1,81 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Attributes</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.Attributes#getAttrName <em>Attr Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.Attributes#getAttrValue <em>Attr Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getAttributes()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Attributes extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Attr Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Attr Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Attr Name</em>' attribute.
|
||||
* @see #setAttrName(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getAttributes_AttrName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getAttrName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.Attributes#getAttrName <em>Attr Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Attr Name</em>' attribute.
|
||||
* @see #getAttrName()
|
||||
* @generated
|
||||
*/
|
||||
void setAttrName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Attr Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Attr Value</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Attr Value</em>' attribute.
|
||||
* @see #setAttrValue(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getAttributes_AttrValue()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getAttrValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.Attributes#getAttrValue <em>Attr Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Attr Value</em>' attribute.
|
||||
* @see #getAttrValue()
|
||||
* @generated
|
||||
*/
|
||||
void setAttrValue(String value);
|
||||
|
||||
} // Attributes
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Macro</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getMacro()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Macro extends Preprocessor
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Macro Name</em>' attribute.
|
||||
* @see #setMacroName(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getMacro_MacroName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getMacroName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Macro Name</em>' attribute.
|
||||
* @see #getMacroName()
|
||||
* @generated
|
||||
*/
|
||||
void setMacroName(String value);
|
||||
|
||||
} // Macro
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Path Include</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.PathInclude#getPath <em>Path</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getPathInclude()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface PathInclude extends Preprocessor
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Path</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Path</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Path</em>' attribute.
|
||||
* @see #setPath(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getPathInclude_Path()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getPath();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.PathInclude#getPath <em>Path</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Path</em>' attribute.
|
||||
* @see #getPath()
|
||||
* @generated
|
||||
*/
|
||||
void setPath(String value);
|
||||
|
||||
} // PathInclude
|
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Preprocessor</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getPreprocessor()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Preprocessor extends EObject
|
||||
{
|
||||
} // Preprocessor
|
80
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/wML/Root.java
Normal file
80
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/wML/Root.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.Root#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.Root#getPreproc <em>Preproc</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.Root#getRoots <em>Roots</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getRoot()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Root extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.TextDomain}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Textdomains</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Textdomains</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRoot_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<TextDomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Preproc</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.Preprocessor}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Preproc</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Preproc</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRoot_Preproc()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<Preprocessor> getPreproc();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Roots</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.RootType}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Roots</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Roots</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRoot_Roots()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<RootType> getRoots();
|
||||
|
||||
} // Root
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Root Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.RootTag#getTagName <em>Tag Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface RootTag extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tag Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tag Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Tag Name</em>' attribute.
|
||||
* @see #setTagName(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootTag_TagName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getTagName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.RootTag#getTagName <em>Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Tag Name</em>' attribute.
|
||||
* @see #getTagName()
|
||||
* @generated
|
||||
*/
|
||||
void setTagName(String value);
|
||||
|
||||
} // RootTag
|
134
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/wML/RootType.java
Normal file
134
utils/java/org.wesnoth.wml/src-gen/org/wesnoth/wML/RootType.java
Normal file
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Root Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.RootType#getStartTag <em>Start Tag</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.RootType#getSubTypes <em>Sub Types</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.RootType#getAt <em>At</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.RootType#getOkpreproc <em>Okpreproc</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.RootType#getEndTag <em>End Tag</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface RootType extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Start Tag</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Start Tag</em>' containment reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Start Tag</em>' containment reference.
|
||||
* @see #setStartTag(RootTag)
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType_StartTag()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
RootTag getStartTag();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.RootType#getStartTag <em>Start Tag</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Start Tag</em>' containment reference.
|
||||
* @see #getStartTag()
|
||||
* @generated
|
||||
*/
|
||||
void setStartTag(RootTag value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Sub Types</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.RootType}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Sub Types</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Sub Types</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType_SubTypes()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<RootType> getSubTypes();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>At</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.Attributes}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>At</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>At</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType_At()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<Attributes> getAt();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Okpreproc</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.Preprocessor}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Okpreproc</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Okpreproc</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType_Okpreproc()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<Preprocessor> getOkpreproc();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Tag</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End Tag</em>' containment reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>End Tag</em>' containment reference.
|
||||
* @see #setEndTag(RootTag)
|
||||
* @see org.wesnoth.wML.WMLPackage#getRootType_EndTag()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
RootTag getEndTag();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.RootType#getEndTag <em>End Tag</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Tag</em>' containment reference.
|
||||
* @see #getEndTag()
|
||||
* @generated
|
||||
*/
|
||||
void setEndTag(RootTag value);
|
||||
|
||||
} // RootType
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Simple Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.SimpleTag#isEndTag <em>End Tag</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getSimpleTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface SimpleTag extends RootTag
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Tag</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End Tag</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>End Tag</em>' attribute.
|
||||
* @see #setEndTag(boolean)
|
||||
* @see org.wesnoth.wML.WMLPackage#getSimpleTag_EndTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isEndTag();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.SimpleTag#isEndTag <em>End Tag</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Tag</em>' attribute.
|
||||
* @see #isEndTag()
|
||||
* @generated
|
||||
*/
|
||||
void setEndTag(boolean value);
|
||||
|
||||
} // SimpleTag
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Text Domain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.TextDomain#getDomainName <em>Domain Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wML.WMLPackage#getTextDomain()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface TextDomain extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Domain Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Domain Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Domain Name</em>' attribute.
|
||||
* @see #setDomainName(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getTextDomain_DomainName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getDomainName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.TextDomain#getDomainName <em>Domain Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Domain Name</em>' attribute.
|
||||
* @see #getDomainName()
|
||||
* @generated
|
||||
*/
|
||||
void setDomainName(String value);
|
||||
|
||||
} // TextDomain
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EFactory;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Factory</b> for the model.
|
||||
* It provides a create method for each non-abstract class of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.WMLPackage
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLFactory extends EFactory
|
||||
{
|
||||
/**
|
||||
* The singleton instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
WMLFactory eINSTANCE = org.wesnoth.wML.impl.WMLFactoryImpl.init();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Root</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Root</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Root createRoot();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Text Domain</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Text Domain</em>'.
|
||||
* @generated
|
||||
*/
|
||||
TextDomain createTextDomain();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Preprocessor</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Preprocessor</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Preprocessor createPreprocessor();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Macro</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Macro</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Macro createMacro();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Path Include</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Path Include</em>'.
|
||||
* @generated
|
||||
*/
|
||||
PathInclude createPathInclude();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Root Type</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Root Type</em>'.
|
||||
* @generated
|
||||
*/
|
||||
RootType createRootType();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Root Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Root Tag</em>'.
|
||||
* @generated
|
||||
*/
|
||||
RootTag createRootTag();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Simple Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Simple Tag</em>'.
|
||||
* @generated
|
||||
*/
|
||||
SimpleTag createSimpleTag();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Added Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Added Tag</em>'.
|
||||
* @generated
|
||||
*/
|
||||
AddedTag createAddedTag();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Attributes</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Attributes</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Attributes createAttributes();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
WMLPackage getWMLPackage();
|
||||
|
||||
} //WMLFactory
|
|
@ -0,0 +1,916 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.ecore.EAttribute;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.EReference;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Package</b> for the model.
|
||||
* It contains accessors for the meta objects to represent
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.WMLFactory
|
||||
* @model kind="package"
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLPackage extends EPackage
|
||||
{
|
||||
/**
|
||||
* The package name.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNAME = "wML";
|
||||
|
||||
/**
|
||||
* The package namespace URI.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNS_URI = "http://www.wesnoth.org/WML";
|
||||
|
||||
/**
|
||||
* The package namespace name.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNS_PREFIX = "wML";
|
||||
|
||||
/**
|
||||
* The singleton instance of the package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
WMLPackage eINSTANCE = org.wesnoth.wML.impl.WMLPackageImpl.init();
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.RootImpl <em>Root</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRoot()
|
||||
* @generated
|
||||
*/
|
||||
int ROOT = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT__TEXTDOMAINS = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Preproc</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT__PREPROC = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Roots</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT__ROOTS = 2;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Root</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_FEATURE_COUNT = 3;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.TextDomainImpl <em>Text Domain</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.TextDomainImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getTextDomain()
|
||||
* @generated
|
||||
*/
|
||||
int TEXT_DOMAIN = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Domain Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int TEXT_DOMAIN__DOMAIN_NAME = 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Text Domain</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int TEXT_DOMAIN_FEATURE_COUNT = 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.PreprocessorImpl <em>Preprocessor</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.PreprocessorImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getPreprocessor()
|
||||
* @generated
|
||||
*/
|
||||
int PREPROCESSOR = 2;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Preprocessor</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PREPROCESSOR_FEATURE_COUNT = 0;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.MacroImpl <em>Macro</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.MacroImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getMacro()
|
||||
* @generated
|
||||
*/
|
||||
int MACRO = 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Macro Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int MACRO__MACRO_NAME = PREPROCESSOR_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Macro</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int MACRO_FEATURE_COUNT = PREPROCESSOR_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.PathIncludeImpl <em>Path Include</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.PathIncludeImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getPathInclude()
|
||||
* @generated
|
||||
*/
|
||||
int PATH_INCLUDE = 4;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Path</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PATH_INCLUDE__PATH = PREPROCESSOR_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Path Include</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PATH_INCLUDE_FEATURE_COUNT = PREPROCESSOR_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.RootTypeImpl <em>Root Type</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootTypeImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRootType()
|
||||
* @generated
|
||||
*/
|
||||
int ROOT_TYPE = 5;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Start Tag</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE__START_TAG = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Sub Types</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE__SUB_TYPES = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>At</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE__AT = 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Okpreproc</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE__OKPREPROC = 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>End Tag</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE__END_TAG = 4;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Root Type</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TYPE_FEATURE_COUNT = 5;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.RootTagImpl <em>Root Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRootTag()
|
||||
* @generated
|
||||
*/
|
||||
int ROOT_TAG = 6;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Tag Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TAG__TAG_NAME = 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Root Tag</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ROOT_TAG_FEATURE_COUNT = 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.SimpleTagImpl <em>Simple Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.SimpleTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getSimpleTag()
|
||||
* @generated
|
||||
*/
|
||||
int SIMPLE_TAG = 7;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Tag Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SIMPLE_TAG__TAG_NAME = ROOT_TAG__TAG_NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>End Tag</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SIMPLE_TAG__END_TAG = ROOT_TAG_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Simple Tag</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SIMPLE_TAG_FEATURE_COUNT = ROOT_TAG_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.AddedTagImpl <em>Added Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.AddedTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getAddedTag()
|
||||
* @generated
|
||||
*/
|
||||
int ADDED_TAG = 8;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Tag Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ADDED_TAG__TAG_NAME = ROOT_TAG__TAG_NAME;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Added Tag</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ADDED_TAG_FEATURE_COUNT = ROOT_TAG_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.AttributesImpl <em>Attributes</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.AttributesImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getAttributes()
|
||||
* @generated
|
||||
*/
|
||||
int ATTRIBUTES = 9;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Attr Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ATTRIBUTES__ATTR_NAME = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Attr Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ATTRIBUTES__ATTR_VALUE = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Attributes</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int ATTRIBUTES_FEATURE_COUNT = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.Root <em>Root</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Root</em>'.
|
||||
* @see org.wesnoth.wML.Root
|
||||
* @generated
|
||||
*/
|
||||
EClass getRoot();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.Root#getTextdomains <em>Textdomains</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Textdomains</em>'.
|
||||
* @see org.wesnoth.wML.Root#getTextdomains()
|
||||
* @see #getRoot()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRoot_Textdomains();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.Root#getPreproc <em>Preproc</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Preproc</em>'.
|
||||
* @see org.wesnoth.wML.Root#getPreproc()
|
||||
* @see #getRoot()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRoot_Preproc();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.Root#getRoots <em>Roots</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Roots</em>'.
|
||||
* @see org.wesnoth.wML.Root#getRoots()
|
||||
* @see #getRoot()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRoot_Roots();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.TextDomain <em>Text Domain</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Text Domain</em>'.
|
||||
* @see org.wesnoth.wML.TextDomain
|
||||
* @generated
|
||||
*/
|
||||
EClass getTextDomain();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.TextDomain#getDomainName <em>Domain Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Domain Name</em>'.
|
||||
* @see org.wesnoth.wML.TextDomain#getDomainName()
|
||||
* @see #getTextDomain()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getTextDomain_DomainName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.Preprocessor <em>Preprocessor</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Preprocessor</em>'.
|
||||
* @see org.wesnoth.wML.Preprocessor
|
||||
* @generated
|
||||
*/
|
||||
EClass getPreprocessor();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.Macro <em>Macro</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Macro</em>'.
|
||||
* @see org.wesnoth.wML.Macro
|
||||
* @generated
|
||||
*/
|
||||
EClass getMacro();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Macro Name</em>'.
|
||||
* @see org.wesnoth.wML.Macro#getMacroName()
|
||||
* @see #getMacro()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getMacro_MacroName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.PathInclude <em>Path Include</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Path Include</em>'.
|
||||
* @see org.wesnoth.wML.PathInclude
|
||||
* @generated
|
||||
*/
|
||||
EClass getPathInclude();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.PathInclude#getPath <em>Path</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Path</em>'.
|
||||
* @see org.wesnoth.wML.PathInclude#getPath()
|
||||
* @see #getPathInclude()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getPathInclude_Path();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.RootType <em>Root Type</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Root Type</em>'.
|
||||
* @see org.wesnoth.wML.RootType
|
||||
* @generated
|
||||
*/
|
||||
EClass getRootType();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference '{@link org.wesnoth.wML.RootType#getStartTag <em>Start Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference '<em>Start Tag</em>'.
|
||||
* @see org.wesnoth.wML.RootType#getStartTag()
|
||||
* @see #getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRootType_StartTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.RootType#getSubTypes <em>Sub Types</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Sub Types</em>'.
|
||||
* @see org.wesnoth.wML.RootType#getSubTypes()
|
||||
* @see #getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRootType_SubTypes();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.RootType#getAt <em>At</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>At</em>'.
|
||||
* @see org.wesnoth.wML.RootType#getAt()
|
||||
* @see #getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRootType_At();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.RootType#getOkpreproc <em>Okpreproc</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Okpreproc</em>'.
|
||||
* @see org.wesnoth.wML.RootType#getOkpreproc()
|
||||
* @see #getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRootType_Okpreproc();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference '{@link org.wesnoth.wML.RootType#getEndTag <em>End Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference '<em>End Tag</em>'.
|
||||
* @see org.wesnoth.wML.RootType#getEndTag()
|
||||
* @see #getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getRootType_EndTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.RootTag <em>Root Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Root Tag</em>'.
|
||||
* @see org.wesnoth.wML.RootTag
|
||||
* @generated
|
||||
*/
|
||||
EClass getRootTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.RootTag#getTagName <em>Tag Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Tag Name</em>'.
|
||||
* @see org.wesnoth.wML.RootTag#getTagName()
|
||||
* @see #getRootTag()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getRootTag_TagName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.SimpleTag <em>Simple Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Simple Tag</em>'.
|
||||
* @see org.wesnoth.wML.SimpleTag
|
||||
* @generated
|
||||
*/
|
||||
EClass getSimpleTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.SimpleTag#isEndTag <em>End Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>End Tag</em>'.
|
||||
* @see org.wesnoth.wML.SimpleTag#isEndTag()
|
||||
* @see #getSimpleTag()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getSimpleTag_EndTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.AddedTag <em>Added Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Added Tag</em>'.
|
||||
* @see org.wesnoth.wML.AddedTag
|
||||
* @generated
|
||||
*/
|
||||
EClass getAddedTag();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.Attributes <em>Attributes</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>Attributes</em>'.
|
||||
* @see org.wesnoth.wML.Attributes
|
||||
* @generated
|
||||
*/
|
||||
EClass getAttributes();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.Attributes#getAttrName <em>Attr Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Attr Name</em>'.
|
||||
* @see org.wesnoth.wML.Attributes#getAttrName()
|
||||
* @see #getAttributes()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getAttributes_AttrName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.Attributes#getAttrValue <em>Attr Value</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Attr Value</em>'.
|
||||
* @see org.wesnoth.wML.Attributes#getAttrValue()
|
||||
* @see #getAttributes()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getAttributes_AttrValue();
|
||||
|
||||
/**
|
||||
* Returns the factory that creates the instances of the model.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the factory that creates the instances of the model.
|
||||
* @generated
|
||||
*/
|
||||
WMLFactory getWMLFactory();
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* Defines literals for the meta objects that represent
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
interface Literals
|
||||
{
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.RootImpl <em>Root</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRoot()
|
||||
* @generated
|
||||
*/
|
||||
EClass ROOT = eINSTANCE.getRoot();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Textdomains</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT__TEXTDOMAINS = eINSTANCE.getRoot_Textdomains();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Preproc</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT__PREPROC = eINSTANCE.getRoot_Preproc();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Roots</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT__ROOTS = eINSTANCE.getRoot_Roots();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.TextDomainImpl <em>Text Domain</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.TextDomainImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getTextDomain()
|
||||
* @generated
|
||||
*/
|
||||
EClass TEXT_DOMAIN = eINSTANCE.getTextDomain();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Domain Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute TEXT_DOMAIN__DOMAIN_NAME = eINSTANCE.getTextDomain_DomainName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.PreprocessorImpl <em>Preprocessor</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.PreprocessorImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getPreprocessor()
|
||||
* @generated
|
||||
*/
|
||||
EClass PREPROCESSOR = eINSTANCE.getPreprocessor();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.MacroImpl <em>Macro</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.MacroImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getMacro()
|
||||
* @generated
|
||||
*/
|
||||
EClass MACRO = eINSTANCE.getMacro();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Macro Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute MACRO__MACRO_NAME = eINSTANCE.getMacro_MacroName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.PathIncludeImpl <em>Path Include</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.PathIncludeImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getPathInclude()
|
||||
* @generated
|
||||
*/
|
||||
EClass PATH_INCLUDE = eINSTANCE.getPathInclude();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Path</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute PATH_INCLUDE__PATH = eINSTANCE.getPathInclude_Path();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.RootTypeImpl <em>Root Type</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootTypeImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRootType()
|
||||
* @generated
|
||||
*/
|
||||
EClass ROOT_TYPE = eINSTANCE.getRootType();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Start Tag</b></em>' containment reference feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT_TYPE__START_TAG = eINSTANCE.getRootType_StartTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Sub Types</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT_TYPE__SUB_TYPES = eINSTANCE.getRootType_SubTypes();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>At</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT_TYPE__AT = eINSTANCE.getRootType_At();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Okpreproc</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT_TYPE__OKPREPROC = eINSTANCE.getRootType_Okpreproc();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>End Tag</b></em>' containment reference feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference ROOT_TYPE__END_TAG = eINSTANCE.getRootType_EndTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.RootTagImpl <em>Root Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.RootTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getRootTag()
|
||||
* @generated
|
||||
*/
|
||||
EClass ROOT_TAG = eINSTANCE.getRootTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Tag Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute ROOT_TAG__TAG_NAME = eINSTANCE.getRootTag_TagName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.SimpleTagImpl <em>Simple Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.SimpleTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getSimpleTag()
|
||||
* @generated
|
||||
*/
|
||||
EClass SIMPLE_TAG = eINSTANCE.getSimpleTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>End Tag</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute SIMPLE_TAG__END_TAG = eINSTANCE.getSimpleTag_EndTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.AddedTagImpl <em>Added Tag</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.AddedTagImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getAddedTag()
|
||||
* @generated
|
||||
*/
|
||||
EClass ADDED_TAG = eINSTANCE.getAddedTag();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.AttributesImpl <em>Attributes</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.impl.AttributesImpl
|
||||
* @see org.wesnoth.wML.impl.WMLPackageImpl#getAttributes()
|
||||
* @generated
|
||||
*/
|
||||
EClass ATTRIBUTES = eINSTANCE.getAttributes();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Attr Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute ATTRIBUTES__ATTR_NAME = eINSTANCE.getAttributes_AttrName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Attr Value</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute ATTRIBUTES__ATTR_VALUE = eINSTANCE.getAttributes_AttrValue();
|
||||
|
||||
}
|
||||
|
||||
} //WMLPackage
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.wesnoth.wML.AddedTag;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Added Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class AddedTagImpl extends RootTagImpl implements AddedTag
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected AddedTagImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.ADDED_TAG;
|
||||
}
|
||||
|
||||
} //AddedTagImpl
|
|
@ -0,0 +1,236 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wML.Attributes;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Attributes</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.AttributesImpl#getAttrName <em>Attr Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.AttributesImpl#getAttrValue <em>Attr Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class AttributesImpl extends MinimalEObjectImpl.Container implements Attributes
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getAttrName() <em>Attr Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAttrName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String ATTR_NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getAttrName() <em>Attr Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAttrName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String attrName = ATTR_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getAttrValue() <em>Attr Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAttrValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String ATTR_VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getAttrValue() <em>Attr Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAttrValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String attrValue = ATTR_VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected AttributesImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.ATTRIBUTES;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getAttrName()
|
||||
{
|
||||
return attrName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setAttrName(String newAttrName)
|
||||
{
|
||||
String oldAttrName = attrName;
|
||||
attrName = newAttrName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.ATTRIBUTES__ATTR_NAME, oldAttrName, attrName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getAttrValue()
|
||||
{
|
||||
return attrValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setAttrValue(String newAttrValue)
|
||||
{
|
||||
String oldAttrValue = attrValue;
|
||||
attrValue = newAttrValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.ATTRIBUTES__ATTR_VALUE, oldAttrValue, attrValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ATTRIBUTES__ATTR_NAME:
|
||||
return getAttrName();
|
||||
case WMLPackage.ATTRIBUTES__ATTR_VALUE:
|
||||
return getAttrValue();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ATTRIBUTES__ATTR_NAME:
|
||||
setAttrName((String)newValue);
|
||||
return;
|
||||
case WMLPackage.ATTRIBUTES__ATTR_VALUE:
|
||||
setAttrValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ATTRIBUTES__ATTR_NAME:
|
||||
setAttrName(ATTR_NAME_EDEFAULT);
|
||||
return;
|
||||
case WMLPackage.ATTRIBUTES__ATTR_VALUE:
|
||||
setAttrValue(ATTR_VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ATTRIBUTES__ATTR_NAME:
|
||||
return ATTR_NAME_EDEFAULT == null ? attrName != null : !ATTR_NAME_EDEFAULT.equals(attrName);
|
||||
case WMLPackage.ATTRIBUTES__ATTR_VALUE:
|
||||
return ATTR_VALUE_EDEFAULT == null ? attrValue != null : !ATTR_VALUE_EDEFAULT.equals(attrValue);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (attrName: ");
|
||||
result.append(attrName);
|
||||
result.append(", attrValue: ");
|
||||
result.append(attrValue);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //AttributesImpl
|
|
@ -0,0 +1,179 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.wesnoth.wML.Macro;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Macro</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.MacroImpl#getMacroName <em>Macro Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MacroImpl extends PreprocessorImpl implements Macro
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getMacroName() <em>Macro Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String MACRO_NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroName() <em>Macro Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String macroName = MACRO_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MacroImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.MACRO;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getMacroName()
|
||||
{
|
||||
return macroName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setMacroName(String newMacroName)
|
||||
{
|
||||
String oldMacroName = macroName;
|
||||
macroName = newMacroName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.MACRO__MACRO_NAME, oldMacroName, macroName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.MACRO__MACRO_NAME:
|
||||
return getMacroName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.MACRO__MACRO_NAME:
|
||||
setMacroName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.MACRO__MACRO_NAME:
|
||||
setMacroName(MACRO_NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.MACRO__MACRO_NAME:
|
||||
return MACRO_NAME_EDEFAULT == null ? macroName != null : !MACRO_NAME_EDEFAULT.equals(macroName);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (macroName: ");
|
||||
result.append(macroName);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //MacroImpl
|
|
@ -0,0 +1,179 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.wesnoth.wML.PathInclude;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Path Include</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.PathIncludeImpl#getPath <em>Path</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class PathIncludeImpl extends PreprocessorImpl implements PathInclude
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getPath() <em>Path</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getPath()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String PATH_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getPath()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String path = PATH_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected PathIncludeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.PATH_INCLUDE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setPath(String newPath)
|
||||
{
|
||||
String oldPath = path;
|
||||
path = newPath;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.PATH_INCLUDE__PATH, oldPath, path));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.PATH_INCLUDE__PATH:
|
||||
return getPath();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.PATH_INCLUDE__PATH:
|
||||
setPath((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.PATH_INCLUDE__PATH:
|
||||
setPath(PATH_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.PATH_INCLUDE__PATH:
|
||||
return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (path: ");
|
||||
result.append(path);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //PathIncludeImpl
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wML.Preprocessor;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Preprocessor</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class PreprocessorImpl extends MinimalEObjectImpl.Container implements Preprocessor
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected PreprocessorImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.PREPROCESSOR;
|
||||
}
|
||||
|
||||
} //PreprocessorImpl
|
|
@ -0,0 +1,248 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wML.Preprocessor;
|
||||
import org.wesnoth.wML.Root;
|
||||
import org.wesnoth.wML.RootType;
|
||||
import org.wesnoth.wML.TextDomain;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootImpl#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootImpl#getPreproc <em>Preproc</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootImpl#getRoots <em>Roots</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class RootImpl extends MinimalEObjectImpl.Container implements Root
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getTextdomains() <em>Textdomains</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTextdomains()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<TextDomain> textdomains;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getPreproc() <em>Preproc</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getPreproc()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<Preprocessor> preproc;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getRoots() <em>Roots</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getRoots()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<RootType> roots;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected RootImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.ROOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<TextDomain> getTextdomains()
|
||||
{
|
||||
if (textdomains == null)
|
||||
{
|
||||
textdomains = new EObjectContainmentEList<TextDomain>(TextDomain.class, this, WMLPackage.ROOT__TEXTDOMAINS);
|
||||
}
|
||||
return textdomains;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<Preprocessor> getPreproc()
|
||||
{
|
||||
if (preproc == null)
|
||||
{
|
||||
preproc = new EObjectContainmentEList<Preprocessor>(Preprocessor.class, this, WMLPackage.ROOT__PREPROC);
|
||||
}
|
||||
return preproc;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<RootType> getRoots()
|
||||
{
|
||||
if (roots == null)
|
||||
{
|
||||
roots = new EObjectContainmentEList<RootType>(RootType.class, this, WMLPackage.ROOT__ROOTS);
|
||||
}
|
||||
return roots;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT__TEXTDOMAINS:
|
||||
return ((InternalEList<?>)getTextdomains()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.ROOT__PREPROC:
|
||||
return ((InternalEList<?>)getPreproc()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.ROOT__ROOTS:
|
||||
return ((InternalEList<?>)getRoots()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT__TEXTDOMAINS:
|
||||
return getTextdomains();
|
||||
case WMLPackage.ROOT__PREPROC:
|
||||
return getPreproc();
|
||||
case WMLPackage.ROOT__ROOTS:
|
||||
return getRoots();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
getTextdomains().addAll((Collection<? extends TextDomain>)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT__PREPROC:
|
||||
getPreproc().clear();
|
||||
getPreproc().addAll((Collection<? extends Preprocessor>)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT__ROOTS:
|
||||
getRoots().clear();
|
||||
getRoots().addAll((Collection<? extends RootType>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
return;
|
||||
case WMLPackage.ROOT__PREPROC:
|
||||
getPreproc().clear();
|
||||
return;
|
||||
case WMLPackage.ROOT__ROOTS:
|
||||
getRoots().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT__TEXTDOMAINS:
|
||||
return textdomains != null && !textdomains.isEmpty();
|
||||
case WMLPackage.ROOT__PREPROC:
|
||||
return preproc != null && !preproc.isEmpty();
|
||||
case WMLPackage.ROOT__ROOTS:
|
||||
return roots != null && !roots.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //RootImpl
|
|
@ -0,0 +1,180 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wML.RootTag;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Root Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTagImpl#getTagName <em>Tag Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class RootTagImpl extends MinimalEObjectImpl.Container implements RootTag
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getTagName() <em>Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTagName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String TAG_NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getTagName() <em>Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTagName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String tagName = TAG_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected RootTagImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.ROOT_TAG;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getTagName()
|
||||
{
|
||||
return tagName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setTagName(String newTagName)
|
||||
{
|
||||
String oldTagName = tagName;
|
||||
tagName = newTagName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.ROOT_TAG__TAG_NAME, oldTagName, tagName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TAG__TAG_NAME:
|
||||
return getTagName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TAG__TAG_NAME:
|
||||
setTagName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TAG__TAG_NAME:
|
||||
setTagName(TAG_NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TAG__TAG_NAME:
|
||||
return TAG_NAME_EDEFAULT == null ? tagName != null : !TAG_NAME_EDEFAULT.equals(tagName);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (tagName: ");
|
||||
result.append(tagName);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //RootTagImpl
|
|
@ -0,0 +1,392 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wML.Attributes;
|
||||
import org.wesnoth.wML.Preprocessor;
|
||||
import org.wesnoth.wML.RootTag;
|
||||
import org.wesnoth.wML.RootType;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Root Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTypeImpl#getStartTag <em>Start Tag</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTypeImpl#getSubTypes <em>Sub Types</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTypeImpl#getAt <em>At</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTypeImpl#getOkpreproc <em>Okpreproc</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.RootTypeImpl#getEndTag <em>End Tag</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class RootTypeImpl extends MinimalEObjectImpl.Container implements RootType
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getStartTag() <em>Start Tag</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getStartTag()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected RootTag startTag;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getSubTypes() <em>Sub Types</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getSubTypes()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<RootType> subTypes;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getAt() <em>At</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAt()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<Attributes> at;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getOkpreproc() <em>Okpreproc</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getOkpreproc()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<Preprocessor> okpreproc;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getEndTag() <em>End Tag</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEndTag()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected RootTag endTag;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected RootTypeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.ROOT_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public RootTag getStartTag()
|
||||
{
|
||||
return startTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetStartTag(RootTag newStartTag, NotificationChain msgs)
|
||||
{
|
||||
RootTag oldStartTag = startTag;
|
||||
startTag = newStartTag;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WMLPackage.ROOT_TYPE__START_TAG, oldStartTag, newStartTag);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setStartTag(RootTag newStartTag)
|
||||
{
|
||||
if (newStartTag != startTag)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (startTag != null)
|
||||
msgs = ((InternalEObject)startTag).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WMLPackage.ROOT_TYPE__START_TAG, null, msgs);
|
||||
if (newStartTag != null)
|
||||
msgs = ((InternalEObject)newStartTag).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WMLPackage.ROOT_TYPE__START_TAG, null, msgs);
|
||||
msgs = basicSetStartTag(newStartTag, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.ROOT_TYPE__START_TAG, newStartTag, newStartTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<RootType> getSubTypes()
|
||||
{
|
||||
if (subTypes == null)
|
||||
{
|
||||
subTypes = new EObjectContainmentEList<RootType>(RootType.class, this, WMLPackage.ROOT_TYPE__SUB_TYPES);
|
||||
}
|
||||
return subTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<Attributes> getAt()
|
||||
{
|
||||
if (at == null)
|
||||
{
|
||||
at = new EObjectContainmentEList<Attributes>(Attributes.class, this, WMLPackage.ROOT_TYPE__AT);
|
||||
}
|
||||
return at;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<Preprocessor> getOkpreproc()
|
||||
{
|
||||
if (okpreproc == null)
|
||||
{
|
||||
okpreproc = new EObjectContainmentEList<Preprocessor>(Preprocessor.class, this, WMLPackage.ROOT_TYPE__OKPREPROC);
|
||||
}
|
||||
return okpreproc;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public RootTag getEndTag()
|
||||
{
|
||||
return endTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetEndTag(RootTag newEndTag, NotificationChain msgs)
|
||||
{
|
||||
RootTag oldEndTag = endTag;
|
||||
endTag = newEndTag;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WMLPackage.ROOT_TYPE__END_TAG, oldEndTag, newEndTag);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setEndTag(RootTag newEndTag)
|
||||
{
|
||||
if (newEndTag != endTag)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (endTag != null)
|
||||
msgs = ((InternalEObject)endTag).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WMLPackage.ROOT_TYPE__END_TAG, null, msgs);
|
||||
if (newEndTag != null)
|
||||
msgs = ((InternalEObject)newEndTag).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WMLPackage.ROOT_TYPE__END_TAG, null, msgs);
|
||||
msgs = basicSetEndTag(newEndTag, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.ROOT_TYPE__END_TAG, newEndTag, newEndTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TYPE__START_TAG:
|
||||
return basicSetStartTag(null, msgs);
|
||||
case WMLPackage.ROOT_TYPE__SUB_TYPES:
|
||||
return ((InternalEList<?>)getSubTypes()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.ROOT_TYPE__AT:
|
||||
return ((InternalEList<?>)getAt()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.ROOT_TYPE__OKPREPROC:
|
||||
return ((InternalEList<?>)getOkpreproc()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.ROOT_TYPE__END_TAG:
|
||||
return basicSetEndTag(null, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TYPE__START_TAG:
|
||||
return getStartTag();
|
||||
case WMLPackage.ROOT_TYPE__SUB_TYPES:
|
||||
return getSubTypes();
|
||||
case WMLPackage.ROOT_TYPE__AT:
|
||||
return getAt();
|
||||
case WMLPackage.ROOT_TYPE__OKPREPROC:
|
||||
return getOkpreproc();
|
||||
case WMLPackage.ROOT_TYPE__END_TAG:
|
||||
return getEndTag();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TYPE__START_TAG:
|
||||
setStartTag((RootTag)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__SUB_TYPES:
|
||||
getSubTypes().clear();
|
||||
getSubTypes().addAll((Collection<? extends RootType>)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__AT:
|
||||
getAt().clear();
|
||||
getAt().addAll((Collection<? extends Attributes>)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__OKPREPROC:
|
||||
getOkpreproc().clear();
|
||||
getOkpreproc().addAll((Collection<? extends Preprocessor>)newValue);
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__END_TAG:
|
||||
setEndTag((RootTag)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TYPE__START_TAG:
|
||||
setStartTag((RootTag)null);
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__SUB_TYPES:
|
||||
getSubTypes().clear();
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__AT:
|
||||
getAt().clear();
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__OKPREPROC:
|
||||
getOkpreproc().clear();
|
||||
return;
|
||||
case WMLPackage.ROOT_TYPE__END_TAG:
|
||||
setEndTag((RootTag)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.ROOT_TYPE__START_TAG:
|
||||
return startTag != null;
|
||||
case WMLPackage.ROOT_TYPE__SUB_TYPES:
|
||||
return subTypes != null && !subTypes.isEmpty();
|
||||
case WMLPackage.ROOT_TYPE__AT:
|
||||
return at != null && !at.isEmpty();
|
||||
case WMLPackage.ROOT_TYPE__OKPREPROC:
|
||||
return okpreproc != null && !okpreproc.isEmpty();
|
||||
case WMLPackage.ROOT_TYPE__END_TAG:
|
||||
return endTag != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //RootTypeImpl
|
|
@ -0,0 +1,179 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.wesnoth.wML.SimpleTag;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Simple Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.SimpleTagImpl#isEndTag <em>End Tag</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class SimpleTagImpl extends RootTagImpl implements SimpleTag
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #isEndTag() <em>End Tag</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isEndTag()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean END_TAG_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #isEndTag() <em>End Tag</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isEndTag()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean endTag = END_TAG_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected SimpleTagImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.SIMPLE_TAG;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean isEndTag()
|
||||
{
|
||||
return endTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setEndTag(boolean newEndTag)
|
||||
{
|
||||
boolean oldEndTag = endTag;
|
||||
endTag = newEndTag;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.SIMPLE_TAG__END_TAG, oldEndTag, endTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.SIMPLE_TAG__END_TAG:
|
||||
return isEndTag();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.SIMPLE_TAG__END_TAG:
|
||||
setEndTag((Boolean)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.SIMPLE_TAG__END_TAG:
|
||||
setEndTag(END_TAG_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.SIMPLE_TAG__END_TAG:
|
||||
return endTag != END_TAG_EDEFAULT;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (endTag: ");
|
||||
result.append(endTag);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //SimpleTagImpl
|
|
@ -0,0 +1,180 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wML.TextDomain;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Text Domain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.TextDomainImpl#getDomainName <em>Domain Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class TextDomainImpl extends MinimalEObjectImpl.Container implements TextDomain
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getDomainName() <em>Domain Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getDomainName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String DOMAIN_NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getDomainName() <em>Domain Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getDomainName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String domainName = DOMAIN_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected TextDomainImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WMLPackage.Literals.TEXT_DOMAIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getDomainName()
|
||||
{
|
||||
return domainName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setDomainName(String newDomainName)
|
||||
{
|
||||
String oldDomainName = domainName;
|
||||
domainName = newDomainName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.TEXT_DOMAIN__DOMAIN_NAME, oldDomainName, domainName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.TEXT_DOMAIN__DOMAIN_NAME:
|
||||
return getDomainName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.TEXT_DOMAIN__DOMAIN_NAME:
|
||||
setDomainName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.TEXT_DOMAIN__DOMAIN_NAME:
|
||||
setDomainName(DOMAIN_NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.TEXT_DOMAIN__DOMAIN_NAME:
|
||||
return DOMAIN_NAME_EDEFAULT == null ? domainName != null : !DOMAIN_NAME_EDEFAULT.equals(domainName);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (DomainName: ");
|
||||
result.append(domainName);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //TextDomainImpl
|
|
@ -0,0 +1,217 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EFactoryImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.plugin.EcorePlugin;
|
||||
|
||||
import org.wesnoth.wML.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Factory</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class WMLFactoryImpl extends EFactoryImpl implements WMLFactory
|
||||
{
|
||||
/**
|
||||
* Creates the default factory implementation.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public static WMLFactory init()
|
||||
{
|
||||
try
|
||||
{
|
||||
WMLFactory theWMLFactory = (WMLFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.wesnoth.org/WML");
|
||||
if (theWMLFactory != null)
|
||||
{
|
||||
return theWMLFactory;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
EcorePlugin.INSTANCE.log(exception);
|
||||
}
|
||||
return new WMLFactoryImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLFactoryImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public EObject create(EClass eClass)
|
||||
{
|
||||
switch (eClass.getClassifierID())
|
||||
{
|
||||
case WMLPackage.ROOT: return createRoot();
|
||||
case WMLPackage.TEXT_DOMAIN: return createTextDomain();
|
||||
case WMLPackage.PREPROCESSOR: return createPreprocessor();
|
||||
case WMLPackage.MACRO: return createMacro();
|
||||
case WMLPackage.PATH_INCLUDE: return createPathInclude();
|
||||
case WMLPackage.ROOT_TYPE: return createRootType();
|
||||
case WMLPackage.ROOT_TAG: return createRootTag();
|
||||
case WMLPackage.SIMPLE_TAG: return createSimpleTag();
|
||||
case WMLPackage.ADDED_TAG: return createAddedTag();
|
||||
case WMLPackage.ATTRIBUTES: return createAttributes();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Root createRoot()
|
||||
{
|
||||
RootImpl root = new RootImpl();
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public TextDomain createTextDomain()
|
||||
{
|
||||
TextDomainImpl textDomain = new TextDomainImpl();
|
||||
return textDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Preprocessor createPreprocessor()
|
||||
{
|
||||
PreprocessorImpl preprocessor = new PreprocessorImpl();
|
||||
return preprocessor;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Macro createMacro()
|
||||
{
|
||||
MacroImpl macro = new MacroImpl();
|
||||
return macro;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public PathInclude createPathInclude()
|
||||
{
|
||||
PathIncludeImpl pathInclude = new PathIncludeImpl();
|
||||
return pathInclude;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public RootType createRootType()
|
||||
{
|
||||
RootTypeImpl rootType = new RootTypeImpl();
|
||||
return rootType;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public RootTag createRootTag()
|
||||
{
|
||||
RootTagImpl rootTag = new RootTagImpl();
|
||||
return rootTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public SimpleTag createSimpleTag()
|
||||
{
|
||||
SimpleTagImpl simpleTag = new SimpleTagImpl();
|
||||
return simpleTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public AddedTag createAddedTag()
|
||||
{
|
||||
AddedTagImpl addedTag = new AddedTagImpl();
|
||||
return addedTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Attributes createAttributes()
|
||||
{
|
||||
AttributesImpl attributes = new AttributesImpl();
|
||||
return attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLPackage getWMLPackage()
|
||||
{
|
||||
return (WMLPackage)getEPackage();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @deprecated
|
||||
* @generated
|
||||
*/
|
||||
@Deprecated
|
||||
public static WMLPackage getPackage()
|
||||
{
|
||||
return WMLPackage.eINSTANCE;
|
||||
}
|
||||
|
||||
} //WMLFactoryImpl
|
|
@ -0,0 +1,559 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EAttribute;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.EReference;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
||||
|
||||
import org.wesnoth.wML.AddedTag;
|
||||
import org.wesnoth.wML.Attributes;
|
||||
import org.wesnoth.wML.Macro;
|
||||
import org.wesnoth.wML.PathInclude;
|
||||
import org.wesnoth.wML.Preprocessor;
|
||||
import org.wesnoth.wML.Root;
|
||||
import org.wesnoth.wML.RootTag;
|
||||
import org.wesnoth.wML.RootType;
|
||||
import org.wesnoth.wML.SimpleTag;
|
||||
import org.wesnoth.wML.TextDomain;
|
||||
import org.wesnoth.wML.WMLFactory;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Package</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass rootEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass textDomainEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass preprocessorEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass macroEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass pathIncludeEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass rootTypeEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass rootTagEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass simpleTagEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass addedTagEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass attributesEClass = null;
|
||||
|
||||
/**
|
||||
* Creates an instance of the model <b>Package</b>, registered with
|
||||
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
||||
* package URI value.
|
||||
* <p>Note: the correct way to create the package is via the static
|
||||
* factory method {@link #init init()}, which also performs
|
||||
* initialization of the package, or returns the registered package,
|
||||
* if one already exists.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.emf.ecore.EPackage.Registry
|
||||
* @see org.wesnoth.wML.WMLPackage#eNS_URI
|
||||
* @see #init()
|
||||
* @generated
|
||||
*/
|
||||
private WMLPackageImpl()
|
||||
{
|
||||
super(eNS_URI, WMLFactory.eINSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private static boolean isInited = false;
|
||||
|
||||
/**
|
||||
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
||||
*
|
||||
* <p>This method is used to initialize {@link WMLPackage#eINSTANCE} when that field is accessed.
|
||||
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #eNS_URI
|
||||
* @see #createPackageContents()
|
||||
* @see #initializePackageContents()
|
||||
* @generated
|
||||
*/
|
||||
public static WMLPackage init()
|
||||
{
|
||||
if (isInited) return (WMLPackage)EPackage.Registry.INSTANCE.getEPackage(WMLPackage.eNS_URI);
|
||||
|
||||
// Obtain or create and register package
|
||||
WMLPackageImpl theWMLPackage = (WMLPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof WMLPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new WMLPackageImpl());
|
||||
|
||||
isInited = true;
|
||||
|
||||
// Create package meta-data objects
|
||||
theWMLPackage.createPackageContents();
|
||||
|
||||
// Initialize created meta-data
|
||||
theWMLPackage.initializePackageContents();
|
||||
|
||||
// Mark meta-data to indicate it can't be changed
|
||||
theWMLPackage.freeze();
|
||||
|
||||
|
||||
// Update the registry and return the package
|
||||
EPackage.Registry.INSTANCE.put(WMLPackage.eNS_URI, theWMLPackage);
|
||||
return theWMLPackage;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getRoot()
|
||||
{
|
||||
return rootEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRoot_Textdomains()
|
||||
{
|
||||
return (EReference)rootEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRoot_Preproc()
|
||||
{
|
||||
return (EReference)rootEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRoot_Roots()
|
||||
{
|
||||
return (EReference)rootEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getTextDomain()
|
||||
{
|
||||
return textDomainEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getTextDomain_DomainName()
|
||||
{
|
||||
return (EAttribute)textDomainEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getPreprocessor()
|
||||
{
|
||||
return preprocessorEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getMacro()
|
||||
{
|
||||
return macroEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getMacro_MacroName()
|
||||
{
|
||||
return (EAttribute)macroEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getPathInclude()
|
||||
{
|
||||
return pathIncludeEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getPathInclude_Path()
|
||||
{
|
||||
return (EAttribute)pathIncludeEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getRootType()
|
||||
{
|
||||
return rootTypeEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRootType_StartTag()
|
||||
{
|
||||
return (EReference)rootTypeEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRootType_SubTypes()
|
||||
{
|
||||
return (EReference)rootTypeEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRootType_At()
|
||||
{
|
||||
return (EReference)rootTypeEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRootType_Okpreproc()
|
||||
{
|
||||
return (EReference)rootTypeEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getRootType_EndTag()
|
||||
{
|
||||
return (EReference)rootTypeEClass.getEStructuralFeatures().get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getRootTag()
|
||||
{
|
||||
return rootTagEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getRootTag_TagName()
|
||||
{
|
||||
return (EAttribute)rootTagEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getSimpleTag()
|
||||
{
|
||||
return simpleTagEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getSimpleTag_EndTag()
|
||||
{
|
||||
return (EAttribute)simpleTagEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getAddedTag()
|
||||
{
|
||||
return addedTagEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getAttributes()
|
||||
{
|
||||
return attributesEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getAttributes_AttrName()
|
||||
{
|
||||
return (EAttribute)attributesEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getAttributes_AttrValue()
|
||||
{
|
||||
return (EAttribute)attributesEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLFactory getWMLFactory()
|
||||
{
|
||||
return (WMLFactory)getEFactoryInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private boolean isCreated = false;
|
||||
|
||||
/**
|
||||
* Creates the meta-model objects for the package. This method is
|
||||
* guarded to have no affect on any invocation but its first.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void createPackageContents()
|
||||
{
|
||||
if (isCreated) return;
|
||||
isCreated = true;
|
||||
|
||||
// Create classes and their features
|
||||
rootEClass = createEClass(ROOT);
|
||||
createEReference(rootEClass, ROOT__TEXTDOMAINS);
|
||||
createEReference(rootEClass, ROOT__PREPROC);
|
||||
createEReference(rootEClass, ROOT__ROOTS);
|
||||
|
||||
textDomainEClass = createEClass(TEXT_DOMAIN);
|
||||
createEAttribute(textDomainEClass, TEXT_DOMAIN__DOMAIN_NAME);
|
||||
|
||||
preprocessorEClass = createEClass(PREPROCESSOR);
|
||||
|
||||
macroEClass = createEClass(MACRO);
|
||||
createEAttribute(macroEClass, MACRO__MACRO_NAME);
|
||||
|
||||
pathIncludeEClass = createEClass(PATH_INCLUDE);
|
||||
createEAttribute(pathIncludeEClass, PATH_INCLUDE__PATH);
|
||||
|
||||
rootTypeEClass = createEClass(ROOT_TYPE);
|
||||
createEReference(rootTypeEClass, ROOT_TYPE__START_TAG);
|
||||
createEReference(rootTypeEClass, ROOT_TYPE__SUB_TYPES);
|
||||
createEReference(rootTypeEClass, ROOT_TYPE__AT);
|
||||
createEReference(rootTypeEClass, ROOT_TYPE__OKPREPROC);
|
||||
createEReference(rootTypeEClass, ROOT_TYPE__END_TAG);
|
||||
|
||||
rootTagEClass = createEClass(ROOT_TAG);
|
||||
createEAttribute(rootTagEClass, ROOT_TAG__TAG_NAME);
|
||||
|
||||
simpleTagEClass = createEClass(SIMPLE_TAG);
|
||||
createEAttribute(simpleTagEClass, SIMPLE_TAG__END_TAG);
|
||||
|
||||
addedTagEClass = createEClass(ADDED_TAG);
|
||||
|
||||
attributesEClass = createEClass(ATTRIBUTES);
|
||||
createEAttribute(attributesEClass, ATTRIBUTES__ATTR_NAME);
|
||||
createEAttribute(attributesEClass, ATTRIBUTES__ATTR_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private boolean isInitialized = false;
|
||||
|
||||
/**
|
||||
* Complete the initialization of the package and its meta-model. This
|
||||
* method is guarded to have no affect on any invocation but its first.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void initializePackageContents()
|
||||
{
|
||||
if (isInitialized) return;
|
||||
isInitialized = true;
|
||||
|
||||
// Initialize package
|
||||
setName(eNAME);
|
||||
setNsPrefix(eNS_PREFIX);
|
||||
setNsURI(eNS_URI);
|
||||
|
||||
// Create type parameters
|
||||
|
||||
// Set bounds for type parameters
|
||||
|
||||
// Add supertypes to classes
|
||||
macroEClass.getESuperTypes().add(this.getPreprocessor());
|
||||
pathIncludeEClass.getESuperTypes().add(this.getPreprocessor());
|
||||
simpleTagEClass.getESuperTypes().add(this.getRootTag());
|
||||
addedTagEClass.getESuperTypes().add(this.getRootTag());
|
||||
|
||||
// Initialize classes and features; add operations and parameters
|
||||
initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getRoot_Textdomains(), this.getTextDomain(), null, "textdomains", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRoot_Preproc(), this.getPreprocessor(), null, "preproc", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRoot_Roots(), this.getRootType(), null, "roots", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(textDomainEClass, TextDomain.class, "TextDomain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getTextDomain_DomainName(), ecorePackage.getEString(), "DomainName", null, 0, 1, TextDomain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(preprocessorEClass, Preprocessor.class, "Preprocessor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(macroEClass, Macro.class, "Macro", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getMacro_MacroName(), ecorePackage.getEString(), "macroName", null, 0, 1, Macro.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(pathIncludeEClass, PathInclude.class, "PathInclude", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getPathInclude_Path(), ecorePackage.getEString(), "path", null, 0, 1, PathInclude.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(rootTypeEClass, RootType.class, "RootType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getRootType_StartTag(), this.getRootTag(), null, "startTag", null, 0, 1, RootType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRootType_SubTypes(), this.getRootType(), null, "subTypes", null, 0, -1, RootType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRootType_At(), this.getAttributes(), null, "at", null, 0, -1, RootType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRootType_Okpreproc(), this.getPreprocessor(), null, "okpreproc", null, 0, -1, RootType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getRootType_EndTag(), this.getRootTag(), null, "endTag", null, 0, 1, RootType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(rootTagEClass, RootTag.class, "RootTag", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getRootTag_TagName(), ecorePackage.getEString(), "tagName", null, 0, 1, RootTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(simpleTagEClass, SimpleTag.class, "SimpleTag", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getSimpleTag_EndTag(), ecorePackage.getEBoolean(), "endTag", null, 0, 1, SimpleTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(addedTagEClass, AddedTag.class, "AddedTag", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(attributesEClass, Attributes.class, "Attributes", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getAttributes_AttrName(), ecorePackage.getEString(), "attrName", null, 0, 1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getAttributes_AttrValue(), ecorePackage.getEString(), "attrValue", null, 0, 1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
// Create resource
|
||||
createResource(eNS_URI);
|
||||
}
|
||||
|
||||
} //WMLPackageImpl
|
|
@ -0,0 +1,315 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.util;
|
||||
|
||||
import org.eclipse.emf.common.notify.Adapter;
|
||||
import org.eclipse.emf.common.notify.Notifier;
|
||||
|
||||
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
import org.wesnoth.wML.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Adapter Factory</b> for the model.
|
||||
* It provides an adapter <code>createXXX</code> method for each class of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.WMLPackage
|
||||
* @generated
|
||||
*/
|
||||
public class WMLAdapterFactory extends AdapterFactoryImpl
|
||||
{
|
||||
/**
|
||||
* The cached model package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static WMLPackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the adapter factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLAdapterFactory()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = WMLPackage.eINSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this factory is applicable for the type of the object.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @return whether this factory is applicable for the type of the object.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean isFactoryForType(Object object)
|
||||
{
|
||||
if (object == modelPackage)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (object instanceof EObject)
|
||||
{
|
||||
return ((EObject)object).eClass().getEPackage() == modelPackage;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The switch that delegates to the <code>createXXX</code> methods.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLSwitch<Adapter> modelSwitch =
|
||||
new WMLSwitch<Adapter>()
|
||||
{
|
||||
@Override
|
||||
public Adapter caseRoot(Root object)
|
||||
{
|
||||
return createRootAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseTextDomain(TextDomain object)
|
||||
{
|
||||
return createTextDomainAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter casePreprocessor(Preprocessor object)
|
||||
{
|
||||
return createPreprocessorAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseMacro(Macro object)
|
||||
{
|
||||
return createMacroAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter casePathInclude(PathInclude object)
|
||||
{
|
||||
return createPathIncludeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseRootType(RootType object)
|
||||
{
|
||||
return createRootTypeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseRootTag(RootTag object)
|
||||
{
|
||||
return createRootTagAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseSimpleTag(SimpleTag object)
|
||||
{
|
||||
return createSimpleTagAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseAddedTag(AddedTag object)
|
||||
{
|
||||
return createAddedTagAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseAttributes(Attributes object)
|
||||
{
|
||||
return createAttributesAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter defaultCase(EObject object)
|
||||
{
|
||||
return createEObjectAdapter();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an adapter for the <code>target</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param target the object to adapt.
|
||||
* @return the adapter for the <code>target</code>.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Adapter createAdapter(Notifier target)
|
||||
{
|
||||
return modelSwitch.doSwitch((EObject)target);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.Root <em>Root</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.Root
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createRootAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.TextDomain <em>Text Domain</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.TextDomain
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createTextDomainAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.Preprocessor <em>Preprocessor</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.Preprocessor
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createPreprocessorAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.Macro <em>Macro</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.Macro
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMacroAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.PathInclude <em>Path Include</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.PathInclude
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createPathIncludeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.RootType <em>Root Type</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.RootType
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createRootTypeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.RootTag <em>Root Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.RootTag
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createRootTagAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.SimpleTag <em>Simple Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.SimpleTag
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createSimpleTagAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.AddedTag <em>Added Tag</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.AddedTag
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAddedTagAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wML.Attributes <em>Attributes</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.wesnoth.wML.Attributes
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAttributesAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for the default case.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createEObjectAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
} //WMLAdapterFactory
|
|
@ -0,0 +1,352 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
*/
|
||||
package org.wesnoth.wML.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
import org.wesnoth.wML.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Switch</b> for the model's inheritance hierarchy.
|
||||
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
|
||||
* to invoke the <code>caseXXX</code> method for each class of the model,
|
||||
* starting with the actual class of the object
|
||||
* and proceeding up the inheritance hierarchy
|
||||
* until a non-null result is returned,
|
||||
* which is the result of the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.wesnoth.wML.WMLPackage
|
||||
* @generated
|
||||
*/
|
||||
public class WMLSwitch<T>
|
||||
{
|
||||
/**
|
||||
* The cached model package
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static WMLPackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the switch.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLSwitch()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = WMLPackage.eINSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
public T doSwitch(EObject theEObject)
|
||||
{
|
||||
return doSwitch(theEObject.eClass(), theEObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
protected T doSwitch(EClass theEClass, EObject theEObject)
|
||||
{
|
||||
if (theEClass.eContainer() == modelPackage)
|
||||
{
|
||||
return doSwitch(theEClass.getClassifierID(), theEObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<EClass> eSuperTypes = theEClass.getESuperTypes();
|
||||
return
|
||||
eSuperTypes.isEmpty() ?
|
||||
defaultCase(theEObject) :
|
||||
doSwitch(eSuperTypes.get(0), theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
protected T doSwitch(int classifierID, EObject theEObject)
|
||||
{
|
||||
switch (classifierID)
|
||||
{
|
||||
case WMLPackage.ROOT:
|
||||
{
|
||||
Root root = (Root)theEObject;
|
||||
T result = caseRoot(root);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.TEXT_DOMAIN:
|
||||
{
|
||||
TextDomain textDomain = (TextDomain)theEObject;
|
||||
T result = caseTextDomain(textDomain);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.PREPROCESSOR:
|
||||
{
|
||||
Preprocessor preprocessor = (Preprocessor)theEObject;
|
||||
T result = casePreprocessor(preprocessor);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.MACRO:
|
||||
{
|
||||
Macro macro = (Macro)theEObject;
|
||||
T result = caseMacro(macro);
|
||||
if (result == null) result = casePreprocessor(macro);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.PATH_INCLUDE:
|
||||
{
|
||||
PathInclude pathInclude = (PathInclude)theEObject;
|
||||
T result = casePathInclude(pathInclude);
|
||||
if (result == null) result = casePreprocessor(pathInclude);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.ROOT_TYPE:
|
||||
{
|
||||
RootType rootType = (RootType)theEObject;
|
||||
T result = caseRootType(rootType);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.ROOT_TAG:
|
||||
{
|
||||
RootTag rootTag = (RootTag)theEObject;
|
||||
T result = caseRootTag(rootTag);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.SIMPLE_TAG:
|
||||
{
|
||||
SimpleTag simpleTag = (SimpleTag)theEObject;
|
||||
T result = caseSimpleTag(simpleTag);
|
||||
if (result == null) result = caseRootTag(simpleTag);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.ADDED_TAG:
|
||||
{
|
||||
AddedTag addedTag = (AddedTag)theEObject;
|
||||
T result = caseAddedTag(addedTag);
|
||||
if (result == null) result = caseRootTag(addedTag);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WMLPackage.ATTRIBUTES:
|
||||
{
|
||||
Attributes attributes = (Attributes)theEObject;
|
||||
T result = caseAttributes(attributes);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Root</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Root</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseRoot(Root object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Text Domain</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Text Domain</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseTextDomain(TextDomain object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Preprocessor</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Preprocessor</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T casePreprocessor(Preprocessor object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Macro</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Macro</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMacro(Macro object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Path Include</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Path Include</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T casePathInclude(PathInclude object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Root Type</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Root Type</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseRootType(RootType object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Root Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Root Tag</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseRootTag(RootTag object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Simple Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Simple Tag</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseSimpleTag(SimpleTag object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Added Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Added Tag</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseAddedTag(AddedTag object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Attributes</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>Attributes</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseAttributes(Attributes object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch, but this is the last case anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T defaultCase(EObject object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
} //WMLSwitch
|
100
utils/java/org.wesnoth.wml/src/org/wesnoth/GenerateWML.mwe2
Normal file
100
utils/java/org.wesnoth.wml/src/org/wesnoth/GenerateWML.mwe2
Normal file
|
@ -0,0 +1,100 @@
|
|||
module org.wesnoth.WML
|
||||
|
||||
import org.eclipse.emf.mwe.utils.*
|
||||
import org.eclipse.xtext.generator.*
|
||||
import org.eclipse.xtext.ui.generator.*
|
||||
|
||||
var grammarURI = "classpath:/org/wesnoth/WML.xtext"
|
||||
var file.extensions = "cfg"
|
||||
var projectName = "org.wesnoth.wml"
|
||||
var runtimeProject = "../${projectName}"
|
||||
|
||||
Workflow {
|
||||
bean = StandaloneSetup {
|
||||
platformUri = "${runtimeProject}/.."
|
||||
}
|
||||
|
||||
component = DirectoryCleaner {
|
||||
directory = "${runtimeProject}/src-gen"
|
||||
}
|
||||
|
||||
component = DirectoryCleaner {
|
||||
directory = "${runtimeProject}.ui/src-gen"
|
||||
}
|
||||
|
||||
component = Generator {
|
||||
pathRtProject = runtimeProject
|
||||
pathUiProject = "${runtimeProject}.ui"
|
||||
projectNameRt = projectName
|
||||
projectNameUi = "${projectName}.ui"
|
||||
language = {
|
||||
uri = grammarURI
|
||||
fileExtensions = file.extensions
|
||||
|
||||
// Java API to access grammar elements (required by several other fragments)
|
||||
fragment = grammarAccess.GrammarAccessFragment {}
|
||||
|
||||
// generates Java API for the generated EPackages
|
||||
fragment = ecore.EcoreGeneratorFragment {
|
||||
// referencedGenModels = "uri to genmodel, uri to next genmodel"
|
||||
}
|
||||
|
||||
// the serialization component
|
||||
fragment = parseTreeConstructor.ParseTreeConstructorFragment {}
|
||||
|
||||
// a custom ResourceFactory for use with EMF
|
||||
fragment = resourceFactory.ResourceFactoryFragment {
|
||||
fileExtensions = file.extensions
|
||||
}
|
||||
|
||||
// The antlr parser generator fragment.
|
||||
fragment = parser.antlr.XtextAntlrGeneratorFragment {
|
||||
// options = {
|
||||
// backtrack = true
|
||||
// }
|
||||
}
|
||||
|
||||
// java-based API for validation
|
||||
fragment = validation.JavaValidatorFragment {
|
||||
composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
|
||||
composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
|
||||
// registerForImportedPackages = true
|
||||
}
|
||||
|
||||
// scoping and exporting API
|
||||
// fragment = scoping.ImportURIScopingFragment {}
|
||||
// fragment = exporting.SimpleNamesFragment {}
|
||||
|
||||
// scoping and exporting API
|
||||
fragment = scoping.ImportNamespacesScopingFragment {}
|
||||
fragment = exporting.QualifiedNamesFragment {}
|
||||
fragment = builder.BuilderIntegrationFragment {}
|
||||
|
||||
// formatter API
|
||||
fragment = formatting.FormatterFragment {}
|
||||
|
||||
// labeling API
|
||||
fragment = labeling.LabelProviderFragment {}
|
||||
|
||||
// outline API
|
||||
fragment = outline.TransformerFragment {}
|
||||
fragment = outline.OutlineNodeAdapterFactoryFragment {}
|
||||
fragment = outline.QuickOutlineFragment {}
|
||||
|
||||
// quickfix API
|
||||
fragment = quickfix.QuickfixProviderFragment {}
|
||||
|
||||
// content assist API
|
||||
fragment = contentAssist.JavaBasedContentAssistFragment {}
|
||||
|
||||
// generates a more lightweight Antlr parser and lexer tailored for content assist
|
||||
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}
|
||||
|
||||
// project wizard (optional)
|
||||
// fragment = projectWizard.SimpleProjectWizardFragment {
|
||||
// generatorProjectName = "${projectName}.generator"
|
||||
// modelFileExtension = file.extensions
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
70
utils/java/org.wesnoth.wml/src/org/wesnoth/WML.xtext
Normal file
70
utils/java/org.wesnoth.wml/src/org/wesnoth/WML.xtext
Normal file
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* @author Timotei Dolean
|
||||
*/
|
||||
grammar org.wesnoth.WML hidden(WS,SL_COMMENT)
|
||||
|
||||
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
|
||||
|
||||
generate wML "http://www.wesnoth.org/WML"
|
||||
|
||||
Root:
|
||||
textdomains += TextDomain*
|
||||
& preproc += Preprocessor*
|
||||
& roots += RootType*
|
||||
;
|
||||
|
||||
TextDomain:
|
||||
'#textdomain ' DomainName=ID;
|
||||
|
||||
Preprocessor:
|
||||
Macro | PathInclude;
|
||||
Macro:
|
||||
'{' macroName = ID '}';
|
||||
PathInclude:
|
||||
'{' path = (HOMEPATH |PATH) '}';
|
||||
|
||||
RootType:
|
||||
'[' startTag = RootTag ']'
|
||||
subTypes += RootType*
|
||||
& at += Attributes*
|
||||
& okpreproc += Preprocessor*
|
||||
'[' '/' endTag = RootTag ']';
|
||||
|
||||
RootTag:
|
||||
SimpleTag | AddedTag;
|
||||
SimpleTag:
|
||||
(endTag?='/')? tagName=RootTagsList;
|
||||
AddedTag:
|
||||
'+' tagName = RootTagsList;
|
||||
|
||||
RootTagsList:
|
||||
ID; //'about' | 'binary_path' | 'campaign' | 'textdomain' | 'units';
|
||||
|
||||
Attributes:
|
||||
attrName=ID '=' attrValue=(ID|IDLIST|TSTRING|STRING|PATH);
|
||||
|
||||
// translatable string
|
||||
TSTRING:
|
||||
'_' STRING;
|
||||
HOMEPATH:
|
||||
'~' PATH;
|
||||
// ==== TERMINAL RULES ====
|
||||
terminal SL_COMMENT: '#' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal WS : (' '|'\t'|'\r'|'\n')+;
|
||||
// no multiline comment defined on WML,
|
||||
// terminal ML_COMMENT: '#' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
|
||||
terminal IDLIST : (ID ',')* ID;
|
||||
//terminal INT returns ecore::EInt: ('0'..'9')+;
|
||||
terminal STRING :
|
||||
'"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'"'|"'"|'\\') | !('\\'|'"') )* '"' |
|
||||
"'" ( '\\' ('b'|'t'|'n'|'f'|'r'|'"'|"'"|'\\') | !('\\'|"'") )* "'";
|
||||
terminal ANY_OTHER: .;
|
||||
//terminal WORD_START: ' ' | '=';
|
||||
//terminal WORD_END : '#' | ' ';
|
||||
// line end
|
||||
terminal PATH : //('"')?
|
||||
(('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/')*
|
||||
('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/'?
|
||||
//('"')?
|
||||
;
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth;
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
public class WMLRuntimeModule extends org.wesnoth.AbstractWMLRuntimeModule {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
package org.wesnoth;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages
|
||||
* without equinox extension registry
|
||||
*/
|
||||
public class WMLStandaloneSetup extends WMLStandaloneSetupGenerated{
|
||||
|
||||
public static void doSetup() {
|
||||
new WMLStandaloneSetup().createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.formatting;
|
||||
|
||||
import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
|
||||
import org.eclipse.xtext.formatting.impl.FormattingConfig;
|
||||
|
||||
/**
|
||||
* This class contains custom formatting description.
|
||||
*
|
||||
* see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
|
||||
* on how and when to use it
|
||||
*
|
||||
* Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
|
||||
*/
|
||||
public class WMLFormatter extends AbstractDeclarativeFormatter {
|
||||
|
||||
@Override
|
||||
protected void configureFormatting(FormattingConfig c) {
|
||||
org.wesnoth.services.WMLGrammarAccess f = (org.wesnoth.services.WMLGrammarAccess) getGrammarAccess();
|
||||
|
||||
c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule());
|
||||
//c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule());
|
||||
//c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule());
|
||||
|
||||
// ...
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.scoping;
|
||||
|
||||
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
|
||||
|
||||
/**
|
||||
* This class contains custom scoping description.
|
||||
*
|
||||
* see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping
|
||||
* on how and when to use it
|
||||
*
|
||||
*/
|
||||
public class WMLScopeProvider extends AbstractDeclarativeScopeProvider {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* @author Timotei Dolean
|
||||
*/
|
||||
package org.wesnoth.validation;
|
||||
|
||||
public class WMLJavaValidator extends AbstractWMLJavaValidator {
|
||||
|
||||
// @Check
|
||||
// public void checkGreetingStartsWithCapital(Attributes attr) {
|
||||
//System.out.println("Bla: ");
|
||||
// for (String itm : attr.getName())
|
||||
// {
|
||||
// System.out.println(itm);
|
||||
// }
|
||||
// if (!Character.isUpperCase(attr.getName().charAt(0))) {
|
||||
// warning("Name should start with a capital", MyDslPackage.GREETING__NAME);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue