eclipse plugin: Dos2Unix
This commit is contained in:
parent
3d08dd0acd
commit
7682bbd66b
48 changed files with 19740 additions and 19740 deletions
|
@ -1,132 +1,132 @@
|
|||
/*
|
||||
* 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.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;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 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.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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,52 +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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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
|
@ -1,15 +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");
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,56 +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_EOL", "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 "WMLRoot";
|
||||
}
|
||||
|
||||
public WMLGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(WMLGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 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_EOL", "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 "WMLRoot";
|
||||
}
|
||||
|
||||
public WMLGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(WMLGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,20 +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})
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
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})
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,55 +1,55 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Macro Tokens</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.MacroTokens#getVal <em>Val</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getMacroTokens()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface MacroTokens extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Val</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Val</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Val</em>' attribute.
|
||||
* @see #setVal(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getMacroTokens_Val()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getVal();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.MacroTokens#getVal <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Val</em>' attribute.
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
*/
|
||||
void setVal(String value);
|
||||
|
||||
} // MacroTokens
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Macro Tokens</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.MacroTokens#getVal <em>Val</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getMacroTokens()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface MacroTokens extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Val</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Val</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Val</em>' attribute.
|
||||
* @see #setVal(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getMacroTokens_Val()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getVal();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.MacroTokens#getVal <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Val</em>' attribute.
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
*/
|
||||
void setVal(String value);
|
||||
|
||||
} // MacroTokens
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Array Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLArrayCall#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLArrayCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLArrayCall extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</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>Value</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLArrayCall_Value()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValue();
|
||||
|
||||
} // WMLArrayCall
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Array Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLArrayCall#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLArrayCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLArrayCall extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</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>Value</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLArrayCall_Value()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValue();
|
||||
|
||||
} // WMLArrayCall
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
/**
|
||||
* <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>WML Key</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLKey extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKeyValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</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>Value</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Value()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKeyValue> getValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Eol</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Eol</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Eol</em>' attribute.
|
||||
* @see #setEol(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Eol()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEol();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#getEol <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Eol</em>' attribute.
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
*/
|
||||
void setEol(String value);
|
||||
|
||||
} // WMLKey
|
||||
/**
|
||||
* <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>WML Key</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLKey extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKeyValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</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>Value</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Value()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKeyValue> getValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Eol</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Eol</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Eol</em>' attribute.
|
||||
* @see #setEol(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey_Eol()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEol();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#getEol <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Eol</em>' attribute.
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
*/
|
||||
void setEol(String value);
|
||||
|
||||
} // WMLKey
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Key Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKeyValue()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLKeyValue extends EObject
|
||||
{
|
||||
} // WMLKeyValue
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Key Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKeyValue()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLKeyValue extends EObject
|
||||
{
|
||||
} // WMLKeyValue
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Lua Code</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLLuaCode#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLLuaCode()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLLuaCode extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLLuaCode_Value()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLLuaCode#getValue <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
} // WMLLuaCode
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Lua Code</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLLuaCode#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLLuaCode()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLLuaCode extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLLuaCode_Value()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLLuaCode#getValue <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
} // WMLLuaCode
|
||||
|
|
|
@ -1,145 +1,145 @@
|
|||
/**
|
||||
* <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>WML Macro Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#isPoint <em>Point</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#isRelative <em>Relative</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getParams <em>Params</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getExtraMacros <em>Extra Macros</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLMacroCall extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Point</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Point</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Point</em>' attribute.
|
||||
* @see #setPoint(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Point()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isPoint();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#isPoint <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Point</em>' attribute.
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
*/
|
||||
void setPoint(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Relative</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Relative</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Relative</em>' attribute.
|
||||
* @see #setRelative(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Relative()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isRelative();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#isRelative <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Relative</em>' attribute.
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
*/
|
||||
void setRelative(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Params</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Params</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>Params</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Params()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<EObject> getParams();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Extra Macros</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Extra Macros</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>Extra Macros</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_ExtraMacros()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getExtraMacros();
|
||||
|
||||
} // WMLMacroCall
|
||||
/**
|
||||
* <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>WML Macro Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#isPoint <em>Point</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#isRelative <em>Relative</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getParams <em>Params</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroCall#getExtraMacros <em>Extra Macros</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLMacroCall extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Point</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Point</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Point</em>' attribute.
|
||||
* @see #setPoint(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Point()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isPoint();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#isPoint <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Point</em>' attribute.
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
*/
|
||||
void setPoint(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Relative</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Relative</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Relative</em>' attribute.
|
||||
* @see #setRelative(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Relative()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isRelative();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#isRelative <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Relative</em>' attribute.
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
*/
|
||||
void setRelative(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroCall#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Params</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Params</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>Params</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Params()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<EObject> getParams();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Extra Macros</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Extra Macros</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>Extra Macros</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_ExtraMacros()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getExtraMacros();
|
||||
|
||||
} // WMLMacroCall
|
||||
|
|
|
@ -1,203 +1,203 @@
|
|||
/**
|
||||
* <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>WML Macro Define</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getValues <em>Values</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLMacroDefine extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroDefine#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLMacroDefine_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Values</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Values</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>Values</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Values()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValues();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroDefine#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLMacroDefine
|
||||
/**
|
||||
* <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>WML Macro Define</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getValues <em>Values</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLMacroDefine#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLMacroDefine extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroDefine#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLMacroDefine_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Values</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Values</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>Values</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_Values()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValues();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLMacroDefine_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLMacroDefine#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLMacroDefine
|
||||
|
|
|
@ -1,220 +1,220 @@
|
|||
/**
|
||||
* <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>WML Preproc IF</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getValues <em>Values</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLPreprocIF extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLPreprocIF#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLPreprocIF_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Values</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Values</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>Values</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Values()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValues();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Elses</b></em>' attribute list.
|
||||
* The list contents are of type {@link java.lang.String}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Elses</em>' attribute list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Elses</em>' attribute list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Elses()
|
||||
* @model unique="false"
|
||||
* @generated
|
||||
*/
|
||||
EList<String> getElses();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLPreprocIF
|
||||
/**
|
||||
* <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>WML Preproc IF</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getValues <em>Values</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLPreprocIF extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLPreprocIF#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLPreprocIF_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Values</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLValue}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Values</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>Values</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Values()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLValue> getValues();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Elses</b></em>' attribute list.
|
||||
* The list contents are of type {@link java.lang.String}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Elses</em>' attribute list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Elses</em>' attribute list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Elses()
|
||||
* @model unique="false"
|
||||
* @generated
|
||||
*/
|
||||
EList<String> getElses();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLPreprocIF
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
/**
|
||||
* <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>WML Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getIfDefs <em>If Defs</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLRoot extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLRoot_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
} // WMLRoot
|
||||
/**
|
||||
* <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>WML Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLRoot#getIfDefs <em>If Defs</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLRoot extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLRoot_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLRoot_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
} // WMLRoot
|
||||
|
|
|
@ -1,213 +1,213 @@
|
|||
/**
|
||||
* <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>WML Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#isPlus <em>Plus</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLTag extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Plus</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Plus</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Plus</em>' attribute.
|
||||
* @see #setPlus(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Plus()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isPlus();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#isPlus <em>Plus</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Plus</em>' attribute.
|
||||
* @see #isPlus()
|
||||
* @generated
|
||||
*/
|
||||
void setPlus(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLTag_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLTag
|
||||
/**
|
||||
* <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>WML Tag</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#isPlus <em>Plus</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getIfDefs <em>If Defs</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getEndName <em>End Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLTag extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Plus</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Plus</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Plus</em>' attribute.
|
||||
* @see #setPlus(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Plus()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
boolean isPlus();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#isPlus <em>Plus</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Plus</em>' attribute.
|
||||
* @see #isPlus()
|
||||
* @generated
|
||||
*/
|
||||
void setPlus(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLTextdomain}.
|
||||
* <!-- 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#getWMLTag_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>If Defs</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wml.WMLPreprocIF}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>If Defs</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>If Defs</em>' containment reference list.
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_IfDefs()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLPreprocIF> getIfDefs();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>End Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>End 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>End Name</em>' attribute.
|
||||
* @see #setEndName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag_EndName()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEndName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#getEndName <em>End Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>End Name</em>' attribute.
|
||||
* @see #getEndName()
|
||||
* @generated
|
||||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
} // WMLTag
|
||||
|
|
|
@ -1,55 +1,55 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Textdomain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLTextdomain#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTextdomain()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLTextdomain extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTextdomain_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTextdomain#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // WMLTextdomain
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Textdomain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLTextdomain#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTextdomain()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLTextdomain extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTextdomain_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTextdomain#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // WMLTextdomain
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLValue#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLValue()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLValue extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLValue_Value()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLValue#getValue <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
} // WMLValue
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>WML Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLValue#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLValue()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WMLValue extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>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>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLValue_Value()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLValue#getValue <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
} // WMLValue
|
||||
|
|
|
@ -1,146 +1,146 @@
|
|||
/**
|
||||
* <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>WML Root</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Root</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLRoot createWMLRoot();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Tag</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLTag createWMLTag();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Key</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Key</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLKey createWMLKey();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Key Value</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Key Value</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLKeyValue createWMLKeyValue();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Macro Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Macro Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLMacroCall createWMLMacroCall();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Lua Code</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Lua Code</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLLuaCode createWMLLuaCode();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Array Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Array Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLArrayCall createWMLArrayCall();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Macro Define</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Macro Define</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLMacroDefine createWMLMacroDefine();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Preproc IF</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Preproc IF</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLPreprocIF createWMLPreprocIF();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Textdomain</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Textdomain</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLTextdomain createWMLTextdomain();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Value</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Value</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLValue createWMLValue();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Macro Tokens</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Macro Tokens</em>'.
|
||||
* @generated
|
||||
*/
|
||||
MacroTokens createMacroTokens();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
WmlPackage getWmlPackage();
|
||||
|
||||
} //WmlFactory
|
||||
/**
|
||||
* <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>WML Root</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Root</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLRoot createWMLRoot();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Tag</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Tag</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLTag createWMLTag();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Key</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Key</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLKey createWMLKey();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Key Value</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Key Value</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLKeyValue createWMLKeyValue();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Macro Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Macro Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLMacroCall createWMLMacroCall();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Lua Code</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Lua Code</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLLuaCode createWMLLuaCode();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Array Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Array Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLArrayCall createWMLArrayCall();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Macro Define</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Macro Define</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLMacroDefine createWMLMacroDefine();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Preproc IF</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Preproc IF</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLPreprocIF createWMLPreprocIF();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Textdomain</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Textdomain</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLTextdomain createWMLTextdomain();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>WML Value</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>WML Value</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WMLValue createWMLValue();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Macro Tokens</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Macro Tokens</em>'.
|
||||
* @generated
|
||||
*/
|
||||
MacroTokens createMacroTokens();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
WmlPackage getWmlPackage();
|
||||
|
||||
} //WmlFactory
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,181 +1,181 @@
|
|||
/**
|
||||
* <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.MacroTokens;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Macro Tokens</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.MacroTokensImpl#getVal <em>Val</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MacroTokensImpl extends MinimalEObjectImpl.Container implements MacroTokens
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getVal() <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VAL_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getVal() <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String val = VAL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MacroTokensImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.MACRO_TOKENS;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getVal()
|
||||
{
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setVal(String newVal)
|
||||
{
|
||||
String oldVal = val;
|
||||
val = newVal;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.MACRO_TOKENS__VAL, oldVal, val));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.MACRO_TOKENS__VAL:
|
||||
return getVal();
|
||||
}
|
||||
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_TOKENS__VAL:
|
||||
setVal((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_TOKENS__VAL:
|
||||
setVal(VAL_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.MACRO_TOKENS__VAL:
|
||||
return VAL_EDEFAULT == null ? val != null : !VAL_EDEFAULT.equals(val);
|
||||
}
|
||||
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(" (val: ");
|
||||
result.append(val);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //MacroTokensImpl
|
||||
/**
|
||||
* <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.MacroTokens;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Macro Tokens</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.MacroTokensImpl#getVal <em>Val</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MacroTokensImpl extends MinimalEObjectImpl.Container implements MacroTokens
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getVal() <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VAL_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getVal() <em>Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String val = VAL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MacroTokensImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.MACRO_TOKENS;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getVal()
|
||||
{
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setVal(String newVal)
|
||||
{
|
||||
String oldVal = val;
|
||||
val = newVal;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.MACRO_TOKENS__VAL, oldVal, val));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.MACRO_TOKENS__VAL:
|
||||
return getVal();
|
||||
}
|
||||
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_TOKENS__VAL:
|
||||
setVal((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_TOKENS__VAL:
|
||||
setVal(VAL_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.MACRO_TOKENS__VAL:
|
||||
return VAL_EDEFAULT == null ? val != null : !VAL_EDEFAULT.equals(val);
|
||||
}
|
||||
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(" (val: ");
|
||||
result.append(val);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //MacroTokensImpl
|
||||
|
|
|
@ -1,169 +1,169 @@
|
|||
/**
|
||||
* <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.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wml.WMLArrayCall;
|
||||
import org.wesnoth.wml.WMLValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Array Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLArrayCallImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLArrayCallImpl extends WMLKeyValueImpl implements WMLArrayCall
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLValue> value;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLArrayCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_ARRAY_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLValue> getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EObjectContainmentEList<WMLValue>(WMLValue.class, this, WmlPackage.WML_ARRAY_CALL__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
return ((InternalEList<?>)getValue()).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.WML_ARRAY_CALL__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_ARRAY_CALL__VALUE:
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends WMLValue>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
getValue().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
return value != null && !value.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //WMLArrayCallImpl
|
||||
/**
|
||||
* <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.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wml.WMLArrayCall;
|
||||
import org.wesnoth.wml.WMLValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Array Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLArrayCallImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLArrayCallImpl extends WMLKeyValueImpl implements WMLArrayCall
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLValue> value;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLArrayCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_ARRAY_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLValue> getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EObjectContainmentEList<WMLValue>(WMLValue.class, this, WmlPackage.WML_ARRAY_CALL__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
return ((InternalEList<?>)getValue()).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.WML_ARRAY_CALL__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_ARRAY_CALL__VALUE:
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends WMLValue>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
getValue().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ARRAY_CALL__VALUE:
|
||||
return value != null && !value.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //WMLArrayCallImpl
|
||||
|
|
|
@ -1,300 +1,300 @@
|
|||
/**
|
||||
* <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.WMLKey;
|
||||
import org.wesnoth.wml.WMLKeyValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Key</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLKeyValue> value;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String EOL_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String eol = EOL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLKeyImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_KEY;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLKeyValue> getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EObjectContainmentEList<WMLKeyValue>(WMLKeyValue.class, this, WmlPackage.WML_KEY__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getEol()
|
||||
{
|
||||
return eol;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setEol(String newEol)
|
||||
{
|
||||
String oldEol = eol;
|
||||
eol = newEol;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__EOL, oldEol, eol));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return ((InternalEList<?>)getValue()).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.WML_KEY__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return getValue();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return getEol();
|
||||
}
|
||||
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.WML_KEY__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends WMLKeyValue>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
return;
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol(EOL_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return value != null && !value.isEmpty();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return EOL_EDEFAULT == null ? eol != null : !EOL_EDEFAULT.equals(eol);
|
||||
}
|
||||
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(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", eol: ");
|
||||
result.append(eol);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLKeyImpl
|
||||
/**
|
||||
* <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.WMLKey;
|
||||
import org.wesnoth.wml.WMLKeyValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Key</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLKeyValue> value;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String EOL_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String eol = EOL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLKeyImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_KEY;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLKeyValue> getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EObjectContainmentEList<WMLKeyValue>(WMLKeyValue.class, this, WmlPackage.WML_KEY__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getEol()
|
||||
{
|
||||
return eol;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setEol(String newEol)
|
||||
{
|
||||
String oldEol = eol;
|
||||
eol = newEol;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__EOL, oldEol, eol));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return ((InternalEList<?>)getValue()).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.WML_KEY__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return getValue();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return getEol();
|
||||
}
|
||||
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.WML_KEY__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends WMLKeyValue>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
return;
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol(EOL_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_KEY__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_KEY__VALUE:
|
||||
return value != null && !value.isEmpty();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return EOL_EDEFAULT == null ? eol != null : !EOL_EDEFAULT.equals(eol);
|
||||
}
|
||||
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(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", eol: ");
|
||||
result.append(eol);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLKeyImpl
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wml.WMLKeyValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Key Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLKeyValueImpl extends MinimalEObjectImpl.Container implements WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLKeyValueImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_KEY_VALUE;
|
||||
}
|
||||
|
||||
} //WMLKeyValueImpl
|
||||
/**
|
||||
* <copyright>
|
||||
* </copyright>
|
||||
*
|
||||
|
||||
*/
|
||||
package org.wesnoth.wml.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.wesnoth.wml.WMLKeyValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Key Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLKeyValueImpl extends MinimalEObjectImpl.Container implements WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLKeyValueImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_KEY_VALUE;
|
||||
}
|
||||
|
||||
} //WMLKeyValueImpl
|
||||
|
|
|
@ -1,180 +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.wesnoth.wml.WMLLuaCode;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Lua Code</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLLuaCodeImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLLuaCodeImpl extends WMLKeyValueImpl implements WMLLuaCode
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLLuaCodeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_LUA_CODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setValue(String newValue)
|
||||
{
|
||||
String oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_LUA_CODE__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_LUA_CODE__VALUE:
|
||||
setValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
}
|
||||
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(" (value: ");
|
||||
result.append(value);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLLuaCodeImpl
|
||||
/**
|
||||
* <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.WMLLuaCode;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Lua Code</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLLuaCodeImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLLuaCodeImpl extends WMLKeyValueImpl implements WMLLuaCode
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLLuaCodeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_LUA_CODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setValue(String newValue)
|
||||
{
|
||||
String oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_LUA_CODE__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_LUA_CODE__VALUE:
|
||||
setValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_LUA_CODE__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
}
|
||||
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(" (value: ");
|
||||
result.append(value);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLLuaCodeImpl
|
||||
|
|
|
@ -1,393 +1,393 @@
|
|||
/**
|
||||
* <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.EObject;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wml.WMLMacroCall;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Macro Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#isPoint <em>Point</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#isRelative <em>Relative</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getParams <em>Params</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getExtraMacros <em>Extra Macros</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #isPoint() <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean POINT_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #isPoint() <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean point = POINT_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #isRelative() <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean RELATIVE_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #isRelative() <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean relative = RELATIVE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getParams() <em>Params</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getParams()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<EObject> params;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getExtraMacros() <em>Extra Macros</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getExtraMacros()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroCall> extraMacros;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLMacroCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_MACRO_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean isPoint()
|
||||
{
|
||||
return point;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setPoint(boolean newPoint)
|
||||
{
|
||||
boolean oldPoint = point;
|
||||
point = newPoint;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__POINT, oldPoint, point));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean isRelative()
|
||||
{
|
||||
return relative;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setRelative(boolean newRelative)
|
||||
{
|
||||
boolean oldRelative = relative;
|
||||
relative = newRelative;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__RELATIVE, oldRelative, relative));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<EObject> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
{
|
||||
params = new EObjectContainmentEList<EObject>(EObject.class, this, WmlPackage.WML_MACRO_CALL__PARAMS);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroCall> getExtraMacros()
|
||||
{
|
||||
if (extraMacros == null)
|
||||
{
|
||||
extraMacros = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WmlPackage.WML_MACRO_CALL__EXTRA_MACROS);
|
||||
}
|
||||
return extraMacros;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return ((InternalEList<?>)getParams()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return ((InternalEList<?>)getExtraMacros()).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.WML_MACRO_CALL__POINT:
|
||||
return isPoint();
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
return isRelative();
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return getParams();
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return getExtraMacros();
|
||||
}
|
||||
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.WML_MACRO_CALL__POINT:
|
||||
setPoint((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
setRelative((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
getParams().clear();
|
||||
getParams().addAll((Collection<? extends EObject>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
getExtraMacros().clear();
|
||||
getExtraMacros().addAll((Collection<? extends WMLMacroCall>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
setPoint(POINT_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
setRelative(RELATIVE_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
getParams().clear();
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
getExtraMacros().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
return point != POINT_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
return relative != RELATIVE_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return params != null && !params.isEmpty();
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return extraMacros != null && !extraMacros.isEmpty();
|
||||
}
|
||||
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(" (point: ");
|
||||
result.append(point);
|
||||
result.append(", relative: ");
|
||||
result.append(relative);
|
||||
result.append(", name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLMacroCallImpl
|
||||
/**
|
||||
* <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.EObject;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wml.WMLMacroCall;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Macro Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#isPoint <em>Point</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#isRelative <em>Relative</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getParams <em>Params</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getExtraMacros <em>Extra Macros</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #isPoint() <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean POINT_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #isPoint() <em>Point</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isPoint()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean point = POINT_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #isRelative() <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean RELATIVE_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #isRelative() <em>Relative</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isRelative()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean relative = RELATIVE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getParams() <em>Params</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getParams()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<EObject> params;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getExtraMacros() <em>Extra Macros</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getExtraMacros()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroCall> extraMacros;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLMacroCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_MACRO_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean isPoint()
|
||||
{
|
||||
return point;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setPoint(boolean newPoint)
|
||||
{
|
||||
boolean oldPoint = point;
|
||||
point = newPoint;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__POINT, oldPoint, point));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean isRelative()
|
||||
{
|
||||
return relative;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setRelative(boolean newRelative)
|
||||
{
|
||||
boolean oldRelative = relative;
|
||||
relative = newRelative;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__RELATIVE, oldRelative, relative));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<EObject> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
{
|
||||
params = new EObjectContainmentEList<EObject>(EObject.class, this, WmlPackage.WML_MACRO_CALL__PARAMS);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroCall> getExtraMacros()
|
||||
{
|
||||
if (extraMacros == null)
|
||||
{
|
||||
extraMacros = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WmlPackage.WML_MACRO_CALL__EXTRA_MACROS);
|
||||
}
|
||||
return extraMacros;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return ((InternalEList<?>)getParams()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return ((InternalEList<?>)getExtraMacros()).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.WML_MACRO_CALL__POINT:
|
||||
return isPoint();
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
return isRelative();
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return getParams();
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return getExtraMacros();
|
||||
}
|
||||
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.WML_MACRO_CALL__POINT:
|
||||
setPoint((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
setRelative((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
getParams().clear();
|
||||
getParams().addAll((Collection<? extends EObject>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
getExtraMacros().clear();
|
||||
getExtraMacros().addAll((Collection<? extends WMLMacroCall>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
setPoint(POINT_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
setRelative(RELATIVE_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
getParams().clear();
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
getExtraMacros().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
return point != POINT_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__RELATIVE:
|
||||
return relative != RELATIVE_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_MACRO_CALL__PARAMS:
|
||||
return params != null && !params.isEmpty();
|
||||
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
|
||||
return extraMacros != null && !extraMacros.isEmpty();
|
||||
}
|
||||
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(" (point: ");
|
||||
result.append(point);
|
||||
result.append(", relative: ");
|
||||
result.append(relative);
|
||||
result.append(", name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLMacroCallImpl
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,327 +1,327 @@
|
|||
/**
|
||||
* <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.WMLMacroCall;
|
||||
import org.wesnoth.wml.WMLMacroDefine;
|
||||
import org.wesnoth.wml.WMLPreprocIF;
|
||||
import org.wesnoth.wml.WMLRoot;
|
||||
import org.wesnoth.wml.WMLTag;
|
||||
import org.wesnoth.wml.WMLTextdomain;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getIfDefs <em>If Defs</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLRootImpl extends MinimalEObjectImpl.Container implements WMLRoot
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getTags() <em>Tags</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTags()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLTag> tags;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroCalls() <em>Macro Calls</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroCalls()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroCall> macroCalls;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroDefines() <em>Macro Defines</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroDefines()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroDefine> macroDefines;
|
||||
|
||||
/**
|
||||
* 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<WMLTextdomain> textdomains;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getIfDefs() <em>If Defs</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getIfDefs()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLPreprocIF> ifDefs;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLRootImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_ROOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTag> getTags()
|
||||
{
|
||||
if (tags == null)
|
||||
{
|
||||
tags = new EObjectContainmentEList<WMLTag>(WMLTag.class, this, WmlPackage.WML_ROOT__TAGS);
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroCall> getMacroCalls()
|
||||
{
|
||||
if (macroCalls == null)
|
||||
{
|
||||
macroCalls = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WmlPackage.WML_ROOT__MACRO_CALLS);
|
||||
}
|
||||
return macroCalls;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroDefine> getMacroDefines()
|
||||
{
|
||||
if (macroDefines == null)
|
||||
{
|
||||
macroDefines = new EObjectContainmentEList<WMLMacroDefine>(WMLMacroDefine.class, this, WmlPackage.WML_ROOT__MACRO_DEFINES);
|
||||
}
|
||||
return macroDefines;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTextdomain> getTextdomains()
|
||||
{
|
||||
if (textdomains == null)
|
||||
{
|
||||
textdomains = new EObjectContainmentEList<WMLTextdomain>(WMLTextdomain.class, this, WmlPackage.WML_ROOT__TEXTDOMAINS);
|
||||
}
|
||||
return textdomains;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLPreprocIF> getIfDefs()
|
||||
{
|
||||
if (ifDefs == null)
|
||||
{
|
||||
ifDefs = new EObjectContainmentEList<WMLPreprocIF>(WMLPreprocIF.class, this, WmlPackage.WML_ROOT__IF_DEFS);
|
||||
}
|
||||
return ifDefs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
return ((InternalEList<?>)getTags()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return ((InternalEList<?>)getMacroCalls()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return ((InternalEList<?>)getMacroDefines()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return ((InternalEList<?>)getTextdomains()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return ((InternalEList<?>)getIfDefs()).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.WML_ROOT__TAGS:
|
||||
return getTags();
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return getMacroCalls();
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return getMacroDefines();
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return getTextdomains();
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return getIfDefs();
|
||||
}
|
||||
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.WML_ROOT__TAGS:
|
||||
getTags().clear();
|
||||
getTags().addAll((Collection<? extends WMLTag>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
getMacroCalls().addAll((Collection<? extends WMLMacroCall>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
getMacroDefines().addAll((Collection<? extends WMLMacroDefine>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
getTextdomains().addAll((Collection<? extends WMLTextdomain>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
getIfDefs().clear();
|
||||
getIfDefs().addAll((Collection<? extends WMLPreprocIF>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
getTags().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
getIfDefs().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
return tags != null && !tags.isEmpty();
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return macroCalls != null && !macroCalls.isEmpty();
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return macroDefines != null && !macroDefines.isEmpty();
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return textdomains != null && !textdomains.isEmpty();
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return ifDefs != null && !ifDefs.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //WMLRootImpl
|
||||
/**
|
||||
* <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.WMLMacroCall;
|
||||
import org.wesnoth.wml.WMLMacroDefine;
|
||||
import org.wesnoth.wml.WMLPreprocIF;
|
||||
import org.wesnoth.wml.WMLRoot;
|
||||
import org.wesnoth.wml.WMLTag;
|
||||
import org.wesnoth.wml.WMLTextdomain;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Root</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getTextdomains <em>Textdomains</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLRootImpl#getIfDefs <em>If Defs</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLRootImpl extends MinimalEObjectImpl.Container implements WMLRoot
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getTags() <em>Tags</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTags()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLTag> tags;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroCalls() <em>Macro Calls</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroCalls()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroCall> macroCalls;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroDefines() <em>Macro Defines</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroDefines()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroDefine> macroDefines;
|
||||
|
||||
/**
|
||||
* 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<WMLTextdomain> textdomains;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getIfDefs() <em>If Defs</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getIfDefs()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLPreprocIF> ifDefs;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLRootImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_ROOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTag> getTags()
|
||||
{
|
||||
if (tags == null)
|
||||
{
|
||||
tags = new EObjectContainmentEList<WMLTag>(WMLTag.class, this, WmlPackage.WML_ROOT__TAGS);
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroCall> getMacroCalls()
|
||||
{
|
||||
if (macroCalls == null)
|
||||
{
|
||||
macroCalls = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WmlPackage.WML_ROOT__MACRO_CALLS);
|
||||
}
|
||||
return macroCalls;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroDefine> getMacroDefines()
|
||||
{
|
||||
if (macroDefines == null)
|
||||
{
|
||||
macroDefines = new EObjectContainmentEList<WMLMacroDefine>(WMLMacroDefine.class, this, WmlPackage.WML_ROOT__MACRO_DEFINES);
|
||||
}
|
||||
return macroDefines;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTextdomain> getTextdomains()
|
||||
{
|
||||
if (textdomains == null)
|
||||
{
|
||||
textdomains = new EObjectContainmentEList<WMLTextdomain>(WMLTextdomain.class, this, WmlPackage.WML_ROOT__TEXTDOMAINS);
|
||||
}
|
||||
return textdomains;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLPreprocIF> getIfDefs()
|
||||
{
|
||||
if (ifDefs == null)
|
||||
{
|
||||
ifDefs = new EObjectContainmentEList<WMLPreprocIF>(WMLPreprocIF.class, this, WmlPackage.WML_ROOT__IF_DEFS);
|
||||
}
|
||||
return ifDefs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
return ((InternalEList<?>)getTags()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return ((InternalEList<?>)getMacroCalls()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return ((InternalEList<?>)getMacroDefines()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return ((InternalEList<?>)getTextdomains()).basicRemove(otherEnd, msgs);
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return ((InternalEList<?>)getIfDefs()).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.WML_ROOT__TAGS:
|
||||
return getTags();
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return getMacroCalls();
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return getMacroDefines();
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return getTextdomains();
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return getIfDefs();
|
||||
}
|
||||
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.WML_ROOT__TAGS:
|
||||
getTags().clear();
|
||||
getTags().addAll((Collection<? extends WMLTag>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
getMacroCalls().addAll((Collection<? extends WMLMacroCall>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
getMacroDefines().addAll((Collection<? extends WMLMacroDefine>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
getTextdomains().addAll((Collection<? extends WMLTextdomain>)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
getIfDefs().clear();
|
||||
getIfDefs().addAll((Collection<? extends WMLPreprocIF>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
getTags().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
return;
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
getIfDefs().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_ROOT__TAGS:
|
||||
return tags != null && !tags.isEmpty();
|
||||
case WmlPackage.WML_ROOT__MACRO_CALLS:
|
||||
return macroCalls != null && !macroCalls.isEmpty();
|
||||
case WmlPackage.WML_ROOT__MACRO_DEFINES:
|
||||
return macroDefines != null && !macroDefines.isEmpty();
|
||||
case WmlPackage.WML_ROOT__TEXTDOMAINS:
|
||||
return textdomains != null && !textdomains.isEmpty();
|
||||
case WmlPackage.WML_ROOT__IF_DEFS:
|
||||
return ifDefs != null && !ifDefs.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //WMLRootImpl
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,181 +1,181 @@
|
|||
/**
|
||||
* <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.WMLTextdomain;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Textdomain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTextdomainImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLTextdomainImpl extends MinimalEObjectImpl.Container implements WMLTextdomain
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLTextdomainImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_TEXTDOMAIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TEXTDOMAIN__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
return getName();
|
||||
}
|
||||
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.WML_TEXTDOMAIN__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
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(" (name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLTextdomainImpl
|
||||
/**
|
||||
* <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.WMLTextdomain;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Textdomain</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTextdomainImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLTextdomainImpl extends MinimalEObjectImpl.Container implements WMLTextdomain
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLTextdomainImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_TEXTDOMAIN;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TEXTDOMAIN__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
return getName();
|
||||
}
|
||||
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.WML_TEXTDOMAIN__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_TEXTDOMAIN__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
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(" (name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLTextdomainImpl
|
||||
|
|
|
@ -1,180 +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.wesnoth.wml.WMLValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLValueImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLValueImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setValue(String newValue)
|
||||
{
|
||||
String oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_VALUE__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_VALUE__VALUE:
|
||||
setValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
}
|
||||
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(" (value: ");
|
||||
result.append(value);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLValueImpl
|
||||
/**
|
||||
* <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.WMLValue;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>WML Value</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLValueImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WMLValueImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WmlPackage.Literals.WML_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setValue(String newValue)
|
||||
{
|
||||
String oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_VALUE__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
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.WML_VALUE__VALUE:
|
||||
setValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WmlPackage.WML_VALUE__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
}
|
||||
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(" (value: ");
|
||||
result.append(value);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WMLValueImpl
|
||||
|
|
|
@ -1,242 +1,242 @@
|
|||
/**
|
||||
* <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.WML_ROOT: return createWMLRoot();
|
||||
case WmlPackage.WML_TAG: return createWMLTag();
|
||||
case WmlPackage.WML_KEY: return createWMLKey();
|
||||
case WmlPackage.WML_KEY_VALUE: return createWMLKeyValue();
|
||||
case WmlPackage.WML_MACRO_CALL: return createWMLMacroCall();
|
||||
case WmlPackage.WML_LUA_CODE: return createWMLLuaCode();
|
||||
case WmlPackage.WML_ARRAY_CALL: return createWMLArrayCall();
|
||||
case WmlPackage.WML_MACRO_DEFINE: return createWMLMacroDefine();
|
||||
case WmlPackage.WML_PREPROC_IF: return createWMLPreprocIF();
|
||||
case WmlPackage.WML_TEXTDOMAIN: return createWMLTextdomain();
|
||||
case WmlPackage.WML_VALUE: return createWMLValue();
|
||||
case WmlPackage.MACRO_TOKENS: return createMacroTokens();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLRoot createWMLRoot()
|
||||
{
|
||||
WMLRootImpl wmlRoot = new WMLRootImpl();
|
||||
return wmlRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLTag createWMLTag()
|
||||
{
|
||||
WMLTagImpl wmlTag = new WMLTagImpl();
|
||||
return wmlTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLKey createWMLKey()
|
||||
{
|
||||
WMLKeyImpl wmlKey = new WMLKeyImpl();
|
||||
return wmlKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLKeyValue createWMLKeyValue()
|
||||
{
|
||||
WMLKeyValueImpl wmlKeyValue = new WMLKeyValueImpl();
|
||||
return wmlKeyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLMacroCall createWMLMacroCall()
|
||||
{
|
||||
WMLMacroCallImpl wmlMacroCall = new WMLMacroCallImpl();
|
||||
return wmlMacroCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLLuaCode createWMLLuaCode()
|
||||
{
|
||||
WMLLuaCodeImpl wmlLuaCode = new WMLLuaCodeImpl();
|
||||
return wmlLuaCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLArrayCall createWMLArrayCall()
|
||||
{
|
||||
WMLArrayCallImpl wmlArrayCall = new WMLArrayCallImpl();
|
||||
return wmlArrayCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLMacroDefine createWMLMacroDefine()
|
||||
{
|
||||
WMLMacroDefineImpl wmlMacroDefine = new WMLMacroDefineImpl();
|
||||
return wmlMacroDefine;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLPreprocIF createWMLPreprocIF()
|
||||
{
|
||||
WMLPreprocIFImpl wmlPreprocIF = new WMLPreprocIFImpl();
|
||||
return wmlPreprocIF;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLTextdomain createWMLTextdomain()
|
||||
{
|
||||
WMLTextdomainImpl wmlTextdomain = new WMLTextdomainImpl();
|
||||
return wmlTextdomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLValue createWMLValue()
|
||||
{
|
||||
WMLValueImpl wmlValue = new WMLValueImpl();
|
||||
return wmlValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public MacroTokens createMacroTokens()
|
||||
{
|
||||
MacroTokensImpl macroTokens = new MacroTokensImpl();
|
||||
return macroTokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- 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
|
||||
/**
|
||||
* <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.WML_ROOT: return createWMLRoot();
|
||||
case WmlPackage.WML_TAG: return createWMLTag();
|
||||
case WmlPackage.WML_KEY: return createWMLKey();
|
||||
case WmlPackage.WML_KEY_VALUE: return createWMLKeyValue();
|
||||
case WmlPackage.WML_MACRO_CALL: return createWMLMacroCall();
|
||||
case WmlPackage.WML_LUA_CODE: return createWMLLuaCode();
|
||||
case WmlPackage.WML_ARRAY_CALL: return createWMLArrayCall();
|
||||
case WmlPackage.WML_MACRO_DEFINE: return createWMLMacroDefine();
|
||||
case WmlPackage.WML_PREPROC_IF: return createWMLPreprocIF();
|
||||
case WmlPackage.WML_TEXTDOMAIN: return createWMLTextdomain();
|
||||
case WmlPackage.WML_VALUE: return createWMLValue();
|
||||
case WmlPackage.MACRO_TOKENS: return createMacroTokens();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLRoot createWMLRoot()
|
||||
{
|
||||
WMLRootImpl wmlRoot = new WMLRootImpl();
|
||||
return wmlRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLTag createWMLTag()
|
||||
{
|
||||
WMLTagImpl wmlTag = new WMLTagImpl();
|
||||
return wmlTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLKey createWMLKey()
|
||||
{
|
||||
WMLKeyImpl wmlKey = new WMLKeyImpl();
|
||||
return wmlKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLKeyValue createWMLKeyValue()
|
||||
{
|
||||
WMLKeyValueImpl wmlKeyValue = new WMLKeyValueImpl();
|
||||
return wmlKeyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLMacroCall createWMLMacroCall()
|
||||
{
|
||||
WMLMacroCallImpl wmlMacroCall = new WMLMacroCallImpl();
|
||||
return wmlMacroCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLLuaCode createWMLLuaCode()
|
||||
{
|
||||
WMLLuaCodeImpl wmlLuaCode = new WMLLuaCodeImpl();
|
||||
return wmlLuaCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLArrayCall createWMLArrayCall()
|
||||
{
|
||||
WMLArrayCallImpl wmlArrayCall = new WMLArrayCallImpl();
|
||||
return wmlArrayCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLMacroDefine createWMLMacroDefine()
|
||||
{
|
||||
WMLMacroDefineImpl wmlMacroDefine = new WMLMacroDefineImpl();
|
||||
return wmlMacroDefine;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLPreprocIF createWMLPreprocIF()
|
||||
{
|
||||
WMLPreprocIFImpl wmlPreprocIF = new WMLPreprocIFImpl();
|
||||
return wmlPreprocIF;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLTextdomain createWMLTextdomain()
|
||||
{
|
||||
WMLTextdomainImpl wmlTextdomain = new WMLTextdomainImpl();
|
||||
return wmlTextdomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WMLValue createWMLValue()
|
||||
{
|
||||
WMLValueImpl wmlValue = new WMLValueImpl();
|
||||
return wmlValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public MacroTokens createMacroTokens()
|
||||
{
|
||||
MacroTokensImpl macroTokens = new MacroTokensImpl();
|
||||
return macroTokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- 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
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,356 +1,356 @@
|
|||
/**
|
||||
* <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 caseWMLRoot(WMLRoot object)
|
||||
{
|
||||
return createWMLRootAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLTag(WMLTag object)
|
||||
{
|
||||
return createWMLTagAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLKey(WMLKey object)
|
||||
{
|
||||
return createWMLKeyAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLKeyValue(WMLKeyValue object)
|
||||
{
|
||||
return createWMLKeyValueAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLMacroCall(WMLMacroCall object)
|
||||
{
|
||||
return createWMLMacroCallAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLLuaCode(WMLLuaCode object)
|
||||
{
|
||||
return createWMLLuaCodeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLArrayCall(WMLArrayCall object)
|
||||
{
|
||||
return createWMLArrayCallAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLMacroDefine(WMLMacroDefine object)
|
||||
{
|
||||
return createWMLMacroDefineAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLPreprocIF(WMLPreprocIF object)
|
||||
{
|
||||
return createWMLPreprocIFAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLTextdomain(WMLTextdomain object)
|
||||
{
|
||||
return createWMLTextdomainAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLValue(WMLValue object)
|
||||
{
|
||||
return createWMLValueAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseMacroTokens(MacroTokens object)
|
||||
{
|
||||
return createMacroTokensAdapter();
|
||||
}
|
||||
@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.WMLRoot <em>WML 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.WMLRoot
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLRootAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLTag <em>WML 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.WMLTag
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLTagAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLKey <em>WML Key</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.WMLKey
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLKeyAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLKeyValue <em>WML Key Value</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.WMLKeyValue
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLKeyValueAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLMacroCall <em>WML Macro Call</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.WMLMacroCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLMacroCallAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLLuaCode <em>WML Lua Code</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.WMLLuaCode
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLLuaCodeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLArrayCall <em>WML Array Call</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.WMLArrayCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLArrayCallAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLMacroDefine <em>WML Macro Define</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.WMLMacroDefine
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLMacroDefineAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLPreprocIF <em>WML Preproc IF</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.WMLPreprocIF
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLPreprocIFAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLTextdomain <em>WML Textdomain</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.WMLTextdomain
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLTextdomainAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLValue <em>WML Value</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.WMLValue
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLValueAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.MacroTokens <em>Macro Tokens</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.MacroTokens
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMacroTokensAdapter()
|
||||
{
|
||||
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
|
||||
/**
|
||||
* <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 caseWMLRoot(WMLRoot object)
|
||||
{
|
||||
return createWMLRootAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLTag(WMLTag object)
|
||||
{
|
||||
return createWMLTagAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLKey(WMLKey object)
|
||||
{
|
||||
return createWMLKeyAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLKeyValue(WMLKeyValue object)
|
||||
{
|
||||
return createWMLKeyValueAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLMacroCall(WMLMacroCall object)
|
||||
{
|
||||
return createWMLMacroCallAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLLuaCode(WMLLuaCode object)
|
||||
{
|
||||
return createWMLLuaCodeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLArrayCall(WMLArrayCall object)
|
||||
{
|
||||
return createWMLArrayCallAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLMacroDefine(WMLMacroDefine object)
|
||||
{
|
||||
return createWMLMacroDefineAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLPreprocIF(WMLPreprocIF object)
|
||||
{
|
||||
return createWMLPreprocIFAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLTextdomain(WMLTextdomain object)
|
||||
{
|
||||
return createWMLTextdomainAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWMLValue(WMLValue object)
|
||||
{
|
||||
return createWMLValueAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseMacroTokens(MacroTokens object)
|
||||
{
|
||||
return createMacroTokensAdapter();
|
||||
}
|
||||
@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.WMLRoot <em>WML 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.WMLRoot
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLRootAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLTag <em>WML 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.WMLTag
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLTagAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLKey <em>WML Key</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.WMLKey
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLKeyAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLKeyValue <em>WML Key Value</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.WMLKeyValue
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLKeyValueAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLMacroCall <em>WML Macro Call</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.WMLMacroCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLMacroCallAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLLuaCode <em>WML Lua Code</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.WMLLuaCode
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLLuaCodeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLArrayCall <em>WML Array Call</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.WMLArrayCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLArrayCallAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLMacroDefine <em>WML Macro Define</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.WMLMacroDefine
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLMacroDefineAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLPreprocIF <em>WML Preproc IF</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.WMLPreprocIF
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLPreprocIFAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLTextdomain <em>WML Textdomain</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.WMLTextdomain
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLTextdomainAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLValue <em>WML Value</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.WMLValue
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWMLValueAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.MacroTokens <em>Macro Tokens</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.MacroTokens
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMacroTokensAdapter()
|
||||
{
|
||||
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
|
||||
|
|
|
@ -1,399 +1,399 @@
|
|||
/**
|
||||
* <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.WML_ROOT:
|
||||
{
|
||||
WMLRoot wmlRoot = (WMLRoot)theEObject;
|
||||
T result = caseWMLRoot(wmlRoot);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_TAG:
|
||||
{
|
||||
WMLTag wmlTag = (WMLTag)theEObject;
|
||||
T result = caseWMLTag(wmlTag);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_KEY:
|
||||
{
|
||||
WMLKey wmlKey = (WMLKey)theEObject;
|
||||
T result = caseWMLKey(wmlKey);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_KEY_VALUE:
|
||||
{
|
||||
WMLKeyValue wmlKeyValue = (WMLKeyValue)theEObject;
|
||||
T result = caseWMLKeyValue(wmlKeyValue);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_MACRO_CALL:
|
||||
{
|
||||
WMLMacroCall wmlMacroCall = (WMLMacroCall)theEObject;
|
||||
T result = caseWMLMacroCall(wmlMacroCall);
|
||||
if (result == null) result = caseWMLKeyValue(wmlMacroCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_LUA_CODE:
|
||||
{
|
||||
WMLLuaCode wmlLuaCode = (WMLLuaCode)theEObject;
|
||||
T result = caseWMLLuaCode(wmlLuaCode);
|
||||
if (result == null) result = caseWMLKeyValue(wmlLuaCode);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_ARRAY_CALL:
|
||||
{
|
||||
WMLArrayCall wmlArrayCall = (WMLArrayCall)theEObject;
|
||||
T result = caseWMLArrayCall(wmlArrayCall);
|
||||
if (result == null) result = caseWMLKeyValue(wmlArrayCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_MACRO_DEFINE:
|
||||
{
|
||||
WMLMacroDefine wmlMacroDefine = (WMLMacroDefine)theEObject;
|
||||
T result = caseWMLMacroDefine(wmlMacroDefine);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_PREPROC_IF:
|
||||
{
|
||||
WMLPreprocIF wmlPreprocIF = (WMLPreprocIF)theEObject;
|
||||
T result = caseWMLPreprocIF(wmlPreprocIF);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_TEXTDOMAIN:
|
||||
{
|
||||
WMLTextdomain wmlTextdomain = (WMLTextdomain)theEObject;
|
||||
T result = caseWMLTextdomain(wmlTextdomain);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_VALUE:
|
||||
{
|
||||
WMLValue wmlValue = (WMLValue)theEObject;
|
||||
T result = caseWMLValue(wmlValue);
|
||||
if (result == null) result = caseWMLKeyValue(wmlValue);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.MACRO_TOKENS:
|
||||
{
|
||||
MacroTokens macroTokens = (MacroTokens)theEObject;
|
||||
T result = caseMacroTokens(macroTokens);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML 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>WML Root</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLRoot(WMLRoot object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML 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>WML Tag</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLTag(WMLTag object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Key</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>WML Key</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLKey(WMLKey object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Key Value</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>WML Key Value</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLKeyValue(WMLKeyValue object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Macro Call</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>WML Macro Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLMacroCall(WMLMacroCall object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Lua Code</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>WML Lua Code</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLLuaCode(WMLLuaCode object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Array Call</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>WML Array Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLArrayCall(WMLArrayCall object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Macro Define</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>WML Macro Define</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLMacroDefine(WMLMacroDefine object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Preproc IF</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>WML Preproc IF</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLPreprocIF(WMLPreprocIF object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Textdomain</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>WML Textdomain</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLTextdomain(WMLTextdomain object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Value</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>WML Value</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLValue(WMLValue object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Macro Tokens</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 Tokens</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMacroTokens(MacroTokens 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
|
||||
/**
|
||||
* <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.WML_ROOT:
|
||||
{
|
||||
WMLRoot wmlRoot = (WMLRoot)theEObject;
|
||||
T result = caseWMLRoot(wmlRoot);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_TAG:
|
||||
{
|
||||
WMLTag wmlTag = (WMLTag)theEObject;
|
||||
T result = caseWMLTag(wmlTag);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_KEY:
|
||||
{
|
||||
WMLKey wmlKey = (WMLKey)theEObject;
|
||||
T result = caseWMLKey(wmlKey);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_KEY_VALUE:
|
||||
{
|
||||
WMLKeyValue wmlKeyValue = (WMLKeyValue)theEObject;
|
||||
T result = caseWMLKeyValue(wmlKeyValue);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_MACRO_CALL:
|
||||
{
|
||||
WMLMacroCall wmlMacroCall = (WMLMacroCall)theEObject;
|
||||
T result = caseWMLMacroCall(wmlMacroCall);
|
||||
if (result == null) result = caseWMLKeyValue(wmlMacroCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_LUA_CODE:
|
||||
{
|
||||
WMLLuaCode wmlLuaCode = (WMLLuaCode)theEObject;
|
||||
T result = caseWMLLuaCode(wmlLuaCode);
|
||||
if (result == null) result = caseWMLKeyValue(wmlLuaCode);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_ARRAY_CALL:
|
||||
{
|
||||
WMLArrayCall wmlArrayCall = (WMLArrayCall)theEObject;
|
||||
T result = caseWMLArrayCall(wmlArrayCall);
|
||||
if (result == null) result = caseWMLKeyValue(wmlArrayCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_MACRO_DEFINE:
|
||||
{
|
||||
WMLMacroDefine wmlMacroDefine = (WMLMacroDefine)theEObject;
|
||||
T result = caseWMLMacroDefine(wmlMacroDefine);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_PREPROC_IF:
|
||||
{
|
||||
WMLPreprocIF wmlPreprocIF = (WMLPreprocIF)theEObject;
|
||||
T result = caseWMLPreprocIF(wmlPreprocIF);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_TEXTDOMAIN:
|
||||
{
|
||||
WMLTextdomain wmlTextdomain = (WMLTextdomain)theEObject;
|
||||
T result = caseWMLTextdomain(wmlTextdomain);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.WML_VALUE:
|
||||
{
|
||||
WMLValue wmlValue = (WMLValue)theEObject;
|
||||
T result = caseWMLValue(wmlValue);
|
||||
if (result == null) result = caseWMLKeyValue(wmlValue);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case WmlPackage.MACRO_TOKENS:
|
||||
{
|
||||
MacroTokens macroTokens = (MacroTokens)theEObject;
|
||||
T result = caseMacroTokens(macroTokens);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML 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>WML Root</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLRoot(WMLRoot object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML 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>WML Tag</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLTag(WMLTag object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Key</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>WML Key</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLKey(WMLKey object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Key Value</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>WML Key Value</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLKeyValue(WMLKeyValue object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Macro Call</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>WML Macro Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLMacroCall(WMLMacroCall object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Lua Code</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>WML Lua Code</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLLuaCode(WMLLuaCode object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Array Call</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>WML Array Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLArrayCall(WMLArrayCall object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Macro Define</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>WML Macro Define</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLMacroDefine(WMLMacroDefine object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Preproc IF</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>WML Preproc IF</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLPreprocIF(WMLPreprocIF object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Textdomain</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>WML Textdomain</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLTextdomain(WMLTextdomain object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>WML Value</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>WML Value</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWMLValue(WMLValue object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Macro Tokens</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 Tokens</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMacroTokens(MacroTokens 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
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.wesnoth.parser.antlr.internal.InternalWMLLexer;
|
||||
|
||||
public class WMLLexer extends InternalWMLLexer
|
||||
{
|
||||
public WMLLexer()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public WMLLexer(CharStream input)
|
||||
{
|
||||
super(input);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharStream(CharStream arg0)
|
||||
{
|
||||
super.setCharStream(arg0);
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.wesnoth.parser.antlr.internal.InternalWMLLexer;
|
||||
|
||||
public class WMLLexer extends InternalWMLLexer
|
||||
{
|
||||
public WMLLexer()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public WMLLexer(CharStream input)
|
||||
{
|
||||
super(input);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharStream(CharStream arg0)
|
||||
{
|
||||
super.setCharStream(arg0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
public class WMLRuntimeModule extends org.wesnoth.AbstractWMLRuntimeModule {
|
||||
@Override
|
||||
public Class<? extends Lexer> bindLexer()
|
||||
{
|
||||
return WMLLexer.class;
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
public class WMLRuntimeModule extends org.wesnoth.AbstractWMLRuntimeModule {
|
||||
@Override
|
||||
public Class<? extends Lexer> bindLexer()
|
||||
{
|
||||
return WMLLexer.class;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.wesnoth.schema.SchemaParser;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages
|
||||
* without equinox extension registry
|
||||
*/
|
||||
public class WMLStandaloneSetup extends WMLStandaloneSetupGenerated
|
||||
{
|
||||
public static void doSetup() {
|
||||
new WMLStandaloneSetup().createInjectorAndDoEMFRegistration();
|
||||
SchemaParser.getInstance().parseSchema(false);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth;
|
||||
|
||||
import org.wesnoth.schema.SchemaParser;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages
|
||||
* without equinox extension registry
|
||||
*/
|
||||
public class WMLStandaloneSetup extends WMLStandaloneSetupGenerated
|
||||
{
|
||||
public static void doSetup() {
|
||||
new WMLStandaloneSetup().createInjectorAndDoEMFRegistration();
|
||||
SchemaParser.getInstance().parseSchema(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
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
|
||||
{
|
||||
|
||||
public WMLFormatter()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureFormatting(FormattingConfig c)
|
||||
{
|
||||
org.wesnoth.services.WMLGrammarAccess f = (org.wesnoth.services.WMLGrammarAccess) getGrammarAccess();
|
||||
|
||||
// disable autoline-wrap for now
|
||||
c.setAutoLinewrap(500);
|
||||
|
||||
// no space after '[' and '[/'
|
||||
c.setNoSpace().after(f.getWMLTagAccess().getLeftSquareBracketKeyword_0());
|
||||
c.setNoSpace().after(f.getWMLTagAccess().getLeftSquareBracketSolidusKeyword_5());
|
||||
|
||||
// no space before and after ']'
|
||||
c.setNoSpace().around(f.getWMLTagAccess().getRightSquareBracketKeyword_3());
|
||||
c.setNoSpace().around(f.getWMLTagAccess().getRightSquareBracketKeyword_7());
|
||||
|
||||
// no space before and after the '=' in 'key=value'
|
||||
c.setNoSpace().around(f.getWMLKeyAccess().getEqualsSignKeyword_1());
|
||||
|
||||
// one indentation after tag ...
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getTagsAssignment_4_0());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getTextdomainsAssignment_4_4());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getMacroCallsAssignment_4_2());
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getKeysAssignment_4_1());
|
||||
|
||||
// but get back the [/<tagname>]
|
||||
c.setIndentationDecrement().before(f.getWMLTagAccess().getLeftSquareBracketSolidusKeyword_5());
|
||||
|
||||
c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule());
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
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
|
||||
{
|
||||
|
||||
public WMLFormatter()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureFormatting(FormattingConfig c)
|
||||
{
|
||||
org.wesnoth.services.WMLGrammarAccess f = (org.wesnoth.services.WMLGrammarAccess) getGrammarAccess();
|
||||
|
||||
// disable autoline-wrap for now
|
||||
c.setAutoLinewrap(500);
|
||||
|
||||
// no space after '[' and '[/'
|
||||
c.setNoSpace().after(f.getWMLTagAccess().getLeftSquareBracketKeyword_0());
|
||||
c.setNoSpace().after(f.getWMLTagAccess().getLeftSquareBracketSolidusKeyword_5());
|
||||
|
||||
// no space before and after ']'
|
||||
c.setNoSpace().around(f.getWMLTagAccess().getRightSquareBracketKeyword_3());
|
||||
c.setNoSpace().around(f.getWMLTagAccess().getRightSquareBracketKeyword_7());
|
||||
|
||||
// no space before and after the '=' in 'key=value'
|
||||
c.setNoSpace().around(f.getWMLKeyAccess().getEqualsSignKeyword_1());
|
||||
|
||||
// one indentation after tag ...
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getTagsAssignment_4_0());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getTextdomainsAssignment_4_4());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getMacroCallsAssignment_4_2());
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getKeysAssignment_4_1());
|
||||
|
||||
// but get back the [/<tagname>]
|
||||
c.setIndentationDecrement().before(f.getWMLTagAccess().getLeftSquareBracketSolidusKeyword_5());
|
||||
|
||||
c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
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 {
|
||||
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
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 {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,145 +1,145 @@
|
|||
package org.wesnoth.tests;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
|
||||
import org.antlr.runtime.ANTLRStringStream;
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.antlr.runtime.Token;
|
||||
import org.eclipse.xtext.junit.AbstractXtextTests;
|
||||
import org.eclipse.xtext.parser.IParseResult;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
public abstract class WMLTests extends AbstractXtextTests
|
||||
{
|
||||
private Lexer lexer;
|
||||
private ITokenDefProvider tokenDefProvider;
|
||||
private IAntlrParser parser;
|
||||
|
||||
protected Lexer getLexer() {
|
||||
return lexer;
|
||||
}
|
||||
|
||||
protected ITokenDefProvider getTokenDefProvider() {
|
||||
return tokenDefProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IAntlrParser getAntlrParser() {
|
||||
return parser;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
abstract Class getStandaloneSetupClass();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
with(getStandaloneSetupClass());
|
||||
lexer = get(Lexer.class);
|
||||
tokenDefProvider = get(ITokenDefProvider.class);
|
||||
parser = get(IAntlrParser.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the list of tokens created by the lexer from the given input
|
||||
* */
|
||||
protected List<Token> getTokens(String input) {
|
||||
CharStream stream = new ANTLRStringStream(input);
|
||||
getLexer().setCharStream(stream);
|
||||
XtextTokenStream tokenStream = new XtextTokenStream(getLexer(),
|
||||
getTokenDefProvider());
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Token> tokens = tokenStream.getTokens();
|
||||
return tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* return the name of the terminal rule for a given token
|
||||
* */
|
||||
protected String getTokenType(Token token) {
|
||||
return getTokenDefProvider().getTokenDefMap().get(token.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* check whether an input is chopped into a list of expected token types
|
||||
* */
|
||||
protected void checkTokenisation(String input, String... expectedTokenTypes) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
assertEquals(input, expectedTokenTypes.length, tokens.size());
|
||||
for (int i = 0; i < tokens.size(); i++) {
|
||||
Token token = tokens.get(i);
|
||||
assertEquals(input, expectedTokenTypes[i], getTokenType(token));
|
||||
}
|
||||
}
|
||||
|
||||
protected void showTokenisation(String input) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
for (int i = 0; i < tokens.size(); i++) {
|
||||
Token token = tokens.get(i);
|
||||
System.out.println(getTokenType(token));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* check that an input is not tokenised using a particular terminal rule
|
||||
* */
|
||||
protected void failTokenisation(String input, String unExpectedTokenType) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
assertEquals(input, 1, tokens.size());
|
||||
Token token = tokens.get(0);
|
||||
assertNotSame(input, unExpectedTokenType, getTokenType(token));
|
||||
}
|
||||
|
||||
/**
|
||||
* return the parse result for an input given a specific entry rule of the
|
||||
* grammar
|
||||
* */
|
||||
protected IParseResult getParseResult(String input, String entryRule) {
|
||||
return getAntlrParser().parse(entryRule, new StringReader(input));
|
||||
}
|
||||
|
||||
/**
|
||||
* check that the input can be successfully parsed given a specific entry
|
||||
* rule of the grammar
|
||||
* */
|
||||
protected void checkParsing(String input, String entryRule) {
|
||||
IParseResult la = getParseResult(input, entryRule);
|
||||
System.out.println(la.getParseErrors());
|
||||
assertEquals(input, 0, la.getParseErrors().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* check that the input cannot be successfully parsed given a specific entry
|
||||
* rule of the grammar
|
||||
* */
|
||||
protected void failParsing(String input, String entryRule) {
|
||||
IParseResult la = getParseResult(input, entryRule);
|
||||
assertNotSame(input, 0, la.getParseErrors().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* check that input is treated as a keyword by the grammar
|
||||
* */
|
||||
protected void checkKeyword(String input) {
|
||||
// the rule name for a keyword is usually
|
||||
// the keyword enclosed in single quotes
|
||||
String rule = new StringBuilder("'").append(input).append("'") //$NON-NLS-1$ //$NON-NLS-2$
|
||||
.toString();
|
||||
checkTokenisation(input, rule);
|
||||
}
|
||||
|
||||
/**
|
||||
* check that input is not treated as a keyword by the grammar
|
||||
* */
|
||||
protected void failKeyword(String keyword) {
|
||||
List<Token> tokens = getTokens(keyword);
|
||||
assertEquals(keyword, 1, tokens.size());
|
||||
String type = getTokenType(tokens.get(0));
|
||||
assertFalse(keyword, type.charAt(0) == '\'');
|
||||
}
|
||||
}
|
||||
|
||||
package org.wesnoth.tests;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
|
||||
import org.antlr.runtime.ANTLRStringStream;
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.antlr.runtime.Token;
|
||||
import org.eclipse.xtext.junit.AbstractXtextTests;
|
||||
import org.eclipse.xtext.parser.IParseResult;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
public abstract class WMLTests extends AbstractXtextTests
|
||||
{
|
||||
private Lexer lexer;
|
||||
private ITokenDefProvider tokenDefProvider;
|
||||
private IAntlrParser parser;
|
||||
|
||||
protected Lexer getLexer() {
|
||||
return lexer;
|
||||
}
|
||||
|
||||
protected ITokenDefProvider getTokenDefProvider() {
|
||||
return tokenDefProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IAntlrParser getAntlrParser() {
|
||||
return parser;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
abstract Class getStandaloneSetupClass();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
with(getStandaloneSetupClass());
|
||||
lexer = get(Lexer.class);
|
||||
tokenDefProvider = get(ITokenDefProvider.class);
|
||||
parser = get(IAntlrParser.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the list of tokens created by the lexer from the given input
|
||||
* */
|
||||
protected List<Token> getTokens(String input) {
|
||||
CharStream stream = new ANTLRStringStream(input);
|
||||
getLexer().setCharStream(stream);
|
||||
XtextTokenStream tokenStream = new XtextTokenStream(getLexer(),
|
||||
getTokenDefProvider());
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Token> tokens = tokenStream.getTokens();
|
||||
return tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* return the name of the terminal rule for a given token
|
||||
* */
|
||||
protected String getTokenType(Token token) {
|
||||
return getTokenDefProvider().getTokenDefMap().get(token.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* check whether an input is chopped into a list of expected token types
|
||||
* */
|
||||
protected void checkTokenisation(String input, String... expectedTokenTypes) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
assertEquals(input, expectedTokenTypes.length, tokens.size());
|
||||
for (int i = 0; i < tokens.size(); i++) {
|
||||
Token token = tokens.get(i);
|
||||
assertEquals(input, expectedTokenTypes[i], getTokenType(token));
|
||||
}
|
||||
}
|
||||
|
||||
protected void showTokenisation(String input) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
for (int i = 0; i < tokens.size(); i++) {
|
||||
Token token = tokens.get(i);
|
||||
System.out.println(getTokenType(token));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* check that an input is not tokenised using a particular terminal rule
|
||||
* */
|
||||
protected void failTokenisation(String input, String unExpectedTokenType) {
|
||||
List<Token> tokens = getTokens(input);
|
||||
assertEquals(input, 1, tokens.size());
|
||||
Token token = tokens.get(0);
|
||||
assertNotSame(input, unExpectedTokenType, getTokenType(token));
|
||||
}
|
||||
|
||||
/**
|
||||
* return the parse result for an input given a specific entry rule of the
|
||||
* grammar
|
||||
* */
|
||||
protected IParseResult getParseResult(String input, String entryRule) {
|
||||
return getAntlrParser().parse(entryRule, new StringReader(input));
|
||||
}
|
||||
|
||||
/**
|
||||
* check that the input can be successfully parsed given a specific entry
|
||||
* rule of the grammar
|
||||
* */
|
||||
protected void checkParsing(String input, String entryRule) {
|
||||
IParseResult la = getParseResult(input, entryRule);
|
||||
System.out.println(la.getParseErrors());
|
||||
assertEquals(input, 0, la.getParseErrors().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* check that the input cannot be successfully parsed given a specific entry
|
||||
* rule of the grammar
|
||||
* */
|
||||
protected void failParsing(String input, String entryRule) {
|
||||
IParseResult la = getParseResult(input, entryRule);
|
||||
assertNotSame(input, 0, la.getParseErrors().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* check that input is treated as a keyword by the grammar
|
||||
* */
|
||||
protected void checkKeyword(String input) {
|
||||
// the rule name for a keyword is usually
|
||||
// the keyword enclosed in single quotes
|
||||
String rule = new StringBuilder("'").append(input).append("'") //$NON-NLS-1$ //$NON-NLS-2$
|
||||
.toString();
|
||||
checkTokenisation(input, rule);
|
||||
}
|
||||
|
||||
/**
|
||||
* check that input is not treated as a keyword by the grammar
|
||||
* */
|
||||
protected void failKeyword(String keyword) {
|
||||
List<Token> tokens = getTokens(keyword);
|
||||
assertEquals(keyword, 1, tokens.size());
|
||||
String type = getTokenType(tokens.get(0));
|
||||
assertFalse(keyword, type.charAt(0) == '\'');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
package org.wesnoth.tests;
|
||||
|
||||
import org.wesnoth.WMLStandaloneSetup;
|
||||
|
||||
public class WMLTestsImpl extends WMLTests
|
||||
{
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
Class getStandaloneSetupClass() {
|
||||
return WMLStandaloneSetup.class;
|
||||
}
|
||||
|
||||
//for convenience, define constants for the
|
||||
//rule names in your grammar
|
||||
//the names of terminal rules will be capitalised
|
||||
//and "RULE_" will be appended to the front
|
||||
private static final String ID="RULE_ID"; //$NON-NLS-1$
|
||||
private static final String INT="RULE_INT"; //$NON-NLS-1$
|
||||
private static final String WS="RULE_WS"; //$NON-NLS-1$
|
||||
private static final String SL_COMMENT="RULE_SL_COMMENT"; //$NON-NLS-1$
|
||||
|
||||
public void testINT()
|
||||
{
|
||||
checkTokenisation("1", INT); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void testID(){
|
||||
checkTokenisation("a", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc123", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc_123", ID); //$NON-NLS-1$
|
||||
}
|
||||
public void testSLCOMMENT(){
|
||||
checkTokenisation("#comment", SL_COMMENT); //$NON-NLS-1$
|
||||
checkTokenisation("#comment\n", SL_COMMENT); //$NON-NLS-1$
|
||||
checkTokenisation("# comment \t\t comment\r\n", SL_COMMENT); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void testTokenSequences(){
|
||||
showTokenisation("amount=+$random\n"); //$NON-NLS-1$
|
||||
checkParsing("amount=+$random", "WMLKey"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
checkTokenisation("123 abc", ID, WS, ID); //$NON-NLS-1$
|
||||
checkTokenisation("123 \t#comment\n abc", ID, WS, SL_COMMENT,WS,ID); //$NON-NLS-1$
|
||||
//note that no white space is necessary!
|
||||
checkTokenisation("123abc", ID); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
package org.wesnoth.tests;
|
||||
|
||||
import org.wesnoth.WMLStandaloneSetup;
|
||||
|
||||
public class WMLTestsImpl extends WMLTests
|
||||
{
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
Class getStandaloneSetupClass() {
|
||||
return WMLStandaloneSetup.class;
|
||||
}
|
||||
|
||||
//for convenience, define constants for the
|
||||
//rule names in your grammar
|
||||
//the names of terminal rules will be capitalised
|
||||
//and "RULE_" will be appended to the front
|
||||
private static final String ID="RULE_ID"; //$NON-NLS-1$
|
||||
private static final String INT="RULE_INT"; //$NON-NLS-1$
|
||||
private static final String WS="RULE_WS"; //$NON-NLS-1$
|
||||
private static final String SL_COMMENT="RULE_SL_COMMENT"; //$NON-NLS-1$
|
||||
|
||||
public void testINT()
|
||||
{
|
||||
checkTokenisation("1", INT); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void testID(){
|
||||
checkTokenisation("a", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc123", ID); //$NON-NLS-1$
|
||||
checkTokenisation("abc_123", ID); //$NON-NLS-1$
|
||||
}
|
||||
public void testSLCOMMENT(){
|
||||
checkTokenisation("#comment", SL_COMMENT); //$NON-NLS-1$
|
||||
checkTokenisation("#comment\n", SL_COMMENT); //$NON-NLS-1$
|
||||
checkTokenisation("# comment \t\t comment\r\n", SL_COMMENT); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void testTokenSequences(){
|
||||
showTokenisation("amount=+$random\n"); //$NON-NLS-1$
|
||||
checkParsing("amount=+$random", "WMLKey"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
checkTokenisation("123 abc", ID, WS, ID); //$NON-NLS-1$
|
||||
checkTokenisation("123 \t#comment\n abc", ID, WS, SL_COMMENT,WS,ID); //$NON-NLS-1$
|
||||
//note that no white space is necessary!
|
||||
checkTokenisation("123abc", ID); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
|
@ -1,28 +1,28 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.validation;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class Messages extends NLS
|
||||
{
|
||||
private static final String BUNDLE_NAME = "org.wesnoth.validation.messages"; //$NON-NLS-1$
|
||||
public static String WMLJavaValidator_0;
|
||||
public static String WMLJavaValidator_1;
|
||||
public static String WMLJavaValidator_2;
|
||||
static
|
||||
{
|
||||
// initialize resource bundle
|
||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||
}
|
||||
|
||||
private Messages()
|
||||
{
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.validation;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class Messages extends NLS
|
||||
{
|
||||
private static final String BUNDLE_NAME = "org.wesnoth.validation.messages"; //$NON-NLS-1$
|
||||
public static String WMLJavaValidator_0;
|
||||
public static String WMLJavaValidator_1;
|
||||
public static String WMLJavaValidator_2;
|
||||
static
|
||||
{
|
||||
// initialize resource bundle
|
||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||
}
|
||||
|
||||
private Messages()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,100 +1,100 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.validation;
|
||||
|
||||
import org.eclipse.xtext.parsetree.CompositeNode;
|
||||
import org.eclipse.xtext.parsetree.LeafNode;
|
||||
import org.eclipse.xtext.parsetree.NodeUtil;
|
||||
import org.eclipse.xtext.validation.Check;
|
||||
import org.eclipse.xtext.validation.CheckType;
|
||||
import org.wesnoth.schema.SchemaParser;
|
||||
import org.wesnoth.schema.Tag;
|
||||
import org.wesnoth.wml.WMLKey;
|
||||
import org.wesnoth.wml.WMLMacroCall;
|
||||
import org.wesnoth.wml.WMLRoot;
|
||||
import org.wesnoth.wml.WMLTag;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
|
||||
/**
|
||||
* This represents the validator for config files
|
||||
*
|
||||
* http://wiki.eclipse.org/Xtext/Documentation/Xtext_New_and_Noteworthy#Different_validation_hooks
|
||||
* CheckType:
|
||||
* 1. during editing with a delay of 500ms, only FAST is passed
|
||||
* 2. on save NORMAL is passed
|
||||
* 3. an action, which can be optionally generated for you DSL, explicitely evaluates EXPENSIVE constraints
|
||||
*/
|
||||
public class WMLJavaValidator extends AbstractWMLJavaValidator
|
||||
{
|
||||
// @Check(CheckType.FAST)
|
||||
public void checkFastTagName(WMLTag tag)
|
||||
{
|
||||
if (!tag.getName().equals(tag.getEndName()))
|
||||
warning(Messages.WMLJavaValidator_0, WmlPackage.WML_TAG__END_NAME);
|
||||
}
|
||||
|
||||
// @Check(CheckType.NORMAL)
|
||||
public void checkNormalTagName(WMLTag tag)
|
||||
{
|
||||
CompositeNode node = NodeUtil.getNodeAdapter(tag).getParserNode();
|
||||
if (node != null)
|
||||
{
|
||||
LeafNode parentNode = (LeafNode)
|
||||
NodeUtil.findLeafNodeAtOffset(node.getParent(),
|
||||
node.getParent().getOffset() + 2);
|
||||
|
||||
boolean found = false;
|
||||
String searchName = parentNode.getText();
|
||||
if (node.getParent().eContainer() == null) // root node
|
||||
{
|
||||
searchName = "root"; //$NON-NLS-1$
|
||||
}
|
||||
if (SchemaParser.getInstance().getTags().get(searchName) != null)
|
||||
{
|
||||
for(Tag childTag : SchemaParser.getInstance().getTags().get(searchName).
|
||||
getTagChildren())
|
||||
{
|
||||
if (childTag.getName().equals(tag.getName()))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == false)
|
||||
warning(Messages.WMLJavaValidator_1, WmlPackage.WML_TAG__NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Check(CheckType.EXPENSIVE)
|
||||
public void checkExpensiveKeyValue(WMLKey key)
|
||||
{
|
||||
//TODO: add regex checking here
|
||||
System.out.println(Messages.WMLJavaValidator_2);
|
||||
}
|
||||
|
||||
@Check(CheckType.NORMAL)
|
||||
public void checkNormalWMLRootCardinality(WMLRoot root)
|
||||
{
|
||||
//TODO: add check for subtags cardinality
|
||||
}
|
||||
|
||||
@Check(CheckType.NORMAL)
|
||||
public void checkNormalWMLTagCardinality(WMLTag tag)
|
||||
{
|
||||
//TODO: add check for subtags/subkeys cardinality
|
||||
}
|
||||
|
||||
@Check(CheckType.FAST)
|
||||
public void checkNormalWMLMacroExistance(WMLMacroCall call)
|
||||
{
|
||||
//TODO: add check for macro existance - by name
|
||||
}
|
||||
}
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.validation;
|
||||
|
||||
import org.eclipse.xtext.parsetree.CompositeNode;
|
||||
import org.eclipse.xtext.parsetree.LeafNode;
|
||||
import org.eclipse.xtext.parsetree.NodeUtil;
|
||||
import org.eclipse.xtext.validation.Check;
|
||||
import org.eclipse.xtext.validation.CheckType;
|
||||
import org.wesnoth.schema.SchemaParser;
|
||||
import org.wesnoth.schema.Tag;
|
||||
import org.wesnoth.wml.WMLKey;
|
||||
import org.wesnoth.wml.WMLMacroCall;
|
||||
import org.wesnoth.wml.WMLRoot;
|
||||
import org.wesnoth.wml.WMLTag;
|
||||
import org.wesnoth.wml.WmlPackage;
|
||||
|
||||
|
||||
/**
|
||||
* This represents the validator for config files
|
||||
*
|
||||
* http://wiki.eclipse.org/Xtext/Documentation/Xtext_New_and_Noteworthy#Different_validation_hooks
|
||||
* CheckType:
|
||||
* 1. during editing with a delay of 500ms, only FAST is passed
|
||||
* 2. on save NORMAL is passed
|
||||
* 3. an action, which can be optionally generated for you DSL, explicitely evaluates EXPENSIVE constraints
|
||||
*/
|
||||
public class WMLJavaValidator extends AbstractWMLJavaValidator
|
||||
{
|
||||
// @Check(CheckType.FAST)
|
||||
public void checkFastTagName(WMLTag tag)
|
||||
{
|
||||
if (!tag.getName().equals(tag.getEndName()))
|
||||
warning(Messages.WMLJavaValidator_0, WmlPackage.WML_TAG__END_NAME);
|
||||
}
|
||||
|
||||
// @Check(CheckType.NORMAL)
|
||||
public void checkNormalTagName(WMLTag tag)
|
||||
{
|
||||
CompositeNode node = NodeUtil.getNodeAdapter(tag).getParserNode();
|
||||
if (node != null)
|
||||
{
|
||||
LeafNode parentNode = (LeafNode)
|
||||
NodeUtil.findLeafNodeAtOffset(node.getParent(),
|
||||
node.getParent().getOffset() + 2);
|
||||
|
||||
boolean found = false;
|
||||
String searchName = parentNode.getText();
|
||||
if (node.getParent().eContainer() == null) // root node
|
||||
{
|
||||
searchName = "root"; //$NON-NLS-1$
|
||||
}
|
||||
if (SchemaParser.getInstance().getTags().get(searchName) != null)
|
||||
{
|
||||
for(Tag childTag : SchemaParser.getInstance().getTags().get(searchName).
|
||||
getTagChildren())
|
||||
{
|
||||
if (childTag.getName().equals(tag.getName()))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == false)
|
||||
warning(Messages.WMLJavaValidator_1, WmlPackage.WML_TAG__NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Check(CheckType.EXPENSIVE)
|
||||
public void checkExpensiveKeyValue(WMLKey key)
|
||||
{
|
||||
//TODO: add regex checking here
|
||||
System.out.println(Messages.WMLJavaValidator_2);
|
||||
}
|
||||
|
||||
@Check(CheckType.NORMAL)
|
||||
public void checkNormalWMLRootCardinality(WMLRoot root)
|
||||
{
|
||||
//TODO: add check for subtags cardinality
|
||||
}
|
||||
|
||||
@Check(CheckType.NORMAL)
|
||||
public void checkNormalWMLTagCardinality(WMLTag tag)
|
||||
{
|
||||
//TODO: add check for subtags/subkeys cardinality
|
||||
}
|
||||
|
||||
@Check(CheckType.FAST)
|
||||
public void checkNormalWMLMacroExistance(WMLMacroCall call)
|
||||
{
|
||||
//TODO: add check for macro existance - by name
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue