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 168281 - IAE when inserting plugin into bad position
Summary: IAE when inserting plugin into bad position
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-08 13:35 UTC by Jaroslav Pospisil
Modified: 2009-11-09 06:34 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 Jaroslav Pospisil 2009-07-08 13:35:53 UTC
Create simple Maven Project and open pom.xml .Right-click in editor on <version> line to invoke context menu,select
Insert Code and select Plugin. Write surefire into name field,select appropriate jar and click OK.
Exception will appear (I expected either automatic insert of plugin to correct line or error message,not exception):


java.lang.IllegalArgumentException: bad position: 1068
	at javax.swing.text.JTextComponent.setCaretPosition(JTextComponent.java:1650)
	at org.netbeans.modules.maven.codegen.PluginGenerator.invoke(PluginGenerator.java:164)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.invokeSelected(GenerateCodePanel.java:159)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.listMouseReleased(GenerateCodePanel.java:122)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel.access$200(GenerateCodePanel.java:60)
	at org.netbeans.modules.editor.codegen.GenerateCodePanel$3.mouseReleased(GenerateCodePanel.java:108)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.Component.processMouseEvent(Component.java:6263)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6028)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:131)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Milos Kleint 2009-09-22 14:28:42 UTC
could be related (a different sideeffect of the same problem) to issue 166414
Comment 2 Milos Kleint 2009-11-09 06:34:27 UTC
let's assume the issue is fixed now by me correcting the ComponentUpdater. Please reopen if the issue persists in latest builds