merge release71
authorJesse Glick <jglick@netbeans.org>
Thu, 17 Nov 2011 12:47:14 -0500
branchrelease71
changeset 1768339650843255f
parent 17678 2d82d84aff76
parent 17682 0af003af0b90
merge
     1.1 --- a/autoproject.core/nbproject/project.xml	Thu Nov 17 08:02:15 2011 +0100
     1.2 +++ b/autoproject.core/nbproject/project.xml	Thu Nov 17 12:47:14 2011 -0500
     1.3 @@ -73,6 +73,14 @@
     1.4                      </run-dependency>
     1.5                  </dependency>
     1.6                  <dependency>
     1.7 +                    <code-name-base>org.openide.modules</code-name-base>
     1.8 +                    <build-prerequisite/>
     1.9 +                    <compile-dependency/>
    1.10 +                    <run-dependency>
    1.11 +                        <specification-version>7.26</specification-version>
    1.12 +                    </run-dependency>
    1.13 +                </dependency>
    1.14 +                <dependency>
    1.15                      <code-name-base>org.openide.nodes</code-name-base>
    1.16                      <build-prerequisite/>
    1.17                      <compile-dependency/>
     2.1 --- a/autoproject.core/src/org/netbeans/modules/autoproject/spi/Cache.java	Thu Nov 17 08:02:15 2011 +0100
     2.2 +++ b/autoproject.core/src/org/netbeans/modules/autoproject/spi/Cache.java	Thu Nov 17 12:47:14 2011 -0500
     2.3 @@ -51,6 +51,7 @@
     2.4  import java.util.TreeMap;
     2.5  import java.util.logging.Level;
     2.6  import java.util.logging.Logger;
     2.7 +import org.openide.modules.Places;
     2.8  import org.openide.util.EditableProperties;
     2.9  import org.openide.util.Exceptions;
    2.10  import org.openide.util.Parameters;
    2.11 @@ -73,16 +74,16 @@
    2.12  
    2.13      private static final File CACHE;
    2.14      static {
    2.15 -        String userdir = System.getProperty("netbeans.user");
    2.16 -        if (userdir != null) {
    2.17 -            File compatibilityLocation = new File(userdir, "var/cache/autoprojects.properties");
    2.18 -            if (compatibilityLocation.isFile()) {
    2.19 -                CACHE = compatibilityLocation;
    2.20 +        File compatibilityLocation = Places.getCacheSubfile("autoprojects.properties");
    2.21 +        if (compatibilityLocation.isFile()) {
    2.22 +            CACHE = compatibilityLocation;
    2.23 +        } else {
    2.24 +            File userdir = Places.getUserDirectory();
    2.25 +            if (userdir != null) {
    2.26 +                CACHE = new File(userdir, "var/autoprojects.properties");
    2.27              } else {
    2.28 -                CACHE = new File(userdir, "var/autoprojects.properties");
    2.29 +                CACHE = null;
    2.30              }
    2.31 -        } else {
    2.32 -            CACHE = null;
    2.33          }
    2.34      }
    2.35