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 196608 - UnsupportedOperationException: XXX: static javax.swing.Action org.openide.windows.TopComponent.openAction(java.util.Map)
Summary: UnsupportedOperationException: XXX: static javax.swing.Action org.openide.win...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 180972 198406 198741 (view as bug list)
Depends on:
Blocks: 72541 120724
  Show dependency tree
 
Reported: 2011-03-11 19:51 UTC by Vladimir Voskresensky
Modified: 2011-05-24 21:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 175259


Attachments
stacktrace (8.19 KB, text/plain)
2011-03-11 19:51 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2011-03-11 19:51:25 UTC
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)
Comment 1 Vladimir Voskresensky 2011-03-11 19:51:30 UTC
Created attachment 106920 [details]
stacktrace
Comment 2 Jesse Glick 2011-03-11 21:10:08 UTC
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.
Comment 3 Vladimir Voskresensky 2011-03-11 21:55:07 UTC
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 {
Comment 4 Jesse Glick 2011-03-12 01:29:11 UTC
That's what I tried first but did not get any exception.
Comment 5 Jesse Glick 2011-05-09 15:56:52 UTC
*** Bug 180972 has been marked as a duplicate of this bug. ***
Comment 6 Jesse Glick 2011-05-09 15:57:31 UTC
*** Bug 198406 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2011-05-09 17:17:25 UTC
core-main #54e813f15e7d
Comment 8 Quality Engineering 2011-05-11 19:39:11 UTC
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)
Comment 9 Jesse Glick 2011-05-24 21:38:15 UTC
*** Bug 198741 has been marked as a duplicate of this bug. ***