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 105337 - Add Open layer files action to pop up menu of nodes under <this layer in context> node in module projects.
Summary: Add Open layer files action to pop up menu of nodes under <this layer in cont...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2007-06-01 00:17 UTC by _ sandipchitale
Modified: 2007-08-25 18:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch implementing the Open layer files action on nodes under Import Files/<this layer in context> (9.93 KB, text/plain)
2007-06-01 00:19 UTC, _ sandipchitale
Details
Patch with suggested changes (13.51 KB, patch)
2007-06-01 15:35 UTC, _ sandipchitale
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ sandipchitale 2007-06-01 00:17:40 UTC
The nodes under the Important Files/<this layer in context> nodes in a module 
project's logical view show the synthesized view of how the module project's 
layer file fits in the overall/effective context of the visible module layer 
files. The nodes that are shown come from different module's layer files. It 
is sometimes desirable to view exactly which layer file (or layer files) 
declare those nodes. That is what the Open layer files action does. Please 
note that the layer files may come from:

1. other module projects in the same suite or
2. other so-called NetBeans.org module projects if this module project lives 
in the NetBeans workspace or
3. the selected NetBeans platform.

Once the layer files are opened in an editor the user may even be able to open 
the module project that owns the layer file (using Select in Project 
(Ctrl+Shift+1) action). This will work when the layer files come from the 
module projects in the same suite or from the surrounding modules projects in 
a checked out NetBeans source workspace (case 1 and 2 above).
Comment 1 _ sandipchitale 2007-06-01 00:19:03 UTC
Created attachment 43061 [details]
Patch implementing the Open layer files action on nodes under Import Files/<this layer in context>
Comment 2 Jesse Glick 2007-06-01 01:33:00 UTC
Action label should probably be "Open Layer File".

apisupport/www/60-ui.html probably needs a patch.

Some extraneous casts in OpenLayerFilesAction.java. Go to your IDE's options and
turn on all the compiler warnings (except for missing SVUID which no one cares
about).
Comment 3 _ sandipchitale 2007-06-01 01:45:52 UTC
I called it Open layer files because it does open multiple layer files if if a 
particular path of fileobject behind the node comes from multiple layer files. 
For example if you invoke the action on node Loaders/text all layer files that 
have that declaration are opened.
Comment 4 Jesse Glick 2007-06-01 15:13:00 UTC
Hmm, would be better to change the name when invoked on folders (easier if not
using SystemAction), or at least use "Open Layer File(s)". Anyway part of my
point is that all (major) words in action labels must be capitalized.
Comment 5 _ sandipchitale 2007-06-01 15:35:10 UTC
Created attachment 43114 [details]
Patch with suggested changes
Comment 6 _ sandipchitale 2007-06-01 15:35:45 UTC
I see. Attaching the patch with suggested changes:

1. Removed unneccessary casts.
2. Updated apisupport/www/60-ui.html
3. Changed the name of the action to 

Open Layer File(s)

Thanks for reminding about the convetion: 

"all (major) words in action labels must be capitalized"

This patch also has commented code which offers to open the yet-unopened 
projects that own the layer files (when applicable).
Comment 7 Jesse Glick 2007-06-01 15:47:29 UTC
I don't see any issues.
Comment 8 _ sandipchitale 2007-06-02 00:41:10 UTC
Implemented:

Checking in Bundle.properties;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/layers/Bund
le.properties,v  <--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
Checking in LayerNode.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/layers/Laye
rNode.java,v  <--  LayerNode.java
new revision: 1.22; previous revision: 1.21
done
RCS 
file: /cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/layer
s/OpenLayerFilesAction.java,v
done
Checking in OpenLayerFilesAction.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/layers/Open
LayerFilesAction.java,v  <--  OpenLayerFilesAction.java
initial revision: 1.1
done

In C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\www: "C:\Program 
Files\TortoiseCVS\cvs.exe" -q -z6 commit -m "Implement issue # 105337 - Add 
Open layer files action to pop up menu of nodes under <this layer in context> 
node in module projects." 60-ui.html
CVSROOT=:pserver:sandipchitale@cvs.netbeans.org:/cvs

Checking in 60-ui.html;
/cvs/apisupport/www/60-ui.html,v  <--  60-ui.html
new revision: 1.4; previous revision: 1.3
done
Comment 9 pzajac 2007-06-05 10:44:12 UTC
I also don't see any problem. It works with standalone, suite and nb.org modules. 
I marked it fixed.
Comment 10 _ sandipchitale 2007-08-25 18:21:52 UTC
Additinal enhancement to issue 105337.

Enhanced, XPATH like search for nodes in the layer file i.e. succesively
search every level of the file path.

Checking in src/org/netbeans/modules/apisupport/project/layers/OpenLayerFilesAction.java;
/cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/layers/OpenLayerFilesAction.java,v  <-- 
OpenLayerFilesAction.java
new revision: 1.5; previous revision: 1.4
done