summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-18 08:44:01 (EST)
committer sefftinge2009-02-18 08:44:01 (EST)
commit7d5ca8bd4b1f2b5fb8674f422af300d8d78dc78d (patch)
tree4758085f6cc587fd92f2671640d480d71ffadedd
parentf814af2d5a664a207494e25e20f069ec277491c7 (diff)
downloadorg.eclipse.xtext-7d5ca8bd4b1f2b5fb8674f422af300d8d78dc78d.zip
org.eclipse.xtext-7d5ca8bd4b1f2b5fb8674f422af300d8d78dc78d.tar.gz
org.eclipse.xtext-7d5ca8bd4b1f2b5fb8674f422af300d8d78dc78d.tar.bz2
Fix: MemoryLeak in XtextLinker - next try
Fix: NPE in Editor
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/NodeModelTest.java6
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext32
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
3 files changed, 25 insertions, 25 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/NodeModelTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/NodeModelTest.java
index a080141..589edb6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/NodeModelTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/NodeModelTest.java
@@ -37,7 +37,7 @@ public class NodeModelTest extends AbstractGeneratorTest {
public void testNavigabilityNode2Ast() throws Exception {
EObject object = getModel(MODEL);
EList<Adapter> adapters = object.eAdapters();
- assertEquals(1 /* nodeAdapter */ + 1 /* clearer */, adapters.size());
+ assertEquals(1 /* nodeAdapter */, adapters.size());
NodeAdapter adapter = (NodeAdapter) adapters.get(0);
CompositeNode rootNode = adapter.getParserNode();
assertTrue(rootNode.eContainer() == null);
@@ -68,7 +68,7 @@ public class NodeModelTest extends AbstractGeneratorTest {
private void checkNavigabilityAst2Node(EObject object) {
EList<Adapter> adapters = object.eAdapters();
- assertEquals(1 /* nodeAdapter */ + 1 /* clearer */, adapters.size());
+ assertEquals(1 /* nodeAdapter */, adapters.size());
NodeAdapter adapter = (NodeAdapter) adapters.get(0);
AbstractNode parsetreeNode = adapter.getParserNode();
assertEquals(object, parsetreeNode.getElement());
@@ -78,7 +78,7 @@ public class NodeModelTest extends AbstractGeneratorTest {
EObject astElement = node.getElement();
if (astElement != null) {
EList<Adapter> adapters = astElement.eAdapters();
- assertEquals(1 /* nodeAdapter */ + 1 /* clearer */, adapters.size());
+ assertEquals(1 /* nodeAdapter */, adapters.size());
NodeAdapter adapter = (NodeAdapter) adapters.get(0);
assertEquals(node, adapter.getParserNode());
} else {
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index 1b17e20..1eae9b4 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,22 +17,16 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_hiddenTokens(Grammar this):
+List[IScopedElement] scope_rule(CrossReference this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_type(TypeRef this):
- allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_superGrammar(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_type(emf::EObject this) :
+List[IScopedElement] scope_superGrammar(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
@@ -41,6 +35,12 @@ List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_hiddenTokens(Grammar this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_metamodel(TypeRef this):
allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
@@ -53,15 +53,15 @@ List[IScopedElement] scope_rule(RuleCall this):
List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(CrossReference this):
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_superGrammar(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_type(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_superGrammar(emf::EObject this) :
+List[IScopedElement] scope_type(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
index c586f67..a2ae8fd 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -16,12 +16,6 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_vater(Familie this):
- allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_vater(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
List[IScopedElement] scope_kinder(Familie this):
allElements().typeSelect(Kind).collect(x | createScopedElement(x.referenceName(), x));
@@ -34,3 +28,9 @@ List[IScopedElement] scope_mutter(Familie this):
List[IScopedElement] scope_mutter(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_vater(Familie this):
+ allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_vater(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+