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 137619

Summary: SDK editor: stops working when missing ;
Product: javafx Reporter: Lark Fitzgerald <lfitzgerald>
Component: EditorAssignee: David Strupl <dstrupl>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Windows XP   
URL: http://openjfx.java.sun.com/jira/browse/JFXC-1366
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 133460    
Bug Blocks: 130138    
Attachments: screenshot
source
Works for me (?)

Description Lark Fitzgerald 2008-06-18 19:53:02 UTC
Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
fx NB61 nighly plugin: 269

syntax highlighting, code completion, etc (everything) stops working a ; is missing.  
Tree view shows errors but editor does not.  To the user, the breakage is random.

1. open the attached .fx source in the editor
Notice that the var display is missing highlighting on Color.BLACK, etc.
2. Position cursor after: var display : Node[] = [ Circle {
3. press ctrl+space
No suggestions are shown

There is also no code folding on the Circle, Line, Rectangle.  To correct the issue, put a ; at the end of the var  
display statement's }].

The tree shows an error but users don't have the tree, to them, everything just stops working.  A proper error needs 
to be generated that does not break the editor features.
Comment 1 Lark Fitzgerald 2008-06-18 19:56:17 UTC
Created attachment 63035 [details]
screenshot
Comment 2 Lark Fitzgerald 2008-06-18 19:56:56 UTC
Created attachment 63036 [details]
source
Comment 3 Lark Fitzgerald 2008-06-18 19:59:04 UTC
Logged Jira issue: http://openjfx.java.sun.com/jira/browse/JFXC-1366
Comment 4 Lark Fitzgerald 2008-07-08 02:39:37 UTC
Still reproducibleusing:
Product Version: NetBeans IDE 6.1 (Build 200804211638)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
fx NB61 continuous plugin: 313

The updated imports are:
import javafx.ext.swing.*;
import javafx.scene.*;
import javafx.scene.geometry.*;
import javafx.scene.paint.*;
import javafx.application.Application;
Comment 5 David Strupl 2008-07-08 09:28:29 UTC
Created attachment 64057 [details]
Works for me (?)
Comment 6 David Strupl 2008-07-08 09:34:52 UTC
In the current build the error is marked with red exclamation mark on the correct line. The editor cannot do more in
such case. When I compare the screenshot from you and from me the difference is that in your case the source was marked
as "green" in the upper right hand corner while in my case it is (correctly) marked as "red" (with proper line marker).

Without fixing the issue 133460 we cannot do more than what we do now. I suggest this one to be waived for the preview.
Comment 7 David Strupl 2008-07-09 14:46:05 UTC
Changing target milestone.
Comment 8 David Strupl 2008-07-22 10:04:23 UTC
This one should be implemented for 1.0. It is now on hold waiting for 133460 though.
Comment 9 David Strupl 2008-09-11 12:55:33 UTC
Maybe we can close this since when you take the following source:

import javafx.scene.*;
import javafx.scene.geometry.*;
import javafx.scene.paint.*;
import javafx.application.*;

var display : Node[] = [
    Circle {
        centerX: 100, centerY: 100,
        radius: 40,
        stroke: Color.BLACK
    },
    Line {
        startX: 10, startY: 10,
        endX: 230, endY: 100
        strokeWidth: 1,
        stroke: Color.BLACK
    },
    Rectangle {
        x: 10, y: 10,
        width: 140, height: 90,
        stroke: Color.BLACK
    }
]

Frame {
    title: "MyApplication"
    width: 200
    height: 200
    closeAction: function() { java.lang.System.exit( 0 ); }
    visible: true

    stage: Stage {
        content: display
    }
}

the missing semicolon actually does not break things as before. What do you think?
Comment 10 Lark Fitzgerald 2008-09-11 15:14:46 UTC
The editor is marking the missing ; properly.

Tested using FX Cont trunk build 144 (Sep 10, 2008 4:20:38 PM) on NB6.5:
Product Version: NetBeans IDE Dev (Build 20080909115218)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 11 Lark Fitzgerald 2008-09-11 15:16:46 UTC
verified