Bug 565978 - Get ready for Java 11
Renamed o.e.handly.examples.basic.foo.Module to Unit to avoid conflicts
with java.lang.Module.
diff --git a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/FooParser.java b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/FooParser.java
index 6e41379..58158f0 100644
--- a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/FooParser.java
+++ b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/FooParser.java
@@ -31,12 +31,12 @@
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
- put(grammarAccess.getModuleAccess().getGroup(), "rule__Module__Group__0");
+ put(grammarAccess.getUnitAccess().getGroup(), "rule__Unit__Group__0");
put(grammarAccess.getVarAccess().getGroup(), "rule__Var__Group__0");
put(grammarAccess.getDefAccess().getGroup(), "rule__Def__Group__0");
put(grammarAccess.getDefAccess().getGroup_4(), "rule__Def__Group_4__0");
- put(grammarAccess.getModuleAccess().getVarsAssignment_0(), "rule__Module__VarsAssignment_0");
- put(grammarAccess.getModuleAccess().getDefsAssignment_1(), "rule__Module__DefsAssignment_1");
+ put(grammarAccess.getUnitAccess().getVarsAssignment_0(), "rule__Unit__VarsAssignment_0");
+ put(grammarAccess.getUnitAccess().getDefsAssignment_1(), "rule__Unit__DefsAssignment_1");
put(grammarAccess.getVarAccess().getNameAssignment_1(), "rule__Var__NameAssignment_1");
put(grammarAccess.getDefAccess().getNameAssignment_1(), "rule__Def__NameAssignment_1");
put(grammarAccess.getDefAccess().getParamsAssignment_3(), "rule__Def__ParamsAssignment_3");
diff --git a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFoo.g b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFoo.g
index 54c3ef2..93f7caa 100644
--- a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFoo.g
+++ b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFoo.g
@@ -49,25 +49,25 @@
}
}
-// Entry rule entryRuleModule
-entryRuleModule
+// Entry rule entryRuleUnit
+entryRuleUnit
:
-{ before(grammarAccess.getModuleRule()); }
- ruleModule
-{ after(grammarAccess.getModuleRule()); }
+{ before(grammarAccess.getUnitRule()); }
+ ruleUnit
+{ after(grammarAccess.getUnitRule()); }
EOF
;
-// Rule Module
-ruleModule
+// Rule Unit
+ruleUnit
@init {
int stackSize = keepStackSize();
}
:
(
- { before(grammarAccess.getModuleAccess().getGroup()); }
- (rule__Module__Group__0)
- { after(grammarAccess.getModuleAccess().getGroup()); }
+ { before(grammarAccess.getUnitAccess().getGroup()); }
+ (rule__Unit__Group__0)
+ { after(grammarAccess.getUnitAccess().getGroup()); }
)
;
finally {
@@ -124,53 +124,53 @@
restoreStackSize(stackSize);
}
-rule__Module__Group__0
+rule__Unit__Group__0
@init {
int stackSize = keepStackSize();
}
:
- rule__Module__Group__0__Impl
- rule__Module__Group__1
+ rule__Unit__Group__0__Impl
+ rule__Unit__Group__1
;
finally {
restoreStackSize(stackSize);
}
-rule__Module__Group__0__Impl
+rule__Unit__Group__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
- { before(grammarAccess.getModuleAccess().getVarsAssignment_0()); }
- (rule__Module__VarsAssignment_0)*
- { after(grammarAccess.getModuleAccess().getVarsAssignment_0()); }
+ { before(grammarAccess.getUnitAccess().getVarsAssignment_0()); }
+ (rule__Unit__VarsAssignment_0)*
+ { after(grammarAccess.getUnitAccess().getVarsAssignment_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
-rule__Module__Group__1
+rule__Unit__Group__1
@init {
int stackSize = keepStackSize();
}
:
- rule__Module__Group__1__Impl
+ rule__Unit__Group__1__Impl
;
finally {
restoreStackSize(stackSize);
}
-rule__Module__Group__1__Impl
+rule__Unit__Group__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
- { before(grammarAccess.getModuleAccess().getDefsAssignment_1()); }
- (rule__Module__DefsAssignment_1)*
- { after(grammarAccess.getModuleAccess().getDefsAssignment_1()); }
+ { before(grammarAccess.getUnitAccess().getDefsAssignment_1()); }
+ (rule__Unit__DefsAssignment_1)*
+ { after(grammarAccess.getUnitAccess().getDefsAssignment_1()); }
)
;
finally {
@@ -529,30 +529,30 @@
}
-rule__Module__VarsAssignment_0
+rule__Unit__VarsAssignment_0
@init {
int stackSize = keepStackSize();
}
:
(
- { before(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0()); }
+ { before(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0()); }
ruleVar
- { after(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0()); }
+ { after(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
-rule__Module__DefsAssignment_1
+rule__Unit__DefsAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
- { before(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0()); }
+ { before(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0()); }
ruleDef
- { after(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0()); }
+ { after(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0()); }
)
;
finally {
diff --git a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFooParser.java b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFooParser.java
index 3959528..a12b124 100644
--- a/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFooParser.java
+++ b/org.eclipse.handly.examples.basic.ide/src-gen/org/eclipse/handly/examples/basic/ide/contentassist/antlr/internal/InternalFooParser.java
@@ -76,20 +76,20 @@
- // $ANTLR start "entryRuleModule"
- // InternalFoo.g:53:1: entryRuleModule : ruleModule EOF ;
- public final void entryRuleModule() throws RecognitionException {
+ // $ANTLR start "entryRuleUnit"
+ // InternalFoo.g:53:1: entryRuleUnit : ruleUnit EOF ;
+ public final void entryRuleUnit() throws RecognitionException {
try {
- // InternalFoo.g:54:1: ( ruleModule EOF )
- // InternalFoo.g:55:1: ruleModule EOF
+ // InternalFoo.g:54:1: ( ruleUnit EOF )
+ // InternalFoo.g:55:1: ruleUnit EOF
{
- before(grammarAccess.getModuleRule());
+ before(grammarAccess.getUnitRule());
pushFollow(FOLLOW_1);
- ruleModule();
+ ruleUnit();
state._fsp--;
- after(grammarAccess.getModuleRule());
+ after(grammarAccess.getUnitRule());
match(input,EOF,FOLLOW_2);
}
@@ -103,35 +103,35 @@
}
return ;
}
- // $ANTLR end "entryRuleModule"
+ // $ANTLR end "entryRuleUnit"
- // $ANTLR start "ruleModule"
- // InternalFoo.g:62:1: ruleModule : ( ( rule__Module__Group__0 ) ) ;
- public final void ruleModule() throws RecognitionException {
+ // $ANTLR start "ruleUnit"
+ // InternalFoo.g:62:1: ruleUnit : ( ( rule__Unit__Group__0 ) ) ;
+ public final void ruleUnit() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalFoo.g:66:2: ( ( ( rule__Module__Group__0 ) ) )
- // InternalFoo.g:67:2: ( ( rule__Module__Group__0 ) )
+ // InternalFoo.g:66:2: ( ( ( rule__Unit__Group__0 ) ) )
+ // InternalFoo.g:67:2: ( ( rule__Unit__Group__0 ) )
{
- // InternalFoo.g:67:2: ( ( rule__Module__Group__0 ) )
- // InternalFoo.g:68:3: ( rule__Module__Group__0 )
+ // InternalFoo.g:67:2: ( ( rule__Unit__Group__0 ) )
+ // InternalFoo.g:68:3: ( rule__Unit__Group__0 )
{
- before(grammarAccess.getModuleAccess().getGroup());
- // InternalFoo.g:69:3: ( rule__Module__Group__0 )
- // InternalFoo.g:69:4: rule__Module__Group__0
+ before(grammarAccess.getUnitAccess().getGroup());
+ // InternalFoo.g:69:3: ( rule__Unit__Group__0 )
+ // InternalFoo.g:69:4: rule__Unit__Group__0
{
pushFollow(FOLLOW_2);
- rule__Module__Group__0();
+ rule__Unit__Group__0();
state._fsp--;
}
- after(grammarAccess.getModuleAccess().getGroup());
+ after(grammarAccess.getUnitAccess().getGroup());
}
@@ -150,7 +150,7 @@
}
return ;
}
- // $ANTLR end "ruleModule"
+ // $ANTLR end "ruleUnit"
// $ANTLR start "entryRuleVar"
@@ -307,23 +307,23 @@
// $ANTLR end "ruleDef"
- // $ANTLR start "rule__Module__Group__0"
- // InternalFoo.g:127:1: rule__Module__Group__0 : rule__Module__Group__0__Impl rule__Module__Group__1 ;
- public final void rule__Module__Group__0() throws RecognitionException {
+ // $ANTLR start "rule__Unit__Group__0"
+ // InternalFoo.g:127:1: rule__Unit__Group__0 : rule__Unit__Group__0__Impl rule__Unit__Group__1 ;
+ public final void rule__Unit__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalFoo.g:131:1: ( rule__Module__Group__0__Impl rule__Module__Group__1 )
- // InternalFoo.g:132:2: rule__Module__Group__0__Impl rule__Module__Group__1
+ // InternalFoo.g:131:1: ( rule__Unit__Group__0__Impl rule__Unit__Group__1 )
+ // InternalFoo.g:132:2: rule__Unit__Group__0__Impl rule__Unit__Group__1
{
pushFollow(FOLLOW_3);
- rule__Module__Group__0__Impl();
+ rule__Unit__Group__0__Impl();
state._fsp--;
pushFollow(FOLLOW_2);
- rule__Module__Group__1();
+ rule__Unit__Group__1();
state._fsp--;
@@ -342,24 +342,24 @@
}
return ;
}
- // $ANTLR end "rule__Module__Group__0"
+ // $ANTLR end "rule__Unit__Group__0"
- // $ANTLR start "rule__Module__Group__0__Impl"
- // InternalFoo.g:139:1: rule__Module__Group__0__Impl : ( ( rule__Module__VarsAssignment_0 )* ) ;
- public final void rule__Module__Group__0__Impl() throws RecognitionException {
+ // $ANTLR start "rule__Unit__Group__0__Impl"
+ // InternalFoo.g:139:1: rule__Unit__Group__0__Impl : ( ( rule__Unit__VarsAssignment_0 )* ) ;
+ public final void rule__Unit__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalFoo.g:143:1: ( ( ( rule__Module__VarsAssignment_0 )* ) )
- // InternalFoo.g:144:1: ( ( rule__Module__VarsAssignment_0 )* )
+ // InternalFoo.g:143:1: ( ( ( rule__Unit__VarsAssignment_0 )* ) )
+ // InternalFoo.g:144:1: ( ( rule__Unit__VarsAssignment_0 )* )
{
- // InternalFoo.g:144:1: ( ( rule__Module__VarsAssignment_0 )* )
- // InternalFoo.g:145:2: ( rule__Module__VarsAssignment_0 )*
+ // InternalFoo.g:144:1: ( ( rule__Unit__VarsAssignment_0 )* )
+ // InternalFoo.g:145:2: ( rule__Unit__VarsAssignment_0 )*
{
- before(grammarAccess.getModuleAccess().getVarsAssignment_0());
- // InternalFoo.g:146:2: ( rule__Module__VarsAssignment_0 )*
+ before(grammarAccess.getUnitAccess().getVarsAssignment_0());
+ // InternalFoo.g:146:2: ( rule__Unit__VarsAssignment_0 )*
loop1:
do {
int alt1=2;
@@ -372,10 +372,10 @@
switch (alt1) {
case 1 :
- // InternalFoo.g:146:3: rule__Module__VarsAssignment_0
+ // InternalFoo.g:146:3: rule__Unit__VarsAssignment_0
{
pushFollow(FOLLOW_4);
- rule__Module__VarsAssignment_0();
+ rule__Unit__VarsAssignment_0();
state._fsp--;
@@ -388,7 +388,7 @@
}
} while (true);
- after(grammarAccess.getModuleAccess().getVarsAssignment_0());
+ after(grammarAccess.getUnitAccess().getVarsAssignment_0());
}
@@ -407,21 +407,21 @@
}
return ;
}
- // $ANTLR end "rule__Module__Group__0__Impl"
+ // $ANTLR end "rule__Unit__Group__0__Impl"
- // $ANTLR start "rule__Module__Group__1"
- // InternalFoo.g:154:1: rule__Module__Group__1 : rule__Module__Group__1__Impl ;
- public final void rule__Module__Group__1() throws RecognitionException {
+ // $ANTLR start "rule__Unit__Group__1"
+ // InternalFoo.g:154:1: rule__Unit__Group__1 : rule__Unit__Group__1__Impl ;
+ public final void rule__Unit__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalFoo.g:158:1: ( rule__Module__Group__1__Impl )
- // InternalFoo.g:159:2: rule__Module__Group__1__Impl
+ // InternalFoo.g:158:1: ( rule__Unit__Group__1__Impl )
+ // InternalFoo.g:159:2: rule__Unit__Group__1__Impl
{
pushFollow(FOLLOW_2);
- rule__Module__Group__1__Impl();
+ rule__Unit__Group__1__Impl();
state._fsp--;
@@ -440,24 +440,24 @@
}
return ;
}
- // $ANTLR end "rule__Module__Group__1"
+ // $ANTLR end "rule__Unit__Group__1"
- // $ANTLR start "rule__Module__Group__1__Impl"
- // InternalFoo.g:165:1: rule__Module__Group__1__Impl : ( ( rule__Module__DefsAssignment_1 )* ) ;
- public final void rule__Module__Group__1__Impl() throws RecognitionException {
+ // $ANTLR start "rule__Unit__Group__1__Impl"
+ // InternalFoo.g:165:1: rule__Unit__Group__1__Impl : ( ( rule__Unit__DefsAssignment_1 )* ) ;
+ public final void rule__Unit__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalFoo.g:169:1: ( ( ( rule__Module__DefsAssignment_1 )* ) )
- // InternalFoo.g:170:1: ( ( rule__Module__DefsAssignment_1 )* )
+ // InternalFoo.g:169:1: ( ( ( rule__Unit__DefsAssignment_1 )* ) )
+ // InternalFoo.g:170:1: ( ( rule__Unit__DefsAssignment_1 )* )
{
- // InternalFoo.g:170:1: ( ( rule__Module__DefsAssignment_1 )* )
- // InternalFoo.g:171:2: ( rule__Module__DefsAssignment_1 )*
+ // InternalFoo.g:170:1: ( ( rule__Unit__DefsAssignment_1 )* )
+ // InternalFoo.g:171:2: ( rule__Unit__DefsAssignment_1 )*
{
- before(grammarAccess.getModuleAccess().getDefsAssignment_1());
- // InternalFoo.g:172:2: ( rule__Module__DefsAssignment_1 )*
+ before(grammarAccess.getUnitAccess().getDefsAssignment_1());
+ // InternalFoo.g:172:2: ( rule__Unit__DefsAssignment_1 )*
loop2:
do {
int alt2=2;
@@ -470,10 +470,10 @@
switch (alt2) {
case 1 :
- // InternalFoo.g:172:3: rule__Module__DefsAssignment_1
+ // InternalFoo.g:172:3: rule__Unit__DefsAssignment_1
{
pushFollow(FOLLOW_5);
- rule__Module__DefsAssignment_1();
+ rule__Unit__DefsAssignment_1();
state._fsp--;
@@ -486,7 +486,7 @@
}
} while (true);
- after(grammarAccess.getModuleAccess().getDefsAssignment_1());
+ after(grammarAccess.getUnitAccess().getDefsAssignment_1());
}
@@ -505,7 +505,7 @@
}
return ;
}
- // $ANTLR end "rule__Module__Group__1__Impl"
+ // $ANTLR end "rule__Unit__Group__1__Impl"
// $ANTLR start "rule__Var__Group__0"
@@ -1547,9 +1547,9 @@
// $ANTLR end "rule__Def__Group_4__1__Impl"
- // $ANTLR start "rule__Module__VarsAssignment_0"
- // InternalFoo.g:532:1: rule__Module__VarsAssignment_0 : ( ruleVar ) ;
- public final void rule__Module__VarsAssignment_0() throws RecognitionException {
+ // $ANTLR start "rule__Unit__VarsAssignment_0"
+ // InternalFoo.g:532:1: rule__Unit__VarsAssignment_0 : ( ruleVar ) ;
+ public final void rule__Unit__VarsAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
@@ -1560,13 +1560,13 @@
// InternalFoo.g:537:2: ( ruleVar )
// InternalFoo.g:538:3: ruleVar
{
- before(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0());
+ before(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0());
pushFollow(FOLLOW_2);
ruleVar();
state._fsp--;
- after(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0());
+ after(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0());
}
@@ -1585,12 +1585,12 @@
}
return ;
}
- // $ANTLR end "rule__Module__VarsAssignment_0"
+ // $ANTLR end "rule__Unit__VarsAssignment_0"
- // $ANTLR start "rule__Module__DefsAssignment_1"
- // InternalFoo.g:547:1: rule__Module__DefsAssignment_1 : ( ruleDef ) ;
- public final void rule__Module__DefsAssignment_1() throws RecognitionException {
+ // $ANTLR start "rule__Unit__DefsAssignment_1"
+ // InternalFoo.g:547:1: rule__Unit__DefsAssignment_1 : ( ruleDef ) ;
+ public final void rule__Unit__DefsAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
@@ -1601,13 +1601,13 @@
// InternalFoo.g:552:2: ( ruleDef )
// InternalFoo.g:553:3: ruleDef
{
- before(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0());
+ before(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0());
pushFollow(FOLLOW_2);
ruleDef();
state._fsp--;
- after(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0());
+ after(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0());
}
@@ -1626,7 +1626,7 @@
}
return ;
}
- // $ANTLR end "rule__Module__DefsAssignment_1"
+ // $ANTLR end "rule__Unit__DefsAssignment_1"
// $ANTLR start "rule__Var__NameAssignment_1"
diff --git a/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFile.java b/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFile.java
index e6c2c5e..b99f449 100644
--- a/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFile.java
+++ b/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2017 1C-Soft LLC and others.
+ * Copyright (c) 2014, 2020 1C-Soft LLC and others.
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
@@ -24,7 +24,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.handly.context.IContext;
-import org.eclipse.handly.examples.basic.foo.Module;
+import org.eclipse.handly.examples.basic.foo.Unit;
import org.eclipse.handly.examples.basic.ui.model.IFooDef;
import org.eclipse.handly.examples.basic.ui.model.IFooFile;
import org.eclipse.handly.examples.basic.ui.model.IFooVar;
@@ -118,11 +118,11 @@
if (parseResult != null)
{
EObject root = parseResult.getRootASTElement();
- if (root instanceof Module)
+ if (root instanceof Unit)
{
FooFileStructureBuilder builder = new FooFileStructureBuilder(
newElements, resource.getResourceServiceProvider());
- builder.buildStructure(this, body, (Module)root, monitor);
+ builder.buildStructure(this, body, (Unit)root, monitor);
}
}
diff --git a/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFileStructureBuilder.java b/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFileStructureBuilder.java
index b615c35..2000309 100644
--- a/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFileStructureBuilder.java
+++ b/org.eclipse.handly.examples.basic.ui/src/org/eclipse/handly/internal/examples/basic/ui/model/FooFileStructureBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2017 1C-Soft LLC and others.
+ * Copyright (c) 2014, 2020 1C-Soft LLC and others.
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
@@ -19,7 +19,7 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.handly.examples.basic.foo.Def;
-import org.eclipse.handly.examples.basic.foo.Module;
+import org.eclipse.handly.examples.basic.foo.Unit;
import org.eclipse.handly.examples.basic.foo.Var;
import org.eclipse.handly.model.Elements;
import org.eclipse.handly.model.IElement;
@@ -62,27 +62,27 @@
/**
* Builds the structure for the given {@link FooFile} based on
- * its {@link Module AST}.
+ * its {@link Unit AST}.
*
* @param handle the handle to a Foo file (not <code>null</code>)
* @param body the body of the Foo file (not <code>null</code>)
- * @param module the AST of the Foo file (not <code>null</code>)
+ * @param unit the AST of the Foo file (not <code>null</code>)
* @param monitor a progress monitor, or <code>null</code>
* if progress reporting is not desired. The caller must not rely on
* {@link IProgressMonitor#done()} having been called by the receiver
* @throws OperationCanceledException if this method is canceled
*/
- void buildStructure(FooFile handle, SourceElementBody body, Module module,
+ void buildStructure(FooFile handle, SourceElementBody body, Unit unit,
IProgressMonitor monitor)
{
SubMonitor subMonitor = SubMonitor.convert(monitor,
- module.getVars().size() + module.getDefs().size());
- for (Var var : module.getVars())
+ unit.getVars().size() + unit.getDefs().size());
+ for (Var var : unit.getVars())
{
buildStructure(handle, body, var);
subMonitor.split(1);
}
- for (Def def : module.getDefs())
+ for (Def def : unit.getDefs())
{
buildStructure(handle, body, def);
subMonitor.split(1);
diff --git a/org.eclipse.handly.examples.basic/model/generated/Foo.ecore b/org.eclipse.handly.examples.basic/model/generated/Foo.ecore
index 1053bad..00b2223 100644
--- a/org.eclipse.handly.examples.basic/model/generated/Foo.ecore
+++ b/org.eclipse.handly.examples.basic/model/generated/Foo.ecore
@@ -2,7 +2,7 @@
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="foo" nsURI="http://www.eclipse.org/handly/examples/basic/Foo"
nsPrefix="foo">
- <eClassifiers xsi:type="ecore:EClass" name="Module">
+ <eClassifiers xsi:type="ecore:EClass" name="Unit">
<eStructuralFeatures xsi:type="ecore:EReference" name="vars" upperBound="-1" eType="#//Var"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="defs" upperBound="-1" eType="#//Def"
diff --git a/org.eclipse.handly.examples.basic/model/generated/Foo.genmodel b/org.eclipse.handly.examples.basic/model/generated/Foo.genmodel
index 12c9eef..3ddd7cd 100644
--- a/org.eclipse.handly.examples.basic/model/generated/Foo.genmodel
+++ b/org.eclipse.handly.examples.basic/model/generated/Foo.genmodel
@@ -6,9 +6,9 @@
complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.13">
<genPackages prefix="Foo" basePackage="org.eclipse.handly.examples.basic" disposableProviderFactory="true"
fileExtensions="foo" ecorePackage="Foo.ecore#/">
- <genClasses ecoreClass="Foo.ecore#//Module">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Foo.ecore#//Module/vars"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Foo.ecore#//Module/defs"/>
+ <genClasses ecoreClass="Foo.ecore#//Unit">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Foo.ecore#//Unit/vars"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Foo.ecore#//Unit/defs"/>
</genClasses>
<genClasses ecoreClass="Foo.ecore#//Var">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Foo.ecore#//Var/name"/>
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/Foo.xtextbin b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/Foo.xtextbin
index 0da0003..a916e16 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/Foo.xtextbin
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/Foo.xtextbin
Binary files differ
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooFactory.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooFactory.java
index 5b83c9f..37844b7 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooFactory.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooFactory.java
@@ -24,13 +24,13 @@
FooFactory eINSTANCE = org.eclipse.handly.examples.basic.foo.impl.FooFactoryImpl.init();
/**
- * Returns a new object of class '<em>Module</em>'.
+ * Returns a new object of class '<em>Unit</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return a new object of class '<em>Module</em>'.
+ * @return a new object of class '<em>Unit</em>'.
* @generated
*/
- Module createModule();
+ Unit createUnit();
/**
* Returns a new object of class '<em>Var</em>'.
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooPackage.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooPackage.java
index 45b6127..b11e7e4 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooPackage.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/FooPackage.java
@@ -58,14 +58,14 @@
FooPackage eINSTANCE = org.eclipse.handly.examples.basic.foo.impl.FooPackageImpl.init();
/**
- * The meta object id for the '{@link org.eclipse.handly.examples.basic.foo.impl.ModuleImpl <em>Module</em>}' class.
+ * The meta object id for the '{@link org.eclipse.handly.examples.basic.foo.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.handly.examples.basic.foo.impl.ModuleImpl
- * @see org.eclipse.handly.examples.basic.foo.impl.FooPackageImpl#getModule()
+ * @see org.eclipse.handly.examples.basic.foo.impl.UnitImpl
+ * @see org.eclipse.handly.examples.basic.foo.impl.FooPackageImpl#getUnit()
* @generated
*/
- int MODULE = 0;
+ int UNIT = 0;
/**
* The feature id for the '<em><b>Vars</b></em>' containment reference list.
@@ -74,7 +74,7 @@
* @generated
* @ordered
*/
- int MODULE__VARS = 0;
+ int UNIT__VARS = 0;
/**
* The feature id for the '<em><b>Defs</b></em>' containment reference list.
@@ -83,16 +83,16 @@
* @generated
* @ordered
*/
- int MODULE__DEFS = 1;
+ int UNIT__DEFS = 1;
/**
- * The number of structural features of the '<em>Module</em>' class.
+ * The number of structural features of the '<em>Unit</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int MODULE_FEATURE_COUNT = 2;
+ int UNIT_FEATURE_COUNT = 2;
/**
* The meta object id for the '{@link org.eclipse.handly.examples.basic.foo.impl.VarImpl <em>Var</em>}' class.
@@ -161,36 +161,36 @@
/**
- * Returns the meta object for class '{@link org.eclipse.handly.examples.basic.foo.Module <em>Module</em>}'.
+ * Returns the meta object for class '{@link org.eclipse.handly.examples.basic.foo.Unit <em>Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for class '<em>Module</em>'.
- * @see org.eclipse.handly.examples.basic.foo.Module
+ * @return the meta object for class '<em>Unit</em>'.
+ * @see org.eclipse.handly.examples.basic.foo.Unit
* @generated
*/
- EClass getModule();
+ EClass getUnit();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.handly.examples.basic.foo.Module#getVars <em>Vars</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.handly.examples.basic.foo.Unit#getVars <em>Vars</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Vars</em>'.
- * @see org.eclipse.handly.examples.basic.foo.Module#getVars()
- * @see #getModule()
+ * @see org.eclipse.handly.examples.basic.foo.Unit#getVars()
+ * @see #getUnit()
* @generated
*/
- EReference getModule_Vars();
+ EReference getUnit_Vars();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.handly.examples.basic.foo.Module#getDefs <em>Defs</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.handly.examples.basic.foo.Unit#getDefs <em>Defs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Defs</em>'.
- * @see org.eclipse.handly.examples.basic.foo.Module#getDefs()
- * @see #getModule()
+ * @see org.eclipse.handly.examples.basic.foo.Unit#getDefs()
+ * @see #getUnit()
* @generated
*/
- EReference getModule_Defs();
+ EReference getUnit_Defs();
/**
* Returns the meta object for class '{@link org.eclipse.handly.examples.basic.foo.Var <em>Var</em>}'.
@@ -269,14 +269,14 @@
interface Literals
{
/**
- * The meta object literal for the '{@link org.eclipse.handly.examples.basic.foo.impl.ModuleImpl <em>Module</em>}' class.
+ * The meta object literal for the '{@link org.eclipse.handly.examples.basic.foo.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.handly.examples.basic.foo.impl.ModuleImpl
- * @see org.eclipse.handly.examples.basic.foo.impl.FooPackageImpl#getModule()
+ * @see org.eclipse.handly.examples.basic.foo.impl.UnitImpl
+ * @see org.eclipse.handly.examples.basic.foo.impl.FooPackageImpl#getUnit()
* @generated
*/
- EClass MODULE = eINSTANCE.getModule();
+ EClass UNIT = eINSTANCE.getUnit();
/**
* The meta object literal for the '<em><b>Vars</b></em>' containment reference list feature.
@@ -284,7 +284,7 @@
* <!-- end-user-doc -->
* @generated
*/
- EReference MODULE__VARS = eINSTANCE.getModule_Vars();
+ EReference UNIT__VARS = eINSTANCE.getUnit_Vars();
/**
* The meta object literal for the '<em><b>Defs</b></em>' containment reference list feature.
@@ -292,7 +292,7 @@
* <!-- end-user-doc -->
* @generated
*/
- EReference MODULE__DEFS = eINSTANCE.getModule_Defs();
+ EReference UNIT__DEFS = eINSTANCE.getUnit_Defs();
/**
* The meta object literal for the '{@link org.eclipse.handly.examples.basic.foo.impl.VarImpl <em>Var</em>}' class.
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Module.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Unit.java
similarity index 73%
rename from org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Module.java
rename to org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Unit.java
index b3ed14f..0fe6cb6 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Module.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/Unit.java
@@ -9,22 +9,22 @@
/**
* <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Module</b></em>'.
+ * A representation of the model object '<em><b>Unit</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
- * <li>{@link org.eclipse.handly.examples.basic.foo.Module#getVars <em>Vars</em>}</li>
- * <li>{@link org.eclipse.handly.examples.basic.foo.Module#getDefs <em>Defs</em>}</li>
+ * <li>{@link org.eclipse.handly.examples.basic.foo.Unit#getVars <em>Vars</em>}</li>
+ * <li>{@link org.eclipse.handly.examples.basic.foo.Unit#getDefs <em>Defs</em>}</li>
* </ul>
*
- * @see org.eclipse.handly.examples.basic.foo.FooPackage#getModule()
+ * @see org.eclipse.handly.examples.basic.foo.FooPackage#getUnit()
* @model
* @generated
*/
-public interface Module extends EObject
+public interface Unit extends EObject
{
/**
* Returns the value of the '<em><b>Vars</b></em>' containment reference list.
@@ -36,7 +36,7 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Vars</em>' containment reference list.
- * @see org.eclipse.handly.examples.basic.foo.FooPackage#getModule_Vars()
+ * @see org.eclipse.handly.examples.basic.foo.FooPackage#getUnit_Vars()
* @model containment="true"
* @generated
*/
@@ -52,10 +52,10 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Defs</em>' containment reference list.
- * @see org.eclipse.handly.examples.basic.foo.FooPackage#getModule_Defs()
+ * @see org.eclipse.handly.examples.basic.foo.FooPackage#getUnit_Defs()
* @model containment="true"
* @generated
*/
EList<Def> getDefs();
-} // Module
+} // Unit
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooFactoryImpl.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooFactoryImpl.java
index a2b54e7..750c7a4 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooFactoryImpl.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooFactoryImpl.java
@@ -65,7 +65,7 @@
{
switch (eClass.getClassifierID())
{
- case FooPackage.MODULE: return createModule();
+ case FooPackage.UNIT: return createUnit();
case FooPackage.VAR: return createVar();
case FooPackage.DEF: return createDef();
default:
@@ -78,10 +78,10 @@
* <!-- end-user-doc -->
* @generated
*/
- public Module createModule()
+ public Unit createUnit()
{
- ModuleImpl module = new ModuleImpl();
- return module;
+ UnitImpl unit = new UnitImpl();
+ return unit;
}
/**
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooPackageImpl.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooPackageImpl.java
index c1fa3a5..cddfd44 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooPackageImpl.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/FooPackageImpl.java
@@ -13,7 +13,7 @@
import org.eclipse.handly.examples.basic.foo.Def;
import org.eclipse.handly.examples.basic.foo.FooFactory;
import org.eclipse.handly.examples.basic.foo.FooPackage;
-import org.eclipse.handly.examples.basic.foo.Module;
+import org.eclipse.handly.examples.basic.foo.Unit;
import org.eclipse.handly.examples.basic.foo.Var;
/**
@@ -29,7 +29,7 @@
* <!-- end-user-doc -->
* @generated
*/
- private EClass moduleEClass = null;
+ private EClass unitEClass = null;
/**
* <!-- begin-user-doc -->
@@ -113,9 +113,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public EClass getModule()
+ public EClass getUnit()
{
- return moduleEClass;
+ return unitEClass;
}
/**
@@ -123,9 +123,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public EReference getModule_Vars()
+ public EReference getUnit_Vars()
{
- return (EReference)moduleEClass.getEStructuralFeatures().get(0);
+ return (EReference)unitEClass.getEStructuralFeatures().get(0);
}
/**
@@ -133,9 +133,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public EReference getModule_Defs()
+ public EReference getUnit_Defs()
{
- return (EReference)moduleEClass.getEStructuralFeatures().get(1);
+ return (EReference)unitEClass.getEStructuralFeatures().get(1);
}
/**
@@ -218,9 +218,9 @@
isCreated = true;
// Create classes and their features
- moduleEClass = createEClass(MODULE);
- createEReference(moduleEClass, MODULE__VARS);
- createEReference(moduleEClass, MODULE__DEFS);
+ unitEClass = createEClass(UNIT);
+ createEReference(unitEClass, UNIT__VARS);
+ createEReference(unitEClass, UNIT__DEFS);
varEClass = createEClass(VAR);
createEAttribute(varEClass, VAR__NAME);
@@ -261,9 +261,9 @@
// Add supertypes to classes
// Initialize classes and features; add operations and parameters
- initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getModule_Vars(), this.getVar(), null, "vars", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getModule_Defs(), this.getDef(), null, "defs", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(unitEClass, Unit.class, "Unit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getUnit_Vars(), this.getVar(), null, "vars", null, 0, -1, Unit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getUnit_Defs(), this.getDef(), null, "defs", null, 0, -1, Unit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(varEClass, Var.class, "Var", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getVar_Name(), ecorePackage.getEString(), "name", null, 0, 1, Var.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/ModuleImpl.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/UnitImpl.java
similarity index 81%
rename from org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/ModuleImpl.java
rename to org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/UnitImpl.java
index 80026f6..d4ce35f 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/ModuleImpl.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/impl/UnitImpl.java
@@ -19,24 +19,24 @@
import org.eclipse.handly.examples.basic.foo.Def;
import org.eclipse.handly.examples.basic.foo.FooPackage;
-import org.eclipse.handly.examples.basic.foo.Module;
+import org.eclipse.handly.examples.basic.foo.Unit;
import org.eclipse.handly.examples.basic.foo.Var;
/**
* <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Module</b></em>'.
+ * An implementation of the model object '<em><b>Unit</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
- * <li>{@link org.eclipse.handly.examples.basic.foo.impl.ModuleImpl#getVars <em>Vars</em>}</li>
- * <li>{@link org.eclipse.handly.examples.basic.foo.impl.ModuleImpl#getDefs <em>Defs</em>}</li>
+ * <li>{@link org.eclipse.handly.examples.basic.foo.impl.UnitImpl#getVars <em>Vars</em>}</li>
+ * <li>{@link org.eclipse.handly.examples.basic.foo.impl.UnitImpl#getDefs <em>Defs</em>}</li>
* </ul>
*
* @generated
*/
-public class ModuleImpl extends MinimalEObjectImpl.Container implements Module
+public class UnitImpl extends MinimalEObjectImpl.Container implements Unit
{
/**
* The cached value of the '{@link #getVars() <em>Vars</em>}' containment reference list.
@@ -63,7 +63,7 @@
* <!-- end-user-doc -->
* @generated
*/
- protected ModuleImpl()
+ protected UnitImpl()
{
super();
}
@@ -76,7 +76,7 @@
@Override
protected EClass eStaticClass()
{
- return FooPackage.Literals.MODULE;
+ return FooPackage.Literals.UNIT;
}
/**
@@ -88,7 +88,7 @@
{
if (vars == null)
{
- vars = new EObjectContainmentEList<Var>(Var.class, this, FooPackage.MODULE__VARS);
+ vars = new EObjectContainmentEList<Var>(Var.class, this, FooPackage.UNIT__VARS);
}
return vars;
}
@@ -102,7 +102,7 @@
{
if (defs == null)
{
- defs = new EObjectContainmentEList<Def>(Def.class, this, FooPackage.MODULE__DEFS);
+ defs = new EObjectContainmentEList<Def>(Def.class, this, FooPackage.UNIT__DEFS);
}
return defs;
}
@@ -117,9 +117,9 @@
{
switch (featureID)
{
- case FooPackage.MODULE__VARS:
+ case FooPackage.UNIT__VARS:
return ((InternalEList<?>)getVars()).basicRemove(otherEnd, msgs);
- case FooPackage.MODULE__DEFS:
+ case FooPackage.UNIT__DEFS:
return ((InternalEList<?>)getDefs()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
@@ -135,9 +135,9 @@
{
switch (featureID)
{
- case FooPackage.MODULE__VARS:
+ case FooPackage.UNIT__VARS:
return getVars();
- case FooPackage.MODULE__DEFS:
+ case FooPackage.UNIT__DEFS:
return getDefs();
}
return super.eGet(featureID, resolve, coreType);
@@ -154,11 +154,11 @@
{
switch (featureID)
{
- case FooPackage.MODULE__VARS:
+ case FooPackage.UNIT__VARS:
getVars().clear();
getVars().addAll((Collection<? extends Var>)newValue);
return;
- case FooPackage.MODULE__DEFS:
+ case FooPackage.UNIT__DEFS:
getDefs().clear();
getDefs().addAll((Collection<? extends Def>)newValue);
return;
@@ -176,10 +176,10 @@
{
switch (featureID)
{
- case FooPackage.MODULE__VARS:
+ case FooPackage.UNIT__VARS:
getVars().clear();
return;
- case FooPackage.MODULE__DEFS:
+ case FooPackage.UNIT__DEFS:
getDefs().clear();
return;
}
@@ -196,12 +196,12 @@
{
switch (featureID)
{
- case FooPackage.MODULE__VARS:
+ case FooPackage.UNIT__VARS:
return vars != null && !vars.isEmpty();
- case FooPackage.MODULE__DEFS:
+ case FooPackage.UNIT__DEFS:
return defs != null && !defs.isEmpty();
}
return super.eIsSet(featureID);
}
-} //ModuleImpl
+} //UnitImpl
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooAdapterFactory.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooAdapterFactory.java
index c59997e..c631264 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooAdapterFactory.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooAdapterFactory.java
@@ -76,9 +76,9 @@
new FooSwitch<Adapter>()
{
@Override
- public Adapter caseModule(Module object)
+ public Adapter caseUnit(Unit object)
{
- return createModuleAdapter();
+ return createUnitAdapter();
}
@Override
public Adapter caseVar(Var object)
@@ -113,16 +113,16 @@
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.handly.examples.basic.foo.Module <em>Module</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.handly.examples.basic.foo.Unit <em>Unit</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.handly.examples.basic.foo.Module
+ * @see org.eclipse.handly.examples.basic.foo.Unit
* @generated
*/
- public Adapter createModuleAdapter()
+ public Adapter createUnitAdapter()
{
return null;
}
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooSwitch.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooSwitch.java
index f290d05..691f0f5 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooSwitch.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/foo/util/FooSwitch.java
@@ -73,10 +73,10 @@
{
switch (classifierID)
{
- case FooPackage.MODULE:
+ case FooPackage.UNIT:
{
- Module module = (Module)theEObject;
- T result = caseModule(module);
+ Unit unit = (Unit)theEObject;
+ T result = caseUnit(unit);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -99,17 +99,17 @@
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Module</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Unit</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Module</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Unit</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseModule(Module object)
+ public T caseUnit(Unit object)
{
return null;
}
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/FooParser.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/FooParser.java
index 31b3feb..89565a9 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/FooParser.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/FooParser.java
@@ -27,7 +27,7 @@
@Override
protected String getDefaultRuleName() {
- return "Module";
+ return "Unit";
}
public FooGrammarAccess getGrammarAccess() {
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFoo.g b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFoo.g
index 54974b8..d7894a0 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFoo.g
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFoo.g
@@ -43,7 +43,7 @@
@Override
protected String getFirstRuleName() {
- return "Module";
+ return "Unit";
}
@Override
@@ -60,15 +60,15 @@
}
}
-// Entry rule entryRuleModule
-entryRuleModule returns [EObject current=null]:
- { newCompositeNode(grammarAccess.getModuleRule()); }
- iv_ruleModule=ruleModule
- { $current=$iv_ruleModule.current; }
+// Entry rule entryRuleUnit
+entryRuleUnit returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getUnitRule()); }
+ iv_ruleUnit=ruleUnit
+ { $current=$iv_ruleUnit.current; }
EOF;
-// Rule Module
-ruleModule returns [EObject current=null]
+// Rule Unit
+ruleUnit returns [EObject current=null]
@init {
enterRule();
}
@@ -79,12 +79,12 @@
(
(
{
- newCompositeNode(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0());
+ newCompositeNode(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0());
}
lv_vars_0_0=ruleVar
{
if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getModuleRule());
+ $current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(
$current,
@@ -98,12 +98,12 @@
(
(
{
- newCompositeNode(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0());
+ newCompositeNode(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0());
}
lv_defs_1_0=ruleDef
{
if ($current==null) {
- $current = createModelElementForParent(grammarAccess.getModuleRule());
+ $current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(
$current,
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFooParser.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFooParser.java
index 6b94e6c..521af89 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFooParser.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/parser/antlr/internal/InternalFooParser.java
@@ -68,7 +68,7 @@
@Override
protected String getFirstRuleName() {
- return "Module";
+ return "Unit";
}
@Override
@@ -79,25 +79,25 @@
- // $ANTLR start "entryRuleModule"
- // InternalFoo.g:64:1: entryRuleModule returns [EObject current=null] : iv_ruleModule= ruleModule EOF ;
- public final EObject entryRuleModule() throws RecognitionException {
+ // $ANTLR start "entryRuleUnit"
+ // InternalFoo.g:64:1: entryRuleUnit returns [EObject current=null] : iv_ruleUnit= ruleUnit EOF ;
+ public final EObject entryRuleUnit() throws RecognitionException {
EObject current = null;
- EObject iv_ruleModule = null;
+ EObject iv_ruleUnit = null;
try {
- // InternalFoo.g:64:47: (iv_ruleModule= ruleModule EOF )
- // InternalFoo.g:65:2: iv_ruleModule= ruleModule EOF
+ // InternalFoo.g:64:45: (iv_ruleUnit= ruleUnit EOF )
+ // InternalFoo.g:65:2: iv_ruleUnit= ruleUnit EOF
{
- newCompositeNode(grammarAccess.getModuleRule());
+ newCompositeNode(grammarAccess.getUnitRule());
pushFollow(FOLLOW_1);
- iv_ruleModule=ruleModule();
+ iv_ruleUnit=ruleUnit();
state._fsp--;
- current =iv_ruleModule;
+ current =iv_ruleUnit;
match(input,EOF,FOLLOW_2);
}
@@ -112,12 +112,12 @@
}
return current;
}
- // $ANTLR end "entryRuleModule"
+ // $ANTLR end "entryRuleUnit"
- // $ANTLR start "ruleModule"
- // InternalFoo.g:71:1: ruleModule returns [EObject current=null] : ( ( (lv_vars_0_0= ruleVar ) )* ( (lv_defs_1_0= ruleDef ) )* ) ;
- public final EObject ruleModule() throws RecognitionException {
+ // $ANTLR start "ruleUnit"
+ // InternalFoo.g:71:1: ruleUnit returns [EObject current=null] : ( ( (lv_vars_0_0= ruleVar ) )* ( (lv_defs_1_0= ruleDef ) )* ) ;
+ public final EObject ruleUnit() throws RecognitionException {
EObject current = null;
EObject lv_vars_0_0 = null;
@@ -154,7 +154,7 @@
// InternalFoo.g:81:5: lv_vars_0_0= ruleVar
{
- newCompositeNode(grammarAccess.getModuleAccess().getVarsVarParserRuleCall_0_0());
+ newCompositeNode(grammarAccess.getUnitAccess().getVarsVarParserRuleCall_0_0());
pushFollow(FOLLOW_3);
lv_vars_0_0=ruleVar();
@@ -163,7 +163,7 @@
if (current==null) {
- current = createModelElementForParent(grammarAccess.getModuleRule());
+ current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(
current,
@@ -203,7 +203,7 @@
// InternalFoo.g:100:5: lv_defs_1_0= ruleDef
{
- newCompositeNode(grammarAccess.getModuleAccess().getDefsDefParserRuleCall_1_0());
+ newCompositeNode(grammarAccess.getUnitAccess().getDefsDefParserRuleCall_1_0());
pushFollow(FOLLOW_4);
lv_defs_1_0=ruleDef();
@@ -212,7 +212,7 @@
if (current==null) {
- current = createModelElementForParent(grammarAccess.getModuleRule());
+ current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(
current,
@@ -252,7 +252,7 @@
}
return current;
}
- // $ANTLR end "ruleModule"
+ // $ANTLR end "ruleUnit"
// $ANTLR start "entryRuleVar"
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/serializer/FooSemanticSequencer.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/serializer/FooSemanticSequencer.java
index 786f508..0017bd8 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/serializer/FooSemanticSequencer.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/serializer/FooSemanticSequencer.java
@@ -9,7 +9,7 @@
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.handly.examples.basic.foo.Def;
import org.eclipse.handly.examples.basic.foo.FooPackage;
-import org.eclipse.handly.examples.basic.foo.Module;
+import org.eclipse.handly.examples.basic.foo.Unit;
import org.eclipse.handly.examples.basic.foo.Var;
import org.eclipse.handly.examples.basic.services.FooGrammarAccess;
import org.eclipse.xtext.Action;
@@ -37,8 +37,8 @@
case FooPackage.DEF:
sequence_Def(context, (Def) semanticObject);
return;
- case FooPackage.MODULE:
- sequence_Module(context, (Module) semanticObject);
+ case FooPackage.UNIT:
+ sequence_Unit(context, (Unit) semanticObject);
return;
case FooPackage.VAR:
sequence_Var(context, (Var) semanticObject);
@@ -62,12 +62,12 @@
/**
* Contexts:
- * Module returns Module
+ * Unit returns Unit
*
* Constraint:
* ((vars+=Var+ defs+=Def+) | defs+=Def+)?
*/
- protected void sequence_Module(ISerializationContext context, Module semanticObject) {
+ protected void sequence_Unit(ISerializationContext context, Unit semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
diff --git a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/services/FooGrammarAccess.java b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/services/FooGrammarAccess.java
index c6ccc8e..4f3619d 100644
--- a/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/services/FooGrammarAccess.java
+++ b/org.eclipse.handly.examples.basic/src-gen/org/eclipse/handly/examples/basic/services/FooGrammarAccess.java
@@ -21,15 +21,15 @@
@Singleton
public class FooGrammarAccess extends AbstractGrammarElementFinder {
- public class ModuleElements extends AbstractParserRuleElementFinder {
- private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.handly.examples.basic.Foo.Module");
+ public class UnitElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.handly.examples.basic.Foo.Unit");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cVarsAssignment_0 = (Assignment)cGroup.eContents().get(0);
private final RuleCall cVarsVarParserRuleCall_0_0 = (RuleCall)cVarsAssignment_0.eContents().get(0);
private final Assignment cDefsAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cDefsDefParserRuleCall_1_0 = (RuleCall)cDefsAssignment_1.eContents().get(0);
- //Module:
+ //Unit:
// vars+=Var*
// defs+=Def*;
@Override public ParserRule getRule() { return rule; }
@@ -141,7 +141,7 @@
}
- private final ModuleElements pModule;
+ private final UnitElements pUnit;
private final VarElements pVar;
private final DefElements pDef;
@@ -154,7 +154,7 @@
TerminalsGrammarAccess gaTerminals) {
this.grammar = internalFindGrammar(grammarProvider);
this.gaTerminals = gaTerminals;
- this.pModule = new ModuleElements();
+ this.pUnit = new UnitElements();
this.pVar = new VarElements();
this.pDef = new DefElements();
}
@@ -186,15 +186,15 @@
}
- //Module:
+ //Unit:
// vars+=Var*
// defs+=Def*;
- public ModuleElements getModuleAccess() {
- return pModule;
+ public UnitElements getUnitAccess() {
+ return pUnit;
}
- public ParserRule getModuleRule() {
- return getModuleAccess().getRule();
+ public ParserRule getUnitRule() {
+ return getUnitAccess().getRule();
}
//Var:
diff --git a/org.eclipse.handly.examples.basic/src/org/eclipse/handly/examples/basic/Foo.xtext b/org.eclipse.handly.examples.basic/src/org/eclipse/handly/examples/basic/Foo.xtext
index 4b43998..871b53a 100644
--- a/org.eclipse.handly.examples.basic/src/org/eclipse/handly/examples/basic/Foo.xtext
+++ b/org.eclipse.handly.examples.basic/src/org/eclipse/handly/examples/basic/Foo.xtext
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 1C LLC.
+ * Copyright (c) 2014, 2020 1C-Soft LLC and others.
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which is available at
@@ -15,7 +15,7 @@
generate foo "http://www.eclipse.org/handly/examples/basic/Foo"
-Module:
+Unit:
vars += Var*
defs += Def*
;