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 172574 - IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaFXSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
Summary: IllegalStateException: Cannot call getCompilationInfo() if current phase < Ja...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Adam Sotona
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-18 15:05 UTC by Alexandr Scherbatiy
Modified: 2009-09-29 10:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 158763


Attachments
stacktrace (2.29 KB, text/plain)
2009-09-18 15:05 UTC, Alexandr Scherbatiy
Details
stacktrace (2.29 KB, text/plain)
2009-09-21 09:43 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-09-18 15:05:31 UTC
Build: NetBeans IDE Dev (Build 200909151512)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaFXSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
        at org.netbeans.modules.javafx.source.parsing.JavaFXParserResultImpl.getCompilationUnit(JavaFXParserResultImpl.java:127)
        at org.netbeans.api.javafx.source.JavaFXParserResult.getCompilationUnit(JavaFXParserResult.java:116)
        at org.netbeans.modules.javafx.source.indexing.JavaFXIndexer.index(JavaFXIndexer.java:233)
        at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:194)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:1640)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
Comment 1 Alexandr Scherbatiy 2009-09-18 15:05:40 UTC
Created attachment 87917 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2009-09-18 15:14:23 UTC
The exception pops up during adding the 'public var action: function();' attribute in the code:
-----------------------------------------------------
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;

public class CustomButton extends CustomNode{


    public var text: String;
    public var fill: Color = Color.YELLOW;
    public var stroke: Color = Color.ORANGE;


   

    override function create(){
        Group{
            content: [
                Rectangle{
                    width: 70
                    height: 30
                    arcHeight: 10
                    arcWidth: 10
                    fill: fill
                    stroke: stroke


                }
                Text{
                    x: 10
                    y: 20
                    font: Font{ size: 15 }
                    content: text
                    fill: Color.GREEN
                }

            ]



        }

    }


}
-----------------------------------------------------

Comment 3 Alexandr Scherbatiy 2009-09-21 09:43:29 UTC
Build: NetBeans IDE Dev (Build 200909201401)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP, 5.1, x86

User Comments: 
The exception pops during the code typing:
--------------------------------------------------------------------------------------------
public class A {
    public var attr:String;

    public var a:A;



    public function f(x:Number):Number { x * x}

    public function fa(a:A):A {   }

}

public function run() {
    var a = A{
          attr: "Hello World!"
    };
    
    println(a.attr);

}

--------------------------------------------------------------------------------------------

Stacktrace: 
java.lang.IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaFXSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first.
        at org.netbeans.modules.javafx.source.parsing.JavaFXParserResultImpl.getCompilationUnit(JavaFXParserResultImpl.java:127)
        at org.netbeans.api.javafx.source.JavaFXParserResult.getCompilationUnit(JavaFXParserResult.java:116)
        at org.netbeans.modules.javafx.source.indexing.JavaFXIndexer.index(JavaFXIndexer.java:273)
        at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:194)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:1641)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
Comment 4 Alexandr Scherbatiy 2009-09-21 09:43:33 UTC
Created attachment 88000 [details]
stacktrace
Comment 5 J Bachorik 2009-09-21 21:31:19 UTC
seems to be fixed in http://hg.netbeans.org/javafx/rev/d9ef82934f3c
Comment 6 Alexandr Scherbatiy 2009-09-29 10:50:46 UTC
unable to reproduce.