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 252849 - Examining <this layer in context> corrupts layer file
Summary: Examining <this layer in context> corrupts layer file
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-06 16:55 UTC by err
Modified: 2015-07-17 01:18 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 err 2015-06-06 16:55:25 UTC
In a platform application, in a module with an empty layer.xml file,
these steps create a broken link.

NOTE: also fails in 8.0.2

1 - In project window, navigate to
    module > ImportantFiles > XMLLayer > ThisLayerInContext > MenuBar > File
2 - Bring up context menu over "New Project..." node and select properties
3 - Click "..." button on "Original Name", the text property editor comes up
4 - Click "Cancel" button

Observe:
The "New Project..." node is shown as modified with a broken link
See below for changes made in the project files


Product Version: NetBeans IDE Dev (Build 201505280001)


In the code-base-name directory, metawb.ui/src/org/metawb/ui in my case, there
is a new file and the layer.xml file is modified. Following shows the changes
made.

$ hg st .
M layer.xml
? org-netbeans-modules-project-ui-NewProject.shadow

$ cat org-netbeans-modules-project-ui-NewProject.shadow
nbfs://nbhost/org.netbeans.modules.apisupport.project.layers.LayerNode%241BadgingMergedFileSystem.3743aa9d/Actions/Project/org-netbeans-modules-project-ui-NewProject.instance

$ hg diff .
diff --git a/metawb.ui/src/org/metawb/ui/layer.xml b/metawb.ui/src/org/metawb/ui/layer.xml
--- a/metawb.ui/src/org/metawb/ui/layer.xml
+++ b/metawb.ui/src/org/metawb/ui/layer.xml
@@ -1,3 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
-<filesystem/>
+<filesystem>
+    <folder name="Menu">
+        <folder name="File">
+            <file name="org-netbeans-modules-project-ui-NewProject.shadow" url="org-netbeans-modules-project-ui-NewProject.shadow"/>
+        </folder>
+    </folder>
+</filesystem>
Comment 1 Ondrej Vrabec 2015-07-15 14:01:48 UTC
Fix: http://hg.netbeans.org/core-main/rev/4f2b79f36a07
Comment 2 Quality Engineering 2015-07-17 01:18:03 UTC
Integrated into 'main-silver', will be available in build *201507170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4f2b79f36a07
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #252849 - Examining <this layer in context> corrupts layer file
Rename original file only if the name is different.