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.
Build: NetBeans IDE Dev (Build 110311-c86be8b62a57) VM: Java HotSpot(TM) Client VM, 17.0-b16, Java(TM) SE Runtime Environment, 1.6.0_21-b06 OS: Linux User Comments: GUEST: After Refactor Rename of a generated Action.java in RCP jocke: renamed topcomponent vv159170: renamed TC Stacktrace: java.lang.UnsupportedOperationException: XXX: static javax.swing.Action org.openide.windows.TopComponent.openAction(java.util.Map) at org.netbeans.modules.apisupport.project.layers.WritableXMLFileSystem.writeAttribute(WritableXMLFileSystem.java:900) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:357) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:340) at org.openide.filesystems.FileUtil.copyAttributes(FileUtil.java:1121) at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:740) at org.openide.filesystems.FileObject.copy(FileObject.java:129)
Created attachment 106920 [details] stacktrace
Not reproducible when using @TopComponent.OpenActionRegistration (available in 7.0+). I could not reproduce using a module built against 6.9, either, but I would not really expect refactoring to work well in that case (layer-based refactoring was never fully implemented). Seems that the layer FS does not yet support the new API in bug #120724, which can probably be reproduced in a unit test if not in an actual use case.
Jesse, I've got it in NetBeans IDE Dev (Build 110311-c86be8b62a57) when renamed class with the following annotations: @ConvertAsProperties(dtd = "-//com.sun.tools.analytics.ui.results.details//AnalyticsDetails//EN", autostore = true) @TopComponent.Description(preferredID = "AnalyticsDetailsTopComponent", //iconBase="SET/PATH/TO/ICON/HERE", persistenceType = TopComponent.PERSISTENCE_ALWAYS) @ActionID(category = "Window", id = "com.sun.tools.analytics.ui.results.details.AnalyticsDetailsTopComponent") @ActionReference(path = "Menu/Window" /*, position = 333 */) @TopComponent.OpenActionRegistration(displayName = "#CTL_AnalyticsDetailsAction", preferredID = "AnalyticsDetailsTopComponent") public final class AnalyticsDetailsTopComponent extends TopComponent {
That's what I tried first but did not get any exception.
*** Bug 180972 has been marked as a duplicate of this bug. ***
*** Bug 198406 has been marked as a duplicate of this bug. ***
core-main #54e813f15e7d
Integrated into 'main-golden', will be available in build *201105111436* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/54e813f15e7d User: Jesse Glick <jglick@netbeans.org> Log: #196608: UnsupportedOperationException: XXX: static javax.swing.Action org.openide.windows.TopComponent.openAction(java.util.Map)
*** Bug 198741 has been marked as a duplicate of this bug. ***