This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139371 - AstPath fails for mini-class: class Bar { }
Summary: AstPath fails for mini-class: class Bar { }
Status: NEW
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 11:04 UTC by schmidtm
Modified: 2012-12-19 14:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schmidtm 2008-07-09 11:04:01 UTC
If one creates such a mini class:

class Bar { }

the AstPath created for it reads ModuelNode, but it should be ModuleNode:ClassNode

See disabled testcase: testTypeCompletion1() in groovy.editor/test/unit/src/org/netbeans/modules/groovy/editor/completion/TypesCompletionTest.java

in some cases even AstUtilities.getRoot(request.info) fails.
Comment 1 martin_adamek 2008-07-09 12:42:05 UTC
I am not able to reproduce this somehow, but I created AstPathTest in http://hg.netbeans.org/main/rev/5341a349c47b so if you will provide failing test 
case, I will fix it.
Comment 2 Quality Engineering 2008-07-09 15:44:07 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #309 build
Changeset: http://hg.netbeans.org/main/rev/5341a349c47b
User: Martin Adamek <martin_adamek@netbeans.org>
Log: Test support for #139371: AstPath fails for mini-class: class Bar { }
Comment 3 schmidtm 2008-07-09 15:44:07 UTC
My original description was wrong. You have to have something uncomplete in the body of that mini-class like:

class Bar { Cl }

I've added a testcase to expose this:

http://hg.netbeans.org/main/rev/ac21609024e6
Comment 4 Quality Engineering 2008-07-10 04:15:06 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #310 build
Changeset: http://hg.netbeans.org/main/rev/ac21609024e6
User: Matthias Schmidt <schmidtm@netbeans.org>
Log: Adding testcases for #139371: AstPath fails for mini-class: class Bar { }
Comment 5 martin_adamek 2008-08-04 09:54:36 UTC
I know this is breaking some completion stuff, but in real world those mini-classes are not really used, so I am downgrading to P3.