# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: project/src/org/netbeans/modules/apisupport/project/layers/Bundle.properties
*** C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\Bundle.properties Base (1.5)
--- C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\Bundle.properties Locally Modified (Based On 1.5)
***************
*** 38,40 ****
--- 38,44 ----
# PickIconAction
LBL_pick_icon=Pick Icon...
+
+ # OpenLayerFilesAction
+ LBL_open_layer_files_action=Open Layer File(s)
+ #MSG_open_layer_projects=Open Layer File(s) Project(s)
Index: project/src/org/netbeans/modules/apisupport/project/layers/LayerNode.java
*** C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\LayerNode.java Base (1.21)
--- C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\LayerNode.java Locally Modified (Based On 1.21)
***************
*** 245,250 ****
--- 245,251 ----
return new SystemAction[] {
SystemAction.get(PickNameAction.class),
SystemAction.get(PickIconAction.class),
+ SystemAction.get(OpenLayerFilesAction.class),
};
}
}
Index: www/60-ui.html
*** C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\www\60-ui.html Base (1.3)
--- C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\www\60-ui.html Locally Modified (Based On 1.3)
***************
*** 1728,1733 ****
--- 1728,1738 ----
may result in branding overrides (e.g. *_hidden
files if nonlocal files or folders are
Deleted). Files or folders contributed by this module’s layer are boldfaced. Localize
Name… and Pick Icon… are available only for the locally contributed files and folders.
+ Open layer files lets you open the layer file that declares the node. Note: It should be noted that
+ multiple layer files may declare the DataObject (FileObject) behind the node. For example the Actions
+ folder. If the opened layer file is owned by a visible module project such as a module project in this module's suite
+ or other netbeans.org modules in the official clusters in case this module is a netbeans.org module, you will
+ be able to open the project by using Select in > Projects action in the layer file editor's context menu.
<exported services> displays content of src/META-INF/services folder. Lists all types of exported
Index: project/src/org/netbeans/modules/apisupport/project/layers/OpenLayerFilesAction.java
*** C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\OpenLayerFilesAction.java No Base Revision
--- C:\work\sun\visualweb\cvsworkspaces\visualweb\apisupport\project\src\org\netbeans\modules\apisupport\project\layers\OpenLayerFilesAction.java Locally New
***************
*** 1,0 ****
--- 1,204 ----
+ /*
+ * The contents of this file are subject to the terms of the Common Development
+ * and Distribution License (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+ * or http://www.netbeans.org/cddl.txt.
+ *
+ * When distributing Covered Code, include this CDDL Header Notice in each file
+ * and include the License file at http://www.netbeans.org/cddl.txt.
+ * If applicable, add the following below the CDDL Header, with the fields
+ * enclosed by brackets [] replaced by your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original
+ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ */
+
+ package org.netbeans.modules.apisupport.project.layers;
+
+ import java.awt.Toolkit;
+ import java.lang.reflect.InvocationTargetException;
+ import java.lang.reflect.Method;
+ import java.net.URL;
+ //import java.util.Arrays;
+ //import java.util.HashSet;
+ //import java.util.Set;
+ //import org.netbeans.api.project.FileOwnerQuery;
+ //import org.netbeans.api.project.Project;
+ //import org.netbeans.api.project.ProjectUtils;
+ //import org.netbeans.api.project.ui.OpenProjects;
+ //import org.openide.DialogDisplayer;
+ //import org.openide.DialogDisplayer;
+ //import org.openide.NotifyDescriptor;
+ import org.openide.cookies.EditCookie;
+ import org.openide.filesystems.FileObject;
+ import org.openide.filesystems.FileStateInvalidException;
+ import org.openide.filesystems.FileSystem;
+ import org.openide.filesystems.MultiFileSystem;
+ import org.openide.filesystems.MultiFileSystem;
+ import org.openide.filesystems.URLMapper;
+ import org.openide.filesystems.XMLFileSystem;
+ import org.openide.loaders.DataObject;
+ import org.openide.loaders.DataObjectNotFoundException;
+ import org.openide.nodes.Node;
+ import org.openide.util.Exceptions;
+ import org.openide.util.HelpCtx;
+ import org.openide.util.NbBundle;
+ import org.openide.util.actions.CookieAction;
+ import org.xml.sax.SAXException;
+
+ /**
+ * Open the layer file(s) declaring the SFS node.
+ *
+ * @author Sandip Chitale
+ */
+ public class OpenLayerFilesAction extends CookieAction {
+
+ // HACK Tunnel through the MultiFileSystem to get to the delegates
+ private static Method getDelegatesMethod;
+ static {
+ try {
+ getDelegatesMethod = MultiFileSystem.class.getDeclaredMethod("getDelegates");
+ getDelegatesMethod.setAccessible(true);
+ } catch (NoSuchMethodException ex) {
+ Exceptions.printStackTrace(ex);
+ } catch (SecurityException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+
+ protected void performAction(Node[] activatedNodes) {
+ if (getDelegatesMethod == null) {
+ Toolkit.getDefaultToolkit().beep();
+ return;
+ }
+ try {
+ // Set