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.

View | Details | Raw Unified | Return to bug 168874
Collapse All | Expand All

(-)a/apisupport.project/manifest.mf (-1 lines)
Lines 4-10 Link Here
4
OpenIDE-Module-Requires: 
4
OpenIDE-Module-Requires: 
5
  javax.script.ScriptEngine.freemarker,
5
  javax.script.ScriptEngine.freemarker,
6
  org.netbeans.api.javahelp.Help
6
  org.netbeans.api.javahelp.Help
7
OpenIDE-Module-Install: org/netbeans/modules/apisupport/project/Install.class
8
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/resources/layer.xml
9
OpenIDE-Module-Implementation-Version: 7
8
OpenIDE-Module-Implementation-Version: 7
10
AutoUpdate-Show-In-Client: false
9
AutoUpdate-Show-In-Client: false
(-)a/apisupport.project/src/org/netbeans/modules/apisupport/project/Install.java (-21 lines)
Lines 57-82 Link Here
57
 */
57
 */
58
public final class Install extends ModuleInstall {
58
public final class Install extends ModuleInstall {
59
59
60
    public @Override void restored() {
61
        final File install = NbPlatform.defaultPlatformLocation();
62
        if (install != null) {
63
            ProjectManager.mutex().writeAccess(new Mutex.Action<Void>() {
64
                public Void run() {
65
                    EditableProperties p = PropertyUtils.getGlobalProperties();
66
                    String installS = install.getAbsolutePath();
67
                    p.setProperty("nbplatform.default.netbeans.dest.dir", installS); // NOI18N
68
                    if (!p.containsKey("nbplatform.default.harness.dir")) { // NOI18N
69
                        p.setProperty("nbplatform.default.harness.dir", "${nbplatform.default.netbeans.dest.dir}/harness"); // NOI18N
70
                    }
71
                    try {
72
                        PropertyUtils.putGlobalProperties(p);
73
                    } catch (IOException e) {
74
                        Util.err.notify(ErrorManager.INFORMATIONAL, e);
75
                    }
76
                    return null;
77
                }
78
            });
79
        }
80
    }
81
    
60
    
82
}
61
}
(-)a/apisupport.project/src/org/netbeans/modules/apisupport/project/universe/NbPlatform.java (+24 lines)
Lines 119-124 Link Here
119
    public static final int HARNESS_VERSION_65 = 6;
119
    public static final int HARNESS_VERSION_65 = 6;
120
    /** Harness version found in 6.7. */
120
    /** Harness version found in 6.7. */
121
    public static final int HARNESS_VERSION_67 = 7;
121
    public static final int HARNESS_VERSION_67 = 7;
122
123
    static {
124
        System.err.println("INIT!!!!");
125
        final File install = NbPlatform.defaultPlatformLocation();
126
        if (install != null) {
127
            ProjectManager.mutex().writeAccess(new Mutex.Action<Void>() {
128
129
                public Void run() {
130
                    EditableProperties p = PropertyUtils.getGlobalProperties();
131
                    String installS = install.getAbsolutePath();
132
                    p.setProperty("nbplatform.default.netbeans.dest.dir", installS); // NOI18N
133
                    if (!p.containsKey("nbplatform.default.harness.dir")) { // NOI18N
134
                        p.setProperty("nbplatform.default.harness.dir", "${nbplatform.default.netbeans.dest.dir}/harness"); // NOI18N
135
                    }
136
                    try {
137
                        PropertyUtils.putGlobalProperties(p);
138
                    } catch (IOException e) {
139
                        Util.err.notify(ErrorManager.INFORMATIONAL, e);
140
                    }
141
                    return null;
142
                }
143
            });
144
        }
145
    }
122
    
146
    
123
    /**
147
    /**
124
     * Reset cached info so unit tests can start from scratch.
148
     * Reset cached info so unit tests can start from scratch.

Return to bug 168874