1.1 --- a/whichproject/manifest.mf Thu Jul 21 12:22:20 2011 -0400
1.2 +++ b/whichproject/manifest.mf Thu Jul 21 12:56:58 2011 -0400
1.3 @@ -1,6 +1,5 @@
1.4 Manifest-version: 1.0
1.5 OpenIDE-Module: org.netbeans.modules.whichproject/1
1.6 -OpenIDE-Module-Specification-Version: 1.4
1.7 +OpenIDE-Module-Specification-Version: 1.5
1.8 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/whichproject/resources/Bundle.properties
1.9 -OpenIDE-Module-Layer: org/netbeans/modules/whichproject/resources/layer.xml
1.10
2.1 --- a/whichproject/nbproject/project.properties Thu Jul 21 12:22:20 2011 -0400
2.2 +++ b/whichproject/nbproject/project.properties Thu Jul 21 12:56:58 2011 -0400
2.3 @@ -37,5 +37,7 @@
2.4 # Version 2 license, then the option applies only if the new code is
2.5 # made subject to such option by the copyright holder.
2.6
2.7 +javac.compilerargs=-Xlint -Xlint:-serial -Xlint -Xlint:-serial
2.8 +javac.source=1.6
2.9 nbm.homepage=http://contrib.netbeans.org/
2.10 nbm.module.author=Tim Boudreau
3.1 --- a/whichproject/nbproject/project.xml Thu Jul 21 12:22:20 2011 -0400
3.2 +++ b/whichproject/nbproject/project.xml Thu Jul 21 12:56:58 2011 -0400
3.3 @@ -47,11 +47,42 @@
3.4 <code-name-base>org.netbeans.modules.whichproject</code-name-base>
3.5 <module-dependencies>
3.6 <dependency>
3.7 + <code-name-base>org.netbeans.modules.projectapi</code-name-base>
3.8 + <build-prerequisite/>
3.9 + <compile-dependency/>
3.10 + <run-dependency>
3.11 + <release-version>1</release-version>
3.12 + <specification-version>1.3</specification-version>
3.13 + </run-dependency>
3.14 + </dependency>
3.15 + <dependency>
3.16 + <code-name-base>org.openide.awt</code-name-base>
3.17 + <build-prerequisite/>
3.18 + <compile-dependency/>
3.19 + <run-dependency>
3.20 + <specification-version>7.37</specification-version>
3.21 + </run-dependency>
3.22 + </dependency>
3.23 + <dependency>
3.24 <code-name-base>org.openide.filesystems</code-name-base>
3.25 <build-prerequisite/>
3.26 <compile-dependency/>
3.27 <run-dependency>
3.28 - <specification-version>6.2</specification-version>
3.29 + <specification-version>6.2</specification-version>
3.30 + </run-dependency>
3.31 + </dependency>
3.32 + <dependency>
3.33 + <code-name-base>org.openide.loaders</code-name-base>
3.34 + <build-prerequisite/>
3.35 + <compile-dependency/>
3.36 + <run-dependency/>
3.37 + </dependency>
3.38 + <dependency>
3.39 + <code-name-base>org.openide.nodes</code-name-base>
3.40 + <build-prerequisite/>
3.41 + <compile-dependency/>
3.42 + <run-dependency>
3.43 + <specification-version>7.23</specification-version>
3.44 </run-dependency>
3.45 </dependency>
3.46 <dependency>
3.47 @@ -71,14 +102,6 @@
3.48 </run-dependency>
3.49 </dependency>
3.50 <dependency>
3.51 - <code-name-base>org.openide.nodes</code-name-base>
3.52 - <build-prerequisite/>
3.53 - <compile-dependency/>
3.54 - <run-dependency>
3.55 - <specification-version>7.23</specification-version>
3.56 - </run-dependency>
3.57 - </dependency>
3.58 - <dependency>
3.59 <code-name-base>org.openide.windows</code-name-base>
3.60 <build-prerequisite/>
3.61 <compile-dependency/>
3.62 @@ -86,22 +109,7 @@
3.63 <specification-version>6.2</specification-version>
3.64 </run-dependency>
3.65 </dependency>
3.66 - <dependency>
3.67 - <code-name-base>org.openide.loaders</code-name-base>
3.68 - <build-prerequisite/>
3.69 - <compile-dependency/>
3.70 - <run-dependency/>
3.71 - </dependency>
3.72 - <dependency>
3.73 - <code-name-base>org.netbeans.modules.projectapi</code-name-base>
3.74 - <build-prerequisite/>
3.75 - <compile-dependency/>
3.76 - <run-dependency>
3.77 - <release-version>1</release-version>
3.78 - <specification-version>1.3</specification-version>
3.79 - </run-dependency>
3.80 - </dependency>
3.81 - </module-dependencies>
3.82 + </module-dependencies>
3.83 <public-packages/>
3.84 </data>
3.85 </configuration>
4.1 --- a/whichproject/src/org/netbeans/modules/whichproject/CloseUnrelatedAction.java Thu Jul 21 12:22:20 2011 -0400
4.2 +++ b/whichproject/src/org/netbeans/modules/whichproject/CloseUnrelatedAction.java Thu Jul 21 12:56:58 2011 -0400
4.3 @@ -40,6 +40,10 @@
4.4 */
4.5 package org.netbeans.modules.whichproject;
4.6
4.7 +import org.openide.awt.ActionID;
4.8 +import org.openide.awt.ActionReference;
4.9 +import org.openide.awt.ActionReferences;
4.10 +import org.openide.awt.ActionRegistration;
4.11 import org.openide.util.NbBundle;
4.12 import org.openide.windows.TopComponent;
4.13
4.14 @@ -49,6 +53,11 @@
4.15 *
4.16 *@author Tim Boudreau
4.17 */
4.18 +@ActionID(id = "org.netbeans.modules.whichproject.CloseUnrelatedAction", category = "Project")
4.19 +@ActionRegistration(displayName = "#LBL_CloseAction")
4.20 +@ActionReferences(value = {
4.21 + @ActionReference(path = "Shortcuts", name = "CA-P"),
4.22 + @ActionReference(path = "Menu/File", name = "CloseUnrelatedAction", position = 1828, separatorAfter=1830)})
4.23 public class CloseUnrelatedAction extends WhichProjectAction {
4.24 protected boolean processTc (TopComponent tc, boolean val) {
4.25 if (!val) {
5.1 --- a/whichproject/src/org/netbeans/modules/whichproject/WhichProjectAction.java Thu Jul 21 12:22:20 2011 -0400
5.2 +++ b/whichproject/src/org/netbeans/modules/whichproject/WhichProjectAction.java Thu Jul 21 12:56:58 2011 -0400
5.3 @@ -44,6 +44,9 @@
5.4 import java.awt.Toolkit;
5.5 import org.netbeans.api.project.FileOwnerQuery;
5.6 import org.netbeans.api.project.Project;
5.7 +import org.openide.awt.ActionID;
5.8 +import org.openide.awt.ActionReference;
5.9 +import org.openide.awt.ActionRegistration;
5.10 import org.openide.filesystems.FileObject;
5.11 import org.openide.loaders.DataObject;
5.12 import org.openide.nodes.Node;
5.13 @@ -60,6 +63,9 @@
5.14 *
5.15 * @author Tim Boudreau
5.16 */
5.17 +@ActionID(id = "org.netbeans.modules.whichproject.WhichProjectAction", category = "Project")
5.18 +@ActionRegistration(displayName = "#LBL_Action")
5.19 +@ActionReference(path = "Shortcuts", name = "OS-P")
5.20 public class WhichProjectAction extends CallableSystemAction {
5.21
5.22 public void performAction () {
5.23 @@ -109,7 +115,7 @@
5.24 }
5.25 DataObject obj = null;
5.26 for (int i=0; i < nodes.length; i++) {
5.27 - obj = (DataObject) nodes[i].getCookie(DataObject.class);
5.28 + obj = nodes[i].getCookie(DataObject.class);
5.29 if (obj != null) {
5.30 FileObject file = obj.getPrimaryFile();
5.31 if (obj != null) {
6.1 --- a/whichproject/src/org/netbeans/modules/whichproject/resources/layer.xml Thu Jul 21 12:22:20 2011 -0400
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,71 +0,0 @@
6.4 -<?xml version="1.0" encoding="UTF-8"?>
6.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
6.6 -<!--
6.7 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6.8 -
6.9 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6.10 -
6.11 -
6.12 -The contents of this file are subject to the terms of either the GNU
6.13 -General Public License Version 2 only ("GPL") or the Common
6.14 -Development and Distribution License("CDDL") (collectively, the
6.15 -"License"). You may not use this file except in compliance with the
6.16 -License. You can obtain a copy of the License at
6.17 -http://www.netbeans.org/cddl-gplv2.html
6.18 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
6.19 -specific language governing permissions and limitations under the
6.20 -License. When distributing the software, include this License Header
6.21 -Notice in each file and include the License file at
6.22 -nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
6.23 -particular file as subject to the "Classpath" exception as provided
6.24 -by Sun in the GPL Version 2 section of the License file that
6.25 -accompanied this code. If applicable, add the following below the
6.26 -License Header, with the fields enclosed by brackets [] replaced by
6.27 -your own identifying information:
6.28 -"Portions Copyrighted [year] [name of copyright owner]"
6.29 -
6.30 -Contributor(s):
6.31 -
6.32 -The Original Software is NetBeans. The Initial Developer of the Original
6.33 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
6.34 -Microsystems, Inc. All Rights Reserved.
6.35 -
6.36 -If you wish your version of this file to be governed by only the CDDL
6.37 -or only the GPL Version 2, indicate your decision by adding
6.38 -"[Contributor] elects to include this software in this distribution
6.39 -under the [CDDL or GPL Version 2] license." If you do not indicate a
6.40 -single choice of license, a recipient has the option to distribute
6.41 -your version of this file under either the CDDL, the GPL Version 2 or
6.42 -to extend the choice of license to its licensees as provided above.
6.43 -However, if you add GPL Version 2 code and therefore, elected the GPL
6.44 -Version 2 license, then the option applies only if the new code is
6.45 -made subject to such option by the copyright holder.
6.46 --->
6.47 -<filesystem>
6.48 - <folder name="Actions">
6.49 - <folder name="Project">
6.50 - <file name="org-netbeans-modules-whichproject-WhichProjectAction.instance"/>
6.51 - <file name="org-netbeans-modules-whichproject-CloseUnrelatedAction.instance"/>
6.52 - </folder>
6.53 - </folder>
6.54 - <folder name="Menu">
6.55 - <folder name="File">
6.56 - <file name="CloseUnrelatedAction.shadow">
6.57 - <attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-whichproject-CloseUnrelatedAction.instance"/>
6.58 - <attr name="position" intvalue="1828"/>
6.59 - </file>
6.60 - <file name="SeparatorUnrelated.instance">
6.61 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
6.62 - <attr name="position" intvalue="1830"/>
6.63 - </file>
6.64 - </folder>
6.65 - </folder>
6.66 - <folder name="Shortcuts">
6.67 - <file name="OS-P.shadow">
6.68 - <attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-whichproject-WhichProjectAction.instance"/>
6.69 - </file>
6.70 - <file name="CA-P.shadow">
6.71 - <attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-whichproject-CloseUnrelatedAction.instance"/>
6.72 - </file>
6.73 - </folder>
6.74 -</filesystem>