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 72654 - "Safely Delete" on an action throws FileNotFoundException
Summary: "Safely Delete" on an action throws FileNotFoundException
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-14 14:16 UTC by Max Sauer
Modified: 2006-03-28 09:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception stack trace (1.18 KB, text/plain)
2006-02-14 15:54 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2006-02-14 14:16:00 UTC
Delete action does not remove appropriate entries from layer.xml, so I decided
to try "Safely delete" from refactoring submenu. No changes were made to
layer.xml anyway, file has been deleted and following exception has been thrown:

java.io.FileNotFoundException:
Actions/Build/org-yourorghere-module11-SomeAction.instance
	at
org.netbeans.modules.apisupport.project.layers.WritableXMLFileSystem.delete(WritableXMLFileSystem.java:431)
	at
org.openide.filesystems.AbstractFileObject.handleDelete(AbstractFileObject.java:550)
	at org.openide.filesystems.AbstractFolder.delete(AbstractFolder.java:926)
(whole stack trace attached)

Steps to reproduce:
-------------------
1) Create a NBM project
2) Add an action (ie. from context menu of a source package)
3) Try to invoke "Refactor | Safely delete" from <you_action_name>.java 's
context menu
--> Exception

[NB 5.0 fcs (200601251500), JDK 1.6.0rc - b69, solaris 10/sparc]
Comment 1 Max Sauer 2006-02-14 15:54:54 UTC
Created attachment 28880 [details]
exception stack trace
Comment 2 Jesse Glick 2006-02-14 22:29:37 UTC
In fact it deletes the layer entries it should (minus ordering attrs in Menu/**
which should probably be removed too), but seems to be trying to delete the same
file twice, perhaps?
Comment 3 Milos Kleint 2006-02-15 13:03:17 UTC
fixed. in trunk and in update 1 branch.
Comment 4 Max Sauer 2006-03-28 09:24:38 UTC
Marking as verified. 
However, there are two other issues: 
 - Ordering entries are not deleted (issue 72788)
 - Rafactor|Undo does not regenerate deleted entries inside layer.xml (issue 74069)



---------
NetBeans IDE Dev (Build 200603270859)
1.6.0-beta2; Java HotSpot(TM) Client VM 1.6.0-beta2-b76
SunOS version 5.10 running on sparc
en (nb); ISO646-US