Iniital checkin

This commit is contained in:
Eyck Jentzsch 2017-09-12 12:48:21 +02:00
commit fd1e04fb62
270 changed files with 87560 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
com.minres.rdl.parent/com.minres.rdl/.launch
com.minres.rdl.parent/com.minres.rdl.ui/target
com.minres.rdl.parent/com.minres.rdl.ui.tests/target
com.minres.rdl.parent/com.minres.rdl.tests/target
com.minres.rdl.parent/com.minres.rdl.ide/target
com.minres.rdl.parent/com.minres.rdl/target

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.parent</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1 @@
bin.includes = feature.xml

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature id="com.minres.rdl.feature"
label="RDL Feature "
version="1.0.0.qualifier">
<plugin
id="com.minres.rdl"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.rdl.ide"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.rdl.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@ -0,0 +1,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.feature</artifactId>
<packaging>eclipse-feature</packaging>
<dependencies>
</dependencies>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ide
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.minres.rdl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.rdl.ide.contentassist.antlr.internal,
com.minres.rdl.ide.contentassist.antlr

View File

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View File

@ -0,0 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.ide</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1 @@
com.minres.rdl.ide.RDLIdeSetup

View File

@ -0,0 +1,47 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide;
import com.google.inject.Binder;
import com.google.inject.name.Names;
import com.minres.rdl.ide.contentassist.antlr.RDLParser;
import com.minres.rdl.ide.contentassist.antlr.internal.InternalRDLLexer;
import org.eclipse.xtext.ide.DefaultIdeModule;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
/**
* Manual modifications go to {@link RDLIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractRDLIdeModule extends DefaultIdeModule {
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalRDLLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return RDLParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
return FQNPrefixMatcher.class;
}
}

View File

@ -0,0 +1,34 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide.contentassist.antlr;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;
public class PartialRDLContentAssistParser extends RDLParser implements IPartialEditingContentAssistParser {
private AbstractRule rule;
@Override
public void initializeFor(AbstractRule rule) {
this.rule = rule;
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
if (rule == null || rule.eIsProxy())
return Collections.emptyList();
String methodName = "entryRule" + rule.getName();
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
dispatcher.invoke();
return parser.getFollowElements();
}
}

View File

@ -0,0 +1,219 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide.contentassist.antlr;
import com.google.inject.Inject;
import com.minres.rdl.ide.contentassist.antlr.internal.InternalRDLParser;
import com.minres.rdl.services.RDLGrammarAccess;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
public class RDLParser extends AbstractContentAssistParser {
@Inject
private RDLGrammarAccess grammarAccess;
private Map<AbstractElement, String> nameMappings;
@Override
protected InternalRDLParser createParser() {
InternalRDLParser result = new InternalRDLParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
@Override
protected String getRuleName(AbstractElement element) {
if (nameMappings == null) {
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getRootAccess().getAlternatives(), "rule__Root__Alternatives");
put(grammarAccess.getPropertyDefinitionAccess().getAlternatives_3(), "rule__PropertyDefinition__Alternatives_3");
put(grammarAccess.getPropertyDefinitionAccess().getAlternatives_3_0_4(), "rule__PropertyDefinition__Alternatives_3_0_4");
put(grammarAccess.getPropertyDefinitionAccess().getAlternatives_3_1_1(), "rule__PropertyDefinition__Alternatives_3_1_1");
put(grammarAccess.getPropertyDefinitionAccess().getAlternatives_3_2_1(), "rule__PropertyDefinition__Alternatives_3_2_1");
put(grammarAccess.getPropertyDefaultAccess().getAlternatives_2(), "rule__PropertyDefault__Alternatives_2");
put(grammarAccess.getComponentDefinitionAccess().getAlternatives_3(), "rule__ComponentDefinition__Alternatives_3");
put(grammarAccess.getRangeAccess().getAlternatives_1(), "rule__Range__Alternatives_1");
put(grammarAccess.getPropertyAssignmentAccess().getAlternatives(), "rule__PropertyAssignment__Alternatives");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getAlternatives(), "rule__ExplicitPropertyAssignment__Alternatives");
put(grammarAccess.getPostPropertyAssignmentAccess().getAlternatives_0(), "rule__PostPropertyAssignment__Alternatives_0");
put(grammarAccess.getPostPropertyAssignmentAccess().getAlternatives_0_0_2(), "rule__PostPropertyAssignment__Alternatives_0_0_2");
put(grammarAccess.getInstancePropertyRefAccess().getAlternatives_1_1(), "rule__InstancePropertyRef__Alternatives_1_1");
put(grammarAccess.getEntityAccess().getAlternatives(), "rule__Entity__Alternatives");
put(grammarAccess.getPropertyAssignmentRhsAccess().getAlternatives(), "rule__PropertyAssignmentRhs__Alternatives");
put(grammarAccess.getConcatElemAccess().getAlternatives(), "rule__ConcatElem__Alternatives");
put(grammarAccess.getPropertyRvalueConstantAccess().getAlternatives(), "rule__PropertyRvalueConstant__Alternatives");
put(grammarAccess.getEnumPropertyAccess().getAlternatives_0(), "rule__EnumProperty__Alternatives_0");
put(grammarAccess.getPropertyTypeNameAccess().getAlternatives(), "rule__PropertyTypeName__Alternatives");
put(grammarAccess.getPropertyComponentAccess().getAlternatives(), "rule__PropertyComponent__Alternatives");
put(grammarAccess.getComponentDefinitionTypeAccess().getAlternatives(), "rule__ComponentDefinitionType__Alternatives");
put(grammarAccess.getPropertyEnumAccess().getAlternatives(), "rule__PropertyEnum__Alternatives");
put(grammarAccess.getPropertyAccess().getAlternatives(), "rule__Property__Alternatives");
put(grammarAccess.getRValueConstantAccess().getAlternatives(), "rule__RValueConstant__Alternatives");
put(grammarAccess.getPropertyModifierAccess().getAlternatives(), "rule__PropertyModifier__Alternatives");
put(grammarAccess.getIncludeAccess().getGroup(), "rule__Include__Group__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup(), "rule__PropertyDefinition__Group__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_0(), "rule__PropertyDefinition__Group_3_0__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_0_4_0(), "rule__PropertyDefinition__Group_3_0_4_0__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_0_4_1(), "rule__PropertyDefinition__Group_3_0_4_1__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_1(), "rule__PropertyDefinition__Group_3_1__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_1_1_0(), "rule__PropertyDefinition__Group_3_1_1_0__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_1_1_1(), "rule__PropertyDefinition__Group_3_1_1_1__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_2(), "rule__PropertyDefinition__Group_3_2__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_2_1_0(), "rule__PropertyDefinition__Group_3_2_1_0__0");
put(grammarAccess.getPropertyDefinitionAccess().getGroup_3_2_1_1(), "rule__PropertyDefinition__Group_3_2_1_1__0");
put(grammarAccess.getPropertyDefaultAccess().getGroup(), "rule__PropertyDefault__Group__0");
put(grammarAccess.getPropertyUsageAccess().getGroup(), "rule__PropertyUsage__Group__0");
put(grammarAccess.getPropertyUsageAccess().getGroup_3(), "rule__PropertyUsage__Group_3__0");
put(grammarAccess.getComponentDefinitionAccess().getGroup(), "rule__ComponentDefinition__Group__0");
put(grammarAccess.getNamedInstantiationAccess().getGroup(), "rule__NamedInstantiation__Group__0");
put(grammarAccess.getNamedInstantiationAccess().getGroup_2(), "rule__NamedInstantiation__Group_2__0");
put(grammarAccess.getNamedInstantiationAccess().getGroup_5(), "rule__NamedInstantiation__Group_5__0");
put(grammarAccess.getImmediateInstantiationAccess().getGroup(), "rule__ImmediateInstantiation__Group__0");
put(grammarAccess.getImmediateInstantiationAccess().getGroup_2(), "rule__ImmediateInstantiation__Group_2__0");
put(grammarAccess.getComponentInstanceAccess().getGroup(), "rule__ComponentInstance__Group__0");
put(grammarAccess.getComponentInstanceAccess().getGroup_2(), "rule__ComponentInstance__Group_2__0");
put(grammarAccess.getComponentInstanceAccess().getGroup_3(), "rule__ComponentInstance__Group_3__0");
put(grammarAccess.getComponentInstanceAccess().getGroup_4(), "rule__ComponentInstance__Group_4__0");
put(grammarAccess.getComponentInstanceAccess().getGroup_5(), "rule__ComponentInstance__Group_5__0");
put(grammarAccess.getRangeAccess().getGroup(), "rule__Range__Group__0");
put(grammarAccess.getRangeAccess().getGroup_1_0(), "rule__Range__Group_1_0__0");
put(grammarAccess.getDefaultProperyAssignmentAccess().getGroup(), "rule__DefaultProperyAssignment__Group__0");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getGroup_0(), "rule__ExplicitPropertyAssignment__Group_0__0");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getGroup_1(), "rule__ExplicitPropertyAssignment__Group_1__0");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getGroup_1_1(), "rule__ExplicitPropertyAssignment__Group_1_1__0");
put(grammarAccess.getPostPropertyAssignmentAccess().getGroup(), "rule__PostPropertyAssignment__Group__0");
put(grammarAccess.getPostPropertyAssignmentAccess().getGroup_0_0(), "rule__PostPropertyAssignment__Group_0_0__0");
put(grammarAccess.getPostPropertyAssignmentAccess().getGroup_1(), "rule__PostPropertyAssignment__Group_1__0");
put(grammarAccess.getInstancePropertyRefAccess().getGroup(), "rule__InstancePropertyRef__Group__0");
put(grammarAccess.getInstancePropertyRefAccess().getGroup_1(), "rule__InstancePropertyRef__Group_1__0");
put(grammarAccess.getInstanceRefAccess().getGroup(), "rule__InstanceRef__Group__0");
put(grammarAccess.getInstanceRefAccess().getGroup_1(), "rule__InstanceRef__Group_1__0");
put(grammarAccess.getHierInstanceRefAccess().getGroup(), "rule__HierInstanceRef__Group__0");
put(grammarAccess.getHierInstanceRefAccess().getGroup_1(), "rule__HierInstanceRef__Group_1__0");
put(grammarAccess.getPropertyAssignmentRhsAccess().getGroup_2(), "rule__PropertyAssignmentRhs__Group_2__0");
put(grammarAccess.getConcatAccess().getGroup(), "rule__Concat__Group__0");
put(grammarAccess.getConcatAccess().getGroup_2(), "rule__Concat__Group_2__0");
put(grammarAccess.getEnumDefinitionAccess().getGroup(), "rule__EnumDefinition__Group__0");
put(grammarAccess.getEnumBodyAccess().getGroup(), "rule__EnumBody__Group__0");
put(grammarAccess.getEnumEntryAccess().getGroup(), "rule__EnumEntry__Group__0");
put(grammarAccess.getEnumEntryAccess().getGroup_3(), "rule__EnumEntry__Group_3__0");
put(grammarAccess.getEnumPropertyAccess().getGroup(), "rule__EnumProperty__Group__0");
put(grammarAccess.getEnumPropertyAccess().getGroup_0_0(), "rule__EnumProperty__Group_0_0__0");
put(grammarAccess.getEnumPropertyAccess().getGroup_0_1(), "rule__EnumProperty__Group_0_1__0");
put(grammarAccess.getRootAccess().getIncludesAssignment_0(), "rule__Root__IncludesAssignment_0");
put(grammarAccess.getRootAccess().getComponentDefinitionsAssignment_1(), "rule__Root__ComponentDefinitionsAssignment_1");
put(grammarAccess.getRootAccess().getEnumDefinitionsAssignment_2(), "rule__Root__EnumDefinitionsAssignment_2");
put(grammarAccess.getRootAccess().getNamedInstantiationsAssignment_3(), "rule__Root__NamedInstantiationsAssignment_3");
put(grammarAccess.getRootAccess().getPropertyAssignmentsAssignment_4(), "rule__Root__PropertyAssignmentsAssignment_4");
put(grammarAccess.getRootAccess().getPropertyDefinitionsAssignment_5(), "rule__Root__PropertyDefinitionsAssignment_5");
put(grammarAccess.getIncludeAccess().getImportURIAssignment_1(), "rule__Include__ImportURIAssignment_1");
put(grammarAccess.getPropertyDefinitionAccess().getNameAssignment_1(), "rule__PropertyDefinition__NameAssignment_1");
put(grammarAccess.getPropertyDefinitionAccess().getTypeAssignment_3_0_2(), "rule__PropertyDefinition__TypeAssignment_3_0_2");
put(grammarAccess.getPropertyDefinitionAccess().getUsageAssignment_3_0_4_0_0(), "rule__PropertyDefinition__UsageAssignment_3_0_4_0_0");
put(grammarAccess.getPropertyDefinitionAccess().getDefaultAssignment_3_0_4_0_1(), "rule__PropertyDefinition__DefaultAssignment_3_0_4_0_1");
put(grammarAccess.getPropertyDefinitionAccess().getDefaultAssignment_3_0_4_1_0(), "rule__PropertyDefinition__DefaultAssignment_3_0_4_1_0");
put(grammarAccess.getPropertyDefinitionAccess().getUsageAssignment_3_0_4_1_1(), "rule__PropertyDefinition__UsageAssignment_3_0_4_1_1");
put(grammarAccess.getPropertyDefinitionAccess().getUsageAssignment_3_1_0(), "rule__PropertyDefinition__UsageAssignment_3_1_0");
put(grammarAccess.getPropertyDefinitionAccess().getTypeAssignment_3_1_1_0_2(), "rule__PropertyDefinition__TypeAssignment_3_1_1_0_2");
put(grammarAccess.getPropertyDefinitionAccess().getDefaultAssignment_3_1_1_0_4(), "rule__PropertyDefinition__DefaultAssignment_3_1_1_0_4");
put(grammarAccess.getPropertyDefinitionAccess().getDefaultAssignment_3_1_1_1_0(), "rule__PropertyDefinition__DefaultAssignment_3_1_1_1_0");
put(grammarAccess.getPropertyDefinitionAccess().getTypeAssignment_3_1_1_1_3(), "rule__PropertyDefinition__TypeAssignment_3_1_1_1_3");
put(grammarAccess.getPropertyDefinitionAccess().getDefaultAssignment_3_2_0(), "rule__PropertyDefinition__DefaultAssignment_3_2_0");
put(grammarAccess.getPropertyDefinitionAccess().getTypeAssignment_3_2_1_0_2(), "rule__PropertyDefinition__TypeAssignment_3_2_1_0_2");
put(grammarAccess.getPropertyDefinitionAccess().getUsageAssignment_3_2_1_0_4(), "rule__PropertyDefinition__UsageAssignment_3_2_1_0_4");
put(grammarAccess.getPropertyDefinitionAccess().getUsageAssignment_3_2_1_1_0(), "rule__PropertyDefinition__UsageAssignment_3_2_1_1_0");
put(grammarAccess.getPropertyDefinitionAccess().getTypeAssignment_3_2_1_1_3(), "rule__PropertyDefinition__TypeAssignment_3_2_1_1_3");
put(grammarAccess.getPropertyDefaultAccess().getStringAssignment_2_0(), "rule__PropertyDefault__StringAssignment_2_0");
put(grammarAccess.getPropertyDefaultAccess().getValueAssignment_2_1(), "rule__PropertyDefault__ValueAssignment_2_1");
put(grammarAccess.getPropertyDefaultAccess().getStringAssignment_2_2(), "rule__PropertyDefault__StringAssignment_2_2");
put(grammarAccess.getPropertyDefaultAccess().getStringAssignment_2_3(), "rule__PropertyDefault__StringAssignment_2_3");
put(grammarAccess.getPropertyUsageAccess().getComponentsAssignment_2(), "rule__PropertyUsage__ComponentsAssignment_2");
put(grammarAccess.getPropertyUsageAccess().getComponentsAssignment_3_1(), "rule__PropertyUsage__ComponentsAssignment_3_1");
put(grammarAccess.getComponentDefinitionAccess().getTypeAssignment_0(), "rule__ComponentDefinition__TypeAssignment_0");
put(grammarAccess.getComponentDefinitionAccess().getNameAssignment_1(), "rule__ComponentDefinition__NameAssignment_1");
put(grammarAccess.getComponentDefinitionAccess().getComponentDefinitionsAssignment_3_0(), "rule__ComponentDefinition__ComponentDefinitionsAssignment_3_0");
put(grammarAccess.getComponentDefinitionAccess().getNamedInstantiationsAssignment_3_1(), "rule__ComponentDefinition__NamedInstantiationsAssignment_3_1");
put(grammarAccess.getComponentDefinitionAccess().getPropertyAssignmentsAssignment_3_2(), "rule__ComponentDefinition__PropertyAssignmentsAssignment_3_2");
put(grammarAccess.getComponentDefinitionAccess().getEnumDefinitionsAssignment_3_3(), "rule__ComponentDefinition__EnumDefinitionsAssignment_3_3");
put(grammarAccess.getComponentDefinitionAccess().getImmediateInstantiationAssignment_5(), "rule__ComponentDefinition__ImmediateInstantiationAssignment_5");
put(grammarAccess.getNamedInstantiationAccess().getExternalAssignment_0(), "rule__NamedInstantiation__ExternalAssignment_0");
put(grammarAccess.getNamedInstantiationAccess().getInternalAssignment_1(), "rule__NamedInstantiation__InternalAssignment_1");
put(grammarAccess.getNamedInstantiationAccess().getAliasAssignment_2_1(), "rule__NamedInstantiation__AliasAssignment_2_1");
put(grammarAccess.getNamedInstantiationAccess().getComponentAssignment_3(), "rule__NamedInstantiation__ComponentAssignment_3");
put(grammarAccess.getNamedInstantiationAccess().getComponentInstancesAssignment_4(), "rule__NamedInstantiation__ComponentInstancesAssignment_4");
put(grammarAccess.getNamedInstantiationAccess().getComponentInstancesAssignment_5_1(), "rule__NamedInstantiation__ComponentInstancesAssignment_5_1");
put(grammarAccess.getImmediateInstantiationAccess().getExternalAssignment_0(), "rule__ImmediateInstantiation__ExternalAssignment_0");
put(grammarAccess.getImmediateInstantiationAccess().getComponentInstancesAssignment_1(), "rule__ImmediateInstantiation__ComponentInstancesAssignment_1");
put(grammarAccess.getImmediateInstantiationAccess().getComponentInstancesAssignment_2_1(), "rule__ImmediateInstantiation__ComponentInstancesAssignment_2_1");
put(grammarAccess.getComponentInstanceAccess().getNameAssignment_0(), "rule__ComponentInstance__NameAssignment_0");
put(grammarAccess.getComponentInstanceAccess().getRangeAssignment_1(), "rule__ComponentInstance__RangeAssignment_1");
put(grammarAccess.getComponentInstanceAccess().getResetAssignment_2_1(), "rule__ComponentInstance__ResetAssignment_2_1");
put(grammarAccess.getComponentInstanceAccess().getAddressAssignment_3_1(), "rule__ComponentInstance__AddressAssignment_3_1");
put(grammarAccess.getComponentInstanceAccess().getAddrIncAssignment_4_1(), "rule__ComponentInstance__AddrIncAssignment_4_1");
put(grammarAccess.getComponentInstanceAccess().getAddrModAssignment_5_1(), "rule__ComponentInstance__AddrModAssignment_5_1");
put(grammarAccess.getRangeAccess().getStartAssignment_1_0_0(), "rule__Range__StartAssignment_1_0_0");
put(grammarAccess.getRangeAccess().getEndAssignment_1_0_2(), "rule__Range__EndAssignment_1_0_2");
put(grammarAccess.getRangeAccess().getSizeAssignment_1_1(), "rule__Range__SizeAssignment_1_1");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getModifierAssignment_0_0(), "rule__ExplicitPropertyAssignment__ModifierAssignment_0_0");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getNameAssignment_0_1(), "rule__ExplicitPropertyAssignment__NameAssignment_0_1");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getNameAssignment_1_0(), "rule__ExplicitPropertyAssignment__NameAssignment_1_0");
put(grammarAccess.getExplicitPropertyAssignmentAccess().getRhsAssignment_1_1_1(), "rule__ExplicitPropertyAssignment__RhsAssignment_1_1_1");
put(grammarAccess.getPostPropertyAssignmentAccess().getInstanceAssignment_0_0_0(), "rule__PostPropertyAssignment__InstanceAssignment_0_0_0");
put(grammarAccess.getPostPropertyAssignmentAccess().getPropertyEnumAssignment_0_0_2_0(), "rule__PostPropertyAssignment__PropertyEnumAssignment_0_0_2_0");
put(grammarAccess.getPostPropertyAssignmentAccess().getPropertyAssignment_0_0_2_1(), "rule__PostPropertyAssignment__PropertyAssignment_0_0_2_1");
put(grammarAccess.getPostPropertyAssignmentAccess().getPropertyAssignment_0_1(), "rule__PostPropertyAssignment__PropertyAssignment_0_1");
put(grammarAccess.getPostPropertyAssignmentAccess().getRhsAssignment_1_1(), "rule__PostPropertyAssignment__RhsAssignment_1_1");
put(grammarAccess.getInstancePropertyRefAccess().getInstanceAssignment_0(), "rule__InstancePropertyRef__InstanceAssignment_0");
put(grammarAccess.getInstancePropertyRefAccess().getPropertyEnumAssignment_1_1_0(), "rule__InstancePropertyRef__PropertyEnumAssignment_1_1_0");
put(grammarAccess.getInstancePropertyRefAccess().getPropertyAssignment_1_1_1(), "rule__InstancePropertyRef__PropertyAssignment_1_1_1");
put(grammarAccess.getInstanceRefAccess().getInstanceAssignment_0(), "rule__InstanceRef__InstanceAssignment_0");
put(grammarAccess.getInstanceRefAccess().getTailAssignment_1_1(), "rule__InstanceRef__TailAssignment_1_1");
put(grammarAccess.getHierInstanceRefAccess().getInstanceAssignment_0(), "rule__HierInstanceRef__InstanceAssignment_0");
put(grammarAccess.getHierInstanceRefAccess().getTailAssignment_1_1(), "rule__HierInstanceRef__TailAssignment_1_1");
put(grammarAccess.getPropertyAssignmentRhsAccess().getValueAssignment_0(), "rule__PropertyAssignmentRhs__ValueAssignment_0");
put(grammarAccess.getPropertyAssignmentRhsAccess().getInstPropRefAssignment_1(), "rule__PropertyAssignmentRhs__InstPropRefAssignment_1");
put(grammarAccess.getPropertyAssignmentRhsAccess().getEnumRefAssignment_2_0(), "rule__PropertyAssignmentRhs__EnumRefAssignment_2_0");
put(grammarAccess.getPropertyAssignmentRhsAccess().getEnumsAssignment_2_2(), "rule__PropertyAssignmentRhs__EnumsAssignment_2_2");
put(grammarAccess.getPropertyAssignmentRhsAccess().getElementsAssignment_3(), "rule__PropertyAssignmentRhs__ElementsAssignment_3");
put(grammarAccess.getConcatAccess().getElementsAssignment_1(), "rule__Concat__ElementsAssignment_1");
put(grammarAccess.getConcatAccess().getElementsAssignment_2_1(), "rule__Concat__ElementsAssignment_2_1");
put(grammarAccess.getConcatElemAccess().getInstPropRefAssignment_0(), "rule__ConcatElem__InstPropRefAssignment_0");
put(grammarAccess.getConcatElemAccess().getValueAssignment_1(), "rule__ConcatElem__ValueAssignment_1");
put(grammarAccess.getPropertyRvalueConstantAccess().getValAssignment_0(), "rule__PropertyRvalueConstant__ValAssignment_0");
put(grammarAccess.getPropertyRvalueConstantAccess().getNumAssignment_1(), "rule__PropertyRvalueConstant__NumAssignment_1");
put(grammarAccess.getPropertyRvalueConstantAccess().getStrAssignment_2(), "rule__PropertyRvalueConstant__StrAssignment_2");
put(grammarAccess.getEnumDefinitionAccess().getNameAssignment_1(), "rule__EnumDefinition__NameAssignment_1");
put(grammarAccess.getEnumDefinitionAccess().getBodyAssignment_2(), "rule__EnumDefinition__BodyAssignment_2");
put(grammarAccess.getEnumBodyAccess().getEntriesAssignment_2(), "rule__EnumBody__EntriesAssignment_2");
put(grammarAccess.getEnumEntryAccess().getNameAssignment_0(), "rule__EnumEntry__NameAssignment_0");
put(grammarAccess.getEnumEntryAccess().getIndexAssignment_2(), "rule__EnumEntry__IndexAssignment_2");
put(grammarAccess.getEnumEntryAccess().getPropertiesAssignment_3_1(), "rule__EnumEntry__PropertiesAssignment_3_1");
put(grammarAccess.getEnumPropertyAccess().getNameAssignment_0_0_0(), "rule__EnumProperty__NameAssignment_0_0_0");
put(grammarAccess.getEnumPropertyAccess().getValueAssignment_0_0_2(), "rule__EnumProperty__ValueAssignment_0_0_2");
put(grammarAccess.getEnumPropertyAccess().getNameAssignment_0_1_0(), "rule__EnumProperty__NameAssignment_0_1_0");
put(grammarAccess.getEnumPropertyAccess().getValueAssignment_0_1_2(), "rule__EnumProperty__ValueAssignment_0_1_2");
}
};
}
return nameMappings.get(element);
}
@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
}
public RDLGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(RDLGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}

View File

@ -0,0 +1,252 @@
'%='=125
'+='=124
','=122
'->'=129
'.'=130
':'=128
';'=115
'='=117
'@'=123
'UNDEFINED'=95
'['=126
']'=127
'`include'=111
'accesswidth'=79
'activehigh'=58
'activelow'=59
'addressing'=82
'addrmap'=13
'alias'=121
'alignment'=75
'all'=19
'anded'=38
'arbiter'=22
'async'=55
'bigendian'=47
'boolean'=12
'bothedge'=108
'bridge'=50
'clock'=86
'compact'=103
'component'=119
'counter'=41
'cpuif_reset'=56
'decr'=63
'decrsaturate'=69
'decrthreshold'=71
'decrvalue'=67
'decrwidth'=65
'default'=118
'desc'=21
'dontcompare'=72
'donttest'=73
'enable'=88
'encode'=84
'enum'=131
'errextbus'=44
'external'=132
'false'=97
'field'=16
'field_reset'=57
'fieldwidth'=77
'fullalign'=105
'halt'=93
'haltenable'=92
'haltmask'=91
'hw'=81
'hwclr'=32
'hwenable'=89
'hwmask'=90
'hwset'=31
'incr'=62
'incrvalue'=66
'incrwidth'=64
'internal'=74
'intr'=37
'level'=109
'littleendian'=46
'lsb0'=53
'mask'=87
'msb0'=52
'na'=102
'name'=20
'negedge'=107
'next'=94
'nonsticky'=110
'number'=11
'ored'=39
'overflow'=42
'posedge'=106
'precedence'=83
'property'=112
'r'=100
'rclr'=24
'ref'=17
'reg'=14
'regalign'=104
'regfile'=15
'regwidth'=76
'reset'=45
'resetsignal'=85
'rset'=23
'rsvdset'=48
'rsvdsetX'=49
'rw'=98
'saturate'=68
'shared'=51
'sharedextbus'=43
'signal'=18
'signalwidth'=78
'singlepulse'=60
'sticky'=35
'stickybit'=36
'string'=10
'sw'=80
'swacc'=34
'swmod'=33
'swwe'=29
'swwel'=30
'sync'=54
'threshold'=70
'true'=96
'type'=116
'underflow'=61
'w'=101
'we'=27
'wel'=28
'woclr'=25
'woset'=26
'wr'=99
'xored'=40
'{'=113
'|'=120
'}'=114
RULE_ID=5
RULE_ML_COMMENT=8
RULE_NUM=6
RULE_SL_COMMENT=9
RULE_STR=4
RULE_WS=7
T__100=100
T__101=101
T__102=102
T__103=103
T__104=104
T__105=105
T__106=106
T__107=107
T__108=108
T__109=109
T__10=10
T__110=110
T__111=111
T__112=112
T__113=113
T__114=114
T__115=115
T__116=116
T__117=117
T__118=118
T__119=119
T__11=11
T__120=120
T__121=121
T__122=122
T__123=123
T__124=124
T__125=125
T__126=126
T__127=127
T__128=128
T__129=129
T__12=12
T__130=130
T__131=131
T__132=132
T__13=13
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21
T__22=22
T__23=23
T__24=24
T__25=25
T__26=26
T__27=27
T__28=28
T__29=29
T__30=30
T__31=31
T__32=32
T__33=33
T__34=34
T__35=35
T__36=36
T__37=37
T__38=38
T__39=39
T__40=40
T__41=41
T__42=42
T__43=43
T__44=44
T__45=45
T__46=46
T__47=47
T__48=48
T__49=49
T__50=50
T__51=51
T__52=52
T__53=53
T__54=54
T__55=55
T__56=56
T__57=57
T__58=58
T__59=59
T__60=60
T__61=61
T__62=62
T__63=63
T__64=64
T__65=65
T__66=66
T__67=67
T__68=68
T__69=69
T__70=70
T__71=71
T__72=72
T__73=73
T__74=74
T__75=75
T__76=76
T__77=77
T__78=78
T__79=79
T__80=80
T__81=81
T__82=82
T__83=83
T__84=84
T__85=85
T__86=86
T__87=87
T__88=88
T__89=89
T__90=90
T__91=91
T__92=92
T__93=93
T__94=94
T__95=95
T__96=96
T__97=97
T__98=98
T__99=99

View File

@ -0,0 +1,11 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide
/**
* Use this class to register ide components.
*/
class RDLIdeModule extends AbstractRDLIdeModule {
}

