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 135796 - Code reformating throws NPE
Summary: Code reformating throws NPE
Status: VERIFIED WORKSFORME
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on: 132764
Blocks:
  Show dependency tree
 
Reported: 2008-05-26 11:12 UTC by Alexandr Scherbatiy
Modified: 2008-06-20 19:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (40.87 KB, text/plain)
2008-05-26 11:50 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2008-05-26 11:12:56 UTC
Steps to reproduce:

- Create a JavaFX Script file
- Go to the editor
- Select 'Format' from popup menu

The NPE pops up: 

java.lang.NullPointerException
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask.applyAdjustments(JFXIndentTask.java:286)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask.access$200(JFXIndentTask.java:71)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask$1.run(JFXIndentTask.java:273)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask$1.run(JFXIndentTask.java:262)
	at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:353)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask.reformat(JFXIndentTask.java:260)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:504)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:271)
Comment 1 Alexandr Scherbatiy 2008-05-26 11:50:36 UTC
Created attachment 61904 [details]
IDE log file
Comment 2 David Strupl 2008-05-26 15:28:00 UTC
formatting --> moonko.
Comment 3 Alexandr Scherbatiy 2008-05-30 10:27:16 UTC
There is one more exception:

java.lang.NullPointerException
	at com.sun.source.util.TreePath.access$000(TreePath.java:38)
	at com.sun.source.util.TreePath$1.hasNext(TreePath.java:123)
	at org.netbeans.modules.javafx.editor.format.Visitor.getFirstImport(Visitor.java:253)
	at org.netbeans.modules.javafx.editor.format.Visitor.visitImport(Visitor.java:219)
	at org.netbeans.modules.javafx.editor.format.Visitor.visitImport(Visitor.java:70)
	at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:515)
	at com.sun.javafx.api.tree.JavaFXTreePathScanner.scan(JavaFXTreePathScanner.java:66)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:98)
	at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:118)
Comment 4 Lark Fitzgerald 2008-06-16 21:54:58 UTC
Can no longer reproduce this 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 nighly plugin: 268
Comment 5 Lark Fitzgerald 2008-06-19 15:31:10 UTC
re-verified on:
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
Comment 6 Lark Fitzgerald 2008-06-20 19:13:45 UTC
.