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 222399 - IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
Summary: IllegalStateException: Cannot call getCompilationInfo() if current phase < Ja...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 14:50 UTC by Petr Cyhelsky
Modified: 2012-11-21 13:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 195373


Attachments
stacktrace (2.56 KB, text/plain)
2012-11-19 14:50 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2012-11-19 14:50:12 UTC
Build: NetBeans IDE Dev (Build 201211190002)
VM: Java HotSpot(TM) Client VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b32
OS: Windows 7

Stacktrace: 
java.lang.IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
   at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getCompilationUnit(CompilationInfoImpl.java:212)
   at org.netbeans.api.java.source.CompilationInfo.getCompilationUnit(CompilationInfo.java:185)
   at org.netbeans.api.java.source.TreeUtilities.pathFor(TreeUtilities.java:241)
   at org.netbeans.modules.editor.java.JavaCodeTemplateFilter$1$1.run(JavaCodeTemplateFilter.java:102)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:584)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
Comment 1 Petr Cyhelsky 2012-11-19 14:50:14 UTC
Created attachment 128065 [details]
stacktrace
Comment 2 Dusan Balek 2012-11-19 17:58:17 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/ed9fa333d540
Comment 3 Quality Engineering 2012-11-21 13:43:42 UTC
Integrated into 'main-golden', will be available in build *201211211016* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ed9fa333d540
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #222399: IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first - fixed.