View File

@ -0,0 +1,20 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide
import com.google.inject.Guice
import com.minres.rdl.RDLRuntimeModule
import com.minres.rdl.RDLStandaloneSetup
import org.eclipse.xtext.util.Modules2
/**
* Initialization support for running Xtext languages as language servers.
*/
class RDLIdeSetup extends RDLStandaloneSetup {
override createInjector() {
Guice.createInjector(Modules2.mixin(new RDLRuntimeModule, new RDLIdeModule))
}
}

View File

@ -0,0 +1,13 @@
/**
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide;
import com.minres.rdl.ide.AbstractRDLIdeModule;
/**
* Use this class to register ide components.
*/
@SuppressWarnings("all")
public class RDLIdeModule extends AbstractRDLIdeModule {
}

View File

@ -0,0 +1,24 @@
/**
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ide;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.RDLStandaloneSetup;
import com.minres.rdl.ide.RDLIdeModule;
import org.eclipse.xtext.util.Modules2;
/**
* Initialization support for running Xtext languages as language servers.
*/
@SuppressWarnings("all")
public class RDLIdeSetup extends RDLStandaloneSetup {
@Override
public Injector createInjector() {
RDLRuntimeModule _rDLRuntimeModule = new RDLRuntimeModule();
RDLIdeModule _rDLIdeModule = new RDLIdeModule();
return Guice.createInjector(Modules2.mixin(_rDLRuntimeModule, _rDLIdeModule));
}
}

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.repository</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="com.minres.rdl.feature" version="0.0.0">
<category name="main"/>
</feature>
<feature id="com.minres.rdl.feature.source" version="0.0.0">
<category name="main.source"/>
</feature>
<category-def name="main" label="RDL"/>
<category-def name="main.source" label="RDL (Sources)"/>
</site>

