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 137636 - SDK/completion of java classes fails
Summary: SDK/completion of java classes fails
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on: 133460
Blocks:
  Show dependency tree
 
Reported: 2008-06-18 21:34 UTC by Lark Fitzgerald
Modified: 2008-07-15 10:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (241.22 KB, image/jpeg)
2008-06-18 21:35 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2008-06-18 21:34:36 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

fx allows use of System.out.println but the editor fails to allow completion of them.

1. open editor
2. add import:
import javafx.gui.*;
import javafx.gui.component.*;
3. paste the following source:

var myString = "Click Me";

Frame {
    width: 50
    height: 50
    visible: true
    content: FlowPanel {
        content: Button {
            text: myString
            action: function() {
                
            }
        }
    }
}

4. position cursor in the function() body and type:
System.out.

The editor shows errors which block java completion fails.
Comment 1 Lark Fitzgerald 2008-06-18 21:35:57 UTC
Created attachment 63041 [details]
screenshot
Comment 2 Lark Fitzgerald 2008-06-18 21:40:24 UTC
Logged Jira issue:
http://openjfx.java.sun.com/jira/browse/JFXC-1377
Comment 3 Lark Fitzgerald 2008-07-08 02:44:20 UTC
No longer reproducible using build:

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

I now see a list of variables starting with myString.
Comment 4 Lark Fitzgerald 2008-07-09 19:58:02 UTC
Reopening (downgrading).  The completion shows a list but the items in the list are not from System.out.
Comment 5 David Strupl 2008-07-10 09:02:09 UTC
Please note that if you have 

import java.lang.System;

somewhere near the top it works as expected.

If the class system is unknown the completion should not show anything after the dot. I will try to fix that ...
Comment 6 David Strupl 2008-07-10 09:34:32 UTC
After 
858:82b9e4dd4a6f

we will no longer see the list that should not be shown after the dot.

I am closing this issue since the summary is no longer true. Completion for java classes works (if they are imported).

The other question is whether the code completion should show the classes that are not imported: it should but please
file this as separate issue. It is not java classes specific - it applies also to fx classes. The newly created issue
should be blocked by 136056 and not by 133460.
Comment 7 Alexandr Scherbatiy 2008-07-15 10:39:26 UTC
The editor shows a corrected list of suggested methods and fields
if 'import java.lang.System;' is added.