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 77811 - Remove button should be disabled if there's nothing to remove
Summary: Remove button should be disabled if there's nothing to remove
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2006-06-13 13:51 UTC by Tomas Danek
Modified: 2006-11-03 19:38 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 Tomas Danek 2006-06-13 13:51:23 UTC
5.5 20060612

1) go to Netbeans platform manager | Sources (the same for Javadoc)
2) add source directory for platform 
3) now remove these sources, Platform sources are now empty, but Remove button
is not disabled. If you push it, you get:


java.lang.ArrayIndexOutOfBoundsException: 0
	at
org.netbeans.modules.apisupport.project.ui.platform.PlatformComponentFactory$NbPlatformSourceRootsModel.getElementAt(PlatformComponentFactory.java:307)
	at javax.swing.JList.getSelectedValues(JList.java:1781)
	at
org.netbeans.modules.apisupport.project.ui.platform.NbPlatformCustomizerSources.removeFolder(NbPlatformCustomizerSources.java:197)
	at
org.netbeans.modules.apisupport.project.ui.platform.NbPlatformCustomizerSources.access$200(NbPlatformCustomizerSources.java:39)
	at
org.netbeans.modules.apisupport.project.ui.platform.NbPlatformCustomizerSources$3.actionPerformed(NbPlatformCustomizerSources.java:130)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	....etc
Comment 1 Tomas Danek 2006-06-13 15:14:58 UTC
reproducible in trunk, probably won't be fixed in 5.5
Comment 2 Martin Krauskopf 2006-06-13 16:52:06 UTC
Thanks for the catch.
Comment 3 Martin Krauskopf 2006-08-08 13:48:58 UTC
Fixed.

ui/platform/NbPlatformCustomizerJavadoc.java; 1.9 -> 1.10;
ui/platform/NbPlatformCustomizerSources.java; 1.10 -> 1.11;
Comment 4 Tomas Danek 2006-08-14 13:04:47 UTC
thanks, verified in 20060813