View File

@ -0,0 +1,51 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.repository</artifactId>
<packaging>eclipse-repository</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-clean-plugin
</artifactId>
<versionRange>
[2.5,)
</versionRange>
<goals>
<goal>clean</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
</dependencies>
</project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.target</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="com.minres.rdl.target" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xpand" version="0.0.0"/>
<unit id="org.eclipse.xtend" version="0.0.0"/>
<unit id="org.eclipse.xtend.typesystem.emf" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/neon/201606221000/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.0/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.12.0/"/>
</location>
</locations>
</target>

View File

@ -0,0 +1,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.target</artifactId>
<packaging>eclipse-target-definition</packaging>
<dependencies>
</dependencies>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,21 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.minres.rdl.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
org.junit;bundle-version="4.12.0",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.rdl.tests;x-internal=true
Import-Package: org.hamcrest.core,
org.junit;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0"

View File

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View File

@ -0,0 +1,29 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,66 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.tests;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.RDLStandaloneSetup;
import org.eclipse.xtext.testing.GlobalRegistries;
import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.testing.IInjectorProvider;
import org.eclipse.xtext.testing.IRegistryConfigurator;
public class RDLInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
protected GlobalStateMemento stateBeforeInjectorCreation;
protected GlobalStateMemento stateAfterInjectorCreation;
protected Injector injector;
static {
GlobalRegistries.initializeDefaults();
}
@Override
public Injector getInjector() {
if (injector == null) {
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
this.injector = internalCreateInjector();
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
}
return injector;
}
protected Injector internalCreateInjector() {
return new RDLStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(createRuntimeModule());
}
}.createInjectorAndDoEMFRegistration();
}
protected RDLRuntimeModule createRuntimeModule() {
// make it work also with Maven/Tycho and OSGI
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672
return new RDLRuntimeModule() {
@Override
public ClassLoader bindClassLoaderToInstance() {
return RDLInjectorProvider.class
.getClassLoader();
}
};
}
@Override
public void restoreRegistry() {
stateBeforeInjectorCreation.restoreGlobalState();
}
@Override
public void setupRegistry() {
getInjector();
stateAfterInjectorCreation.restoreGlobalState();
}
}

