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 180972 - UnsupportedOperationException: XXX: org.openide.actions.SaveAction@266914
Summary: UnsupportedOperationException: XXX: org.openide.actions.SaveAction@266914
Status: RESOLVED DUPLICATE of bug 196608
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-19 08:29 UTC by _ tboudreau
Modified: 2011-05-09 15:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 159481


Attachments
stacktrace (2.44 KB, text/plain)
2010-02-19 08:29 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2010-02-19 08:29:21 UTC
Build: NetBeans IDE Dev (Build 100216-3543bfc9f958)
VM: Java HotSpot(TM) Server VM, 17.0-b01, Java(TM) SE Runtime Environment, 1.7.0-ea-b72
OS: Windows XP

User Comments:
tboudreau: Copy SaveAction from Actions in "this layer in context" in a suite module w/ core-ui not included.

rrantz: I was trying to copy the Projects Folder from context layer to my layer.
I am working on netbeans platform branding plugin. I'm using it on a maven project




Stacktrace: 
java.lang.UnsupportedOperationException: XXX: org.openide.actions.SaveAction@266914
   at org.netbeans.modules.apisupport.project.layers.WritableXMLFileSystem.writeAttribute(WritableXMLFileSystem.java:890)
   at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:354)
   at org.openide.filesystems.MultiFileObject.setAttribute(MultiFileObject.java:895)
   at org.openide.filesystems.MultiFileObject.setAttribute(MultiFileObject.java:895)
   at org.openide.filesystems.MultiFileObject.setAttribute(MultiFileObject.java:865)
   at org.openide.filesystems.FileUtil.copyAttributes(FileUtil.java:1070)
Comment 1 _ tboudreau 2010-02-19 08:29:25 UTC
Created attachment 94339 [details]
stacktrace
Comment 2 Jesse Glick 2010-02-19 08:40:34 UTC
(In reply to comment #0)
> tboudreau: Copy SaveAction from Actions in "this layer in context"

Well don't do that then. Performing complex edits using <this layer in context> is not supported in the general case, and whether it throws exceptions or not it is unlikely to result in usable layer registrations; treat TLIC as read-only and use the XML text editor.

In this case it would be possible to do something like

} else if (v instanceof SharedClassObject) {
  attr.addAttribute("newvalue", v.getClass().getName());

to avoid an exception, but the declaration of org-openide-actions-SaveAction.instance would still be corrupt; you need to copy it textually from core.ui/src/org/netbeans/core/ui/resources/layer.xml if you need it in another module.

I think Standa is planning to rewrite all this code soon anyway.
Comment 3 Exceptions Reporter 2011-02-22 06:40:54 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=159481
Comment 4 Jesse Glick 2011-05-09 15:56:52 UTC

*** This bug has been marked as a duplicate of bug 196608 ***