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 146136 - NPE in the editor
Summary: NPE in the editor
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-04 09:43 UTC by Martin Ryzl
Modified: 2008-09-08 10:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ryzl 2008-09-04 09:43:52 UTC
Custom build 20080903, main + javafx trunk.

Open a file in the editor, drag'n'drop Application from the palette to the editor:

java.lang.NullPointerException
	at org.netbeans.api.java.source.CodeStyle.getDefault(CodeStyle.java:87)
	at org.netbeans.modules.javafx.editor.format.Visitor.<init>(Visitor.java:98)
	at org.netbeans.modules.javafx.editor.format.Visitor.<init>(Visitor.java:90)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask$1.run(JFXIndentTask.java:288)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask$1.run(JFXIndentTask.java:274)
	at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:360)
	at org.netbeans.modules.javafx.editor.format.JFXIndentTask.reformat(JFXIndentTask.java:273)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:504)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:271)
	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:293)
	at org.netbeans.modules.editor.indent.FormatterImpl.reformat(FormatterImpl.java:187)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.insertTemplate(CodeTemplateInsertHandler.java:298)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.processTemplate(CodeTemplateInsertHandler.java:220)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.insert(CodeTemplateManagerOperation.java:238)
	at org.netbeans.lib.editor.codetemplates.api.CodeTemplate.insert(CodeTemplate.java:104)
	at org.netbeans.modules.javafx.palette.items.applications.Application.handleTransfer(Application.java:59)
	at org.openide.text.QuietEditorPane$DelegatingTransferHandler.importData(QuietEditorPane.java:249)
	at javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:690)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
	at javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java:609)
	at org.openide.text.QuietEditorPane$DelegatingDropTarget.drop(QuietEditorPane.java:385)
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
	at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
	at java.awt.Component.dispatchEventImpl(Component.java:3826)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:3963)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3817)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1778)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 David Strupl 2008-09-04 09:52:57 UTC
Reformat feature --> Rasta.
Comment 2 Alexandr Scherbatiy 2008-09-05 10:16:07 UTC
The issue usually happens after a code formating.

Is it a compiler issue?
Comment 3 Rastislav Komara 2008-09-05 11:22:15 UTC
This is not problem with compiler. It is problem with migration to 6.5 I guess.
Comment 4 Rastislav Komara 2008-09-05 17:54:32 UTC
Fixed.
Comment 5 Rastislav Komara 2008-09-05 17:55:00 UTC
.
Comment 6 Alexandr Scherbatiy 2008-09-08 10:50:34 UTC
verified