View File

@ -0,0 +1,29 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.tests
import com.google.inject.Inject
import com.minres.rdl.rdl.Root
import org.eclipse.xtext.testing.InjectWith
import org.eclipse.xtext.testing.XtextRunner
import org.eclipse.xtext.testing.util.ParseHelper
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(XtextRunner)
@InjectWith(RDLInjectorProvider)
class RDLParsingTest {
@Inject
ParseHelper<Root> parseHelper
@Test
def void loadModel() {
val result = parseHelper.parse('''
Hello Xtext!
''')
Assert.assertNotNull(result)
Assert.assertTrue(result.eResource.errors.isEmpty)
}
}

View File

@ -0,0 +1,38 @@
/**
* generated by Xtext 2.12.0
*/
package com.minres.rdl.tests;
import com.google.inject.Inject;
import com.minres.rdl.rdl.Root;
import com.minres.rdl.tests.RDLInjectorProvider;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.XtextRunner;
import org.eclipse.xtext.testing.util.ParseHelper;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(XtextRunner.class)
@InjectWith(RDLInjectorProvider.class)
@SuppressWarnings("all")
public class RDLParsingTest {
@Inject
private ParseHelper<Root> parseHelper;
@Test
public void loadModel() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("Hello Xtext!");
_builder.newLine();
final Root result = this.parseHelper.parse(_builder);
Assert.assertNotNull(result);
Assert.assertTrue(result.eResource().getErrors().isEmpty());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.ui.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,24 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ui.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.minres.rdl.ui.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl.ui,
org.junit;bundle-version="4.12.0",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.junit4,
org.eclipse.xtext.xbase.junit,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.rdl.ui.tests;x-internal=true
Import-Package: org.hamcrest.core,
org.junit;version="4.5.0",
org.junit.runners.model;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0"

View File

@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend

View File

@ -0,0 +1,62 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.ui.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
<useUIHarness>true</useUIHarness>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- to get the org.eclipse.osgi.compatibility.state plugin
if the target platform is Luna or later.
(backward compatible with kepler and previous versions)
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=492149 -->
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>testing-on-mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<tycho.testArgLine>-XstartOnFirstThread</tycho.testArgLine>
</properties>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,17 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui.tests;
import com.google.inject.Injector;
import com.minres.rdl.ui.internal.RdlActivator;
import org.eclipse.xtext.testing.IInjectorProvider;
public class RDLUiInjectorProvider implements IInjectorProvider {
@Override
public Injector getInjector() {
return RdlActivator.getInstance().getInjector("com.minres.rdl.RDL");
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.rdl.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,25 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ui
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.minres.rdl.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
com.minres.rdl.ide,
org.eclipse.xtext.ui,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.ui,
org.eclipse.compare,
org.eclipse.xtext.builder,
org.eclipse.xtend.lib;resolution:=optional,
org.eclipse.xtext.xbase.lib
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.rdl.ui.internal,
com.minres.rdl.ui.quickfix,
com.minres.rdl.ui.contentassist
Bundle-Activator: com.minres.rdl.ui.internal.RdlActivator

View File

@ -0,0 +1,7 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/,\
plugin.xml
bin.excludes = **/*.xtend

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,410 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="rdl"
id="com.minres.rdl.RDL"
name="RDL Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="com.minres.rdl.RDL.validate">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<!-- copy qualified name -->
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
<activeWhen>
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.minres.rdl.RDL.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
<definition id="com.minres.rdl.RDL.XtextEditor.opened">
<and>
<reference definitionId="isXtextEditorActive"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="com.minres.rdl.RDL.coloring"
name="Syntax Coloring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="com.minres.rdl.RDL.templates"
name="Templates">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="com.minres.rdl.ui.keyword_RDL"
label="RDL"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="com.minres.rdl.RDL.validate"
name="Validate">
</command>
<!-- copy qualified name -->
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="com.minres.rdl.RDL.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
<!-- copy qualified name -->
<menuContribution locationURI="popup:#TextEditorContext?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="menu:edit?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="rdl">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="rdl">
</resourceServiceProvider>
</extension>
<!-- marker definitions for com.minres.rdl.RDL -->
<extension
id="rdl.check.fast"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.fast"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.normal"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.normal"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.expensive"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.expensive"/>
<persistent value="true"/>
</extension>
<extension point="org.eclipse.xtext.builder.participant">
<participant
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="rdl"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.preferencePage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.propertyPage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
<command
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
id="com.minres.rdl.RDL.OpenGeneratedCode"
style="push">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator for com.minres.rdl.RDL -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
</extension>
<!-- Rename Refactoring -->
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
id="com.minres.rdl.RDL.refactoring"
name="Refactoring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.compare.contentViewers">
<viewer id="com.minres.rdl.RDL.compare.contentViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl">
</viewer>
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="com.minres.rdl.RDL.compare.contentMergeViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl" label="RDL Compare">
</viewer>
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="com.minres.rdl.RDL.editors.documentProviders"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="rdl">
</provider>
</extension>
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="rdl"
type="text">
</fileTypes>
</extension>
</plugin>

View File

@ -0,0 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.minres.rdl.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,286 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui;
import com.google.inject.Binder;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import com.minres.rdl.ide.contentassist.antlr.PartialRDLContentAssistParser;
import com.minres.rdl.ide.contentassist.antlr.RDLParser;
import com.minres.rdl.ide.contentassist.antlr.internal.InternalRDLLexer;
import com.minres.rdl.ui.contentassist.RDLProposalProvider;
import com.minres.rdl.ui.labeling.RDLDescriptionLabelProvider;
import com.minres.rdl.ui.labeling.RDLLabelProvider;
import com.minres.rdl.ui.outline.RDLOutlineTreeProvider;
import com.minres.rdl.ui.quickfix.RDLQuickfixProvider;
import org.eclipse.compare.IViewerCreator;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.builder.BuilderParticipant;
import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider;
import org.eclipse.xtext.builder.IXtextBuilderParticipant;
import org.eclipse.xtext.builder.builderState.IBuilderState;
import org.eclipse.xtext.builder.clustering.CurrentDescriptions;
import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource;
import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback;
import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess;
import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.LexerProvider;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
import org.eclipse.xtext.service.SingletonBinding;
import org.eclipse.xtext.ui.DefaultUiModule;
import org.eclipse.xtext.ui.UIBindings;
import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry;
import org.eclipse.xtext.ui.compare.DefaultViewerCreator;
import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource;
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider;
import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage;
import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.IReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.IRenameStrategy;
import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy;
import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences;
import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
/**
* Manual modifications go to {@link RDLUiModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractRDLUiModule extends DefaultUiModule {
public AbstractRDLUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Provider<? extends IAllContainersState> provideIAllContainersState() {
return Access.getJavaProjectsState();
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalRDLLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingLexer(Binder binder) {
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(com.minres.rdl.parser.antlr.internal.InternalRDLLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingTokenDefProvider(Binder binder) {
binder.bind(ITokenDefProvider.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(AntlrTokenDefProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends ContentAssistContext.Factory> bindContentAssistContext$Factory() {
return DelegatingContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return RDLParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexerProvider(Binder binder) {
binder.bind(InternalRDLLexer.class).toProvider(LexerProvider.create(InternalRDLLexer.class));
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
return FQNPrefixMatcher.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() {
return NatureAddingEditorCallback.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
return EclipseOutputConfigurationProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class<? extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
return PersistentDataAwareDirtyResource.class;
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public Class<? extends IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
return BuilderParticipant.class;
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public IWorkspaceRoot bindIWorkspaceRootToInstance() {
return ResourcesPlugin.getWorkspace().getRoot();
}
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
public void configureBuilderPreferenceStoreInitializer(Binder binder) {
binder.bind(IPreferenceStoreInitializer.class)
.annotatedWith(Names.named("builderPreferenceInitializer"))
.to(BuilderPreferenceAccess.Initializer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public Class<? extends ILabelProvider> bindILabelProvider() {
return RDLLabelProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public void configureResourceUIServiceLabelProvider(Binder binder) {
binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(RDLDescriptionLabelProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() {
return RDLOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
return RDLOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2
public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() {
return RDLQuickfixProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
return RDLProposalProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameStrategy> bindIRenameStrategy() {
return DefaultRenameStrategy.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IReferenceUpdater> bindIReferenceUpdater() {
return DefaultReferenceUpdater.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public void configureIPreferenceStoreInitializer(Binder binder) {
binder.bind(IPreferenceStoreInitializer.class)
.annotatedWith(Names.named("RefactoringPreferences"))
.to(RefactoringPreferences.Initializer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameRefactoringProvider> bindIRenameRefactoringProvider() {
return DefaultRenameRefactoringProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameSupport.Factory> bindIRenameSupport$Factory() {
return DefaultRenameSupport.Factory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Provider<? extends LanguageRegistry> provideLanguageRegistry() {
return AccessibleCodetemplatesActivator.getLanguageRegistry();
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
@SingletonBinding(eager=true)
public Class<? extends LanguageRegistrar> bindLanguageRegistrar() {
return LanguageRegistrar.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() {
return AdvancedTemplatesPreferencePage.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends IPartialEditingContentAssistParser> bindIPartialEditingContentAssistParser() {
return PartialRDLContentAssistParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
public Class<? extends IPartialEditingContentAssistContextFactory> bindIPartialEditingContentAssistContextFactory() {
return PartialEditingContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
public Class<? extends IViewerCreator> bindIViewerCreator() {
return DefaultViewerCreator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
public void configureCompareViewerTitle(Binder binder) {
binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("RDL Compare");
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.SimpleNamesFragment2
public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
return DefaultDependentElementsCalculator.class;
}
}

View File

@ -0,0 +1,27 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui;
import com.google.inject.Injector;
import com.minres.rdl.ui.internal.RdlActivator;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class RDLExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
@Override
protected Bundle getBundle() {
return RdlActivator.getInstance().getBundle();
}
@Override
protected Injector getInjector() {
return RdlActivator.getInstance().getInjector(RdlActivator.COM_MINRES_RDL_RDL);
}
}

View File

@ -0,0 +1,355 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui.contentassist;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
/**
* Represents a generated, default implementation of superclass {@link AbstractJavaBasedContentProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
public abstract class AbstractRDLProposalProvider extends AbstractJavaBasedContentProposalProvider {
public void completeRoot_Includes(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRoot_ComponentDefinitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRoot_EnumDefinitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRoot_NamedInstantiations(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRoot_PropertyAssignments(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRoot_PropertyDefinitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeInclude_ImportURI(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyDefinition_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyDefinition_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyDefinition_Usage(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyDefinition_Default(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyDefault_String(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
if (assignment.getTerminal() instanceof RuleCall) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
if (assignment.getTerminal() instanceof Keyword) {
// subclasses may override
}
}
public void completePropertyDefault_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyUsage_Components(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_ComponentDefinitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_NamedInstantiations(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_PropertyAssignments(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_EnumDefinitions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentDefinition_ImmediateInstantiation(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeNamedInstantiation_External(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeNamedInstantiation_Internal(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeNamedInstantiation_Alias(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeNamedInstantiation_Component(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeNamedInstantiation_ComponentInstances(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeImmediateInstantiation_External(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeImmediateInstantiation_ComponentInstances(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_Range(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_Reset(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_Address(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_AddrInc(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeComponentInstance_AddrMod(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRange_Start(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRange_End(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeRange_Size(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeExplicitPropertyAssignment_Modifier(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeExplicitPropertyAssignment_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeExplicitPropertyAssignment_Rhs(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePostPropertyAssignment_Instance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePostPropertyAssignment_PropertyEnum(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePostPropertyAssignment_Property(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completePostPropertyAssignment_Rhs(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeInstancePropertyRef_Instance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeInstancePropertyRef_PropertyEnum(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeInstancePropertyRef_Property(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeInstanceRef_Instance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeInstanceRef_Tail(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeHierInstanceRef_Instance(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completeHierInstanceRef_Tail(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyAssignmentRhs_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyAssignmentRhs_InstPropRef(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyAssignmentRhs_EnumRef(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
public void completePropertyAssignmentRhs_Enums(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyAssignmentRhs_Elements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeConcat_Elements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeConcatElem_InstPropRef(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeConcatElem_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyRvalueConstant_Val(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyRvalueConstant_Num(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePropertyRvalueConstant_Str(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumDefinition_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumDefinition_Body(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumBody_Entries(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumEntry_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumEntry_Index(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumEntry_Properties(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeEnumProperty_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeEnumProperty_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void complete_Root(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Include(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyTypeName(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyDefault(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyUsage(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyComponent(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ComponentDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ComponentDefinitionType(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_NamedInstantiation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ImmediateInstantiation(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ComponentInstance(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Range(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyAssignment(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_DefaultProperyAssignment(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ExplicitPropertyAssignment(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PostPropertyAssignment(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_InstancePropertyRef(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Entity(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_InstanceRef(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_HierInstanceRef(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyAssignmentRhs(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Concat(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ConcatElem(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyEnum(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_Property(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyRvalueConstant(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_RValueConstant(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_PropertyModifier(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EnumDefinition(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EnumBody(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EnumEntry(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EnumProperty(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WS(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ML_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_SL_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_NUM(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_STR(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
}

View File

@ -0,0 +1,93 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui.internal;
import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.ui.RDLUiModule;
import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.shared.SharedStateModule;
import org.eclipse.xtext.util.Modules2;
import org.osgi.framework.BundleContext;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class RdlActivator extends AbstractUIPlugin {
public static final String COM_MINRES_RDL_RDL = "com.minres.rdl.RDL";
private static final Logger logger = Logger.getLogger(RdlActivator.class);
private static RdlActivator INSTANCE;
private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
INSTANCE = this;
}
@Override
public void stop(BundleContext context) throws Exception {
injectors.clear();
INSTANCE = null;
super.stop(context);
}
public static RdlActivator getInstance() {
return INSTANCE;
}
public Injector getInjector(String language) {
synchronized (injectors) {
Injector injector = injectors.get(language);
if (injector == null) {
injectors.put(language, injector = createInjector(language));
}
return injector;
}
}
protected Injector createInjector(String language) {
try {
Module runtimeModule = getRuntimeModule(language);
Module sharedStateModule = getSharedStateModule();
Module uiModule = getUiModule(language);
Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
return Guice.createInjector(mergedModule);
} catch (Exception e) {
logger.error("Failed to create injector for " + language);
logger.error(e.getMessage(), e);
throw new RuntimeException("Failed to create injector for " + language, e);
}
}
protected Module getRuntimeModule(String grammar) {
if (COM_MINRES_RDL_RDL.equals(grammar)) {
return new RDLRuntimeModule();
}
throw new IllegalArgumentException(grammar);
}
protected Module getUiModule(String grammar) {
if (COM_MINRES_RDL_RDL.equals(grammar)) {
return new RDLUiModule(this);
}
throw new IllegalArgumentException(grammar);
}
protected Module getSharedStateModule() {
return new SharedStateModule();
}
}

View File

@ -0,0 +1,13 @@
package com.minres.rdl.ui
import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider
class RDLEObjectDocumentationProvider implements IEObjectDocumentationProvider {
override String getDocumentation(EObject o) {
// if (o instanceof Greeting) {
// return "This is a nice Greeting with nice <b>markup</b> in the <i>documentation</i>";
// }
return null
}
}

View File

@ -0,0 +1,26 @@
package com.minres.rdl.ui
import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider
import com.minres.rdl.rdl.ComponentDefinition
import com.minres.rdl.rdl.ComponentInstance
import com.minres.rdl.rdl.ImmediateInstantiation
import com.minres.rdl.rdl.NamedInstantiation
class RDLEObjectHoverProvider extends DefaultEObjectHoverProvider {
override protected String getFirstLine(EObject o) {
switch(o){
ComponentDefinition: return 'Component '+o.name+' of type '+o.type.literal
ComponentInstance: {
val parent = o.eContainer
if (parent instanceof ImmediateInstantiation) {
val compDef = parent.eContainer as ComponentDefinition
return compDef.type.literal+' '+o.name
} else if (parent instanceof NamedInstantiation) {
return parent.component.type.literal+' '+o.name
}
}
}
return super.getFirstLine(o)
}
}

View File

@ -0,0 +1,24 @@
/*
* generated by Xtext 2.12.0
*/
package com.minres.rdl.ui
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider
/**
* Use this class to register components to be used within the Eclipse IDE.
*/
@FinalFieldsConstructor
class RDLUiModule extends AbstractRDLUiModule {
def Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
typeof(RDLEObjectHoverProvider);
}
def Class<? extends IEObjectDocumentationProvider> bindIEObjectDocumentationProviderr() {
typeof(RDLEObjectDocumentationProvider);
}
}

Some files were not shown because too many files have changed in this diff Show More