Fixed python.project2 dependencies. python
authorJulio C. Rocha <juniel_katarn@netbeans.org>
Tue, 24 Feb 2015 03:39:00 -0800
branchpython
changeset 18223c8c1bae3b5ca
parent 18222 a8bb07049012
child 18224 795cdf1f01a0
Fixed python.project2 dependencies.
python.project2/build.xml
python.project2/nbproject/project.xml
python.project2/src/org/netbeans/modules/python/project2/ui/PackageRootNode.java
python.project2/src/org/netbeans/modules/python/project2/ui/PackageViewChildren.java
     1.1 --- a/python.project2/build.xml	Tue Feb 24 02:04:07 2015 -0800
     1.2 +++ b/python.project2/build.xml	Tue Feb 24 03:39:00 2015 -0800
     1.3 @@ -2,7 +2,7 @@
     1.4  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
     1.5  <!-- for some information on what you could do (e.g. targets to override). -->
     1.6  <!-- If you delete this file and reopen the project it will be recreated. -->
     1.7 -<project name="contrib/python.project" default="netbeans" basedir=".">
     1.8 +<project name="contrib/python.project2" default="netbeans" basedir=".">
     1.9      <description>Builds, tests, and runs the project org.netbeans.modules.python.project.</description>
    1.10      <import file="../../nbbuild/templates/projectized.xml"/>
    1.11  </project>
     2.1 --- a/python.project2/nbproject/project.xml	Tue Feb 24 02:04:07 2015 -0800
     2.2 +++ b/python.project2/nbproject/project.xml	Tue Feb 24 03:39:00 2015 -0800
     2.3 @@ -33,6 +33,22 @@
     2.4                      </run-dependency>
     2.5                  </dependency>
     2.6                  <dependency>
     2.7 +                    <code-name-base>org.netbeans.api.progress.nb</code-name-base>
     2.8 +                    <build-prerequisite/>
     2.9 +                    <compile-dependency/>
    2.10 +                    <run-dependency>
    2.11 +                        <specification-version>1.44</specification-version>
    2.12 +                    </run-dependency>
    2.13 +                </dependency>
    2.14 +                <dependency>
    2.15 +                    <code-name-base>org.netbeans.api.templates</code-name-base>
    2.16 +                    <build-prerequisite/>
    2.17 +                    <compile-dependency/>
    2.18 +                    <run-dependency>
    2.19 +                        <specification-version>1.2</specification-version>
    2.20 +                    </run-dependency>
    2.21 +                </dependency>
    2.22 +                <dependency>
    2.23                      <code-name-base>org.netbeans.modules.projectapi</code-name-base>
    2.24                      <build-prerequisite/>
    2.25                      <compile-dependency/>
    2.26 @@ -51,6 +67,15 @@
    2.27                      </run-dependency>
    2.28                  </dependency>
    2.29                  <dependency>
    2.30 +                    <code-name-base>org.netbeans.modules.projectuiapi.base</code-name-base>
    2.31 +                    <build-prerequisite/>
    2.32 +                    <compile-dependency/>
    2.33 +                    <run-dependency>
    2.34 +                        <release-version>1</release-version>
    2.35 +                        <specification-version>1.79</specification-version>
    2.36 +                    </run-dependency>
    2.37 +                </dependency>
    2.38 +                <dependency>
    2.39                      <code-name-base>org.netbeans.modules.python.core</code-name-base>
    2.40                      <build-prerequisite/>
    2.41                      <compile-dependency/>
    2.42 @@ -116,6 +141,14 @@
    2.43                      </run-dependency>
    2.44                  </dependency>
    2.45                  <dependency>
    2.46 +                    <code-name-base>org.openide.filesystems.nb</code-name-base>
    2.47 +                    <build-prerequisite/>
    2.48 +                    <compile-dependency/>
    2.49 +                    <run-dependency>
    2.50 +                        <specification-version>9.2</specification-version>
    2.51 +                    </run-dependency>
    2.52 +                </dependency>
    2.53 +                <dependency>
    2.54                      <code-name-base>org.openide.loaders</code-name-base>
    2.55                      <build-prerequisite/>
    2.56                      <compile-dependency/>
    2.57 @@ -148,6 +181,14 @@
    2.58                      </run-dependency>
    2.59                  </dependency>
    2.60                  <dependency>
    2.61 +                    <code-name-base>org.openide.util.ui</code-name-base>
    2.62 +                    <build-prerequisite/>
    2.63 +                    <compile-dependency/>
    2.64 +                    <run-dependency>
    2.65 +                        <specification-version>9.3</specification-version>
    2.66 +                    </run-dependency>
    2.67 +                </dependency>
    2.68 +                <dependency>
    2.69                      <code-name-base>org.openide.windows</code-name-base>
    2.70                      <build-prerequisite/>
    2.71                      <compile-dependency/>
     3.1 --- a/python.project2/src/org/netbeans/modules/python/project2/ui/PackageRootNode.java	Tue Feb 24 02:04:07 2015 -0800
     3.2 +++ b/python.project2/src/org/netbeans/modules/python/project2/ui/PackageRootNode.java	Tue Feb 24 03:39:00 2015 -0800
     3.3 @@ -70,6 +70,7 @@
     3.4  import org.openide.filesystems.FileStatusListener;
     3.5  import org.openide.filesystems.FileSystem;
     3.6  import org.openide.filesystems.FileUtil;
     3.7 +import org.openide.filesystems.StatusDecorator;
     3.8  import org.openide.loaders.DataFolder;
     3.9  import org.openide.loaders.DataObject;
    3.10  import org.openide.nodes.AbstractNode;
    3.11 @@ -156,7 +157,7 @@
    3.12          String s = super.getDisplayName ();
    3.13  
    3.14          try {            
    3.15 -            s = file.getFileSystem ().getStatus ().annotateName (s, files);
    3.16 +            s = file.getFileSystem ().getDecorator ().annotateName (s, files);
    3.17          } catch (FileStateInvalidException e) {
    3.18              ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
    3.19          }
    3.20 @@ -166,17 +167,14 @@
    3.21  
    3.22      public @Override String getHtmlDisplayName() {
    3.23           try {
    3.24 -             FileSystem.Status stat = file.getFileSystem().getStatus();
    3.25 -             if (stat instanceof FileSystem.HtmlStatus) {
    3.26 -                 FileSystem.HtmlStatus hstat = (FileSystem.HtmlStatus) stat;
    3.27 +             StatusDecorator stat = file.getFileSystem().getDecorator();
    3.28  
    3.29 -                 String result = hstat.annotateNameHtml (
    3.30 -                     super.getDisplayName(), files);
    3.31 +             String result = stat.annotateNameHtml (
    3.32 +                super.getDisplayName(), files);
    3.33  
    3.34 -                 //Make sure the super string was really modified
    3.35 -                 if (!super.getDisplayName().equals(result)) {
    3.36 -                     return result;
    3.37 -                 }
    3.38 +             //Make sure the super string was really modified
    3.39 +             if (result != null && !super.getDisplayName().equals(result)) {
    3.40 +                 return result;
    3.41               }
    3.42           } catch (FileStateInvalidException e) {
    3.43               ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
     4.1 --- a/python.project2/src/org/netbeans/modules/python/project2/ui/PackageViewChildren.java	Tue Feb 24 02:04:07 2015 -0800
     4.2 +++ b/python.project2/src/org/netbeans/modules/python/project2/ui/PackageViewChildren.java	Tue Feb 24 03:39:00 2015 -0800
     4.3 @@ -86,7 +86,9 @@
     4.4  import org.openide.filesystems.FileRenameEvent;
     4.5  import org.openide.filesystems.FileStateInvalidException;
     4.6  import org.openide.filesystems.FileSystem;
     4.7 +import org.openide.filesystems.FileUIUtils;
     4.8  import org.openide.filesystems.FileUtil;
     4.9 +import org.openide.filesystems.StatusDecorator;
    4.10  import org.openide.loaders.ChangeableDataFilter;
    4.11  import org.openide.loaders.DataFilter;
    4.12  import org.openide.loaders.DataFolder;
    4.13 @@ -945,9 +947,10 @@
    4.14              try {
    4.15                  FileObject fo = dataFolder.getPrimaryFile();
    4.16                  Set<FileObject> set = new NonRecursiveFolderSet(fo);
    4.17 -                FileSystem.Status status = fo.getFileSystem().getStatus();
    4.18 -                if (status instanceof FileSystem.HtmlStatus) {
    4.19 -                    name = ((FileSystem.HtmlStatus) status).annotateNameHtml(name, set);
    4.20 +                StatusDecorator status = fo.getFileSystem().getDecorator();
    4.21 +                String htmlName = status.annotateNameHtml(name, set);
    4.22 +                if (htmlName != null) {
    4.23 +                    name = htmlName;
    4.24                  } else {
    4.25                      // #89138: return null if the name starts with '<' and status is not HtmlStatus
    4.26                      if (name.startsWith("<")) {
    4.27 @@ -991,7 +994,7 @@
    4.28              try {
    4.29                  FileObject fo = dataFolder.getPrimaryFile();
    4.30                  Set<FileObject> set = new NonRecursiveFolderSet(fo);
    4.31 -                img = fo.getFileSystem ().getStatus ().annotateIcon (img, type, set);
    4.32 +                img = FileUIUtils.getImageDecorator(fo.getFileSystem ()).annotateIcon (img, type, set);
    4.33              } catch (FileStateInvalidException e) {
    4.34                  // no fs, do nothing
    4.35              }
    4.36 @@ -1006,7 +1009,7 @@
    4.37              try {
    4.38                  FileObject fo = dataFolder.getPrimaryFile();
    4.39                  Set<FileObject> set = new NonRecursiveFolderSet(fo);
    4.40 -                img = fo.getFileSystem ().getStatus ().annotateIcon (img, type, set);
    4.41 +                img = FileUIUtils.getImageDecorator(fo.getFileSystem ()).annotateIcon (img, type, set);
    4.42              } catch (FileStateInvalidException e) {
    4.43                  // no fs, do nothing
    4.44              }