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 19443
Collapse All | Expand All

(-)ant/build.xml (-3 / +2 lines)
Lines 34-42 Link Here
34
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
34
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
35
      <classpath>
35
      <classpath>
36
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
36
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
37
        <fileset dir="../openide/netbeans/lib">
37
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
38
          <include name="openide*.jar" />
38
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
39
        </fileset>
40
        <fileset dir="external">
39
        <fileset dir="external">
41
          <include name="ant-1.*.jar"/>
40
          <include name="ant-1.*.jar"/>
42
        </fileset>
41
        </fileset>
(-)ant/manifest.mf (-3 / +4 lines)
Lines 1-12 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.apache.tools.ant.module/2
2
OpenIDE-Module: org.apache.tools.ant.module/2
3
OpenIDE-Module-Localizing-Bundle: org/apache/tools/ant/module/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/apache/tools/ant/module/Bundle.properties
4
OpenIDE-Module-Specification-Version: 2.11
4
OpenIDE-Module-Specification-Version: 2.12
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Install: org/apache/tools/ant/module/AntModule.class
6
OpenIDE-Module-Install: org/apache/tools/ant/module/AntModule.class
7
OpenIDE-Module-Layer: org/apache/tools/ant/module/resources/AntModuleLayer.xml
7
OpenIDE-Module-Layer: org/apache/tools/ant/module/resources/AntModuleLayer.xml
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0, org.openide.deprecated > 1.0
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
10
OpenIDE-Module-Requires: org.openide.TopManager
10
OpenIDE-Module-Package-Dependencies: [org.apache.tools.ant.Location], [org.apache.xerces.parsers.DOMParser], [org.apache.xml.serialize.EncodingInfo]
11
OpenIDE-Module-Package-Dependencies: [org.apache.tools.ant.Location], [org.apache.xerces.parsers.DOMParser], [org.apache.xml.serialize.EncodingInfo]
11
Class-Path: ext/ant-1.4.1.jar ext/ant-optional-1.4.1.jar
12
Class-Path: ext/ant-1.4.1.jar ext/ant-optional-1.4.1.jar
12
13
(-)apisupport/apisupport-lite.mf (-3 / +3 lines)
Lines 3-11 Link Here
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/lite/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/lite/Bundle.properties
4
OpenIDE-Module-Specification-Version: 0.4
4
OpenIDE-Module-Specification-Version: 0.4
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.16
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.jarpackager/2 > 1.7.1, org.netbeans.modules.utilities/1, org.netbeans.core/1 > 1.1
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.jarpackager/2 > 1.7.1, org.netbeans.modules.utilities/1, org.netbeans.core/1 > 1.1, org.openide.deprecated > 1.0, org.openide.src > 1.0
8
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help
8
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help, org.openide.TopManager
9
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/lite/resources/layer.xml
9
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/lite/resources/layer.xml
10
Class-Path: docs/apisupport-lite.jar
10
Class-Path: docs/apisupport-lite.jar
11
11
(-)apisupport/build.xml (-3 / +3 lines)
Lines 30-38 Link Here
30
        <pathelement location="../java/api/netbeans/modules/autoload/java-api.jar"/>
30
        <pathelement location="../java/api/netbeans/modules/autoload/java-api.jar"/>
31
        <pathelement location="../jarpackager/netbeans/modules/jarpackager.jar"/>
31
        <pathelement location="../jarpackager/netbeans/modules/jarpackager.jar"/>
32
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
32
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
33
        <fileset dir="../openide/netbeans/lib">
33
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
34
          <include name="openide*.jar" />
34
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
35
        </fileset>
35
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
36
        <fileset dir="../core/external">
36
        <fileset dir="../core/external">
37
          <include name="xml-apis*.jar"/>
37
          <include name="xml-apis*.jar"/>
38
          <include name="xerces*.jar"/>
38
          <include name="xerces*.jar"/>
(-)apisupport/manifest.mf (-3 / +4 lines)
Lines 2-11 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/apisupport/APIModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/apisupport/APIModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/resources/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 2.16
5
OpenIDE-Module-Specification-Version: 2.17
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.apisupport.lite/1 > 0.1, org.netbeans.modules.jarpackager/2 > 1.8, org.netbeans.modules.javahelp/1 > 1.0, org.netbeans.api.java/1 > 1.1
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.apisupport.lite/1 > 0.1, org.netbeans.modules.jarpackager/2 > 1.8, org.netbeans.modules.javahelp/1 > 1.0, org.netbeans.api.java/1 > 1.1, org.openide.deprecated > 1.0, org.openide.src > 1.0
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.7
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Requires: org.openide.TopManager
9
OpenIDE-Module-Package-Dependencies: [org.apache.xml.serialize.EncodingInfo]
10
OpenIDE-Module-Package-Dependencies: [org.apache.xml.serialize.EncodingInfo]
10
Class-Path: docs/apisupport-manual.zip
11
Class-Path: docs/apisupport-manual.zip
11
12
(-)apisupport/lite/build.xml (-3 / +3 lines)
Lines 28-36 Link Here
28
    <javac srcdir="../src" destdir="../src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
    <javac srcdir="../src" destdir="../src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
29
      <classpath>
29
      <classpath>
30
	<pathelement location="../../openide/openide-13javac-workaround.jar"/>
30
	<pathelement location="../../openide/openide-13javac-workaround.jar"/>
31
        <fileset dir="../../openide/netbeans/lib">
31
        <pathelement location="../../openide/netbeans/lib/openide.jar"/>
32
          <include name="openide*.jar" />
32
        <pathelement location="../../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
33
        </fileset>
33
        <pathelement location="../../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
34
        <pathelement location="../../jarpackager/netbeans/modules/jarpackager.jar"/>
34
        <pathelement location="../../jarpackager/netbeans/modules/jarpackager.jar"/>
35
        <!-- Included by jarpackager, Jikes seems to want it: -->
35
        <!-- Included by jarpackager, Jikes seems to want it: -->
36
        <pathelement location="../../openidex/netbeans/modules/autoload/openidex.jar"/>
36
        <pathelement location="../../openidex/netbeans/modules/autoload/openidex.jar"/>
(-)applet/build.xml (-3 / +3 lines)
Lines 27-35 Link Here
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
      <classpath>
28
      <classpath>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
        <fileset dir="../openide/netbeans/lib">
30
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
          <include name="openide*.jar" />
31
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
        </fileset>
32
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
33
	<pathelement location="../debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
33
	<pathelement location="../debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
34
	<!--<pathelement location="../html/netbeans/modules/html.jar"/> -->
34
	<!--<pathelement location="../html/netbeans/modules/html.jar"/> -->
35
      </classpath>
35
      </classpath>
(-)applet/manifest.mf (-3 / +4 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.applet/1
1
OpenIDE-Module: org.netbeans.modules.applet/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/applet/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/applet/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/applet/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/applet/layer.xml
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.1
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.jpda/1
5
OpenIDE-Module-Requires: org.openide.TopManager
6
OpenIDE-Module-Specification-Version: 1.9
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.core/3, org.netbeans.modules.debugger.jpda/1, org.openide.deprecated > 1.0, org.openide.src > 1.0
7
OpenIDE-Module-Specification-Version: 1.10
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
9
(-)autoupdate/build.xml (-6 / +4 lines)
Lines 38-46 Link Here
38
      <classpath>
38
      <classpath>
39
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
39
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
40
        <pathelement location="libsrc"/>
40
        <pathelement location="libsrc"/>
41
        <fileset dir="../openide/netbeans/lib">
41
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
42
          <include name="openide*.jar" />
42
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
43
        </fileset>
44
        <path refid="xml-apis-cp"/>
43
        <path refid="xml-apis-cp"/>
45
      </classpath>
44
      </classpath>
46
    </javac>
45
    </javac>
Lines 49-57 Link Here
49
      <include name="org/netbeans/modules/autoupdate/AutoModuleNewType.java"/>
48
      <include name="org/netbeans/modules/autoupdate/AutoModuleNewType.java"/>
50
      <classpath>
49
      <classpath>
51
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
50
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
52
        <fileset dir="../openide/netbeans/lib">
51
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
53
          <include name="openide*.jar" />
52
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
54
        </fileset>
55
	<pathelement location="../core/netbeans/lib/core.jar"/>
53
	<pathelement location="../core/netbeans/lib/core.jar"/>
56
        <path refid="xml-apis-cp"/>
54
        <path refid="xml-apis-cp"/>
57
      </classpath>
55
      </classpath>
(-)autoupdate/manifest.mf (-3 / +4 lines)
Lines 2-11 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/autoupdate/AutoUpdateModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/autoupdate/AutoUpdateModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/autoupdate/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/autoupdate/resources/mf-layer.xml
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Requires: org.openide.TopManager
6
X-COMMENT: Because of ModuleNode.ModuleNewType...
7
X-COMMENT: Because of ModuleNode.ModuleNewType...
7
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0
8
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0, org.openide.deprecated > 1.0
8
OpenIDE-Module-Specification-Version: 2.3
9
OpenIDE-Module-Specification-Version: 2.4
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
10
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
10
Class-Path: ../lib/updater.jar
11
Class-Path: ../lib/updater.jar
11
12
(-)beans/build.xml (-3 / +3 lines)
Lines 26-34 Link Here
26
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
26
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
      <classpath>
27
      <classpath>
28
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
28
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
29
        <fileset dir="../openide/netbeans/lib">
29
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
30
          <include name="openide*.jar" />
30
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
31
        </fileset>
31
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
32
	<pathelement location="../java/netbeans/modules/java.jar"/>
32
	<pathelement location="../java/netbeans/modules/java.jar"/>
33
	<pathelement location="{java.home}/lib/tools.jar"/>
33
	<pathelement location="{java.home}/lib/tools.jar"/>
34
      </classpath>
34
      </classpath>
(-)beans/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.beans/1
1
OpenIDE-Module: org.netbeans.modules.beans/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/beans/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/beans/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/beans/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/beans/resources/mf-layer.xml
4
OpenIDE-Module-Specification-Version: 1.9
4
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.7
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.12
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.7, org.openide.deprecated > 1.0, org.openide.src > 1.0
8
9
9
Name: org/netbeans/modules/beans/AddPropertyAction.class
10
Name: org/netbeans/modules/beans/AddPropertyAction.class
10
OpenIDE-Module-Class: Action
11
OpenIDE-Module-Class: Action
(-)clazz/build.xml (-3 / +3 lines)
Lines 27-35 Link Here
27
      <classpath>
27
      <classpath>
28
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
28
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
29
	<pathelement location="../classfile/netbeans/modules/autoload/classfile.jar"/>
29
	<pathelement location="../classfile/netbeans/modules/autoload/classfile.jar"/>
30
        <fileset dir="../openide/netbeans/lib">
30
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
          <include name="openide*.jar" />
31
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
        </fileset>
32
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
33
      </classpath>
33
      </classpath>
34
    </javac>
34
    </javac>
35
  </target>
35
  </target>
(-)clazz/manifest.mf (-3 / +3 lines)
Lines 2-11 Link Here
2
OpenIDE-Module-Install: org/netbeans/modules/clazz/ClassModule.class
2
OpenIDE-Module-Install: org/netbeans/modules/clazz/ClassModule.class
3
OpenIDE-Module-Layer: org/netbeans/modules/clazz/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/clazz/resources/mf-layer.xml
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/clazz/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/clazz/Bundle.properties
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.12
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Specification-Version: 1.10
7
OpenIDE-Module-Specification-Version: 1.11
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.classfile/1
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.classfile/1, org.openide.deprecated > 1.0, org.openide.src > 1.0
9
OpenIDE-Module: org.netbeans.modules.clazz/1
9
OpenIDE-Module: org.netbeans.modules.clazz/1
10
10
11
Name: org/netbeans/modules/clazz/ClassDataLoader.class
11
Name: org/netbeans/modules/clazz/ClassDataLoader.class
(-)core/manifest.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
OpenIDE-Module: org.netbeans.core/1
1
OpenIDE-Module: org.netbeans.core/1
2
OpenIDE-Module-Specification-Version: 1.6
2
OpenIDE-Module-Specification-Version: 1.7
3
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
3
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.21
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.21
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties
(-)core/compiler/build.xml (-1 / +1 lines)
Lines 31-37 Link Here
31
                <fileset dir="../../openide/netbeans/lib">
31
                <fileset dir="../../openide/netbeans/lib">
32
                    <include name="openide*.jar" />
32
                    <include name="openide*.jar" />
33
                </fileset>
33
                </fileset>
34
                <pathelement location="../src"/>
34
                <pathelement location="../netbeans/lib/core.jar"/>
35
            </classpath>
35
            </classpath>
36
        </javac>
36
        </javac>
37
    </target>
37
    </target>
(-)core/compiler/manifest.mf (-2 / +2 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.core.compiler/1
1
OpenIDE-Module: org.netbeans.core.compiler/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/compiler/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/compiler/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.2
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.ui/1 > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.ui/1 > 1.0
7
OpenIDE-Module-Layer: org/netbeans/core/compiler/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/core/compiler/resources/layer.xml
8
8
(-)core/compiler/src/org/netbeans/core/actions/StopCompileAction.java (-5 / +2 lines)
Lines 13-23 Link Here
13
13
14
package org.netbeans.core.actions;
14
package org.netbeans.core.actions;
15
15
16
import org.openide.TopManager;
17
import org.openide.util.HelpCtx;
16
import org.openide.util.HelpCtx;
18
import org.openide.util.NbBundle;
17
import org.openide.util.NbBundle;
19
import org.openide.util.actions.CallableSystemAction;
18
import org.openide.util.actions.CallableSystemAction;
20
import org.netbeans.core.compiler.CompilationEngineImpl;
19
import org.netbeans.core.compiler.CompilationEngineImpl;
20
import org.openide.compiler.CompilationEngine;
21
21
22
/** the action causes the compilation to stop
22
/** the action causes the compilation to stop
23
* @author Ales Novak
23
* @author Ales Novak
Lines 55-64 Link Here
55
55
56
    /** Convenience method - returns compilation engine */
56
    /** Convenience method - returns compilation engine */
57
    static CompilationEngineImpl getEngine () {
57
    static CompilationEngineImpl getEngine () {
58
        if (engine == null)
58
        return (CompilationEngineImpl)CompilationEngine.getDefault();
59
            engine = (CompilationEngineImpl)TopManager.getDefault().
60
                     getCompilationEngine();
61
        return engine;
62
    }
59
    }
63
60
64
}
61
}
(-)core/compiler/src/org/netbeans/core/compiler/CompilationEngineImpl.java (-6 / +2 lines)
Lines 25-31 Link Here
25
import java.io.FileFilter;
25
import java.io.FileFilter;
26
import java.lang.ref.SoftReference;
26
import java.lang.ref.SoftReference;
27
27
28
import org.openide.TopManager;
29
import org.openide.ErrorManager;
28
import org.openide.ErrorManager;
30
import org.openide.compiler.DependencyException;
29
import org.openide.compiler.DependencyException;
31
import org.openide.compiler.CompilationEngine;
30
import org.openide.compiler.CompilationEngine;
Lines 85-95 Link Here
85
                queue.notify();
84
                queue.notify();
86
            }
85
            }
87
        }
86
        }
88
        if (TopManager.getDefault() instanceof NbTopManager) {
87
        if (NbTopManager.get().compileSync) {
89
            NbTopManager ntm = (NbTopManager)TopManager.getDefault();
88
            task.waitFinished();
90
            if (ntm.compileSync) {
91
                task.waitFinished();
92
            }
93
        }
89
        }
94
        return task;
90
        return task;
95
    }
91
    }
(-)core/compiler/src/org/netbeans/core/compiler/CompilerDisplayer.java (-3 / +4 lines)
Lines 29-35 Link Here
29
import org.openide.text.Annotation;
29
import org.openide.text.Annotation;
30
import org.openide.text.Annotatable;
30
import org.openide.text.Annotatable;
31
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
32
import org.openide.TopManager;
33
import org.openide.compiler.*;
32
import org.openide.compiler.*;
34
import org.openide.cookies.LineCookie;
33
import org.openide.cookies.LineCookie;
35
import org.openide.filesystems.FileObject;
34
import org.openide.filesystems.FileObject;
Lines 41-46 Link Here
41
40
42
import org.netbeans.core.output.OutputTabTerm;
41
import org.netbeans.core.output.OutputTabTerm;
43
import org.netbeans.core.output.OutputSettings;
42
import org.netbeans.core.output.OutputSettings;
43
import org.openide.awt.StatusDisplayer;
44
import org.openide.windows.IOProvider;
44
45
45
/** This class is responsible for displaying the messages
46
/** This class is responsible for displaying the messages
46
* as a reactions to the state changes and errors produced by
47
* as a reactions to the state changes and errors produced by
Lines 285-291 Link Here
285
286
286
    private void setOw (String name) {
287
    private void setOw (String name) {
287
        if (ow != null) return;
288
        if (ow != null) return;
288
        compilerIO = TopManager.getDefault().getIO(name);
289
        compilerIO = IOProvider.getDefault().getIO(name, true);
289
        compilerIO.setFocusTaken (false);
290
        compilerIO.setFocusTaken (false);
290
        ow = compilerIO.getOut();
291
        ow = compilerIO.getOut();
291
    }
292
    }
Lines 318-324 Link Here
318
            return;
319
            return;
319
        }
320
        }
320
        
321
        
321
        TopManager.getDefault().setStatusText(oneLine(statusText));
322
        StatusDisplayer.getDefault().setStatusText(oneLine(statusText));
322
        statusText = null;
323
        statusText = null;
323
        lastTime = System.currentTimeMillis();
324
        lastTime = System.currentTimeMillis();
324
    }
325
    }
(-)core/execution/manifest.mf (-1 / +1 lines)
Lines 2-8 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/execution/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/execution/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.ui/1 > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.ui/1 > 1.0
7
OpenIDE-Module-Layer: org/netbeans/core/execution/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/core/execution/resources/layer.xml
8
8
(-)core/ide/manifest.mf (-2 / +2 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.core.ide/1
1
OpenIDE-Module: org.netbeans.core.ide/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/ide/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/ide/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.2
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.compiler/1 > 1.0, org.netbeans.core.execution/1 > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.compiler/1 > 1.0, org.netbeans.core.execution/1 > 1.0
7
OpenIDE-Module-Layer: org/netbeans/core/ide/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/core/ide/resources/layer.xml
8
8
(-)core/ide/src/org/netbeans/core/ide/resources/layer.xml (-9 / +1 lines)
Lines 37-47 Link Here
37
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle"/>
37
        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle"/>
38
    </folder>
38
    </folder>
39
        
39
        
40
    <folder name="Services"> <!-- PENDING - move to Java module -->
40
    <folder name="Services">
41
        <file name="org-openide-src-nodes-SourceOptions.settings" url="SourceOptions.settings">
42
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle" />
43
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:org/openide/resources/src/sourceOptions.gif" />
44
        </file>
45
        <folder name="ScriptType">
41
        <folder name="ScriptType">
46
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/scriptTypes.gif" />
42
            <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/core/resources/scriptTypes.gif" />
47
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle"/>
43
            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle"/>
Lines 78-87 Link Here
78
74
79
                <folder name="LookAndFeel"> 
75
                <folder name="LookAndFeel"> 
80
                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle" />
76
                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.core.Bundle" />
81
82
                    <file name="org-openide-src-nodes-SourceOptions.shadow">
83
                        <attr name="originalFile" stringvalue="Services/org-openide-src-nodes-SourceOptions.settings"/>
84
                    </file>
85
                </folder>
77
                </folder>
86
                
78
                
87
                <folder name="ServerAndExternalToolSettings">
79
                <folder name="ServerAndExternalToolSettings">
(-)core/ide/src/org/netbeans/core/upgrade/PreUpgradePanel.java (-2 / +2 lines)
Lines 25-33 Link Here
25
import java.util.ArrayList;
25
import java.util.ArrayList;
26
import org.openide.WizardDescriptor;
26
import org.openide.WizardDescriptor;
27
import org.openide.util.HelpCtx;
27
import org.openide.util.HelpCtx;
28
import org.openide.TopManager;
29
import org.openide.DialogDescriptor;
28
import org.openide.DialogDescriptor;
30
import java.awt.Dialog;
29
import java.awt.Dialog;
30
import org.openide.DialogDisplayer;
31
31
32
/**
32
/**
33
 *
33
 *
Lines 42-48 Link Here
42
            new PreUpgradePanel(),
42
            new PreUpgradePanel(),
43
            bundle.getString("LBL_UpgradePanel_Name")
43
            bundle.getString("LBL_UpgradePanel_Name")
44
        );
44
        );
45
        Dialog dialog = TopManager.getDefault().createDialog(descriptor);
45
        Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);
46
        dialog.show();
46
        dialog.show();
47
        dialog.dispose();
47
        dialog.dispose();
48
    }
48
    }
(-)core/ide/src/org/netbeans/core/upgrade/TransferSettingsPanel.java (-2 / +2 lines)
Lines 32-39 Link Here
32
import javax.swing.SwingUtilities;
32
import javax.swing.SwingUtilities;
33
import java.beans.PropertyChangeListener;
33
import java.beans.PropertyChangeListener;
34
import java.beans.PropertyChangeEvent;
34
import java.beans.PropertyChangeEvent;
35
import org.openide.DialogDisplayer;
35
36
36
import org.openide.TopManager;
37
import org.openide.NotifyDescriptor;
37
import org.openide.NotifyDescriptor;
38
import org.openide.WizardDescriptor;
38
import org.openide.WizardDescriptor;
39
import org.openide.filesystems.LocalFileSystem;
39
import org.openide.filesystems.LocalFileSystem;
Lines 295-301 Link Here
295
295
296
    private void notify(String message, int type) {
296
    private void notify(String message, int type) {
297
        NotifyDescriptor descr = new NotifyDescriptor.Message(message, type);
297
        NotifyDescriptor descr = new NotifyDescriptor.Message(message, type);
298
        TopManager.getDefault().notify(descr);
298
        DialogDisplayer.getDefault().notify(descr);
299
    }
299
    }
300
    
300
    
301
    // Variables declaration - do not modify//GEN-BEGIN:variables
301
    // Variables declaration - do not modify//GEN-BEGIN:variables
(-)core/ide/src/org/netbeans/core/upgrade/UpgradePanel.java (-2 / +3 lines)
Lines 21-26 Link Here
21
import javax.swing.event.*;
21
import javax.swing.event.*;
22
import org.netbeans.core.*;
22
import org.netbeans.core.*;
23
import org.openide.*;
23
import org.openide.*;
24
import org.openide.DialogDisplayer;
24
import org.openide.util.*;
25
import org.openide.util.*;
25
import org.openide.util.NbBundle;
26
import org.openide.util.NbBundle;
26
import org.openide.filesystems.*;
27
import org.openide.filesystems.*;
Lines 38-44 Link Here
38
            new UpgradePanel(),
39
            new UpgradePanel(),
39
            bundle.getString("LBL_UpgradePanel_Name")
40
            bundle.getString("LBL_UpgradePanel_Name")
40
        );
41
        );
41
        Dialog dialog = TopManager.getDefault().createDialog(descriptor);
42
        Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);
42
        dialog.show();
43
        dialog.show();
43
        dialog.dispose();
44
        dialog.dispose();
44
    }
45
    }
Lines 334-340 Link Here
334
335
335
    private void notify(String message, int type) {
336
    private void notify(String message, int type) {
336
        NotifyDescriptor descr = new NotifyDescriptor.Message(message, type);
337
        NotifyDescriptor descr = new NotifyDescriptor.Message(message, type);
337
        TopManager.getDefault().notify(descr);
338
        DialogDisplayer.getDefault().notify(descr);
338
    }
339
    }
339
    
340
    
340
    // Variables declaration - do not modify//GEN-BEGIN:variables
341
    // Variables declaration - do not modify//GEN-BEGIN:variables
(-)core/ide/src/org/netbeans/core/upgrade/UpgradeWizard.java (-3 / +4 lines)
Lines 17-28 Link Here
17
import java.text.MessageFormat;
17
import java.text.MessageFormat;
18
import java.beans.*;
18
import java.beans.*;
19
19
20
import org.openide.TopManager;
21
import org.openide.WizardDescriptor;
20
import org.openide.WizardDescriptor;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.netbeans.core.ui.*;
23
import org.netbeans.core.ui.*;
25
import org.netbeans.core.Splash;
24
import org.netbeans.core.Splash;
25
import org.openide.DialogDisplayer;
26
import org.openide.awt.StatusDisplayer;
26
27
27
/** Upgrade wizard displays only one panel allowing user to upgrade his
28
/** Upgrade wizard displays only one panel allowing user to upgrade his
28
 * settings from previous product version.
29
 * settings from previous product version.
Lines 137-145 Link Here
137
            WizardDescriptor.FINISH_OPTION,
138
            WizardDescriptor.FINISH_OPTION,
138
            WizardDescriptor.CANCEL_OPTION });
139
            WizardDescriptor.CANCEL_OPTION });
139
140
140
        java.awt.Dialog d = TopManager.getDefault().createDialog(wd);
141
        java.awt.Dialog d = DialogDisplayer.getDefault().createDialog(wd);
141
        if (hidden) {
142
        if (hidden) {
142
            TopManager.getDefault().setStatusText(NbBundle.getMessage(UpgradeWizard.class, "MSG_SplashScreen_status"));
143
            StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(UpgradeWizard.class, "MSG_SplashScreen_status"));
143
            
144
            
144
            // kick-off upgrade procedure
145
            // kick-off upgrade procedure
145
            it.hasNext();
146
            it.hasNext();
(-)core/javahelp/build.xml (-4 / +4 lines)
Lines 65-75 Link Here
65
        </copy>
65
        </copy>
66
    </target>
66
    </target>
67
67
68
    <target name="netbeans" depends="jars,release">
68
    <target name="netbeans" depends="jars,release" description="Build everything.">
69
        <genlist targetname="nbm" outputfiledir="../../nbbuild/netbeans"/>
69
        <genlist targetname="nbm" outputfiledir="../../nbbuild/netbeans"/>
70
    </target>
70
    </target>
71
71
72
    <target name="nbm" depends="netbeans">
72
    <target name="nbm" depends="netbeans" description="Build NBM.">
73
        <makenbm file="javahelp-api.nbm"
73
        <makenbm file="javahelp-api.nbm"
74
                 topdir="."
74
                 topdir="."
75
                 module="netbeans/modules/autoload/javahelp-api.jar"
75
                 module="netbeans/modules/autoload/javahelp-api.jar"
Lines 94-104 Link Here
94
            </fileset>
94
            </fileset>
95
        </copy>
95
        </copy>
96
    </target>
96
    </target>
97
    <target name="test" depends="test-build">
97
    <target name="test" depends="test-build" description="Try reloading.">
98
        <nbinstaller module="reload/javahelp-api.jar" action="reinstall"/>
98
        <nbinstaller module="reload/javahelp-api.jar" action="reinstall"/>
99
    </target>
99
    </target>
100
100
101
    <target name="clean">
101
    <target name="clean" description="Clean build products.">
102
        <delete>
102
        <delete>
103
            <fileset dir="src">
103
            <fileset dir="src">
104
                <include name="**/*.class"/>
104
                <include name="**/*.class"/>
(-)core/javahelp/manifest.mf (-2 / +2 lines)
Lines 1-11 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.javahelp/1
2
OpenIDE-Module: org.netbeans.modules.javahelp/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javahelp/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javahelp/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Specification-Version: 1.2
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Provides: org.netbeans.api.javahelp.Help
6
OpenIDE-Module-Provides: org.netbeans.api.javahelp.Help
7
OpenIDE-Module-Public-Packages: org.netbeans.api.javahelp.*, javax.help.**
7
OpenIDE-Module-Public-Packages: org.netbeans.api.javahelp.*, javax.help.**
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Package-Dependencies: javax.help[HelpSet] > 1.0
9
OpenIDE-Module-Package-Dependencies: javax.help[HelpSet] > 1.0
10
OpenIDE-Module-Layer: org/netbeans/modules/javahelp/resources/layer.xml
10
OpenIDE-Module-Layer: org/netbeans/modules/javahelp/resources/layer.xml
11
OpenIDE-Module-Install: org/netbeans/modules/javahelp/Installer.class
11
OpenIDE-Module-Install: org/netbeans/modules/javahelp/Installer.class
(-)core/javahelp/src/org/netbeans/modules/javahelp/HelpAction.java (-3 / +3 lines)
Lines 18-27 Link Here
18
import javax.swing.*;
18
import javax.swing.*;
19
19
20
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
21
import org.openide.TopManager;
22
import org.openide.util.*;
21
import org.openide.util.*;
23
import org.openide.util.actions.SystemAction;
22
import org.openide.util.actions.SystemAction;
24
import org.netbeans.api.javahelp.Help;
23
import org.netbeans.api.javahelp.Help;
24
import org.openide.awt.StatusDisplayer;
25
25
26
/**
26
/**
27
 * Shows help for the currently focused component
27
 * Shows help for the currently focused component
Lines 140-147 Link Here
140
            help = findHelpCtx();
140
            help = findHelpCtx();
141
        }
141
        }
142
        
142
        
143
        TopManager.getDefault().setStatusText(NbBundle.getMessage(HelpAction.class, "CTL_OpeningHelp"));
143
        StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(HelpAction.class, "CTL_OpeningHelp"));
144
        h.showHelp (help);
144
        h.showHelp (help);
145
        TopManager.getDefault ().setStatusText (""); // NOI18N
145
        StatusDisplayer.getDefault ().setStatusText (""); // NOI18N
146
    }
146
    }
147
}
147
}
(-)core/javahelp/src/org/netbeans/modules/javahelp/HelpSetProcessor.java (-2 / +2 lines)
Lines 26-34 Link Here
26
import javax.help.HelpSet;
26
import javax.help.HelpSet;
27
import javax.help.HelpSetException;
27
import javax.help.HelpSetException;
28
28
29
import org.openide.TopManager;
30
import org.openide.cookies.InstanceCookie;
29
import org.openide.cookies.InstanceCookie;
31
import org.openide.loaders.XMLDataObject;
30
import org.openide.loaders.XMLDataObject;
31
import org.openide.util.Lookup;
32
32
33
/** An XML processor for help set references.
33
/** An XML processor for help set references.
34
 * Provides an instance of javax.swing.HelpSet.
34
 * Provides an instance of javax.swing.HelpSet.
Lines 118-124 Link Here
118
                Boolean.valueOf(mergeS).booleanValue();
118
                Boolean.valueOf(mergeS).booleanValue();
119
                // Make sure nbdocs: protocol is ready:
119
                // Make sure nbdocs: protocol is ready:
120
                Object ignore = NbDocsStreamHandler.class;
120
                Object ignore = NbDocsStreamHandler.class;
121
                hs = new HelpSet(TopManager.getDefault().systemClassLoader(), new URL(url));
121
                hs = new HelpSet(((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)), new URL(url));
122
                hs.setKeyData(HELPSET_MERGE_CONTEXT, HELPSET_MERGE_ATTR, merge ? Boolean.TRUE : Boolean.FALSE);
122
                hs.setKeyData(HELPSET_MERGE_CONTEXT, HELPSET_MERGE_ATTR, merge ? Boolean.TRUE : Boolean.FALSE);
123
                BPMChanger.invoke(BPMChanger.INC_VALUE);
123
                BPMChanger.invoke(BPMChanger.INC_VALUE);
124
            } catch (SAXException saxe) {
124
            } catch (SAXException saxe) {
(-)core/javahelp/src/org/netbeans/modules/javahelp/NbDocsStreamHandler.java (-8 / +9 lines)
Lines 22-29 Link Here
22
import java.util.*;
22
import java.util.*;
23
23
24
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
25
import org.openide.TopManager;
26
import org.openide.execution.NbfsStreamHandlerFactory;
25
import org.openide.execution.NbfsStreamHandlerFactory;
26
import org.openide.util.Lookup;
27
import org.openide.util.LookupEvent;
28
import org.openide.util.LookupListener;
27
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
28
30
29
/** Handler & connection cribbed from NbResourceStreamHandler.
31
/** Handler & connection cribbed from NbResourceStreamHandler.
Lines 54-59 Link Here
54
     * used to handle nbdocs: requests
56
     * used to handle nbdocs: requests
55
     */    
57
     */    
56
    private static Reference docsLoader = null; // Reference<ClassLoader>
58
    private static Reference docsLoader = null; // Reference<ClassLoader>
59
    
60
    private static Lookup.Result classLoaderQuery = Lookup.getDefault().lookup(new Lookup.Template(ClassLoader.class));
57
61
58
    /** @return the classloader used to resolve
62
    /** @return the classloader used to resolve
59
     * nbdocs: requests
63
     * nbdocs: requests
Lines 67-80 Link Here
67
            l = null;
71
            l = null;
68
        }
72
        }
69
        if (l == null) {
73
        if (l == null) {
70
            l = new URLClassLoader(getDocsURLs(), TopManager.getDefault().systemClassLoader());
74
            l = new URLClassLoader(getDocsURLs(), (ClassLoader)classLoaderQuery.allInstances().iterator().next());
71
            if (! addedTmSysLoaderListener) {
75
            if (! addedTmSysLoaderListener) {
72
                TopManager.getDefault().addPropertyChangeListener(new PropertyChangeListener() {
76
                classLoaderQuery.addLookupListener(new LookupListener() {
73
                    public void propertyChange(PropertyChangeEvent ev) {
77
                    public void resultChanged(LookupEvent e) {
74
                        // XXX this is not an official property name...
78
                        docsLoader = null;
75
                        if ("systemClassLoader".equals(ev.getPropertyName())) { // NOI18N
76
                            docsLoader = null;
77
                        }
78
                    }
79
                    }
79
                });
80
                });
80
                addedTmSysLoaderListener = true;
81
                addedTmSysLoaderListener = true;
(-)core/settings/build.xml (-3 / +3 lines)
Lines 51-61 Link Here
51
        </locjar>
51
        </locjar>
52
    </target>
52
    </target>
53
53
54
    <target name="netbeans" depends="jars">
54
    <target name="netbeans" depends="jars" description="Build everything.">
55
        <genlist targetname="nbm" outputfiledir="${nb_all}/nbbuild/netbeans"/>
55
        <genlist targetname="nbm" outputfiledir="${nb_all}/nbbuild/netbeans"/>
56
    </target>
56
    </target>
57
57
58
    <target name="nbm" depends="netbeans">
58
    <target name="nbm" depends="netbeans" description="Build NBM.">
59
        <makenbm file="core-settings.nbm"
59
        <makenbm file="core-settings.nbm"
60
                 topdir="."
60
                 topdir="."
61
                 module="netbeans/modules/autoload/core-settings.jar"
61
                 module="netbeans/modules/autoload/core-settings.jar"
Lines 66-72 Link Here
66
        </makenbm>
66
        </makenbm>
67
    </target>
67
    </target>
68
68
69
    <target name="clean">
69
    <target name="clean" description="Clean build products.">
70
      <delete>
70
      <delete>
71
        <fileset dir="src">
71
        <fileset dir="src">
72
          <include name="**/*.class"/>
72
          <include name="**/*.class"/>
(-)core/settings/manifest.mf (-2 / +2 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.settings/1
2
OpenIDE-Module: org.netbeans.modules.settings/1
3
OpenIDE-Module-Specification-Version: 1.2
3
OpenIDE-Module-Specification-Version: 1.3
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.6
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1
5
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1
6
OpenIDE-Module-Layer: org/netbeans/modules/settings/resources/mf-layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/settings/resources/mf-layer.xml
7
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/settings/resources/Bundle.properties
7
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/settings/resources/Bundle.properties
(-)core/settings/src/org/netbeans/modules/settings/InstanceProvider.java (-2 / +1 lines)
Lines 233-240 Link Here
233
            if (name == null) {
233
            if (name == null) {
234
                return instanceCreate().getClass();
234
                return instanceCreate().getClass();
235
            } else {
235
            } else {
236
                return org.openide.TopManager.getDefault().
236
                return ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass(name);
237
                    systemClassLoader().loadClass(name);
238
            }
237
            }
239
        }
238
        }
240
239
(-)core/settings/src/org/netbeans/modules/settings/convertors/XMLPropertiesConvertor.java (-1 / +2 lines)
Lines 26-31 Link Here
26
import org.netbeans.spi.settings.Saver;
26
import org.netbeans.spi.settings.Saver;
27
27
28
import org.netbeans.modules.settings.Env;
28
import org.netbeans.modules.settings.Env;
29
import org.openide.util.Lookup;
29
30
30
/** Implementation of xml properties format described by
31
/** Implementation of xml properties format described by
31
 * /org/netbeans/modules/settings/resources/properties.dtd
32
 * /org/netbeans/modules/settings/resources/properties.dtd
Lines 209-215 Link Here
209
            }
210
            }
210
            instanceClass = (String) name;
211
            instanceClass = (String) name;
211
        }
212
        }
212
        return org.openide.TopManager.getDefault().systemClassLoader().loadClass(instanceClass);
213
        return ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass(instanceClass);
213
    }
214
    }
214
    
215
    
215
    private void readSetting(java.io.Reader input, Object inst) throws IOException {
216
    private void readSetting(java.io.Reader input, Object inst) throws IOException {
(-)core/settings/src/org/netbeans/modules/settings/convertors/XMLSettingsSupport.java (-6 / +2 lines)
Lines 20-30 Link Here
20
import java.util.Set;
20
import java.util.Set;
21
import java.util.Stack;
21
import java.util.Stack;
22
22
23
import org.openide.TopManager;
24
import org.openide.ErrorManager;
23
import org.openide.ErrorManager;
25
import org.openide.filesystems.*;
24
import org.openide.filesystems.*;
26
import org.openide.modules.ModuleInfo;
25
import org.openide.modules.ModuleInfo;
27
import org.openide.modules.SpecificationVersion;
26
import org.openide.modules.SpecificationVersion;
27
import org.openide.util.Lookup;
28
import org.openide.util.SharedClassObject;
28
import org.openide.util.SharedClassObject;
29
29
30
import org.xml.sax.Attributes;
30
import org.xml.sax.Attributes;
Lines 634-644 Link Here
634
        
634
        
635
        /** try to load class from system and current classloader. */
635
        /** try to load class from system and current classloader. */
636
        private Class loadClass(String clazz) throws ClassNotFoundException {
636
        private Class loadClass(String clazz) throws ClassNotFoundException {
637
            try {
637
            return ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass(clazz);
638
                return TopManager.getDefault().systemClassLoader().loadClass(clazz);
639
            } catch (ClassNotFoundException ex) {
640
                return TopManager.getDefault().currentClassLoader().loadClass(clazz);
641
            }
642
        }
638
        }
643
        
639
        
644
        /** get class name of instance */
640
        /** get class name of instance */
(-)core/src/org/netbeans/Main.java (+1 lines)
Lines 68-73 Link Here
68
        Method m = c.getMethod ("main", new Class[] { String[].class }); // NOI18N
68
        Method m = c.getMethod ("main", new Class[] { String[].class }); // NOI18N
69
        
69
        
70
        // Needed e.g. for JAXP to find NbSAXParserFactoryImpl.
70
        // Needed e.g. for JAXP to find NbSAXParserFactoryImpl.
71
        // Also for Lookup.getDefault to find NbTopManager.Lkp.
71
        // Note that ModuleManager.updateContextClassLoaders will later change
72
        // Note that ModuleManager.updateContextClassLoaders will later change
72
        // the loader on this and other threads to be MM.SystemClassLoader anyway.
73
        // the loader on this and other threads to be MM.SystemClassLoader anyway.
73
        Thread.currentThread().setContextClassLoader (loader);
74
        Thread.currentThread().setContextClassLoader (loader);
(-)core/src/org/netbeans/beaninfo/Bundle.properties (-28 lines)
Lines 60-68 Link Here
60
HINT_PEBI_workingDirectory_RW=The working directory to start the process in. If "null", the IDE's directory is used.
60
HINT_PEBI_workingDirectory_RW=The working directory to start the process in. If "null", the IDE's directory is used.
61
HINT_PEBI_workingDirectory_RO=NOTE: you need JDK 1.3 (release version) to use this feature!
61
HINT_PEBI_workingDirectory_RO=NOTE: you need JDK 1.3 (release version) to use this feature!
62
62
63
LAB_DebuggerTypeDefault=Default Debugging
64
HINT_DebuggerTypeDefault=Simple debugging according to the debugger's own preferences.
65
66
LAB_CompilerType=Compiler Types
63
LAB_CompilerType=Compiler Types
67
HINT_CompilerType=All types of compilers registered in the system.
64
HINT_CompilerType=All types of compilers registered in the system.
68
65
Lines 72-80 Link Here
72
LAB_IndentEngineDefault=No Indentation
69
LAB_IndentEngineDefault=No Indentation
73
HINT_IndentEngineDefault=No Indentation
70
HINT_IndentEngineDefault=No Indentation
74
71
75
LAB_DebuggerType=Debugger Types
76
HINT_DebuggerType=All types of debuggers registered in the system.
77
78
LAB_ExecutorType=Execution Types
72
LAB_ExecutorType=Execution Types
79
HINT_ExecutorType=All types of executors registered in the system.
73
HINT_ExecutorType=All types of executors registered in the system.
80
74
Lines 169-193 Link Here
169
HINT_SwingBrowser=Simple HTML Browser based on Swing component
163
HINT_SwingBrowser=Simple HTML Browser based on Swing component
170
PROP_SwingBrowserDescription=Browser Description
164
PROP_SwingBrowserDescription=Browser Description
171
HINT_SwingBrowserDescription=Description of HTML browser
165
HINT_SwingBrowserDescription=Description of HTML browser
172
173
# MemberElementBeanInfo
174
PROP_MEMBER_NAME=Name
175
PROP_MEMBER_JAVADOC=JavaDoc comment
176
PROP_MEMBER_MODIFIERS=Modifiers
177
178
# ClassElementBeanInfo
179
PROP_CLASS_SUPERCLASS=Superclass
180
PROP_CLASS_INTERFACES=Interfaces
181
PROP_CLASS_IS_CLASS=Is class
182
183
# ConstructorElementBeanInfo
184
PROP_METHOD_BODY=Body
185
PROP_METHOD_PARAMETERS=Parameters
186
PROP_METHOD_EXCEPTIONS=Exceptions
187
188
# MethodElementBeanInfo
189
PROP_METHOD_TYPE=Return type
190
191
# FieldElementBeanInfo
192
PROP_FIELD_TYPE=Type
193
PROP_FIELD_INIT_VALUE=Initial value
(-)core/src/org/netbeans/beaninfo/Bundle_ja.properties (-34 lines)
Lines 264-300 Link Here
264
PROP_SwingBrowserDescription=\u30d6\u30e9\u30a6\u30b6\u306e\u8aac\u660e
264
PROP_SwingBrowserDescription=\u30d6\u30e9\u30a6\u30b6\u306e\u8aac\u660e
265
# HINT_SwingBrowserDescription=Description of HTML browser
265
# HINT_SwingBrowserDescription=Description of HTML browser
266
HINT_SwingBrowserDescription=HTML \u30d6\u30e9\u30a6\u30b6\u306e\u8aac\u660e
266
HINT_SwingBrowserDescription=HTML \u30d6\u30e9\u30a6\u30b6\u306e\u8aac\u660e
267
268
# MemberElementBeanInfo
269
# PROP_MEMBER_NAME=Name
270
PROP_MEMBER_NAME=\u540d\u524d
271
# PROP_MEMBER_JAVADOC=JavaDoc comment
272
PROP_MEMBER_JAVADOC=JavaDoc \u30b3\u30e1\u30f3\u30c8
273
# PROP_MEMBER_MODIFIERS=Modifiers
274
PROP_MEMBER_MODIFIERS=\u4fee\u98fe\u5b50
275
276
# ClassElementBeanInfo
277
# PROP_CLASS_SUPERCLASS=Superclass
278
PROP_CLASS_SUPERCLASS=\u30b9\u30fc\u30d1\u30fc\u30af\u30e9\u30b9
279
# PROP_CLASS_INTERFACES=Interfaces
280
PROP_CLASS_INTERFACES=\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9
281
# PROP_CLASS_IS_CLASS=Is class
282
PROP_CLASS_IS_CLASS=\u30af\u30e9\u30b9\u3067\u3042\u308b
283
284
# ConstructorElementBeanInfo
285
# PROP_METHOD_BODY=Body
286
PROP_METHOD_BODY=\u672c\u4f53
287
# PROP_METHOD_PARAMETERS=Parameters
288
PROP_METHOD_PARAMETERS=\u30d1\u30e9\u30e1\u30fc\u30bf
289
# PROP_METHOD_EXCEPTIONS=Exceptions
290
PROP_METHOD_EXCEPTIONS=\u4f8b\u5916
291
292
# MethodElementBeanInfo
293
# PROP_METHOD_TYPE=Return type
294
PROP_METHOD_TYPE=\u623b\u308a\u5024\u306e\u578b
295
296
# FieldElementBeanInfo
297
# PROP_FIELD_TYPE=Type
298
PROP_FIELD_TYPE=\u578b
299
# PROP_FIELD_INIT_VALUE=Initial value
300
PROP_FIELD_INIT_VALUE=\u521d\u671f\u5024
(-)core/src/org/netbeans/beaninfo/ProcessExecutorBeanInfo.java (-18 lines)
Lines 63-69 Link Here
63
            prop[5].setDisplayName (bundle.getString ("PROP_PEBI_environmentVariables"));
63
            prop[5].setDisplayName (bundle.getString ("PROP_PEBI_environmentVariables"));
64
            prop[5].setShortDescription (bundle.getString ("HINT_PEBI_environmentVariables"));
64
            prop[5].setShortDescription (bundle.getString ("HINT_PEBI_environmentVariables"));
65
            prop[5].setExpert (true);
65
            prop[5].setExpert (true);
66
            prop[5].setPropertyEditorClass (EnvVarEd.class);
67
            try {
66
            try {
68
                Runtime.class.getMethod ("exec", new Class[] { String[].class, String[].class, File.class }); // NOI18N
67
                Runtime.class.getMethod ("exec", new Class[] { String[].class, String[].class, File.class }); // NOI18N
69
                prop[6] = new PropertyDescriptor ("workingDirectory", ProcessExecutor.class); // NOI18N
68
                prop[6] = new PropertyDescriptor ("workingDirectory", ProcessExecutor.class); // NOI18N
Lines 107-127 Link Here
107
            return Utilities.loadImage("org/netbeans/core/resources/processExecutor32.gif"); // NOI18N
106
            return Utilities.loadImage("org/netbeans/core/resources/processExecutor32.gif"); // NOI18N
108
    }
107
    }
109
108
110
    public static class EnvVarEd extends StringArrayEditor {
111
112
        public String getAsText () {
113
            if (getValue () == null)
114
                return "null"; // NOI18N
115
            else
116
                return super.getAsText ();
117
        }
118
119
        public void setAsText (String text) {
120
            if ("null".equals (text)) // NOI18N
121
                setValue (null);
122
            else
123
                super.setAsText (text);
124
        }
125
126
    }
127
}
109
}
(-)core/src/org/netbeans/beaninfo/PropertySheetSettingsBeanInfo.java (-1 lines)
Lines 18-24 Link Here
18
import java.beans.*;
18
import java.beans.*;
19
import java.util.ResourceBundle;
19
import java.util.ResourceBundle;
20
20
21
import org.openide.explorer.propertysheet.editors.ChoicePropertyEditor;
22
import org.openide.explorer.propertysheet.*;
21
import org.openide.explorer.propertysheet.*;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.util.Utilities;
23
import org.openide.util.Utilities;
(-)core/src/org/netbeans/beaninfo/editors/Bundle.properties (-4 / +24 lines)
Lines 279-295 Link Here
279
279
280
#ServiceTypeEditor + Debbuger, exec, compiler
280
#ServiceTypeEditor + Debbuger, exec, compiler
281
LAB_DefaultServiceType=Default
281
LAB_DefaultServiceType=Default
282
LAB_ChooseDebugger=Choose and Configure Object's Debugger
283
LAB_ChooseExecutor=Choose and Configure Object's Executor
282
LAB_ChooseExecutor=Choose and Configure Object's Executor
284
LAB_ChooseCompiler=Choose and Configure Object's Compiler
283
LAB_ChooseCompiler=Choose and Configure Object's Compiler
285
LAB_ChooseIndentEngine=Choose and Configure Indentation Engine
284
LAB_ChooseIndentEngine=Choose and Configure Indentation Engine
286
LAB_ChooseServiceType=Choose and Configure Service Type
285
LAB_ChooseServiceType=Choose and Configure Service Type
287
LAB_NoDebugger=(do not debug)
288
LAB_NoCompiler=(do not compile)
286
LAB_NoCompiler=(do not compile)
289
LAB_NoExecutor=(do not execute)
287
LAB_NoExecutor=(do not execute)
290
# {0} - class name
288
# {0} - class name
291
EXC_NoDebugger=The class {0} is not configured to be debugged.\nYou may change this if you wish.
292
# {0} - class name
293
EXC_NoExecutor=The class {0} is not configured to be executed.\nYou may change this if you wish.
289
EXC_NoExecutor=The class {0} is not configured to be executed.\nYou may change this if you wish.
294
# {0} - file name as resource
290
# {0} - file name as resource
295
MSG_NoCompiler=The file {0} is not configured to be compiled. You can change this on its property sheet.
291
MSG_NoCompiler=The file {0} is not configured to be compiled. You can change this on its property sheet.
Lines 407-409 Link Here
407
ACSN_DataObjectPanel=N/A
403
ACSN_DataObjectPanel=N/A
408
ACSD_DataObjectPanel=N/A
404
ACSD_DataObjectPanel=N/A
409
405
406
#StringArrayCustomEditor
407
CTL_Empty=<empty>
408
CTL_Item=Item:
409
CTL_Item_Mnemonic=I
410
ACSD_CTL_Item=N/A
411
CTL_ItemList=Item List
412
CTL_ItemList_Mnemonic=L
413
ACSD_CTL_ItemList=N/A
414
CTL_Add_StringArrayCustomEditor=Add
415
CTL_Add_StringArrayCustomEditor_Mnemonic=A
416
ACSD_CTL_Add_StringArrayCustomEditor=N/A
417
CTL_Change_StringArrayCustomEditor=Edit
418
CTL_Change_StringArrayCustomEditor_Mnemonic=E
419
ACSD_CTL_Change_StringArrayCustomEditor=N/A
420
CTL_Remove=Remove
421
CTL_Remove_Mnemonic=R
422
ACSD_CTL_Remove=N/A
423
CTL_MoveUp=Up
424
CTL_MoveUp_Mnemonic=U
425
ACSD_CTL_MoveUp=N/A
426
CTL_MoveDown=Down
427
CTL_MoveDown_Mnemonic=w
428
ACSD_CTL_MoveDown=N/A
429
ACSD_StringArrayCustomEditor=N/A
(-)core/src/org/netbeans/beaninfo/editors/ClassEditor.java (-1 / +5 lines)
Lines 13-18 Link Here
13
13
14
package org.netbeans.beaninfo.editors;
14
package org.netbeans.beaninfo.editors;
15
15
16
17
import org.openide.util.Lookup;
18
16
/** A property editor for Class.
19
/** A property editor for Class.
17
* @author   Jan Jancura
20
* @author   Jan Jancura
18
*/
21
*/
Lines 57-63 Link Here
57
    */
60
    */
58
    public void setAsText(String text) throws java.lang.IllegalArgumentException {
61
    public void setAsText(String text) throws java.lang.IllegalArgumentException {
59
        try {
62
        try {
60
            setValue (org.openide.TopManager.getDefault ().systemClassLoader ().loadClass (text));
63
            ClassLoader loader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
64
            setValue (loader.loadClass (text));
61
        } catch (ClassNotFoundException e) {
65
        } catch (ClassNotFoundException e) {
62
            // ignore
66
            // ignore
63
        }
67
        }
(-)core/src/org/netbeans/beaninfo/editors/ColorEditor.java (-1 lines)
Lines 46-52 Link Here
46
import javax.swing.UIDefaults;
46
import javax.swing.UIDefaults;
47
import javax.swing.UIManager;
47
import javax.swing.UIManager;
48
48
49
import org.openide.TopManager;
50
import org.openide.ErrorManager;
49
import org.openide.ErrorManager;
51
import org.openide.explorer.propertysheet.editors.XMLPropertyEditor;
50
import org.openide.explorer.propertysheet.editors.XMLPropertyEditor;
52
import org.openide.util.HelpCtx;
51
import org.openide.util.HelpCtx;
(-)core/src/org/netbeans/beaninfo/editors/CompilerTypeEditor.java (-2 / +1 lines)
Lines 20-26 Link Here
20
import java.text.MessageFormat;
20
import java.text.MessageFormat;
21
21
22
import org.openide.compiler.*;
22
import org.openide.compiler.*;
23
import org.openide.TopManager;
24
import org.openide.util.HelpCtx;
23
import org.openide.util.HelpCtx;
25
import org.openide.util.NbBundle;
24
import org.openide.util.NbBundle;
26
import org.openide.loaders.*;
25
import org.openide.loaders.*;
Lines 53-59 Link Here
53
        }
52
        }
54
53
55
        public void prepareJob (CompilerJob ign1, Class ign2, DataObject dob) {
54
        public void prepareJob (CompilerJob ign1, Class ign2, DataObject dob) {
56
            TopManager.getDefault ().setStatusText (MessageFormat.format
55
            org.openide.awt.StatusDisplayer.getDefault ().setStatusText (MessageFormat.format
57
                                                    (NbBundle.getBundle (CompilerTypeEditor.class).getString ("MSG_NoCompiler"),
56
                                                    (NbBundle.getBundle (CompilerTypeEditor.class).getString ("MSG_NoCompiler"),
58
                                                     new Object[] { dob.getPrimaryFile ().getPath() }));
57
                                                     new Object[] { dob.getPrimaryFile ().getPath() }));
59
        }
58
        }
(-)core/src/org/netbeans/beaninfo/editors/DataFolderPanel.java (-5 / +1 lines)
Lines 33-42 Link Here
33
import javax.swing.KeyStroke;
33
import javax.swing.KeyStroke;
34
import javax.swing.SwingUtilities;
34
import javax.swing.SwingUtilities;
35
35
36
import org.openide.TopManager;
37
import org.openide.DialogDescriptor;
36
import org.openide.DialogDescriptor;
38
import org.openide.ErrorManager;
37
import org.openide.ErrorManager;
39
import org.openide.Places;
40
import org.openide.WizardDescriptor;
38
import org.openide.WizardDescriptor;
41
import org.openide.loaders.*;
39
import org.openide.loaders.*;
42
import org.openide.nodes.*;
40
import org.openide.nodes.*;
Lines 143-151 Link Here
143
    /** Creates node that displays all packages.
141
    /** Creates node that displays all packages.
144
    */
142
    */
145
    private Node createPackagesNode () {
143
    private Node createPackagesNode () {
146
        return ((Places)Lookup.getDefault ().lookup( Places.class )).nodes ().repository(
144
        return RepositoryNodeFactory.getDefault().repository(this);
147
                   this
148
               );
149
    }
145
    }
150
146
151
    /** This method is called from within the constructor to
147
    /** This method is called from within the constructor to
(-)core/src/org/netbeans/beaninfo/editors/DataObjectEditor.java (-1 lines)
Lines 15-21 Link Here
15
15
16
import java.beans.*;
16
import java.beans.*;
17
17
18
import org.openide.TopManager;
19
import org.openide.ErrorManager;
18
import org.openide.ErrorManager;
20
import org.openide.util.NbBundle;
19
import org.openide.util.NbBundle;
21
import org.openide.loaders.DataObject;
20
import org.openide.loaders.DataObject;
(-)core/src/org/netbeans/beaninfo/editors/DataObjectPanel.java (-8 / +4 lines)
Lines 104-122 Link Here
104
                            return dataFilter.acceptDataObject(obj);
104
                            return dataFilter.acceptDataObject(obj);
105
                        }
105
                        }
106
                    };
106
                    };
107
                    rootNode = TopManager.getDefault().getPlaces().
107
                    rootNode = RepositoryNodeFactory.getDefault().repository(dFilter);
108
                    nodes().repository(dFilter);
109
                } else {
108
                } else {
110
                    rootNode = TopManager.getDefault().getPlaces().
109
                    rootNode = RepositoryNodeFactory.getDefault().repository(dataFilter);
111
                    nodes().repository(dataFilter);
112
                }
110
                }
113
            } else {
111
            } else {
114
                if (folderFilter != null) {
112
                if (folderFilter != null) {
115
                    rootNode = TopManager.getDefault().getPlaces().
113
                    rootNode = RepositoryNodeFactory.getDefault().repository(folderFilter);
116
                    nodes().repository(folderFilter);
117
                } else {
114
                } else {
118
                    rootNode = TopManager.getDefault().getPlaces().
115
                    rootNode = RepositoryNodeFactory.getDefault().repository(DataFilter.ALL);
119
                    nodes().repository();
120
                }
116
                }
121
            }
117
            }
122
        }
118
        }
(-)core/src/org/netbeans/beaninfo/editors/DimensionCustomEditor.java (-1 lines)
Lines 17-23 Link Here
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
23
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
22
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
(-)core/src/org/netbeans/beaninfo/editors/DimensionEditor.java (-6 / +8 lines)
Lines 16-22 Link Here
16
import java.awt.Dimension;
16
import java.awt.Dimension;
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.TopManager;
20
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
22
21
Lines 45-58 Link Here
45
    */
44
    */
46
    void setValues(int[] val) {
45
    void setValues(int[] val) {
47
        if ((val[0] < 0) || (val[1] < 0)) {
46
        if ((val[0] < 0) || (val[1] < 0)) {
48
            //TopManager.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
47
            //DialogDisplayer.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
49
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
48
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
50
            //to PropertyEditor and setValues() method is called again.
49
            //to PropertyEditor and setValues() method is called again.
51
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
50
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
52
                                                       public void run() {
51
                   public void run() {
53
                                                           TopManager.getDefault().notify(new NotifyDescriptor.Message(bundle.getString("CTL_NegativeSize"), NotifyDescriptor.ERROR_MESSAGE));
52
                       org.openide.DialogDisplayer.getDefault().notify(
54
                                                       }
53
                           new NotifyDescriptor.Message(
55
                                                   });
54
                               bundle.getString("CTL_NegativeSize"),
55
                               NotifyDescriptor.ERROR_MESSAGE));
56
                   }
57
               });
56
        }
58
        }
57
        else
59
        else
58
            setValue(new Dimension(val[0], val[1]));
60
            setValue(new Dimension(val[0], val[1]));
(-)core/src/org/netbeans/beaninfo/editors/ExecutorEditor.java (-1 / +1 lines)
Lines 53-59 Link Here
53
        public ExecutorTask execute (final ExecInfo info) throws IOException {
53
        public ExecutorTask execute (final ExecInfo info) throws IOException {
54
            throw new IOException ("do not execute") { // NOI18N
54
            throw new IOException ("do not execute") { // NOI18N
55
                public String getLocalizedMessage () {
55
                public String getLocalizedMessage () {
56
                    return MessageFormat.format (NbBundle.getBundle (DebuggerTypeEditor.class).getString ("EXC_NoExecutor"),
56
                    return MessageFormat.format (NbBundle.getBundle (ExecutorEditor.class).getString ("EXC_NoExecutor"),
57
                                                 new Object[] { info.getClassName () });
57
                                                 new Object[] { info.getClassName () });
58
                }
58
                }
59
            };
59
            };
(-)core/src/org/netbeans/beaninfo/editors/ExtensionListCustomEditor.java (-1 lines)
Lines 22-28 Link Here
22
22
23
import javax.swing.*;
23
import javax.swing.*;
24
import javax.swing.border.*;
24
import javax.swing.border.*;
25
import org.openide.explorer.propertysheet.editors.StringArrayCustomizable;
26
import org.openide.loaders.ExtensionList;
25
import org.openide.loaders.ExtensionList;
27
26
28
//import org.openide.util.HelpCtx;
27
//import org.openide.util.HelpCtx;
(-)core/src/org/netbeans/beaninfo/editors/ExtensionListEditor.java (-2 / +1 lines)
Lines 21-27 Link Here
21
import org.openide.loaders.ExtensionList;
21
import org.openide.loaders.ExtensionList;
22
import org.openide.util.enum.ArrayEnumeration;
22
import org.openide.util.enum.ArrayEnumeration;
23
import org.openide.util.NbBundle;
23
import org.openide.util.NbBundle;
24
import org.openide.explorer.propertysheet.editors.*;
25
import org.openide.nodes.Node;
24
import org.openide.nodes.Node;
26
25
27
/** Property editor for {@link ExtensionList}s.
26
/** Property editor for {@link ExtensionList}s.
Lines 31-37 Link Here
31
* @author Jaroslav Tulach
30
* @author Jaroslav Tulach
32
* @version 0.11 November 11, 1997
31
* @version 0.11 November 11, 1997
33
*/
32
*/
34
public class ExtensionListEditor extends Object implements PropertyEditor, StringArrayCustomizable,
33
public class ExtensionListEditor extends Object implements PropertyEditor,
35
        ExPropertyEditor {
34
        ExPropertyEditor {
36
    /** value to edit */
35
    /** value to edit */
37
    private ExtensionList value;
36
    private ExtensionList value;
(-)core/src/org/netbeans/beaninfo/editors/FileArrayEditor.java (-1 lines)
Lines 22-28 Link Here
22
import javax.swing.JFileChooser;
22
import javax.swing.JFileChooser;
23
23
24
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
25
import org.openide.TopManager;
26
import org.openide.nodes.Node;
25
import org.openide.nodes.Node;
27
import org.openide.explorer.propertysheet.ExPropertyEditor;
26
import org.openide.explorer.propertysheet.ExPropertyEditor;
28
import org.openide.explorer.propertysheet.PropertyEnv;
27
import org.openide.explorer.propertysheet.PropertyEnv;
(-)core/src/org/netbeans/beaninfo/editors/FileEditor.java (-1 lines)
Lines 30-36 Link Here
30
import javax.swing.KeyStroke;
30
import javax.swing.KeyStroke;
31
31
32
import org.openide.ErrorManager;
32
import org.openide.ErrorManager;
33
import org.openide.TopManager;
34
import org.openide.nodes.Node;
33
import org.openide.nodes.Node;
35
import org.openide.explorer.propertysheet.ExPropertyEditor;
34
import org.openide.explorer.propertysheet.ExPropertyEditor;
36
import org.openide.explorer.propertysheet.PropertyEnv;
35
import org.openide.explorer.propertysheet.PropertyEnv;
(-)core/src/org/netbeans/beaninfo/editors/FileSystemEditor.java (-1 / +3 lines)
Lines 17-27 Link Here
17
import java.awt.*;
17
import java.awt.*;
18
import javax.swing.*;
18
import javax.swing.*;
19
import javax.swing.border.*;
19
import javax.swing.border.*;
20
import org.netbeans.core.NbPlaces;
20
21
21
import org.openide.*;
22
import org.openide.*;
22
import org.openide.nodes.*;
23
import org.openide.nodes.*;
23
import org.openide.cookies.InstanceCookie;
24
import org.openide.cookies.InstanceCookie;
24
import org.openide.filesystems.FileSystem;
25
import org.openide.filesystems.FileSystem;
26
import org.openide.util.Lookup;
25
27
26
/**
28
/**
27
 * Property editor for org.openide.filesystems.FileSystem
29
 * Property editor for org.openide.filesystems.FileSystem
Lines 76-82 Link Here
76
    * @param text  The string to be parsed.
78
    * @param text  The string to be parsed.
77
    */
79
    */
78
    public void setAsText(String text) {
80
    public void setAsText(String text) {
79
        Node settings = TopManager.getDefault().getPlaces ().nodes ().repositorySettings ();
81
        Node settings = NbPlaces.getDefault().repositorySettings();
80
        Node n = settings.getChildren().findChild(text);
82
        Node n = settings.getChildren().findChild(text);
81
        if (n != null) {
83
        if (n != null) {
82
            InstanceCookie ic = (InstanceCookie)n.getCookie(InstanceCookie.class);
84
            InstanceCookie ic = (InstanceCookie)n.getCookie(InstanceCookie.class);
(-)core/src/org/netbeans/beaninfo/editors/FileSystemPanel.java (-3 / +9 lines)
Lines 13-18 Link Here
13
13
14
package org.netbeans.beaninfo.editors;
14
package org.netbeans.beaninfo.editors;
15
15
16
import org.openide.loaders.DataFilter;
17
16
import java.util.*;
18
import java.util.*;
17
import java.awt.event.*;
19
import java.awt.event.*;
18
import java.beans.*;
20
import java.beans.*;
Lines 35-40 Link Here
35
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
37
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
36
// TODO: check if we really need this
38
// TODO: check if we really need this
37
import org.netbeans.core.*;
39
import org.netbeans.core.*;
40
import org.netbeans.core.NbPlaces;
41
import org.openide.loaders.RepositoryNodeFactory;
38
42
39
/**
43
/**
40
 * A panel capable of creating new FileSystem object.
44
 * A panel capable of creating new FileSystem object.
Lines 402-408 Link Here
402
                } catch (java.beans.IntrospectionException ex) {
406
                } catch (java.beans.IntrospectionException ex) {
403
                }
407
                }
404
            }
408
            }
405
            TopManager.getDefault().notify(new DialogDescriptor.Message(getString("MSG_WrongFileName")));
409
            org.openide.DialogDisplayer.getDefault().notify(
410
                new DialogDescriptor.Message(getString("MSG_WrongFileName")));
406
        }
411
        }
407
412
408
  }//GEN-LAST:event_browseJarButtonActionPerformed
413
  }//GEN-LAST:event_browseJarButtonActionPerformed
Lines 444-450 Link Here
444
                } catch (java.beans.IntrospectionException ex) {
449
                } catch (java.beans.IntrospectionException ex) {
445
                }
450
                }
446
            }
451
            }
447
            TopManager.getDefault().notify(new DialogDescriptor.Message(getString("MSG_WrongFile")));
452
            org.openide.DialogDisplayer.getDefault().notify(
453
                new DialogDescriptor.Message(getString("MSG_WrongFile")));
448
        }
454
        }
449
//        chooser.dispose();
455
//        chooser.dispose();
450
        
456
        
Lines 547-553 Link Here
547
     */
553
     */
548
    private void initialize() {
554
    private void initialize() {
549
        // first find the newTypeNames 
555
        // first find the newTypeNames 
550
        Node n = TopManager.getDefault().getPlaces ().nodes ().repository();
556
        Node n = RepositoryNodeFactory.getDefault().repository(DataFilter.ALL);
551
        newTypes = n.getNewTypes();
557
        newTypes = n.getNewTypes();
552
        Collection c = new ArrayList();
558
        Collection c = new ArrayList();
553
        for (int i = 0; i < newTypes.length; i++) {
559
        for (int i = 0; i < newTypes.length; i++) {
(-)core/src/org/netbeans/beaninfo/editors/FontEditor.java (-1 lines)
Lines 24-30 Link Here
24
import javax.swing.border.*;
24
import javax.swing.border.*;
25
import javax.swing.event.*;
25
import javax.swing.event.*;
26
26
27
import org.openide.TopManager;
28
import org.openide.ErrorManager;
27
import org.openide.ErrorManager;
29
import org.openide.explorer.propertysheet.editors.XMLPropertyEditor;
28
import org.openide.explorer.propertysheet.editors.XMLPropertyEditor;
30
import org.openide.util.HelpCtx;
29
import org.openide.util.HelpCtx;
(-)core/src/org/netbeans/beaninfo/editors/HtmlBrowser.java (-1 lines)
Lines 19-25 Link Here
19
import java.util.Iterator;
19
import java.util.Iterator;
20
20
21
import org.openide.ErrorManager;
21
import org.openide.ErrorManager;
22
import org.openide.TopManager;
23
import org.openide.cookies.InstanceCookie;
22
import org.openide.cookies.InstanceCookie;
24
import org.openide.filesystems.FileObject;
23
import org.openide.filesystems.FileObject;
25
import org.openide.filesystems.Repository;
24
import org.openide.filesystems.Repository;
(-)core/src/org/netbeans/beaninfo/editors/IndentEngineEditor.java (-1 lines)
Lines 20-26 Link Here
20
import java.text.MessageFormat;
20
import java.text.MessageFormat;
21
21
22
import org.openide.compiler.*;
22
import org.openide.compiler.*;
23
import org.openide.TopManager;
24
import org.openide.util.HelpCtx;
23
import org.openide.util.HelpCtx;
25
import org.openide.util.NbBundle;
24
import org.openide.util.NbBundle;
26
import org.openide.loaders.*;
25
import org.openide.loaders.*;
(-)core/src/org/netbeans/beaninfo/editors/InsetsCustomEditor.java (-1 lines)
Lines 17-23 Link Here
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
23
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
22
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
(-)core/src/org/netbeans/beaninfo/editors/InsetsEditor.java (-6 / +8 lines)
Lines 16-22 Link Here
16
import java.awt.Insets;
16
import java.awt.Insets;
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.TopManager;
20
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
22
21
Lines 48-61 Link Here
48
    */
47
    */
49
    void setValues(int[] val) {
48
    void setValues(int[] val) {
50
        if ((val[0] < 0) || (val[1] < 0) || (val[2] < 0) || (val[3] < 0)) {
49
        if ((val[0] < 0) || (val[1] < 0) || (val[2] < 0) || (val[3] < 0)) {
51
            //TopManager.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
50
            //DialogDisplayer.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
52
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
51
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
53
            //to PropertyEditor and setValues() method is called again.
52
            //to PropertyEditor and setValues() method is called again.
54
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
53
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
55
                                                       public void run() {
54
                   public void run() {
56
                                                           TopManager.getDefault().notify(new NotifyDescriptor.Message(bundle.getString("CTL_NegativeSize"), NotifyDescriptor.ERROR_MESSAGE));
55
                       org.openide.DialogDisplayer.getDefault().notify(
57
                                                       }
56
                           new NotifyDescriptor.Message(
58
                                                   });
57
                               bundle.getString("CTL_NegativeSize"),
58
                               NotifyDescriptor.ERROR_MESSAGE));
59
                   }
60
               });
59
        }
61
        }
60
        else
62
        else
61
            setValue(new Insets(val[0], val[1], val[2], val[3]));
63
            setValue(new Insets(val[0], val[1], val[2], val[3]));
(-)core/src/org/netbeans/beaninfo/editors/NbClassPathCustomEditor.java (-1 lines)
Lines 27-33 Link Here
27
27
28
import org.openide.execution.NbClassPath;
28
import org.openide.execution.NbClassPath;
29
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
29
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
30
import org.openide.TopManager;
31
import org.openide.util.HelpCtx;
30
import org.openide.util.HelpCtx;
32
import org.openide.util.NbBundle;
31
import org.openide.util.NbBundle;
33
import org.openide.windows.TopComponent;
32
import org.openide.windows.TopComponent;
(-)core/src/org/netbeans/beaninfo/editors/ObjectEditor.java (-2 / +1 lines)
Lines 17-23 Link Here
17
import java.awt.Component;
17
import java.awt.Component;
18
import java.util.*;
18
import java.util.*;
19
19
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
import org.openide.cookies.InstanceCookie;
21
import org.openide.cookies.InstanceCookie;
23
import org.openide.filesystems.*;
22
import org.openide.filesystems.*;
Lines 122-128 Link Here
122
    protected synchronized Node root () {
121
    protected synchronized Node root () {
123
        if (root == null) {
122
        if (root == null) {
124
            root = new org.netbeans.core.ui.LookupNode (
123
            root = new org.netbeans.core.ui.LookupNode (
125
                org.netbeans.core.NbPlaces.findSessionFolder ("/Services") // NOI18N
124
                org.netbeans.core.NbPlaces.getDefault().findSessionFolder ("/Services") // NOI18N
126
            ); 
125
            ); 
127
        }
126
        }
128
        return root;
127
        return root;
(-)core/src/org/netbeans/beaninfo/editors/PointCustomEditor.java (-1 lines)
Lines 18-24 Link Here
18
import java.util.ResourceBundle;
18
import java.util.ResourceBundle;
19
19
20
import org.openide.NotifyDescriptor;
20
import org.openide.NotifyDescriptor;
21
import org.openide.TopManager;
22
import org.openide.ErrorManager;
21
import org.openide.ErrorManager;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
23
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
(-)core/src/org/netbeans/beaninfo/editors/PointEditor.java (-6 / +8 lines)
Lines 16-22 Link Here
16
import java.awt.Point;
16
import java.awt.Point;
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.TopManager;
20
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
22
21
Lines 45-58 Link Here
45
    */
44
    */
46
    void setValues(int[] val) {
45
    void setValues(int[] val) {
47
        if ((val[0] < 0) || (val[1] < 0)) {
46
        if ((val[0] < 0) || (val[1] < 0)) {
48
            //TopManager.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
47
            //DilaogDisplayer.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
49
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
48
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
50
            //to PropertyEditor and setValues() method is called again.
49
            //to PropertyEditor and setValues() method is called again.
51
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
50
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
52
                                                       public void run() {
51
                   public void run() {
53
                                                           TopManager.getDefault().notify(new NotifyDescriptor.Message(bundle.getString("CTL_NegativeSize"), NotifyDescriptor.ERROR_MESSAGE));
52
                       org.openide.DialogDisplayer.getDefault().notify(
54
                                                       }
53
                           new NotifyDescriptor.Message(
55
                                                   });
54
                               bundle.getString("CTL_NegativeSize"),
55
                               NotifyDescriptor.ERROR_MESSAGE));
56
                   }
57
               });
56
        }
58
        }
57
        else
59
        else
58
            setValue(new Point(val[0], val[1]));
60
            setValue(new Point(val[0], val[1]));
(-)core/src/org/netbeans/beaninfo/editors/PropertiesCustomEditor.java (-2 / +2 lines)
Lines 26-32 Link Here
26
import org.openide.util.HelpCtx;
26
import org.openide.util.HelpCtx;
27
import org.openide.util.NbBundle;
27
import org.openide.util.NbBundle;
28
import org.openide.NotifyDescriptor;
28
import org.openide.NotifyDescriptor;
29
import org.openide.TopManager;
30
29
31
/** A custom editor for Properties.
30
/** A custom editor for Properties.
32
 *
31
 *
Lines 83-89 Link Here
83
            NotifyDescriptor.Confirmation nd = new NotifyDescriptor.Confirmation(
82
            NotifyDescriptor.Confirmation nd = new NotifyDescriptor.Confirmation(
84
                    NbBundle.getBundle(PropertiesCustomEditor.class).getString("MSG_PropertiesComments")
83
                    NbBundle.getBundle(PropertiesCustomEditor.class).getString("MSG_PropertiesComments")
85
                );
84
                );
86
            if ( !TopManager.getDefault().notify( nd ).equals( NotifyDescriptor.YES_OPTION ) ) {
85
            if ( !org.openide.DialogDisplayer.getDefault().notify( nd )
86
            .equals( NotifyDescriptor.YES_OPTION ) ) {
87
                throw new IllegalStateException();
87
                throw new IllegalStateException();
88
            }
88
            }
89
        }
89
        }
(-)core/src/org/netbeans/beaninfo/editors/PropertiesEditor.java (-1 lines)
Lines 21-27 Link Here
21
import java.util.Properties;
21
import java.util.Properties;
22
22
23
import org.openide.ErrorManager;
23
import org.openide.ErrorManager;
24
import org.openide.TopManager;
25
24
26
25
27
/** A property editor for Properties class.
26
/** A property editor for Properties class.
(-)core/src/org/netbeans/beaninfo/editors/RectangleCustomEditor.java (-1 lines)
Lines 17-23 Link Here
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
23
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
22
import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor;
(-)core/src/org/netbeans/beaninfo/editors/RectangleEditor.java (-6 / +8 lines)
Lines 16-22 Link Here
16
import java.awt.Rectangle;
16
import java.awt.Rectangle;
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.TopManager;
20
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
22
21
Lines 44-57 Link Here
44
    */
43
    */
45
    void setValues(int[] val) {
44
    void setValues(int[] val) {
46
        if ((val[0] < 0) || (val[1] < 0) || (val[2] < 0) || (val[3] < 0)) {
45
        if ((val[0] < 0) || (val[1] < 0) || (val[2] < 0) || (val[3] < 0)) {
47
            //TopManager.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
46
            //DialogDisplayer.getDefault().notify(...) cannot be called synchronous, because when error dialog is displayed
48
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
47
            //PropertyEditor lost focus and setValues() method is called. After closing error dialog is focus returned
49
            //to PropertyEditor and setValues() method is called again.
48
            //to PropertyEditor and setValues() method is called again.
50
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
49
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
51
                                                       public void run() {
50
                   public void run() {
52
                                                           TopManager.getDefault().notify(new NotifyDescriptor.Message(bundle.getString("CTL_NegativeSize"), NotifyDescriptor.ERROR_MESSAGE));
51
                       org.openide.DialogDisplayer.getDefault().notify(
53
                                                       }
52
                           new NotifyDescriptor.Message(
54
                                                   });
53
                               bundle.getString("CTL_NegativeSize"),
54
                               NotifyDescriptor.ERROR_MESSAGE));
55
                   }
56
               });
55
        }
57
        }
56
        else
58
        else
57
            setValue(new Rectangle(val[0], val[1], val[2], val[3]));
59
            setValue(new Rectangle(val[0], val[1], val[2], val[3]));
(-)core/src/org/netbeans/beaninfo/editors/ServiceTypeEditor.java (-3 / +9 lines)
Lines 17-26 Link Here
17
import java.util.ArrayList;
17
import java.util.ArrayList;
18
import java.util.Enumeration;
18
import java.util.Enumeration;
19
19
20
import org.openide.TopManager;
20
import org.openide.filesystems.Repository;
21
import org.openide.ServiceType;
21
import org.openide.ServiceType;
22
import org.openide.execution.Executor;
22
import org.openide.execution.Executor;
23
import org.openide.explorer.propertysheet.*;
23
import org.openide.explorer.propertysheet.*;
24
import org.openide.util.Lookup;
25
24
26
25
/** Support for property editor for Executor.
27
/** Support for property editor for Executor.
26
*
28
*
Lines 99-105 Link Here
99
     */
101
     */
100
    private void updateTags () {
102
    private void updateTags () {
101
        java.util.LinkedList names = new java.util.LinkedList ();
103
        java.util.LinkedList names = new java.util.LinkedList ();
102
        Enumeration ee = TopManager.getDefault ().getServices ().services (clazz);
104
        ServiceType.Registry registry = (ServiceType.Registry)Lookup.getDefault ()
105
                .lookup (ServiceType.Registry.class);
106
        Enumeration ee = registry.services (clazz);
103
        while (ee.hasMoreElements()) {
107
        while (ee.hasMoreElements()) {
104
            ServiceType e = (ServiceType) ee.nextElement();
108
            ServiceType e = (ServiceType) ee.nextElement();
105
            names.add(e.getName());
109
            names.add(e.getName());
Lines 142-148 Link Here
142
        if (none != null && none.getName ().equals (text))
146
        if (none != null && none.getName ().equals (text))
143
            setValue (none);
147
            setValue (none);
144
        else {
148
        else {
145
            Enumeration en = TopManager.getDefault ().getServices ().services (clazz);
149
            ServiceType.Registry registry = (ServiceType.Registry)Lookup.getDefault ()
150
                    .lookup (ServiceType.Registry.class);
151
            Enumeration en = registry.services (clazz);
146
            while (en.hasMoreElements ()) {
152
            while (en.hasMoreElements ()) {
147
                ServiceType t = (ServiceType)en.nextElement ();
153
                ServiceType t = (ServiceType)en.nextElement ();
148
                if (text.equals (t.getName ())) {
154
                if (text.equals (t.getName ())) {
(-)core/src/org/netbeans/beaninfo/editors/ServiceTypePanel.java (-1 / +4 lines)
Lines 23-28 Link Here
23
import org.openide.execution.*;
23
import org.openide.execution.*;
24
import org.openide.nodes.*;
24
import org.openide.nodes.*;
25
import org.openide.util.HelpCtx;
25
import org.openide.util.HelpCtx;
26
import org.openide.util.Lookup;
26
27
27
/** Service type panel for viewing, selecting and configuring
28
/** Service type panel for viewing, selecting and configuring
28
* of executors and other services.
29
* of executors and other services.
Lines 162-168 Link Here
162
    private List nodes () {
163
    private List nodes () {
163
        services = new ArrayList (20);
164
        services = new ArrayList (20);
164
        List l = new LinkedList ();
165
        List l = new LinkedList ();
165
        Enumeration en = TopManager.getDefault ().getServices ().services (clazz);
166
        ServiceType.Registry registry = (ServiceType.Registry)Lookup.getDefault ()
167
                .lookup (ServiceType.Registry.class);
168
        Enumeration en = registry.services (clazz);
166
        while (en.hasMoreElements ()) {
169
        while (en.hasMoreElements ()) {
167
            try {
170
            try {
168
                Object service = en.nextElement ();
171
                Object service = en.nextElement ();
(-)core/src/org/netbeans/core/ActionsPanel.java (-6 / +7 lines)
Lines 32-37 Link Here
32
import org.openide.loaders.DataFolder;
32
import org.openide.loaders.DataFolder;
33
import org.openide.loaders.InstanceDataObject;
33
import org.openide.loaders.InstanceDataObject;
34
import org.openide.util.HelpCtx;
34
import org.openide.util.HelpCtx;
35
import org.openide.util.Lookup;
35
import org.openide.util.Utilities;
36
import org.openide.util.Utilities;
36
import org.openide.util.actions.SystemAction;
37
import org.openide.util.actions.SystemAction;
37
38
Lines 120-126 Link Here
120
121
121
    private void updateSelectedAction (SystemAction action) {
122
    private void updateSelectedAction (SystemAction action) {
122
        selectedAction = action;
123
        selectedAction = action;
123
        Keymap map = TopManager.getDefault ().getGlobalKeymap ();
124
        Keymap map = (Keymap)Lookup.getDefault().lookup(Keymap.class);
124
125
125
        Object[] acts = map.getBoundActions();
126
        Object[] acts = map.getBoundActions();
126
127
Lines 228-234 Link Here
228
229
229
    private void shortcutRemoveButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shortcutRemoveButtonActionPerformed
230
    private void shortcutRemoveButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shortcutRemoveButtonActionPerformed
230
        Object[] selectedItems = shortcutsList.getSelectedValues();
231
        Object[] selectedItems = shortcutsList.getSelectedValues();
231
        Keymap map = TopManager.getDefault ().getGlobalKeymap ();
232
        Keymap map = (Keymap)Lookup.getDefault().lookup(Keymap.class);
232
        for (int i = 0; i < selectedItems.length; i++) {
233
        for (int i = 0; i < selectedItems.length; i++) {
233
            KeyStroke ks = (KeyStroke)nameToStroke.get (selectedItems[i]);
234
            KeyStroke ks = (KeyStroke)nameToStroke.get (selectedItems[i]);
234
            if (ks != null) {
235
            if (ks != null) {
Lines 244-256 Link Here
244
    private void shortcutAddButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shortcutAddButtonActionPerformed
245
    private void shortcutAddButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shortcutAddButtonActionPerformed
245
        KeyStroke existingStroke = null;
246
        KeyStroke existingStroke = null;
246
        boolean shortcutAccepted = false;
247
        boolean shortcutAccepted = false;
247
        Keymap map = TopManager.getDefault ().getGlobalKeymap ();
248
        Keymap map = (Keymap)Lookup.getDefault().lookup(Keymap.class);
248
249
249
        while (true) {
250
        while (true) {
250
            ShortcutEnterPanel sep = new ShortcutEnterPanel (existingStroke);
251
            ShortcutEnterPanel sep = new ShortcutEnterPanel (existingStroke);
251
            DialogDescriptor dd = new DialogDescriptor (sep, bundle.getString ("ActionsPanel.AddShortcut"));
252
            DialogDescriptor dd = new DialogDescriptor (sep, bundle.getString ("ActionsPanel.AddShortcut"));
252
            
253
            
253
            JDialog addshort = (JDialog)TopManager.getDefault().createDialog(dd);
254
            JDialog addshort = (JDialog)org.openide.DialogDisplayer.getDefault().createDialog(dd);
254
            addshort.show ();
255
            addshort.show ();
255
            if (dd.getValue().equals (DialogDescriptor.OK_OPTION)) {
256
            if (dd.getValue().equals (DialogDescriptor.OK_OPTION)) {
256
                existingStroke = sep.getShortcut ();
257
                existingStroke = sep.getShortcut ();
Lines 266-272 Link Here
266
                                      }
267
                                      }
267
                                  );
268
                                  );
268
                    NotifyDescriptor nd = new NotifyDescriptor.Confirmation (text);
269
                    NotifyDescriptor nd = new NotifyDescriptor.Confirmation (text);
269
                    Object result = TopManager.getDefault ().notify (nd);
270
                    Object result = org.openide.DialogDisplayer.getDefault ().notify (nd);
270
                    if (result.equals (NotifyDescriptor.YES_OPTION)) {
271
                    if (result.equals (NotifyDescriptor.YES_OPTION)) {
271
                        shortcutAccepted = true; // yes, will replace eisting shortcut with new one
272
                        shortcutAccepted = true; // yes, will replace eisting shortcut with new one
272
                        shortcutsEditor.removeShortcut(existingStroke, a);
273
                        shortcutsEditor.removeShortcut(existingStroke, a);
Lines 328-334 Link Here
328
329
329
    TreeNode createActionsRootNode () {
330
    TreeNode createActionsRootNode () {
330
        final ArrayList actionGroups = new ArrayList ();
331
        final ArrayList actionGroups = new ArrayList ();
331
        DataFolder actionsFolder = TopManager.getDefault ().getPlaces ().folders ().actions ();
332
        DataFolder actionsFolder = NbPlaces.getDefault().actions ();
332
        DataObject[] actionsChildren = actionsFolder.getChildren ();
333
        DataObject[] actionsChildren = actionsFolder.getChildren ();
333
        for (int i = 0; i < actionsChildren.length; i++) {
334
        for (int i = 0; i < actionsChildren.length; i++) {
334
            if (actionsChildren[i] instanceof DataFolder) actionGroups.add (new ActionsGroupNode ((DataFolder)actionsChildren[i], null));
335
            if (actionsChildren[i] instanceof DataFolder) actionGroups.add (new ActionsGroupNode ((DataFolder)actionsChildren[i], null));
(-)core/src/org/netbeans/core/ActionsPoolNode.java (-1 / +2 lines)
Lines 25-30 Link Here
25
import org.openide.util.datatransfer.NewType;
25
import org.openide.util.datatransfer.NewType;
26
import org.openide.util.actions.SystemAction;
26
import org.openide.util.actions.SystemAction;
27
import org.openide.util.HelpCtx;
27
import org.openide.util.HelpCtx;
28
import org.openide.util.Lookup;
28
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
29
30
30
/** The node for the actions pool folder representation.
31
/** The node for the actions pool folder representation.
Lines 43-49 Link Here
43
    private static final Node.PropertySet[] NO_PROPERTIES = new Node.PropertySet[0];
44
    private static final Node.PropertySet[] NO_PROPERTIES = new Node.PropertySet[0];
44
45
45
    public ActionsPoolNode () {
46
    public ActionsPoolNode () {
46
        this (NbTopManager.getDefault ().getPlaces ().folders ().actions ());
47
        this (NbPlaces.getDefault().actions ());
47
    }
48
    }
48
49
49
    /** Constructs this node with given node to filter.
50
    /** Constructs this node with given node to filter.
(-)core/src/org/netbeans/core/AutomountSupport.java (-3 / +2 lines)
Lines 16-22 Link Here
16
import java.util.*;
16
import java.util.*;
17
import java.beans.*;
17
import java.beans.*;
18
18
19
import org.openide.TopManager;
20
import org.openide.ErrorManager;
19
import org.openide.ErrorManager;
21
import org.openide.cookies.InstanceCookie;
20
import org.openide.cookies.InstanceCookie;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
Lines 205-211 Link Here
205
            return defaultTask;
204
            return defaultTask;
206
        }
205
        }
207
206
208
        DataFolder folder = NbPlaces.findSessionFolder ("Mount"); // NOI18N
207
        DataFolder folder = NbPlaces.getDefault().findSessionFolder ("Mount"); // NOI18N
209
        AutomountSupport auto = new AutomountSupport (folder);
208
        AutomountSupport auto = new AutomountSupport (folder);
210
        
209
        
211
        auto.addTaskListener (auto);
210
        auto.addTaskListener (auto);
Lines 252-258 Link Here
252
            FileSystem fs = Repository.getDefault ().getDefaultFileSystem();
251
            FileSystem fs = Repository.getDefault ().getDefaultFileSystem();
253
            fs.runAtomicAction (new FileSystem.AtomicAction () {
252
            fs.runAtomicAction (new FileSystem.AtomicAction () {
254
                public void run () {
253
                public void run () {
255
                    DataFolder df = NbPlaces.findSessionFolder ("Mount"); // NOI18N
254
                    DataFolder df = NbPlaces.getDefault().findSessionFolder ("Mount"); // NOI18N
256
                    DataObject[] arr = df.getChildren ();
255
                    DataObject[] arr = df.getChildren ();
257
                    checkSaved (getList (), df, arr);
256
                    checkSaved (getList (), df, arr);
258
                }
257
                }
(-)core/src/org/netbeans/core/Bundle.properties (-14 lines)
Lines 70-78 Link Here
70
#NOI18N
70
#NOI18N
71
AboutTextColor=0x000000
71
AboutTextColor=0x000000
72
72
73
#ControlPanelNode
74
CTL_ControlPanel=Control Panel
75
76
#DataSystem
73
#DataSystem
77
dataSystemName=Filesystems
74
dataSystemName=Filesystems
78
CTL_Repository_Hint=Filesystems provides access to Java classes and other development objects.
75
CTL_Repository_Hint=Filesystems provides access to Java classes and other development objects.
Lines 81-88 Link Here
81
#DesktopNode
78
#DesktopNode
82
CTL_Desktop_name=Desktop
79
CTL_Desktop_name=Desktop
83
CTL_Desktop_hint=The Desktop is the main root of objects in the IDE.
80
CTL_Desktop_hint=The Desktop is the main root of objects in the IDE.
84
CTL_Project_Settings=Project Settings
85
CTL_Project_Settings_Hint=Contains project-specific settings.
86
CTL_roots_name=Roots
81
CTL_roots_name=Roots
87
82
88
#Session Settings Subnodes
83
#Session Settings Subnodes
Lines 392-405 Link Here
392
PROP_newToolbarConfigDialog=New Configuration
387
PROP_newToolbarConfigDialog=New Configuration
393
PROP_newToolbarConfig=Configuration
388
PROP_newToolbarConfig=Configuration
394
389
395
# Open new project
396
MSG_DoSavePreviousProject=Save current project?
397
398
# NbProjectOperation
399
EXC_WorkspaceLoadFail=Cannot load workspaces. Using default configuration.
400
MSG_DefaultProject=Using default project settings...
401
EXC_CorruptedProject=Your saved project files are corrupted.
402
403
# Services
390
# Services
404
# {0} - ordinary name
391
# {0} - ordinary name
405
LAB_NewExecutor_Instantiate={0} Service
392
LAB_NewExecutor_Instantiate={0} Service
Lines 625-631 Link Here
625
UI/Runtime=Runtime
612
UI/Runtime=Runtime
626
# UI/Runtime_Hint=Represents aspects of the running state of the IDE.
613
# UI/Runtime_Hint=Represents aspects of the running state of the IDE.
627
Services/org-netbeans-core-execution-ExecutionSettings.settings=Execution Settings
614
Services/org-netbeans-core-execution-ExecutionSettings.settings=Execution Settings
628
Services/org-openide-src-nodes-SourceOptions.settings=Java Elements
629
Services/org-netbeans-core-output-OutputSettings.settings=Output Window
615
Services/org-netbeans-core-output-OutputSettings.settings=Output Window
630
Services/org-openide-explorer-propertysheet-PropertySheetSettings.settings=Property Sheet
616
Services/org-openide-explorer-propertysheet-PropertySheetSettings.settings=Property Sheet
631
Services/org-openide-text-PrintSettings.settings=Print Settings
617
Services/org-openide-text-PrintSettings.settings=Print Settings
(-)core/src/org/netbeans/core/DataSystem.java (-7 / +14 lines)
Lines 20-26 Link Here
20
import java.io.ObjectInputStream;
20
import java.io.ObjectInputStream;
21
import java.util.*;
21
import java.util.*;
22
22
23
import org.openide.TopManager;
24
import org.openide.actions.NewTemplateAction;
23
import org.openide.actions.NewTemplateAction;
25
import org.openide.loaders.DataFolder;
24
import org.openide.loaders.DataFolder;
26
import org.openide.loaders.DataFilter;
25
import org.openide.loaders.DataFilter;
Lines 33-38 Link Here
33
import org.openide.util.actions.SystemAction;
32
import org.openide.util.actions.SystemAction;
34
import org.openide.loaders.DataObjectNotFoundException;
33
import org.openide.loaders.DataObjectNotFoundException;
35
import org.openide.ErrorManager;
34
import org.openide.ErrorManager;
35
import org.openide.loaders.RepositoryNodeFactory;
36
36
37
/** Data system encapsulates logical structure of more file systems.
37
/** Data system encapsulates logical structure of more file systems.
38
* It also allows filtering of content of DataFolders
38
* It also allows filtering of content of DataFolders
Lines 70-82 Link Here
70
    * @param filter the filter to use
70
    * @param filter the filter to use
71
    */
71
    */
72
    private DataSystem(Children ch, DataFilter filter) {
72
    private DataSystem(Children ch, DataFilter filter) {
73
        this (ch, NbTopManager.get ().getRepository (), filter);
73
        this (ch, Repository.getDefault(), filter);
74
    }
74
    }
75
75
76
    // delegate Index cookie to Filesystems Settings for convenience
76
    // delegate Index cookie to Filesystems Settings for convenience
77
    public Node.Cookie getCookie(Class clazz) {
77
    public Node.Cookie getCookie(Class clazz) {
78
        if (clazz == Index.class) {
78
        if (clazz == Index.class) {
79
            return TopManager.getDefault ().getPlaces().nodes().repositorySettings().getCookie(clazz);
79
            return NbPlaces.getDefault().repositorySettings().getCookie(clazz);
80
        } else {
80
        } else {
81
            return super.getCookie(clazz);
81
            return super.getCookie(clazz);
82
        }
82
        }
Lines 198-206 Link Here
198
    public Component getCustomizer () {
198
    public Component getCustomizer () {
199
        NbMainExplorer.SettingsTab nb = new NbMainExplorer.SettingsTab ();
199
        NbMainExplorer.SettingsTab nb = new NbMainExplorer.SettingsTab ();
200
        nb.getExplorerManager ().setRootContext (
200
        nb.getExplorerManager ().setRootContext (
201
          TopManager.getDefault ().getPlaces().nodes().repositorySettings()
201
            NbPlaces.getDefault().repositorySettings()
202
        );
202
        );
203
        nb.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(DataSystem.class).getString("ACSD_DataSystemCustomizer"));
203
        nb.getAccessibleContext().setAccessibleDescription(
204
            NbBundle.getBundle(DataSystem.class).getString("ACSD_DataSystemCustomizer"));
204
        return nb;
205
        return nb;
205
    }
206
    }
206
207
Lines 283-289 Link Here
283
            return getDataSystem (filter);
284
            return getDataSystem (filter);
284
        }
285
        }
285
    }
286
    }
287
    
288
    public static final class NbRepositoryNodeFactory extends RepositoryNodeFactory {
289
        
290
        public Node repository(DataFilter f) {
291
            return DataSystem.getDataSystem(f == DataFilter.ALL ? null : f);
292
        }
293
        
294
    }
286
295
287
}
296
}
288
289
(-)core/src/org/netbeans/core/EnvironmentNode.java (-3 / +3 lines)
Lines 65-77 Link Here
65
                        Node n = (Node)types.get (name);
65
                        Node n = (Node)types.get (name);
66
                        if (n == null) {
66
                        if (n == null) {
67
                            if (ManifestSection.NodeSection.TYPE_ROOTS.equals(name)) {
67
                            if (ManifestSection.NodeSection.TYPE_ROOTS.equals(name)) {
68
                                n = new EnvironmentNode (name, new NbPlaces.Ch (name));
68
                                n = new EnvironmentNode (name, NbPlaces.getDefault().createChildren(name));
69
                            } else {
69
                            } else {
70
                                DataFolder folder = null;
70
                                DataFolder folder = null;
71
                                if (ManifestSection.NodeSection.TYPE_ENVIRONMENT.equals(name)) {
71
                                if (ManifestSection.NodeSection.TYPE_ENVIRONMENT.equals(name)) {
72
                                    folder = NbPlaces.findSessionFolder("UI/Runtime"); // NOI18N
72
                                    folder = NbPlaces.getDefault().findSessionFolder("UI/Runtime"); // NOI18N
73
                                } else {
73
                                } else {
74
                                    folder = NbPlaces.findSessionFolder("UI/Services"); // NOI18N
74
                                    folder = NbPlaces.getDefault().findSessionFolder("UI/Services"); // NOI18N
75
                                }
75
                                }
76
                                n = new PersistentLookupNode(name, folder);
76
                                n = new PersistentLookupNode(name, folder);
77
                            }
77
                            }
(-)core/src/org/netbeans/core/ExLocalFileSystem.java (-1 lines)
Lines 20-26 Link Here
20
import org.apache.regexp.RE;
20
import org.apache.regexp.RE;
21
import org.apache.regexp.RESyntaxException;
21
import org.apache.regexp.RESyntaxException;
22
22
23
import org.openide.TopManager;
24
import org.openide.filesystems.*;
23
import org.openide.filesystems.*;
25
import org.openide.loaders.ExtensionList;
24
import org.openide.loaders.ExtensionList;
26
import org.openide.util.RequestProcessor;
25
import org.openide.util.RequestProcessor;
(-)core/src/org/netbeans/core/ExitDialog.java (-4 / +2 lines)
Lines 60-66 Link Here
60
import org.openide.nodes.NodeAdapter;
60
import org.openide.nodes.NodeAdapter;
61
import org.openide.nodes.NodeMemberEvent;
61
import org.openide.nodes.NodeMemberEvent;
62
import org.openide.NotifyDescriptor;
62
import org.openide.NotifyDescriptor;
63
import org.openide.TopManager;
64
import org.openide.util.actions.CallableSystemAction;
63
import org.openide.util.actions.CallableSystemAction;
65
import org.openide.util.actions.SystemAction;
64
import org.openide.util.actions.SystemAction;
66
import org.openide.util.HelpCtx;
65
import org.openide.util.HelpCtx;
Lines 68-74 Link Here
68
import org.openide.util.Utilities;
67
import org.openide.util.Utilities;
69
import org.openide.util.WeakListener;
68
import org.openide.util.WeakListener;
70
69
71
import org.netbeans.core.projects.SessionManager;
72
import org.netbeans.core.execution.ExecutionEngine;
70
import org.netbeans.core.execution.ExecutionEngine;
73
import org.netbeans.core.execution.ExecutionEvent;
71
import org.netbeans.core.execution.ExecutionEvent;
74
import org.netbeans.core.execution.ExecutionListener;
72
import org.netbeans.core.execution.ExecutionListener;
Lines 345-351 Link Here
345
                                                         exitComponent                                                    // Action Listener
343
                                                         exitComponent                                                    // Action Listener
346
                                                     );
344
                                                     );
347
                exitDlgDescriptor.setAdditionalOptions (new Object[] {NotifyDescriptor.CANCEL_OPTION});
345
                exitDlgDescriptor.setAdditionalOptions (new Object[] {NotifyDescriptor.CANCEL_OPTION});
348
                exitDialog = TopManager.getDefault ().createDialog (exitDlgDescriptor);
346
                exitDialog = org.openide.DialogDisplayer.getDefault ().createDialog (exitDlgDescriptor);
349
            }
347
            }
350
348
351
            result = false;
349
            result = false;
Lines 463-469 Link Here
463
                }
461
                }
464
            });
462
            });
465
463
466
            dialog[0] = TopManager.getDefault().createDialog(dd);
464
            dialog[0] = org.openide.DialogDisplayer.getDefault().createDialog(dd);
467
            
465
            
468
            dialog[0].addWindowListener(new java.awt.event.WindowAdapter() {
466
            dialog[0].addWindowListener(new java.awt.event.WindowAdapter() {
469
                public void windowOpened(java.awt.event.WindowEvent evt) {
467
                public void windowOpened(java.awt.event.WindowEvent evt) {
(-)core/src/org/netbeans/core/FileSelector.java (-1 lines)
Lines 51-57 Link Here
51
import org.openide.explorer.view.BeanTreeView;
51
import org.openide.explorer.view.BeanTreeView;
52
import org.openide.nodes.Node;
52
import org.openide.nodes.Node;
53
import org.openide.nodes.NodeAcceptor;
53
import org.openide.nodes.NodeAcceptor;
54
import org.openide.TopManager;
55
import org.openide.util.NbBundle;
54
import org.openide.util.NbBundle;
56
55
57
56
(-)core/src/org/netbeans/core/IDESettings.java (-2 / +1 lines)
Lines 29-35 Link Here
29
29
30
import org.openide.NotifyDescriptor;
30
import org.openide.NotifyDescriptor;
31
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
32
import org.openide.TopManager;
33
import org.openide.awt.HtmlBrowser;
32
import org.openide.awt.HtmlBrowser;
34
import org.openide.cookies.InstanceCookie;
33
import org.openide.cookies.InstanceCookie;
35
import org.openide.filesystems.FileObject;
34
import org.openide.filesystems.FileObject;
Lines 389-395 Link Here
389
        if (old != s) {
388
        if (old != s) {
390
            new Thread () {
389
            new Thread () {
391
                    public void run () {
390
                    public void run () {
392
                        TopManager.getDefault ().notify
391
                        DialogDisplayer.getDefault ().notify
393
                            (new NotifyDescriptor.Message
392
                            (new NotifyDescriptor.Message
394
                                (Main.getString ("MSG_must_restart_IDE_for_show_file_extensions"),
393
                                (Main.getString ("MSG_must_restart_IDE_for_show_file_extensions"),
395
                                 NotifyDescriptor.WARNING_MESSAGE));
394
                                 NotifyDescriptor.WARNING_MESSAGE));
(-)core/src/org/netbeans/core/IDESettingsBeanInfo.java (-1 lines)
Lines 22-28 Link Here
22
22
23
import org.openide.modules.Dependency;
23
import org.openide.modules.Dependency;
24
import org.openide.modules.SpecificationVersion;
24
import org.openide.modules.SpecificationVersion;
25
import org.openide.TopManager;
26
import org.openide.util.NbBundle;
25
import org.openide.util.NbBundle;
27
import org.openide.util.Utilities;
26
import org.openide.util.Utilities;
28
27
(-)core/src/org/netbeans/core/LoaderPoolNode.java (-3 / +38 lines)
Lines 24-41 Link Here
24
import javax.swing.event.ChangeEvent;
24
import javax.swing.event.ChangeEvent;
25
import javax.swing.event.ChangeListener;
25
import javax.swing.event.ChangeListener;
26
26
27
import org.openide.filesystems.*;
27
import org.openide.loaders.DataLoader;
28
import org.openide.loaders.DataLoader;
28
import org.openide.loaders.DataLoaderPool;
29
import org.openide.loaders.DataLoaderPool;
29
import org.openide.loaders.InstanceSupport;
30
import org.openide.loaders.InstanceSupport;
30
import org.openide.TopManager;
31
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
32
import org.openide.actions.*;
32
import org.openide.actions.*;
33
import org.openide.nodes.*;
33
import org.openide.nodes.*;
34
import org.openide.util.actions.SystemAction;
34
import org.openide.util.actions.SystemAction;
35
import org.openide.util.enum.ArrayEnumeration;
35
import org.openide.util.enum.ArrayEnumeration;
36
import org.openide.util.*;
36
import org.openide.util.*;
37
import org.openide.util.io.NbMarshalledObject;
37
import org.openide.util.io.*;
38
import org.openide.util.io.SafeException;
39
import org.openide.actions.ReorderAction;
38
import org.openide.actions.ReorderAction;
40
import org.openide.modules.ModuleInfo;
39
import org.openide.modules.ModuleInfo;
41
import org.openide.modules.SpecificationVersion;
40
import org.openide.modules.SpecificationVersion;
Lines 566-571 Link Here
566
        if (deserExc != null) {
565
        if (deserExc != null) {
567
            throw new SafeException (deserExc);
566
            throw new SafeException (deserExc);
568
        }
567
        }
568
    }
569
    
570
    // I/O with loaders.ser; moved from NbProjectOperation:
571
    public static void store() throws IOException {
572
        FileObject ser = getLoaderPoolStorage(true);
573
        FileLock lock = ser.lock();
574
        try {
575
            ObjectOutputStream oos = new NbObjectOutputStream(ser.getOutputStream(lock));
576
            try {
577
                NbObjectOutputStream.writeSafely(oos, getNbLoaderPool());
578
            } finally {
579
                oos.close();
580
            }
581
        } finally {
582
            lock.releaseLock();
583
        }
584
    }
585
    public static void load() throws IOException {
586
        FileObject ser = getLoaderPoolStorage(false);
587
        if (ser != null) {
588
            ObjectInputStream ois = new NbObjectInputStream(ser.getInputStream());
589
            try {
590
                NbObjectInputStream.readSafely(ois);
591
            } finally {
592
                ois.close();
593
            }
594
        }
595
    }
596
    private static final String LOADER_POOL_NAME = "loaders.ser"; // NOI18N
597
    public static FileObject getLoaderPoolStorage(boolean create) throws IOException {
598
        FileSystem sfs = Repository.getDefault().getDefaultFileSystem();
599
        FileObject fo = sfs.findResource(LOADER_POOL_NAME);
600
        if (fo == null && create) {
601
            fo = sfs.getRoot().createData(LOADER_POOL_NAME);
602
        }
603
        return fo;
569
    }
604
    }
570
605
571
606
(-)core/src/org/netbeans/core/Main.java (-19 / +11 lines)
Lines 54-59 Link Here
54
import java.util.Hashtable;
54
import java.util.Hashtable;
55
import java.lang.reflect.Field;
55
import java.lang.reflect.Field;
56
import javax.swing.plaf.InputMapUIResource;
56
import javax.swing.plaf.InputMapUIResource;
57
import org.openide.awt.StatusDisplayer;
57
import org.openide.windows.WindowManager;
58
import org.openide.windows.WindowManager;
58
59
59
60
Lines 109-124 Link Here
109
      splash.increment(steps);
110
      splash.increment(steps);
110
  }
111
  }
111
  
112
  
112
  /** Overrides the default status line method to display first in the splash
113
  * if there is one
114
  */
115
    protected void setStatusTextImpl(String s) {
116
        Splash.SplashOutput sout = splash;
117
        if (sout != null) {
118
            sout.print (s);
119
        }
120
    }
121
122
  /** Starts TopThreadGroup which properly overrides uncaughtException
113
  /** Starts TopThreadGroup which properly overrides uncaughtException
123
   * Further - new thread in the group execs main
114
   * Further - new thread in the group execs main
124
   */
115
   */
Lines 248-254 Link Here
248
239
249
    // -----------------------------------------------------------------------------------------------------
240
    // -----------------------------------------------------------------------------------------------------
250
    // 11. Initialization of main window
241
    // 11. Initialization of main window
251
    setStatusText (getString("MSG_MainWindowInit"));
242
    StatusDisplayer.getDefault().setStatusText (getString("MSG_MainWindowInit"));
252
    final MainWindow mainWindow = WindowManagerImpl.mainWindow();
243
    final MainWindow mainWindow = WindowManagerImpl.mainWindow();
253
    mainWindow.initialize();
244
    mainWindow.initialize();
254
    incrementSplashProgressBar(10);
245
    incrementSplashProgressBar(10);
Lines 267-273 Link Here
267
    StartLog.logProgress ("Timer initialized"); // NOI18N
258
    StartLog.logProgress ("Timer initialized"); // NOI18N
268
259
269
    // prepare workspaces
260
    // prepare workspaces
270
    setStatusText (getString ("MSG_DefaultWorkspaceInit"));
261
    StatusDisplayer.getDefault().setStatusText (getString ("MSG_DefaultWorkspaceInit"));
271
262
272
    WindowManager.getDefault();
263
    WindowManager.getDefault();
273
    incrementSplashProgressBar();
264
    incrementSplashProgressBar();
Lines 329-337 Link Here
329
        }
320
        }
330
    }
321
    }
331
    
322
    
332
    setStatusText (getString("MSG_WindowShowInit"));
323
    StatusDisplayer.getDefault().setStatusText (getString("MSG_WindowShowInit"));
333
    mainWindow.showWindow ();
324
    mainWindow.showWindow ();
334
    setStatusText(""); // NOI18N
325
    StatusDisplayer.getDefault().setStatusText(""); // NOI18N
335
    StartLog.logProgress ("Main window opened"); // NOI18N
326
    StartLog.logProgress ("Main window opened"); // NOI18N
336
    StartLog.logEnd ("Main window initialization"); //NOI18N
327
    StartLog.logEnd ("Main window initialization"); //NOI18N
337
  }
328
  }
Lines 386-392 Link Here
386
// -----------------------------------------------------------------------------------------------------
377
// -----------------------------------------------------------------------------------------------------
387
// 4. Display Splash Screen & manager
378
// 4. Display Splash Screen & manager
388
    StartLog.logStart ("Creation of TopManager"); // NOI18N 
379
    StartLog.logStart ("Creation of TopManager"); // NOI18N 
389
    TopManager manager = TopManager.getDefault ();
380
//    TopManager manager = TopManager.getDefault ();
381
    NbTopManager.get();
390
    StartLog.logEnd ("Creation of TopManager"); // NOI18N
382
    StartLog.logEnd ("Creation of TopManager"); // NOI18N
391
383
392
    // finish starting
384
    // finish starting
Lines 397-403 Link Here
397
    StartLog.logProgress ("Splash hidden"); // NOI18N
389
    StartLog.logProgress ("Splash hidden"); // NOI18N
398
390
399
    if (org.netbeans.core.perftool.Util.isRunning()) {
391
    if (org.netbeans.core.perftool.Util.isRunning()) {
400
        measureStart(manager, time);
392
        measureStart(time);
401
    }
393
    }
402
    StartLog.logProgress ("Startup memory and time measured"); // NOI18N
394
    StartLog.logProgress ("Startup memory and time measured"); // NOI18N
403
    
395
    
Lines 412-425 Link Here
412
    }
404
    }
413
    // close IDE
405
    // close IDE
414
    if (System.getProperty ("netbeans.close") != null) {
406
    if (System.getProperty ("netbeans.close") != null) {
415
      org.openide.TopManager.getDefault().exit();
407
      org.openide.LifecycleManager.getDefault().exit();
416
    }	
408
    }	
417
    
409
    
418
    StartLog.logEnd ("Preparation"); // NOI18N
410
    StartLog.logEnd ("Preparation"); // NOI18N
419
  }
411
  }
420
  
412
  
421
    /** Prints out some info about time/heap if the measurement is enabled. */
413
    /** Prints out some info about time/heap if the measurement is enabled. */
422
    private static void measureStart(TopManager manager, long time) {
414
    private static void measureStart(long time) {
423
        org.netbeans.core.perftool.Util.waitForSystemThreads();
415
        org.netbeans.core.perftool.Util.waitForSystemThreads();
424
        org.netbeans.core.perftool.PerformanceMeter pm = org.netbeans.core.perftool.PerformanceMeterFactory.getPerformanceMeter();
416
        org.netbeans.core.perftool.PerformanceMeter pm = org.netbeans.core.perftool.PerformanceMeterFactory.getPerformanceMeter();
425
        pm.notifyTime("Total startup time:", System.currentTimeMillis() - time); // NOI18N
417
        pm.notifyTime("Total startup time:", System.currentTimeMillis() - time); // NOI18N
Lines 442-448 Link Here
442
  * @param res resource name to execute
434
  * @param res resource name to execute
443
  */
435
  */
444
  private static void startResource (String res) {
436
  private static void startResource (String res) {
445
    FileObject fo = TopManager.getDefault ().getRepository ().findResource(res);
437
    FileObject fo = Repository.getDefault().findResource(res);
446
    if (fo == null) {
438
    if (fo == null) {
447
      return;
439
      return;
448
    }
440
    }
(-)core/src/org/netbeans/core/MenuFolderNode.java (-3 / +3 lines)
Lines 19-25 Link Here
19
19
20
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
21
import org.openide.NotifyDescriptor;
21
import org.openide.NotifyDescriptor;
22
import org.openide.TopManager;
23
import org.openide.actions.*;
22
import org.openide.actions.*;
24
import org.openide.filesystems.*;
23
import org.openide.filesystems.*;
25
import org.openide.loaders.DataFolder;
24
import org.openide.loaders.DataFolder;
Lines 29-34 Link Here
29
import org.openide.util.datatransfer.NewType;
28
import org.openide.util.datatransfer.NewType;
30
import org.openide.util.actions.SystemAction;
29
import org.openide.util.actions.SystemAction;
31
import org.openide.util.HelpCtx;
30
import org.openide.util.HelpCtx;
31
import org.openide.util.Lookup;
32
import org.openide.util.NbBundle;
32
import org.openide.util.NbBundle;
33
33
34
/** The node for the menu folder representation.
34
/** The node for the menu folder representation.
Lines 50-56 Link Here
50
    private static final ResourceBundle bundle = NbBundle.getBundle (MenuFolderNode.class);
50
    private static final ResourceBundle bundle = NbBundle.getBundle (MenuFolderNode.class);
51
51
52
    public MenuFolderNode () {
52
    public MenuFolderNode () {
53
        this (NbTopManager.getDefault ().getPlaces ().folders ().menus ());
53
        this (NbPlaces.getDefault().menus ());
54
    }
54
    }
55
55
56
    /** Constructs this node with given node to filter.
56
    /** Constructs this node with given node to filter.
Lines 106-112 Link Here
106
                                         bundle.getString ("CTL_newMenuDialog"));
106
                                         bundle.getString ("CTL_newMenuDialog"));
107
        il.setInputText (bundle.getString ("CTL_newMenu"));
107
        il.setInputText (bundle.getString ("CTL_newMenu"));
108
108
109
        Object ok = TopManager.getDefault ().notify (il);
109
        Object ok = org.openide.DialogDisplayer.getDefault ().notify (il);
110
        if (ok == NotifyDescriptor.OK_OPTION) {
110
        if (ok == NotifyDescriptor.OK_OPTION) {
111
            String s = il.getInputText();
111
            String s = il.getInputText();
112
            if (!s.equals ("")) { // NOI18N
112
            if (!s.equals ("")) { // NOI18N
(-)core/src/org/netbeans/core/ModuleFSSection.java (-3 / +2 lines)
Lines 28-34 Link Here
28
import org.openide.filesystems.JarFileSystem;
28
import org.openide.filesystems.JarFileSystem;
29
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
30
import org.openide.util.HelpCtx;
30
import org.openide.util.HelpCtx;
31
import org.openide.TopManager;
32
import org.openide.nodes.BeanNode;
31
import org.openide.nodes.BeanNode;
33
import org.openide.nodes.Node;
32
import org.openide.nodes.Node;
34
import org.openide.*;
33
import org.openide.*;
Lines 137-143 Link Here
137
     * @param fs the filesystem to possibly mount
136
     * @param fs the filesystem to possibly mount
138
     */
137
     */
139
    private void showDialog (DialogDescriptor dd, final FileSystem fs) {
138
    private void showDialog (DialogDescriptor dd, final FileSystem fs) {
140
        TopManager.getDefault ().createDialog (dd).show ();
139
        org.openide.DialogDisplayer.getDefault ().createDialog (dd).show ();
141
        if (dd.isModal ()) {
140
        if (dd.isModal ()) {
142
            // It is closed.
141
            // It is closed.
143
            maybeMount (dd.getValue (), fs);
142
            maybeMount (dd.getValue (), fs);
Lines 161-167 Link Here
161
        if (DialogDescriptor.OK_OPTION.equals (val) ||
160
        if (DialogDescriptor.OK_OPTION.equals (val) ||
162
                DialogDescriptor.YES_OPTION.equals (val) ||
161
                DialogDescriptor.YES_OPTION.equals (val) ||
163
                WizardDescriptor.FINISH_OPTION.equals (val)) {
162
                WizardDescriptor.FINISH_OPTION.equals (val)) {
164
            NbTopManager.get ().getRepository ().addFileSystem (fs);
163
            Repository.getDefault().addFileSystem (fs);
165
        }
164
        }
166
    }
165
    }
167
166
(-)core/src/org/netbeans/core/NbAuthenticator.java (-2 / +1 lines)
Lines 16-22 Link Here
16
import java.net.Authenticator;
16
import java.net.Authenticator;
17
import java.util.ResourceBundle;
17
import java.util.ResourceBundle;
18
18
19
import org.openide.TopManager;
20
import org.openide.DialogDescriptor;
19
import org.openide.DialogDescriptor;
21
import org.openide.NotifyDescriptor;
20
import org.openide.NotifyDescriptor;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
Lines 39-45 Link Here
39
        DialogDescriptor dd = new DialogDescriptor( passwordPanel, host );
38
        DialogDescriptor dd = new DialogDescriptor( passwordPanel, host );
40
        dd.setHelpCtx (new HelpCtx (NbAuthenticator.class.getName () + ".getPasswordAuthentication")); // NOI18N
39
        dd.setHelpCtx (new HelpCtx (NbAuthenticator.class.getName () + ".getPasswordAuthentication")); // NOI18N
41
        passwordPanel.setPrompt( getRequestingPrompt() );
40
        passwordPanel.setPrompt( getRequestingPrompt() );
42
        java.awt.Dialog dialog = TopManager.getDefault().createDialog( dd );
41
        java.awt.Dialog dialog = org.openide.DialogDisplayer.getDefault().createDialog( dd );
43
        dialog.show ();
42
        dialog.show ();
44
43
45
        if ( dd.getValue().equals( NotifyDescriptor.OK_OPTION ) )
44
        if ( dd.getValue().equals( NotifyDescriptor.OK_OPTION ) )
(-)core/src/org/netbeans/core/NbDialog.java (-1 lines)
Lines 22-28 Link Here
22
22
23
import org.openide.NotifyDescriptor;
23
import org.openide.NotifyDescriptor;
24
import org.openide.DialogDescriptor;
24
import org.openide.DialogDescriptor;
25
import org.openide.TopManager;
26
import org.openide.util.HelpCtx;
25
import org.openide.util.HelpCtx;
27
import org.openide.util.NbBundle;
26
import org.openide.util.NbBundle;
28
import org.openide.util.Utilities;
27
import org.openide.util.Utilities;
(-)core/src/org/netbeans/core/NbErrorManager.java (-1 lines)
Lines 23-29 Link Here
23
import org.xml.sax.SAXParseException;
23
import org.xml.sax.SAXParseException;
24
24
25
import org.openide.ErrorManager;
25
import org.openide.ErrorManager;
26
import org.openide.TopManager;
27
import org.openide.util.NbBundle;
26
import org.openide.util.NbBundle;
28
27
29
/** This is the implementation of the famous exception manager.
28
/** This is the implementation of the famous exception manager.
(-)core/src/org/netbeans/core/NbKeymap.java (-11 / +14 lines)
Lines 14-19 Link Here
14
package org.netbeans.core;
14
package org.netbeans.core;
15
15
16
import java.util.*;
16
import java.util.*;
17
import java.util.Observable;
17
import javax.swing.event.*;
18
import javax.swing.event.*;
18
import javax.swing.Action;
19
import javax.swing.Action;
19
import javax.swing.KeyStroke;
20
import javax.swing.KeyStroke;
Lines 23-29 Link Here
23
*
24
*
24
* @author Dafe Simonek
25
* @author Dafe Simonek
25
*/
26
*/
26
public final class NbKeymap implements Keymap {
27
public final class NbKeymap extends Observable implements Keymap {
27
    /** Name of this keymap */
28
    /** Name of this keymap */
28
    String name;
29
    String name;
29
    /** Parent keymap */
30
    /** Parent keymap */
Lines 56-62 Link Here
56
57
57
    public void setDefaultAction(Action a) {
58
    public void setDefaultAction(Action a) {
58
        defaultAction = a;
59
        defaultAction = a;
59
        fireChangeEvent(new ChangeEvent(this));
60
        setChanged();
61
        notifyObservers();
60
    }
62
    }
61
63
62
    public String getName() {
64
    public String getName() {
Lines 143-149 Link Here
143
            bindings.put(key, a);
145
            bindings.put(key, a);
144
            actions = null;
146
            actions = null;
145
        }
147
        }
146
        fireChangeEvent(new ChangeEvent(this));
148
        setChanged();
149
        notifyObservers();
147
    }
150
    }
148
151
149
    void addActionForKeyStrokeMap(HashMap map) {
152
    void addActionForKeyStrokeMap(HashMap map) {
Lines 154-160 Link Here
154
            }
157
            }
155
            actions = null;
158
            actions = null;
156
        }
159
        }
157
        fireChangeEvent(new ChangeEvent(this));
160
        setChanged();
161
        notifyObservers();
158
    }
162
    }
159
163
160
    public void removeKeyStrokeBinding(KeyStroke key) {
164
    public void removeKeyStrokeBinding(KeyStroke key) {
Lines 162-168 Link Here
162
            bindings.remove(key);
166
            bindings.remove(key);
163
            actions = null;
167
            actions = null;
164
        }
168
        }
165
        fireChangeEvent(new ChangeEvent(this));
169
        setChanged();
170
        notifyObservers();
166
    }
171
    }
167
172
168
    public void removeBindings() {
173
    public void removeBindings() {
Lines 170-176 Link Here
170
            bindings.clear();
175
            bindings.clear();
171
            actions = null;
176
            actions = null;
172
        }
177
        }
173
        fireChangeEvent(new ChangeEvent(this));
178
        setChanged();
179
        notifyObservers();
174
    }
180
    }
175
181
176
    public Keymap getResolveParent() {
182
    public Keymap getResolveParent() {
Lines 179-195 Link Here
179
185
180
    public void setResolveParent(Keymap parent) {
186
    public void setResolveParent(Keymap parent) {
181
        this.parent = parent;
187
        this.parent = parent;
182
        fireChangeEvent(new ChangeEvent(this));
188
        setChanged();
189
        notifyObservers();
183
    }
190
    }
184
191
185
    /** Returns string representation - can be looong.
192
    /** Returns string representation - can be looong.
186
    */
193
    */
187
    public String toString() {
194
    public String toString() {
188
        return "Keymap[" + name + "]" + bindings; // NOI18N
195
        return "Keymap[" + name + "]" + bindings; // NOI18N
189
    }
190
191
    void fireChangeEvent (final ChangeEvent che) {
192
        NbTopManager.get ().firePropertyChange (NbTopManager.PROP_GLOBAL_KEYMAP, null, null);
193
    }
196
    }
194
197
195
}
198
}
(-)core/src/org/netbeans/core/NbMainExplorer.java (-49 / +47 lines)
Lines 50-55 Link Here
50
import org.openide.nodes.NodeListener;
50
import org.openide.nodes.NodeListener;
51
import org.openide.util.HelpCtx;
51
import org.openide.util.HelpCtx;
52
import org.openide.util.NbBundle;
52
import org.openide.util.NbBundle;
53
import org.openide.util.Lookup;
53
import org.openide.util.WeakListener;
54
import org.openide.util.WeakListener;
54
import org.openide.util.actions.SystemAction;
55
import org.openide.util.actions.SystemAction;
55
import org.openide.util.io.NbMarshalledObject;
56
import org.openide.util.io.NbMarshalledObject;
Lines 67-72 Link Here
67
import org.openide.awt.Actions;
68
import org.openide.awt.Actions;
68
import org.openide.awt.JPopupMenuPlus;
69
import org.openide.awt.JPopupMenuPlus;
69
import org.openide.awt.MouseUtils;
70
import org.openide.awt.MouseUtils;
71
import org.openide.loaders.DataFilter;
72
import org.openide.loaders.RepositoryNodeFactory;
70
import org.openide.util.actions.CallableSystemAction;
73
import org.openide.util.actions.CallableSystemAction;
71
import org.openide.windows.WindowManager;
74
import org.openide.windows.WindowManager;
72
75
Lines 98-105 Link Here
98
    
101
    
99
    /** Listener which tracks changes on the root nodes (which are displayed as tabs) */
102
    /** Listener which tracks changes on the root nodes (which are displayed as tabs) */
100
    private transient RootsListener rootsListener;
103
    private transient RootsListener rootsListener;
101
    /** weak roots listener */
102
    private transient PropertyChangeListener weakRootsL;
103
    /** true if listener to ide setiings properly initialized */
104
    /** true if listener to ide setiings properly initialized */
104
    private transient boolean listenerInitialized;
105
    private transient boolean listenerInitialized;
105
106
Lines 115-122 Link Here
115
    public NbMainExplorer () {
116
    public NbMainExplorer () {
116
        // listening on changes of roots
117
        // listening on changes of roots
117
        rootsListener = new RootsListener();
118
        rootsListener = new RootsListener();
118
        weakRootsL = WeakListener.propertyChange(rootsListener, TopManager.getDefault());
119
        NbPlaces p = NbPlaces.getDefault();
119
        TopManager.getDefault().addPropertyChangeListener(weakRootsL);
120
        p.addChangeListener(WeakListener.change(rootsListener, p));
120
    }
121
    }
121
122
122
    public HelpCtx getHelpCtx () {
123
    public HelpCtx getHelpCtx () {
Lines 249-254 Link Here
249
    * will reflect new nodes. Called when content of "roots" nodes is changed.
250
    * will reflect new nodes. Called when content of "roots" nodes is changed.
250
    */
251
    */
251
    final void refreshRoots () {
252
    final void refreshRoots () {
253
        /* huh??
252
        // attach listener to the ide settings if possible
254
        // attach listener to the ide settings if possible
253
        if (!listenerInitialized) {
255
        if (!listenerInitialized) {
254
            IDESettings ideS = (IDESettings)IDESettings.findObject(IDESettings.class);
256
            IDESettings ideS = (IDESettings)IDESettings.findObject(IDESettings.class);
Lines 257-262 Link Here
257
                listenerInitialized = true;
259
                listenerInitialized = true;
258
            }
260
            }
259
        }
261
        }
262
         */
260
        
263
        
261
        // should we close ProjectsTab?
264
        // should we close ProjectsTab?
262
        ProjectsTab prjToClose = null;
265
        ProjectsTab prjToClose = null;
Lines 275-293 Link Here
275
                    // close top component asociated with this root context
278
                    // close top component asociated with this root context
276
                    // on all workspaces
279
                    // on all workspaces
277
                    
280
                    
278
                    // but not the project since it is a singleton
281
//                    // but not the project since it is a singleton
279
                    // i.e. mark it for closing
282
//                    // i.e. mark it for closing
280
                    if (NbProjectOperation.hasProjectDesktop()) {
283
//                    if (NbProjectOperation.hasProjectDesktop()) {
281
                        if (NbProjectOperation.getProjectDesktop().getClass() == r.getClass()) {
284
//                        if (NbProjectOperation.getProjectDesktop().getClass() == r.getClass()) {
282
                            prjToClose = (ProjectsTab) me.getValue();
285
//                            prjToClose = (ProjectsTab) me.getValue();
283
                            continue;
286
//                            continue;
284
                        }
287
//                        }
285
                        // bugfix #19129 if there is a project opened
288
//                        // bugfix #19129 if there is a project opened
286
                        // then the project tab shouldn't be closed
289
//                        // then the project tab shouldn't be closed
287
                        if (me.getValue() instanceof ProjectsTab) {
290
//                        if (me.getValue() instanceof ProjectsTab) {
288
                            continue;
291
//                            continue;
289
                        }
292
//                        }
290
                    }
293
//                    }
291
                    closeEverywhere((TopComponent)me.getValue());
294
                    closeEverywhere((TopComponent)me.getValue());
292
                }
295
                }
293
            }
296
            }
Lines 316-332 Link Here
316
                }
319
                }
317
            }
320
            }
318
            
321
            
319
            if (r.equals(NbProjectOperation.getProjectDesktop())) {
322
//            if (r.equals(NbProjectOperation.getProjectDesktop())) {
320
                // put a request for later validation
323
//                // put a request for later validation
321
                // we must do this here, because of ExplorerManager's deserialization.
324
//                // we must do this here, because of ExplorerManager's deserialization.
322
                // Root context of ExplorerManager is validated AFTER all other
325
//                // Root context of ExplorerManager is validated AFTER all other
323
                // deserialization, so we must wait for it
326
//                // deserialization, so we must wait for it
324
                
327
//                
325
                //assert tc == prjToClose
328
//                //assert tc == prjToClose
326
                tc.scheduleValidation();
329
//                tc.scheduleValidation();
327
                // unmark close flag
330
//                // unmark close flag
328
                prjToClose = null;
331
//                prjToClose = null;
329
            }
332
//            }
330
        }
333
        }
331
        
334
        
332
        if (prjToClose != null) {
335
        if (prjToClose != null) {
Lines 384-402 Link Here
384
    * First goes repository, than root nodes added by modules and at last
387
    * First goes repository, than root nodes added by modules and at last
385
    * runtime root node */
388
    * runtime root node */
386
    public static List getRoots () {
389
    public static List getRoots () {
387
        Places.Nodes ns = TopManager.getDefault().getPlaces().nodes();
390
        NbPlaces places = NbPlaces.getDefault();
388
        // build the list of roots
391
        // build the list of roots
389
        LinkedList result = new LinkedList();
392
        LinkedList result = new LinkedList();
390
        // repository goes first
393
        // repository goes first
391
        result.add(ns.repository());
394
        result.add(RepositoryNodeFactory.getDefault().repository(DataFilter.ALL));
392
        // projects tab (only if projects module is installed)
393
        if (NbProjectOperation.hasProjectDesktop()) {
394
            result.add(NbProjectOperation.getProjectDesktop());
395
        }
396
        // roots added by modules (javadoc etc...)
395
        // roots added by modules (javadoc etc...)
397
        result.addAll(Arrays.asList(ns.roots()));
396
        result.addAll(Arrays.asList(places.roots()));
398
        // runtime
397
        // runtime
399
        result.add(ns.environment());
398
        result.add(places.environment());
400
399
401
        return result;
400
        return result;
402
    }
401
    }
Lines 406-418 Link Here
406
    private ExplorerTab createTC (Node rc) {
405
    private ExplorerTab createTC (Node rc) {
407
        // switch according to the type of the root context
406
        // switch according to the type of the root context
408
        MainTab panel = null;
407
        MainTab panel = null;
409
        Places.Nodes ns = TopManager.getDefault().getPlaces().nodes();
408
        NbPlaces places = NbPlaces.getDefault();
410
        if (rc.equals(NbProjectOperation.getProjectDesktop())) {
409
        if (rc.equals(places.projectDesktop())) {
411
            // projects tab
410
            // projects tab
412
            panel = ProjectsTab.getDefault();
411
            panel = ProjectsTab.getDefault();
413
        } else if (rc.equals(ns.repository())) {
412
        } else 
413
        if (rc.equals(RepositoryNodeFactory.getDefault().repository(DataFilter.ALL))) {
414
            panel = RepositoryTab.getDefaultRepositoryTab();
414
            panel = RepositoryTab.getDefaultRepositoryTab();
415
        } else if (rc.equals(ns.environment())) {
415
        } else if (rc.equals(places.environment())) {
416
            // default tabs
416
            // default tabs
417
            panel = MainTab.getDefaultMainTab();
417
            panel = MainTab.getDefaultMainTab();
418
        } else {
418
        } else {
Lines 839-845 Link Here
839
         */
839
         */
840
        public static MainTab createEnvironmentTab () {
840
        public static MainTab createEnvironmentTab () {
841
            return (MainTab)getExplorer().createTC(
841
            return (MainTab)getExplorer().createTC(
842
                NbPlaces.getDefault().nodes().environment()
842
                NbPlaces.getDefault().environment()
843
            );
843
            );
844
        }
844
        }
845
845
Lines 910-916 Link Here
910
        /** attaches itself to as a listener.
910
        /** attaches itself to as a listener.
911
        */
911
        */
912
        public RepositoryTab () {
912
        public RepositoryTab () {
913
            DataLoaderPool pool = TopManager.getDefault ().getLoaderPool ();
913
            DataLoaderPool pool = (DataLoaderPool)Lookup.getDefault ().lookup (DataLoaderPool.class);
914
            pool.addOperationListener (
914
            pool.addOperationListener (
915
                WeakListener.operation (this, pool)
915
                WeakListener.operation (this, pool)
916
            );
916
            );
Lines 934-940 Link Here
934
         */
934
         */
935
        public static RepositoryTab createRepositoryTab () {
935
        public static RepositoryTab createRepositoryTab () {
936
            return (RepositoryTab)getExplorer().createTC(
936
            return (RepositoryTab)getExplorer().createTC(
937
                NbPlaces.getDefault().nodes().repository()
937
                RepositoryNodeFactory.getDefault().repository(DataFilter.ALL)
938
            );
938
            );
939
        }
939
        }
940
940
Lines 1101-1107 Link Here
1101
        /** Exchanges deserialized root context to projects root context
1101
        /** Exchanges deserialized root context to projects root context
1102
        * to keep the uniquennes. */
1102
        * to keep the uniquennes. */
1103
        protected void validateRootContext () {
1103
        protected void validateRootContext () {
1104
            Node projectsRc = NbProjectOperation.getProjectDesktop();
1104
            Node projectsRc = NbPlaces.getDefault().projectDesktop();
1105
            setRootContext(projectsRc);
1105
            setRootContext(projectsRc);
1106
            registerRootContext(projectsRc);
1106
            registerRootContext(projectsRc);
1107
        }
1107
        }
Lines 1135-1141 Link Here
1135
        protected void validateRootContext () {
1135
        protected void validateRootContext () {
1136
            // find proper node
1136
            // find proper node
1137
            Class nodeClass = getExplorerManager().getRootContext().getClass();
1137
            Class nodeClass = getExplorerManager().getRootContext().getClass();
1138
            Node[] roots = TopManager.getDefault().getPlaces().nodes().roots();
1138
            Node[] roots = NbPlaces.getDefault().roots();
1139
            for (int i = 0; i < roots.length; i++) {
1139
            for (int i = 0; i < roots.length; i++) {
1140
                if (nodeClass.equals(roots[i].getClass())) {
1140
                if (nodeClass.equals(roots[i].getClass())) {
1141
                    setRootContext(roots[i]);
1141
                    setRootContext(roots[i]);
Lines 1211-1226 Link Here
1211
1211
1212
    /** Listener on roots, listens to changes of roots content */
1212
    /** Listener on roots, listens to changes of roots content */
1213
    private final class RootsListener extends Object
1213
    private final class RootsListener extends Object
1214
        implements PropertyChangeListener {
1214
        implements ChangeListener {
1215
        public void propertyChange (PropertyChangeEvent evt) {
1215
        public void stateChanged(ChangeEvent e) {
1216
            if (TopManager.PROP_PLACES.equals(evt.getPropertyName())) {
1217
                // possible change in list of roots
1216
                // possible change in list of roots
1218
                // defer refresh request if window system is in inconsistent state
1217
                // defer refresh request if window system is in inconsistent state
1219
                WindowManagerImpl.deferredPerformer().putRequest(
1218
                WindowManagerImpl.deferredPerformer().putRequest(
1220
                    NbMainExplorer.getExplorer(), 
1219
                    NbMainExplorer.getExplorer(), 
1221
                    new DeferredPerformer.DeferredContext(null, true)
1220
                    new DeferredPerformer.DeferredContext(null, true)
1222
                );
1221
                );
1223
            }
1224
        }
1222
        }
1225
    } // end of RootsListener inner class
1223
    } // end of RootsListener inner class
1226
1224
(-)core/src/org/netbeans/core/NbNodeOperation.java (-4 / +4 lines)
Lines 57-64 Link Here
57
import org.openide.nodes.NodeEvent;
57
import org.openide.nodes.NodeEvent;
58
import org.openide.nodes.NodeListener;
58
import org.openide.nodes.NodeListener;
59
import org.openide.nodes.NodeOp;
59
import org.openide.nodes.NodeOp;
60
import org.openide.nodes.NodeOperation;
60
import org.openide.nodes.NodeReorderEvent;
61
import org.openide.nodes.NodeReorderEvent;
61
import org.openide.TopManager;
62
import org.openide.util.HelpCtx;
62
import org.openide.util.HelpCtx;
63
import org.openide.util.NbBundle;
63
import org.openide.util.NbBundle;
64
import org.openide.util.Mutex;
64
import org.openide.util.Mutex;
Lines 80-86 Link Here
80
 *
80
 *
81
 * @author  Ian Formanek
81
 * @author  Ian Formanek
82
 */
82
 */
83
public final class NbNodeOperation extends TopManager.NodeOperation {
83
public final class NbNodeOperation extends NodeOperation {
84
84
85
    /**
85
    /**
86
     * Name of a property that can be passed in a Node instance. The value
86
     * Name of a property that can be passed in a Node instance. The value
Lines 168-174 Link Here
168
                         NbBundle.getMessage (ModuleFSSection.class, "CTL_Customizer_dialog_title"));
168
                         NbBundle.getMessage (ModuleFSSection.class, "CTL_Customizer_dialog_title"));
169
                    dd.setOptions(new Object[] { DialogDescriptor.CLOSED_OPTION });
169
                    dd.setOptions(new Object[] { DialogDescriptor.CLOSED_OPTION });
170
170
171
                    Dialog dialog = TopManager.getDefault ().createDialog(dd);
171
                    Dialog dialog = org.openide.DialogDisplayer.getDefault ().createDialog(dd);
172
                    dialog.pack();
172
                    dialog.pack();
173
                    dialog.show();
173
                    dialog.show();
174
                    return Boolean.TRUE;
174
                    return Boolean.TRUE;
Lines 287-293 Link Here
287
                        tc.open();
287
                        tc.open();
288
                        tc.requestFocus();
288
                        tc.requestFocus();
289
                    } else {
289
                    } else {
290
                        TopManager.getDefault().createDialog(new DialogDescriptor (
290
                        org.openide.DialogDisplayer.getDefault().createDialog(new DialogDescriptor (
291
                            tc,
291
                            tc,
292
                            tc.getName(),
292
                            tc.getName(),
293
                            true,
293
                            true,
(-)core/src/org/netbeans/core/NbPlaces.java (-66 / +51 lines)
Lines 15-20 Link Here
15
15
16
import java.io.*;
16
import java.io.*;
17
import java.util.*;
17
import java.util.*;
18
import javax.swing.event.ChangeEvent;
19
import javax.swing.event.ChangeListener;
18
20
19
import org.openide.*;
21
import org.openide.*;
20
import org.openide.loaders.DataFilter;
22
import org.openide.loaders.DataFilter;
Lines 22-27 Link Here
22
import org.openide.loaders.DataObject;
24
import org.openide.loaders.DataObject;
23
import org.openide.filesystems.FileObject;
25
import org.openide.filesystems.FileObject;
24
import org.openide.filesystems.FileSystem;
26
import org.openide.filesystems.FileSystem;
27
import org.openide.filesystems.Repository;
25
import org.openide.nodes.*;
28
import org.openide.nodes.*;
26
import org.openide.util.HelpCtx;
29
import org.openide.util.HelpCtx;
27
import org.openide.util.NbBundle;
30
import org.openide.util.NbBundle;
Lines 32-99 Link Here
32
35
33
import org.netbeans.core.windows.nodes.WorkspacePoolContext;
36
import org.netbeans.core.windows.nodes.WorkspacePoolContext;
34
import org.netbeans.core.modules.ManifestSection;
37
import org.netbeans.core.modules.ManifestSection;
38
import org.netbeans.core.ui.MountNode;
39
import org.openide.loaders.RepositoryNodeFactory;
35
40
36
/** Important places in the system.
41
/** Important places in the system.
37
*
42
*
38
* @author Jaroslav Tulach
43
* @author Jaroslav Tulach
39
*/
44
*/
40
public final class NbPlaces extends Object implements Places, Places.Nodes, Places.Folders {
45
public final class NbPlaces extends Object {
41
    /** default */
42
    private static NbPlaces places;
43
    
46
    
44
    /** A node to return if ProjectDesktop node == null */
47
    /** A node to return if ProjectDesktop node == null */
45
    private static final Node EMPTY_PROJECT_DESKTOP_NODE = new AbstractNode( Children.LEAF );
48
    private static final Node EMPTY_PROJECT_DESKTOP_NODE = new AbstractNode( Children.LEAF );
46
    
49
    
50
    private final List listeners = new ArrayList(); // List<ChangeListener>
51
    
47
    /** No instance outside this class.
52
    /** No instance outside this class.
48
    */
53
    */
49
    public NbPlaces() {
54
    private NbPlaces() {
50
    }
55
    }
51
    
56
    
57
    private static NbPlaces DEFAULT;
58
    
52
    /** Getter for default instance.
59
    /** Getter for default instance.
53
     */
60
     */
54
    public static Places getDefault () {
61
    public static synchronized NbPlaces getDefault() {
55
        return (Places)org.openide.util.Lookup.getDefault ().lookup (Places.class);
62
        if (DEFAULT == null) {
56
    }
63
            DEFAULT = new NbPlaces();
57
64
        }
58
    /** Interesting places for nodes.
65
        return DEFAULT;
59
    * @return object that holds "node places"
60
    */
61
    public Places.Nodes nodes () {
62
        return this;
63
    }
64
65
    /** Interesting places for data objects.
66
    * @return interface that provides access to data objects' places
67
    */
68
    public Places.Folders folders () {
69
        return this;
70
    }
71
72
    /** Repository node.
73
    */
74
    public Node repository () {
75
        return DataSystem.getDataSystem ();
76
    }
66
    }
77
67
    
78
    /** Repository node with given DataFilter. */
68
    public void addChangeListener(ChangeListener l) {
79
    public Node repository(DataFilter f) {
69
        synchronized (listeners) {
80
        return DataSystem.getDataSystem (f);
70
            listeners.add(l);
71
        }
81
    }
72
    }
82
73
    
83
    /**
74
    public void removeChangeListener(ChangeListener l) {
84
     * Implements <code>org.openide.Places.Nodes interface method.
75
        synchronized (listeners) {
85
     * <em>Note: This method is no longer supported.</em>
76
            listeners.remove(l);
86
     * @param f the requested filter
77
        }
87
     * @return empty node */ 
88
    public Node packages (DataFilter f) {
89
        //return PackageChildren.createNode (f);
90
        return Node.EMPTY;
91
    }
78
    }
92
79
    
93
    /** Node with all installed loaders.
80
    private void fireChange() {
94
    */
81
        ChangeListener[] l;
95
    public Node loaderPool () {
82
        synchronized (listeners) {
96
        return LoaderPoolNode.getLoaderPoolNode ();
83
            l = (ChangeListener[])listeners.toArray(new ChangeListener[listeners.size()]);
84
        }
85
        ChangeEvent ev = new ChangeEvent(this);
86
        for (int i = 0; i < l.length; i++) {
87
            l[i].stateChanged(ev);
88
        }
97
    }
89
    }
98
90
99
    /** Environment node. Place for all transient information about
91
    /** Environment node. Place for all transient information about
Lines 109-126 Link Here
109
        return EnvironmentNode.find (ManifestSection.NodeSection.TYPE_SESSION); 
101
        return EnvironmentNode.find (ManifestSection.NodeSection.TYPE_SESSION); 
110
    }
102
    }
111
103
112
    /** Control panel
113
    */
114
    public Node controlPanel () {
115
        return ControlPanelNode.getDefault ();
116
    }
117
118
    /** Project Settings.
119
    */
120
    public Node project () {
121
        return ControlPanelNode.getProjectSettings ();
122
    }
123
124
    /** Node with all workspaces */
104
    /** Node with all workspaces */
125
    public Node workspaces () {
105
    public Node workspaces () {
126
        return WorkspacePoolContext.getDefault ();
106
        return WorkspacePoolContext.getDefault ();
Lines 128-141 Link Here
128
108
129
    /** Repository settings */
109
    /** Repository settings */
130
    public Node repositorySettings () {
110
    public Node repositorySettings () {
131
        return new org.netbeans.core.ui.MountNode ();
111
        return new MountNode ();
132
    }
112
    }
133
113
134
    /** Workspace node for current project. This node can change when project changes.
114
    /** Workspace node for current project. This node can change when project changes.
135
    */
115
    */
136
    public Node projectDesktop () {
116
    public Node projectDesktop () {
137
        Node pn = NbProjectOperation.getProjectDesktop ();
117
        return workplace().getNodeDelegate();
138
        return pn == null ? EMPTY_PROJECT_DESKTOP_NODE : pn;
139
    }
118
    }
140
119
141
    /** Root nodes.
120
    /** Root nodes.
Lines 195-202 Link Here
195
     /** Getter for project workplace. A folder that is presented to the
174
     /** Getter for project workplace. A folder that is presented to the
196
     * user as project desktop.
175
     * user as project desktop.
197
     */
176
     */
198
     public DataFolder workplace () {
177
    public DataFolder workplace() {
199
         return (DataFolder) TopManager.getDefault().getPlaces().nodes().projectDesktop().getCookie(DataFolder.class);
178
         return findSessionFolder("Workplace"); // NOI18N
200
     }
179
     }
201
     
180
     
202
     /**
181
     /**
Lines 204-212 Link Here
204
     * folders go first (sorted by name) followed by the rest of objects sorted
183
     * folders go first (sorted by name) followed by the rest of objects sorted
205
     * by name.
184
     * by name.
206
     */
185
     */
207
     public static synchronized DataFolder findSessionFolder (String name) {
186
     public synchronized DataFolder findSessionFolder (String name) {
208
        try {
187
        try {
209
            FileSystem fs = NbTopManager.get ().getRepository().getDefaultFileSystem ();
188
            FileSystem fs = Repository.getDefault().getDefaultFileSystem ();
210
            FileObject fo = fs.findResource(name);
189
            FileObject fo = fs.findResource(name);
211
            if (fo == null) {
190
            if (fo == null) {
212
                // resource not found, try to create new folder
191
                // resource not found, try to create new folder
Lines 221-228 Link Here
221
        }
200
        }
222
    }
201
    }
223
    
202
    
203
     /** Create new children of some type of master nodes.
204
      * @param name name of the node section to recognize
205
      */
206
     public Children createChildren(String name) {
207
         return new Ch(name);
208
     }
224
    
209
    
225
    final static class Ch extends Children.Keys 
210
    private final class Ch extends Children.Keys 
226
    implements LookupListener, NodeListener {
211
    implements LookupListener, NodeListener {
227
        /** result */
212
        /** result */
228
        private Lookup.Result result;
213
        private Lookup.Result result;
Lines 257-263 Link Here
257
242
258
        /** Static method to compute a Lookup.Result from a template.
243
        /** Static method to compute a Lookup.Result from a template.
259
         */
244
         */
260
        private static Lookup.Result re (String n) {
245
        private Lookup.Result re (String n) {
261
            Lookup.Template t = new Lookup.Template (ManifestSection.NodeSection.class);
246
            Lookup.Template t = new Lookup.Template (ManifestSection.NodeSection.class);
262
            return Lookup.getDefault ().lookup (t);
247
            return Lookup.getDefault ().lookup (t);
263
        }
248
        }
Lines 272-278 Link Here
272
            
257
            
273
            if (ManifestSection.NodeSection.TYPE_ROOTS.equals (sectionName)) {
258
            if (ManifestSection.NodeSection.TYPE_ROOTS.equals (sectionName)) {
274
                // notify that the set of nodes has changed (probably)
259
                // notify that the set of nodes has changed (probably)
275
                NbTopManager.get ().firePropertyChange (TopManager.PROP_PLACES, null, null);
260
                NbPlaces.this.fireChange();
276
            }
261
            }
277
        }
262
        }
278
263
(-)core/src/org/netbeans/core/NbPresenter.java (-2 / +1 lines)
Lines 29-35 Link Here
29
import org.openide.DialogDescriptor;
29
import org.openide.DialogDescriptor;
30
import org.openide.WizardDescriptor;
30
import org.openide.WizardDescriptor;
31
31
32
import org.openide.TopManager;
33
import org.openide.util.*;
32
import org.openide.util.*;
34
import org.openide.explorer.ExplorerManager;
33
import org.openide.explorer.ExplorerManager;
35
34
Lines 887-893 Link Here
887
                pressedOption = NotifyDescriptor.CLOSED_OPTION;
886
                pressedOption = NotifyDescriptor.CLOSED_OPTION;
888
            } else {
887
            } else {
889
                if (evt.getSource() == stdHelpButton) {
888
                if (evt.getSource() == stdHelpButton) {
890
                    TopManager.getDefault().showHelp(currentHelp);
889
                    NbTopManager.get().showHelp(currentHelp);
891
                    return;
890
                    return;
892
                }
891
                }
893
                
892
                
(-)core/src/org/netbeans/core/NbTopManager.java (-262 / +197 lines)
Lines 24-32 Link Here
24
import java.util.ArrayList;
24
import java.util.ArrayList;
25
import java.util.Iterator;
25
import java.util.Iterator;
26
import java.text.MessageFormat;
26
import java.text.MessageFormat;
27
import java.util.List;
27
import javax.swing.*;
28
import javax.swing.*;
28
import javax.swing.text.Keymap;
29
import javax.swing.text.Keymap;
29
import javax.swing.border.*;
30
import javax.swing.border.*;
31
import javax.swing.event.ChangeEvent;
32
import javax.swing.event.ChangeListener;
30
33
31
import org.openide.util.datatransfer.ExClipboard;
34
import org.openide.util.datatransfer.ExClipboard;
32
import org.openide.*;
35
import org.openide.*;
Lines 34-52 Link Here
34
import org.openide.loaders.*;
37
import org.openide.loaders.*;
35
import org.openide.actions.*;
38
import org.openide.actions.*;
36
import org.openide.cookies.SaveCookie;
39
import org.openide.cookies.SaveCookie;
37
import org.openide.cookies.ProjectCookie;
38
import org.openide.debugger.Debugger;
39
import org.openide.debugger.DebuggerNotFoundException;
40
import org.openide.filesystems.*;
40
import org.openide.filesystems.*;
41
import org.openide.filesystems.FileSystem;
41
import org.openide.filesystems.FileSystem;
42
import org.openide.filesystems.JarFileSystem;
42
import org.openide.filesystems.JarFileSystem;
43
import org.openide.modules.Dependency;
43
import org.openide.modules.Dependency;
44
import org.openide.modules.SpecificationVersion;
44
import org.openide.modules.SpecificationVersion;
45
import org.openide.options.ControlPanel;
46
import org.openide.windows.WindowManager;
45
import org.openide.windows.WindowManager;
47
import org.openide.windows.OutputWriter;
46
import org.openide.windows.OutputWriter;
48
import org.openide.windows.InputOutput;
47
import org.openide.windows.InputOutput;
49
import org.openide.windows.TopComponent;
48
import org.openide.windows.TopComponent;
49
import org.openide.windows.IOProvider;
50
import org.openide.explorer.*;
50
import org.openide.explorer.*;
51
import org.openide.explorer.view.BeanTreeView;
51
import org.openide.explorer.view.BeanTreeView;
52
import org.openide.util.*;
52
import org.openide.util.*;
Lines 58-73 Link Here
58
import org.netbeans.core.output.OutputTabTerm;
58
import org.netbeans.core.output.OutputTabTerm;
59
import org.netbeans.core.windows.WindowManagerImpl;
59
import org.netbeans.core.windows.WindowManagerImpl;
60
import org.netbeans.core.execution.TopSecurityManager;
60
import org.netbeans.core.execution.TopSecurityManager;
61
import org.netbeans.core.modules.Module;
61
import org.netbeans.core.perftool.StartLog;
62
import org.netbeans.core.perftool.StartLog;
62
import org.netbeans.core.modules.ModuleManager;
63
import org.netbeans.core.modules.ModuleManager;
63
import org.netbeans.core.modules.ModuleSystem;
64
import org.netbeans.core.modules.ModuleSystem;
65
import org.netbeans.core.projects.TrivialProjectManager;
64
import org.netbeans.core.windows.util.WindowUtils;
66
import org.netbeans.core.windows.util.WindowUtils;
67
import org.openide.modules.ModuleInfo;
68
import org.openide.util.lookup.InstanceContent;
65
69
66
/** This class is a TopManager for Corona environment.
70
/** This class is a TopManager for Corona environment.
67
*
71
*
68
* @author Ales Novak, Jaroslav Tulach, Ian Formanek, Petr Hamernik, Jan Jancura, Jesse Glick
72
* @author Ales Novak, Jaroslav Tulach, Ian Formanek, Petr Hamernik, Jan Jancura, Jesse Glick
69
*/
73
*/
70
public abstract class NbTopManager extends TopManager {
74
public abstract class NbTopManager /*extends TopManager*/ {
71
    /* masks to define the interactivity level */
75
    /* masks to define the interactivity level */
72
76
73
    /** initialize the main window?
77
    /** initialize the main window?
Lines 88-101 Link Here
88
    public static final int IL_ALL = 0xffff;
92
    public static final int IL_ALL = 0xffff;
89
93
90
94
91
    /** property for status text */
92
    public static final String PROP_STATUS_TEXT = "statusText"; // NOI18N
93
    
94
    /** property for system class loader */
95
    public static final String PROP_SYSTEM_CLASS_LOADER = "systemClassLoader"; // NOI18N
96
    /** property for current class loader */
97
    public static final String PROP_CURRENT_CLASS_LOADER = "currentClassLoader"; // NOI18N
98
99
    /** stores main shortcut context*/
95
    /** stores main shortcut context*/
100
    private Keymap shortcutContext;
96
    private Keymap shortcutContext;
101
97
Lines 110-124 Link Here
110
    /** error manager */
106
    /** error manager */
111
    private static ErrorManager defaultErrorManager;
107
    private static ErrorManager defaultErrorManager;
112
108
113
    /** WWW browser window. */
114
    private HtmlBrowser.BrowserComponent htmlViewer;
115
116
    /** ProjectOperation main variable */
117
    static NbProjectOperation projectOperation;
118
119
    /** support for listeners */
120
    private PropertyChangeSupport change = new PropertyChangeSupport (this);
121
122
    /** repository */
109
    /** repository */
123
    private Repository defaultRepository;
110
    private Repository defaultRepository;
124
111
Lines 128-156 Link Here
128
    /** status text */
115
    /** status text */
129
    private String statusText = " "; // NOI18N
116
    private String statusText = " "; // NOI18N
130
117
131
    /** the debugger listener listening on adding/removing debugger*/
132
    private static LookupListener debuggerLsnr = null;
133
    /** the lookup query finding all registered debuggers */
134
    private static Lookup.Result debuggerLkpRes = null;
135
    
136
    /** initializes properties about builds etc. */
118
    /** initializes properties about builds etc. */
137
    static {
119
    static {
120
        org.openide.filesystems.FileObject fo = null;
138
        // Set up module-versioning properties, which logger prints.
121
        // Set up module-versioning properties, which logger prints.
139
        Package p = Package.getPackage ("org.openide"); // NOI18N
122
        // The package here must be one which exists only in openide.jar, not openide-deprecated.jar:
123
        Object ignoreme = FileSystem.class;
124
        Package p = Package.getPackage ("org.openide.filesystems"); // NOI18N
140
        
125
        
141
        putSystemProperty ("org.openide.specification.version", p.getSpecificationVersion (), "3.12"); // NOI18N
126
        putSystemProperty ("org.openide.specification.version", p.getSpecificationVersion (), "3.14"); // NOI18N
142
        putSystemProperty ("org.openide.version", p.getImplementationVersion (), "OwnBuild"); // NOI18N
127
        putSystemProperty ("org.openide.version", p.getImplementationVersion (), "OwnBuild"); // NOI18N
143
        putSystemProperty ("org.openide.major.version", p.getSpecificationTitle (), "IDE/1"); // NOI18N
128
        putSystemProperty ("org.openide.major.version", p.getSpecificationTitle (), "IDE/1"); // NOI18N
144
        putSystemProperty ("netbeans.buildnumber", p.getImplementationVersion (), "OwnBuild"); // NOI18N
129
        putSystemProperty ("netbeans.buildnumber", p.getImplementationVersion (), "OwnBuild"); // NOI18N
145
        
130
        
146
        if (System.getProperties ().get ("org.openide.util.Lookup") == null) { // NOI18N
147
          // update the top manager to our main if it has not been provided yet
148
          System.getProperties().put (
149
            "org.openide.util.Lookup", // NOI18N
150
            "org.netbeans.core.NbTopManager$Lkp" // NOI18N
151
          );
152
        }
153
        
154
        // Enforce JDK 1.3+ since we would not work without it.
131
        // Enforce JDK 1.3+ since we would not work without it.
155
        if (Dependency.JAVA_SPEC.compareTo(new SpecificationVersion("1.3")) < 0) { // NOI18N
132
        if (Dependency.JAVA_SPEC.compareTo(new SpecificationVersion("1.3")) < 0) { // NOI18N
156
            System.err.println("The IDE requires JDK 1.3 or higher to run."); // XXX I18N?
133
            System.err.println("The IDE requires JDK 1.3 or higher to run."); // XXX I18N?
Lines 218-230 Link Here
218
    public NbTopManager() {
195
    public NbTopManager() {
219
        instanceContent = new InstanceContent ();
196
        instanceContent = new InstanceContent ();
220
        instanceLookup = new AbstractLookup (instanceContent);
197
        instanceLookup = new AbstractLookup (instanceContent);
221
        register (ClassLoaderConvertor.CLASSLOADER, ClassLoaderConvertor.CLASSLOADER);
198
        if (!(Lookup.getDefault() instanceof Lkp)) {
199
            throw new ClassCastException("Wrong Lookup impl found: " + Lookup.getDefault());
200
        }
222
    }
201
    }
223
202
224
    /** Getter for instance of this manager.
203
    /** Getter for instance of this manager.
225
    */
204
    */
226
    public static NbTopManager get () {
205
    public static NbTopManager get () {
227
        return (NbTopManager)TopManager.getDefault ();
206
//        return (NbTopManager)TopManager.getDefault ();
207
        return getNbTopManager();
208
    }
209
        
210
    private static NbTopManager defaultTopManager; 
211
    
212
    public static synchronized boolean isInitialized () {
213
        return defaultTopManager != null;
214
    }
215
    
216
    private static /*synchronized*/ NbTopManager getNbTopManager () {
217
        // synchronization check
218
        if (defaultTopManager != null) {
219
            return defaultTopManager;
220
        }
221
222
        // XXX double check like it was in TopManager, otherwise led to deadlock at
223
        // start, needs to be revised.
224
        synchronized(NbTopManager.class) {
225
            String className = System.getProperty(
226
                                   "org.openide.TopManager", // NOI18N
227
                                   "org.netbeans.core.Plain" // NOI18N
228
                               );
229
230
            try {
231
                Class c = Class.forName(className);
232
                defaultTopManager = (NbTopManager)c.newInstance();
233
            } catch (Exception ex) {
234
                ex.printStackTrace();
235
                throw new IllegalStateException();
236
            }
237
238
            // late initialization of the manager if needed
239
            if (defaultTopManager instanceof Runnable) {
240
                ((Runnable)defaultTopManager).run ();
241
            }
242
243
            return defaultTopManager;
244
        }
228
    }
245
    }
229
246
230
    /** Test method to check whether some level of interactivity is enabled.
247
    /** Test method to check whether some level of interactivity is enabled.
Lines 292-302 Link Here
292
309
293
    /** Shows a specified HelpCtx in IDE's help window.
310
    /** Shows a specified HelpCtx in IDE's help window.
294
    * @param helpCtx thehelp to be shown
311
    * @param helpCtx thehelp to be shown
312
     * @deprecated Better to use org.netbeans.api.javahelp.Help
295
    */
313
    */
296
    public void showHelp(HelpCtx helpCtx) {
314
    public void showHelp(HelpCtx helpCtx) {
297
        // Awkward but should work.
315
        // Awkward but should work.
298
        try {
316
        try {
299
            Class c = systemClassLoader().loadClass("org.netbeans.api.javahelp.Help"); // NOI18N
317
            Class c = ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass("org.netbeans.api.javahelp.Help"); // NOI18N
300
            Object o = Lookup.getDefault().lookup(c);
318
            Object o = Lookup.getDefault().lookup(c);
301
            if (o != null) {
319
            if (o != null) {
302
                Method m = c.getMethod("showHelp", new Class[] {HelpCtx.class}); // NOI18N
320
                Method m = c.getMethod("showHelp", new Class[] {HelpCtx.class}); // NOI18N
Lines 307-334 Link Here
307
            // ignore - maybe javahelp module is not installed, not so strange
325
            // ignore - maybe javahelp module is not installed, not so strange
308
        } catch (Exception e) {
326
        } catch (Exception e) {
309
            // potentially more serious
327
            // potentially more serious
310
            getErrorManager().notify(ErrorManager.INFORMATIONAL, e);
328
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
311
        }
329
        }
312
        // Did not work.
330
        // Did not work.
313
        Toolkit.getDefaultToolkit().beep();
331
        Toolkit.getDefaultToolkit().beep();
314
    }
332
    }
315
333
316
    /** Provides support for www documents.
334
    public static final class NbURLDisplayer extends HtmlBrowser.URLDisplayer {
317
    * @param url Url of WWW document to be showen.
335
        /** WWW browser window. */
318
    */
336
        HtmlBrowser.BrowserComponent htmlViewer;
319
    public void showUrl (URL url) {
337
        public void showURL(URL u) {
320
        if (htmlViewer == null) htmlViewer = new NbBrowser ();
338
            if (htmlViewer == null) htmlViewer = new NbBrowser ();
321
339
            ((NbBrowser)htmlViewer).showUrl(u);
322
	((NbBrowser)htmlViewer).showUrl (url);
340
        }
323
    }
341
    }
324
342
325
    private static WindowManager wmgr = null;
343
    private static WindowManager wmgr = null;
344
    private static final Object windowManagerLock = new String("NbTopManager.windowManagerLock"); // NOI18N
326
    /** @return a window manager impl or null */
345
    /** @return a window manager impl or null */
327
    private static synchronized WindowManager getDefaultWindowManager() {
346
    private static WindowManager getDefaultWindowManager() {
328
        if (wmgr == null) {
347
        synchronized (windowManagerLock) {
329
            wmgr = (WindowManager)Lookup.getDefault().lookup(WindowManager.class);
348
            if (wmgr == null) {
349
                wmgr = (WindowManager)Lookup.getDefault().lookup(WindowManager.class);
350
            }
351
            return wmgr;
330
        }
352
        }
331
        return wmgr;
332
    }
353
    }
333
    /** @return the main window from the window manager impl or null */
354
    /** @return the main window from the window manager impl or null */
334
    static Frame getMainWindow() {
355
    static Frame getMainWindow() {
Lines 354-359 Link Here
354
        }
375
        }
355
    }
376
    }
356
377
378
    public static final class NbDialogDisplayer extends DialogDisplayer {
379
357
    /** Creates new dialog.
380
    /** Creates new dialog.
358
    */
381
    */
359
    public Dialog createDialog (final DialogDescriptor d) {
382
    public Dialog createDialog (final DialogDescriptor d) {
Lines 370-389 Link Here
370
            }
393
            }
371
        });
394
        });
372
    }
395
    }
373
396
    
374
    /** Opens specified project. Asks to save the previously opened project.
375
    * @exception IOException if error occurs accessing the project
376
    * @exception UserCancelException if the selection is interrupted by the user
377
    */
378
    public void openProject (ProjectCookie project) throws IOException, UserCancelException {
379
        if (ExitDialog.showDialog (null, true)) {
380
            NbProjectOperation.setOpeningProject (project);
381
        }
382
        else {
383
            throw new UserCancelException ();
384
        }
385
    }
386
387
    /** Notifies user by a dialog.
397
    /** Notifies user by a dialog.
388
    * @param descriptor description that contains needed informations
398
    * @param descriptor description that contains needed informations
389
    * @return the option that has been choosen in the notification
399
    * @return the option that has been choosen in the notification
Lines 431-494 Link Here
431
            });
441
            });
432
    }
442
    }
433
443
434
    /** Shows specified text in MainWindow's status line.
435
    * @param text the text to be shown
436
    */
437
    public final void setStatusText(String text) {
438
        if (text == null || text.length () == 0) {
439
            text = " "; // NOI18N
440
        }
441
        if (text.equals(statusText)) return;
442
        String old = statusText;
443
        statusText = text;
444
        setStatusTextImpl(text);
445
        firePropertyChange (PROP_STATUS_TEXT, old, text);
446
    }
444
    }
447
    protected abstract void setStatusTextImpl(String text);
448
445
449
    /** Getter for status text.
446
    /** Opens specified project. Asks to save the previously opened project.
447
    * @exception IOException if error occurs accessing the project
448
    * @exception UserCancelException if the selection is interrupted by the user
450
    */
449
    */
451
    public String getStatusText () {
450
//    public void openProject (ProjectCookie project) throws IOException, UserCancelException {
452
        return statusText;
451
//        if (ExitDialog.showDialog (null, true)) {
453
    }
452
//            NbProjectOperation.setOpeningProject (project);
453
//        }
454
//        else {
455
//            throw new UserCancelException ();
456
//        }
457
//    } 
454
458
455
    /** Returns currently installed debugger or throws
459
456
    *  DebuggerException (when no debugger is installed)
460
    public static final class NbStatusDisplayer extends org.openide.awt.StatusDisplayer {
457
    * @return currently installed  debugger.
461
        private List listeners = null;
458
    */
462
        private String text = ""; // NOI18N
459
    public Debugger getDebugger () throws DebuggerNotFoundException {
463
        public void setStatusText(String text) {
460
        Iterator it = getDebuggerResult().allInstances().iterator();
464
            ChangeListener[] _listeners;
461
        if (it.hasNext()) return (Debugger) it.next();
465
            synchronized (this) {
462
        throw new DebuggerNotFoundException();
466
                this.text = text;
463
    }
467
                if (listeners == null || listeners.isEmpty()) {
464
    
468
                    _listeners = null;
465
    /** get the lookup query finding all registered debuggers */
469
                } else {
466
    private synchronized Lookup.Result getDebuggerResult() {
470
                    _listeners = (ChangeListener[])listeners.toArray(new ChangeListener[listeners.size()]);
467
        if (debuggerLkpRes == null) {
468
            debuggerLkpRes = Lookup.getDefault().lookup(new Lookup.Template(Debugger.class));
469
        }
470
        return debuggerLkpRes;
471
    }
472
    
473
    /** fire property change PROP_DEBUGGER */
474
    private void fireDebuggerChange() {
475
        firePropertyChange (PROP_DEBUGGER, null, null);
476
    }
477
    
478
    /** initialize listening on adding/removing debugger. */
479
    private void initDebuggerListener() {
480
        Lookup.Result res;
481
        synchronized (this) {
482
            if (debuggerLsnr != null) return;
483
            res = getDebuggerResult();
484
            debuggerLsnr = new LookupListener() {
485
                public void resultChanged(LookupEvent ev) {
486
                    fireDebuggerChange();
487
                }
471
                }
488
            };
472
            }
489
            res.addLookupListener(debuggerLsnr);
473
            if (_listeners != null) {
474
                ChangeEvent e = new ChangeEvent(this);
475
                for (int i = 0; i < _listeners.length; i++) {
476
                    _listeners[i].stateChanged(e);
477
                }
478
            }
479
        }
480
        public synchronized String getStatusText() {
481
            return text;
482
        }
483
        public synchronized void addChangeListener(ChangeListener l) {
484
            if (listeners == null) listeners = new ArrayList();
485
            listeners.add(l);
486
        }
487
        public synchronized void removeChangeListener(ChangeListener l) {
488
            listeners.remove(l);
490
        }
489
        }
491
        res.allClasses();
492
    }
490
    }
493
491
494
    /** Print output writer.
492
    /** Print output writer.
Lines 505-510 Link Here
505
    public InputOutput getIO(String name, boolean newIO) {
503
    public InputOutput getIO(String name, boolean newIO) {
506
        return OutputTabTerm.getIO (name, newIO);
504
        return OutputTabTerm.getIO (name, newIO);
507
    }
505
    }
506
    
507
    public static final class NbIOProvider extends IOProvider {
508
        public InputOutput getIO(String name, boolean newIO) {
509
            return NbTopManager.get().getIO(name, newIO);
510
        }
511
        public OutputWriter getStdOut() {
512
            return NbTopManager.get().getStdOut();
513
        }
514
    }
508
515
509
    /** saves all opened objects */
516
    /** saves all opened objects */
510
    public void saveAll () {
517
    public void saveAll () {
Lines 516-522 Link Here
516
                dobj = modifs[i];
523
                dobj = modifs[i];
517
                SaveCookie sc = (SaveCookie)dobj.getCookie(SaveCookie.class);
524
                SaveCookie sc = (SaveCookie)dobj.getCookie(SaveCookie.class);
518
                if (sc != null) {
525
                if (sc != null) {
519
                    TopManager.getDefault().setStatusText (
526
                    org.openide.awt.StatusDisplayer.getDefault().setStatusText (
520
                        java.text.MessageFormat.format (
527
                        java.text.MessageFormat.format (
521
                            NbBundle.getBundle (NbTopManager.class).getString ("CTL_FMT_SavingMessage"),
528
                            NbBundle.getBundle (NbTopManager.class).getString ("CTL_FMT_SavingMessage"),
522
                            new Object[] { dobj.getName () }
529
                            new Object[] { dobj.getName () }
Lines 538-547 Link Here
538
                            new Object[] { ((DataObject)ee.next()).getPrimaryFile().getName() }
545
                            new Object[] { ((DataObject)ee.next()).getPrimaryFile().getName() }
539
                        )
546
                        )
540
                    );
547
                    );
541
            TopManager.getDefault ().notify (descriptor);
548
            org.openide.DialogDisplayer.getDefault().notify (descriptor);
542
        }
549
        }
543
        // notify user that everything is done
550
        // notify user that everything is done
544
        TopManager.getDefault().setStatusText(
551
        org.openide.awt.StatusDisplayer.getDefault().setStatusText(
545
            NbBundle.getBundle (NbTopManager.class).getString ("MSG_AllSaved"));
552
            NbBundle.getBundle (NbTopManager.class).getString ("MSG_AllSaved"));
546
    }
553
    }
547
554
Lines 560-567 Link Here
560
                    // hide windows explicitly, they are of no use during exit process
567
                    // hide windows explicitly, they are of no use during exit process
561
                    WindowUtils.hideAllFrames();
568
                    WindowUtils.hideAllFrames();
562
                    try {
569
                    try {
563
                        // save project
570
                        try {
564
                        NbProjectOperation.storeLastProject ();
571
                            LoaderPoolNode.store();
572
                        } catch (IOException ioe) {
573
                            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
574
                        }
575
                        // save project, if applicable
576
                        try {
577
                            ((TrivialProjectManager)Lookup.getDefault().lookup(TrivialProjectManager.class)).store();
578
                        } catch (IOException ioe) {
579
                            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
580
                        }
581
                        // save window system, [PENDING] remove this after the winsys will
582
                        // persist its state automaticaly
583
                        ((WindowManagerImpl)getDefaultWindowManager()).persistenceManager ().writeXML ();
584
                        org.netbeans.core.projects.XMLSettingsHandler.saveOptions();
565
                        org.netbeans.core.projects.SessionManager.getDefault().close();
585
                        org.netbeans.core.projects.SessionManager.getDefault().close();
566
                    } catch (ThreadDeath td) {
586
                    } catch (ThreadDeath td) {
567
                        throw td;
587
                        throw td;
Lines 579-584 Link Here
579
            }
599
            }
580
        }
600
        }
581
    }
601
    }
602
    
603
    public static final class NbLifecycleManager extends LifecycleManager {
604
        public void saveAll() {
605
            NbTopManager.get().saveAll();
606
        }
607
        public void exit() {
608
            NbTopManager.get().exit();
609
        }
610
    }
582
611
583
    /** Shows exit dialog for activated File system nodes
612
    /** Shows exit dialog for activated File system nodes
584
    * after unmounting filesystem(s)
613
    * after unmounting filesystem(s)
Lines 591-653 Link Here
591
    /** Get the module subsystem. */
620
    /** Get the module subsystem. */
592
    public abstract ModuleSystem getModuleSystem();
621
    public abstract ModuleSystem getModuleSystem();
593
622
594
    /** Obtains current up-to system classloader
595
    */
596
    public ClassLoader systemClassLoader () {
597
        ModuleSystem ms = getModuleSystem();
598
        if (ms != null) {
599
            // #16265: do not go straight to ModuleManager
600
            return ms.getSystemClassLoader();
601
        } else {
602
            // This can be called very early: if lookup asks for ClassLoader.
603
            // For now, just give the startup classloader.
604
            //System.err.println("Warning: giving out bogus systemClassLoader for now");
605
            //Thread.dumpStack();
606
            return NbTopManager.class.getClassLoader();
607
        }
608
    }
609
    // Access from ModuleSystem and from subclasses when moduleSystem is created:
610
    public final void fireSystemClassLoaderChange() {
611
        //System.err.println("change: systemClassLoader -> " + systemClassLoader());
612
        firePropertyChange(PROP_SYSTEM_CLASS_LOADER, null, null);
613
        Lkp.systemClassLoaderChanged(); // #26245
614
    }
615
616
    /** Obtains current up-to data te classloader
617
    */
618
    public ClassLoader currentClassLoader () {
619
        ClassLoader l = ClassLoaderSupport.currentClassLoader ();
620
        if (l == null) {
621
            System.err.println("SHOULD NEVER HAPPEN: currentClassLoader==null"); // NOI18N
622
            l = systemClassLoader ();
623
        }
624
        return l;
625
    }
626
    // Access from ClassLoaderSupport:
627
    final void fireCurrentClassLoaderChange() {
628
        //System.err.println("change: currentClassLoader");
629
        firePropertyChange(PROP_CURRENT_CLASS_LOADER, null, null);
630
    }
631
632
633
634
    /** Add listener */
635
    public void addPropertyChangeListener (PropertyChangeListener l) {
636
        initDebuggerListener();
637
        change.addPropertyChangeListener (l);
638
    }
639
640
    /** Removes the listener */
641
    public void removePropertyChangeListener (PropertyChangeListener l) {
642
        change.removePropertyChangeListener (l);
643
    }
644
645
    /** Fires property change
646
    */
647
    public void firePropertyChange (String p, Object o, Object n) {
648
        change.firePropertyChange (p, o, n);
649
    }
650
651
    /** Someone running NonGuiMain might want to set this to true.
623
    /** Someone running NonGuiMain might want to set this to true.
652
     * This variable is read from CompilationEngineImpl to determine
624
     * This variable is read from CompilationEngineImpl to determine
653
     * whether to do synchronous compile.
625
     * whether to do synchronous compile.
Lines 733-739 Link Here
733
                ((IDESettings)IDESettings.findObject (IDESettings.class, true)).removePropertyChangeListener (idePCL);
705
                ((IDESettings)IDESettings.findObject (IDESettings.class, true)).removePropertyChangeListener (idePCL);
734
                idePCL = null;
706
                idePCL = null;
735
            }
707
            }
736
            NbTopManager.get ().htmlViewer = null;
708
            ((NbURLDisplayer)HtmlBrowser.URLDisplayer.getDefault()).htmlViewer = null;
737
            return super.closeLast ();
709
            return super.closeLast ();
738
        }
710
        }
739
711
Lines 767-773 Link Here
767
        public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException {
739
        public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException {
768
            super.readExternal (in);
740
            super.readExternal (in);
769
            setListener ();
741
            setListener ();
770
            NbTopManager.get ().htmlViewer = this;
742
            ((NbURLDisplayer)HtmlBrowser.URLDisplayer.getDefault()).htmlViewer = this;
771
        }
743
        }
772
744
773
        /**
745
        /**
Lines 783-789 Link Here
783
                        String name = evt.getPropertyName ();
755
                        String name = evt.getPropertyName ();
784
                        if (name == null) return;
756
                        if (name == null) return;
785
                        if (name.equals (IDESettings.PROP_WWWBROWSER)) {
757
                        if (name.equals (IDESettings.PROP_WWWBROWSER)) {
786
                            NbTopManager.get ().htmlViewer = null;
758
                            ((NbURLDisplayer)HtmlBrowser.URLDisplayer.getDefault()).htmlViewer = null;
787
                            if (idePCL != null) {
759
                            if (idePCL != null) {
788
                                ((IDESettings)IDESettings.findObject (IDESettings.class, true))
760
                                ((IDESettings)IDESettings.findObject (IDESettings.class, true))
789
                                .removePropertyChangeListener (idePCL);
761
                                .removePropertyChangeListener (idePCL);
Lines 795-801 Link Here
795
                ((IDESettings)IDESettings.findObject (IDESettings.class, true)).addPropertyChangeListener (idePCL);
767
                ((IDESettings)IDESettings.findObject (IDESettings.class, true)).addPropertyChangeListener (idePCL);
796
            }
768
            }
797
            catch (Exception ex) {
769
            catch (Exception ex) {
798
                NbTopManager.get ().notifyException (ex);
770
                ErrorManager.getDefault().notify(ex);
799
            }
771
            }
800
        }
772
        }
801
    }
773
    }
Lines 807-877 Link Here
807
        private Task initTask;
779
        private Task initTask;
808
        /** thread that initialized the task and has to recieve good results */
780
        /** thread that initialized the task and has to recieve good results */
809
        private Thread initThread;
781
        private Thread initThread;
782
        /** currently effective ClassLoader */
783
        private static ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
810
        
784
        
811
        /** Initialize the lookup to delegate to NbTopManager.
785
        /** Initialize the lookup to delegate to NbTopManager.
812
        */
786
        */
813
        public Lkp () {
787
        public Lkp () {
814
            super (new Lookup[] {
788
            super (new Lookup[] {
815
                       // #14722: pay attention also to META-INF/services/class.Name resources:
789
                       // #14722: pay attention also to META-INF/services/class.Name resources:
816
                       createMetaInfServicesLookup(false),
790
                       createMetaInfServicesLookup(),
791
                       Lookups.singleton(classLoader),
817
                   });
792
                   });
818
        }
793
        }
819
        
794
                
820
        /** @param modules if true, use module classloader, else not */
795
        private static Lookup createMetaInfServicesLookup() {
821
        private static Lookup createMetaInfServicesLookup(boolean modules) {
822
            //System.err.println("cMISL: modules=" + modules);
796
            //System.err.println("cMISL: modules=" + modules);
823
            try {
797
            try {
824
                // XXX consider just making this a public class!
798
                // XXX consider just making this a public class!
799
                // or making Lookups.metaInfServices(ClassLoader) static utility method
825
                Class clazz = Class.forName("org.openide.util.MetaInfServicesLookup"); // NOI18N
800
                Class clazz = Class.forName("org.openide.util.MetaInfServicesLookup"); // NOI18N
826
                Constructor c = clazz.getDeclaredConstructor(new Class[] {ClassLoader.class});
801
                Constructor c = clazz.getDeclaredConstructor(new Class[] {ClassLoader.class});
827
                c.setAccessible(true);
802
                c.setAccessible(true);
828
                ClassLoader loader;
803
                return (Lookup)c.newInstance(new Object[] {classLoader});
829
                if (modules) {
830
                    loader = get().getModuleSystem().getManager().getClassLoader();
831
                } else {
832
                    loader = Lkp.class.getClassLoader();
833
                }
834
                return (Lookup)c.newInstance(new Object[] {loader});
835
            } catch (Exception e) {
804
            } catch (Exception e) {
836
                e.printStackTrace();
805
                e.printStackTrace();
837
                return Lookup.EMPTY;
806
                return Lookup.EMPTY;
838
            }
807
            }
839
        }
808
        }
840
        
809
        
841
        private static final class ConvertorListener
810
        /** Called when a system classloader changes.
842
                implements PropertyChangeListener {
811
         */
843
            public void propertyChange(PropertyChangeEvent evt) {
812
        public static final void systemClassLoaderChanged (ClassLoader nue) {
844
                if (evt == null || ModuleManager.PROP_ENABLED_MODULES.equals(evt.getPropertyName())) {
813
            if (classLoader != nue) {
845
                    //System.err.println("modules changed; changing metaInfServicesLookup");
814
                classLoader = nue;
846
                    // Time to refresh META-INF/services/ lookup; modules turned on or off.
815
                Lkp l = (Lkp)Lookup.getDefault();
847
                    Lookup lookup = Lookup.getDefault();
816
                Lookup[] delegates = l.getLookups();
848
                    if (lookup instanceof Lkp) {
817
                Lookup[] newDelegates = (Lookup[])delegates.clone();
849
                        Lkp lkp = (Lkp)lookup;
818
                // Replace classloader.
850
                        Lookup[] old = lkp.getLookups();
819
                newDelegates[0] = createMetaInfServicesLookup();
851
                        Lookup[] nue = (Lookup[])old.clone();
820
                newDelegates[1] = Lookups.singleton(classLoader);
852
                        nue[0] = createMetaInfServicesLookup(true);
821
                l.setLookups(newDelegates);
853
                        lkp.setLookups(nue);
854
                        //System.err.println("lookups: " + java.util.Arrays.asList(nue));
855
                    }
856
                    /* just testing:
857
                    {
858
                        try {
859
                            Class c = get().systemClassLoader().loadClass("org.foo.Interface");
860
                            System.err.println("org.foo.Interface: " + Lookup.getDefault().lookup(new Lookup.Template(c)).allInstances());
861
                        } catch (Exception e) {
862
                            System.err.println(e.toString());
863
                        }
864
                    }
865
                    */
866
                }
867
            }
822
            }
868
        }
823
        }
869
        
824
870
        /** Called when a system classloader changes.
825
        /** Called when modules are about to be turned on.
871
         */
826
         */
872
        public static final void systemClassLoaderChanged () {
827
        public static final void moduleClassLoadersUp() {
873
            NbTopManager.get ().unregister (ClassLoaderConvertor.CLASSLOADER, ClassLoaderConvertor.CLASSLOADER);
828
            Lkp l = (Lkp)Lookup.getDefault();
874
            NbTopManager.get ().register (ClassLoaderConvertor.CLASSLOADER, ClassLoaderConvertor.CLASSLOADER);
829
            Lookup[] newDelegates = null;
830
            Lookup[] delegates = l.getLookups();
831
            newDelegates = (Lookup[])delegates.clone();
832
            newDelegates[0] = createMetaInfServicesLookup();
833
            l.setLookups(newDelegates);
875
        }
834
        }
876
835
877
        /** When all module classes are accessible thru systemClassLoader, this
836
        /** When all module classes are accessible thru systemClassLoader, this
Lines 912-918 Link Here
912
            
871
            
913
        final void doInitializeLookup () {
872
        final void doInitializeLookup () {
914
            //System.err.println("doInitializeLookup");
873
            //System.err.println("doInitializeLookup");
915
            FileObject services = TopManager.getDefault().getRepository().getDefaultFileSystem().findResource("Services");
874
            FileObject services = Repository.getDefault().getDefaultFileSystem()
875
                    .findResource("Services");
916
            Lookup nue;
876
            Lookup nue;
917
            if (services != null) {
877
            if (services != null) {
918
                StartLog.logProgress("Got Services folder"); // NOI18N
878
                StartLog.logProgress("Got Services folder"); // NOI18N
Lines 925-949 Link Here
925
885
926
            // extend the lookup
886
            // extend the lookup
927
            Lookup[] arr = new Lookup[] {
887
            Lookup[] arr = new Lookup[] {
928
                getLookups()[0], // metaInfServicesLookup; still keep classpath one till later...
888
                getLookups()[0], // metaInfServicesLookup
889
                getLookups()[1], // ClassLoader lookup
890
                // XXX figure out how to put this ahead of MetaInfServicesLookup (for NonGuiMain):
929
                NbTopManager.get ().getInstanceLookup (),
891
                NbTopManager.get ().getInstanceLookup (),
930
                nue,
892
                nue,
931
                NbTopManager.get().getModuleSystem().getManager().getModuleLookup(),
893
                NbTopManager.get().getModuleSystem().getManager().getModuleLookup()
932
            };
894
            };
933
            StartLog.logProgress ("prepared other Lookups"); // NOI18N
895
            StartLog.logProgress ("prepared other Lookups"); // NOI18N
934
896
935
            setLookups (arr);
897
            setLookups (arr);
936
            StartLog.logProgress ("Lookups set"); // NOI18N
898
            StartLog.logProgress ("Lookups set"); // NOI18N
937
899
938
            // Also listen for changes in modules, as META-INF/services/ would change:
939
            ModuleManager mgr = get().getModuleSystem().getManager();
940
            ConvertorListener l = new ConvertorListener();
941
            mgr.addPropertyChangeListener(l);
942
            if (!mgr.getEnabledModules().isEmpty()) {
943
                // Ready now.
944
                l.propertyChange(null);
945
            }
946
            
947
	    //StartLog.logEnd ("NbTopManager$Lkp: initialization of FolderLookup"); // NOI18N
900
	    //StartLog.logEnd ("NbTopManager$Lkp: initialization of FolderLookup"); // NOI18N
948
            
901
            
949
            synchronized (this) {
902
            synchronized (this) {
Lines 965-996 Link Here
965
                t.waitFinished();
918
                t.waitFinished();
966
            }
919
            }
967
            
920
            
921
            // Force module system to be initialize by looking up ModuleInfo.
922
            // Good for unit tests, etc.
923
            if (templ.getType() == ModuleInfo.class || templ.getType() == Module.class) {
924
                get();
925
            }
926
            
968
            super.beforeLookup(templ);
927
            super.beforeLookup(templ);
969
        }
928
        }
970
    }
929
    }
971
    
930
    
972
    
973
    /** Special item for system class loader (which is dynamic).
974
     */
975
    private final static class ClassLoaderConvertor
976
    implements InstanceContent.Convertor {
977
        public static final ClassLoaderConvertor CLASSLOADER = new ClassLoaderConvertor ();
978
        
979
        public Object convert(Object obj) {
980
            return NbTopManager.get ().systemClassLoader();
981
        }
982
        
983
        public String displayName(Object obj) {
984
            return id (obj);
985
        }
986
        
987
        public String id(Object obj) {
988
            return "TM[systemClassLoader"; // NOI18N
989
        }
990
        
991
        public Class type(Object obj) {
992
            return ClassLoader.class;
993
        }
994
        
995
    } // end of ClassLoaderConvertor
996
}
931
}
(-)core/src/org/netbeans/core/NetworkOptionsBeanInfo.java (-1 lines)
Lines 16-22 Link Here
16
import java.awt.Image;
16
import java.awt.Image;
17
import java.beans.*;
17
import java.beans.*;
18
18
19
import org.openide.TopManager;
20
import org.openide.util.Utilities;
19
import org.openide.util.Utilities;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
21
(-)core/src/org/netbeans/core/NonGui.java (-26 / +39 lines)
Lines 40-45 Link Here
40
import org.openide.explorer.*;
40
import org.openide.explorer.*;
41
import org.openide.explorer.view.BeanTreeView;
41
import org.openide.explorer.view.BeanTreeView;
42
import org.openide.util.HelpCtx;
42
import org.openide.util.HelpCtx;
43
import org.openide.util.Lookup;
43
import org.openide.util.NbBundle;
44
import org.openide.util.NbBundle;
44
import org.openide.util.SharedClassObject;
45
import org.openide.util.SharedClassObject;
45
import org.openide.util.RequestProcessor;
46
import org.openide.util.RequestProcessor;
Lines 53-61 Link Here
53
import org.netbeans.core.actions.*;
54
import org.netbeans.core.actions.*;
54
import org.netbeans.core.projects.ModuleLayeredFileSystem;
55
import org.netbeans.core.projects.ModuleLayeredFileSystem;
55
import org.netbeans.core.perftool.StartLog;
56
import org.netbeans.core.perftool.StartLog;
57
import org.netbeans.core.projects.TrivialProjectManager;
56
import org.netbeans.core.modules.ModuleSystem;
58
import org.netbeans.core.modules.ModuleSystem;
57
import org.netbeans.core.execution.ExecutionSettings;
59
import org.netbeans.core.execution.ExecutionSettings;
58
import org.netbeans.core.execution.TopSecurityManager;
60
import org.netbeans.core.execution.TopSecurityManager;
61
import org.openide.awt.StatusDisplayer;
59
62
60
/** This class is a TopManager for Corona environment.
63
/** This class is a TopManager for Corona environment.
61
*
64
*
Lines 171-179 Link Here
171
        return systemDir;
174
        return systemDir;
172
    }
175
    }
173
176
174
    /** Subclasses will do better. */
175
    protected void setStatusTextImpl(String text) {}
176
177
    /** Everything is interactive */
177
    /** Everything is interactive */
178
    public boolean isInteractive (int il) {
178
    public boolean isInteractive (int il) {
179
        return true;
179
        return true;
Lines 348-376 Link Here
348
348
349
        // Initialize beans - [PENDING - better place for this ?]
349
        // Initialize beans - [PENDING - better place for this ?]
350
        //                    [PENDING - can PropertyEditorManager garbage collect ?]
350
        //                    [PENDING - can PropertyEditorManager garbage collect ?]
351
        java.beans.Introspector.setBeanInfoSearchPath (new String[] {
351
        String[] sysbisp = Introspector.getBeanInfoSearchPath();
352
                    "org.netbeans.beaninfo", // NOI18N
352
        String[] nbbisp = new String[] {
353
                    "org.netbeans.beaninfo.awt", // NOI18N
353
            "org.netbeans.beaninfo", // NOI18N
354
                    "org.netbeans.beaninfo.swing", // NOI18N
354
            "org.netbeans.beaninfo.awt", // NOI18N
355
                    "sun.beans.infos" // NOI18N
355
            "org.netbeans.beaninfo.swing", // NOI18N
356
                });
356
        };
357
        java.beans.PropertyEditor pe = java.beans.PropertyEditorManager.findEditor(java.lang.Byte.TYPE); // to enforce initialization of registering PE for primitive types
357
        String[] allbisp = new String[sysbisp.length + nbbisp.length];
358
        java.beans.PropertyEditorManager.setEditorSearchPath (
358
        System.arraycopy(nbbisp, 0, allbisp, 0, nbbisp.length);
359
            new String[] { "org.netbeans.beaninfo.editors", "org.openide.explorer.propertysheet.editors" }); // NOI18N
359
        System.arraycopy(sysbisp, 0, allbisp, nbbisp.length, sysbisp.length);
360
        java.beans.PropertyEditorManager.registerEditor (getKlass("[Ljava.lang.String;"), getKlass("org.openide.explorer.propertysheet.editors.StringArrayEditor"));
360
        Introspector.setBeanInfoSearchPath(allbisp);
361
        java.beans.PropertyEditorManager.registerEditor (getKlass("[Lorg.openide.src.MethodParameter;"), getKlass("org.openide.explorer.propertysheet.editors.MethodParameterArrayEditor"));
361
        String[] syspesp = PropertyEditorManager.getEditorSearchPath();
362
        java.beans.PropertyEditorManager.registerEditor (getKlass("[Lorg.openide.src.Identifier;"), getKlass("org.openide.explorer.propertysheet.editors.IdentifierArrayEditor"));
362
        String[] nbpesp = new String[] {
363
        java.beans.PropertyEditorManager.registerEditor (java.lang.Character.TYPE, getKlass("org.netbeans.beaninfo.editors.CharEditor"));
363
            "org.netbeans.beaninfo.editors", // NOI18N
364
            "org.openide.explorer.propertysheet.editors", // NOI18N
365
        };
366
        String[] allpesp = new String[syspesp.length + nbpesp.length];
367
        System.arraycopy(nbpesp, 0, allpesp, 0, nbpesp.length);
368
        System.arraycopy(syspesp, 0, allpesp, nbpesp.length, syspesp.length);
369
        PropertyEditorManager.setEditorSearchPath(allpesp);
370
        PropertyEditorManager.registerEditor (java.lang.Character.TYPE, getKlass("org.netbeans.beaninfo.editors.CharEditor"));
371
        PropertyEditorManager.registerEditor(getKlass("[Ljava.lang.String;"), getKlass("org.netbeans.beaninfo.editors.StringArrayEditor")); // NOI18N
364
        StartLog.logProgress ("PropertyEditors registered"); // NOI18N
372
        StartLog.logProgress ("PropertyEditors registered"); // NOI18N
365
373
366
        // -----------------------------------------------------------------------------------------------------
374
        // -----------------------------------------------------------------------------------------------------
367
375
368
        setStatusText (getString("MSG_IDEInit"));
376
        StatusDisplayer.getDefault().setStatusText (getString("MSG_IDEInit"));
369
377
370
378
371
        // -----------------------------------------------------------------------------------------------------
379
        // -----------------------------------------------------------------------------------------------------
372
        // 7. Initialize FileSystems
380
        // 7. Initialize FileSystems
373
        getRepository ();
381
        Repository.getDefault();
374
        StartLog.logProgress ("Repository initialized"); // NOI18N
382
        StartLog.logProgress ("Repository initialized"); // NOI18N
375
383
376
        // -----------------------------------------------------------------------------------------------------
384
        // -----------------------------------------------------------------------------------------------------
Lines 440-446 Link Here
440
        {
448
        {
441
    	    StartLog.logStart ("Modules initialization"); // NOI18N
449
    	    StartLog.logStart ("Modules initialization"); // NOI18N
442
450
443
            FileSystem sfs = getRepository().getDefaultFileSystem();
451
            FileSystem sfs = Repository.getDefault().getDefaultFileSystem();
444
            getUserDir();
452
            getUserDir();
445
            File moduleDirHome = new File(homeDir, DIR_MODULES);
453
            File moduleDirHome = new File(homeDir, DIR_MODULES);
446
            File moduleDirUser;
454
            File moduleDirUser;
Lines 450-464 Link Here
450
                moduleDirUser = new File(userDir, DIR_MODULES);
458
                moduleDirUser = new File(userDir, DIR_MODULES);
451
            }
459
            }
452
            try {
460
            try {
453
                moduleSystem = new ModuleSystem(getRepository().getDefaultFileSystem(), moduleDirHome, moduleDirUser);
461
                moduleSystem = new ModuleSystem(Repository.getDefault().getDefaultFileSystem(), moduleDirHome, moduleDirUser);
454
            } catch (IOException ioe) {
462
            } catch (IOException ioe) {
455
                // System will be screwed up.
463
                // System will be screwed up.
456
                IllegalStateException ise = new IllegalStateException("Module system cannot be created"); // NOI18N
464
                IllegalStateException ise = new IllegalStateException("Module system cannot be created"); // NOI18N
457
                getErrorManager().annotate(ise, ioe);
465
                ErrorManager.getDefault().annotate(ise, ioe);
458
                throw ise;
466
                throw ise;
459
            }
467
            }
460
    	    StartLog.logProgress ("ModuleSystem created"); // NOI18N
468
    	    StartLog.logProgress ("ModuleSystem created"); // NOI18N
461
            fireSystemClassLoaderChange();
462
469
463
            moduleSystem.loadBootModules();
470
            moduleSystem.loadBootModules();
464
            moduleSystem.readList();
471
            moduleSystem.readList();
Lines 476-484 Link Here
476
        // -----------------------------------------------------------------------------------------------------
483
        // -----------------------------------------------------------------------------------------------------
477
        // 10. Initialization of project (because it can change loader pool and it influences main window menu)
484
        // 10. Initialization of project (because it can change loader pool and it influences main window menu)
478
        try {
485
        try {
479
            NbProjectOperation.openOrCreateProject ();
486
            LoaderPoolNode.load();
487
        } catch (IOException ioe) {
488
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
489
        }
490
        try {
491
            ((TrivialProjectManager)Lookup.getDefault().lookup(TrivialProjectManager.class)).load();
480
        } catch (IOException e) {
492
        } catch (IOException e) {
481
            getErrorManager ().notify (ErrorManager.INFORMATIONAL, e);
493
            ErrorManager.getDefault().notify (ErrorManager.INFORMATIONAL, e);
482
        }
494
        }
483
        StartLog.logProgress ("Project opened"); // NOI18N
495
        StartLog.logProgress ("Project opened"); // NOI18N
484
        Main.incrementSplashProgressBar(10);
496
        Main.incrementSplashProgressBar(10);
Lines 565-572 Link Here
565
        Main.incrementSplashProgressBar();
577
        Main.incrementSplashProgressBar();
566
578
567
        // run classes int Startup folder
579
        // run classes int Startup folder
568
        
580
569
        startFolder (getDefault ().getPlaces ().folders ().startup ());
581
        // Could be places = NbPlaces.getDefault();
582
        startFolder(NbPlaces.getDefault().startup ());
570
        StartLog.logProgress ("StartFolder content started"); // NOI18N
583
        StartLog.logProgress ("StartFolder content started"); // NOI18N
571
        Main.incrementSplashProgressBar();
584
        Main.incrementSplashProgressBar();
572
    }
585
    }
(-)core/src/org/netbeans/core/NonGuiMain.java (-4 / +6 lines)
Lines 399-405 Link Here
399
        java.awt.Font nbDialogPlain = new java.awt.Font ("Dialog", java.awt.Font.PLAIN, uiFontSize); // NOI18N
399
        java.awt.Font nbDialogPlain = new java.awt.Font ("Dialog", java.awt.Font.PLAIN, uiFontSize); // NOI18N
400
        
400
        
401
        if (load) {
401
        if (load) {
402
            org.openide.TopManager.getDefault();
402
//            org.openide.TopManager.getDefault();
403
            NbTopManager.get();
403
        }
404
        }
404
        
405
        
405
        try {
406
        try {
Lines 461-469 Link Here
461
    
462
    
462
    /** Calls TopManager.getDefault().exit(); */
463
    /** Calls TopManager.getDefault().exit(); */
463
    public static void myExit(int status) {
464
    public static void myExit(int status) {
464
	if (TopManager.isInitialized()) {
465
	if (NbTopManager.isInitialized()) {
465
	    
466
	    
466
            TopManager.getDefault().exit();
467
//            TopManager.getDefault().exit();
468
            org.openide.LifecycleManager.getDefault().exit();
467
        }
469
        }
468
        TopSecurityManager.exit(status);
470
        TopSecurityManager.exit(status);
469
    }
471
    }
Lines 507-513 Link Here
507
    }
509
    }
508
    
510
    
509
    public OutputWriter getStdOut () {
511
    public OutputWriter getStdOut () {
510
        return getIO("").getOut();	// NOI18N
512
        return getIO("", true).getOut();	// NOI18N
511
    }
513
    }
512
514
513
    /** Prints the notification to the out.*/
515
    /** Prints the notification to the out.*/
(-)core/src/org/netbeans/core/NotifyException.java (-5 / +5 lines)
Lines 119-125 Link Here
119
        descriptor.setClosingOptions (new Object[0]);
119
        descriptor.setClosingOptions (new Object[0]);
120
        descriptor.setButtonListener (this);
120
        descriptor.setButtonListener (this);
121
121
122
        dialog = TopManager.getDefault ().createDialog (descriptor);
122
        dialog = org.openide.DialogDisplayer.getDefault ().createDialog (descriptor);
123
    }
123
    }
124
124
125
    /** Adds new exception into the queue.
125
    /** Adds new exception into the queue.
Lines 133-145 Link Here
133
                int gs = t.getSeverity();
133
                int gs = t.getSeverity();
134
                
134
                
135
                if (gs == ErrorManager.WARNING  &&  glm != null  &&  !glm.equals("")) // NOI18N
135
                if (gs == ErrorManager.WARNING  &&  glm != null  &&  !glm.equals("")) // NOI18N
136
                    TopManager.getDefault().notify(
136
                    org.openide.DialogDisplayer.getDefault().notify(
137
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.WARNING_MESSAGE));
137
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.WARNING_MESSAGE));
138
                else if (gs == ErrorManager.USER  &&  glm != null  &&  !glm.equals("")) // NOI18N
138
                else if (gs == ErrorManager.USER  &&  glm != null  &&  !glm.equals("")) // NOI18N
139
                    TopManager.getDefault().notify(
139
                    org.openide.DialogDisplayer.getDefault().notify(
140
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.INFORMATION_MESSAGE));
140
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.INFORMATION_MESSAGE));
141
                else if (gs == ErrorManager.ERROR  &&  glm != null  &&  !glm.equals("")) // NOI18N
141
                else if (gs == ErrorManager.ERROR  &&  glm != null  &&  !glm.equals("")) // NOI18N
142
                    TopManager.getDefault().notify(
142
                    org.openide.DialogDisplayer.getDefault().notify(
143
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.ERROR_MESSAGE));
143
                        new NotifyDescriptor.Message(glm, NotifyDescriptor.ERROR_MESSAGE));
144
                else {
144
                else {
145
                    if (INSTANCE == null)
145
                    if (INSTANCE == null)
Lines 164-170 Link Here
164
                // Dialog held in dialog variable is disposed for sure
164
                // Dialog held in dialog variable is disposed for sure
165
                // (see code in actionPerformed),
165
                // (see code in actionPerformed),
166
                // so we can safely send it to gc and recreate dialog
166
                // so we can safely send it to gc and recreate dialog
167
                dialog = TopManager.getDefault ().createDialog (descriptor);
167
                dialog = org.openide.DialogDisplayer.getDefault ().createDialog (descriptor);
168
            }
168
            }
169
            // the dialog is not shown
169
            // the dialog is not shown
170
            current = t;
170
            current = t;
(-)core/src/org/netbeans/core/Plain.java (-22 / +18 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 16-21 Link Here
16
import java.io.File;
16
import java.io.File;
17
import java.io.IOException;
17
import java.io.IOException;
18
import java.net.URL;
18
import java.net.URL;
19
import javax.swing.event.ChangeEvent;
20
import javax.swing.event.ChangeListener;
19
21
20
import org.openide.filesystems.*;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.FileSystem;
23
import org.openide.filesystems.FileSystem;
Lines 23-44 Link Here
23
import org.netbeans.core.modules.ModuleSystem;
25
import org.netbeans.core.modules.ModuleSystem;
24
import org.netbeans.core.projects.ModuleLayeredFileSystem;
26
import org.netbeans.core.projects.ModuleLayeredFileSystem;
25
import org.netbeans.core.xml.NbSAXParserFactoryImpl;
27
import org.netbeans.core.xml.NbSAXParserFactoryImpl;
28
import org.openide.awt.StatusDisplayer;
26
29
27
/** Default implementation of TopManager that is used when 
30
/** Default implementation of TopManager that is used when 
28
* the system is used without initialization.
31
* the system is used without initialization.
29
*
32
*
30
* @author Jaroslav Tulach
33
* @author Jaroslav Tulach
31
*/
34
*/
32
public class Plain extends NbTopManager implements Runnable {
35
public class Plain extends NbTopManager implements Runnable, ChangeListener {
33
    
36
    
34
    static {
37
    static {
35
        NbSAXParserFactoryImpl.install();
38
        NbSAXParserFactoryImpl.install();
36
    }
39
    }
40
    
41
    private final StatusDisplayer status;
37
42
38
  /** Creates new Plain. */
43
    /** Creates new Plain. */
39
  public Plain() {
44
    public Plain() {
40
      if (Boolean.getBoolean("org.netbeans.core.Plain.CULPRIT")) Thread.dumpStack(); // NOI18N
45
        if (Boolean.getBoolean("org.netbeans.core.Plain.CULPRIT")) Thread.dumpStack(); // NOI18N
41
  }
46
        status = StatusDisplayer.getDefault();
47
        status.addChangeListener(this);
48
    }
42
  
49
  
43
    private ModuleSystem moduleSystem;
50
    private ModuleSystem moduleSystem;
44
  
51
  
Lines 77-90 Link Here
77
    return new Object();
84
    return new Object();
78
  }
85
  }
79
  
86
  
80
    protected void setStatusTextImpl(String text) {
81
        System.out.println(text);
82
    }
83
    
84
    /** Create the module system. Subclasses may override. */
87
    /** Create the module system. Subclasses may override. */
85
    protected ModuleSystem createModuleSystem() throws IOException {
88
    protected ModuleSystem createModuleSystem() throws IOException {
86
        String userDir = System.getProperty("modules.dir"); // NOI18N
89
        String userDir = System.getProperty("modules.dir"); // NOI18N
87
        FileSystem fs = getRepository().getDefaultFileSystem();
90
        FileSystem fs = Repository.getDefault().getDefaultFileSystem();
88
        return new ModuleSystem(fs, userDir == null ? null : new File(userDir), null);
91
        return new ModuleSystem(fs, userDir == null ? null : new File(userDir), null);
89
    }
92
    }
90
  
93
  
Lines 97-105 Link Here
97
            notifyException(ioe);
100
            notifyException(ioe);
98
            return;
101
            return;
99
        }
102
        }
100
        fireSystemClassLoaderChange();
101
        moduleSystem.loadBootModules();
103
        moduleSystem.loadBootModules();
102
        if (!getRepository().getDefaultFileSystem().isReadOnly()) {
104
        if (!Repository.getDefault().getDefaultFileSystem().isReadOnly()) {
103
            moduleSystem.readList();
105
            moduleSystem.readList();
104
            moduleSystem.scanForNewAndRestore();
106
            moduleSystem.scanForNewAndRestore();
105
            LoaderPoolNode.installationFinished();
107
            LoaderPoolNode.installationFinished();
Lines 114-127 Link Here
114
        return moduleSystem;
116
        return moduleSystem;
115
    }
117
    }
116
  
118
  
117
/* JST: not needed anymore.
119
    public void stateChanged(ChangeEvent e) {
118
  static class ClassLoaderFinder extends SecurityManager implements org.openide.util.NbBundle.ClassLoaderFinder {
120
        System.out.println(status.getStatusText());
119
120
    public ClassLoader find() {
121
      Class[] classes = getClassContext();
122
      return classes[Math.min(4, classes.length - 1)].getClassLoader();
123
    }
121
    }
124
  }
122
    
125
*/
126
127
}
123
}
(-)core/src/org/netbeans/core/RootFolderNode.java (-3 / +2 lines)
Lines 30-36 Link Here
30
30
31
import org.openide.DialogDescriptor;
31
import org.openide.DialogDescriptor;
32
import org.openide.ErrorManager;
32
import org.openide.ErrorManager;
33
import org.openide.TopManager;
34
import org.openide.actions.*;
33
import org.openide.actions.*;
35
import org.openide.filesystems.*;
34
import org.openide.filesystems.*;
36
import org.openide.loaders.DataFilter;
35
import org.openide.loaders.DataFilter;
Lines 293-299 Link Here
293
            
292
            
294
            if (i instanceof DialogDescriptor) {
293
            if (i instanceof DialogDescriptor) {
295
                DialogDescriptor dd = (DialogDescriptor)i;
294
                DialogDescriptor dd = (DialogDescriptor)i;
296
                return TopManager.getDefault ().createDialog (dd);
295
                return org.openide.DialogDisplayer.getDefault ().createDialog (dd);
297
            }
296
            }
298
        } catch (Exception ex) {
297
        } catch (Exception ex) {
299
            ErrorManager.getDefault ().notify (ex);
298
            ErrorManager.getDefault ().notify (ex);
Lines 322-328 Link Here
322
    /** Unmounts the filesystem from the FSPool */
321
    /** Unmounts the filesystem from the FSPool */
323
    public void unmount() {
322
    public void unmount() {
324
        MountNode.unmount (fs);
323
        MountNode.unmount (fs);
325
        NbTopManager.get ().getRepository ().removeFileSystem (fs);
324
        Repository.getDefault().removeFileSystem (fs);
326
    }
325
    }
327
326
328
    /** Checks whether the name of FS is changed and if so it updates
327
    /** Checks whether the name of FS is changed and if so it updates
(-)core/src/org/netbeans/core/Services.java (-10 / +10 lines)
Lines 31-38 Link Here
31
import org.openide.util.Lookup.Template;
31
import org.openide.util.Lookup.Template;
32
32
33
import org.netbeans.beaninfo.editors.ExecutorEditor;
33
import org.netbeans.beaninfo.editors.ExecutorEditor;
34
import org.netbeans.beaninfo.editors.CompilerTypeEditor;
34
//import org.netbeans.beaninfo.editors.CompilerTypeEditor;
35
import org.netbeans.beaninfo.editors.DebuggerTypeEditor;
35
//import org.netbeans.beaninfo.editors.DebuggerTypeEditor;
36
36
37
/** Works with all service types.
37
/** Works with all service types.
38
*
38
*
Lines 61-78 Link Here
61
    
61
    
62
    private static void fillMap(Map map) {
62
    private static void fillMap(Map map) {
63
        map.put(ExecutorEditor.NO_EXECUTOR.getName(), ExecutorEditor.NO_EXECUTOR);
63
        map.put(ExecutorEditor.NO_EXECUTOR.getName(), ExecutorEditor.NO_EXECUTOR);
64
        map.put(CompilerTypeEditor.NO_COMPILER.getName(), CompilerTypeEditor.NO_COMPILER);
64
//        map.put(CompilerTypeEditor.NO_COMPILER.getName(), CompilerTypeEditor.NO_COMPILER);
65
        map.put(DebuggerTypeEditor.NO_DEBUGGER.getName(), DebuggerTypeEditor.NO_DEBUGGER);
65
//        map.put(DebuggerTypeEditor.NO_DEBUGGER.getName(), DebuggerTypeEditor.NO_DEBUGGER);
66
    }
66
    }
67
    
67
    
68
    /** Override to specially look up no-op services. */
68
    /** Override to specially look up no-op services. */
69
    public ServiceType find (Class clazz) {
69
    public ServiceType find (Class clazz) {
70
        if (clazz == ExecutorEditor.NoExecutor.class)
70
        if (clazz == ExecutorEditor.NoExecutor.class)
71
            return ExecutorEditor.NO_EXECUTOR;
71
            return ExecutorEditor.NO_EXECUTOR;
72
        else if (clazz == CompilerTypeEditor.NoCompiler.class)
72
//        else if (clazz == CompilerTypeEditor.NoCompiler.class)
73
            return CompilerTypeEditor.NO_COMPILER;
73
//            return CompilerTypeEditor.NO_COMPILER;
74
        else if (clazz == DebuggerTypeEditor.NoDebugger.class)
74
//        else if (clazz == DebuggerTypeEditor.NoDebugger.class)
75
            return DebuggerTypeEditor.NO_DEBUGGER;
75
//            return DebuggerTypeEditor.NO_DEBUGGER;
76
        else if (clazz == null)
76
        else if (clazz == null)
77
            return null;
77
            return null;
78
        else
78
        else
Lines 144-150 Link Here
144
        arr = ensureSingleness(arr);
144
        arr = ensureSingleness(arr);
145
        
145
        
146
        HashMap services = new HashMap(20); // <service type, DataObject>
146
        HashMap services = new HashMap(20); // <service type, DataObject>
147
        searchServices(NbPlaces.findSessionFolder("Services").getPrimaryFile(), services); // NOI18N
147
        searchServices(NbPlaces.getDefault().findSessionFolder("Services").getPrimaryFile(), services); // NOI18N
148
        
148
        
149
        // storing services
149
        // storing services
150
        HashMap order = new HashMap(10); // <parent folder, <file>>
150
        HashMap order = new HashMap(10); // <parent folder, <file>>
Lines 223-229 Link Here
223
            java.beans.BeanInfo info = org.openide.util.Utilities.getBeanInfo(stype);
223
            java.beans.BeanInfo info = org.openide.util.Utilities.getBeanInfo(stype);
224
            String folder = org.openide.util.Utilities.getShortClassName(stype);
224
            String folder = org.openide.util.Utilities.getShortClassName(stype);
225
225
226
            DataFolder dfServices = NbPlaces.findSessionFolder("Services"); // NOI18N
226
            DataFolder dfServices = NbPlaces.getDefault().findSessionFolder("Services"); // NOI18N
227
            DataFolder dfTarget = DataFolder.create(dfServices, folder);
227
            DataFolder dfTarget = DataFolder.create(dfServices, folder);
228
            
228
            
229
            return InstanceDataObject.create(dfTarget, null, st, null);
229
            return InstanceDataObject.create(dfTarget, null, st, null);
(-)core/src/org/netbeans/core/ShortcutsEditor.java (-1 lines)
Lines 26-32 Link Here
26
import javax.swing.event.*;
26
import javax.swing.event.*;
27
import javax.swing.text.Keymap;
27
import javax.swing.text.Keymap;
28
28
29
import org.openide.TopManager;
30
import org.openide.filesystems.*;
29
import org.openide.filesystems.*;
31
import org.openide.loaders.XMLDataObject;
30
import org.openide.loaders.XMLDataObject;
32
import org.openide.util.Utilities;
31
import org.openide.util.Utilities;
(-)core/src/org/netbeans/core/ShortcutsFolder.java (-10 / +13 lines)
Lines 25-30 Link Here
25
import org.openide.loaders.*;
25
import org.openide.loaders.*;
26
import org.openide.cookies.InstanceCookie;
26
import org.openide.cookies.InstanceCookie;
27
import org.openide.util.actions.SystemAction;
27
import org.openide.util.actions.SystemAction;
28
import org.openide.util.Lookup;
28
import org.openide.util.Utilities;
29
import org.openide.util.Utilities;
29
30
30
31
Lines 98-104 Link Here
98
            map.put (stroke, action);
99
            map.put (stroke, action);
99
        }
100
        }
100
        
101
        
101
        Keymap globalMap = TopManager.getDefault ().getGlobalKeymap ();
102
        Keymap globalMap = (Keymap)Lookup.getDefault().lookup(Keymap.class);
102
        globalMap.removeBindings();
103
        globalMap.removeBindings();
103
        // globalMap is synchronized
104
        // globalMap is synchronized
104
        if (globalMap instanceof NbKeymap) {
105
        if (globalMap instanceof NbKeymap) {
Lines 145-151 Link Here
145
     * It is used in ShortcutsPanel.
146
     * It is used in ShortcutsPanel.
146
     */
147
     */
147
    static String getKeyStrokeName (KeyStroke stroke) {
148
    static String getKeyStrokeName (KeyStroke stroke) {
148
        Keymap map = TopManager.getDefault ().getGlobalKeymap ();
149
        Keymap map = (Keymap)Lookup.getDefault().lookup(Keymap.class);
149
        Action action = map.getAction (stroke);
150
        Action action = map.getAction (stroke);
150
        if (action instanceof SystemAction) {
151
        if (action instanceof SystemAction) {
151
            String name = ((SystemAction)action).getName ();
152
            String name = ((SystemAction)action).getName ();
Lines 165-171 Link Here
165
        String name = Utilities.replaceString (action.getName (), "&", ""); // remove mnemonics marker // NOI18N
166
        String name = Utilities.replaceString (action.getName (), "&", ""); // remove mnemonics marker // NOI18N
166
        name = Utilities.replaceString (name, "...", ""); // remove trailing "..." // NOI18N
167
        name = Utilities.replaceString (name, "...", ""); // remove trailing "..." // NOI18N
167
168
168
        Keymap map = TopManager.getDefault ().getGlobalKeymap ();
169
        Keymap map = (Keymap)Lookup.getDefault().lookup(Keymap.class);
169
        KeyStroke[] strokes = map.getKeyStrokesForAction(action);
170
        KeyStroke[] strokes = map.getKeyStrokesForAction(action);
170
171
171
        if (strokes.length > 0) {
172
        if (strokes.length > 0) {
Lines 235-241 Link Here
235
    private static void transformOldFiles() {
236
    private static void transformOldFiles() {
236
        // used to be installCurrentBindings
237
        // used to be installCurrentBindings
237
        try {
238
        try {
238
            org.openide.filesystems.FileSystem systemFS = TopManager.getDefault().getRepository().getDefaultFileSystem ();
239
            org.openide.filesystems.FileSystem systemFS
240
                = Repository.getDefault().getDefaultFileSystem ();
239
241
240
            boolean defaultsUsed = false;
242
            boolean defaultsUsed = false;
241
            HashMap moduleKeyFiles = new HashMap (11);
243
            HashMap moduleKeyFiles = new HashMap (11);
Lines 301-308 Link Here
301
     * the shortcuts folder.
303
     * the shortcuts folder.
302
     */
304
     */
303
    public static void installBindings (HashMap strokesMap) throws IOException { 
305
    public static void installBindings (HashMap strokesMap) throws IOException { 
304
        FileObject fo = TopManager.getDefault().getRepository().
306
        FileObject fo = Repository.getDefault().getDefaultFileSystem()
305
            getDefaultFileSystem().getRoot().getFileObject(SHORTCUTS_FOLDER);
307
                .getRoot().getFileObject(SHORTCUTS_FOLDER);
306
        DataFolder f = DataFolder.findFolder(fo);
308
        DataFolder f = DataFolder.findFolder(fo);
307
        for (Iterator it = strokesMap.keySet().iterator(); it.hasNext (); ) {
309
        for (Iterator it = strokesMap.keySet().iterator(); it.hasNext (); ) {
308
            KeyStroke key = (KeyStroke)it.next ();
310
            KeyStroke key = (KeyStroke)it.next ();
Lines 367-373 Link Here
367
                act = nl.item (i).getAttributes ().getNamedItem (ATTR_BINDING_ACTION).getNodeValue ();
369
                act = nl.item (i).getAttributes ().getNamedItem (ATTR_BINDING_ACTION).getNodeValue ();
368
370
369
                KeyStroke stroke = Utilities.stringToKey (key);
371
                KeyStroke stroke = Utilities.stringToKey (key);
370
                SystemAction action = SystemAction.get (Class.forName(act, true, TopManager.getDefault ().systemClassLoader ()));
372
                SystemAction action = SystemAction.get (
373
                    Class.forName(act, true, (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)));
371
                map.put (stroke, action);
374
                map.put (stroke, action);
372
	    } catch (ClassNotFoundException cnfe) {
375
	    } catch (ClassNotFoundException cnfe) {
373
		if (Boolean.getBoolean ("netbeans.debug.exceptions")) // NOI18N
376
		if (Boolean.getBoolean ("netbeans.debug.exceptions")) // NOI18N
Lines 382-388 Link Here
382
     */
385
     */
383
    public static void initShortcuts() {
386
    public static void initShortcuts() {
384
        transformOldFiles();
387
        transformOldFiles();
385
        DataFolder f = NbPlaces.findSessionFolder(SHORTCUTS_FOLDER);
388
        DataFolder f = NbPlaces.getDefault().findSessionFolder(SHORTCUTS_FOLDER);
386
        shortcutsFolder = new ShortcutsFolder(f);
389
        shortcutsFolder = new ShortcutsFolder(f);
387
        shortcutsFolder.recreate();
390
        shortcutsFolder.recreate();
388
    }
391
    }
Lines 400-407 Link Here
400
     * @param List changes - the elements of the List are ChangeRequests
403
     * @param List changes - the elements of the List are ChangeRequests
401
     */
404
     */
402
    public static void applyChanges(java.util.List changes) {
405
    public static void applyChanges(java.util.List changes) {
403
        FileObject fo = TopManager.getDefault().getRepository().getDefaultFileSystem ().
406
        FileObject fo = Repository.getDefault().getDefaultFileSystem()
404
            getRoot().getFileObject(SHORTCUTS_FOLDER);
407
            .getRoot().getFileObject(SHORTCUTS_FOLDER);
405
        DataFolder f = DataFolder.findFolder(fo);
408
        DataFolder f = DataFolder.findFolder(fo);
406
        Iterator it = changes.listIterator();
409
        Iterator it = changes.listIterator();
407
        while (it.hasNext()) {
410
        while (it.hasNext()) {
(-)core/src/org/netbeans/core/ShortcutsPanel.java (-3 / +3 lines)
Lines 24-32 Link Here
24
import javax.swing.*;
24
import javax.swing.*;
25
25
26
import org.openide.DialogDescriptor;
26
import org.openide.DialogDescriptor;
27
import org.openide.TopManager;
28
import org.openide.util.actions.SystemAction;
27
import org.openide.util.actions.SystemAction;
29
import org.openide.util.Utilities;
28
import org.openide.util.Utilities;
29
import org.openide.util.Lookup;
30
import org.openide.util.NbBundle;
30
import org.openide.util.NbBundle;
31
31
32
/** A panel used in SHortcutsEditor for editing shortcuts (list of shortcuts).
32
/** A panel used in SHortcutsEditor for editing shortcuts (list of shortcuts).
Lines 160-166 Link Here
160
            addActionsPanel.setBorder(new javax.swing.border.EmptyBorder(12, 12, 0, 11));
160
            addActionsPanel.setBorder(new javax.swing.border.EmptyBorder(12, 12, 0, 11));
161
        }
161
        }
162
        DialogDescriptor dd = new DialogDescriptor (addActionsPanel, org.openide.util.NbBundle.getBundle(ShortcutsPanel.class).getString("ShortcutsPanel.AddActionTitle"));
162
        DialogDescriptor dd = new DialogDescriptor (addActionsPanel, org.openide.util.NbBundle.getBundle(ShortcutsPanel.class).getString("ShortcutsPanel.AddActionTitle"));
163
        java.awt.Dialog d = TopManager.getDefault().createDialog(dd);
163
        java.awt.Dialog d = org.openide.DialogDisplayer.getDefault().createDialog(dd);
164
        d.show ();
164
        d.show ();
165
        if (dd.getValue() == DialogDescriptor.OK_OPTION) {
165
        if (dd.getValue() == DialogDescriptor.OK_OPTION) {
166
            updateData ();
166
            updateData ();
Lines 191-197 Link Here
191
    }//GEN-LAST:event_removeButtonActionPerformed
191
    }//GEN-LAST:event_removeButtonActionPerformed
192
192
193
    private void updateData () {
193
    private void updateData () {
194
        map = TopManager.getDefault ().getGlobalKeymap ();
194
        map = (Keymap)Lookup.getDefault ().lookup (Keymap.class);
195
        KeyStroke[] strokesArray = map.getBoundKeyStrokes();
195
        KeyStroke[] strokesArray = map.getBoundKeyStrokes();
196
        strokes = new Vector ();
196
        strokes = new Vector ();
197
        for (int i = 0; i < strokesArray.length; i++) {
197
        for (int i = 0; i < strokesArray.length; i++) {
(-)core/src/org/netbeans/core/Splash.java (-2 / +20 lines)
Lines 31-41 Link Here
31
import javax.swing.*;
31
import javax.swing.*;
32
import java.lang.ref.WeakReference;
32
import java.lang.ref.WeakReference;
33
import java.lang.ref.Reference;
33
import java.lang.ref.Reference;
34
import javax.swing.event.ChangeEvent;
35
import javax.swing.event.ChangeListener;
34
36
35
import org.openide.util.Utilities;
37
import org.openide.util.Utilities;
36
import org.openide.util.NbBundle;
38
import org.openide.util.NbBundle;
37
39
38
import org.netbeans.core.ui.ProductInformationPanel;
40
import org.netbeans.core.ui.ProductInformationPanel;
41
import org.openide.awt.StatusDisplayer;
39
import org.openide.windows.WindowManager;
42
import org.openide.windows.WindowManager;
40
43
41
/** A class that encapsulates all the splash screen things.
44
/** A class that encapsulates all the splash screen things.
Lines 49-54 Link Here
49
52
50
    /** The about image */
53
    /** The about image */
51
    static Reference aboutRef;
54
    static Reference aboutRef;
55
    
56
    private static StatusDisplayer status;
52
57
53
    private static String getMainWindowTitle () {
58
    private static String getMainWindowTitle () {
54
        String buildNumber = System.getProperty ("netbeans.buildnumber"); // NOI18N
59
        String buildNumber = System.getProperty ("netbeans.buildnumber"); // NOI18N
Lines 68-78 Link Here
68
        // show splash
73
        // show splash
69
        splashWindow.show ();
74
        splashWindow.show ();
70
        splashWindow.toFront ();
75
        splashWindow.toFront ();
76
        status = StatusDisplayer.getDefault();
77
        status.addChangeListener((ChangeListener)splashWindow);
78
        
71
        return (SplashOutput) splashWindow;
79
        return (SplashOutput) splashWindow;
72
    }
80
    }
73
81
74
    public static void hideSplash (SplashOutput xsplashWindow) {
82
    public static void hideSplash (SplashOutput xsplashWindow) {
75
        final Window splashWindow = (Window) xsplashWindow;
83
        final Window splashWindow = (Window) xsplashWindow;
84
        status.removeChangeListener((ChangeListener)splashWindow);
85
        status = null;
76
        ((SplashOutputInternal) xsplashWindow).hideRequested();
86
        ((SplashOutputInternal) xsplashWindow).hideRequested();
77
	javax.swing.SwingUtilities.invokeLater (new Runnable () {
87
	javax.swing.SwingUtilities.invokeLater (new Runnable () {
78
		public void run () {
88
		public void run () {
Lines 481-487 Link Here
481
        }
491
        }
482
    }
492
    }
483
493
484
    static class SplashWindow extends Window implements SplashOutput, SplashOutputInternal {
494
    static class SplashWindow extends Window implements SplashOutput, SplashOutputInternal, ChangeListener {
485
        /** generated Serialized Version UID */
495
        /** generated Serialized Version UID */
486
        static final long serialVersionUID = 4838519880359397841L;
496
        static final long serialVersionUID = 4838519880359397841L;
487
497
Lines 538-546 Link Here
538
            splashComponent.addAndSetMaxSteps(steps);
548
            splashComponent.addAndSetMaxSteps(steps);
539
        }
549
        }
540
        
550
        
551
        public void stateChanged(ChangeEvent e) {
552
            print(status.getStatusText());
553
        }
554
        
541
    }
555
    }
542
556
543
    static class SplashFrame extends JFrame implements SplashOutput, SplashOutputInternal {
557
    static class SplashFrame extends JFrame implements SplashOutput, SplashOutputInternal, ChangeListener {
544
        /** generated Serialized Version UID */
558
        /** generated Serialized Version UID */
545
        static final long serialVersionUID = 3200319077899134000L;
559
        static final long serialVersionUID = 3200319077899134000L;
546
560
Lines 588-593 Link Here
588
        
602
        
589
        public void addAndSetMaxSteps(int steps) {
603
        public void addAndSetMaxSteps(int steps) {
590
            splashComponent.addAndSetMaxSteps(steps);
604
            splashComponent.addAndSetMaxSteps(steps);
605
        }
606
        
607
        public void stateChanged(ChangeEvent e) {
608
            print(status.getStatusText());
591
        }
609
        }
592
        
610
        
593
    }
611
    }
(-)core/src/org/netbeans/core/TipsOnStartup.java (-12 / +12 lines)
Lines 30-36 Link Here
30
import javax.swing.text.html.*;
30
import javax.swing.text.html.*;
31
31
32
import org.openide.ErrorManager;
32
import org.openide.ErrorManager;
33
import org.openide.TopManager;
34
import org.openide.NotifyDescriptor;
33
import org.openide.NotifyDescriptor;
35
import org.openide.util.NbBundle;
34
import org.openide.util.NbBundle;
36
35
Lines 105-120 Link Here
105
        browser.setBackground (java.awt.Color.white);
104
        browser.setBackground (java.awt.Color.white);
106
        browser.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
105
        browser.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
107
        browser.addHyperlinkListener(new HyperlinkListener() {
106
        browser.addHyperlinkListener(new HyperlinkListener() {
108
                                         public void hyperlinkUpdate(HyperlinkEvent e) {
107
             public void hyperlinkUpdate(HyperlinkEvent e) {
109
                                             if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED) {
108
                 if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED) {
110
                                                 TopManager tom = TopManager.getDefault();
109
                     
111
                                                 tom.setStatusText(bundle.getString("CTL_OpeningBrowser"));
110
                     org.openide.awt.StatusDisplayer.getDefault().setStatusText(
112
                                                 tom.showUrl(e.getURL());
111
                         bundle.getString("CTL_OpeningBrowser"));
113
                                                 TopManager.getDefault().setStatusText(""); // NOI18N
112
                     org.openide.awt.HtmlBrowser.URLDisplayer.getDefault().showURL(e.getURL());
114
                                             }
113
                     org.openide.awt.StatusDisplayer.getDefault().setStatusText(""); // NOI18N
115
                                         }
114
                 }
116
                                     }
115
             }
117
                                    );
116
         }
117
        );
118
        add(new JScrollPane(browser), BorderLayout.CENTER);
118
        add(new JScrollPane(browser), BorderLayout.CENTER);
119
119
120
        jcx = new JCheckBox(bundle.getString("CTL_NEXTSTARTUP"), true);
120
        jcx = new JCheckBox(bundle.getString("CTL_NEXTSTARTUP"), true);
Lines 152-158 Link Here
152
            }
152
            }
153
        }
153
        }
154
        if (url == null) {
154
        if (url == null) {
155
            TopManager.getDefault ().notify (
155
            org.openide.DialogDisplayer.getDefault ().notify (
156
                new NotifyDescriptor.Message (
156
                new NotifyDescriptor.Message (
157
                    NbBundle.getBundle (TipsOnStartup.class).getString ("ERR_NoTipsFound"),
157
                    NbBundle.getBundle (TipsOnStartup.class).getString ("ERR_NoTipsFound"),
158
                    NotifyDescriptor.WARNING_MESSAGE));
158
                    NotifyDescriptor.WARNING_MESSAGE));
(-)core/src/org/netbeans/core/ToolbarFolderNode.java (-5 / +5 lines)
Lines 24-30 Link Here
24
import org.openide.cookies.InstanceCookie;
24
import org.openide.cookies.InstanceCookie;
25
import org.openide.NotifyDescriptor;
25
import org.openide.NotifyDescriptor;
26
import org.openide.ErrorManager;
26
import org.openide.ErrorManager;
27
import org.openide.TopManager;
28
import org.openide.filesystems.FileObject;
27
import org.openide.filesystems.FileObject;
29
import org.openide.filesystems.FileSystem;
28
import org.openide.filesystems.FileSystem;
30
import org.openide.loaders.DataFolder;
29
import org.openide.loaders.DataFolder;
Lines 33-38 Link Here
33
import org.openide.util.datatransfer.NewType;
32
import org.openide.util.datatransfer.NewType;
34
import org.openide.util.actions.SystemAction;
33
import org.openide.util.actions.SystemAction;
35
import org.openide.util.HelpCtx;
34
import org.openide.util.HelpCtx;
35
import org.openide.util.Lookup;
36
import org.openide.util.NbBundle;
36
import org.openide.util.NbBundle;
37
import org.openide.util.WeakListener;
37
import org.openide.util.WeakListener;
38
import org.openide.awt.Toolbar;
38
import org.openide.awt.Toolbar;
Lines 57-63 Link Here
57
    public static final ResourceBundle bundle = NbBundle.getBundle (ToolbarFolderNode.class);
57
    public static final ResourceBundle bundle = NbBundle.getBundle (ToolbarFolderNode.class);
58
58
59
    public ToolbarFolderNode () {
59
    public ToolbarFolderNode () {
60
        this (NbTopManager.getDefault ().getPlaces ().folders ().toolbars ());
60
        this (NbPlaces.getDefault().toolbars ());
61
    }
61
    }
62
62
63
    /** Constructs this node with given node to filter.
63
    /** Constructs this node with given node to filter.
Lines 106-112 Link Here
106
                                         bundle.getString ("PROP_newToolbarDialog"));
106
                                         bundle.getString ("PROP_newToolbarDialog"));
107
        il.setInputText (bundle.getString ("PROP_newToolbar"));
107
        il.setInputText (bundle.getString ("PROP_newToolbar"));
108
108
109
        Object ok = TopManager.getDefault ().notify (il);
109
        Object ok = org.openide.DialogDisplayer.getDefault ().notify (il);
110
        if (ok == NotifyDescriptor.OK_OPTION) {
110
        if (ok == NotifyDescriptor.OK_OPTION) {
111
            String s = il.getInputText();
111
            String s = il.getInputText();
112
            if (!s.equals ("")) { // NOI18N
112
            if (!s.equals ("")) { // NOI18N
Lines 138-144 Link Here
138
                                         bundle.getString ("PROP_newToolbarConfigDialog"));
138
                                         bundle.getString ("PROP_newToolbarConfigDialog"));
139
        il.setInputText (bundle.getString ("PROP_newToolbarConfig"));
139
        il.setInputText (bundle.getString ("PROP_newToolbarConfig"));
140
140
141
        Object ok = TopManager.getDefault ().notify (il);
141
        Object ok = org.openide.DialogDisplayer.getDefault ().notify (il);
142
        if (ok == NotifyDescriptor.OK_OPTION) {
142
        if (ok == NotifyDescriptor.OK_OPTION) {
143
            String s = il.getInputText();
143
            String s = il.getInputText();
144
            if (!s.equals ("")) { // NOI18N
144
            if (!s.equals ("")) { // NOI18N
Lines 630-636 Link Here
630
630
631
        /** Returns ToolbarConfiguration found by its name or null if such config doesn't exist. */
631
        /** Returns ToolbarConfiguration found by its name or null if such config doesn't exist. */
632
        ToolbarConfiguration configuration(String conf) {
632
        ToolbarConfiguration configuration(String conf) {
633
            DataObject[] obj = NbTopManager.getDefault ().getPlaces ().folders ().toolbars ().getChildren();
633
            DataObject[] obj = NbPlaces.getDefault().toolbars ().getChildren();
634
            for (int i = 0; i < obj.length; i++) {
634
            for (int i = 0; i < obj.length; i++) {
635
                DataObject o = obj[i];
635
                DataObject o = obj[i];
636
                org.openide.cookies.InstanceCookie ic = (org.openide.cookies.InstanceCookie)o.getCookie(org.openide.cookies.InstanceCookie.class);
636
                org.openide.cookies.InstanceCookie ic = (org.openide.cookies.InstanceCookie)o.getCookie(org.openide.cookies.InstanceCookie.class);
(-)core/src/org/netbeans/core/actions/CloseMaximizedFrameAction.java (-3 / +2 lines)
Lines 18-24 Link Here
18
import java.awt.event.*;
18
import java.awt.event.*;
19
import java.util.*;
19
import java.util.*;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.awt.JMenuPlus;
23
import org.openide.awt.JMenuPlus;
Lines 77-83 Link Here
77
    public boolean isEnabled () {
76
    public boolean isEnabled () {
78
        if (WindowUtils.isMdi()) {
77
        if (WindowUtils.isMdi()) {
79
            WindowManagerImpl wm =
78
            WindowManagerImpl wm =
80
            (WindowManagerImpl)TopManager.getDefault().getWindowManager();
79
            (WindowManagerImpl)WindowManager.getDefault();
81
            WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
80
            WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
82
            ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
81
            ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
83
            if (maximizedMode != null) {
82
            if (maximizedMode != null) {
Lines 100-106 Link Here
100
    /** Implementation of runnable interface, runs the action command */
99
    /** Implementation of runnable interface, runs the action command */
101
    public void run() {
100
    public void run() {
102
        WindowManagerImpl wm =
101
        WindowManagerImpl wm =
103
        (WindowManagerImpl)TopManager.getDefault().getWindowManager();
102
        (WindowManagerImpl)WindowManager.getDefault();
104
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
103
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
105
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
104
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
106
        if (maximizedMode != null) {
105
        if (maximizedMode != null) {
(-)core/src/org/netbeans/core/actions/ConfigureShortcutsAction.java (-2 / +1 lines)
Lines 14-20 Link Here
14
package org.netbeans.core.actions;
14
package org.netbeans.core.actions;
15
15
16
import org.openide.DialogDescriptor;
16
import org.openide.DialogDescriptor;
17
import org.openide.TopManager;
18
import org.openide.util.HelpCtx;
17
import org.openide.util.HelpCtx;
19
import org.openide.util.NbBundle;
18
import org.openide.util.NbBundle;
20
19
Lines 40-46 Link Here
40
            null,
39
            null,
41
            null
40
            null
42
        );
41
        );
43
        TopManager.getDefault ().createDialog (dd).show ();
42
        org.openide.DialogDisplayer.getDefault ().createDialog (dd).show ();
44
        se.flushChanges();
43
        se.flushChanges();
45
    }
44
    }
46
45
(-)core/src/org/netbeans/core/actions/DisplayToolbarsAction.java (-2 / +5 lines)
Lines 17-25 Link Here
17
17
18
import org.netbeans.core.ToolbarFolderNode;
18
import org.netbeans.core.ToolbarFolderNode;
19
19
20
import org.openide.TopManager;
20
import org.openide.nodes.NodeOperation;
21
import org.openide.util.actions.CallableSystemAction;
21
import org.openide.util.actions.CallableSystemAction;
22
import org.openide.util.HelpCtx;
22
import org.openide.util.HelpCtx;
23
import org.openide.util.Lookup;
23
import org.openide.util.NbBundle;
24
import org.openide.util.NbBundle;
24
25
25
/** Displayes a toolbar tree in the explorer
26
/** Displayes a toolbar tree in the explorer
Lines 54-60 Link Here
54
    /** An action
55
    /** An action
55
     */
56
     */
56
    public void performAction () {
57
    public void performAction () {
57
        TopManager.getDefault().getNodeOperation ().explore(new ToolbarFolderNode());
58
        NodeOperation no = (NodeOperation)Lookup.getDefault()
59
                .lookup (NodeOperation.class);
60
        no.explore(new ToolbarFolderNode());
58
    }
61
    }
59
62
60
    /** Getter for a ResourceBundle
63
    /** Getter for a ResourceBundle
(-)core/src/org/netbeans/core/actions/EditorViewAction.java (-1 lines)
Lines 16-22 Link Here
16
import java.beans.PropertyChangeEvent;
16
import java.beans.PropertyChangeEvent;
17
import java.beans.PropertyChangeListener;
17
import java.beans.PropertyChangeListener;
18
18
19
import org.openide.TopManager;
20
import org.openide.util.HelpCtx;
19
import org.openide.util.HelpCtx;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
22
import org.openide.util.WeakListener;
21
import org.openide.util.WeakListener;
(-)core/src/org/netbeans/core/actions/FrameResidenceAction.java (-1 lines)
Lines 18-24 Link Here
18
import java.awt.event.*;
18
import java.awt.event.*;
19
import java.util.*;
19
import java.util.*;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.awt.JMenuPlus;
23
import org.openide.awt.JMenuPlus;
(-)core/src/org/netbeans/core/actions/GlobalPropertiesAction.java (-1 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.actions;
14
package org.netbeans.core.actions;
15
15
16
import org.openide.TopManager;
17
import org.openide.windows.TopComponent;
16
import org.openide.windows.TopComponent;
18
import org.openide.util.HelpCtx;
17
import org.openide.util.HelpCtx;
19
import org.openide.util.NbBundle;
18
import org.openide.util.NbBundle;
(-)core/src/org/netbeans/core/actions/HTMLViewAction.java (-13 / +11 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.actions;
14
package org.netbeans.core.actions;
15
15
16
import org.openide.TopManager;
17
import org.openide.awt.HtmlBrowser;
16
import org.openide.awt.HtmlBrowser;
18
import org.openide.windows.*;
17
import org.openide.windows.*;
19
import org.openide.util.HelpCtx;
18
import org.openide.util.HelpCtx;
Lines 25-31 Link Here
25
import org.openide.windows.WindowManager;
24
import org.openide.windows.WindowManager;
26
25
27
/** Activates last opened HTML browser or opens a HTML Browser on the home URL 
26
/** Activates last opened HTML browser or opens a HTML Browser on the home URL 
28
 *  specified in IDESettings using TopManager.showUrl().
27
 *  specified in IDESettings using HtmlBrowser.URLDisplayer.showURL().
29
*
28
*
30
* @author Ian Formanek
29
* @author Ian Formanek
31
*/
30
*/
Lines 41-50 Link Here
41
    }
40
    }
42
41
43
    public void performAction() {
42
    public void performAction() {
44
        TopManager tm = TopManager.getDefault();
43
        org.openide.awt.StatusDisplayer.getDefault().setStatusText(
45
        tm.setStatusText (NbBundle.getBundle(HTMLViewAction.class).
44
            NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser"));
46
            getString("CTL_OpeningBrowser")
47
        );
48
        try {
45
        try {
49
            boolean notFound = true;
46
            boolean notFound = true;
50
            
47
            
Lines 78-85 Link Here
78
                }
75
                }
79
            }
76
            }
80
            if (notFound) {
77
            if (notFound) {
81
                tm.showUrl (new java.net.URL (
78
                HtmlBrowser.URLDisplayer.getDefault().showURL(
82
                    HtmlBrowser.getHomePage ()
79
                    new java.net.URL(HtmlBrowser.getHomePage ()
83
                ));
80
                ));
84
            }
81
            }
85
        } catch (java.net.MalformedURLException e) {
82
        } catch (java.net.MalformedURLException e) {
Lines 87-102 Link Here
87
              startsWith ("http://") // NOI18N
84
              startsWith ("http://") // NOI18N
88
            ) {
85
            ) {
89
                try {
86
                try {
90
                    tm.showUrl (new java.net.URL (
87
                    HtmlBrowser.URLDisplayer.getDefault().showURL(
91
                        "http://" + HtmlBrowser.getHomePage () // NOI18N
88
                        new java.net.URL("http://" + HtmlBrowser.getHomePage () // NOI18N
92
                    ));
89
                    ));
93
                } catch (java.net.MalformedURLException e1) {
90
                } catch (java.net.MalformedURLException e1) {
94
                    tm.showUrl (IDESettings.getRealHomeURL ());
91
                    HtmlBrowser.URLDisplayer.getDefault().showURL(
92
                        IDESettings.getRealHomeURL ());
95
                }
93
                }
96
            } else
94
            } else
97
                tm.showUrl (IDESettings.getRealHomeURL ());
95
                HtmlBrowser.URLDisplayer.getDefault().showURL(IDESettings.getRealHomeURL ());
98
        }
96
        }
99
        tm.setStatusText (""); // NOI18N
97
        org.openide.awt.StatusDisplayer.getDefault().setStatusText (""); // NOI18N
100
    }
98
    }
101
99
102
    public String getName() {
100
    public String getName() {
(-)core/src/org/netbeans/core/actions/MinimizeMaximizedFrameAction.java (-3 / +2 lines)
Lines 18-24 Link Here
18
import java.awt.event.*;
18
import java.awt.event.*;
19
import java.util.*;
19
import java.util.*;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.awt.JMenuPlus;
23
import org.openide.awt.JMenuPlus;
Lines 77-83 Link Here
77
            return false;
76
            return false;
78
        }
77
        }
79
        WindowManagerImpl wm =
78
        WindowManagerImpl wm =
80
        (WindowManagerImpl)TopManager.getDefault().getWindowManager();
79
        (WindowManagerImpl)WindowManager.getDefault();
81
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
80
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
82
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
81
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
83
        if (maximizedMode != null) {
82
        if (maximizedMode != null) {
Lines 99-105 Link Here
99
    /** Implementation of runnable interface, runs the action command */
98
    /** Implementation of runnable interface, runs the action command */
100
    public void run() {
99
    public void run() {
101
        WindowManagerImpl wm =
100
        WindowManagerImpl wm =
102
        (WindowManagerImpl)TopManager.getDefault().getWindowManager();
101
        (WindowManagerImpl)WindowManager.getDefault();
103
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
102
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
104
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
103
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
105
        if (maximizedMode != null) {
104
        if (maximizedMode != null) {
(-)core/src/org/netbeans/core/actions/MountAction.java (-1 lines)
Lines 18-24 Link Here
18
18
19
import javax.swing.JMenuItem;
19
import javax.swing.JMenuItem;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.util.actions.CallableSystemAction;
23
import org.openide.util.actions.CallableSystemAction;
(-)core/src/org/netbeans/core/actions/NewTemplateCallableAction.java (-3 / +6 lines)
Lines 16-29 Link Here
16
import java.util.ResourceBundle;
16
import java.util.ResourceBundle;
17
import java.util.Enumeration;
17
import java.util.Enumeration;
18
import java.awt.event.ActionEvent;
18
import java.awt.event.ActionEvent;
19
import org.netbeans.core.NbPlaces;
19
20
20
import org.openide.TopManager;
21
import org.openide.actions.ActionManager;
21
import org.openide.filesystems.FileSystem;
22
import org.openide.filesystems.FileSystem;
22
import org.openide.filesystems.Repository;
23
import org.openide.filesystems.Repository;
23
import org.openide.nodes.Node;
24
import org.openide.nodes.Node;
24
import org.openide.actions.NewTemplateAction;
25
import org.openide.actions.NewTemplateAction;
25
import org.openide.util.actions.CallableSystemAction;
26
import org.openide.util.actions.CallableSystemAction;
26
import org.openide.util.HelpCtx;
27
import org.openide.util.HelpCtx;
28
import org.openide.util.Lookup;
27
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
28
import org.openide.util.SharedClassObject;
30
import org.openide.util.SharedClassObject;
29
31
Lines 82-89 Link Here
82
        if (isWritable) {
84
        if (isWritable) {
83
            ((NewTemplateAction) SharedClassObject.findObject (NewTemplateAction.class, true)).performAction ();
85
            ((NewTemplateAction) SharedClassObject.findObject (NewTemplateAction.class, true)).performAction ();
84
        } else {
86
        } else {
85
            Node mountNode = TopManager.getDefault ().getPlaces ().nodes ().repositorySettings ();
87
            Node mountNode = NbPlaces.getDefault().repositorySettings ();
86
            TopManager.getDefault ().getActionManager ().invokeAction (
88
            ActionManager am = (ActionManager)Lookup.getDefault ().lookup (ActionManager.class);
89
            am.invokeAction (
87
                (NewTemplateAction)SharedClassObject.findObject (NewTemplateAction.class, true),
90
                (NewTemplateAction)SharedClassObject.findObject (NewTemplateAction.class, true),
88
                new ActionEvent (mountNode, ActionEvent.ACTION_PERFORMED, null)
91
                new ActionEvent (mountNode, ActionEvent.ACTION_PERFORMED, null)
89
            );
92
            );
(-)core/src/org/netbeans/core/actions/OptionsAction.java (-6 / +8 lines)
Lines 32-38 Link Here
32
import org.openide.util.actions.SystemAction;
32
import org.openide.util.actions.SystemAction;
33
import org.openide.util.actions.ActionPerformer;
33
import org.openide.util.actions.ActionPerformer;
34
import org.openide.util.actions.CallableSystemAction;
34
import org.openide.util.actions.CallableSystemAction;
35
import org.openide.TopManager;
36
import org.openide.nodes.*;
35
import org.openide.nodes.*;
37
import org.openide.explorer.ExplorerPanel;
36
import org.openide.explorer.ExplorerPanel;
38
import org.openide.explorer.propertysheet.PropertySheetView;
37
import org.openide.explorer.propertysheet.PropertySheetView;
Lines 51-56 Link Here
51
import org.netbeans.core.projects.SettingChildren;
50
import org.netbeans.core.projects.SettingChildren;
52
import org.netbeans.core.projects.SessionManager;
51
import org.netbeans.core.projects.SessionManager;
53
import org.netbeans.core.NbMainExplorer;
52
import org.netbeans.core.NbMainExplorer;
53
import org.netbeans.core.NbPlaces;
54
import org.netbeans.core.windows.ModeImpl;
54
import org.netbeans.core.windows.ModeImpl;
55
import org.netbeans.core.windows.PersistenceManager;
55
import org.netbeans.core.windows.PersistenceManager;
56
import org.netbeans.core.windows.WindowManagerImpl;
56
import org.netbeans.core.windows.WindowManagerImpl;
Lines 73-79 Link Here
73
73
74
    /** Shows options panel. */
74
    /** Shows options panel. */
75
    public void performAction () {
75
    public void performAction () {
76
        TopManager.getDefault().setStatusText(NbBundle.getBundle(OptionsAction.class).getString("MSG_Preparing_options"));
76
        org.openide.awt.StatusDisplayer.getDefault().setStatusText(
77
            NbBundle.getBundle(OptionsAction.class).getString("MSG_Preparing_options"));
77
        OptionsPanel singleton = OptionsPanel.singleton();
78
        OptionsPanel singleton = OptionsPanel.singleton();
78
        singleton.prepareNodes ();
79
        singleton.prepareNodes ();
79
                
80
                
Lines 109-115 Link Here
109
                optionPanel.requestFocus();
110
                optionPanel.requestFocus();
110
                optionPanel.requestDefaultFocus();
111
                optionPanel.requestDefaultFocus();
111
                
112
                
112
                TopManager.getDefault ().setStatusText (""); // NOI18N
113
                org.openide.awt.StatusDisplayer.getDefault ().setStatusText (""); // NOI18N
113
            }
114
            }
114
        });
115
        });
115
    }
116
    }
Lines 248-254 Link Here
248
            gridBagConstraints.insets.left = 5;
249
            gridBagConstraints.insets.left = 5;
249
            help.addActionListener (new ActionListener () {
250
            help.addActionListener (new ActionListener () {
250
                public void actionPerformed (ActionEvent e) {
251
                public void actionPerformed (ActionEvent e) {
251
                    TopManager.getDefault ().showHelp (OptionsPanel.this.getHelpCtx ());
252
                    org.netbeans.core.NbTopManager.get().showHelp (
253
                            OptionsPanel.this.getHelpCtx ());
252
                }
254
                }
253
            });
255
            });
254
            add (help, gridBagConstraints);
256
            add (help, gridBagConstraints);
Lines 517-524 Link Here
517
        private static class OptionsFilterNode extends FilterNode {
519
        private static class OptionsFilterNode extends FilterNode {
518
            public OptionsFilterNode () {
520
            public OptionsFilterNode () {
519
                super (
521
                super (
520
                    TopManager.getDefault().getPlaces().nodes().session(),
522
                    NbPlaces.getDefault().session(),
521
                    new SettingChildren (TopManager.getDefault().getPlaces().nodes().session())
523
                    new SettingChildren (NbPlaces.getDefault().session())
522
                );
524
                );
523
            }
525
            }
524
            public HelpCtx getHelpCtx () {
526
            public HelpCtx getHelpCtx () {
(-)core/src/org/netbeans/core/actions/RestoreMaximizedFrameAction.java (-3 / +2 lines)
Lines 18-24 Link Here
18
import java.awt.event.*;
18
import java.awt.event.*;
19
import java.util.*;
19
import java.util.*;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
23
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
24
import org.openide.awt.JMenuPlus;
23
import org.openide.awt.JMenuPlus;
Lines 77-83 Link Here
77
            return false;
76
            return false;
78
        }
77
        }
79
        WindowManagerImpl wm =
78
        WindowManagerImpl wm =
80
        (WindowManagerImpl)TopManager.getDefault().getWindowManager();
79
        (WindowManagerImpl)WindowManager.getDefault();
81
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
80
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
82
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
81
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
83
        if (maximizedMode != null) {
82
        if (maximizedMode != null) {
Lines 99-105 Link Here
99
    /** Implementation of runnable interface, runs the action command */
98
    /** Implementation of runnable interface, runs the action command */
100
    public void run() {
99
    public void run() {
101
        WindowManagerImpl wm =
100
        WindowManagerImpl wm =
102
        (WindowManagerImpl)TopManager.getDefault().getWindowManager();
101
        (WindowManagerImpl)WindowManager.getDefault();
103
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
102
        WorkspaceImpl currentWorkspace = (WorkspaceImpl) wm.getCurrentWorkspace();
104
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
103
        ModeImpl maximizedMode = currentWorkspace.getTopMaximizedMode();
105
        if (maximizedMode != null) {
104
        if (maximizedMode != null) {
(-)core/src/org/netbeans/core/actions/SetArgumentsAction.java (-3 / +2 lines)
Lines 18-24 Link Here
18
import java.util.StringTokenizer;
18
import java.util.StringTokenizer;
19
19
20
import org.openide.DialogDescriptor;
20
import org.openide.DialogDescriptor;
21
import org.openide.TopManager;
22
import org.openide.NotifyDescriptor;
21
import org.openide.NotifyDescriptor;
23
import org.openide.cookies.ArgumentsCookie;
22
import org.openide.cookies.ArgumentsCookie;
24
import org.openide.execution.ExecInfo;
23
import org.openide.execution.ExecInfo;
Lines 93-99 Link Here
93
        HelpCtx.setHelpIDString(ap, "set.arguments.window"); // NOI18N
92
        HelpCtx.setHelpIDString(ap, "set.arguments.window"); // NOI18N
94
        DialogDescriptor dd = new DialogDescriptor (ap, NbBundle.getBundle(SetArgumentsAction.class).getString("CTL_SetArgumentsTitle"));
93
        DialogDescriptor dd = new DialogDescriptor (ap, NbBundle.getBundle(SetArgumentsAction.class).getString("CTL_SetArgumentsTitle"));
95
        dd.setHelpCtx(new HelpCtx("set.arguments.window"));
94
        dd.setHelpCtx(new HelpCtx("set.arguments.window"));
96
        TopManager.getDefault ().createDialog (dd).show ();
95
        org.openide.DialogDisplayer.getDefault ().createDialog (dd).show ();
97
96
98
        if (dd.getValue () == DialogDescriptor.OK_OPTION) {
97
        if (dd.getValue () == DialogDescriptor.OK_OPTION) {
99
            StringTokenizer st = new StringTokenizer (ap.getArguments ());
98
            StringTokenizer st = new StringTokenizer (ap.getArguments ());
Lines 105-111 Link Here
105
            try {
104
            try {
106
                cookie.setArguments (args);
105
                cookie.setArguments (args);
107
            } catch (IOException ex) {
106
            } catch (IOException ex) {
108
                TopManager.getDefault().notify(
107
                org.openide.DialogDisplayer.getDefault().notify(
109
                    new NotifyDescriptor.Message(
108
                    new NotifyDescriptor.Message(
110
                        NbBundle.getBundle(SetArgumentsAction.class).getString("MSG_ArgumentsCannotBeSet"),
109
                        NbBundle.getBundle(SetArgumentsAction.class).getString("MSG_ArgumentsCannotBeSet"),
111
                        NotifyDescriptor.ERROR_MESSAGE
110
                        NotifyDescriptor.ERROR_MESSAGE
(-)core/src/org/netbeans/core/actions/SystemExit.java (-3 / +2 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.actions;
14
package org.netbeans.core.actions;
15
15
16
import org.openide.TopManager;
17
import org.openide.util.HelpCtx;
16
import org.openide.util.HelpCtx;
18
import org.openide.util.actions.CallableSystemAction;
17
import org.openide.util.actions.CallableSystemAction;
19
import org.openide.util.NbBundle;
18
import org.openide.util.NbBundle;
Lines 57-64 Link Here
57
        RequestProcessor.getDefault().post(this);
56
        RequestProcessor.getDefault().post(this);
58
    }
57
    }
59
58
60
    /* Performs the exit (by calling TopManager).*/
59
    /* Performs the exit (by calling LifecycleManager).*/
61
    public void run() {
60
    public void run() {
62
        org.openide.TopManager.getDefault().exit();
61
        org.openide.LifecycleManager.getDefault().exit();
63
    }
62
    }
64
}
63
}
(-)core/src/org/netbeans/core/awt/TabControl.java (-1 lines)
Lines 25-31 Link Here
25
import java.lang.Thread;
25
import java.lang.Thread;
26
import java.io.*;
26
import java.io.*;
27
27
28
import org.openide.TopManager;
29
import org.openide.util.NbBundle;
28
import org.openide.util.NbBundle;
30
import org.openide.windows.WindowManager;
29
import org.openide.windows.WindowManager;
31
import org.netbeans.core.windows.MainWindow;
30
import org.netbeans.core.windows.MainWindow;
(-)core/src/org/netbeans/core/execution/DefaultSysProcess.java (-1 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.execution;
14
package org.netbeans.core.execution;
15
15
16
import org.openide.TopManager;
17
import org.openide.ErrorManager;
16
import org.openide.ErrorManager;
18
import org.openide.execution.ExecutorTask;
17
import org.openide.execution.ExecutorTask;
19
import org.openide.windows.InputOutput;
18
import org.openide.windows.InputOutput;
(-)core/src/org/netbeans/core/execution/ExecutionEngine.java (-1 lines)
Lines 37-43 Link Here
37
37
38
38
39
import org.openide.loaders.DataObject;
39
import org.openide.loaders.DataObject;
40
import org.openide.TopManager;
41
import org.openide.ErrorManager;
40
import org.openide.ErrorManager;
42
import org.openide.execution.NbClassPath;
41
import org.openide.execution.NbClassPath;
43
import org.openide.execution.ExecInfo;
42
import org.openide.execution.ExecInfo;
(-)core/src/org/netbeans/core/execution/ExecutionSettingsBeanInfo.java (-1 lines)
Lines 16-22 Link Here
16
import java.awt.Image;
16
import java.awt.Image;
17
import java.beans.*;
17
import java.beans.*;
18
18
19
import org.openide.TopManager;
20
import org.openide.util.Utilities;
19
import org.openide.util.Utilities;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
21
(-)core/src/org/netbeans/core/execution/IOTable.java (-2 / +1 lines)
Lines 18-24 Link Here
18
import java.util.HashMap;
18
import java.util.HashMap;
19
import java.util.Hashtable;
19
import java.util.Hashtable;
20
20
21
import org.openide.TopManager;
22
import org.openide.windows.InputOutput;
21
import org.openide.windows.InputOutput;
23
import org.openide.windows.OutputWriter;
22
import org.openide.windows.OutputWriter;
24
import org.openide.windows.TopComponent;
23
import org.openide.windows.TopComponent;
Lines 120-126 Link Here
120
                String allName = ((TopComponent) inout).getName();
119
                String allName = ((TopComponent) inout).getName();
121
                io = getTaskIO(allName);
120
                io = getTaskIO(allName);
122
                if (io == null) { // executed for the first time
121
                if (io == null) { // executed for the first time
123
                    inout = TopManager.getDefault().getIO(allName);
122
                    inout = org.openide.windows.IOProvider.getDefault().getIO(allName, true);
124
                    io = new TaskIO(inout, allName);
123
                    io = new TaskIO(inout, allName);
125
                } else {
124
                } else {
126
                    inout = io.getInout();
125
                    inout = io.getInout();
(-)core/src/org/netbeans/core/execution/RunClassThread.java (-2 / +1 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.execution;
14
package org.netbeans.core.execution;
15
15
16
import org.openide.TopManager;
17
import org.openide.windows.InputOutput;
16
import org.openide.windows.InputOutput;
18
17
19
/** Simple class for executing tasks in extra threads */
18
/** Simple class for executing tasks in extra threads */
Lines 91-97 Link Here
91
            TaskIO tIO = null;
90
            TaskIO tIO = null;
92
            tIO = engine.getTaskIOs().getTaskIO(ioname);
91
            tIO = engine.getTaskIOs().getTaskIO(ioname);
93
            if (tIO == null) { // executed for the first time
92
            if (tIO == null) { // executed for the first time
94
                io = TopManager.getDefault().getIO(ioname);
93
                io = org.openide.windows.IOProvider.getDefault().getIO(ioname, true);
95
                tIO = new TaskIO(io, ioname);
94
                tIO = new TaskIO(io, ioname);
96
            } else {
95
            } else {
97
                io = tIO.getInout();
96
                io = tIO.getInout();
(-)core/src/org/netbeans/core/execution/TabHandlerEditor.java (-1 lines)
Lines 18-24 Link Here
18
import java.util.HashMap;
18
import java.util.HashMap;
19
import java.util.Iterator;
19
import java.util.Iterator;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
23
22
24
/** A property editor for available workspaces.
23
/** A property editor for available workspaces.
(-)core/src/org/netbeans/core/execution/TopSecurityManager.java (-6 / +4 lines)
Lines 27-37 Link Here
27
import java.util.*;
27
import java.util.*;
28
import java.lang.reflect.Field;
28
import java.lang.reflect.Field;
29
29
30
import org.openide.TopManager;
31
import org.openide.ErrorManager;
30
import org.openide.ErrorManager;
32
import org.openide.execution.NbClassLoader;
33
34
//import ice.iblite.BrowserClassLoader;
35
31
36
/** See java.lang.SecurityManager for more details.
32
/** See java.lang.SecurityManager for more details.
37
*
33
*
Lines 50-61 Link Here
50
    private static final Class classLoaderClass;
46
    private static final Class classLoaderClass;
51
    private static final Class nbClassLoaderClass;
47
    private static final Class nbClassLoaderClass;
52
    private static final Class URLClass;
48
    private static final Class URLClass;
49
    private static final Class runtimePermissionClass;
53
50
54
    static {
51
    static {
55
        try {
52
        try {
56
            classLoaderClass = Class.forName("java.lang.ClassLoader"); // NOI18N
53
            classLoaderClass = Class.forName("java.lang.ClassLoader"); // NOI18N
57
            nbClassLoaderClass = Class.forName("org.openide.execution.NbClassLoader"); // NOI18N
54
            nbClassLoaderClass = Class.forName("org.openide.execution.NbClassLoader"); // NOI18N
58
            URLClass = Class.forName("java.net.URL"); // NOI18N
55
            URLClass = Class.forName("java.net.URL"); // NOI18N
56
            runtimePermissionClass = Class.forName("java.lang.RuntimePermission"); // NOI18N
59
            getAccessControllerClass();
57
            getAccessControllerClass();
60
        } catch (ClassNotFoundException e) {
58
        } catch (ClassNotFoundException e) {
61
            throw new ExceptionInInitializerError();
59
            throw new ExceptionInInitializerError();
Lines 268-274 Link Here
268
    
266
    
269
    /** Prohibits to set another SecurityManager */
267
    /** Prohibits to set another SecurityManager */
270
    private static void checkSetSecurityManager(Permission perm) {
268
    private static void checkSetSecurityManager(Permission perm) {
271
        if (perm instanceof RuntimePermission) {
269
        if (runtimePermissionClass.isInstance(perm)) {
272
            if ("setSecurityManager".equals(perm.getName())) { // NOI18N - hardcoded in java.lang
270
            if ("setSecurityManager".equals(perm.getName())) { // NOI18N - hardcoded in java.lang
273
                throw new SecurityException();
271
                throw new SecurityException();
274
            }
272
            }
Lines 292-298 Link Here
292
        ClassLoader cloader;
290
        ClassLoader cloader;
293
291
294
        for (int i = 0; i < ctx.length; i++) {
292
        for (int i = 0; i < ctx.length; i++) {
295
            if ((ctx[i].getClassLoader() instanceof NbClassLoader) &&
293
            if ((nbClassLoaderClass.isInstance(ctx[i].getClassLoader())) &&
296
                (ctx[i].getProtectionDomain().getCodeSource() != null)) {
294
                (ctx[i].getProtectionDomain().getCodeSource() != null)) {
297
                return true;
295
                return true;
298
            }
296
            }
(-)core/src/org/netbeans/core/modules/ManifestSection.java (-2 / +11 lines)
Lines 27-33 Link Here
27
import org.openide.loaders.DataLoader;
27
import org.openide.loaders.DataLoader;
28
import org.openide.options.SystemOption;
28
import org.openide.options.SystemOption;
29
import org.openide.filesystems.FileSystem;
29
import org.openide.filesystems.FileSystem;
30
import org.openide.debugger.Debugger;
31
import org.openide.ServiceType;
30
import org.openide.ServiceType;
32
import org.openide.util.actions.SystemAction;
31
import org.openide.util.actions.SystemAction;
33
import org.openide.nodes.Node;
32
import org.openide.nodes.Node;
Lines 35-40 Link Here
35
import org.openide.util.datatransfer.ExClipboard;
34
import org.openide.util.datatransfer.ExClipboard;
36
import org.openide.util.SharedClassObject;
35
import org.openide.util.SharedClassObject;
37
import org.openide.ErrorManager;
36
import org.openide.ErrorManager;
37
import org.openide.util.Lookup;
38
38
39
// XXX synchronization?
39
// XXX synchronization?
40
40
Lines 356-362 Link Here
356
     */
356
     */
357
    public static final class DebuggerSection extends ManifestSection {
357
    public static final class DebuggerSection extends ManifestSection {
358
        DebuggerSection(String name, Attributes attrs, Module module) throws InvalidException {
358
        DebuggerSection(String name, Attributes attrs, Module module) throws InvalidException {
359
            super(name, module, Debugger.class);
359
            super(name, module, getDebuggerClazz(module));
360
        }
361
        private static Class getDebuggerClazz(Module m) throws InvalidException {
362
            try {
363
                return ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass("org.openide.debugger.Debugger"); // NOI18N
364
            } catch (ClassNotFoundException cnfe) {
365
                InvalidException e = new InvalidException(m, "Debugger sections may only be used if you depend on org.openide.deprecated to be able to access Debugger"); // NOI18N
366
                Util.err.annotate(e, cnfe);
367
                throw e;
368
            }
360
        }
369
        }
361
    }
370
    }
362
    
371
    
(-)core/src/org/netbeans/core/modules/Module.java (+7 lines)
Lines 1088-1093 Link Here
1088
                return null;
1088
                return null;
1089
            }
1089
            }
1090
        }
1090
        }
1091
1092
        protected boolean isSpecialResource(String pkg) {
1093
            if (mgr.isSpecialResource(pkg)) {
1094
                return true;
1095
            }
1096
            return super.isSpecialResource(pkg);
1097
        }
1091
        
1098
        
1092
        protected boolean shouldDelegateResource(String pkg, ClassLoader parent) {
1099
        protected boolean shouldDelegateResource(String pkg, ClassLoader parent) {
1093
            if (!super.shouldDelegateResource(pkg, parent)) {
1100
            if (!super.shouldDelegateResource(pkg, parent)) {
(-)core/src/org/netbeans/core/modules/ModuleInstaller.java (+11 lines)
Lines 156-160 Link Here
156
    public void refineClassLoader(Module m, List parents) {
156
    public void refineClassLoader(Module m, List parents) {
157
        // do nothing
157
        // do nothing
158
    }
158
    }
159
    
160
    /** Is this package special in that the package domain cache should be disabled for it?
161
     * The result must never change between subsequent calls for the same argument.
162
     * The default implementation always says no.
163
     * @param pkg a package in the form "org/netbeans/modules/foo/"
164
     * @return true if this package might be split across modules, otherwise false
165
     * @since org.netbeans.core/1 > 1.7
166
     */
167
    public boolean isSpecialResource(String pkg) {
168
        return false;
169
    }
159
170
160
}
171
}
(-)core/src/org/netbeans/core/modules/ModuleList.java (-2 / +3 lines)
Lines 34-39 Link Here
34
import org.openide.util.Utilities;
34
import org.openide.util.Utilities;
35
import org.openide.util.WeakListener;
35
import org.openide.util.WeakListener;
36
import java.lang.reflect.Method;
36
import java.lang.reflect.Method;
37
import org.netbeans.core.LoaderPoolNode;
37
import org.openide.util.io.NbObjectInputStream;
38
import org.openide.util.io.NbObjectInputStream;
38
import org.openide.util.io.NbObjectOutputStream;
39
import org.openide.util.io.NbObjectOutputStream;
39
import org.openide.util.RequestProcessor;
40
import org.openide.util.RequestProcessor;
Lines 1063-1069 Link Here
1063
    private static final byte[] SERNULL = {0xAC - 0x100, 0xED - 0x100, 0x00, 0x05, 0x70};
1064
    private static final byte[] SERNULL = {0xAC - 0x100, 0xED - 0x100, 0x00, 0x05, 0x70};
1064
    
1065
    
1065
    private void transferLoaderPool (ObjectInput oi) throws IOException {
1066
    private void transferLoaderPool (ObjectInput oi) throws IOException {
1066
        FileObject pool = org.netbeans.core.NbProjectOperation.getLoaderPoolStorage ();
1067
        FileObject pool = LoaderPoolNode.getLoaderPoolStorage(true);
1067
        FileLock lock = pool.lock ();
1068
        FileLock lock = pool.lock ();
1068
        try {
1069
        try {
1069
            ObjectOutput os = new ObjectOutputStream (pool.getOutputStream (lock));
1070
            ObjectOutput os = new ObjectOutputStream (pool.getOutputStream (lock));
Lines 1084-1090 Link Here
1084
            lock.releaseLock ();
1085
            lock.releaseLock ();
1085
        }
1086
        }
1086
    }
1087
    }
1087
1088
    
1088
    /** Read an XML file using an XMLReader and parse into a map of properties.
1089
    /** Read an XML file using an XMLReader and parse into a map of properties.
1089
     * One distinguished property 'name' is the code name base
1090
     * One distinguished property 'name' is the code name base
1090
     * and is taken from the root element. Others are taken
1091
     * and is taken from the root element. Others are taken
(-)core/src/org/netbeans/core/modules/ModuleManager.java (-1 / +11 lines)
Lines 309-315 Link Here
309
    }
309
    }
310
    
310
    
311
    /** A classloader giving access to all the module classloaders at once. */
311
    /** A classloader giving access to all the module classloaders at once. */
312
    private static final class SystemClassLoader extends ProxyClassLoader {
312
    private final class SystemClassLoader extends ProxyClassLoader {
313
        
313
        
314
        private final StringBuffer debugme;
314
        private final StringBuffer debugme;
315
        private boolean empty = true;
315
        private boolean empty = true;
Lines 351-356 Link Here
351
            return debugme.toString();
351
            return debugme.toString();
352
        }
352
        }
353
        
353
        
354
        protected boolean isSpecialResource(String pkg) {
355
            if (installer.isSpecialResource(pkg)) {
356
                return true;
357
            }
358
            return super.isSpecialResource(pkg);
359
        }
360
        
354
    }
361
    }
355
362
356
    /** @see #create(File,Object,boolean,boolean,boolean)
363
    /** @see #create(File,Object,boolean,boolean,boolean)
Lines 476-481 Link Here
476
        }
483
        }
477
        // The installer can perform additional checks:
484
        // The installer can perform additional checks:
478
        return installer.shouldDelegateResource(m, parent, pkg);
485
        return installer.shouldDelegateResource(m, parent, pkg);
486
    }
487
    boolean isSpecialResource(String pkg) {
488
        return installer.isSpecialResource(pkg);
479
    }
489
    }
480
    // Again, access from Module to ModuleInstaller:
490
    // Again, access from Module to ModuleInstaller:
481
    Manifest loadManifest(File jar) throws IOException {
491
    Manifest loadManifest(File jar) throws IOException {
(-)core/src/org/netbeans/core/modules/ModuleSystem.java (-25 / +9 lines)
Lines 65-70 Link Here
65
        ev = Boolean.getBoolean("netbeans.modules.quiet") ? (Events)new QuietEvents() : new NbEvents();
65
        ev = Boolean.getBoolean("netbeans.modules.quiet") ? (Events)new QuietEvents() : new NbEvents();
66
        installer = new NbInstaller(ev);
66
        installer = new NbInstaller(ev);
67
        mgr = new ModuleManager(installer, ev);
67
        mgr = new ModuleManager(installer, ev);
68
        PropertyChangeListener l = new PropertyChangeListener() {
69
            public void propertyChange(PropertyChangeEvent ev) {
70
                if (ModuleManager.PROP_CLASS_LOADER.equals(ev.getPropertyName())) {
71
                    NbTopManager.Lkp.systemClassLoaderChanged(mgr.getClassLoader());
72
                }
73
            }
74
        };
75
        mgr.addPropertyChangeListener(l);
76
        NbTopManager.Lkp.systemClassLoaderChanged(mgr.getClassLoader());
68
        if (systemFileSystem.isReadOnly()) {
77
        if (systemFileSystem.isReadOnly()) {
69
            list = null;
78
            list = null;
70
        } else {
79
        } else {
Lines 116-146 Link Here
116
    public Events getEvents() {
125
    public Events getEvents() {
117
        return ev;
126
        return ev;
118
    }
127
    }
119
    
120
    /** Get the system classloader, for use from NbTopManager.
121
     * When it changes, NbTopManager will likewise be notified.
122
     */
123
    public ClassLoader getSystemClassLoader() {
124
        if (! addedClassLoaderListener) {
125
            addedClassLoaderListener = true;
126
            class ListenerFirer implements PropertyChangeListener, Runnable {
127
                public void propertyChange(PropertyChangeEvent ev) {
128
                    if (ModuleManager.PROP_CLASS_LOADER.equals(ev.getPropertyName())) {
129
                        // Exit read mutex first for safety.
130
                        RequestProcessor.getDefault().post(ListenerFirer.this);
131
                    }
132
                }
133
                public void run() {
134
                    NbTopManager.get().fireSystemClassLoaderChange();
135
                    Util.err.log("fired change in system classloader");
136
                }
137
            }
138
            mgr.addPropertyChangeListener(new ListenerFirer());
139
        }
140
        // #16265: no need for write mutex any more.
141
        return mgr.getClassLoader();
142
    }
143
    private boolean addedClassLoaderListener = false;
144
    
128
    
145
    /** Produce a list of JAR files including all installed modules,
129
    /** Produce a list of JAR files including all installed modules,
146
     * their extensions, and enabled locale variants of both.
130
     * their extensions, and enabled locale variants of both.
(-)core/src/org/netbeans/core/modules/NbEvents.java (-29 / +50 lines)
Lines 15-23 Link Here
15
15
16
// May use core, GUI, ad nauseum.
16
// May use core, GUI, ad nauseum.
17
17
18
import org.openide.TopManager;
19
import java.io.File;
18
import java.io.File;
20
import java.util.*;
19
import java.util.*;
20
import org.openide.awt.StatusDisplayer;
21
import org.openide.NotifyDescriptor;
21
import org.openide.NotifyDescriptor;
22
import org.openide.filesystems.FileObject;
22
import org.openide.filesystems.FileObject;
23
import org.openide.modules.SpecificationVersion;
23
import org.openide.modules.SpecificationVersion;
Lines 33-40 Link Here
33
 */
33
 */
34
final class NbEvents extends Events {
34
final class NbEvents extends Events {
35
    
35
    
36
    private final TopManager tm = TopManager.getDefault();
37
    
38
    /** Handle a logged event.
36
    /** Handle a logged event.
39
     * CAREFUL that this is called synchronously, usually within a write
37
     * CAREFUL that this is called synchronously, usually within a write
40
     * mutex or other sensitive environment. So do not call anything
38
     * mutex or other sensitive environment. So do not call anything
Lines 51-105 Link Here
51
        } else if (message == START_CREATE_BOOT_MODULE) {
49
        } else if (message == START_CREATE_BOOT_MODULE) {
52
            Main.addToSplashMaxSteps(1);
50
            Main.addToSplashMaxSteps(1);
53
        } else if (message == START_LOAD_BOOT_MODULES) {
51
        } else if (message == START_LOAD_BOOT_MODULES) {
54
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_load_boot_modules"));
52
            StatusDisplayer.getDefault().setStatusText(
53
                NbBundle.getMessage(NbEvents.class, "MSG_start_load_boot_modules"));
55
            StartLog.logStart("ModuleSystem.loadBootModules"); // NOI18N
54
            StartLog.logStart("ModuleSystem.loadBootModules"); // NOI18N
56
        } else if (message == START_LOAD) {
55
        } else if (message == START_LOAD) {
57
            StartLog.logStart("NbInstaller.load"); // NOI18N
56
            StartLog.logStart("NbInstaller.load"); // NOI18N
58
        } else if (message == FINISH_LOAD_BOOT_MODULES) {
57
        } else if (message == FINISH_LOAD_BOOT_MODULES) {
59
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_load_boot_modules"));
58
            StatusDisplayer.getDefault().setStatusText(
59
                NbBundle.getMessage(NbEvents.class, "MSG_finish_load_boot_modules"));
60
            StartLog.logEnd( "ModuleSystem.loadBootModules" ); // NOI18N
60
            StartLog.logEnd( "ModuleSystem.loadBootModules" ); // NOI18N
61
        } else if (message == FINISH_LOAD) {
61
        } else if (message == FINISH_LOAD) {
62
            StartLog.logEnd("NbInstaller.load"); // NOI18N
62
            StartLog.logEnd("NbInstaller.load"); // NOI18N
63
        } else if (message == START_AUTO_INSTALL) {
63
        } else if (message == START_AUTO_INSTALL) {
64
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_auto_install"));
64
            StatusDisplayer.getDefault().setStatusText(
65
                NbBundle.getMessage(NbEvents.class, "MSG_start_auto_install"));
65
        } else if (message == START_AUTO_RESTORE) {
66
        } else if (message == START_AUTO_RESTORE) {
66
            Set modules = (Set)args[0];
67
            Set modules = (Set)args[0];
67
            if (! modules.isEmpty()) {
68
            if (! modules.isEmpty()) {
68
                tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_auto_restore"));
69
                StatusDisplayer.getDefault().setStatusText(
70
                    NbBundle.getMessage(NbEvents.class, "MSG_start_auto_restore"));
69
            }
71
            }
70
        } else if (message == FINISH_AUTO_INSTALL) {
72
        } else if (message == FINISH_AUTO_INSTALL) {
71
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_auto_install"));
73
            StatusDisplayer.getDefault().setStatusText(
74
                NbBundle.getMessage(NbEvents.class, "MSG_finish_auto_install"));
72
        } else if (message == FINISH_AUTO_RESTORE) {
75
        } else if (message == FINISH_AUTO_RESTORE) {
73
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_auto_restore"));
76
            StatusDisplayer.getDefault().setStatusText(
77
                NbBundle.getMessage(NbEvents.class, "MSG_finish_auto_restore"));
74
        } else if (message == START_ENABLE_MODULES) {
78
        } else if (message == START_ENABLE_MODULES) {
75
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_enable_modules"));
79
            StatusDisplayer.getDefault().setStatusText(
80
                NbBundle.getMessage(NbEvents.class, "MSG_start_enable_modules"));
76
        } else if (message == FINISH_ENABLE_MODULES) {
81
        } else if (message == FINISH_ENABLE_MODULES) {
77
            List modules = (List)args[0];
82
            List modules = (List)args[0];
78
            if (! modules.isEmpty()) {
83
            if (! modules.isEmpty()) {
79
                System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_finish_enable_modules"));
84
                System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_finish_enable_modules"));
80
                dumpModulesList(modules);
85
                dumpModulesList(modules);
81
            }
86
            }
82
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_enable_modules"));
87
            StatusDisplayer.getDefault().setStatusText(
88
                NbBundle.getMessage(NbEvents.class, "MSG_finish_enable_modules"));
83
            StartLog.logEnd("ModuleManager.enable"); // NOI18N
89
            StartLog.logEnd("ModuleManager.enable"); // NOI18N
84
        } else if (message == START_DISABLE_MODULES) {
90
        } else if (message == START_DISABLE_MODULES) {
85
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_disable_modules"));
91
            StatusDisplayer.getDefault().setStatusText(
92
                NbBundle.getMessage(NbEvents.class, "MSG_start_disable_modules"));
86
        } else if (message == FINISH_DISABLE_MODULES) {
93
        } else if (message == FINISH_DISABLE_MODULES) {
87
            List modules = (List)args[0];
94
            List modules = (List)args[0];
88
            if (! modules.isEmpty()) {
95
            if (! modules.isEmpty()) {
89
                System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_finish_disable_modules"));
96
                System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_finish_disable_modules"));
90
                dumpModulesList(modules);
97
                dumpModulesList(modules);
91
            }
98
            }
92
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_disable_modules"));
99
            StatusDisplayer.getDefault().setStatusText(
100
                NbBundle.getMessage(NbEvents.class, "MSG_finish_disable_modules"));
93
        } else if (message == CONVERTING) {
101
        } else if (message == CONVERTING) {
94
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "TEXT_converting"));
102
            StatusDisplayer.getDefault().setStatusText(
103
                NbBundle.getMessage(NbEvents.class, "TEXT_converting"));
95
        } else if (message == START_DEPLOY_TEST_MODULE) {
104
        } else if (message == START_DEPLOY_TEST_MODULE) {
96
            // No need to print anything. ModuleSystem.deployTestModule prints
105
            // No need to print anything. ModuleSystem.deployTestModule prints
97
            // its own stuff (it needs to be printed synchronously to console
106
            // its own stuff (it needs to be printed synchronously to console
98
            // in order to appear in the output window). But status text is OK.
107
            // in order to appear in the output window). But status text is OK.
99
            // Again no need for I18N as this is only for module developers.
108
            // Again no need for I18N as this is only for module developers.
100
            tm.setStatusText("Deploying test module in " + (File)args[0] + "..."); // NOI18N
109
            StatusDisplayer.getDefault().setStatusText(
110
                "Deploying test module in " + (File)args[0] + "..."); // NOI18N
101
        } else if (message == FINISH_DEPLOY_TEST_MODULE) {
111
        } else if (message == FINISH_DEPLOY_TEST_MODULE) {
102
            tm.setStatusText("Finished deploying test module."); // NOI18N
112
            StatusDisplayer.getDefault().setStatusText(
113
                "Finished deploying test module."); // NOI18N
103
        } else if (message == FAILED_INSTALL_NEW) {
114
        } else if (message == FAILED_INSTALL_NEW) {
104
            StringBuffer buf = new StringBuffer(NbBundle.getMessage(NbEvents.class, "MSG_failed_install_new"));
115
            StringBuffer buf = new StringBuffer(NbBundle.getMessage(NbEvents.class, "MSG_failed_install_new"));
105
            Iterator it = ((Set)args[0]).iterator();
116
            Iterator it = ((Set)args[0]).iterator();
Lines 122-128 Link Here
122
                }
133
                }
123
            }
134
            }
124
            notify(buf.toString(), true);
135
            notify(buf.toString(), true);
125
            tm.setStatusText("");
136
            StatusDisplayer.getDefault().setStatusText("");
126
        } else if (message == FAILED_INSTALL_NEW_UNEXPECTED) {
137
        } else if (message == FAILED_INSTALL_NEW_UNEXPECTED) {
127
            Module m = (Module)args[0];
138
            Module m = (Module)args[0];
128
            // ignore args[1]: InvalidException
139
            // ignore args[1]: InvalidException
Lines 141-149 Link Here
141
                throw new IllegalStateException("Module " + m + " could not be installed but had no problems"); // NOI18N
152
                throw new IllegalStateException("Module " + m + " could not be installed but had no problems"); // NOI18N
142
            }
153
            }
143
            notify(buf.toString(), true);
154
            notify(buf.toString(), true);
144
            tm.setStatusText("");
155
            StatusDisplayer.getDefault().setStatusText("");
145
        } else if (message == START_READ) {
156
        } else if (message == START_READ) {
146
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_read"));
157
            StatusDisplayer.getDefault().setStatusText(
158
                NbBundle.getMessage(NbEvents.class, "MSG_start_read"));
147
            StartLog.logStart("ModuleList.readInitial"); // NOI18N
159
            StartLog.logStart("ModuleList.readInitial"); // NOI18N
148
        } else if (message == MODULES_FILE_PROCESSED) {
160
        } else if (message == MODULES_FILE_PROCESSED) {
149
            Main.incrementSplashProgressBar();
161
            Main.incrementSplashProgressBar();
Lines 153-164 Link Here
153
        } else if (message == FINISH_READ) {
165
        } else if (message == FINISH_READ) {
154
            Set modules = (Set)args[0];
166
            Set modules = (Set)args[0];
155
            Main.addToSplashMaxSteps(modules.size() + modules.size());
167
            Main.addToSplashMaxSteps(modules.size() + modules.size());
156
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_read"));
168
            StatusDisplayer.getDefault().setStatusText(
169
                NbBundle.getMessage(NbEvents.class, "MSG_finish_read"));
157
            StartLog.logEnd("ModuleList.readInitial"); // NOI18N
170
            StartLog.logEnd("ModuleList.readInitial"); // NOI18N
158
        } else if (message == START_SCAN) {
171
        } else if (message == START_SCAN) {
159
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_start_scan"));
172
            StatusDisplayer.getDefault().setStatusText(
173
                NbBundle.getMessage(NbEvents.class, "MSG_start_scan"));
160
        } else if (message == FINISH_SCAN) {
174
        } else if (message == FINISH_SCAN) {
161
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_finish_scan"));
175
            StatusDisplayer.getDefault().setStatusText(
176
                NbBundle.getMessage(NbEvents.class, "MSG_finish_scan"));
162
            Set modules = (Set)args[0];
177
            Set modules = (Set)args[0];
163
            Main.addToSplashMaxSteps(modules.size());
178
            Main.addToSplashMaxSteps(modules.size());
164
           if (! modules.isEmpty()) {
179
           if (! modules.isEmpty()) {
Lines 167-191 Link Here
167
            }
182
            }
168
        } else if (message == RESTORE) {
183
        } else if (message == RESTORE) {
169
            // Don't look for display name. Just takes too long.
184
            // Don't look for display name. Just takes too long.
170
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_restore"/*, ((Module)args[0]).getDisplayName()*/));
185
            StatusDisplayer.getDefault().setStatusText(
186
                NbBundle.getMessage(NbEvents.class, "MSG_restore"/*, ((Module)args[0]).getDisplayName()*/));
171
            Main.incrementSplashProgressBar();
187
            Main.incrementSplashProgressBar();
172
        } else if (message == INSTALL) {
188
        } else if (message == INSTALL) {
173
            // Nice to see the real title; not that common, after all.
189
            // Nice to see the real title; not that common, after all.
174
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_install", ((Module)args[0]).getDisplayName()));
190
            StatusDisplayer.getDefault().setStatusText(
191
                NbBundle.getMessage(NbEvents.class, "MSG_install", ((Module)args[0]).getDisplayName()));
175
            System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_install", ((Module)args[0]).getDisplayName()));
192
            System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_install", ((Module)args[0]).getDisplayName()));
176
            Main.incrementSplashProgressBar();
193
            Main.incrementSplashProgressBar();
177
        } else if (message == UPDATE) {
194
        } else if (message == UPDATE) {
178
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_update", ((Module)args[0]).getDisplayName()));
195
            StatusDisplayer.getDefault().setStatusText(
196
                NbBundle.getMessage(NbEvents.class, "MSG_update", ((Module)args[0]).getDisplayName()));
179
            System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_update", ((Module)args[0]).getDisplayName()));
197
            System.err.println(NbBundle.getMessage(NbEvents.class, "TEXT_update", ((Module)args[0]).getDisplayName()));
180
            Main.incrementSplashProgressBar();
198
            Main.incrementSplashProgressBar();
181
        } else if (message == UNINSTALL) {
199
        } else if (message == UNINSTALL) {
182
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_uninstall", ((Module)args[0]).getDisplayName()));
200
            StatusDisplayer.getDefault().setStatusText(
201
                NbBundle.getMessage(NbEvents.class, "MSG_uninstall", ((Module)args[0]).getDisplayName()));
183
        } else if (message == LOAD_SECTION) {
202
        } else if (message == LOAD_SECTION) {
184
            // Again avoid finding display name now.
203
            // Again avoid finding display name now.
185
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_load_section"/*, ((Module)args[0]).getDisplayName()*/));
204
            StatusDisplayer.getDefault().setStatusText(
205
                NbBundle.getMessage(NbEvents.class, "MSG_load_section"/*, ((Module)args[0]).getDisplayName()*/));
186
            Main.incrementSplashProgressBar();
206
            Main.incrementSplashProgressBar();
187
        } else if (message == LOAD_LAYERS) {
207
        } else if (message == LOAD_LAYERS) {
188
            tm.setStatusText(NbBundle.getMessage(NbEvents.class, "MSG_load_layers"));
208
            StatusDisplayer.getDefault().setStatusText(
209
                NbBundle.getMessage(NbEvents.class, "MSG_load_layers"));
189
        } else if (message == WRONG_CLASS_LOADER) {
210
        } else if (message == WRONG_CLASS_LOADER) {
190
            if (! Boolean.getBoolean("netbeans.moduleitem.dontverifyclassloader")) { // NOI18N
211
            if (! Boolean.getBoolean("netbeans.moduleitem.dontverifyclassloader")) { // NOI18N
191
                Class clazz = (Class)args[1];
212
                Class clazz = (Class)args[1];
Lines 343-349 Link Here
343
            this.desc = desc;
364
            this.desc = desc;
344
        }
365
        }
345
        public void run() {
366
        public void run() {
346
            TopManager.getDefault().notify(desc);
367
            org.openide.DialogDisplayer.getDefault().notify(desc);
347
        }
368
        }
348
    }
369
    }
349
    
370
    
(-)core/src/org/netbeans/core/modules/NbInstaller.java (-4 / +66 lines)
Lines 201-206 Link Here
201
    
201
    
202
    public void load(List modules) {
202
    public void load(List modules) {
203
        ev.log(Events.START_LOAD, modules);
203
        ev.log(Events.START_LOAD, modules);
204
        
205
        // Not necessary during unload() since then the class loader will change
206
        // anyway and Lkp.systemClassLoaderChanged will be called.
207
        NbTopManager.Lkp.moduleClassLoadersUp();
208
        ev.log(Events.PERF_TICK, "META-INF/services/ additions registered"); // NOI18N
209
        
204
        loadLayers(modules, true);
210
        loadLayers(modules, true);
205
        ev.log(Events.PERF_TICK, "layers loaded"); // NOI18N
211
        ev.log(Events.PERF_TICK, "layers loaded"); // NOI18N
206
	
212
	
Lines 702-721 Link Here
702
        return openide;
708
        return openide;
703
    }
709
    }
704
    
710
    
711
    /** If true, no automatic deps are made on modules for old client modules.
712
     * Useful for unit tests.
713
     */
714
    private static final boolean NO_COMPAT_AUTO_DEPS_JH = Boolean.getBoolean("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_JH");
715
    private static final boolean NO_COMPAT_AUTO_DEPS_DEPRECATED = Boolean.getBoolean("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_DEPRECATED");
716
    
705
    /** Overridden to perform automatic API upgrades.
717
    /** Overridden to perform automatic API upgrades.
706
     * That is, should do nothing on new modules, but for older ones will
718
     * That is, should do nothing on new modules, but for older ones will
707
     * automatically make them depend on things they need.
719
     * automatically make them depend on things they need.
708
     */
720
     */
709
    public void refineDependencies(Module m, Set dependencies) {
721
    public void refineDependencies(Module m, Set dependencies) {
710
        // Special case.
722
        // Special cases.
711
        if (m.getCodeNameBase().equals("org.netbeans.core")) return; // NOI18N
723
        if (m.getCodeNameBase().equals("org.netbeans.core")) return; // NOI18N
724
        if (m.getCodeNameBase().startsWith("org.netbeans.core.")) return; // NOI18N
725
        if (m.getCodeNameBase().equals("org.openide")) return; // NOI18N
726
        if (m.getCodeNameBase().startsWith("org.openide.")) return; // NOI18N
712
        // First find out what API this module is expecting.
727
        // First find out what API this module is expecting.
713
        // Format: release.major.minor, e.g. IDE/1 > 2.3 => "1.2.3"
728
        // Format: release.major.minor, e.g. IDE/1 > 2.3 => "1.2.3"
714
        SpecificationVersion openide = getIDEDep(dependencies);
729
        SpecificationVersion openide = getIDEDep(dependencies);
715
        // Handle JavaHelp. For modules before API 2.2, they should have an
730
        // Handle JavaHelp. For modules before API 2.2, they should have an
716
        // automatic dependency on token org.netbeans.api.javahelp.Help.
731
        // automatic dependency on token org.netbeans.api.javahelp.Help.
717
        if (!m.getCodeNameBase().equals("org.netbeans.modules.javahelp") && // NOI18N
732
        if (!NO_COMPAT_AUTO_DEPS_JH && !m.getCodeNameBase().equals("org.netbeans.modules.javahelp") && // NOI18N
718
            !m.getCodeNameBase().equals("org.openide") && // NOI18N
719
                (openide == null || openide.compareTo(new SpecificationVersion("1.2.2")) < 0)) { // NOI18N
733
                (openide == null || openide.compareTo(new SpecificationVersion("1.2.2")) < 0)) { // NOI18N
720
            // Older than IDE/1 2.2, or at least does not claim to be newer.
734
            // Older than IDE/1 2.2, or at least does not claim to be newer.
721
            // First make sure it does not *already* depend on this module.
735
            // First make sure it does not *already* depend on this module.
Lines 735-748 Link Here
735
                                                      "org.netbeans.api.javahelp.Help")); // NOI18N
749
                                                      "org.netbeans.api.javahelp.Help")); // NOI18N
736
            }
750
            }
737
        }
751
        }
752
        // For pre-3.14, add automatic deps on org.openide.src and org.openide.deprecated.
753
        if (!NO_COMPAT_AUTO_DEPS_DEPRECATED && (openide == null || openide.compareTo(new SpecificationVersion("1.3.14")) < 0)) { // NOI18N
754
            String[] nue = new String[] {
755
                "org.openide.deprecated", // NOI18N
756
                "org.openide.src", // NOI18N
757
            };
758
            for (int i = 0; i < nue.length; i++) {
759
                boolean alreadyHave = false;
760
                Iterator it = dependencies.iterator();
761
                while (it.hasNext()) {
762
                    Dependency d = (Dependency)it.next();
763
                    if (d.getType() == Dependency.TYPE_MODULE &&
764
                            d.getName().equals(nue[i])) {
765
                        alreadyHave = true;
766
                        break;
767
                    }
768
                }
769
                if (!alreadyHave) {
770
                    Util.err.log("Adding automatic dependency on " + nue[i] + " for module " + m.getCodeNameBase());
771
                    dependencies.addAll(Dependency.create(Dependency.TYPE_MODULE, nue[i] + " > 1.0")); // NOI18N
772
                }
773
            }
774
            boolean alreadyHave = false;
775
            Iterator it = dependencies.iterator();
776
            while (it.hasNext()) {
777
                Dependency d = (Dependency)it.next();
778
                if (d.getType() == Dependency.TYPE_REQUIRES &&
779
                        d.getName().equals("org.openide.TopManager")) { // NOI18N
780
                    alreadyHave = true;
781
                    break;
782
                }
783
            }
784
            if (!alreadyHave) {
785
                Util.err.log("Adding automatic dependency on org.openide.TopManager for module " + m.getCodeNameBase());
786
                dependencies.addAll(Dependency.create(Dependency.TYPE_REQUIRES, "org.openide.TopManager")); // NOI18N
787
            }
788
        }
738
    }
789
    }
739
    
790
    
791
    private static final boolean NO_COMPAT_AUTO_TRANSITIVE_DEPS = Boolean.getBoolean("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_TRANSITIVE_DEPS");
792
740
    // Compat for #27853: if an old module (pre-3.12) declares some dependencies,
793
    // Compat for #27853: if an old module (pre-3.12) declares some dependencies,
741
    // interpret them recursively to force its classloader to "see" accessible
794
    // interpret them recursively to force its classloader to "see" accessible
742
    // classes from even indirect dependencies.
795
    // classes from even indirect dependencies.
743
    public void refineClassLoader(Module m, List parents) {
796
    public void refineClassLoader(Module m, List parents) {
744
        SpecificationVersion openide = getIDEDep(m.getDependencies());
797
        SpecificationVersion openide = getIDEDep(m.getDependencies());
745
        if (openide == null || openide.compareTo(new SpecificationVersion("1.3.12")) < 0) { // NOI18N
798
        if (!NO_COMPAT_AUTO_TRANSITIVE_DEPS && (openide == null || openide.compareTo(new SpecificationVersion("1.3.12")) < 0)) { // NOI18N
746
            Dependency[] deps = m.getDependenciesArray();
799
            Dependency[] deps = m.getDependenciesArray();
747
            Set parentModules = new HashSet(deps.length * 3 + 5); // Set<Module>
800
            Set parentModules = new HashSet(deps.length * 3 + 5); // Set<Module>
748
            addLoadersRecursively(parents, deps, parentModules, m);
801
            addLoadersRecursively(parents, deps, parentModules, m);
Lines 900-905 Link Here
900
        // No one ought to be using boot.jar:
953
        // No one ought to be using boot.jar:
901
        {"boot"}, // NOI18N
954
        {"boot"}, // NOI18N
902
    };
955
    };
956
    
957
    /** These packages have been refactored into several modules.
958
     * Disable the domain cache for them.
959
     */
960
    public boolean isSpecialResource(String pkg) {
961
        if (pkg.startsWith("org/openide/")) return true; // NOI18N
962
        if (pkg.startsWith("org/netbeans/core/")) return true; // NOI18N
963
        return super.isSpecialResource(pkg);
964
    }
903
    
965
    
904
    /** Get the effective "classpath" used by a module.
966
    /** Get the effective "classpath" used by a module.
905
     * Specific syntax: classpath entries as usual, but
967
     * Specific syntax: classpath entries as usual, but
(-)core/src/org/netbeans/core/output/FindDialogPanel.java (-2 / +1 lines)
Lines 21-27 Link Here
21
import javax.swing.JCheckBox;
21
import javax.swing.JCheckBox;
22
import javax.swing.SwingUtilities;
22
import javax.swing.SwingUtilities;
23
import org.openide.DialogDescriptor;
23
import org.openide.DialogDescriptor;
24
import org.openide.TopManager;
25
import org.openide.util.NbBundle;
24
import org.openide.util.NbBundle;
26
25
27
/**
26
/**
Lines 220-226 Link Here
220
                                   }
219
                                   }
221
                               });
220
                               });
222
221
223
        dialog = TopManager.getDefault().createDialog( dialogDescriptor );
222
        dialog = org.openide.DialogDisplayer.getDefault().createDialog( dialogDescriptor );
224
    }
223
    }
225
    
224
    
226
}
225
}
(-)core/src/org/netbeans/core/output/OutputSettingsBeanInfo.java (-1 lines)
Lines 16-22 Link Here
16
import java.awt.Image;
16
import java.awt.Image;
17
import java.beans.*;
17
import java.beans.*;
18
18
19
import org.openide.TopManager;
20
import org.openide.util.Utilities;
19
import org.openide.util.Utilities;
21
import org.netbeans.beaninfo.editors.FileEditor;
20
import org.netbeans.beaninfo.editors.FileEditor;
22
import org.openide.ErrorManager;
21
import org.openide.ErrorManager;
(-)core/src/org/netbeans/core/output/OutputTabTerm.java (-10 / +15 lines)
Lines 39-44 Link Here
39
import java.beans.PropertyChangeEvent;
39
import java.beans.PropertyChangeEvent;
40
import java.util.ArrayList;
40
import java.util.ArrayList;
41
import java.util.Enumeration;
41
import java.util.Enumeration;
42
import java.util.Observable;
43
import java.util.Observer;
42
44
43
import javax.swing.JFrame;
45
import javax.swing.JFrame;
44
import javax.swing.JPanel;
46
import javax.swing.JPanel;
Lines 49-55 Link Here
49
import javax.swing.SwingUtilities;
51
import javax.swing.SwingUtilities;
50
import javax.swing.text.Keymap;
52
import javax.swing.text.Keymap;
51
53
52
import org.openide.TopManager;
53
import org.openide.ErrorManager;
54
import org.openide.ErrorManager;
54
import org.openide.windows.*;
55
import org.openide.windows.*;
55
import org.openide.awt.SplittedPanel;
56
import org.openide.awt.SplittedPanel;
Lines 78-83 Link Here
78
import org.netbeans.core.windows.*;
79
import org.netbeans.core.windows.*;
79
import org.netbeans.core.actions.NextOutJumpAction;
80
import org.netbeans.core.actions.NextOutJumpAction;
80
import org.netbeans.core.actions.PreviousOutJumpAction;
81
import org.netbeans.core.actions.PreviousOutJumpAction;
82
import org.netbeans.core.NbTopManager;
81
83
82
import org.netbeans.lib.terminalemulator.*;
84
import org.netbeans.lib.terminalemulator.*;
83
import org.openide.filesystems.FileSystem;
85
import org.openide.filesystems.FileSystem;
Lines 717-730 Link Here
717
	keyStrokeSet = new HashSet();
719
	keyStrokeSet = new HashSet();
718
720
719
	// Arrange so that we track changes in global keymap
721
	// Arrange so that we track changes in global keymap
720
	TopManager tm = TopManager.getDefault();
722
        Keymap map = (Keymap)org.openide.util.Lookup.getDefault().lookup(Keymap.class);
721
	tm.addPropertyChangeListener(new PropertyChangeListener() {
723
        // This is a hack. Since there is no official API for notifying changes
722
	    public void propertyChange (PropertyChangeEvent evt) {
724
        // from Keymap, just rely on fact that core impl is an Observable.
723
		if (evt.getPropertyName().equals(TopManager.PROP_GLOBAL_KEYMAP)) {
725
        if (map instanceof Observable) {
726
            Observable o = (Observable)map;
727
            o.addObserver(new Observer() {
728
                public void update(Observable o, Object arg) {
724
		    updateKeyStrokeSet();
729
		    updateKeyStrokeSet();
725
		}
730
                }
726
	    }
731
            });
727
	} );
732
        }
728
733
729
	updateKeyStrokeSet();
734
	updateKeyStrokeSet();
730
735
Lines 1280-1286 Link Here
1280
		    } else {
1285
		    } else {
1281
			String msg = NbBundle.getBundle(OutputTabTerm.class).
1286
			String msg = NbBundle.getBundle(OutputTabTerm.class).
1282
			    getString("MSG_AtLastError");
1287
			    getString("MSG_AtLastError");
1283
			TopManager.getDefault().setStatusText(msg);
1288
			org.openide.awt.StatusDisplayer.getDefault().setStatusText(msg);
1284
			next_wrap_warned = true;
1289
			next_wrap_warned = true;
1285
			return false;
1290
			return false;
1286
		    }
1291
		    }
Lines 1304-1310 Link Here
1304
		    } else {
1309
		    } else {
1305
			String msg = NbBundle.getBundle(OutputTabTerm.class).
1310
			String msg = NbBundle.getBundle(OutputTabTerm.class).
1306
			    getString("MSG_AtFirstError");
1311
			    getString("MSG_AtFirstError");
1307
			TopManager.getDefault().setStatusText(msg);
1312
			org.openide.awt.StatusDisplayer.getDefault().setStatusText(msg);
1308
			prev_wrap_warned = true;
1313
			prev_wrap_warned = true;
1309
			return false;
1314
			return false;
1310
		    }
1315
		    }
(-)core/src/org/netbeans/core/perftool/PerformanceMeterFactory.java (-2 / +3 lines)
Lines 13-20 Link Here
13
13
14
package org.netbeans.core.perftool;
14
package org.netbeans.core.perftool;
15
15
16
import org.openide.TopManager;
17
import org.openide.ErrorManager;
16
import org.openide.ErrorManager;
17
import org.openide.util.Lookup;
18
18
19
/** Creates PerformanceMeter
19
/** Creates PerformanceMeter
20
 *
20
 *
Lines 30-36 Link Here
30
            String opt = System.getProperty(PerformanceMeter.NAMING_NAME);
30
            String opt = System.getProperty(PerformanceMeter.NAMING_NAME);
31
            if (opt != null && !opt.equals(Boolean.TRUE.toString())) {
31
            if (opt != null && !opt.equals(Boolean.TRUE.toString())) {
32
                try {
32
                try {
33
                    Class clz = Class.forName(opt, false, TopManager.getDefault().systemClassLoader());
33
                    Class clz = Class.forName(opt, false,
34
                        (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class));
34
                } catch (ClassNotFoundException e) {
35
                } catch (ClassNotFoundException e) {
35
                    ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
36
                    ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
36
                    instance = PerformanceMeterImpl.getInstance();
37
                    instance = PerformanceMeterImpl.getInstance();
(-)core/src/org/netbeans/core/perftool/PerformanceMeterImpl.java (-1 lines)
Lines 15-21 Link Here
15
15
16
import java.text.MessageFormat;
16
import java.text.MessageFormat;
17
17
18
import org.openide.TopManager;
19
import org.openide.ErrorManager;
18
import org.openide.ErrorManager;
20
19
21
/** The class collects performance info about different
20
/** The class collects performance info about different
(-)core/src/org/netbeans/core/projects/FileStateManager.java (-1 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.projects;
14
package org.netbeans.core.projects;
15
15
16
import org.openide.TopManager;
17
import org.openide.filesystems.*;
16
import org.openide.filesystems.*;
18
import org.openide.util.WeakListener;
17
import org.openide.util.WeakListener;
19
18
(-)core/src/org/netbeans/core/projects/FixedFileSystem.java (-2 / +3 lines)
Lines 20-25 Link Here
20
20
21
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
22
import org.openide.filesystems.FileSystem;
22
import org.openide.filesystems.FileSystem;
23
import org.openide.util.Lookup;
23
import org.openide.util.enum.EmptyEnumeration;
24
import org.openide.util.enum.EmptyEnumeration;
24
25
25
/** Read-only, fixed-structure filesystem.
26
/** Read-only, fixed-structure filesystem.
Lines 286-293 Link Here
286
        if (inst.beanName == null) return null;
287
        if (inst.beanName == null) return null;
287
        
288
        
288
        try {
289
        try {
289
            Class clazz = org.openide.TopManager.getDefault().
290
            Class clazz = ((ClassLoader)Lookup.getDefault()
290
                systemClassLoader().loadClass(inst.beanName);
291
                .lookup(ClassLoader.class)).loadClass(inst.beanName);
291
            return org.openide.util.Utilities.getBeanInfo(clazz).getIcon(
292
            return org.openide.util.Utilities.getBeanInfo(clazz).getIcon(
292
                BeanInfo.ICON_COLOR_16x16);
293
                BeanInfo.ICON_COLOR_16x16);
293
        } catch (Exception ex) {
294
        } catch (Exception ex) {
(-)core/src/org/netbeans/core/projects/LocalFileSystemEx.java (-1 lines)
Lines 21-27 Link Here
21
import java.util.Set;
21
import java.util.Set;
22
import java.util.Iterator;
22
import java.util.Iterator;
23
23
24
import org.openide.TopManager;
25
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
26
import org.openide.filesystems.*;
25
import org.openide.filesystems.*;
27
26
(-)core/src/org/netbeans/core/projects/ModuleLayeredFileSystem.java (-7 / +10 lines)
Lines 20-26 Link Here
20
import java.util.*;
20
import java.util.*;
21
21
22
import org.openide.ErrorManager;
22
import org.openide.ErrorManager;
23
import org.openide.TopManager;
24
import org.openide.filesystems.*;
23
import org.openide.filesystems.*;
25
import org.openide.filesystems.FileSystem;
24
import org.openide.filesystems.FileSystem;
26
import org.openide.modules.Dependency;
25
import org.openide.modules.Dependency;
Lines 109-115 Link Here
109
    private static FileSystem loadCache(LayerCacheManager mgr) throws IOException {
108
    private static FileSystem loadCache(LayerCacheManager mgr) throws IOException {
110
        if (mgr.cacheExists()) {
109
        if (mgr.cacheExists()) {
111
            // XXX use Events to log!
110
            // XXX use Events to log!
112
            TopManager.getDefault().setStatusText(NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_start_load_cache"));
111
            org.openide.awt.StatusDisplayer.getDefault().setStatusText(
112
                NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_start_load_cache"));
113
            String msg = "Loading layers from " + mgr.getCacheDirectory(); // NOI18N
113
            String msg = "Loading layers from " + mgr.getCacheDirectory(); // NOI18N
114
            StartLog.logStart(msg);
114
            StartLog.logStart(msg);
115
            FileSystem fs;
115
            FileSystem fs;
Lines 121-127 Link Here
121
                cleanStamp(mgr.getCacheDirectory());
121
                cleanStamp(mgr.getCacheDirectory());
122
                fs = mgr.createEmptyFileSystem();
122
                fs = mgr.createEmptyFileSystem();
123
            }
123
            }
124
            TopManager.getDefault().setStatusText(NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_end_load_cache"));
124
            org.openide.awt.StatusDisplayer.getDefault().setStatusText(
125
                NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_end_load_cache"));
125
            StartLog.logEnd(msg);
126
            StartLog.logEnd(msg);
126
            return fs;
127
            return fs;
127
        } else {
128
        } else {
Lines 162-168 Link Here
162
     * if working within the core.
163
     * if working within the core.
163
     */
164
     */
164
    public static ModuleLayeredFileSystem getInstallationModuleLayer () {
165
    public static ModuleLayeredFileSystem getInstallationModuleLayer () {
165
        FileSystem fs = TopManager.getDefault ().getRepository ().getDefaultFileSystem();
166
        FileSystem fs = Repository.getDefault ().getDefaultFileSystem();
166
        SystemFileSystem sfs = (SystemFileSystem)fs;            
167
        SystemFileSystem sfs = (SystemFileSystem)fs;            
167
        ModuleLayeredFileSystem home = sfs.getInstallationLayer ();
168
        ModuleLayeredFileSystem home = sfs.getInstallationLayer ();
168
        if (home != null)
169
        if (home != null)
Lines 177-183 Link Here
177
     */
178
     */
178
    public static ModuleLayeredFileSystem getUserModuleLayer () {
179
    public static ModuleLayeredFileSystem getUserModuleLayer () {
179
        SystemFileSystem sfs = (SystemFileSystem)
180
        SystemFileSystem sfs = (SystemFileSystem)
180
            TopManager.getDefault ().getRepository ().getDefaultFileSystem();
181
            Repository.getDefault().getDefaultFileSystem();
181
        return sfs.getUserLayer ();
182
        return sfs.getUserLayer ();
182
    }
183
    }
183
184
Lines 233-239 Link Here
233
            public void run() throws IOException {
234
            public void run() throws IOException {
234
                synchronized (ModuleLayeredFileSystem.this) {
235
                synchronized (ModuleLayeredFileSystem.this) {
235
                    if (manager != null) {
236
                    if (manager != null) {
236
                        TopManager.getDefault().setStatusText(NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_start_rewrite_cache"));
237
                        org.openide.awt.StatusDisplayer.getDefault().setStatusText(
238
                            NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_start_rewrite_cache"));
237
                        err.log("Rewriting cache in " + cacheDir);
239
                        err.log("Rewriting cache in " + cacheDir);
238
                        try {
240
                        try {
239
                            manager.store(getDelegates()[1], urls);
241
                            manager.store(getDelegates()[1], urls);
Lines 268-274 Link Here
268
                        } finally {
270
                        } finally {
269
                            wr.close();
271
                            wr.close();
270
                        }
272
                        }
271
                        TopManager.getDefault().setStatusText(NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_end_rewrite_cache"));
273
                        org.openide.awt.StatusDisplayer.getDefault().setStatusText(
274
                            NbBundle.getMessage(ModuleLayeredFileSystem.class, "MSG_end_rewrite_cache"));
272
                    } else {
275
                    } else {
273
                        try {
276
                        try {
274
                            ((XMLFileSystem)getDelegates()[1]).setXmlUrls((URL[])urls.toArray(new URL[urls.size()]));
277
                            ((XMLFileSystem)getDelegates()[1]).setXmlUrls((URL[])urls.toArray(new URL[urls.size()]));
(-)core/src/org/netbeans/core/projects/SettingChildren.java (-2 / +1 lines)
Lines 14-20 Link Here
14
package org.netbeans.core.projects;
14
package org.netbeans.core.projects;
15
15
16
import org.openide.ErrorManager;
16
import org.openide.ErrorManager;
17
import org.openide.TopManager;
18
import org.openide.NotifyDescriptor;
17
import org.openide.NotifyDescriptor;
19
import org.openide.cookies.InstanceCookie;
18
import org.openide.cookies.InstanceCookie;
20
import org.openide.nodes.*;
19
import org.openide.nodes.*;
Lines 174-180 Link Here
174
                                    NbBundle.getMessage (SettingChildren.class, "MSG_ask_remove_above_defined_files"), // NOI18N
173
                                    NbBundle.getMessage (SettingChildren.class, "MSG_ask_remove_above_defined_files"), // NOI18N
175
                                    NotifyDescriptor.YES_NO_OPTION);
174
                                    NotifyDescriptor.YES_NO_OPTION);
176
175
177
                                Object answer = TopManager.getDefault ().notify (nd);
176
                                Object answer = org.openide.DialogDisplayer.getDefault ().notify (nd);
178
                                if (answer.equals (NotifyDescriptor.NO_OPTION))
177
                                if (answer.equals (NotifyDescriptor.NO_OPTION))
179
                                    go = false;
178
                                    go = false;
180
179
(-)core/src/org/netbeans/core/projects/SystemFileSystem.java (-4 / +5 lines)
Lines 23-34 Link Here
23
import javax.swing.JMenuItem;
23
import javax.swing.JMenuItem;
24
24
25
import org.openide.ErrorManager;
25
import org.openide.ErrorManager;
26
import org.openide.TopManager;
27
import org.openide.filesystems.*;
26
import org.openide.filesystems.*;
28
import org.openide.filesystems.FileSystem;
27
import org.openide.filesystems.FileSystem;
29
import org.openide.loaders.DataObject;
28
import org.openide.loaders.DataObject;
30
import org.openide.loaders.DataObjectNotFoundException;
29
import org.openide.loaders.DataObjectNotFoundException;
31
import org.openide.nodes.*;
30
import org.openide.nodes.*;
31
import org.openide.util.Lookup;
32
import org.openide.util.NbBundle;
32
import org.openide.util.NbBundle;
33
import org.openide.util.RequestProcessor;
33
import org.openide.util.RequestProcessor;
34
import org.openide.util.WeakListener;
34
import org.openide.util.WeakListener;
Lines 269-275 Link Here
269
            if (bundleName != null) {
269
            if (bundleName != null) {
270
                try {
270
                try {
271
                    bundleName = org.openide.util.Utilities.translate(bundleName);
271
                    bundleName = org.openide.util.Utilities.translate(bundleName);
272
                    ResourceBundle b = NbBundle.getBundle (bundleName, Locale.getDefault (), TopManager.getDefault ().systemClassLoader ());
272
                    ResourceBundle b = NbBundle.getBundle (bundleName, Locale.getDefault (),
273
                        (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)); // systemclassloader
273
                    try {
274
                    try {
274
                        return b.getString (fo.getPath());
275
                        return b.getString (fo.getPath());
275
                    } catch (MissingResourceException ex) {
276
                    } catch (MissingResourceException ex) {
Lines 434-440 Link Here
434
    private static final class SingletonSerializer extends Object implements Serializable {
435
    private static final class SingletonSerializer extends Object implements Serializable {
435
        private static final long serialVersionUID = 6436781994611L;
436
        private static final long serialVersionUID = 6436781994611L;
436
        private Object readResolve () throws ObjectStreamException {
437
        private Object readResolve () throws ObjectStreamException {
437
            return TopManager.getDefault ().getRepository ().getDefaultFileSystem ();
438
            return Repository.getDefault().getDefaultFileSystem ();
438
        }
439
        }
439
    }
440
    }
440
    // --- SAFETY ---
441
    // --- SAFETY ---
Lines 446-452 Link Here
446
    public static class StructureNode extends AbstractNode {
447
    public static class StructureNode extends AbstractNode {
447
448
448
        public StructureNode () {
449
        public StructureNode () {
449
            this (TopManager.getDefault ().getRepository ().getDefaultFileSystem ());
450
            this (Repository.getDefault().getDefaultFileSystem ());
450
        }
451
        }
451
452
452
        public StructureNode (FileSystem fs) {
453
        public StructureNode (FileSystem fs) {
(-)core/src/org/netbeans/core/projects/SystemFileSystemBeanInfo.java (-1 lines)
Lines 16-22 Link Here
16
import java.awt.Image;
16
import java.awt.Image;
17
import java.beans.*;
17
import java.beans.*;
18
18
19
import org.openide.TopManager;
20
import org.openide.util.Utilities;
19
import org.openide.util.Utilities;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
21
(-)core/src/org/netbeans/core/projects/XMLSettingsHandler.java (-1 lines)
Lines 21-27 Link Here
21
import java.util.Iterator;
21
import java.util.Iterator;
22
import java.util.Set;
22
import java.util.Set;
23
23
24
import org.openide.TopManager;
25
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
26
import org.openide.cookies.InstanceCookie;
25
import org.openide.cookies.InstanceCookie;
27
import org.openide.filesystems.FileObject;
26
import org.openide.filesystems.FileObject;
(-)core/src/org/netbeans/core/projects/XMLSettingsSupport.java (-7 / +3 lines)
Lines 20-31 Link Here
20
import java.util.Set;
20
import java.util.Set;
21
import java.util.Stack;
21
import java.util.Stack;
22
22
23
import org.openide.TopManager;
24
import org.openide.ErrorManager;
23
import org.openide.ErrorManager;
25
import org.openide.filesystems.*;
24
import org.openide.filesystems.*;
26
import org.openide.modules.ModuleInfo;
25
import org.openide.modules.ModuleInfo;
27
import org.openide.modules.SpecificationVersion;
26
import org.openide.modules.SpecificationVersion;
28
import org.openide.util.io.SafeException;
27
import org.openide.util.io.SafeException;
28
import org.openide.util.Lookup;
29
import org.openide.util.SharedClassObject;
29
import org.openide.util.SharedClassObject;
30
import org.openide.windows.TopComponent;
30
import org.openide.windows.TopComponent;
31
31
Lines 633-645 Link Here
633
            return loadClass(instanceClass);
633
            return loadClass(instanceClass);
634
        }
634
        }
635
        
635
        
636
        /** try to load class from system and current classloader. */
636
        /** try to load class from system classloader. */
637
        private Class loadClass(String clazz) throws ClassNotFoundException {
637
        private Class loadClass(String clazz) throws ClassNotFoundException {
638
            try {
638
            return ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass(clazz);
639
                return TopManager.getDefault().systemClassLoader().loadClass(clazz);
640
            } catch (ClassNotFoundException ex) {
641
                return TopManager.getDefault().currentClassLoader().loadClass(clazz);
642
            }
643
        }
639
        }
644
        
640
        
645
        /** get class name of instance */
641
        /** get class name of instance */
(-)core/src/org/netbeans/core/ui/LookupNode.java (-1 lines)
Lines 18-24 Link Here
18
import org.openide.nodes.*;
18
import org.openide.nodes.*;
19
import org.openide.actions.*;
19
import org.openide.actions.*;
20
import org.openide.NotifyDescriptor;
20
import org.openide.NotifyDescriptor;
21
import org.openide.TopManager;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
23
import org.openide.loaders.DataObject;
22
import org.openide.loaders.DataObject;
24
import org.openide.loaders.DataFolder;
23
import org.openide.loaders.DataFolder;
(-)core/src/org/netbeans/core/ui/ModuleBean.java (-2 / +2 lines)
Lines 615-621 Link Here
615
                NotifyDescriptor d = new NotifyDescriptor.Confirmation(c,
615
                NotifyDescriptor d = new NotifyDescriptor.Confirmation(c,
616
                    NbBundle.getMessage(ModuleBean.class, "MB_TITLE_disabling"),
616
                    NbBundle.getMessage(ModuleBean.class, "MB_TITLE_disabling"),
617
                    NotifyDescriptor.OK_CANCEL_OPTION);
617
                    NotifyDescriptor.OK_CANCEL_OPTION);
618
                if (TopManager.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
618
                if (org.openide.DialogDisplayer.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
619
                    // User refused.
619
                    // User refused.
620
                    // Fire changes again since modules are now wrong & need recalc.
620
                    // Fire changes again since modules are now wrong & need recalc.
621
                    ModuleBean[] _modules = this.modules;
621
                    ModuleBean[] _modules = this.modules;
Lines 664-670 Link Here
664
                NotifyDescriptor d = new NotifyDescriptor.Confirmation(c,
664
                NotifyDescriptor d = new NotifyDescriptor.Confirmation(c,
665
                    NbBundle.getMessage(ModuleBean.class, "MB_TITLE_enabling"),
665
                    NbBundle.getMessage(ModuleBean.class, "MB_TITLE_enabling"),
666
                    NotifyDescriptor.OK_CANCEL_OPTION);
666
                    NotifyDescriptor.OK_CANCEL_OPTION);
667
                if (TopManager.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
667
                if (org.openide.DialogDisplayer.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
668
                    // User refused.
668
                    // User refused.
669
                    // Fire changes again since modules are now wrong & need recalc.
669
                    // Fire changes again since modules are now wrong & need recalc.
670
                    ModuleBean[] _modules = this.modules;
670
                    ModuleBean[] _modules = this.modules;
(-)core/src/org/netbeans/core/ui/ModuleSelectionPanel.java (-1 lines)
Lines 29-35 Link Here
29
import org.openide.WizardDescriptor;
29
import org.openide.WizardDescriptor;
30
import org.openide.NotifyDescriptor;
30
import org.openide.NotifyDescriptor;
31
import org.openide.DialogDescriptor;
31
import org.openide.DialogDescriptor;
32
import org.openide.TopManager;
33
import org.openide.nodes.*;
32
import org.openide.nodes.*;
34
import org.openide.util.HelpCtx;
33
import org.openide.util.HelpCtx;
35
import org.openide.util.RequestProcessor;
34
import org.openide.util.RequestProcessor;
(-)core/src/org/netbeans/core/ui/MountIterator.java (-1 lines)
Lines 35-41 Link Here
35
import org.openide.explorer.propertysheet.DefaultPropertyModel;
35
import org.openide.explorer.propertysheet.DefaultPropertyModel;
36
import org.openide.WizardDescriptor.ArrayIterator;
36
import org.openide.WizardDescriptor.ArrayIterator;
37
import org.openide.WizardDescriptor.Panel;
37
import org.openide.WizardDescriptor.Panel;
38
import org.openide.TopManager;
39
import org.openide.util.NbBundle;
38
import org.openide.util.NbBundle;
40
import org.openide.util.WeakListener;
39
import org.openide.util.WeakListener;
41
import org.openide.util.HelpCtx;
40
import org.openide.util.HelpCtx;
(-)core/src/org/netbeans/core/ui/ProductInformationPanel.java (-1 lines)
Lines 32-38 Link Here
32
32
33
import org.openide.DialogDescriptor;
33
import org.openide.DialogDescriptor;
34
import org.openide.NotifyDescriptor;
34
import org.openide.NotifyDescriptor;
35
import org.openide.TopManager;
36
import org.openide.util.NbBundle;
35
import org.openide.util.NbBundle;
37
36
38
import org.netbeans.core.TopLogging;
37
import org.netbeans.core.TopLogging;
(-)core/src/org/netbeans/core/ui/ProxySettingsDialog.java (-2 / +1 lines)
Lines 21-27 Link Here
21
import java.awt.Dialog;
21
import java.awt.Dialog;
22
22
23
import org.openide.DialogDescriptor;
23
import org.openide.DialogDescriptor;
24
import org.openide.TopManager;
25
import org.openide.util.HelpCtx;
24
import org.openide.util.HelpCtx;
26
25
27
import org.netbeans.core.IDESettings;
26
import org.netbeans.core.IDESettings;
Lines 151-157 Link Here
151
                                                               DialogDescriptor.BOTTOM_ALIGN,               // Align
150
                                                               DialogDescriptor.BOTTOM_ALIGN,               // Align
152
                                                               new HelpCtx(ProxySettingsDialog.class),      // Help
151
                                                               new HelpCtx(ProxySettingsDialog.class),      // Help
153
                                                               null);
152
                                                               null);
154
        Dialog dialog=TopManager.getDefault().createDialog(dialogdescriptor);
153
        Dialog dialog = org.openide.DialogDisplayer.getDefault().createDialog(dialogdescriptor);
155
        dialog.show();
154
        dialog.show();
156
        if (dialogdescriptor.getValue()==DialogDescriptor.OK_OPTION) {
155
        if (dialogdescriptor.getValue()==DialogDescriptor.OK_OPTION) {
157
            IDESettings settings = (IDESettings)IDESettings.findObject(IDESettings.class, true);
156
            IDESettings settings = (IDESettings)IDESettings.findObject(IDESettings.class, true);
(-)core/src/org/netbeans/core/ui/SetupWizard.java (-2 / +1 lines)
Lines 25-31 Link Here
25
import java.awt.AWTEvent;
25
import java.awt.AWTEvent;
26
import java.awt.Toolkit;
26
import java.awt.Toolkit;
27
27
28
import org.openide.TopManager;
29
import org.openide.ErrorManager;
28
import org.openide.ErrorManager;
30
import org.openide.WizardDescriptor;
29
import org.openide.WizardDescriptor;
31
import org.openide.cookies.InstanceCookie;
30
import org.openide.cookies.InstanceCookie;
Lines 314-320 Link Here
314
        for (int i = 0; i < modules.length; i++) {
313
        for (int i = 0; i < modules.length; i++) {
315
            modules[i].addPropertyChangeListener(this);
314
            modules[i].addPropertyChangeListener(this);
316
        }
315
        }
317
        java.awt.Dialog d = TopManager.getDefault().createDialog(wd);
316
        java.awt.Dialog d = org.openide.DialogDisplayer.getDefault().createDialog(wd);
318
        d.show();
317
        d.show();
319
        d.dispose();
318
        d.dispose();
320
        allModules.removePropertyChangeListener(this);
319
        allModules.removePropertyChangeListener(this);
(-)core/src/org/netbeans/core/ui/SwingBrowser.java (-2 / +1 lines)
Lines 16-22 Link Here
16
import java.beans.*;
16
import java.beans.*;
17
import java.lang.reflect.Constructor;
17
import java.lang.reflect.Constructor;
18
18
19
import org.openide.TopManager;
20
import org.openide.NotifyDescriptor;
19
import org.openide.NotifyDescriptor;
21
import org.openide.awt.HtmlBrowser;
20
import org.openide.awt.HtmlBrowser;
22
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
Lines 61-67 Link Here
61
            return (HtmlBrowser.Impl)con.newInstance (new Object [] {});
60
            return (HtmlBrowser.Impl)con.newInstance (new Object [] {});
62
        }
61
        }
63
        catch (Exception ex) {
62
        catch (Exception ex) {
64
            TopManager.getDefault ().notify (
63
            org.openide.DialogDisplayer.getDefault ().notify (
65
                new NotifyDescriptor.Message (NbBundle.getMessage (SwingBrowser.class, "MSG_cannot_create_browser"))
64
                new NotifyDescriptor.Message (NbBundle.getMessage (SwingBrowser.class, "MSG_cannot_create_browser"))
66
            );
65
            );
67
            return null;
66
            return null;
(-)core/src/org/netbeans/core/ui/UINodes.java (-14 / +9 lines)
Lines 16-21 Link Here
16
import java.awt.Image;
16
import java.awt.Image;
17
import java.beans.BeanInfo;
17
import java.beans.BeanInfo;
18
import java.io.*;
18
import java.io.*;
19
import org.netbeans.core.LoaderPoolNode;
20
import org.netbeans.core.NbPlaces;
19
21
20
import org.openide.*;
22
import org.openide.*;
21
import org.openide.actions.*;
23
import org.openide.actions.*;
Lines 27-32 Link Here
27
import org.openide.nodes.*;
29
import org.openide.nodes.*;
28
import org.openide.nodes.Node.PropertySet;
30
import org.openide.nodes.Node.PropertySet;
29
import org.openide.util.actions.*;
31
import org.openide.util.actions.*;
32
import org.openide.util.Lookup;
30
import org.openide.util.NbBundle;
33
import org.openide.util.NbBundle;
31
import org.openide.util.HelpCtx;
34
import org.openide.util.HelpCtx;
32
import org.openide.util.RequestProcessor;
35
import org.openide.util.RequestProcessor;
Lines 65-72 Link Here
65
    * @return environment node
68
    * @return environment node
66
    */
69
    */
67
    public static Node createEnvironmentNode () {
70
    public static Node createEnvironmentNode () {
68
        Places.Nodes ns = TopManager.getDefault ().getPlaces ().nodes ();
71
        Node environmentNode = NbPlaces.getDefault().environment ().cloneNode ();
69
        Node environmentNode = ns.environment ().cloneNode ();
70
        environmentNode.setShortDescription (bundle.getString ("CTL_Environment_Hint"));
72
        environmentNode.setShortDescription (bundle.getString ("CTL_Environment_Hint"));
71
        return environmentNode;
73
        return environmentNode;
72
    }
74
    }
Lines 75-82 Link Here
75
    * @return session settings node
77
    * @return session settings node
76
    */
78
    */
77
    public static Node createSessionNode () {
79
    public static Node createSessionNode () {
78
        Places.Nodes ns = TopManager.getDefault ().getPlaces ().nodes ();
80
        Node sessionNode = NbPlaces.getDefault().session ().cloneNode ();
79
        Node sessionNode = ns.session ().cloneNode ();
80
        sessionNode.setShortDescription (bundle.getString ("CTL_Session_Settings_Hint"));
81
        sessionNode.setShortDescription (bundle.getString ("CTL_Session_Settings_Hint"));
81
        return sessionNode;
82
        return sessionNode;
82
    }
83
    }
Lines 86-92 Link Here
86
    */
87
    */
87
    public static Node createFileSystems () {
88
    public static Node createFileSystems () {
88
        return new MountNode (
89
        return new MountNode (
89
            org.netbeans.core.NbPlaces.findSessionFolder ("Mount") // NOI18N
90
            NbPlaces.getDefault().findSessionFolder ("Mount") // NOI18N
90
        );
91
        );
91
    }
92
    }
92
93
Lines 180-191 Link Here
180
        }
181
        }
181
    }
182
    }
182
183
183
    /** Getter for folders.
184
    */
185
    private static Places.Folders fs () {
186
        return TopManager.getDefault ().getPlaces ().folders ();
187
    }
188
189
    /** Node representing templates folder */
184
    /** Node representing templates folder */
190
    private static class TemplatesNode extends IconSubstituteNode {
185
    private static class TemplatesNode extends IconSubstituteNode {
191
        /** generated Serialized Version UID */
186
        /** generated Serialized Version UID */
Lines 194-200 Link Here
194
        private static SystemAction[] staticActions;
189
        private static SystemAction[] staticActions;
195
190
196
        public TemplatesNode () {
191
        public TemplatesNode () {
197
            this (fs ().templates ().getNodeDelegate ());
192
            this (NbPlaces.getDefault().templates ().getNodeDelegate ());
198
        }
193
        }
199
194
200
        public TemplatesNode(Node ref) {
195
        public TemplatesNode(Node ref) {
Lines 229-235 Link Here
229
        private static SystemAction[] staticActions;
224
        private static SystemAction[] staticActions;
230
225
231
        public StartupNode() {
226
        public StartupNode() {
232
            super (fs ().startup ().getNodeDelegate (), startupIconURL, startupIcon32URL);
227
            super (NbPlaces.getDefault().startup ().getNodeDelegate (), startupIconURL, startupIcon32URL);
233
            super.setDisplayName(bundle.getString("CTL_Startup_name"));
228
            super.setDisplayName(bundle.getString("CTL_Startup_name"));
234
            super.setShortDescription(bundle.getString("CTL_Startup_hint"));
229
            super.setShortDescription(bundle.getString("CTL_Startup_hint"));
235
        }
230
        }
Lines 262-268 Link Here
262
        private static SystemAction[] staticActions;
257
        private static SystemAction[] staticActions;
263
258
264
        public ObjectTypesNode() {
259
        public ObjectTypesNode() {
265
            this (TopManager.getDefault ().getPlaces ().nodes ().loaderPool ());
260
            this (LoaderPoolNode.getLoaderPoolNode());
266
        }
261
        }
267
262
268
        public ObjectTypesNode(Node ref) {
263
        public ObjectTypesNode(Node ref) {
(-)core/src/org/netbeans/core/ui/WelcomePanel.java (-7 / +7 lines)
Lines 29-35 Link Here
29
import javax.swing.text.*;
29
import javax.swing.text.*;
30
import org.openide.*;
30
import org.openide.*;
31
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
32
import org.openide.TopManager;
33
import org.openide.NotifyDescriptor;
32
import org.openide.NotifyDescriptor;
34
import org.openide.loaders.*;
33
import org.openide.loaders.*;
35
import org.openide.filesystems.*;
34
import org.openide.filesystems.*;
Lines 37-46 Link Here
37
import org.openide.nodes.*;
36
import org.openide.nodes.*;
38
import org.openide.util.actions.*;
37
import org.openide.util.actions.*;
39
import org.openide.util.HelpCtx;
38
import org.openide.util.HelpCtx;
39
import org.openide.util.Lookup;
40
import org.openide.util.NbBundle;
40
import org.openide.util.NbBundle;
41
import org.openide.util.SharedClassObject;
41
import org.openide.util.SharedClassObject;
42
42
43
import org.netbeans.core.IDESettings;
43
import org.netbeans.core.IDESettings;
44
import org.netbeans.core.NbPlaces;
44
45
45
/**
46
/**
46
 * This class implements "Getting started" dialog.
47
 * This class implements "Getting started" dialog.
Lines 118-124 Link Here
118
            }
119
            }
119
        });
120
        });
120
        try {
121
        try {
121
            DataFolder df = TopManager.getDefault ().getPlaces ().folders ().welcome ();
122
            DataFolder df = NbPlaces.getDefault().welcome ();
122
            startLoading(df);
123
            startLoading(df);
123
            contextBrowser.setPage(INFO_URL);
124
            contextBrowser.setPage(INFO_URL);
124
            tipsBrowser.setPage(INFO_URL);
125
            tipsBrowser.setPage(INFO_URL);
Lines 128-137 Link Here
128
        HyperlinkListener hpl = new HyperlinkListener() {
129
        HyperlinkListener hpl = new HyperlinkListener() {
129
            public void hyperlinkUpdate(HyperlinkEvent e) {
130
            public void hyperlinkUpdate(HyperlinkEvent e) {
130
                if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED) {
131
                if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED) {
131
                    TopManager tom = TopManager.getDefault();
132
                    org.openide.awt.StatusDisplayer.getDefault().setStatusText(bundle.getString("CTL_OpeningBrowser"));
132
                    tom.setStatusText(bundle.getString("CTL_OpeningBrowser"));
133
                    org.openide.awt.HtmlBrowser.URLDisplayer.getDefault().showURL(e.getURL());
133
                    tom.showUrl(e.getURL());
134
                    org.openide.awt.StatusDisplayer.getDefault().setStatusText(""); // NOI18N
134
                    TopManager.getDefault().setStatusText(""); // NOI18N
135
                }
135
                }
136
             }
136
             }
137
        };
137
        };
Lines 845-851 Link Here
845
                null // action listener
845
                null // action listener
846
                );
846
                );
847
847
848
            gettingStartedDialog = TopManager.getDefault ().createDialog (descriptor);
848
            gettingStartedDialog = org.openide.DialogDisplayer.getDefault ().createDialog (descriptor);
849
        
849
        
850
            if (gettingStartedDialog instanceof JDialog)
850
            if (gettingStartedDialog instanceof JDialog)
851
                ((JDialog)gettingStartedDialog).getRootPane().setDefaultButton(gettingStartedComponent.getCloseButton());
851
                ((JDialog)gettingStartedDialog).getRootPane().setDefaultButton(gettingStartedComponent.getCloseButton());
(-)core/src/org/netbeans/core/ui/WizardFolder.java (-1 lines)
Lines 21-27 Link Here
21
import javax.swing.event.*;
21
import javax.swing.event.*;
22
import javax.swing.JComponent;
22
import javax.swing.JComponent;
23
23
24
import org.openide.TopManager;
25
import org.openide.WizardDescriptor;
24
import org.openide.WizardDescriptor;
26
import org.openide.cookies.InstanceCookie;
25
import org.openide.cookies.InstanceCookie;
27
import org.openide.filesystems.FileObject;
26
import org.openide.filesystems.FileObject;
(-)core/src/org/netbeans/core/windows/MainWindow.java (-36 / +11 lines)
Lines 22-32 Link Here
22
import javax.swing.*;
22
import javax.swing.*;
23
import javax.swing.border.EmptyBorder;
23
import javax.swing.border.EmptyBorder;
24
24
25
import org.openide.TopManager;
26
import org.openide.awt.MenuBar;
25
import org.openide.awt.MenuBar;
27
import org.openide.filesystems.*;
26
import org.openide.filesystems.*;
28
import org.openide.nodes.*;
27
import org.openide.nodes.*;
29
import org.openide.util.HelpCtx;
28
import org.openide.util.HelpCtx;
29
import org.openide.util.Lookup;
30
import org.openide.util.NbBundle;
30
import org.openide.util.NbBundle;
31
import org.openide.util.SharedClassObject;
31
import org.openide.util.SharedClassObject;
32
import org.openide.util.Utilities;
32
import org.openide.util.Utilities;
Lines 36-41 Link Here
36
import org.openide.awt.ToolbarPool;
36
import org.openide.awt.ToolbarPool;
37
37
38
import org.netbeans.core.actions.SystemExit;
38
import org.netbeans.core.actions.SystemExit;
39
import org.netbeans.core.NbTopManager;
39
import org.netbeans.core.windows.frames.DesktopPane;
40
import org.netbeans.core.windows.frames.DesktopPane;
40
import org.netbeans.core.windows.toolbars.ToolbarConfiguration;
41
import org.netbeans.core.windows.toolbars.ToolbarConfiguration;
41
import org.netbeans.core.windows.util.WindowUtils;
42
import org.netbeans.core.windows.util.WindowUtils;
Lines 66-75 Link Here
66
    private MenuBar menuBar;
67
    private MenuBar menuBar;
67
    /** The MainWindow's toolbar */
68
    /** The MainWindow's toolbar */
68
    private JPanel toolbars;
69
    private JPanel toolbars;
69
    /** Current project desktop node. */
70
    transient private Node projectNode = null;
71
    /** Current listener to changes in project name (other than project itself changing). */
72
    transient private NodeListener projectNameListener = null;    
73
    /** Desktop panel */
70
    /** Desktop panel */
74
    private DesktopPane desktopPane;
71
    private DesktopPane desktopPane;
75
    /** holds "pre-show" event listeners */
72
    /** holds "pre-show" event listeners */
Lines 110-140 Link Here
110
                                          MainWindow.class.getClassLoader()
107
                                          MainWindow.class.getClassLoader()
111
            )));
108
            )));
112
        setIconImage (ideIcon.getImage ());
109
        setIconImage (ideIcon.getImage ());
113
        projectNameListener = new NodeAdapter () {
114
                public void propertyChange (PropertyChangeEvent ev2) {
115
                    if (Node.PROP_DISPLAY_NAME.equals (ev2.getPropertyName ())) {
116
                        updateTitle ();
117
                    }
118
                }
119
            };
120
        TopManager.getDefault ().addPropertyChangeListener (new PropertyChangeListener () {
121
                public void propertyChange (PropertyChangeEvent ev) {
122
                    if (TopManager.PROP_PLACES.equals (ev.getPropertyName ())) {
123
                        if (projectNode != null) {
124
                            projectNode.removeNodeListener (projectNameListener);
125
                        }
126
                        projectNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
127
                        if (projectNode != null) {
128
                            projectNode.addNodeListener (projectNameListener);
129
                        }
130
                        updateTitle ();
131
                    }
132
                }
133
            });
134
        projectNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
135
        if (projectNode != null) {
136
            projectNode.addNodeListener (projectNameListener);
137
        }
138
        updateTitle ();
110
        updateTitle ();
139
        setDefaultCloseOperation (DO_NOTHING_ON_CLOSE);
111
        setDefaultCloseOperation (DO_NOTHING_ON_CLOSE);
140
112
Lines 247-264 Link Here
247
                            frameTitle = " - " + mi.frameTitle();
219
                            frameTitle = " - " + mi.frameTitle();
248
                        }
220
                        }
249
                    }
221
                    }
250
                    String title;
222
                    String title = NbBundle.getMessage (
251
                    if ((projectNode == null) || (projectNode.equals(org.netbeans.core.ui.WorkplaceNode.getDefault()))) {
252
                        title = NbBundle.getMessage (
253
                            MainWindow.class, "CTL_MainWindow_Title_Project",
223
                            MainWindow.class, "CTL_MainWindow_Title_Project",
254
                            buildNumber, NbBundle.getMessage (MainWindow.class, "CTL_NoProject"));
224
                            buildNumber, NbBundle.getMessage (MainWindow.class, "CTL_NoProject"));
255
                        setTitle (title + frameTitle);
225
                    setTitle (title + frameTitle);
256
                    } else {
226
                    // XXX if we have some means of finding the name of the "active project" then change to:
227
                    /*   
228
                    {
229
                        String projectTitle = "change me"; // NOI18N
257
                        title = NbBundle.getMessage (
230
                        title = NbBundle.getMessage (
258
                            MainWindow.class, "CTL_MainWindow_Title_Project",
231
                            MainWindow.class, "CTL_MainWindow_Title_Project",
259
                            buildNumber, projectNode.getDisplayName ());
232
                            buildNumber, projectTitle);
260
                        setTitle (title + frameTitle);
233
                        setTitle (title + frameTitle);
261
                    }
234
                    }
235
                     */
236
                    // and of course add a listener which will call updateTitle
262
                }
237
                }
263
            });
238
            });
264
    }
239
    }
(-)core/src/org/netbeans/core/windows/ModeImpl.java (-2 / +3 lines)
Lines 44-54 Link Here
44
import javax.swing.JDesktopPane;
44
import javax.swing.JDesktopPane;
45
45
46
import org.openide.windows.*;
46
import org.openide.windows.*;
47
import org.openide.util.Lookup;
47
import org.openide.util.Mutex;
48
import org.openide.util.Mutex;
48
import org.openide.util.Utilities;
49
import org.openide.util.Utilities;
49
import org.openide.util.io.SafeException;
50
import org.openide.util.io.SafeException;
50
import org.openide.util.NbBundle;
51
import org.openide.util.NbBundle;
51
import org.openide.TopManager;
52
import org.openide.ErrorManager;
52
import org.openide.ErrorManager;
53
53
54
import org.netbeans.core.windows.util.*;
54
import org.netbeans.core.windows.util.*;
Lines 2788-2794 Link Here
2788
                for (Iterator iter = readList.iterator(); iter.hasNext(); ) {
2788
                for (Iterator iter = readList.iterator(); iter.hasNext(); ) {
2789
                    curName = (String)iter.next();
2789
                    curName = (String)iter.next();
2790
                    ignoredTcList.add(
2790
                    ignoredTcList.add(
2791
                        Class.forName(curName, false, TopManager.getDefault().systemClassLoader())
2791
                        Class.forName(curName, false,
2792
                            (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class))
2792
                    );
2793
                    );
2793
                }
2794
                }
2794
            }
2795
            }
(-)core/src/org/netbeans/core/windows/PersistenceManager.java (-2 lines)
Lines 38-49 Link Here
38
import org.openide.windows.TopComponent;
38
import org.openide.windows.TopComponent;
39
import org.openide.loaders.DataFolder;
39
import org.openide.loaders.DataFolder;
40
import org.openide.loaders.InstanceDataObject;
40
import org.openide.loaders.InstanceDataObject;
41
import org.openide.TopManager;
42
import org.openide.loaders.DataObject;
41
import org.openide.loaders.DataObject;
43
import org.openide.cookies.SaveCookie;
42
import org.openide.cookies.SaveCookie;
44
import org.openide.cookies.InstanceCookie;
43
import org.openide.cookies.InstanceCookie;
45
44
46
import org.netbeans.core.projects.SessionManager;
47
import org.netbeans.core.windows.layers.WSLoader;
45
import org.netbeans.core.windows.layers.WSLoader;
48
import org.netbeans.core.windows.util.WindowUtils;
46
import org.netbeans.core.windows.util.WindowUtils;
49
import java.util.Collections;
47
import java.util.Collections;
(-)core/src/org/netbeans/core/windows/StatusLine.java (-19 / +12 lines)
Lines 14-60 Link Here
14
package org.netbeans.core.windows;
14
package org.netbeans.core.windows;
15
15
16
import java.awt.*;
16
import java.awt.*;
17
import java.beans.*;
18
import javax.swing.*;
17
import javax.swing.*;
19
import javax.swing.border.*;
18
import javax.swing.border.*;
19
import javax.swing.event.*;
20
20
21
import org.openide.awt.StatusDisplayer;
21
import org.openide.util.WeakListener;
22
import org.openide.util.WeakListener;
22
23
23
import org.netbeans.core.NbTopManager;
24
25
/** The status line component of the main window. A text can be put into it.
24
/** The status line component of the main window. A text can be put into it.
26
*
25
*
27
* @author Jaroslav Tulach
26
* @author Jaroslav Tulach, Jesse Glick
28
*/
27
*/
29
public class StatusLine extends JLabel 
28
public class StatusLine extends JLabel 
30
implements PropertyChangeListener, Runnable {
29
implements ChangeListener, Runnable {
31
    /** generated Serialized Version UID */
30
    /** generated Serialized Version UID */
32
    static final long serialVersionUID = -5644391883356409841L;
31
    static final long serialVersionUID = -5644391883356409841L;
32
    
33
    private StatusDisplayer d = StatusDisplayer.getDefault();
33
34
34
    /** Creates a new StatusLine with specified workspace switcher. */
35
    /** Creates a new StatusLine with specified workspace switcher. */
35
    public StatusLine () {
36
    public StatusLine () {
36
        super (NbTopManager.get ().getStatusText());
37
        run();
37
38
        d.addChangeListener(WeakListener.change(this, d));
38
        // attach to top manager
39
        NbTopManager.get ().addPropertyChangeListener (
40
            WeakListener.propertyChange (this, NbTopManager.get ())
41
        );
42
        // this is here to not squeeze menus when placed to MenuBar, see #19910
39
        // this is here to not squeeze menus when placed to MenuBar, see #19910
43
        setPreferredSize(new Dimension(0, getPreferredSize().height));
40
        setPreferredSize(new Dimension(0, getPreferredSize().height));
44
    }
41
    }
45
42
46
    /** Listens to changes.
43
    public void stateChanged(ChangeEvent e) {
47
    */
44
        SwingUtilities.invokeLater (this);
48
    public void propertyChange (PropertyChangeEvent ev) {
49
        if (ev.getPropertyName() == NbTopManager.PROP_STATUS_TEXT) {
50
            SwingUtilities.invokeLater (this);
51
        }
52
    }
45
    }
53
46
    
54
    /** Called in event queue, should update the status text.
47
    /** Called in event queue, should update the status text.
55
    */
48
    */
56
    public void run () {
49
    public void run () {
57
        setText (NbTopManager.get ().getStatusText ());
50
        setText (d.getStatusText ());
58
    }
51
    }
59
52
60
    public static JComponent createLabel () {
53
    public static JComponent createLabel () {
(-)core/src/org/netbeans/core/windows/WindowManagerImpl.java (-1 lines)
Lines 46-52 Link Here
46
import javax.swing.RepaintManager;
46
import javax.swing.RepaintManager;
47
import javax.swing.UIManager;
47
import javax.swing.UIManager;
48
48
49
import org.openide.TopManager;
50
import org.openide.windows.*;
49
import org.openide.windows.*;
51
import org.openide.nodes.Node;
50
import org.openide.nodes.Node;
52
import org.openide.util.NbBundle;
51
import org.openide.util.NbBundle;
(-)core/src/org/netbeans/core/windows/WorkspaceExplorerDialog.java (-2 / +1 lines)
Lines 23-29 Link Here
23
import javax.swing.JButton;
23
import javax.swing.JButton;
24
24
25
import org.openide.DialogDescriptor;
25
import org.openide.DialogDescriptor;
26
import org.openide.TopManager;
27
import org.netbeans.core.windows.WorkspaceExplorerPanel.NodeInfo;
26
import org.netbeans.core.windows.WorkspaceExplorerPanel.NodeInfo;
28
import org.openide.windows.WindowManager;
27
import org.openide.windows.WindowManager;
29
import org.openide.util.NbBundle;
28
import org.openide.util.NbBundle;
Lines 177-183 Link Here
177
                    null);
176
                    null);
178
    
177
    
179
        dd.setClosingOptions (getButtons());
178
        dd.setClosingOptions (getButtons());
180
        dialogWE = TopManager.getDefault().createDialog(dd);
179
        dialogWE = org.openide.DialogDisplayer.getDefault().createDialog(dd);
181
        dialogWE.show ();
180
        dialogWE.show ();
182
181
183
        if (dd.getValue() != null)
182
        if (dd.getValue() != null)
(-)core/src/org/netbeans/core/windows/WorkspaceSwitcher.java (-5 / +7 lines)
Lines 26-43 Link Here
26
import javax.swing.JMenuItem;
26
import javax.swing.JMenuItem;
27
27
28
import org.openide.NotifyDescriptor;
28
import org.openide.NotifyDescriptor;
29
import org.openide.TopManager;
30
import org.openide.awt.MouseUtils;
29
import org.openide.awt.MouseUtils;
31
import org.openide.awt.JPopupMenuPlus;
30
import org.openide.awt.JPopupMenuPlus;
32
import org.openide.awt.Actions;
31
import org.openide.awt.Actions;
32
import org.openide.nodes.NodeOperation;
33
import org.openide.util.HelpCtx;
33
import org.openide.util.HelpCtx;
34
import org.openide.util.Lookup;
34
import org.openide.util.NbBundle;
35
import org.openide.util.NbBundle;
35
import org.openide.windows.Workspace;
36
import org.openide.windows.Workspace;
36
import org.openide.windows.WindowManager;
37
import org.openide.windows.WindowManager;
37
38
38
import org.netbeans.core.awt.TabControl;
39
import org.netbeans.core.awt.TabControl;
39
import org.netbeans.core.Main;
40
import org.netbeans.core.Main;
40
import org.netbeans.core.NbTopManager;
41
import org.netbeans.core.NbPlaces;
41
42
42
/** Visual class for switching workspaces.
43
/** Visual class for switching workspaces.
43
 *
44
 *
Lines 181-194 Link Here
181
                    );
182
                    );
182
                        
183
                        
183
                    if(NotifyDescriptor.YES_OPTION
184
                    if(NotifyDescriptor.YES_OPTION
184
                    .equals(TopManager.getDefault().notify(desc))) {
185
                    .equals(org.openide.DialogDisplayer.getDefault().notify(desc))) {
185
                        // delete the index
186
                        // delete the index
186
                        workspace.remove();
187
                        workspace.remove();
187
                    }
188
                    }
188
                    break;
189
                    break;
189
                case CUSTOMIZE_WORKSPACE:
190
                case CUSTOMIZE_WORKSPACE:
190
                    TopManager top = NbTopManager.getDefault();
191
                    NodeOperation no = (NodeOperation)Lookup.getDefault()
191
                    top.getNodeOperation().explore(top.getPlaces().nodes().workspaces());
192
                            .lookup (NodeOperation.class);
193
                    no.explore(NbPlaces.getDefault().workspaces());
192
            }
194
            }
193
        }
195
        }
194
196
(-)core/src/org/netbeans/core/windows/WorkspaceVisibilityManager.java (-1 lines)
Lines 32-38 Link Here
32
import org.netbeans.core.windows.util.WindowUtils;
32
import org.netbeans.core.windows.util.WindowUtils;
33
33
34
import org.openide.ErrorManager;
34
import org.openide.ErrorManager;
35
import org.openide.TopManager;
36
import org.openide.filesystems.FileObject;
35
import org.openide.filesystems.FileObject;
37
import org.openide.loaders.DataObject;
36
import org.openide.loaders.DataObject;
38
import org.openide.loaders.DataObjectNotFoundException;
37
import org.openide.loaders.DataObjectNotFoundException;
(-)core/src/org/netbeans/core/windows/frames/DefaultContainerImpl.java (-1 lines)
Lines 60-66 Link Here
60
import javax.swing.SwingUtilities;
60
import javax.swing.SwingUtilities;
61
61
62
import org.openide.ErrorManager;
62
import org.openide.ErrorManager;
63
import org.openide.TopManager;
64
import org.openide.windows.*;
63
import org.openide.windows.*;
65
import org.openide.actions.*;
64
import org.openide.actions.*;
66
import org.openide.nodes.Node;
65
import org.openide.nodes.Node;
(-)core/src/org/netbeans/core/windows/frames/MultiTabbedContainerImpl.java (-1 lines)
Lines 39-45 Link Here
39
import org.openide.loaders.DataObject;
39
import org.openide.loaders.DataObject;
40
import org.openide.awt.UndoRedo;
40
import org.openide.awt.UndoRedo;
41
import org.openide.awt.MouseUtils;
41
import org.openide.awt.MouseUtils;
42
import org.openide.TopManager;
43
import org.openide.actions.*;
42
import org.openide.actions.*;
44
import org.openide.windows.*;
43
import org.openide.windows.*;
45
import org.openide.util.NbBundle;
44
import org.openide.util.NbBundle;
(-)core/src/org/netbeans/core/windows/frames/NbFocusManager.java (-4 / +6 lines)
Lines 24-32 Link Here
24
    
24
    
25
import java.util.*;
25
import java.util.*;
26
26
27
import org.openide.TopManager;
27
import org.openide.actions.ActionManager;
28
import org.openide.modules.Dependency;
28
import org.openide.modules.Dependency;
29
import org.openide.modules.SpecificationVersion;
29
import org.openide.modules.SpecificationVersion;
30
import org.openide.util.Lookup;
30
import org.openide.util.Utilities;
31
import org.openide.util.Utilities;
31
32
32
import org.netbeans.core.windows.WindowManagerImpl;
33
import org.netbeans.core.windows.WindowManagerImpl;
Lines 211-220 Link Here
211
     * @return true if the key has been processed and false otherwise
212
     * @return true if the key has been processed and false otherwise
212
     */
213
     */
213
    static boolean processKeyStroke(KeyStroke key, ActionEvent ev) {
214
    static boolean processKeyStroke(KeyStroke key, ActionEvent ev) {
214
        Keymap root = TopManager.getDefault().getGlobalKeymap ();
215
        Keymap root = (Keymap)Lookup.getDefault().lookup(Keymap.class);
215
        Action a = root.getAction (key);
216
        Action a = root.getAction (key);
216
        if (a != null && a.isEnabled()) {
217
        if (a != null && a.isEnabled()) {
217
            TopManager.getDefault().getActionManager().invokeAction(a, ev);
218
            ActionManager am = (ActionManager)Lookup.getDefault ().lookup (ActionManager.class);
219
            am.invokeAction(a, ev);
218
            return true;
220
            return true;
219
        } else {
221
        } else {
220
            return false;
222
            return false;
Lines 235-241 Link Here
235
     */
237
     */
236
    
238
    
237
    private static boolean isTransmodalAction(KeyStroke key) {
239
    private static boolean isTransmodalAction(KeyStroke key) {
238
        Keymap root = TopManager.getDefault().getGlobalKeymap ();
240
        Keymap root = (Keymap)Lookup.getDefault().lookup(Keymap.class);
239
        Action a = root.getAction (key);
241
        Action a = root.getAction (key);
240
        if (a == null) return false;
242
        if (a == null) return false;
241
        Object val = a.getValue ("OpenIDE-Transmodal-Action"); // NOI18N
243
        Object val = a.getValue ("OpenIDE-Transmodal-Action"); // NOI18N
(-)core/src/org/netbeans/core/windows/frames/ShortcutAndMenuKeyEventProcessor.java (-5 / +7 lines)
Lines 21-29 Link Here
21
import javax.swing.text.Keymap;
21
import javax.swing.text.Keymap;
22
import java.util.HashMap;
22
import java.util.HashMap;
23
import java.lang.reflect.*;
23
import java.lang.reflect.*;
24
import org.openide.TopManager;
25
import org.openide.util.Utilities;
26
24
25
import org.openide.actions.ActionManager;
26
import org.openide.util.Lookup;
27
import org.openide.util.Utilities;
27
import org.netbeans.core.windows.WindowManagerImpl;
28
import org.netbeans.core.windows.WindowManagerImpl;
28
import org.openide.ErrorManager;
29
import org.openide.ErrorManager;
29
30
Lines 227-236 Link Here
227
        ActionEvent aev = new ActionEvent(
228
        ActionEvent aev = new ActionEvent(
228
            ev.getSource(), ActionEvent.ACTION_PERFORMED, Utilities.keyToString(ks));
229
            ev.getSource(), ActionEvent.ACTION_PERFORMED, Utilities.keyToString(ks));
229
            
230
            
230
        Keymap root = TopManager.getDefault ().getGlobalKeymap ();
231
        Keymap root = (Keymap)Lookup.getDefault().lookup(Keymap.class);
231
        Action a = root.getAction (ks);
232
        Action a = root.getAction (ks);
232
        if (a != null && a.isEnabled()) {
233
        if (a != null && a.isEnabled()) {
233
            TopManager.getDefault().getActionManager().invokeAction(a, aev);
234
            ActionManager am = (ActionManager)Lookup.getDefault().lookup(ActionManager.class);
235
            am.invokeAction(a, aev);
234
            ev.consume();
236
            ev.consume();
235
            return true;
237
            return true;
236
        }
238
        }
Lines 269-275 Link Here
269
     * action, or the key is not bound to anything in the global keymap
271
     * action, or the key is not bound to anything in the global keymap
270
     */
272
     */
271
    private static boolean isTransmodalAction (KeyStroke key) {
273
    private static boolean isTransmodalAction (KeyStroke key) {
272
        Keymap root = TopManager.getDefault ().getGlobalKeymap ();
274
        Keymap root = (Keymap)Lookup.getDefault().lookup(Keymap.class);
273
        Action a = root.getAction (key);
275
        Action a = root.getAction (key);
274
        if (a == null) return false;
276
        if (a == null) return false;
275
        Object val = a.getValue ("OpenIDE-Transmodal-Action"); // NOI18N
277
        Object val = a.getValue ("OpenIDE-Transmodal-Action"); // NOI18N
(-)core/src/org/netbeans/core/windows/frames/TopComponentContainer.java (-1 lines)
Lines 25-31 Link Here
25
import javax.swing.event.ChangeListener;
25
import javax.swing.event.ChangeListener;
26
import javax.swing.JPanel;
26
import javax.swing.JPanel;
27
27
28
import org.openide.TopManager;
29
import org.openide.windows.*;
28
import org.openide.windows.*;
30
29
31
import org.netbeans.core.windows.WindowManagerImpl;
30
import org.netbeans.core.windows.WindowManagerImpl;
(-)core/src/org/netbeans/core/windows/frames/WindowTypesManager.java (-1 lines)
Lines 19-25 Link Here
19
19
20
import org.openide.windows.TopComponent;
20
import org.openide.windows.TopComponent;
21
import org.openide.util.NbBundle;
21
import org.openide.util.NbBundle;
22
import org.openide.TopManager;
23
import org.openide.ErrorManager;
22
import org.openide.ErrorManager;
24
23
25
/** Utility class, with class-only content. Its responsibility is to act as
24
/** Utility class, with class-only content. Its responsibility is to act as
(-)core/src/org/netbeans/core/windows/layers/ModeData.java (-1 lines)
Lines 62-68 Link Here
62
import org.openide.loaders.DataObjectNotFoundException;
62
import org.openide.loaders.DataObjectNotFoundException;
63
import org.openide.cookies.InstanceCookie;
63
import org.openide.cookies.InstanceCookie;
64
import org.openide.cookies.SaveCookie;
64
import org.openide.cookies.SaveCookie;
65
import org.openide.TopManager;
66
import org.openide.util.Lookup;
65
import org.openide.util.Lookup;
67
import org.openide.util.NbBundle;
66
import org.openide.util.NbBundle;
68
import org.openide.util.HelpCtx;
67
import org.openide.util.HelpCtx;
(-)core/src/org/netbeans/core/windows/layers/TCRefImpl.java (-1 lines)
Lines 33-39 Link Here
33
import org.xml.sax.XMLReader;
33
import org.xml.sax.XMLReader;
34
import org.xml.sax.SAXParseException;
34
import org.xml.sax.SAXParseException;
35
35
36
import org.openide.TopManager;
37
import org.openide.windows.TopComponent;
36
import org.openide.windows.TopComponent;
38
import org.openide.filesystems.FileChangeListener;
37
import org.openide.filesystems.FileChangeListener;
39
import org.openide.filesystems.FileEvent;
38
import org.openide.filesystems.FileEvent;
(-)core/src/org/netbeans/core/windows/layers/WSLoader.java (-1 lines)
Lines 25-31 Link Here
25
import org.openide.loaders.MultiDataObject;
25
import org.openide.loaders.MultiDataObject;
26
import org.openide.loaders.DataObjectExistsException;
26
import org.openide.loaders.DataObjectExistsException;
27
import org.openide.util.NbBundle;
27
import org.openide.util.NbBundle;
28
import org.openide.TopManager;
29
import org.openide.util.actions.SystemAction;
28
import org.openide.util.actions.SystemAction;
30
29
31
/** Window System loader which recognizes several data objects - data objects
30
/** Window System loader which recognizes several data objects - data objects
(-)core/src/org/netbeans/core/windows/layers/WindowManagerData.java (-1 / +1 lines)
Lines 56-62 Link Here
56
import org.openide.filesystems.FileObject;
56
import org.openide.filesystems.FileObject;
57
import org.openide.nodes.CookieSet;
57
import org.openide.nodes.CookieSet;
58
import org.openide.nodes.Node;
58
import org.openide.nodes.Node;
59
import org.openide.TopManager;
59
60
import org.openide.util.Mutex;
60
import org.openide.util.Mutex;
61
import org.openide.util.NbBundle;
61
import org.openide.util.NbBundle;
62
import org.openide.xml.XMLUtil;
62
import org.openide.xml.XMLUtil;
(-)core/src/org/netbeans/core/windows/layers/WorkspaceData.java (-1 lines)
Lines 61-67 Link Here
61
import org.openide.modules.ModuleInfo;
61
import org.openide.modules.ModuleInfo;
62
import org.openide.nodes.CookieSet;
62
import org.openide.nodes.CookieSet;
63
import org.openide.nodes.Node;
63
import org.openide.nodes.Node;
64
import org.openide.TopManager;
65
import org.openide.ErrorManager;
64
import org.openide.ErrorManager;
66
import org.openide.util.NbBundle;
65
import org.openide.util.NbBundle;
67
import org.openide.util.RequestProcessor;
66
import org.openide.util.RequestProcessor;
(-)core/src/org/netbeans/core/windows/nodes/ModeContext.java (-1 lines)
Lines 26-32 Link Here
26
import java.lang.reflect.InvocationTargetException;
26
import java.lang.reflect.InvocationTargetException;
27
import java.util.*;
27
import java.util.*;
28
28
29
import org.openide.TopManager;
30
import org.openide.actions.*;
29
import org.openide.actions.*;
31
import org.openide.cookies.InstanceCookie;
30
import org.openide.cookies.InstanceCookie;
32
import org.openide.windows.Workspace;
31
import org.openide.windows.Workspace;
(-)core/src/org/netbeans/core/windows/nodes/WorkspaceNewType.java (-4 / +3 lines)
Lines 13-19 Link Here
13
13
14
package org.netbeans.core.windows.nodes;
14
package org.netbeans.core.windows.nodes;
15
15
16
import org.openide.TopManager;
17
import org.openide.NotifyDescriptor;
16
import org.openide.NotifyDescriptor;
18
import org.openide.util.HelpCtx;
17
import org.openide.util.HelpCtx;
19
import org.openide.util.NbBundle;
18
import org.openide.util.NbBundle;
Lines 61-73 Link Here
61
        nd.setInputText(NbBundle.getMessage(WorkspaceNewType.class,
60
        nd.setInputText(NbBundle.getMessage(WorkspaceNewType.class,
62
                "New_Workspace"));
61
                "New_Workspace"));
63
62
64
        Object ok = TopManager.getDefault ().notify (nd);
63
        Object ok = org.openide.DialogDisplayer.getDefault ().notify (nd);
65
64
66
        if (ok == NotifyDescriptor.OK_OPTION) {
65
        if (ok == NotifyDescriptor.OK_OPTION) {
67
            String s = nd.getInputText();
66
            String s = nd.getInputText();
68
            if ((s == null) || s.trim().equals("")) { // NOI18N
67
            if ((s == null) || s.trim().equals("")) { // NOI18N
69
                // can't create workspace with empty name
68
                // can't create workspace with empty name
70
                TopManager.getDefault().notify(new NotifyDescriptor.Message(
69
                org.openide.DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
71
                    NbBundle.getMessage(WorkspaceNewType.class, "MSG_WorkspaceNameEmpty"),
70
                    NbBundle.getMessage(WorkspaceNewType.class, "MSG_WorkspaceNameEmpty"),
72
                    NotifyDescriptor.INFORMATION_MESSAGE
71
                    NotifyDescriptor.INFORMATION_MESSAGE
73
                ));
72
                ));
Lines 75-81 Link Here
75
            }
74
            }
76
            if (nameExists(s)) {
75
            if (nameExists(s)) {
77
                // can't create workspace with already existing name
76
                // can't create workspace with already existing name
78
                TopManager.getDefault().notify(new NotifyDescriptor.Message(
77
                org.openide.DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
79
                    NbBundle.getMessage(WorkspaceNewType.class, "FMT_WorkspaceExists", s),
78
                    NbBundle.getMessage(WorkspaceNewType.class, "FMT_WorkspaceExists", s),
80
                    NotifyDescriptor.INFORMATION_MESSAGE
79
                    NotifyDescriptor.INFORMATION_MESSAGE
81
                ));
80
                ));
(-)core/src/org/netbeans/core/windows/toolbars/ToolbarConfiguration.java (-5 / +6 lines)
Lines 23-33 Link Here
23
import java.awt.Dimension;
23
import java.awt.Dimension;
24
import java.awt.event.*;
24
import java.awt.event.*;
25
import javax.swing.*;
25
import javax.swing.*;
26
import org.netbeans.core.NbPlaces;
26
27
27
import org.openide.util.NbBundle;
28
import org.openide.util.NbBundle;
28
import org.openide.NotifyDescriptor;
29
import org.openide.NotifyDescriptor;
29
import org.openide.DialogDescriptor;
30
import org.openide.DialogDescriptor;
30
import org.openide.TopManager;
31
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
32
import org.openide.filesystems.FileObject;
32
import org.openide.filesystems.FileObject;
33
import org.openide.filesystems.FileSystem;
33
import org.openide.filesystems.FileSystem;
Lines 37-42 Link Here
37
import org.openide.awt.Toolbar;
37
import org.openide.awt.Toolbar;
38
import org.openide.awt.ToolbarPool;
38
import org.openide.awt.ToolbarPool;
39
import org.openide.loaders.XMLDataObject;
39
import org.openide.loaders.XMLDataObject;
40
import org.openide.util.Lookup;
40
import org.openide.util.SharedClassObject;
41
import org.openide.util.SharedClassObject;
41
import org.openide.util.Utilities;
42
import org.openide.util.Utilities;
42
43
Lines 714-720 Link Here
714
                                                                       getBundleString("PROP_saveDialog")); // NOI18N
715
                                                                       getBundleString("PROP_saveDialog")); // NOI18N
715
                                      il.setInputText (getBundleString("PROP_saveName")); // NOI18N
716
                                      il.setInputText (getBundleString("PROP_saveName")); // NOI18N
716
717
717
                                      Object ok = TopManager.getDefault ().notify (il);
718
                                      Object ok = org.openide.DialogDisplayer.getDefault ().notify (il);
718
                                      if (ok == NotifyDescriptor.OK_OPTION) {
719
                                      if (ok == NotifyDescriptor.OK_OPTION) {
719
                                          String s = il.getInputText();
720
                                          String s = il.getInputText();
720
                                          if (s.length() != 0) {
721
                                          if (s.length() != 0) {
Lines 792-798 Link Here
792
     * @return false if don't want replace
793
     * @return false if don't want replace
793
     */
794
     */
794
    boolean tryWriteDocument (String cn) throws IOException {
795
    boolean tryWriteDocument (String cn) throws IOException {
795
        final FileObject tbFO = TopManager.getDefault().getPlaces().folders().toolbars().getPrimaryFile();
796
        final FileObject tbFO = NbPlaces.getDefault().toolbars().getPrimaryFile();
796
        FileObject newFO = tbFO.getFileObject(cn, EXT_XML);
797
        FileObject newFO = tbFO.getFileObject(cn, EXT_XML);
797
798
798
        // Bugfix #10779 04 Sep 2001 by Jiri Rechtacek
799
        // Bugfix #10779 04 Sep 2001 by Jiri Rechtacek
Lines 816-822 Link Here
816
                                        (MessageFormat.format (getBundleString("MSG_replaceConfiguration"), // NOI18N
817
                                        (MessageFormat.format (getBundleString("MSG_replaceConfiguration"), // NOI18N
817
                                                               new String [] { cn }),
818
                                                               new String [] { cn }),
818
                                         NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.WARNING_MESSAGE);
819
                                         NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.WARNING_MESSAGE);
819
            TopManager.getDefault().notify (replaceD);
820
            org.openide.DialogDisplayer.getDefault().notify (replaceD);
820
            if (replaceD.getValue() != DialogDescriptor.OK_OPTION) {
821
            if (replaceD.getValue() != DialogDescriptor.OK_OPTION) {
821
                return false;
822
                return false;
822
            }
823
            }
Lines 840-846 Link Here
840
        sb.append ("<!DOCTYPE ").append (TAG_CONFIG).append (" PUBLIC \""). // NOI18N
841
        sb.append ("<!DOCTYPE ").append (TAG_CONFIG).append (" PUBLIC \""). // NOI18N
841
        append (TOOLBAR_DTD_PUBLIC_ID).append ("\" \"" + TOOLBAR_DTD_WEB + "\">\n\n").append (wtc.toString()); // NOI18N
842
        append (TOOLBAR_DTD_PUBLIC_ID).append ("\" \"" + TOOLBAR_DTD_WEB + "\">\n\n").append (wtc.toString()); // NOI18N
842
843
843
        final FileObject tbFO = TopManager.getDefault().getPlaces().folders().toolbars().getPrimaryFile();
844
        final FileObject tbFO = NbPlaces.getDefault().toolbars().getPrimaryFile();
844
        final FileSystem tbFS = tbFO.getFileSystem();
845
        final FileSystem tbFS = tbFO.getFileSystem();
845
846
846
        tbFS.runAtomicAction (new FileSystem.AtomicAction () {
847
        tbFS.runAtomicAction (new FileSystem.AtomicAction () {
(-)core/src/org/netbeans/core/xml/FileEntityResolver.java (-1 lines)
Lines 25-31 Link Here
25
import org.w3c.dom.DocumentType;
25
import org.w3c.dom.DocumentType;
26
26
27
27
28
import org.openide.TopManager;
29
import org.openide.filesystems.FileObject;
28
import org.openide.filesystems.FileObject;
30
import org.openide.filesystems.Repository;
29
import org.openide.filesystems.Repository;
31
import org.openide.loaders.*;
30
import org.openide.loaders.*;
(-)core/src/org/netbeans/core/xml/NbSAXParserFactoryImpl.java (-1 lines)
Lines 15-21 Link Here
15
15
16
import org.xml.sax.*;
16
import org.xml.sax.*;
17
import javax.xml.parsers.*;
17
import javax.xml.parsers.*;
18
import org.openide.TopManager;
19
import org.openide.ErrorManager;
18
import org.openide.ErrorManager;
20
19
21
/**
20
/**
(-)core/test/perf/src/org/netbeans/core/lookup/FolderLookupBenchmark.java (-4 / +7 lines)
Lines 21-27 Link Here
21
import java.util.Collection;
21
import java.util.Collection;
22
import java.util.List;
22
import java.util.List;
23
23
24
import org.openide.debugger.Debugger;
24
//import org.openide.debugger.Debugger;
25
import org.openide.execution.Executor;
25
import org.openide.execution.Executor;
26
import org.openide.filesystems.FileObject;
26
import org.openide.filesystems.FileObject;
27
import org.openide.filesystems.FileSystem;
27
import org.openide.filesystems.FileSystem;
Lines 32-41 Link Here
32
import org.openide.loaders.DataObjectNotFoundException;
32
import org.openide.loaders.DataObjectNotFoundException;
33
import org.openide.loaders.FolderLookup;
33
import org.openide.loaders.FolderLookup;
34
import org.openide.ServiceType;
34
import org.openide.ServiceType;
35
import org.openide.TopManager;
36
import org.openide.util.Lookup;
35
import org.openide.util.Lookup;
37
import org.openide.util.lookup.AbstractLookup;
36
import org.openide.util.lookup.AbstractLookup;
38
37
38
import org.netbeans.core.NbTopManager;
39
import org.netbeans.core.xml.FileEntityResolver;
39
import org.netbeans.core.xml.FileEntityResolver;
40
import org.netbeans.performance.Benchmark;
40
import org.netbeans.performance.Benchmark;
41
41
Lines 98-104 Link Here
98
    public FolderLookupBenchmark(java.lang.String testName) {
98
    public FolderLookupBenchmark(java.lang.String testName) {
99
        super(testName);
99
        super(testName);
100
100
101
        System.err.println("TopManager="+TopManager.getDefault()); // TEMP
101
        System.err.println("TopManager="+NbTopManager.get()); // TEMP
102
        System.err.println("Lookup="+Lookup.getDefault()); // TEMP
102
        System.err.println("Lookup="+Lookup.getDefault()); // TEMP
103
    }
103
    }
104
    
104
    
Lines 118-124 Link Here
118
        List systems = new ArrayList(layerResources.length);
118
        List systems = new ArrayList(layerResources.length);
119
        
119
        
120
        for(int i = 0; i < layerResources.length; i++) {
120
        for(int i = 0; i < layerResources.length; i++) {
121
            URL url = TopManager.getDefault().currentClassLoader().getResource(layerResources[i]);
121
            // XXX
122
//            URL url = TopManager.getDefault().currentClassLoader().getResource(layerResources[i]);
123
            ClassLoader cl = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
124
            URL url = cl.getResource(layerResources[i]);
122
            
125
            
123
            systems.add(new XMLFileSystem(url));
126
            systems.add(new XMLFileSystem(url));
124
        }
127
        }
(-)core/test/perf/src/org/netbeans/core/modules/ModuleInitTest.java (-2 / +2 lines)
Lines 28-35 Link Here
28
import org.w3c.dom.*;
28
import org.w3c.dom.*;
29
import org.apache.xml.serialize.*;
29
import org.apache.xml.serialize.*;
30
30
31
import org.netbeans.core.NbTopManager;
31
import org.netbeans.performance.Benchmark;
32
import org.netbeans.performance.Benchmark;
32
import org.openide.TopManager;
33
import org.openide.xml.XMLUtil;
33
import org.openide.xml.XMLUtil;
34
34
35
// initial run (04-sep-02) with empty dummy modules under JDK 1.4.1rc:
35
// initial run (04-sep-02) with empty dummy modules under JDK 1.4.1rc:
Lines 552-558 Link Here
552
    
552
    
553
    public static final class Main {
553
    public static final class Main {
554
        public static void main(String[] x) {
554
        public static void main(String[] x) {
555
            TopManager.getDefault();
555
            NbTopManager.get();
556
            if (Boolean.getBoolean("log")) {
556
            if (Boolean.getBoolean("log")) {
557
                Runtime r = Runtime.getRuntime();
557
                Runtime r = Runtime.getRuntime();
558
                r.gc();
558
                r.gc();
(-)core/test/perf/src/org/netbeans/core/projects/XMLSettingsTest.java (-2 / +2 lines)
Lines 18-26 Link Here
18
18
19
import org.netbeans.performance.Benchmark;
19
import org.netbeans.performance.Benchmark;
20
20
21
import org.openide.TopManager;
22
import org.openide.loaders.*;
21
import org.openide.loaders.*;
23
22
23
import org.netbeans.core.NbTopManager;
24
import org.netbeans.core.projects.FixedFileSystem;
24
import org.netbeans.core.projects.FixedFileSystem;
25
import org.openide.cookies.InstanceCookie;
25
import org.openide.cookies.InstanceCookie;
26
import org.openide.filesystems.Repository;
26
import org.openide.filesystems.Repository;
Lines 98-104 Link Here
98
    private DataFolder[] folders;
98
    private DataFolder[] folders;
99
    protected void setUp() throws Exception {
99
    protected void setUp() throws Exception {
100
        System.setProperty("netbeans.suppress.sysprop.warning", "true");
100
        System.setProperty("netbeans.suppress.sysprop.warning", "true");
101
        TopManager.getDefault();
101
        NbTopManager.get();
102
        int count = getIterationCount();
102
        int count = getIterationCount();
103
        int[] x = (int[])getArgument();
103
        int[] x = (int[])getArgument();
104
        int unmodified = x[0];
104
        int unmodified = x[0];
(-)core/test/qa-functional/src/gui/propertyeditors/data/PropertiesTest.java (-8 / +8 lines)
Lines 1-10 Link Here
1
package gui.propertyeditors.data;
1
package gui.propertyeditors.data;
2
2
3
import java.lang.reflect.InvocationTargetException;
3
import java.lang.reflect.InvocationTargetException;
4
import org.openide.TopManager;
5
import org.openide.nodes.AbstractNode;
4
import org.openide.nodes.AbstractNode;
6
import org.openide.nodes.Children;
5
import org.openide.nodes.Children;
7
import org.openide.nodes.Node;
6
import org.openide.nodes.Node;
7
import org.openide.nodes.NodeOperation;
8
import org.openide.nodes.PropertySupport;
8
import org.openide.nodes.PropertySupport;
9
import org.openide.nodes.Sheet;
9
import org.openide.nodes.Sheet;
10
10
Lines 18-27 Link Here
18
        tn = new TNode();
18
        tn = new TNode();
19
        
19
        
20
        // Display Node
20
        // Display Node
21
        //TopManager.getDefault().getNodeOperation().explore(tn);
21
        //NodeOperation.getDefault().getNodeOperation().explore(tn);
22
        
22
        
23
        // Display Properties of a Node
23
        // Display Properties of a Node
24
        TopManager.getDefault().getNodeOperation().showProperties(tn);
24
        NodeOperation.getDefault().showProperties(tn);
25
        
25
        
26
        try {
26
        try {
27
            Thread.currentThread().sleep(3000);
27
            Thread.currentThread().sleep(3000);
Lines 72-82 Link Here
72
            props.put(new TestProperty("Compiler Type",         org.openide.compiler.CompilerType.class));            
72
            props.put(new TestProperty("Compiler Type",         org.openide.compiler.CompilerType.class));            
73
            props.put(new TestProperty("Data Folder",           org.openide.loaders.DataFolder.class));            
73
            props.put(new TestProperty("Data Folder",           org.openide.loaders.DataFolder.class));            
74
            props.put(new TestProperty("Data Object",           org.openide.loaders.DataObject.class));            
74
            props.put(new TestProperty("Data Object",           org.openide.loaders.DataObject.class));            
75
            props.put(new TestProperty("Debugger Type",         org.openide.debugger.DebuggerType.class));            
75
//            props.put(new TestProperty("Debugger Type",         org.openide.debugger.DebuggerType.class));
76
            props.put(new TestProperty("Dimension",             java.awt.Dimension.class));            
76
            props.put(new TestProperty("Dimension",             java.awt.Dimension.class));            
77
            props.put(new TestProperty("Double",                java.lang.Double.class));            
77
            props.put(new TestProperty("Double",                java.lang.Double.class));            
78
            props.put(new TestProperty("double",                double.class));            
78
            props.put(new TestProperty("double",                double.class));            
79
            props.put(new TestProperty("Element Format",        org.openide.src.ElementFormat.class));            
79
//            props.put(new TestProperty("Element Format",        org.openide.src.ElementFormat.class));            
80
            props.put(new TestProperty("Executor",              org.openide.execution.Executor.class));            
80
            props.put(new TestProperty("Executor",              org.openide.execution.Executor.class));            
81
            props.put(new TestProperty("Extension List",        org.openide.loaders.ExtensionList.class));            
81
            props.put(new TestProperty("Extension List",        org.openide.loaders.ExtensionList.class));            
82
            props.put(new TestProperty("External Compiler",     org.openide.compiler.ExternalCompiler.ErrorExpression.class));            
82
            props.put(new TestProperty("External Compiler",     org.openide.compiler.ExternalCompiler.ErrorExpression.class));            
Lines 87-100 Link Here
87
            props.put(new TestProperty("Font",                  java.awt.Font.class));            
87
            props.put(new TestProperty("Font",                  java.awt.Font.class));            
88
            props.put(new TestProperty("Html Browser",          org.openide.awt.HtmlBrowser.Factory.class));            
88
            props.put(new TestProperty("Html Browser",          org.openide.awt.HtmlBrowser.Factory.class));            
89
            props.put(new TestProperty("Icon",                  javax.swing.Icon.class));            
89
            props.put(new TestProperty("Icon",                  javax.swing.Icon.class));            
90
            props.put(new TestProperty("Identifier []",         org.openide.src.Identifier[].class));            
90
//            props.put(new TestProperty("Identifier []",         org.openide.src.Identifier[].class));            
91
            props.put(new TestProperty("Indent Engine",         org.openide.text.IndentEngine.class));            
91
            props.put(new TestProperty("Indent Engine",         org.openide.text.IndentEngine.class));            
92
            props.put(new TestProperty("Insets",                java.awt.Insets.class));            
92
            props.put(new TestProperty("Insets",                java.awt.Insets.class));            
93
            props.put(new TestProperty("Integer",               java.lang.Integer.class));            
93
            props.put(new TestProperty("Integer",               java.lang.Integer.class));            
94
            props.put(new TestProperty("int",                   int.class));            
94
            props.put(new TestProperty("int",                   int.class));            
95
            props.put(new TestProperty("Long",                  java.lang.Long.class));            
95
            props.put(new TestProperty("Long",                  java.lang.Long.class));            
96
            props.put(new TestProperty("long",                  long.class));            
96
            props.put(new TestProperty("long",                  long.class));            
97
            props.put(new TestProperty("Method Parameter []",   org.openide.src.MethodParameter[].class));
97
//            props.put(new TestProperty("Method Parameter []",   org.openide.src.MethodParameter[].class));
98
            props.put(new TestProperty("Modifier",              java.lang.reflect.Modifier.class));            
98
            props.put(new TestProperty("Modifier",              java.lang.reflect.Modifier.class));            
99
            props.put(new TestProperty("NbClassPath",           org.openide.execution.NbClassPath.class));            
99
            props.put(new TestProperty("NbClassPath",           org.openide.execution.NbClassPath.class));            
100
            props.put(new TestProperty("NbProcessDescriptor",   org.openide.execution.NbProcessDescriptor.class));            
100
            props.put(new TestProperty("NbProcessDescriptor",   org.openide.execution.NbProcessDescriptor.class));            
Lines 109-115 Link Here
109
            props.put(new TestProperty("String",                java.lang.String.class));            
109
            props.put(new TestProperty("String",                java.lang.String.class));            
110
            props.put(new TestProperty("String []",             java.lang.String[].class));            
110
            props.put(new TestProperty("String []",             java.lang.String[].class));            
111
            props.put(new TestProperty("Table Model",           javax.swing.table.TableModel.class));            
111
            props.put(new TestProperty("Table Model",           javax.swing.table.TableModel.class));            
112
            props.put(new TestProperty("property Type",         org.openide.src.Type.class));            
112
//            props.put(new TestProperty("property Type",         org.openide.src.Type.class));            
113
            props.put(new TestProperty("URL",                   java.net.URL.class));            
113
            props.put(new TestProperty("URL",                   java.net.URL.class));            
114
            
114
            
115
            return sheet;
115
            return sheet;
(-)core/test/qa-functional/src/gui/propertyeditors/data/PropertyEditorsTestBean.java (-47 / +47 lines)
Lines 136-142 Link Here
136
    private org.openide.compiler.CompilerType p_compilerType;
136
    private org.openide.compiler.CompilerType p_compilerType;
137
    
137
    
138
    /** Holds value of property p_debuggerType. */
138
    /** Holds value of property p_debuggerType. */
139
    private org.openide.debugger.DebuggerType p_debuggerType;
139
//    private org.openide.debugger.DebuggerType p_debuggerType;
140
    
140
    
141
    /** Holds value of property p_NbClassPath. */
141
    /** Holds value of property p_NbClassPath. */
142
    // hack for forte 4.0 , because if is null, exception arise
142
    // hack for forte 4.0 , because if is null, exception arise
Lines 164-180 Link Here
164
    
164
    
165
    /** Holds value of property p_elementFormat. */
165
    /** Holds value of property p_elementFormat. */
166
    // hack for forte 4.0 , because if is null, exception arise
166
    // hack for forte 4.0 , because if is null, exception arise
167
    private org.openide.src.ElementFormat p_elementFormat = new org.openide.src.ElementFormat("ee");
167
//    private org.openide.src.ElementFormat p_elementFormat = new org.openide.src.ElementFormat("ee");
168
    
168
    
169
    /** Holds value of property p_externalCOmpiler. */
169
    /** Holds value of property p_externalCOmpiler. */
170
    private org.openide.compiler.ExternalCompiler.ErrorExpression p_externalCompiler = new org.openide.compiler.ExternalCompiler.ErrorExpression("x1","x2",0,0,0,0);
170
    private org.openide.compiler.ExternalCompiler.ErrorExpression p_externalCompiler = new org.openide.compiler.ExternalCompiler.ErrorExpression("x1","x2",0,0,0,0);
171
    
171
    
172
    /** Holds value of property p_methodParameterArray. */
172
    /** Holds value of property p_methodParameterArray. */
173
    private org.openide.src.MethodParameter[] p_methodParameterArray;
173
//    private org.openide.src.MethodParameter[] p_methodParameterArray;
174
    
174
    
175
    /** Holds value of property p_identifierArray. */
175
    /** Holds value of property p_identifierArray. */
176
    // hack for forte 4.0 , because if is null, exception arise
176
    // hack for forte 4.0 , because if is null, exception arise
177
    private org.openide.src.Identifier[] p_identifierArray = {org.openide.src.Identifier.create("identifier")};
177
//    private org.openide.src.Identifier[] p_identifierArray = {org.openide.src.Identifier.create("identifier")};
178
    
178
    
179
    /** Holds value of property p_modifier. */
179
    /** Holds value of property p_modifier. */
180
    private java.lang.reflect.Modifier p_modifier;
180
    private java.lang.reflect.Modifier p_modifier;
Lines 190-196 Link Here
190
    
190
    
191
    /** Holds value of property p_type. */
191
    /** Holds value of property p_type. */
192
    // hack for forte 4.0 , because if is null, exception arise
192
    // hack for forte 4.0 , because if is null, exception arise
193
    private org.openide.src.Type p_type = org.openide.src.Type.BOOLEAN;
193
//    private org.openide.src.Type p_type = org.openide.src.Type.BOOLEAN;
194
    
194
    
195
    /** Holds value of property p_dataFolder. */
195
    /** Holds value of property p_dataFolder. */
196
    private org.openide.loaders.DataFolder p_dataFolder;
196
    private org.openide.loaders.DataFolder p_dataFolder;
Lines 577-592 Link Here
577
    /** Getter for property p_debuggerType.
577
    /** Getter for property p_debuggerType.
578
     * @return Value of property p_debuggerType.
578
     * @return Value of property p_debuggerType.
579
     */
579
     */
580
    public org.openide.debugger.DebuggerType getP_debuggerType() {
580
//    public org.openide.debugger.DebuggerType getP_debuggerType() {
581
        return this.p_debuggerType;
581
//        return this.p_debuggerType;
582
    }
582
//    }
583
    
583
    
584
    /** Setter for property p_debuggerType.
584
    /** Setter for property p_debuggerType.
585
     * @param p_debuggerType New value of property p_debuggerType.
585
     * @param p_debuggerType New value of property p_debuggerType.
586
     */
586
     */
587
    public void setP_debuggerType(org.openide.debugger.DebuggerType p_debuggerType) {
587
//    public void setP_debuggerType(org.openide.debugger.DebuggerType p_debuggerType) {
588
        this.p_debuggerType = p_debuggerType;
588
//        this.p_debuggerType = p_debuggerType;
589
    }
589
//    }
590
    
590
    
591
    /** Getter for property p_executor.
591
    /** Getter for property p_executor.
592
     * @return Value of property p_executor.
592
     * @return Value of property p_executor.
Lines 787-802 Link Here
787
    /** Getter for property p_elementFormat.
787
    /** Getter for property p_elementFormat.
788
     * @return Value of property p_elementFormat.
788
     * @return Value of property p_elementFormat.
789
     */
789
     */
790
    public org.openide.src.ElementFormat getP_elementFormat() {
790
//    public org.openide.src.ElementFormat getP_elementFormat() {
791
        return this.p_elementFormat;
791
//        return this.p_elementFormat;
792
    }
792
//    }
793
    
793
    
794
    /** Setter for property p_elementFormat.
794
    /** Setter for property p_elementFormat.
795
     * @param p_elementFormat New value of property p_elementFormat.
795
     * @param p_elementFormat New value of property p_elementFormat.
796
     */
796
     */
797
    public void setP_elementFormat(org.openide.src.ElementFormat p_elementFormat) {
797
//    public void setP_elementFormat(org.openide.src.ElementFormat p_elementFormat) {
798
        this.p_elementFormat = p_elementFormat;
798
//        this.p_elementFormat = p_elementFormat;
799
    }
799
//    }
800
    
800
    
801
    /** Getter for property p_component.
801
    /** Getter for property p_component.
802
     * @return Value of property p_component.
802
     * @return Value of property p_component.
Lines 844-904 Link Here
844
     * @param index Index of the property.
844
     * @param index Index of the property.
845
     * @return Value of the property at <CODE>index</CODE>.
845
     * @return Value of the property at <CODE>index</CODE>.
846
     */
846
     */
847
    public org.openide.src.MethodParameter getP_methodParameterArray(int index) {
847
//    public org.openide.src.MethodParameter getP_methodParameterArray(int index) {
848
        return this.p_methodParameterArray[index];
848
//        return this.p_methodParameterArray[index];
849
    }
849
//    }
850
    
850
    
851
    /** Getter for property p_methodParameterArray.
851
    /** Getter for property p_methodParameterArray.
852
     * @return Value of property p_methodParameterArray.
852
     * @return Value of property p_methodParameterArray.
853
     */
853
     */
854
    public org.openide.src.MethodParameter[] getP_methodParameterArray() {
854
//    public org.openide.src.MethodParameter[] getP_methodParameterArray() {
855
        return this.p_methodParameterArray;
855
//        return this.p_methodParameterArray;
856
    }
856
//    }
857
    
857
    
858
    /** Indexed setter for property p_methodParameterArray.
858
    /** Indexed setter for property p_methodParameterArray.
859
     * @param index Index of the property.
859
     * @param index Index of the property.
860
     * @param p_methodParameterArray New value of the property at <CODE>index</CODE>.
860
     * @param p_methodParameterArray New value of the property at <CODE>index</CODE>.
861
     */
861
     */
862
    public void setP_methodParameterArray(int index, org.openide.src.MethodParameter p_methodParameterArray) {
862
//    public void setP_methodParameterArray(int index, org.openide.src.MethodParameter p_methodParameterArray) {
863
        this.p_methodParameterArray[index] = p_methodParameterArray;
863
//        this.p_methodParameterArray[index] = p_methodParameterArray;
864
    }
864
//    }
865
    
865
    
866
    /** Setter for property p_methodParameterArray.
866
    /** Setter for property p_methodParameterArray.
867
     * @param p_methodParameterArray New value of property p_methodParameterArray.
867
     * @param p_methodParameterArray New value of property p_methodParameterArray.
868
     */
868
     */
869
    public void setP_methodParameterArray(org.openide.src.MethodParameter[] p_methodParameterArray) {
869
//    public void setP_methodParameterArray(org.openide.src.MethodParameter[] p_methodParameterArray) {
870
        this.p_methodParameterArray = p_methodParameterArray;
870
//        this.p_methodParameterArray = p_methodParameterArray;
871
    }
871
//    }
872
    
872
    
873
    /** Indexed getter for property p_identifierArray.
873
    /** Indexed getter for property p_identifierArray.
874
     * @param index Index of the property.
874
     * @param index Index of the property.
875
     * @return Value of the property at <CODE>index</CODE>.
875
     * @return Value of the property at <CODE>index</CODE>.
876
     */
876
     */
877
    public org.openide.src.Identifier getP_identifierArray(int index) {
877
//    public org.openide.src.Identifier getP_identifierArray(int index) {
878
        return this.p_identifierArray[index];
878
//        return this.p_identifierArray[index];
879
    }
879
//    }
880
    
880
    
881
    /** Getter for property p_identifierArray.
881
    /** Getter for property p_identifierArray.
882
     * @return Value of property p_identifierArray.
882
     * @return Value of property p_identifierArray.
883
     */
883
     */
884
    public org.openide.src.Identifier[] getP_identifierArray() {
884
//    public org.openide.src.Identifier[] getP_identifierArray() {
885
        return this.p_identifierArray;
885
//        return this.p_identifierArray;
886
    }
886
//    }
887
    
887
    
888
    /** Indexed setter for property p_identifierArray.
888
    /** Indexed setter for property p_identifierArray.
889
     * @param index Index of the property.
889
     * @param index Index of the property.
890
     * @param p_identifierArray New value of the property at <CODE>index</CODE>.
890
     * @param p_identifierArray New value of the property at <CODE>index</CODE>.
891
     */
891
     */
892
    public void setP_identifierArray(int index, org.openide.src.Identifier p_identifierArray) {
892
//    public void setP_identifierArray(int index, org.openide.src.Identifier p_identifierArray) {
893
        this.p_identifierArray[index] = p_identifierArray;
893
//        this.p_identifierArray[index] = p_identifierArray;
894
    }
894
//    }
895
    
895
    
896
    /** Setter for property p_identifierArray.
896
    /** Setter for property p_identifierArray.
897
     * @param p_identifierArray New value of property p_identifierArray.
897
     * @param p_identifierArray New value of property p_identifierArray.
898
     */
898
     */
899
    public void setP_identifierArray(org.openide.src.Identifier[] p_identifierArray) {
899
//    public void setP_identifierArray(org.openide.src.Identifier[] p_identifierArray) {
900
        this.p_identifierArray = p_identifierArray;
900
//        this.p_identifierArray = p_identifierArray;
901
    }
901
//    }
902
    
902
    
903
    /** Getter for property p_modifier.
903
    /** Getter for property p_modifier.
904
     * @return Value of property p_modifier.
904
     * @return Value of property p_modifier.
Lines 991-1006 Link Here
991
    /** Getter for property p_type.
991
    /** Getter for property p_type.
992
     * @return Value of property p_type.
992
     * @return Value of property p_type.
993
     */
993
     */
994
    public org.openide.src.Type getP_type() {
994
//    public org.openide.src.Type getP_type() {
995
        return this.p_type;
995
//        return this.p_type;
996
    }
996
//    }
997
    
997
    
998
    /** Setter for property p_type.
998
    /** Setter for property p_type.
999
     * @param p_type New value of property p_type.
999
     * @param p_type New value of property p_type.
1000
     */
1000
     */
1001
    public void setP_type(org.openide.src.Type p_type) {
1001
//    public void setP_type(org.openide.src.Type p_type) {
1002
        this.p_type = p_type;
1002
//        this.p_type = p_type;
1003
    }
1003
//    }
1004
    
1004
    
1005
    /** Getter for property p_dataFolder.
1005
    /** Getter for property p_dataFolder.
1006
     * @return Value of property p_dataFolder.
1006
     * @return Value of property p_dataFolder.
(-)core/test/qa-functional/src/gui/propertyeditors/utilities/CoreSupport.java (-2 / +2 lines)
Lines 32-38 Link Here
32
// ide imports
32
// ide imports
33
import org.openide.filesystems.FileObject;
33
import org.openide.filesystems.FileObject;
34
import org.openide.filesystems.FileStateInvalidException;
34
import org.openide.filesystems.FileStateInvalidException;
35
import org.openide.TopManager;
35
import org.openide.filesystems.Repository;
36
36
37
/** Utilities for core tests. From this class extends supports for each testsuite.
37
/** Utilities for core tests. From this class extends supports for each testsuite.
38
 *
38
 *
Lines 53-59 Link Here
53
     * @return finded file object or null
53
     * @return finded file object or null
54
     */
54
     */
55
    public static FileObject findFileObject(String _package, String _name, String _extension) {
55
    public static FileObject findFileObject(String _package, String _name, String _extension) {
56
        FileObject f = TopManager.getDefault().getRepository().find(_package, _name, _extension);
56
        FileObject f = Repository.getDefault().find(_package, _name, _extension);
57
        return f;
57
        return f;
58
    }
58
    }
59
    
59
    
(-)core/test/qa-functional/src/gui/windowsystem/utilities/WindowSystemSupport.java (-2 / +2 lines)
Lines 31-37 Link Here
31
// ide imports
31
// ide imports
32
import org.openide.filesystems.FileObject;
32
import org.openide.filesystems.FileObject;
33
import org.openide.filesystems.FileStateInvalidException;
33
import org.openide.filesystems.FileStateInvalidException;
34
import org.openide.TopManager;
34
import org.openide.filesystems.Repository;
35
35
36
/** Utilities for Window System tests. From this class extends supports for each testsuite.
36
/** Utilities for Window System tests. From this class extends supports for each testsuite.
37
 *
37
 *
Lines 52-58 Link Here
52
     * @return finded file object or null
52
     * @return finded file object or null
53
     */
53
     */
54
    public static FileObject findFileObject(String _package, String _name, String _extension) {
54
    public static FileObject findFileObject(String _package, String _name, String _extension) {
55
        FileObject f = TopManager.getDefault().getRepository().find(_package, _name, _extension);
55
        FileObject f = Repository.getDefault().find(_package, _name, _extension);
56
        return f;
56
        return f;
57
    }
57
    }
58
    
58
    
(-)core/test/qa-functional/src/gui/windowsystem/ws_lib/WSManager.java (-2 / +4 lines)
Lines 51-56 Link Here
51
import org.netbeans.jemmy.operators.JFrameOperator;
51
import org.netbeans.jemmy.operators.JFrameOperator;
52
import org.netbeans.jemmy.operators.JTabbedPaneOperator;
52
import org.netbeans.jemmy.operators.JTabbedPaneOperator;
53
53
54
import org.openide.windows.WindowManager;
55
54
56
55
/**
57
/**
56
 *
58
 *
Lines 468-474 Link Here
468
        if(frame.getSource() instanceof JInternalFrame){
470
        if(frame.getSource() instanceof JInternalFrame){
469
            JInternalFrameOperator internalOp = getJInternalFrameOperator(windowTitle);
471
            JInternalFrameOperator internalOp = getJInternalFrameOperator(windowTitle);
470
            
472
            
471
            WorkspaceImpl workspace =(WorkspaceImpl)((WindowManagerImpl)org.netbeans.core.NbTopManager.get().getWindowManager()).getCurrentWorkspace();
473
            WorkspaceImpl workspace =(WorkspaceImpl)WindowManager.getDefault().getCurrentWorkspace();
472
            String dominant = ((org.netbeans.core.windows.frames.PerimeterLayout) workspace.desktopPane().getLayout()).getDominant();
474
            String dominant = ((org.netbeans.core.windows.frames.PerimeterLayout) workspace.desktopPane().getLayout()).getDominant();
473
            if("SOUTH".equals(dominant)) dominant = "Bottom";
475
            if("SOUTH".equals(dominant)) dominant = "Bottom";
474
            if("NORTH".equals(dominant)) dominant = "Top";
476
            if("NORTH".equals(dominant)) dominant = "Top";
Lines 502-508 Link Here
502
    public String whereIsAtached(JInternalFrameOperator internalOp) {
504
    public String whereIsAtached(JInternalFrameOperator internalOp) {
503
        
505
        
504
        if(internalOp != null) {
506
        if(internalOp != null) {
505
            Set modes = ((WorkspaceImpl)((WindowManagerImpl)org.netbeans.core.NbTopManager.get().getWindowManager()).getCurrentWorkspace()).getModes();
507
            Set modes = ((WorkspaceImpl)WindowManager.getDefault().getCurrentWorkspace()).getModes();
506
            Iterator it = modes.iterator();
508
            Iterator it = modes.iterator();
507
            
509
            
508
            while(it.hasNext()) {
510
            while(it.hasNext()) {
(-)core/test/unit/src/org/netbeans/core/AutomountSupportTest.java (-2 / +5 lines)
Lines 15-21 Link Here
15
15
16
import junit.framework.*;
16
import junit.framework.*;
17
import junit.textui.TestRunner;
17
import junit.textui.TestRunner;
18
import org.openide.TopManager;
19
import org.openide.filesystems.*;
18
import org.openide.filesystems.*;
20
import org.openide.nodes.Node;
19
import org.openide.nodes.Node;
21
import org.openide.loaders.DataObject;
20
import org.openide.loaders.DataObject;
Lines 25-30 Link Here
25
import org.openide.filesystems.Repository;
24
import org.openide.filesystems.Repository;
26
import org.openide.cookies.InstanceCookie;
25
import org.openide.cookies.InstanceCookie;
27
import org.openide.loaders.InstanceDataObject;
26
import org.openide.loaders.InstanceDataObject;
27
import org.openide.modules.ModuleInfo;
28
import org.openide.util.Lookup;
28
import org.openide.util.Task;
29
import org.openide.util.Task;
29
30
30
/** Test Plain top manager. Must be run externally.
31
/** Test Plain top manager. Must be run externally.
Lines 49-55 Link Here
49
    /**/
50
    /**/
50
    protected void setUp() throws Exception {
51
    protected void setUp() throws Exception {
51
        
52
        
52
        FileObject fo = TopManager.getDefault ().getRepository ().findResource ("Mount"); // NOI18N
53
        Lookup.getDefault().lookup(ModuleInfo.class);
54
        
55
        FileObject fo = Repository.getDefault().findResource ("Mount"); // NOI18N
53
        mount = DataFolder.findFolder (fo);
56
        mount = DataFolder.findFolder (fo);
54
        
57
        
55
        DataObject[] arr = mount.getChildren ();
58
        DataObject[] arr = mount.getChildren ();
(-)core/test/unit/src/org/netbeans/core/PlainTest.java (-4 / +5 lines)
Lines 16-23 Link Here
16
import junit.framework.AssertionFailedError;
16
import junit.framework.AssertionFailedError;
17
import junit.textui.TestRunner;
17
import junit.textui.TestRunner;
18
import org.netbeans.junit.*;
18
import org.netbeans.junit.*;
19
import org.openide.TopManager;
20
import org.openide.filesystems.FileSystem;
19
import org.openide.filesystems.FileSystem;
20
import org.openide.filesystems.Repository;
21
import org.openide.nodes.Node;
21
import org.openide.nodes.Node;
22
import org.openide.loaders.DataObject;
22
import org.openide.loaders.DataObject;
23
import java.util.Enumeration;
23
import java.util.Enumeration;
Lines 30-35 Link Here
30
import java.awt.Frame;
30
import java.awt.Frame;
31
import java.awt.Dialog;
31
import java.awt.Dialog;
32
import javax.swing.SwingUtilities;
32
import javax.swing.SwingUtilities;
33
import org.netbeans.core.NbTopManager;
33
34
34
/** Test Plain top manager. Must be run externally.
35
/** Test Plain top manager. Must be run externally.
35
 * @author Jesse Glick
36
 * @author Jesse Glick
Lines 47-53 Link Here
47
    }
48
    }
48
    
49
    
49
    public void testStartPlain() throws Exception {
50
    public void testStartPlain() throws Exception {
50
        assertTrue("Default TopManager is Plain", TopManager.getDefault() instanceof Plain);
51
        assertTrue("Default TopManager is Plain", NbTopManager.get() instanceof Plain);
51
        // That's all folks!
52
        // That's all folks!
52
    }
53
    }
53
    
54
    
Lines 59-67 Link Here
59
    public void testPlainShowsNoGUI() throws Exception {
60
    public void testPlainShowsNoGUI() throws Exception {
60
        EnsureNoWindowsOpened l = new EnsureNoWindowsOpened();
61
        EnsureNoWindowsOpened l = new EnsureNoWindowsOpened();
61
        l.test("Initially");
62
        l.test("Initially");
62
        TopManager tm = TopManager.getDefault();
63
        NbTopManager tm = NbTopManager.get();
63
        l.test("After getting TopManager");
64
        l.test("After getting TopManager");
64
        FileSystem sfs = tm.getRepository().getDefaultFileSystem();
65
        FileSystem sfs = Repository.getDefault().getDefaultFileSystem();
65
        DataFolder top = DataFolder.findFolder(sfs.getRoot());
66
        DataFolder top = DataFolder.findFolder(sfs.getRoot());
66
        Enumeration e = top.children(true);
67
        Enumeration e = top.children(true);
67
        while (e.hasMoreElements()) {
68
        while (e.hasMoreElements()) {
(-)core/test/unit/src/org/netbeans/core/lookup/LookupClassLoaderTest.java (-12 / +15 lines)
Lines 23-29 Link Here
23
import org.netbeans.core.modules.Module;
23
import org.netbeans.core.modules.Module;
24
import org.netbeans.core.modules.ModuleHistory;
24
import org.netbeans.core.modules.ModuleHistory;
25
import org.netbeans.core.modules.ModuleManager;
25
import org.netbeans.core.modules.ModuleManager;
26
import org.openide.TopManager;
26
import org.openide.ServiceType;
27
import org.openide.util.Lookup;
27
import org.openide.util.Lookup;
28
import org.openide.util.LookupEvent;
28
import org.openide.util.LookupEvent;
29
import org.openide.util.LookupListener;
29
import org.openide.util.LookupListener;
Lines 50-56 Link Here
50
    private Module m;
50
    private Module m;
51
    protected void setUp() throws Exception {
51
    protected void setUp() throws Exception {
52
        clearWorkDir();
52
        clearWorkDir();
53
        TopManager.getDefault();
54
        mgr = NbTopManager.get().getModuleSystem().getManager();
53
        mgr = NbTopManager.get().getModuleSystem().getManager();
55
        try {
54
        try {
56
            mgr.mutex().writeAccess(new Mutex.ExceptionAction() {
55
            mgr.mutex().writeAccess(new Mutex.ExceptionAction() {
Lines 108-126 Link Here
108
     * than once (XTest bug I suppose).
107
     * than once (XTest bug I suppose).
109
     */
108
     */
110
    public void testClassLoaderLookup() throws Exception {
109
    public void testClassLoaderLookup() throws Exception {
110
        ClassLoader systemClassLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
111
        assertNotNull(systemClassLoader);
111
        try {
112
        try {
112
            TopManager.getDefault().systemClassLoader().loadClass("ims.Foo");
113
            systemClassLoader.loadClass("ims.Foo");
113
            fail("Should not have been able to load ims.Foo");
114
            fail("Should not have been able to load ims.Foo");
114
        } catch (ClassNotFoundException cnfe) {
115
        } catch (ClassNotFoundException cnfe) {
115
            // Good.
116
            // Good.
116
        }
117
        }
117
        assertNotNull(Lookup.getDefault().lookup(ClassLoader.class));
118
        assertEquals(TopManager.getDefault().systemClassLoader(), Lookup.getDefault().lookup(ClassLoader.class));
119
        twiddle(m, TWIDDLE_ENABLE);
118
        twiddle(m, TWIDDLE_ENABLE);
120
        assertEquals(TopManager.getDefault().systemClassLoader(), Lookup.getDefault().lookup(ClassLoader.class));
119
        systemClassLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
121
        Class clazz = TopManager.getDefault().systemClassLoader().loadClass("ims.Foo");
120
        Class clazz = systemClassLoader.loadClass("ims.Foo");
122
        System.err.println("Service types: " + TopManager.getDefault().getServices().getServiceTypes());//XXX
121
        
123
        assertNotNull("Services registry has foo", TopManager.getDefault().getServices().find("foo"));
122
        ServiceType.Registry sReg = (ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class);
123
        System.err.println("Service types: " + sReg.getServiceTypes());//XXX
124
        assertNotNull("Services registry has foo", sReg.find("foo"));
125
        
124
        Object service = Lookup.getDefault().lookup(clazz);
126
        Object service = Lookup.getDefault().lookup(clazz);
125
        // does not help: Thread.sleep(5000);
127
        // does not help: Thread.sleep(5000);
126
        assertNotNull("Installed service section for ims.Foo", service);
128
        assertNotNull("Installed service section for ims.Foo", service);
Lines 140-149 Link Here
140
        twiddle(m, TWIDDLE_DISABLE);
142
        twiddle(m, TWIDDLE_DISABLE);
141
        assertTrue(l.gotSomething());
143
        assertTrue(l.gotSomething());
142
        Thread.sleep(1000); // XXX module sys fires changes asynch!
144
        Thread.sleep(1000); // XXX module sys fires changes asynch!
143
        assertEquals("Lookup gives correct degraded classloader after disable module (NOTE: might fail on a loaded/slow CPU)", TopManager.getDefault().systemClassLoader(), Lookup.getDefault().lookup(ClassLoader.class));
145
        
144
        assertEquals(TopManager.getDefault().systemClassLoader(), r.allInstances().iterator().next());
146
        systemClassLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
147
        assertEquals(systemClassLoader, r.allInstances().iterator().next());
145
        try {
148
        try {
146
            TopManager.getDefault().systemClassLoader().loadClass("ims.Foo");
149
            systemClassLoader.loadClass("ims.Foo");
147
            fail("Should no longer have been able to load ims.Foo");
150
            fail("Should no longer have been able to load ims.Foo");
148
        } catch (ClassNotFoundException cnfe) {
151
        } catch (ClassNotFoundException cnfe) {
149
            // Good.
152
            // Good.
(-)core/test/unit/src/org/netbeans/core/lookup/MetaInfServicesTest.java (-4 / +4 lines)
Lines 17-23 Link Here
17
import junit.textui.TestRunner;
17
import junit.textui.TestRunner;
18
import org.netbeans.core.NbTopManager;
18
import org.netbeans.core.NbTopManager;
19
import org.netbeans.core.modules.*;
19
import org.netbeans.core.modules.*;
20
import org.openide.TopManager;
21
import org.openide.util.*;
20
import org.openide.util.*;
22
import java.io.File;
21
import java.io.File;
23
import java.util.*;
22
import java.util.*;
Lines 54-60 Link Here
54
        //Thread.dumpStack();
53
        //Thread.dumpStack();
55
        clearWorkDir();
54
        clearWorkDir();
56
        // Load Plain.
55
        // Load Plain.
57
        TopManager.getDefault();
58
        // Make a couple of modules.
56
        // Make a couple of modules.
59
        mgr = NbTopManager.get().getModuleSystem().getManager();
57
        mgr = NbTopManager.get().getModuleSystem().getManager();
60
        try {
58
        try {
Lines 119-125 Link Here
119
     */
117
     */
120
    public void testEverything() throws Exception {
118
    public void testEverything() throws Exception {
121
        twiddle(m1, TWIDDLE_ENABLE);
119
        twiddle(m1, TWIDDLE_ENABLE);
122
        Class xface = TopManager.getDefault().systemClassLoader().loadClass("org.foo.Interface");
120
        ClassLoader systemClassLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
121
        Class xface = systemClassLoader.loadClass("org.foo.Interface");
123
        Lookup.Result r = Lookup.getDefault().lookup(new Lookup.Template(xface));
122
        Lookup.Result r = Lookup.getDefault().lookup(new Lookup.Template(xface));
124
        List instances = new ArrayList(r.allInstances());
123
        List instances = new ArrayList(r.allInstances());
125
        // Expect to get Impl1 from first JAR.
124
        // Expect to get Impl1 from first JAR.
Lines 155-161 Link Here
155
        // not really important: assertTrue(!l.gotSomething());
154
        // not really important: assertTrue(!l.gotSomething());
156
        instances = new ArrayList(r.allInstances());
155
        instances = new ArrayList(r.allInstances());
157
        assertEquals(0, instances.size());
156
        assertEquals(0, instances.size());
158
        Class xface2 = TopManager.getDefault().systemClassLoader().loadClass("org.foo.Interface");
157
        systemClassLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
158
        Class xface2 = systemClassLoader.loadClass("org.foo.Interface");
159
        assertTrue(xface != xface2);
159
        assertTrue(xface != xface2);
160
        Lookup.Result r2 = Lookup.getDefault().lookup(new Lookup.Template(xface2));
160
        Lookup.Result r2 = Lookup.getDefault().lookup(new Lookup.Template(xface2));
161
        instances = new ArrayList(r2.allInstances());
161
        instances = new ArrayList(r2.allInstances());
(-)core/test/unit/src/org/netbeans/core/lookup/data/install-manifest-service.mf (-1 / +1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: ims
2
OpenIDE-Module: ims
3
OpenIDE-Module-Name: Install Manifest Service Section
3
OpenIDE-Module-Name: Install Manifest Service Section
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
5
6
Name: ims/Foo.class
6
Name: ims/Foo.class
7
OpenIDE-Module-Class: Service
7
OpenIDE-Module-Class: Service
(-)core/test/unit/src/org/netbeans/core/lookup/data/services-jar-1.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.foo
2
OpenIDE-Module: org.foo
3
OpenIDE-Module-Name: Interface & Impl #1
3
OpenIDE-Module-Name: Interface & Impl #1
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
5
(-)core/test/unit/src/org/netbeans/core/lookup/data/services-jar-2.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: org.bar
2
OpenIDE-Module: org.bar
3
OpenIDE-Module-Name: Impl #2
3
OpenIDE-Module-Name: Impl #2
4
OpenIDE-Module-Module-Dependencies: org.foo
4
OpenIDE-Module-Module-Dependencies: org.foo
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
6
(-)core/test/unit/src/org/netbeans/core/lookup/data/test1.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: test1
2
OpenIDE-Module: test1
3
OpenIDE-Module-Layer: test1/layer-with-ido.xml
3
OpenIDE-Module-Layer: test1/layer-with-ido.xml
4
OpenIDE-Module-Name: IDOM test1
4
OpenIDE-Module-Name: IDOM test1
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
6
(-)core/test/unit/src/org/netbeans/core/lookup/data/test2.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: test2
2
OpenIDE-Module: test2
3
OpenIDE-Module-Layer: test2/layer-with-settings.xml
3
OpenIDE-Module-Layer: test2/layer-with-settings.xml
4
OpenIDE-Module-Name: IDOM test2
4
OpenIDE-Module-Name: IDOM test2
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
6
(-)core/test/unit/src/org/netbeans/core/modules/ModuleManagerTest.java (-1 / +1 lines)
Lines 62-68 Link Here
62
    protected void setUp() throws Exception {
62
    protected void setUp() throws Exception {
63
        super.setUp();
63
        super.setUp();
64
        System.setProperty("org.openide.major.version", "IDE/1");
64
        System.setProperty("org.openide.major.version", "IDE/1");
65
        System.setProperty("org.openide.specification.version", "3.12");
65
        System.setProperty("org.openide.specification.version", "3.14");
66
    }
66
    }
67
    
67
    
68
    /** Load simple-module and depends-on-simple-module.
68
    /** Load simple-module and depends-on-simple-module.
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest2.java (-2 / +8 lines)
Lines 18-25 Link Here
18
import java.util.Locale;
18
import java.util.Locale;
19
import org.netbeans.junit.*;
19
import org.netbeans.junit.*;
20
import junit.textui.TestRunner;
20
import junit.textui.TestRunner;
21
import org.openide.TopManager;
22
import org.openide.filesystems.Repository;
21
import org.openide.filesystems.Repository;
22
import org.netbeans.core.NbTopManager;
23
23
24
/** Test the NetBeans module installer implementation.
24
/** Test the NetBeans module installer implementation.
25
 * Broken into pieces to ensure each runs in its own VM.
25
 * Broken into pieces to ensure each runs in its own VM.
Lines 35-43 Link Here
35
        TestRunner.run(new NbTestSuite(NbInstallerTest2.class));
35
        TestRunner.run(new NbTestSuite(NbInstallerTest2.class));
36
    }
36
    }
37
    
37
    
38
    protected void setUp() throws Exception {
39
        super.setUp();
40
        System.setProperty("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_JH", "true");
41
        System.setProperty("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_DEPRECATED", "true");
42
    }
43
    
38
    /** Test #21173/#23595: overriding layers by localization. */
44
    /** Test #21173/#23595: overriding layers by localization. */
39
    public void testLocLayerOverrides() throws Exception {
45
    public void testLocLayerOverrides() throws Exception {
40
        TopManager.getDefault(); // init module system
46
        NbTopManager.get(); // init module system
41
        final FakeEvents ev = new FakeEvents();
47
        final FakeEvents ev = new FakeEvents();
42
        ModuleInstaller installer = new NbInstaller(ev);
48
        ModuleInstaller installer = new NbInstaller(ev);
43
        ModuleManager mgr = new ModuleManager(installer, ev);
49
        ModuleManager mgr = new ModuleManager(installer, ev);
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest3.java (-2 / +2 lines)
Lines 17-24 Link Here
17
import java.util.Collections;
17
import java.util.Collections;
18
import org.netbeans.junit.*;
18
import org.netbeans.junit.*;
19
import junit.textui.TestRunner;
19
import junit.textui.TestRunner;
20
import org.openide.TopManager;
21
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
21
import org.netbeans.core.NbTopManager;
22
22
23
/** Test the NetBeans module installer implementation.
23
/** Test the NetBeans module installer implementation.
24
 * Broken into pieces to ensure each runs in its own VM.
24
 * Broken into pieces to ensure each runs in its own VM.
Lines 36-42 Link Here
36
    
36
    
37
    /** Test #21173/#23595: overriding layers by branding. */
37
    /** Test #21173/#23595: overriding layers by branding. */
38
    public void testBrandingLayerOverrides() throws Exception {
38
    public void testBrandingLayerOverrides() throws Exception {
39
        TopManager.getDefault(); // init module system
39
        NbTopManager.get(); // init module system
40
        final FakeEvents ev = new FakeEvents();
40
        final FakeEvents ev = new FakeEvents();
41
        ModuleInstaller installer = new NbInstaller(ev);
41
        ModuleInstaller installer = new NbInstaller(ev);
42
        ModuleManager mgr = new ModuleManager(installer, ev);
42
        ModuleManager mgr = new ModuleManager(installer, ev);
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest4.java (-2 / +2 lines)
Lines 17-23 Link Here
17
import java.util.*;
17
import java.util.*;
18
import org.netbeans.junit.*;
18
import org.netbeans.junit.*;
19
import junit.textui.TestRunner;
19
import junit.textui.TestRunner;
20
import org.openide.TopManager;
20
import org.netbeans.core.NbTopManager;
21
import org.openide.filesystems.Repository;
21
import org.openide.filesystems.Repository;
22
22
23
/** Test the NetBeans module installer implementation.
23
/** Test the NetBeans module installer implementation.
Lines 52-58 Link Here
52
     * Version 1: all modules loaded together.
52
     * Version 1: all modules loaded together.
53
     */
53
     */
54
    public void testDependencyLayerOverrides1() throws Exception {
54
    public void testDependencyLayerOverrides1() throws Exception {
55
        TopManager.getDefault(); // init module system
55
        NbTopManager.get(); // init module system
56
        final FakeEvents ev = new FakeEvents();
56
        final FakeEvents ev = new FakeEvents();
57
        NbInstaller installer = new NbInstaller(ev);
57
        NbInstaller installer = new NbInstaller(ev);
58
        ModuleManager mgr = new ModuleManager(installer, ev);
58
        ModuleManager mgr = new ModuleManager(installer, ev);
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest5.java (-2 / +5 lines)
Lines 17-24 Link Here
17
import java.util.Collections;
17
import java.util.Collections;
18
import org.netbeans.junit.*;
18
import org.netbeans.junit.*;
19
import junit.textui.TestRunner;
19
import junit.textui.TestRunner;
20
import org.openide.TopManager;
21
import org.openide.filesystems.Repository;
20
import org.openide.filesystems.Repository;
21
import org.netbeans.core.NbTopManager;
22
22
23
/** Test the NetBeans module installer implementation.
23
/** Test the NetBeans module installer implementation.
24
 * Broken into pieces to ensure each runs in its own VM.
24
 * Broken into pieces to ensure each runs in its own VM.
Lines 40-46 Link Here
40
     * Exercises different logic in XMLFileSystem as well as ModuleLayeredFileSystem.
40
     * Exercises different logic in XMLFileSystem as well as ModuleLayeredFileSystem.
41
     */
41
     */
42
    public void testDependencyLayerOverrides2() throws Exception {
42
    public void testDependencyLayerOverrides2() throws Exception {
43
        TopManager.getDefault(); // init module system
43
        NbTopManager.get(); // init module system
44
        System.err.println("Module Info->"+org.openide.util.Lookup.getDefault()
45
                .lookup(org.openide.modules.ModuleInfo.class)); // TEMP
44
        final FakeEvents ev = new FakeEvents();
46
        final FakeEvents ev = new FakeEvents();
45
        NbInstaller installer = new NbInstaller(ev);
47
        NbInstaller installer = new NbInstaller(ev);
46
        ModuleManager mgr = new ModuleManager(installer, ev);
48
        ModuleManager mgr = new ModuleManager(installer, ev);
Lines 49-54 Link Here
49
        try {
51
        try {
50
            Module m1 = mgr.create(new File(jars, "base-layer-mod.jar"), null, false, false, false);
52
            Module m1 = mgr.create(new File(jars, "base-layer-mod.jar"), null, false, false, false);
51
            Module m2 = mgr.create(new File(jars, "override-layer-mod.jar"), null, false, false, false);
53
            Module m2 = mgr.create(new File(jars, "override-layer-mod.jar"), null, false, false, false);
54
            
52
            assertEquals(Collections.EMPTY_SET, m2.getProblems());
55
            assertEquals(Collections.EMPTY_SET, m2.getProblems());
53
            assertEquals(null, slurp("foo/file1.txt"));
56
            assertEquals(null, slurp("foo/file1.txt"));
54
            assertEquals(null, slurp("foo/file3.txt"));
57
            assertEquals(null, slurp("foo/file3.txt"));
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest6.java (-3 / +2 lines)
Lines 20-27 Link Here
20
import org.netbeans.core.NbTopManager;
20
import org.netbeans.core.NbTopManager;
21
import org.netbeans.core.Plain;
21
import org.netbeans.core.Plain;
22
import org.netbeans.core.projects.SessionManager;
22
import org.netbeans.core.projects.SessionManager;
23
import org.openide.TopManager;
24
import org.openide.filesystems.FileSystem;
23
import org.openide.filesystems.FileSystem;
24
import org.openide.filesystems.Repository;
25
25
26
/** Test the NetBeans module installer implementation.
26
/** Test the NetBeans module installer implementation.
27
 * Broken into pieces to ensure each runs in its own VM.
27
 * Broken into pieces to ensure each runs in its own VM.
Lines 77-83 Link Here
77
    public void testInstallMaskUser() throws Exception {
77
    public void testInstallMaskUser() throws Exception {
78
        try {
78
        try {
79
            // Ought to load these modules:
79
            // Ought to load these modules:
80
            TopManager.getDefault();
81
            ModuleManager mgr = NbTopManager.get().getModuleSystem().getManager();
80
            ModuleManager mgr = NbTopManager.get().getModuleSystem().getManager();
82
            mgr.mutexPrivileged().enterReadAccess();
81
            mgr.mutexPrivileged().enterReadAccess();
83
            try {
82
            try {
Lines 138-144 Link Here
138
        }
137
        }
139
        protected ModuleSystem createModuleSystem() throws IOException {
138
        protected ModuleSystem createModuleSystem() throws IOException {
140
            String userDir = System.getProperty("modules.dir"); // NOI18N
139
            String userDir = System.getProperty("modules.dir"); // NOI18N
141
            FileSystem fs = getRepository().getDefaultFileSystem();
140
            FileSystem fs = Repository.getDefault().getDefaultFileSystem();
142
            return new ModuleSystem(fs, new File(home, "modules"), new File(user, "modules"));
141
            return new ModuleSystem(fs, new File(home, "modules"), new File(user, "modules"));
143
        }
142
        }
144
    }
143
    }
(-)core/test/unit/src/org/netbeans/core/modules/NbInstallerTest7.java (-2 / +7 lines)
Lines 20-26 Link Here
20
import org.netbeans.core.NbTopManager;
20
import org.netbeans.core.NbTopManager;
21
import org.netbeans.core.Plain;
21
import org.netbeans.core.Plain;
22
import org.netbeans.core.projects.SessionManager;
22
import org.netbeans.core.projects.SessionManager;
23
import org.openide.TopManager;
24
import org.openide.filesystems.FileSystem;
23
import org.openide.filesystems.FileSystem;
25
24
26
/** Test the NetBeans module installer implementation.
25
/** Test the NetBeans module installer implementation.
Lines 48-53 Link Here
48
    protected void setUp() throws Exception {
47
    protected void setUp() throws Exception {
49
        super.setUp();
48
        super.setUp();
50
        System.setProperty("netbeans.suppress.sysprop.warning", "true");
49
        System.setProperty("netbeans.suppress.sysprop.warning", "true");
50
        System.setProperty("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_JH", "true");
51
        System.setProperty("org.netbeans.core.modules.NbInstaller.NO_COMPAT_AUTO_DEPS_DEPRECATED", "true");
52
        // leave NO_COMPAT_AUTO_TRANSITIVE_DEPS=false
51
        clearWorkDir();
53
        clearWorkDir();
52
        File workdir = getWorkDir();
54
        File workdir = getWorkDir();
53
        File modules = new File(workdir, "modules");
55
        File modules = new File(workdir, "modules");
Lines 71-77 Link Here
71
     */
73
     */
72
    public void testInstallMaskUser() throws Exception {
74
    public void testInstallMaskUser() throws Exception {
73
        // Ought to load these modules:
75
        // Ought to load these modules:
74
        TopManager.getDefault();
75
        ModuleManager mgr = NbTopManager.get().getModuleSystem().getManager();
76
        ModuleManager mgr = NbTopManager.get().getModuleSystem().getManager();
76
        mgr.mutexPrivileged().enterReadAccess();
77
        mgr.mutexPrivileged().enterReadAccess();
77
        try {
78
        try {
Lines 81-95 Link Here
81
            assertNotNull(usesandexportsapi);
82
            assertNotNull(usesandexportsapi);
82
            Module usesapidirectly = mgr.get("usesapidirectly");
83
            Module usesapidirectly = mgr.get("usesapidirectly");
83
            assertNotNull(usesapidirectly);
84
            assertNotNull(usesapidirectly);
85
            assertEquals("uses-api-directly.jar can be enabled", Collections.EMPTY_SET, usesapidirectly.getProblems());
84
            assertTrue(usesapidirectly.isEnabled());
86
            assertTrue(usesapidirectly.isEnabled());
85
            Module usesapitransitively = mgr.get("usesapitrans");
87
            Module usesapitransitively = mgr.get("usesapitrans");
86
            assertNotNull(usesapitransitively);
88
            assertNotNull(usesapitransitively);
89
            assertEquals("uses-api-transitively.jar can be enabled", Collections.EMPTY_SET, usesapitransitively.getProblems());
87
            assertTrue(usesapitransitively.isEnabled());
90
            assertTrue(usesapitransitively.isEnabled());
88
            Module usesapidirectlyold = mgr.get("usesapidirectlyold");
91
            Module usesapidirectlyold = mgr.get("usesapidirectlyold");
89
            assertNotNull(usesapidirectlyold);
92
            assertNotNull(usesapidirectlyold);
93
            assertEquals("uses-api-directly-old.jar can be enabled", Collections.EMPTY_SET, usesapidirectlyold.getProblems());
90
            assertTrue(usesapidirectlyold.isEnabled());
94
            assertTrue(usesapidirectlyold.isEnabled());
91
            Module usesapitransitivelyold = mgr.get("usesapitransold");
95
            Module usesapitransitivelyold = mgr.get("usesapitransold");
92
            assertNotNull(usesapitransitivelyold);
96
            assertNotNull(usesapitransitivelyold);
97
            assertEquals("uses-api-transitively-old.jar can be enabled", Collections.EMPTY_SET, usesapitransitivelyold.getProblems());
93
            assertTrue(usesapitransitivelyold.isEnabled());
98
            assertTrue(usesapitransitivelyold.isEnabled());
94
            usesapidirectly.getClassLoader().loadClass("usesapitrans.UsesDirectAPI").newInstance();
99
            usesapidirectly.getClassLoader().loadClass("usesapitrans.UsesDirectAPI").newInstance();
95
            usesapidirectly.getClassLoader().loadClass("usesapitrans.UsesIndirectAPI").newInstance();
100
            usesapidirectly.getClassLoader().loadClass("usesapitrans.UsesIndirectAPI").newInstance();
(-)core/test/unit/src/org/netbeans/core/modules/SetupHid.java (-2 / +2 lines)
Lines 18-26 Link Here
18
import java.io.*;
18
import java.io.*;
19
import java.util.*;
19
import java.util.*;
20
import java.beans.*;
20
import java.beans.*;
21
import org.openide.TopManager;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
23
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
22
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
23
import org.netbeans.core.NbTopManager;
24
24
25
/** Some infrastructure for module system tests.
25
/** Some infrastructure for module system tests.
26
 * @author Jesse Glick
26
 * @author Jesse Glick
Lines 85-91 Link Here
85
    }
85
    }
86
    
86
    
87
    protected static String slurp(String path) throws IOException {
87
    protected static String slurp(String path) throws IOException {
88
        TopManager.getDefault(); // #26451
88
        NbTopManager.get(); // #26451
89
        FileObject fo = Repository.getDefault().getDefaultFileSystem().findResource(path);
89
        FileObject fo = Repository.getDefault().getDefaultFileSystem().findResource(path);
90
        if (fo == null) return null;
90
        if (fo == null) return null;
91
        InputStream is = fo.getInputStream();
91
        InputStream is = fo.getInputStream();
(-)core/test/unit/src/org/netbeans/core/modules/jars/base-layer-mod.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: base.layer
2
OpenIDE-Module: base.layer
3
OpenIDE-Module-Layer: baselayer/layer.xml
3
OpenIDE-Module-Layer: baselayer/layer.xml
4
OpenIDE-Module-Name: Base Layer Module
4
OpenIDE-Module-Name: Base Layer Module
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
6
(-)core/test/unit/src/org/netbeans/core/modules/jars/override-layer-mod.mf (-1 / +1 lines)
Lines 3-7 Link Here
3
OpenIDE-Module-Layer: overridelayer/layer.xml
3
OpenIDE-Module-Layer: overridelayer/layer.xml
4
OpenIDE-Module-Name: Override Layer Module
4
OpenIDE-Module-Name: Override Layer Module
5
OpenIDE-Module-Module-Dependencies: base.layer
5
OpenIDE-Module-Module-Dependencies: base.layer
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
7
(-)core/test/unit/src/org/netbeans/core/modules/jars/uses-and-exports-api.mf (-1 / +1 lines)
Lines 2-6 Link Here
2
OpenIDE-Module: usesandexportsapi
2
OpenIDE-Module: usesandexportsapi
3
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.foo > 1.0
3
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.foo > 1.0
4
OpenIDE-Module-Public-Packages: usesapi.*
4
OpenIDE-Module-Public-Packages: usesapi.*
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.12
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
6
(-)core/test/unit/src/org/netbeans/core/projects/data/sfs-attr-test.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: sfs_attr_test
2
OpenIDE-Module: sfs_attr_test
3
OpenIDE-Module-Layer: sfs_attr_test/layer.xml
3
OpenIDE-Module-Layer: sfs_attr_test/layer.xml
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.4
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
5
(-)core/test/unit/src/org/netbeans/core/windows/BugFixTests.java (-7 / +6 lines)
Lines 17-23 Link Here
17
import org.netbeans.junit.*;
17
import org.netbeans.junit.*;
18
18
19
import org.openide.windows.*;
19
import org.openide.windows.*;
20
import org.openide.TopManager;
21
import javax.swing.SwingUtilities;
20
import javax.swing.SwingUtilities;
22
21
23
import org.netbeans.core.windows.frames.WindowTypesManager;
22
import org.netbeans.core.windows.frames.WindowTypesManager;
Lines 80-86 Link Here
80
        EventQueue.invokeLater(new Runnable () {
79
        EventQueue.invokeLater(new Runnable () {
81
            public void run () {
80
            public void run () {
82
                try {
81
                try {
83
                    WindowManager wm = TopManager.getDefault().getWindowManager();
82
                    WindowManager wm = WindowManager.getDefault();
84
                    Workspace editing = wm.findWorkspace("Editing");
83
                    Workspace editing = wm.findWorkspace("Editing");
85
                    Workspace running = wm.findWorkspace("Visual");
84
                    Workspace running = wm.findWorkspace("Visual");
86
                    editing.activate();
85
                    editing.activate();
Lines 92-98 Link Here
92
                    System.out.println("Test 15299 passed.");
91
                    System.out.println("Test 15299 passed.");
93
                } catch (Exception exc) {
92
                } catch (Exception exc) {
94
                    System.out.println("Test 15299 failed.");
93
                    System.out.println("Test 15299 failed.");
95
                    TopManager.getDefault().getErrorManager().notify(
94
                    ErrorManager.getDefault().notify(
96
                        ErrorManager.INFORMATIONAL, exc
95
                        ErrorManager.INFORMATIONAL, exc
97
                    );
96
                    );
98
                    fail(exc.toString());
97
                    fail(exc.toString());
Lines 126-132 Link Here
126
        CountNotifyComp innerPane = new CountNotifyComp();
125
        CountNotifyComp innerPane = new CountNotifyComp();
127
        DialogDescriptor dd = new DialogDescriptor(innerPane, "Test");
126
        DialogDescriptor dd = new DialogDescriptor(innerPane, "Test");
128
        dd.setModal(false);
127
        dd.setModal(false);
129
        Dialog dialog = TopManager.getDefault().createDialog(dd);
128
        Dialog dialog = org.openide.DialogDisplayer.getDefault().createDialog(dd);
130
        dialog.show();
129
        dialog.show();
131
        // set some properties, shouldn't result in remove/addNotify
130
        // set some properties, shouldn't result in remove/addNotify
132
        dd.setMessage(innerPane);
131
        dd.setMessage(innerPane);
Lines 151-157 Link Here
151
        SwingUtilities.invokeLater(new Runnable() {
150
        SwingUtilities.invokeLater(new Runnable() {
152
            public void run () {
151
            public void run () {
153
                try {
152
                try {
154
                    WindowManager wm = TopManager.getDefault().getWindowManager();
153
                    WindowManager wm = WindowManager.getDefault();
155
                    Workspace editing = wm.findWorkspace("Editing");
154
                    Workspace editing = wm.findWorkspace("Editing");
156
                    Workspace running = wm.createWorkspace("testworkspace");
155
                    Workspace running = wm.createWorkspace("testworkspace");
157
                    running.activate();
156
                    running.activate();
Lines 195-201 Link Here
195
    public void testBugfix_14585() {
194
    public void testBugfix_14585() {
196
        System.out.println("Bugfix test 14585 started.");
195
        System.out.println("Bugfix test 14585 started.");
197
        
196
        
198
        Workspace workspace = TopManager.getDefault().getWindowManager().getCurrentWorkspace();
197
        Workspace workspace = WindowManager.getDefault().getCurrentWorkspace();
199
        
198
        
200
        //opens the global property window
199
        //opens the global property window
201
        TopComponent c = org.netbeans.core.NbNodeOperation.Sheet.getDefault ();
200
        TopComponent c = org.netbeans.core.NbNodeOperation.Sheet.getDefault ();
Lines 265-271 Link Here
265
    /** Issue 20318 - checks if multiple setRelativeBounds calls on different
264
    /** Issue 20318 - checks if multiple setRelativeBounds calls on different
266
     * frame types doesn't corrupt bounds */
265
     * frame types doesn't corrupt bounds */
267
    public void testBugfix_20318 () throws Exception {
266
    public void testBugfix_20318 () throws Exception {
268
        WindowManager wm = TopManager.getDefault().getWindowManager();
267
        WindowManager wm = WindowManager.getDefault();
269
        Workspace editing = wm.findWorkspace("Editing");
268
        Workspace editing = wm.findWorkspace("Editing");
270
        ModeImpl mode = (ModeImpl)editing.createMode("TestMode20318", "Test Mode 20318", null);
269
        ModeImpl mode = (ModeImpl)editing.createMode("TestMode20318", "Test Mode 20318", null);
271
        mode.setFrameType(WindowTypesManager.TOP_FRAME);
270
        mode.setFrameType(WindowTypesManager.TOP_FRAME);
(-)core/test/unit/src/org/netbeans/core/windows/layers/ModeDataTest.java (-1 / +1 lines)
Lines 194-200 Link Here
194
    public void testExplorerWrite () throws Exception {
194
    public void testExplorerWrite () throws Exception {
195
        log("Simple write test, writes content of explorer mode.");
195
        log("Simple write test, writes content of explorer mode.");
196
        
196
        
197
        Workspace w = TopManager.getDefault().getWindowManager().findWorkspace("Editing");
197
        Workspace w = WindowManager.getDefault().findWorkspace("Editing");
198
        ModeImpl mi = (ModeImpl) w.findMode("properties");
198
        ModeImpl mi = (ModeImpl) w.findMode("properties");
199
        if (mi == null) {
199
        if (mi == null) {
200
            fail ("Mode properties doesn't exist.");
200
            fail ("Mode properties doesn't exist.");
(-)core/ui/manifest.mf (-1 / +1 lines)
Lines 2-8 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/ui/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/ui/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.windows/1 > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core.windows/1 > 1.0
7
OpenIDE-Module-Layer: org/netbeans/core/ui/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/core/ui/resources/layer.xml
8
8
(-)core/ui/src/org/netbeans/core/ui/resources/layer.xml (-4 lines)
Lines 514-523 Link Here
514
                        <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
514
                        <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
515
                    </file>
515
                    </file>
516
516
517
                    <!--file name="org-openide-src-nodes-SourceOptions.shadow">
518
                        <attr name="originalFile" stringvalue="Services/org-openide-src-nodes-SourceOptions.settings"/>
519
                    </file -->
520
521
                    <file name="Menu.instance">
517
                    <file name="Menu.instance">
522
                        <attr name="instanceCreate" newvalue="org.netbeans.core.MenuFolderNode" />
518
                        <attr name="instanceCreate" newvalue="org.netbeans.core.MenuFolderNode" />
523
                        <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
519
                        <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
(-)core/windows/manifest.mf (-1 / +1 lines)
Lines 2-8 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/windows/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/windows/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0
7
OpenIDE-Module-Layer: org/netbeans/core/windows/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/core/windows/resources/layer.xml
8
8
(-)debuggercore/build.xml (-3 / +3 lines)
Lines 44-52 Link Here
44
      <classpath>
44
      <classpath>
45
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
45
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
46
        <pathelement location="${jdkhome}/lib/tools.jar"/>
46
        <pathelement location="${jdkhome}/lib/tools.jar"/>
47
        <fileset dir="../openide/netbeans/lib">
47
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
48
          <include name="openide*.jar" />
48
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
49
        </fileset>
49
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
50
      </classpath>
50
      </classpath>
51
    </javac>
51
    </javac>
52
  </target>
52
  </target>
(-)debuggercore/manifest.mf (-2 / +4 lines)
Lines 2-9 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/debugger/multisession/EnterpriseModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/debugger/multisession/EnterpriseModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/resources/mf-layer.xml
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Specification-Version: 2.4
6
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0, org.openide.src > 1.0
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Specification-Version: 2.5
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
10
9
Name: org/netbeans/modules/debugger/support/nodes/DebuggerNode.class
11
Name: org/netbeans/modules/debugger/support/nodes/DebuggerNode.class
(-)debuggerjpda/build.xml (-3 / +3 lines)
Lines 62-70 Link Here
62
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
62
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
63
        <!-- Hopefully set up bu nbbuild/build.xml: -->
63
        <!-- Hopefully set up bu nbbuild/build.xml: -->
64
        <pathelement location="${jdkhome}/lib/tools.jar"/>
64
        <pathelement location="${jdkhome}/lib/tools.jar"/>
65
        <fileset dir="../openide/netbeans/lib">
65
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
66
          <include name="openide*.jar" />
66
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
67
        </fileset>
67
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
68
	<pathelement location="../debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
68
	<pathelement location="../debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
69
      </classpath>
69
      </classpath>
70
    </javac>
70
    </javac>
(-)debuggerjpda/manifest.mf (-3 / +4 lines)
Lines 2-10 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/jpda/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/debugger/jpda/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/debugger/jpda/JPDADebuggerModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/debugger/jpda/JPDADebuggerModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/jpda/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/jpda/resources/mf-layer.xml
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.26
5
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.core/3 > 2.3, org.openide.deprecated > 1.0, org.openide.src > 1.0
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.core/3 > 2.3
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Specification-Version: 1.12
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Specification-Version: 1.13
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Package-Dependencies: com.sun.jdi[VirtualMachineManager]
10
OpenIDE-Module-Package-Dependencies: com.sun.jdi[VirtualMachineManager]
10
11
(-)diff/build.xml (-3 / +2 lines)
Lines 37-45 Link Here
37
      <classpath>
37
      <classpath>
38
        <pathelement location="../editor/netbeans/modules/ext/nb-editor.jar"/>
38
        <pathelement location="../editor/netbeans/modules/ext/nb-editor.jar"/>
39
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
39
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
40
        <fileset dir="${nbroot}/openide/netbeans/lib">
40
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
41
          <include name="openide*.jar" />
41
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
42
        </fileset>
43
        <fileset dir="${nbroot}/core/external">
42
        <fileset dir="${nbroot}/core/external">
44
          <include name="regexp*.jar"/>
43
          <include name="regexp*.jar"/>
45
        </fileset>
44
        </fileset>
(-)diff/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.diff/1
1
OpenIDE-Module: org.netbeans.modules.diff/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/diff/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/diff/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.5
3
OpenIDE-Module-Specification-Version: 1.6
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/netbeans/modules/diff/mf-layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/diff/mf-layer.xml
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.editor/1 > 1.7, org.openide.deprecated > 1.0
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.editor/1 > 1.7
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
10
10
Name: org/netbeans/modules/diff/DiffAction.class
11
Name: org/netbeans/modules/diff/DiffAction.class
(-)editor/build.xml (-3 / +3 lines)
Lines 30-38 Link Here
30
       <pathelement location="../core/netbeans/lib/core.jar"/>
30
       <pathelement location="../core/netbeans/lib/core.jar"/>
31
       <pathelement location="libsrc"/>
31
       <pathelement location="libsrc"/>
32
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
32
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
33
        <fileset dir="../openide/netbeans/lib">
33
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
34
          <include name="openide*.jar" />
34
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
35
        </fileset>
35
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
36
        <fileset dir="../core/external">
36
        <fileset dir="../core/external">
37
          <include name="regexp*.jar"/>
37
          <include name="regexp*.jar"/>
38
          <include name="xml-apis*.jar"/>
38
          <include name="xml-apis*.jar"/>
(-)editor/manifest.mf (-3 / +4 lines)
Lines 1-11 Link Here
1
OpenIDE-Module: org.netbeans.modules.editor/1
1
OpenIDE-Module: org.netbeans.modules.editor/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/editor/EditorModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/editor/EditorModule.class
4
OpenIDE-Module-Specification-Version: 1.11
4
OpenIDE-Module-Specification-Version: 1.12
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Layer: org/netbeans/modules/editor/resources/layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/editor/resources/layer.xml
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0
8
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.0, org.openide.deprecated > 1.0, org.openide.src > 1.0
9
OpenIDE-Module-Requires: org.openide.TopManager
9
Class-Path: ext/nb-editor.jar
10
Class-Path: ext/nb-editor.jar
10
11
11
Name: org/netbeans/modules/editor/java/JCUpdateAction.class
12
Name: org/netbeans/modules/editor/java/JCUpdateAction.class
(-)extbrowser/build.xml (-3 / +2 lines)
Lines 29-37 Link Here
29
      <classpath>
29
      <classpath>
30
        <!--<pathelement location="patches"/>-->
30
        <!--<pathelement location="patches"/>-->
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
32
        <fileset dir="../openide/netbeans/lib">
32
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
33
          <include name="openide*.jar" />
33
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
34
        </fileset>
35
      </classpath>
34
      </classpath>
36
    </javac>
35
    </javac>
37
  </target>
36
  </target>
(-)extbrowser/manifest.mf (-2 / +4 lines)
Lines 1-7 Link Here
1
OpenIDE-Module: org.netbeans.modules.extbrowser/1
1
OpenIDE-Module: org.netbeans.modules.extbrowser/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/extbrowser/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/extbrowser/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/extbrowser/resources/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/extbrowser/resources/layer.xml
4
OpenIDE-Module-Specification-Version: 0.6
4
OpenIDE-Module-Specification-Version: 0.7
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
7
9
(-)form/build.xml (-3 / +3 lines)
Lines 31-39 Link Here
31
        <!-- XXX illegally uses org.netbeans.beaninfo classes: -->
31
        <!-- XXX illegally uses org.netbeans.beaninfo classes: -->
32
        <pathelement location="../core/netbeans/lib/core.jar"/>
32
        <pathelement location="../core/netbeans/lib/core.jar"/>
33
        <pathelement location="release/modules/ext/AbsoluteLayout.jar"/>
33
        <pathelement location="release/modules/ext/AbsoluteLayout.jar"/>
34
        <fileset dir="../openide/netbeans/lib">
34
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
35
          <include name="openide*.jar" />
35
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
36
        </fileset>
36
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
37
        <pathelement location="../java/netbeans/modules/java.jar"/>
37
        <pathelement location="../java/netbeans/modules/java.jar"/>
38
        <fileset dir="../core/external">
38
        <fileset dir="../core/external">
39
          <include name="xml-apis*.jar" />
39
          <include name="xml-apis*.jar" />
(-)form/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.form/2
1
OpenIDE-Module: org.netbeans.modules.form/2
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/form/Bundle2.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/form/Bundle2.properties
3
OpenIDE-Module-Specification-Version: 1.9
3
OpenIDE-Module-Specification-Version: 1.10
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Install: org/netbeans/modules/form/FormEditorModule.class
5
OpenIDE-Module-Install: org/netbeans/modules/form/FormEditorModule.class
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.5
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1, org.netbeans.core/1 > 1.0, org.openide.deprecated > 1.0, org.openide.src > 1.0
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1, org.netbeans.core/1 > 1.0
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Layer: org/netbeans/modules/form/resources/layer.xml
9
OpenIDE-Module-Layer: org/netbeans/modules/form/resources/layer.xml
9
Class-Path: ext/AbsoluteLayout.jar
10
Class-Path: ext/AbsoluteLayout.jar
10
11
(-)html/build.xml (-3 / +2 lines)
Lines 28-36 Link Here
28
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
29
      <classpath>
29
      <classpath>
30
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
31
        <fileset dir="../openide/netbeans/lib">
31
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
32
          <include name="openide*.jar" />
32
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
33
        </fileset>
34
      </classpath>
33
      </classpath>
35
    </javac>
34
    </javac>
36
  </target>
35
  </target>
(-)html/manifest.mf (-2 / +4 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.html/1
1
OpenIDE-Module: org.netbeans.modules.html/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/html/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/html/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/html/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/html/mf-layer.xml
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
6
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Specification-Version: 1.11
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
9
8
Name: org/netbeans/modules/html/HtmlLoader.class
10
Name: org/netbeans/modules/html/HtmlLoader.class
(-)httpserver/build.xml (-3 / +2 lines)
Lines 27-35 Link Here
27
    <ant dir="external" target="unscramble"/>
27
    <ant dir="external" target="unscramble"/>
28
    <path id="httpserver-cp">
28
    <path id="httpserver-cp">
29
      <pathelement location="../openide/openide-13javac-workaround.jar"/>
29
      <pathelement location="../openide/openide-13javac-workaround.jar"/>
30
      <fileset dir="../openide/netbeans/lib">
30
      <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
        <include name="openide*.jar" />
31
      <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
      </fileset>
33
      <fileset dir="external">
32
      <fileset dir="external">
34
        <include name="webserver*.jar"/>
33
        <include name="webserver*.jar"/>
35
        <include name="servlet-2.2.jar"/>
34
        <include name="servlet-2.2.jar"/>
(-)httpserver/manifest.mf (-3 / +4 lines)
Lines 2-12 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/httpserver/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/httpserver/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/httpserver/HttpServerModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/httpserver/HttpServerModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/httpserver/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/httpserver/layer.xml
5
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Specification-Version: 1.11
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Provides: org.openide.util.HttpServer$Impl
7
OpenIDE-Module-Provides: org.openide.util.HttpServer$Impl
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.servletapi/1, org.openide.deprecated > 1.0
9
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.servletapi/1
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
10
OpenIDE-Module-Requires: org.openide.TopManager
10
OpenIDE-Module-Package-Dependencies: [org.apache.tomcat.core.Context]
11
OpenIDE-Module-Package-Dependencies: [org.apache.tomcat.core.Context]
11
Class-Path: ext/webserver.jar
12
Class-Path: ext/webserver.jar
12
13
(-)i18n/build.xml (-6 / +5 lines)
Lines 29-37 Link Here
29
      <exclude name="org/netbeans/modules/i18n/form/"/>
29
      <exclude name="org/netbeans/modules/i18n/form/"/>
30
      <classpath>
30
      <classpath>
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
32
        <fileset dir="../openide/netbeans/lib">
32
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
33
          <include name="openide*.jar" />
33
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
34
        </fileset>
34
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
35
        <pathelement location="../core/netbeans/lib/core.jar"/>
35
        <pathelement location="../core/netbeans/lib/core.jar"/>
36
        <pathelement location="../properties/netbeans/modules/properties.jar"/>
36
        <pathelement location="../properties/netbeans/modules/properties.jar"/>
37
        <fileset dir="../core/external">
37
        <fileset dir="../core/external">
Lines 43-51 Link Here
43
      <include name="org/netbeans/modules/i18n/form/"/>
43
      <include name="org/netbeans/modules/i18n/form/"/>
44
      <classpath>
44
      <classpath>
45
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
45
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
46
        <fileset dir="../openide/netbeans/lib">
46
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
47
          <include name="openide*.jar" />
47
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
48
        </fileset>
49
        <pathelement location="../properties/netbeans/modules/properties.jar"/>
48
        <pathelement location="../properties/netbeans/modules/properties.jar"/>
50
        <pathelement location="../form/netbeans/modules/form.jar"/>
49
        <pathelement location="../form/netbeans/modules/form.jar"/>
51
        <pathelement location="../java/netbeans/modules/java.jar"/>
50
        <pathelement location="../java/netbeans/modules/java.jar"/>
(-)i18n/manifest-form.mf (-3 / +5 lines)
Lines 1-11 Link Here
1
OpenIDE-Module: org.netbeans.modules.i18n.form/2
1
OpenIDE-Module: org.netbeans.modules.i18n.form/2
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/i18n/form/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/i18n/form/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.10
3
OpenIDE-Module-Specification-Version: 1.11
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/netbeans/modules/i18n/form/I18nFormLayer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/i18n/form/I18nFormLayer.xml
6
OpenIDE-Module-Install: org/netbeans/modules/i18n/form/I18nFormCrossModule.class
6
OpenIDE-Module-Install: org/netbeans/modules/i18n/form/I18nFormCrossModule.class
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: 
8
OpenIDE-Module-Module-Dependencies: 
9
 org.netbeans.modules.i18n/1 > 1.9, 
9
 org.netbeans.modules.i18n/1 > 1.9, 
10
 org.netbeans.modules.form/2 > 1.5
10
 org.netbeans.modules.form/2 > 1.5,
11
 org.openide.deprecated > 1.0
12
OpenIDE-Module-Requires: org.openide.TopManager
11
13
(-)i18n/manifest.mf (-3 / +5 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.i18n/1
1
OpenIDE-Module: org.netbeans.modules.i18n/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/i18n/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/i18n/Bundle.properties
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
4
OpenIDE-Module-Module-Dependencies: 
4
OpenIDE-Module-Module-Dependencies: 
5
 org.netbeans.modules.properties/1, 
5
 org.netbeans.modules.properties/1, 
6
 org.netbeans.core/1 > 1.0
6
 org.netbeans.core/1 > 1.0,
7
OpenIDE-Module-Specification-Version: 1.11
7
 org.openide.deprecated > 1.0, org.openide.src > 1.0
8
OpenIDE-Module-Requires: org.openide.TopManager
9
OpenIDE-Module-Specification-Version: 1.12
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
10
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Layer: org/netbeans/modules/i18n/Layer.xml
11
OpenIDE-Module-Layer: org/netbeans/modules/i18n/Layer.xml
10
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
12
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
(-)image/build.xml (-3 / +2 lines)
Lines 27-35 Link Here
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
      <classpath>
28
      <classpath>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
        <fileset dir="../openide/netbeans/lib">
30
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
          <include name="openide*.jar" />
31
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
        </fileset>
33
      </classpath>
32
      </classpath>
34
    </javac>
33
    </javac>
35
  </target>
34
  </target>
(-)image/manifest.mf (-2 / +4 lines)
Lines 1-7 Link Here
1
OpenIDE-Module: org.netbeans.modules.image/1
1
OpenIDE-Module: org.netbeans.modules.image/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/image/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/image/Bundle.properties
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
4
OpenIDE-Module-Specification-Version: 1.9
4
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
5
OpenIDE-Module-Requires: org.openide.TopManager
6
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Layer: org/netbeans/modules/image/Layer.xml
8
OpenIDE-Module-Layer: org/netbeans/modules/image/Layer.xml
7
9
(-)j2eeserver/build.xml (-3 / +3 lines)
Lines 163-171 Link Here
163
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" excludes="org/netbeans/modules/j2ee/deployment/model/**,org/netbeans/modules/j2ee/deployment/support/**">
163
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" excludes="org/netbeans/modules/j2ee/deployment/model/**,org/netbeans/modules/j2ee/deployment/support/**">
164
      <classpath>
164
      <classpath>
165
        <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
165
        <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
166
        <fileset dir="${nbroot}/openide/netbeans/lib">
166
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
167
                <include name="openide*.jar"/>
167
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
168
        </fileset>
168
        <pathelement location="${nbroot}/java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
169
        <pathelement location="${jdkhome}/lib/tools.jar"/>
169
        <pathelement location="${jdkhome}/lib/tools.jar"/>
170
        <!-- orion_ea requires logger !!!
170
        <!-- orion_ea requires logger !!!
171
        <pathelement location="${nbroot}/logger/netbeans/lib/ext/logger.jar"/>
171
        <pathelement location="${nbroot}/logger/netbeans/lib/ext/logger.jar"/>
(-)j2eeserver/manifest.mf (-3 / +4 lines)
Lines 1-12 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.j2eeserver/2
2
OpenIDE-Module: org.netbeans.modules.j2eeserver/2
3
OpenIDE-Module-Install: org/netbeans/modules/j2ee/IntegrationModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/j2ee/IntegrationModule.class
4
OpenIDE-Module-Specification-Version: 1.5
4
OpenIDE-Module-Specification-Version: 1.6
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.jpda/1
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.debugger.core/3, org.netbeans.modules.debugger.jpda/1, org.openide.deprecated > 1.0, org.openide.src > 1.0
7
OpenIDE-Module-Layer: org/netbeans/modules/j2ee/impl/layer.xml
9
OpenIDE-Module-Layer: org/netbeans/modules/j2ee/impl/layer.xml
8
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/impl/Bundle.properties
10
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/impl/Bundle.properties
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
10
11
11
Name: org/netbeans/modules/j2ee/ui/ServerRegistryNode.class
12
Name: org/netbeans/modules/j2ee/ui/ServerRegistryNode.class
12
OpenIDE-Module-Class: Node
13
OpenIDE-Module-Class: Node
(-)jarpackager/build.xml (-3 / +3 lines)
Lines 26-34 Link Here
26
  <target name="init">
26
  <target name="init">
27
    <path id="jarpackager-cp">
27
    <path id="jarpackager-cp">
28
      <pathelement location="../openide/openide-13javac-workaround.jar" />
28
      <pathelement location="../openide/openide-13javac-workaround.jar" />
29
      <fileset dir="../openide/netbeans/lib">
29
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
30
        <include name="openide*.jar" />
30
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
31
      </fileset>
31
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
32
      <fileset dir="../core/external">
32
      <fileset dir="../core/external">
33
        <include name="regexp*.jar"/>
33
        <include name="regexp*.jar"/>
34
      </fileset>
34
      </fileset>
(-)jarpackager/manifest.mf (-2 / +4 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.jarpackager/2
1
OpenIDE-Module: org.netbeans.modules.jarpackager/2
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jarpackager/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jarpackager/Bundle.properties
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.5
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
4
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0, org.openide.src > 1.0
5
OpenIDE-Module-Requires: org.openide.TopManager
4
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
6
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
5
OpenIDE-Module-Specification-Version: 1.11
7
OpenIDE-Module-Specification-Version: 1.12
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Layer: org/netbeans/modules/jarpackager/resources/mf-layer.xml
9
OpenIDE-Module-Layer: org/netbeans/modules/jarpackager/resources/mf-layer.xml
8
10
(-)java/build.xml (-3 / +5 lines)
Lines 42-47 Link Here
42
      <pathelement location="../classfile/netbeans/modules/autoload/classfile.jar"/>
42
      <pathelement location="../classfile/netbeans/modules/autoload/classfile.jar"/>
43
      <!-- Java API -->
43
      <!-- Java API -->
44
      <pathelement location="api/netbeans/modules/autoload/java-api.jar"/>
44
      <pathelement location="api/netbeans/modules/autoload/java-api.jar"/>
45
      <pathelement location="srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
46
      <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
45
    </path>
47
    </path>
46
  </target>
48
  </target>
47
49
Lines 93-103 Link Here
93
    </copy>
95
    </copy>
94
  </target>
96
  </target>
95
97
96
  <target name="netbeans" depends="jars,release">
98
  <target name="netbeans" depends="jars,release" description="Build everything.">
97
    <genlist targetname="nbm" outputfiledir="../nbbuild/netbeans"/>
99
    <genlist targetname="nbm" outputfiledir="../nbbuild/netbeans"/>
98
  </target>
100
  </target>
99
101
100
  <target name="nbm" depends="netbeans">
102
  <target name="nbm" depends="netbeans" description="Build NBM.">
101
    <makenbm file="java.nbm"
103
    <makenbm file="java.nbm"
102
             topdir="."
104
             topdir="."
103
             module="netbeans/modules/java.jar"
105
             module="netbeans/modules/java.jar"
Lines 123-129 Link Here
123
    <delete dir="javadoc"/>
125
    <delete dir="javadoc"/>
124
  </target>
126
  </target>
125
127
126
  <target name="clean">
128
  <target name="clean" description="Clean build products.">
127
    <delete>
129
    <delete>
128
      <fileset dir="src">
130
      <fileset dir="src">
129
        <include name="**/*.class"/>
131
        <include name="**/*.class"/>
(-)java/manifest.mf (-1 / +2 lines)
Lines 3-9 Link Here
3
OpenIDE-Module-Install: org/netbeans/modules/java/JavaModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/java/JavaModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/java/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/java/resources/mf-layer.xml
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.12
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.12
6
OpenIDE-Module-Module-Dependencies: org.netbeans.api.java/1,org.netbeans.modules.classfile/1
6
OpenIDE-Module-Module-Dependencies: org.netbeans.api.java/1,org.netbeans.modules.classfile/1, org.openide.src > 1.0, org.openide.deprecated > 1.0
7
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Specification-Version: 1.12
8
OpenIDE-Module-Specification-Version: 1.12
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Package-Dependencies: [org.netbeans.modules.java.gj.JavaCompilerType], [org.netbeans.lib.javac.Main], org.apache.regexp[RE], [com.sun.tools.javamake.Main]
10
OpenIDE-Module-Package-Dependencies: [org.netbeans.modules.java.gj.JavaCompilerType], [org.netbeans.lib.javac.Main], org.apache.regexp[RE], [com.sun.tools.javamake.Main]
(-)java/src/org/netbeans/modules/java/resources/mf-layer.xml (-1 / +1 lines)
Lines 238-244 Link Here
238
        <attr name="SystemFileSystem.localizingBundle"
238
        <attr name="SystemFileSystem.localizingBundle"
239
            stringvalue="org.netbeans.modules.java.Bundle"/>
239
            stringvalue="org.netbeans.modules.java.Bundle"/>
240
        <attr name="SystemFileSystem.icon"
240
        <attr name="SystemFileSystem.icon"
241
            urlvalue="nbresloc:/org/openide/resources/src/class.gif"/>
241
            urlvalue="nbresloc:/org/openide/src/resources/class.gif"/>
242
        <attr name="helpID"
242
        <attr name="helpID"
243
            stringvalue="org.netbeans.modules.java.Filesystem.libraries"/>
243
            stringvalue="org.netbeans.modules.java.Filesystem.libraries"/>
244
        <!-- Dirty example/testcase how to "automount" a JAR 
244
        <!-- Dirty example/testcase how to "automount" a JAR 
(-)java/src/org/netbeans/modules/java/tools/ElementRenderer.java (-5 / +5 lines)
Lines 40-51 Link Here
40
    static {
40
    static {
41
        elementIcons = new ImageIcon[8];
41
        elementIcons = new ImageIcon[8];
42
        
42
        
43
        elementIcons[ METHOD_BASE + PUBLIC_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/resources/src/methodPublic.gif") ); // NOI18N
43
        elementIcons[ METHOD_BASE + PUBLIC_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/src/resources/methodPublic.gif") ); // NOI18N
44
        elementIcons[ METHOD_BASE + PROTECTED_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/resources/src/methodProtected.gif") ); // NOI18N
44
        elementIcons[ METHOD_BASE + PROTECTED_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/src/resources/methodProtected.gif") ); // NOI18N
45
        elementIcons[ METHOD_BASE + PRIVATE_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/resources/src/methodPrivate.gif") ); // NOI18N
45
        elementIcons[ METHOD_BASE + PRIVATE_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/src/resources/methodPrivate.gif") ); // NOI18N
46
        elementIcons[ METHOD_BASE + PACKAGE_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/resources/src/methodPackage.gif") ); // NOI18N
46
        elementIcons[ METHOD_BASE + PACKAGE_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/src/resources/methodPackage.gif") ); // NOI18N
47
        
47
        
48
        elementIcons[ CLASS_BASE + PUBLIC_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/resources/src/class.gif") ); // NOI18N
48
        elementIcons[ CLASS_BASE + PUBLIC_OFFSET ] = new ImageIcon (Utilities.loadImage ("org/openide/src/resources/class.gif") ); // NOI18N
49
	// No special icons for diffent access type for classes.
49
	// No special icons for diffent access type for classes.
50
        elementIcons[ CLASS_BASE + PROTECTED_OFFSET ] = elementIcons[ CLASS_BASE + PUBLIC_OFFSET ];
50
        elementIcons[ CLASS_BASE + PROTECTED_OFFSET ] = elementIcons[ CLASS_BASE + PUBLIC_OFFSET ];
51
        elementIcons[ CLASS_BASE + PRIVATE_OFFSET ] = elementIcons[ CLASS_BASE + PUBLIC_OFFSET ];
51
        elementIcons[ CLASS_BASE + PRIVATE_OFFSET ] = elementIcons[ CLASS_BASE + PUBLIC_OFFSET ];
(-)javacvs/build.xml (-3 / +2 lines)
Lines 32-40 Link Here
32
          <include name="regexp*.jar"/>
32
          <include name="regexp*.jar"/>
33
        </fileset>
33
        </fileset>
34
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
34
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
35
        <fileset dir="../openide/netbeans/lib">
35
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
36
          <include name="openide*.jar"/>
36
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
37
        </fileset>
38
      </classpath>
37
      </classpath>
39
    </javac>
38
    </javac>
40
    </target>
39
    </target>
(-)javacvs/manifest.mf (-2 / +3 lines)
Lines 4-10 Link Here
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/netbeans/modules/cvsclient/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/cvsclient/layer.xml
6
OpenIDE-Module-Install: org/netbeans/modules/cvsclient/JavaCvsModuleInstall.class
6
OpenIDE-Module-Install: org/netbeans/modules/cvsclient/JavaCvsModuleInstall.class
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.5
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.diff/1
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.diff/1, org.openide.deprecated > 1.0
9
OpenIDE-Module-Requires: org.openide.TopManager
9
Class-Path: ext/cvslib.jar
10
Class-Path: ext/cvslib.jar
10
11
(-)javadoc/build.xml (-3 / +3 lines)
Lines 27-35 Link Here
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
      <classpath>
28
      <classpath>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
        <fileset dir="../openide/netbeans/lib">
30
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
          <include name="openide*.jar" />
31
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
        </fileset>
32
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
33
	<fileset dir="../core/external">
33
	<fileset dir="../core/external">
34
	    <include name="regexp*.jar"/>
34
	    <include name="regexp*.jar"/>
35
	</fileset>
35
	</fileset>
(-)javadoc/manifest.mf (-3 / +4 lines)
Lines 2-12 Link Here
2
OpenIDE-Module: org.netbeans.modules.javadoc/1
2
OpenIDE-Module: org.netbeans.modules.javadoc/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javadoc/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javadoc/Bundle.properties
4
OpenIDE-Module-Layer: org/netbeans/modules/javadoc/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/javadoc/resources/mf-layer.xml
5
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.7
5
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.7, org.openide.deprecated > 1.0, org.openide.src > 1.0
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Requires: org.openide.TopManager
6
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
7
OpenIDE-Module-Specification-Version: 1.9
9
OpenIDE-Module-Specification-Version: 1.10
8
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
10
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.12
10
11
11
Name: org/netbeans/modules/javadoc/GenerateDocAction.class
12
Name: org/netbeans/modules/javadoc/GenerateDocAction.class
12
OpenIDE-Module-Class: Action
13
OpenIDE-Module-Class: Action
(-)jndi/build.xml (-4 / +2 lines)
Lines 36-45 Link Here
36
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
36
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
37
      <classpath>        
37
      <classpath>        
38
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
38
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
39
        <!--<pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>-->
39
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
40
        <fileset dir="${nbroot}/openide/netbeans/lib">
40
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
41
          <include name="openide*.jar" />
42
        </fileset>
43
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
41
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
44
      </classpath>
42
      </classpath>
45
    </javac>
43
    </javac>
(-)jndi/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.jndi/1
1
OpenIDE-Module: org.netbeans.modules.jndi/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jndi/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jndi/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/jndi/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/jndi/resources/mf-layer.xml
4
OpenIDE-Module-Specification-Version: 1.6
4
OpenIDE-Module-Specification-Version: 1.7
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help
6
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help, org.openide.TopManager
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
8
OpenIDE-Module-Package-Dependencies: javax.naming[Context]
9
OpenIDE-Module-Package-Dependencies: javax.naming[Context]
9
Class-Path: docs/jndi.jar
10
Class-Path: docs/jndi.jar
10
11
(-)junit/build.xml (+3 lines)
Lines 92-97 Link Here
92
        <fileset dir="../openide/netbeans/lib">
92
        <fileset dir="../openide/netbeans/lib">
93
          <include name="openide*.jar" />
93
          <include name="openide*.jar" />
94
        </fileset>
94
        </fileset>
95
        <!-- XXX -->
96
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/>
97
        <pathelement location="../java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
95
        <fileset dir="external">
98
        <fileset dir="external">
96
          <include name="junit*.jar"/>
99
          <include name="junit*.jar"/>
97
        </fileset>
100
        </fileset>
(-)junit/src/org/netbeans/junit/NbTestRunner.java (-3 / +22 lines)
Lines 18-30 Link Here
18
18
19
package org.netbeans.junit;
19
package org.netbeans.junit;
20
20
21
import org.openide.TopManager;
22
23
import junit.framework.*;
21
import junit.framework.*;
24
import junit.runner.*;
22
import junit.runner.*;
25
23
26
import java.util.*;
24
import java.util.*;
27
import java.io.*;
25
import java.io.*;
26
import java.security.*;
27
28
import org.openide.execution.NbClassLoader;
28
29
29
/**
30
/**
30
 *
31
 *
Lines 146-152 Link Here
146
        public Class load(String suiteClassName) throws ClassNotFoundException {
147
        public Class load(String suiteClassName) throws ClassNotFoundException {
147
            Class clazz;
148
            Class clazz;
148
            if (null != System.getProperty("netbeans.home")) {
149
            if (null != System.getProperty("netbeans.home")) {
149
                clazz = TopManager.getDefault().currentClassLoader().loadClass(suiteClassName);
150
                clazz = new NbLoader().loadClass(suiteClassName);
150
            }
151
            }
151
            else {
152
            else {
152
                clazz = Class.forName(suiteClassName);
153
                clazz = Class.forName(suiteClassName);
Lines 313-316 Link Here
313
        println("\tErrors:       " + result.errorCount());
314
        println("\tErrors:       " + result.errorCount());
314
        println("\tElapsed time: " + elapsedTimeAsString(time));
315
        println("\tElapsed time: " + elapsedTimeAsString(time));
315
    }
316
    }
317
318
    /** Adaptation of old org.netbeans.core.ClassLoaderSupport (= currentClassLoader).
319
     * @deprecated this will be broken by Projects, Classpath API
320
     */
321
    public static class NbLoader extends NbClassLoader {
322
        public NbLoader() {
323
            setDefaultPermissions(getAllPermissions());
324
        }
325
        private static PermissionCollection allPermission;
326
        static synchronized PermissionCollection getAllPermissions() {
327
            if (allPermission == null) {
328
                allPermission = new Permissions();
329
                allPermission.add(new AllPermission());
330
            }
331
            return allPermission;
332
        }
333
    }
334
316
}
335
}
(-)nbbuild/build.properties (+6 lines)
Lines 35-42 Link Here
35
# root of the source tree, separated by commas.
35
# root of the source tree, separated by commas.
36
moduleconfig=stable
36
moduleconfig=stable
37
37
38
# XXX remove */deprecated when autoupdate no longer requires them
38
config.fixedmodules.platform=core, \
39
config.fixedmodules.platform=core, \
39
        openide, \
40
        openide, \
41
        openide/deprecated, \
42
        core/deprecated, \
40
        core/ui, \
43
        core/ui, \
41
        core/windows
44
        core/windows
42
config.modules.platform=autoupdate, \
45
config.modules.platform=autoupdate, \
Lines 44-49 Link Here
44
47
45
config.fixedmodules.superslim=core, \
48
config.fixedmodules.superslim=core, \
46
        openide, \
49
        openide, \
50
        openide/deprecated, \
51
        core/deprecated, \
52
        java/srcmodel, \
47
        core/javahelp, \
53
        core/javahelp, \
48
        core/compiler, \
54
        core/compiler, \
49
        core/execution, \
55
        core/execution, \
(-)nbbuild/build.xml (-50 / +62 lines)
Lines 133-147 Link Here
133
    <echo message="Building Open APIs..."/>
133
    <echo message="Building Open APIs..."/>
134
    <ant dir="../openide" target="netbeans"/>
134
    <ant dir="../openide" target="netbeans"/>
135
  </target>
135
  </target>
136
  <target name="all-core" depends="all-openide">
136
  <target name="all-openide/deprecated" depends="all-openide,all-java/srcmodel">
137
    <echo message="Building openide/deprecated..."/>
138
    <ant dir="../openide/deprecated" target="netbeans"/>
139
  </target>
140
  <target name="all-core/deprecated" depends="all-openide/deprecated,all-core">
141
    <echo message="Building core/deprecated..."/>
142
    <ant dir="../core/deprecated" target="netbeans"/>
143
  </target>
144
  <target name="all-java/srcmodel" depends="all-openide">
145
    <echo message="Building java/srcmodel..."/>
146
    <ant dir="../java/srcmodel" target="netbeans"/>
147
  </target>
148
  <target name="all-core" depends="all-openide,all-openide/deprecated">
137
    <echo message="Building IDE core implementation..."/>
149
    <echo message="Building IDE core implementation..."/>
138
    <ant dir="../core" target="netbeans"/>
150
    <ant dir="../core" target="netbeans"/>
139
  </target>
151
  </target>
140
  <target name="all-core/javahelp" depends="all-openide">
152
  <target name="all-core/javahelp" depends="all-openide,all-openide/deprecated">
141
    <echo message="Building module core/javahelp..."/>
153
    <echo message="Building module core/javahelp..."/>
142
    <ant dir="../core/javahelp" target="netbeans"/>
154
    <ant dir="../core/javahelp" target="netbeans"/>
143
  </target>
155
  </target>
144
  <target name="all-core/compiler" depends="all-openide,all-core">
156
  <target name="all-core/compiler" depends="all-openide,all-core,all-openide/deprecated">
145
    <echo message="Building module core/compiler..."/>
157
    <echo message="Building module core/compiler..."/>
146
    <ant dir="../core/compiler" target="netbeans"/>
158
    <ant dir="../core/compiler" target="netbeans"/>
147
  </target>
159
  </target>
Lines 171-177 Link Here
171
  </target>
183
  </target>
172
184
173
  <!-- And the modules: -->
185
  <!-- And the modules: -->
174
  <target name="all-ant" depends="all-openide,all-core/javahelp">
186
  <target name="all-ant" depends="all-openide,all-core/javahelp,all-openide/deprecated">
175
    <echo message="Building module ant..."/>
187
    <echo message="Building module ant..."/>
176
    <ant dir="../ant" target="netbeans"/>
188
    <ant dir="../ant" target="netbeans"/>
177
  </target>
189
  </target>
Lines 179-185 Link Here
179
    <echo message="Building module ant/docs..."/>
191
    <echo message="Building module ant/docs..."/>
180
    <ant dir="../ant/docs" target="netbeans"/>
192
    <ant dir="../ant/docs" target="netbeans"/>
181
  </target>
193
  </target>
182
  <target name="all-apisupport" depends="all-openide,all-core,all-core/javahelp,all-jarpackager,all-apisupport/lite,all-java/api">
194
  <target name="all-apisupport" depends="all-openide,all-core,all-core/javahelp,all-jarpackager,all-apisupport/lite,all-java/api,all-openide/deprecated,all-java/srcmodel">
183
    <echo message="Building module apisupport..."/>
195
    <echo message="Building module apisupport..."/>
184
    <ant dir="../apisupport" target="netbeans"/>
196
    <ant dir="../apisupport" target="netbeans"/>
185
  </target>
197
  </target>
Lines 188-210 Link Here
188
    <ant dir="../apisupport/ant" target="netbeans"/>
200
    <ant dir="../apisupport/ant" target="netbeans"/>
189
  </target>
201
  </target>
190
  <!-- #27098: MakeParserDB requires several modules to have been successfully built: -->
202
  <!-- #27098: MakeParserDB requires several modules to have been successfully built: -->
191
  <target name="all-apisupport/apidocs" depends="all-openide,all-apisupport,all-core,all-classfile,all-java,all-java/api,all-editor">
203
  <target name="all-apisupport/apidocs" depends="all-openide,all-apisupport,all-core,all-classfile,all-java,all-java/api,all-editor,all-java/srcmodel,all-openide/deprecated,all-core/deprecated">
192
    <echo message="Building module apisupport/apidocs..."/>
204
    <echo message="Building module apisupport/apidocs..."/>
193
    <ant dir="../apisupport/apidocs" target="netbeans"/>
205
    <ant dir="../apisupport/apidocs" target="netbeans"/>
194
  </target>
206
  </target>
195
  <target name="all-apisupport/lite" depends="all-openide,all-core,all-jarpackager">
207
  <target name="all-apisupport/lite" depends="all-openide,all-core,all-jarpackager,all-openide/deprecated,all-java/srcmodel">
196
    <echo message="Building module apisupport lite..."/>
208
    <echo message="Building module apisupport lite..."/>
197
    <ant dir="../apisupport/lite" target="netbeans"/>
209
    <ant dir="../apisupport/lite" target="netbeans"/>
198
  </target>
210
  </target>
199
  <target name="all-applet" depends="all-openide,all-debuggercore">
211
  <target name="all-applet" depends="all-openide,all-debuggercore,all-openide/deprecated,all-java/srcmodel">
200
    <echo message="Building module applet..."/>
212
    <echo message="Building module applet..."/>
201
    <ant dir="../applet" target="netbeans"/>
213
    <ant dir="../applet" target="netbeans"/>
202
  </target>
214
  </target>
203
  <target name="all-autoupdate" depends="all-openide,all-core">
215
  <target name="all-autoupdate" depends="all-openide,all-core,all-openide/deprecated">
204
    <echo message="Building module autoupdate..."/>
216
    <echo message="Building module autoupdate..."/>
205
    <ant dir="../autoupdate" target="netbeans"/>
217
    <ant dir="../autoupdate" target="netbeans"/>
206
  </target>
218
  </target>
207
  <target name="all-beans" depends="all-openide,all-java">
219
  <target name="all-beans" depends="all-openide,all-java,all-openide/deprecated,all-java/srcmodel">
208
    <echo message="Building module beans..."/>
220
    <echo message="Building module beans..."/>
209
    <ant dir="../beans" target="netbeans"/>
221
    <ant dir="../beans" target="netbeans"/>
210
  </target>
222
  </target>
Lines 216-222 Link Here
216
    <echo message="Building module classclosure..."/>
228
    <echo message="Building module classclosure..."/>
217
    <ant dir="../classclosure" target="netbeans"/>
229
    <ant dir="../classclosure" target="netbeans"/>
218
  </target>
230
  </target>
219
  <target name="all-clazz" depends="all-openide,all-classfile">
231
  <target name="all-clazz" depends="all-openide,all-classfile,all-openide/deprecated,all-java/srcmodel">
220
    <echo message="Building module clazz..."/>
232
    <echo message="Building module clazz..."/>
221
    <ant dir="../clazz" target="netbeans"/>
233
    <ant dir="../clazz" target="netbeans"/>
222
  </target>
234
  </target>
Lines 224-234 Link Here
224
    <echo message="Building module db..."/>
236
    <echo message="Building module db..."/>
225
    <ant dir="../db" target="netbeans"/>
237
    <ant dir="../db" target="netbeans"/>
226
  </target>
238
  </target>
227
  <target name="all-debuggercore" depends="all-openide">
239
  <target name="all-debuggercore" depends="all-openide,all-openide/deprecated,all-java/srcmodel">
228
    <echo message="Building module debuggercore..."/>
240
    <echo message="Building module debuggercore..."/>
229
    <ant dir="../debuggercore" target="netbeans"/>
241
    <ant dir="../debuggercore" target="netbeans"/>
230
  </target>
242
  </target>
231
  <target name="all-debuggerjpda" depends="all-openide,all-debuggercore">
243
  <target name="all-debuggerjpda" depends="all-openide,all-debuggercore,all-openide/deprecated,all-java/srcmodel">
232
    <echo message="Building module debuggerjpda..."/>
244
    <echo message="Building module debuggerjpda..."/>
233
    <ant dir="../debuggerjpda" target="netbeans"/>
245
    <ant dir="../debuggerjpda" target="netbeans"/>
234
  </target>
246
  </target>
Lines 237-251 Link Here
237
    <ant dir="../debuggertools" target="netbeans"/>
249
    <ant dir="../debuggertools" target="netbeans"/>
238
  </target>
250
  </target>
239
  <!-- XXX illegal dependence on core! -->
251
  <!-- XXX illegal dependence on core! -->
240
  <target name="all-editor" depends="all-openide,all-core">
252
  <target name="all-editor" depends="all-openide,all-core,all-openide/deprecated,all-java/srcmodel">
241
    <echo message="Building module editor..."/>
253
    <echo message="Building module editor..."/>
242
    <ant dir="../editor" target="netbeans"/>
254
    <ant dir="../editor" target="netbeans"/>
243
  </target>
255
  </target>
244
  <target name="all-diff" depends="all-openide,all-editor">
256
  <target name="all-diff" depends="all-openide,all-editor,all-openide/deprecated">
245
    <echo message="Building module diff..."/>
257
    <echo message="Building module diff..."/>
246
    <ant dir="../diff" target="netbeans"/>
258
    <ant dir="../diff" target="netbeans"/>
247
  </target>
259
  </target>
248
  <target name="all-extbrowser" depends="all-openide,all-httpserver">
260
  <target name="all-extbrowser" depends="all-openide,all-httpserver,all-openide/deprecated">
249
    <echo message="Building module extbrowser..."/>
261
    <echo message="Building module extbrowser..."/>
250
    <ant dir="../extbrowser" target="netbeans"/>
262
    <ant dir="../extbrowser" target="netbeans"/>
251
  </target>
263
  </target>
Lines 254-260 Link Here
254
    <ant dir="../extbrowser/webclient" target="netbeans"/>
266
    <ant dir="../extbrowser/webclient" target="netbeans"/>
255
  </target>
267
  </target>
256
  <!-- XXX illegal dependence on core! -->
268
  <!-- XXX illegal dependence on core! -->
257
  <target name="all-form" depends="all-openide,all-java,all-core">
269
  <target name="all-form" depends="all-openide,all-java,all-core,all-openide/deprecated,all-java/srcmodel">
258
    <echo message="Building module form..."/>
270
    <echo message="Building module form..."/>
259
    <ant dir="../form" target="netbeans"/>
271
    <ant dir="../form" target="netbeans"/>
260
  </target>
272
  </target>
Lines 262-272 Link Here
262
    <echo message="Building module freestylebrowser..."/>
274
    <echo message="Building module freestylebrowser..."/>
263
    <ant dir="../freestylebrowser" target="netbeans"/>
275
    <ant dir="../freestylebrowser" target="netbeans"/>
264
  </target>
276
  </target>
265
  <target name="all-html" depends="all-openide">
277
  <target name="all-html" depends="all-openide,all-openide/deprecated">
266
    <echo message="Building module html..."/>
278
    <echo message="Building module html..."/>
267
    <ant dir="../html" target="netbeans"/>
279
    <ant dir="../html" target="netbeans"/>
268
  </target>
280
  </target>
269
  <target name="all-httpserver" depends="all-openide, all-httpserver/servletapi">
281
  <target name="all-httpserver" depends="all-openide, all-httpserver/servletapi,all-openide/deprecated">
270
    <echo message="Building module httpserver..."/>
282
    <echo message="Building module httpserver..."/>
271
    <ant dir="../httpserver" target="netbeans"/>
283
    <ant dir="../httpserver" target="netbeans"/>
272
  </target>
284
  </target>
Lines 274-280 Link Here
274
    <echo message="Building module httpserver/servletapi..."/>
286
    <echo message="Building module httpserver/servletapi..."/>
275
    <ant dir="../httpserver/servletapi" target="netbeans"/>
287
    <ant dir="../httpserver/servletapi" target="netbeans"/>
276
  </target>
288
  </target>
277
  <target name="all-i18n" depends="all-openide,all-core,all-properties,all-form">
289
  <target name="all-i18n" depends="all-openide,all-core,all-properties,all-form,all-openide/deprecated,all-java/srcmodel">
278
    <echo message="Building module i18n..."/>
290
    <echo message="Building module i18n..."/>
279
    <ant dir="../i18n" target="netbeans"/>
291
    <ant dir="../i18n" target="netbeans"/>
280
  </target>
292
  </target>
Lines 286-292 Link Here
286
    <echo message="Building module icebrowser..."/>
298
    <echo message="Building module icebrowser..."/>
287
    <ant dir="../icebrowser" target="netbeans"/>
299
    <ant dir="../icebrowser" target="netbeans"/>
288
  </target>
300
  </target>
289
  <target name="all-image" depends="all-openide">
301
  <target name="all-image" depends="all-openide,all-openide/deprecated">
290
    <echo message="Building module image..."/>
302
    <echo message="Building module image..."/>
291
    <ant dir="../image" target="netbeans"/>
303
    <ant dir="../image" target="netbeans"/>
292
  </target>
304
  </target>
Lines 294-300 Link Here
294
    <echo message="Building module innertesters..."/>
306
    <echo message="Building module innertesters..."/>
295
    <ant dir="../innertesters" target="netbeans"/>
307
    <ant dir="../innertesters" target="netbeans"/>
296
  </target>
308
  </target>
297
  <target name="all-j2eeserver" depends="all-openide,all-jarpackager,all-debuggercore,all-debuggerjpda">
309
  <target name="all-j2eeserver" depends="all-openide,all-jarpackager,all-debuggercore,all-debuggerjpda,all-openide/deprecated,all-java/srcmodel">
298
    <echo message="Building module j2eeserver..."/>
310
    <echo message="Building module j2eeserver..."/>
299
    <ant dir="../j2eeserver" target="netbeans"/>
311
    <ant dir="../j2eeserver" target="netbeans"/>
300
  </target>
312
  </target>
Lines 302-312 Link Here
302
    <echo message="Building module junit..."/>
314
    <echo message="Building module junit..."/>
303
    <ant dir="../junit" target="netbeans"/>
315
    <ant dir="../junit" target="netbeans"/>
304
  </target>
316
  </target>
305
  <target name="all-jarpackager" depends="all-openide">
317
  <target name="all-jarpackager" depends="all-openide,all-openide/deprecated,all-java/srcmodel">
306
    <echo message="Building module jarpackager..."/>
318
    <echo message="Building module jarpackager..."/>
307
    <ant dir="../jarpackager" target="netbeans"/>
319
    <ant dir="../jarpackager" target="netbeans"/>
308
  </target>
320
  </target>
309
  <target name="all-java" depends="all-openide,all-java/api,all-classfile">
321
  <target name="all-java" depends="all-openide,all-java/api,all-classfile,all-java/srcmodel,all-openide/deprecated">
310
    <echo message="Building module java..."/>
322
    <echo message="Building module java..."/>
311
    <ant dir="../java" target="netbeans"/>
323
    <ant dir="../java" target="netbeans"/>
312
  </target>
324
  </target>
Lines 314-320 Link Here
314
    <echo message="Building Java support APIs.."/>
326
    <echo message="Building Java support APIs.."/>
315
    <ant dir="../java/api" target="netbeans"/>
327
    <ant dir="../java/api" target="netbeans"/>
316
  </target>
328
  </target>
317
  <target name="all-javadoc" depends="all-openide,all-java">
329
  <target name="all-javadoc" depends="all-openide,all-java,all-openide/deprecated,all-java/srcmodel">
318
    <echo message="Building module javadoc..."/>
330
    <echo message="Building module javadoc..."/>
319
    <ant dir="../javadoc" target="netbeans"/>
331
    <ant dir="../javadoc" target="netbeans"/>
320
  </target>
332
  </target>
Lines 332-338 Link Here
332
    <echo message="Building module jini..."/>
344
    <echo message="Building module jini..."/>
333
    <ant dir="../jini" target="netbeans"/>
345
    <ant dir="../jini" target="netbeans"/>
334
  </target>
346
  </target>
335
  <target name="all-jndi" depends="all-openide,all-openidex">
347
  <target name="all-jndi" depends="all-openide,all-openidex,all-openide/deprecated">
336
    <echo message="Building module jndi..."/>
348
    <echo message="Building module jndi..."/>
337
    <ant dir="../jndi" target="netbeans"/>
349
    <ant dir="../jndi" target="netbeans"/>
338
  </target>
350
  </target>
Lines 376-390 Link Here
376
    <echo message="Building module objectbrowser..."/>
388
    <echo message="Building module objectbrowser..."/>
377
    <ant dir="../objectbrowser" target="netbeans"/>
389
    <ant dir="../objectbrowser" target="netbeans"/>
378
  </target>
390
  </target>
379
  <target name="all-openidex" depends="all-openide">
391
  <target name="all-openidex" depends="all-openide,all-openide/deprecated">
380
    <echo message="Building module openidex..."/>
392
    <echo message="Building module openidex..."/>
381
    <ant dir="../openidex" target="netbeans"/>
393
    <ant dir="../openidex" target="netbeans"/>
382
  </target>
394
  </target>
383
  <target name="all-projects" depends="all-openide,all-core">
395
  <target name="all-projects" depends="all-openide,all-core,all-openide/deprecated">
384
    <echo message="Building module projects..."/>
396
    <echo message="Building module projects..."/>
385
    <ant dir="../projects" target="netbeans"/>
397
    <ant dir="../projects" target="netbeans"/>
386
  </target>
398
  </target>
387
  <target name="all-properties" depends="all-openide,all-editor">
399
  <target name="all-properties" depends="all-openide,all-editor,all-openide/deprecated">
388
    <echo message="Building module properties..."/>
400
    <echo message="Building module properties..."/>
389
    <ant dir="../properties" target="netbeans"/>
401
    <ant dir="../properties" target="netbeans"/>
390
  </target>
402
  </target>
Lines 392-398 Link Here
392
    <echo message="Building module remotefs..."/>
404
    <echo message="Building module remotefs..."/>
393
    <ant dir="../remotefs" target="netbeans"/>
405
    <ant dir="../remotefs" target="netbeans"/>
394
  </target>
406
  </target>
395
  <target name="all-rmi" depends="all-openide,all-java,all-debuggercore">
407
  <target name="all-rmi" depends="all-openide,all-java,all-debuggercore,all-openide/deprecated,all-java/srcmodel">
396
    <echo message="Building module rmi..."/>
408
    <echo message="Building module rmi..."/>
397
    <ant dir="../rmi" target="netbeans"/>
409
    <ant dir="../rmi" target="netbeans"/>
398
  </target>
410
  </target>
Lines 401-407 Link Here
401
    <ant dir="../schema2beans" target="netbeans"/>
413
    <ant dir="../schema2beans" target="netbeans"/>
402
  </target>
414
  </target>
403
  <!-- XXX illegal dependence on core! -->
415
  <!-- XXX illegal dependence on core! -->
404
  <target name="all-scripting" depends="all-openide,all-openidex,all-core">
416
  <target name="all-scripting" depends="all-openide,all-openidex,all-core,all-openide/deprecated">
405
    <echo message="Building module scripting..."/>
417
    <echo message="Building module scripting..."/>
406
    <ant dir="../scripting" target="netbeans"/>
418
    <ant dir="../scripting" target="netbeans"/>
407
  </target>
419
  </target>
Lines 421-427 Link Here
421
    <echo message="Building module testtools..."/>
433
    <echo message="Building module testtools..."/>
422
    <ant dir="../testtools" target="netbeans"/>
434
    <ant dir="../testtools" target="netbeans"/>
423
  </target>
435
  </target>
424
  <target name="all-text" depends="all-openide">
436
  <target name="all-text" depends="all-openide,all-openide/deprecated">
425
    <echo message="Building module text..."/>
437
    <echo message="Building module text..."/>
426
    <ant dir="../text" target="netbeans"/>
438
    <ant dir="../text" target="netbeans"/>
427
  </target>
439
  </target>
Lines 429-435 Link Here
429
    <echo message="Building module tomcatint/tomcat32..."/>
441
    <echo message="Building module tomcatint/tomcat32..."/>
430
    <ant dir="../tomcatint/tomcat32" target="netbeans"/>
442
    <ant dir="../tomcatint/tomcat32" target="netbeans"/>
431
  </target>
443
  </target>
432
  <target name="all-tomcatint/tomcat40" depends="all-openide,all-web/core,all-schema2beans">
444
  <target name="all-tomcatint/tomcat40" depends="all-openide,all-web/core,all-schema2beans,all-openide/deprecated,all-java/srcmodel">
433
    <echo message="Building module tomcatint/tomcat40..."/>
445
    <echo message="Building module tomcatint/tomcat40..."/>
434
    <ant dir="../tomcatint/tomcat40" target="netbeans"/>
446
    <ant dir="../tomcatint/tomcat40" target="netbeans"/>
435
  </target>
447
  </target>
Lines 445-451 Link Here
445
    <echo message="Building module usersguide..."/>
457
    <echo message="Building module usersguide..."/>
446
    <ant dir="../usersguide" target="netbeans"/>
458
    <ant dir="../usersguide" target="netbeans"/>
447
  </target>
459
  </target>
448
  <target name="all-utilities" depends="all-openide,all-openidex,all-core/settings">
460
  <target name="all-utilities" depends="all-openide,all-openidex,all-core/settings,all-openide/deprecated">
449
    <echo message="Building module utilities..."/>
461
    <echo message="Building module utilities..."/>
450
    <ant dir="../utilities" target="netbeans"/>
462
    <ant dir="../utilities" target="netbeans"/>
451
  </target>
463
  </target>
Lines 457-473 Link Here
457
    <echo message="Building module vcscvs compat..."/>
469
    <echo message="Building module vcscvs compat..."/>
458
    <ant dir="../vcscvs/compat" target="netbeans"/>
470
    <ant dir="../vcscvs/compat" target="netbeans"/>
459
  </target>
471
  </target>
460
  <target name="all-vcsgeneric" depends="all-openide,all-openidex,all-vcscore,all-diff">
472
  <target name="all-vcsgeneric" depends="all-openide,all-openidex,all-vcscore,all-diff,all-openide/deprecated">
461
    <echo message="Building module vcsgeneric..."/>
473
    <echo message="Building module vcsgeneric..."/>
462
    <ant dir="../vcsgeneric" target="netbeans"/>
474
    <ant dir="../vcsgeneric" target="netbeans"/>
463
  </target>
475
  </target>
464
476
465
  <target name="all-vcsgeneric/profiles/cvsprofiles" depends="all-vcsgeneric">
477
  <target name="all-vcsgeneric/profiles/cvsprofiles" depends="all-vcsgeneric,all-openide/deprecated">
466
    <echo message="Building module vcsgeneric/profiles/cvsprofiles"/>
478
    <echo message="Building module vcsgeneric/profiles/cvsprofiles"/>
467
    <ant dir="../vcsgeneric/profiles/cvsprofiles" target="netbeans"/>
479
    <ant dir="../vcsgeneric/profiles/cvsprofiles" target="netbeans"/>
468
  </target>
480
  </target>
469
481
470
  <target name="all-vcsgeneric/profiles/pvcs" depends="all-vcsgeneric">
482
  <target name="all-vcsgeneric/profiles/pvcs" depends="all-vcsgeneric,all-openide/deprecated">
471
    <echo message="Building module vcsgeneric/profiles/pvcs"/>
483
    <echo message="Building module vcsgeneric/profiles/pvcs"/>
472
    <ant dir="../vcsgeneric/profiles/pvcs" target="netbeans"/>
484
    <ant dir="../vcsgeneric/profiles/pvcs" target="netbeans"/>
473
  </target>
485
  </target>
Lines 478-488 Link Here
478
  </target>
490
  </target>
479
491
480
  <!-- XXX check editor dependecy -->
492
  <!-- XXX check editor dependecy -->
481
  <target name="all-vcscore" depends="all-openide,all-openidex,all-editor">
493
  <target name="all-vcscore" depends="all-openide,all-openidex,all-editor,all-openide/deprecated">
482
    <echo message="Building module vcscore..."/>
494
    <echo message="Building module vcscore..."/>
483
    <ant dir="../vcscore" target="netbeans"/>
495
    <ant dir="../vcscore" target="netbeans"/>
484
  </target>
496
  </target>
485
  <target name="all-javacvs" depends="all-openide,all-openidex,all-vcscore, all-diff">
497
  <target name="all-javacvs" depends="all-openide,all-openidex,all-vcscore, all-diff,all-openide/deprecated">
486
    <echo message="Building module javacvs..."/>
498
    <echo message="Building module javacvs..."/>
487
    <ant dir="../javacvs" target="netbeans"/>
499
    <ant dir="../javacvs" target="netbeans"/>
488
  </target>
500
  </target>
Lines 494-508 Link Here
494
    <ant dir="../web/servletapi23" target="netbeans"/>
506
    <ant dir="../web/servletapi23" target="netbeans"/>
495
  </target>
507
  </target>
496
  <!-- XXX illegal dependence on core! -->
508
  <!-- XXX illegal dependence on core! -->
497
  <target name="all-web/core" depends="all-openide,all-java,all-core,all-editor,all-j2eeserver,all-html,all-httpserver,all-jarpackager,all-debuggercore,all-openidex,all-schema2beans,all-xml/api">
509
  <target name="all-web/core" depends="all-openide,all-java,all-core,all-editor,all-j2eeserver,all-html,all-httpserver,all-jarpackager,all-debuggercore,all-openidex,all-schema2beans,all-xml/api,all-openide/deprecated,all-java/srcmodel">
498
    <echo message="Building module web/core..."/>
510
    <echo message="Building module web/core..."/>
499
    <ant dir="../web/core" target="netbeans"/>
511
    <ant dir="../web/core" target="netbeans"/>
500
  </target>
512
  </target>
501
  <target name="all-web/jspparser" depends="all-web/core,all-web/servletapi23">
513
  <target name="all-web/jspparser" depends="all-web/core,all-web/servletapi23,all-openide/deprecated">
502
    <echo message="Building module web/jspparser..."/>
514
    <echo message="Building module web/jspparser..."/>
503
    <ant dir="../web/jspparser" target="netbeans"/>
515
    <ant dir="../web/jspparser" target="netbeans"/>
504
  </target>
516
  </target>
505
  <target name="all-web/jspsyntax" depends="all-web/core,all-xml/text-edit">
517
  <target name="all-web/jspsyntax" depends="all-web/core,all-xml/text-edit,all-openide/deprecated">
506
    <echo message="Building module web/jspsyntax..."/>
518
    <echo message="Building module web/jspsyntax..."/>
507
    <ant dir="../web/jspsyntax" target="netbeans"/>
519
    <ant dir="../web/jspsyntax" target="netbeans"/>
508
  </target>
520
  </target>
Lines 546-552 Link Here
546
  </target>
558
  </target>
547
559
548
  <!-- XXX illegal dependence on core! -->
560
  <!-- XXX illegal dependence on core! -->
549
  <target name="all-ui/welcome" depends="all-openide,all-core,all-utilities">
561
  <target name="all-ui/welcome" depends="all-openide,all-core,all-utilities,all-openide/deprecated">
550
    <echo message="Building module ui/welcome..."/>
562
    <echo message="Building module ui/welcome..."/>
551
    <ant dir="../ui/welcome" target="netbeans"/>
563
    <ant dir="../ui/welcome" target="netbeans"/>
552
  </target>
564
  </target>
Lines 576-597 Link Here
576
      <ant dir="../xml/api" target="netbeans"/>
588
      <ant dir="../xml/api" target="netbeans"/>
577
  </target>
589
  </target>
578
590
579
  <target name="all-xml/tax" depends="all-openide, all-xml/api">
591
  <target name="all-xml/tax" depends="all-openide, all-xml/api,all-openide/deprecated">
580
      <echo message="Building module xml/tax..."/>
592
      <echo message="Building module xml/tax..."/>
581
      <ant dir="../xml/tax" target="netbeans"/>
593
      <ant dir="../xml/tax" target="netbeans"/>
582
  </target>
594
  </target>
583
595
584
  <target name="all-xml/core" depends="all-openide, all-openidex, all-xml/api, all-xml/tax">
596
  <target name="all-xml/core" depends="all-openide, all-openidex, all-xml/api, all-xml/tax,all-openide/deprecated">
585
      <echo message="Building module xml/core..."/>
597
      <echo message="Building module xml/core..."/>
586
      <ant dir="../xml/core" target="netbeans"/>
598
      <ant dir="../xml/core" target="netbeans"/>
587
  </target>
599
  </target>
588
600
589
  <target name="all-xml/catalog" depends="all-openide, all-xml/api, all-xml/core">
601
  <target name="all-xml/catalog" depends="all-openide, all-xml/api, all-xml/core,all-openide/deprecated">
590
      <echo message="Building module xml/catalog..."/>
602
      <echo message="Building module xml/catalog..."/>
591
      <ant dir="../xml/catalog" target="netbeans"/>
603
      <ant dir="../xml/catalog" target="netbeans"/>
592
  </target>
604
  </target>
593
605
594
  <target name="all-xml/tools" depends="all-openide, all-libs/jaxp, all-xml/api, all-xml/tax, all-xml/core">
606
  <target name="all-xml/tools" depends="all-openide, all-libs/jaxp, all-xml/api, all-xml/tax, all-xml/core,all-openide/deprecated,all-java/srcmodel">
595
      <echo message="Building module xml/tools..."/>
607
      <echo message="Building module xml/tools..."/>
596
      <ant dir="../xml/tools" target="netbeans"/>
608
      <ant dir="../xml/tools" target="netbeans"/>
597
  </target>
609
  </target>
Lines 601-617 Link Here
601
      <ant dir="../xml/text-edit" target="netbeans"/>
613
      <ant dir="../xml/text-edit" target="netbeans"/>
602
  </target>
614
  </target>
603
615
604
  <target name="all-xml/tree-edit" depends="all-openide, all-openidex, all-xml/api, all-xml/tax, all-xml/core">
616
  <target name="all-xml/tree-edit" depends="all-openide, all-openidex, all-xml/api, all-xml/tax, all-xml/core,all-openide/deprecated">
605
      <echo message="Building module xml/tree-edit..."/>
617
      <echo message="Building module xml/tree-edit..."/>
606
      <ant dir="../xml/tree-edit" target="netbeans"/>
618
      <ant dir="../xml/tree-edit" target="netbeans"/>
607
  </target>
619
  </target>
608
620
609
  <target name="all-xml/css" depends="all-openide, all-editor, all-xml/api">
621
  <target name="all-xml/css" depends="all-openide, all-editor, all-xml/api,all-openide/deprecated">
610
      <echo message="Building module xml/css..."/>
622
      <echo message="Building module xml/css..."/>
611
      <ant dir="../xml/css" target="netbeans"/>
623
      <ant dir="../xml/css" target="netbeans"/>
612
  </target>
624
  </target>
613
625
614
  <target name="all-xml/xsl" depends="all-openide, all-httpserver/servletapi, all-libs/jaxp, all-xml/api, all-xml/tax, all-xml/core">
626
  <target name="all-xml/xsl" depends="all-openide, all-httpserver/servletapi, all-libs/jaxp, all-xml/api, all-xml/tax, all-xml/core,all-openide/deprecated">
615
      <echo message="Building module xml/xsl..."/>
627
      <echo message="Building module xml/xsl..."/>
616
      <ant dir="../xml/xsl" target="netbeans"/>
628
      <ant dir="../xml/xsl" target="netbeans"/>
617
  </target>
629
  </target>
(-)nbbuild/antsrc/org/netbeans/nbbuild/MakeParserDB.java (+4 lines)
Lines 92-99 Link Here
92
                "core/netbeans/lib/core.jar",
92
                "core/netbeans/lib/core.jar",
93
                "classfile/netbeans/modules/autoload/classfile.jar",
93
                "classfile/netbeans/modules/autoload/classfile.jar",
94
                "java/api/netbeans/modules/autoload/java-api.jar",
94
                "java/api/netbeans/modules/autoload/java-api.jar",
95
                "java/srcmodel/netbeans/modules/autoload/java-src-model.jar",
95
                "java/netbeans/modules/java.jar",
96
                "java/netbeans/modules/java.jar",
96
                "editor/netbeans/modules/editor.jar",
97
                "editor/netbeans/modules/editor.jar",
98
                // XXX delete these when java + editor no longer use TopManager!
99
                "openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar",
100
                "core/deprecated/netbeans/modules/autoload/core-deprecated.jar",
97
            };
101
            };
98
            URL[] urls = new URL[cp.length];
102
            URL[] urls = new URL[cp.length];
99
            for (int i = 0; i < cp.length; i++) {
103
            for (int i = 0; i < cp.length; i++) {
(-)openide/build.xml (-7 / +3 lines)
Lines 605-611 Link Here
605
    <echo message="Build Open API documentation..."/>
605
    <echo message="Build Open API documentation..."/>
606
    <mkdir dir="OpenAPIs"/>
606
    <mkdir dir="OpenAPIs"/>
607
    <javadoc destdir="OpenAPIs"
607
    <javadoc destdir="OpenAPIs"
608
             packagenames="org.openide,org.openide.actions,org.openide.awt,org.openide.compiler,org.openide.cookies,org.openide.debugger,org.openide.execution,org.openide.explorer,org.openide.explorer.propertysheet,org.openide.explorer.view,org.openide.filesystems,org.openide.loaders,org.openide.modules,org.openide.nodes,org.openide.options,org.openide.src,org.openide.src.nodes,org.openide.text,org.openide.util,org.openide.util.actions,org.openide.util.datatransfer,org.openide.util.enum,org.openide.util.io,org.openide.util.lookup,org.openide.windows,org.openide.xml"
608
             packagenames="org.openide,org.openide.actions,org.openide.awt,org.openide.compiler,org.openide.cookies,org.openide.execution,org.openide.explorer,org.openide.explorer.propertysheet,org.openide.explorer.propertysheet.editors,org.openide.explorer.view,org.openide.filesystems,org.openide.loaders,org.openide.modules,org.openide.nodes,org.openide.options,org.openide.text,org.openide.util,org.openide.util.actions,org.openide.util.datatransfer,org.openide.util.enum,org.openide.util.io,org.openide.util.lookup,org.openide.windows,org.openide.xml"
609
             doctitle="NetBeans Open APIs"
609
             doctitle="NetBeans Open APIs"
610
             windowtitle="NetBeans APIs"
610
             windowtitle="NetBeans APIs"
611
             overview="api/doc/overview.html"
611
             overview="api/doc/overview.html"
Lines 628-634 Link Here
628
      />
628
      />
629
      <group title="&lt;a href=&quot;@TOP@org/openide/modules/doc-files/api.html&quot;&gt;Modules API&lt;/a&gt;"
629
      <group title="&lt;a href=&quot;@TOP@org/openide/modules/doc-files/api.html&quot;&gt;Modules API&lt;/a&gt;"
630
             packages="org.openide.modules"/>
630
             packages="org.openide.modules"/>
631
      <group title="TopManager, ServiceType, WizardDescriptor, ..."
631
      <group title="ServiceType, WizardDescriptor, ..."
632
             packages="org.openide"/>
632
             packages="org.openide"/>
633
      <group title="&lt;a href=&quot;@TOP@org/openide/doc-files/services-api.html&quot;&gt;Services &amp;amp; Lookup API&lt;/a&gt;"
633
      <group title="&lt;a href=&quot;@TOP@org/openide/doc-files/services-api.html&quot;&gt;Services &amp;amp; Lookup API&lt;/a&gt;"
634
             packages="org.openide.util.lookup"/>
634
             packages="org.openide.util.lookup"/>
Lines 639-661 Link Here
639
      <group title="&lt;a href=&quot;@TOP@org/openide/nodes/doc-files/api.html&quot;&gt;Nodes API&lt;/a&gt;"
639
      <group title="&lt;a href=&quot;@TOP@org/openide/nodes/doc-files/api.html&quot;&gt;Nodes API&lt;/a&gt;"
640
             packages="org.openide.nodes"/>
640
             packages="org.openide.nodes"/>
641
      <group title="&lt;a href=&quot;@TOP@org/openide/explorer/doc-files/api.html&quot;&gt;Explorer API&lt;/a&gt;"
641
      <group title="&lt;a href=&quot;@TOP@org/openide/explorer/doc-files/api.html&quot;&gt;Explorer API&lt;/a&gt;"
642
             packages="org.openide.explorer:org.openide.explorer.propertysheet:org.openide.explorer.view"/>
642
             packages="org.openide.explorer:org.openide.explorer.propertysheet:org.openide.explorer.propertysheet.editors:org.openide.explorer.view"/>
643
      <group title="&lt;a href=&quot;@TOP@org/openide/actions/doc-files/api.html&quot;&gt;Actions API&lt;/a&gt;"
643
      <group title="&lt;a href=&quot;@TOP@org/openide/actions/doc-files/api.html&quot;&gt;Actions API&lt;/a&gt;"
644
             packages="org.openide.actions:org.openide.util.actions"/>
644
             packages="org.openide.actions:org.openide.util.actions"/>
645
      <group title="&lt;a href=&quot;@TOP@org/openide/compiler/doc-files/api.html&quot;&gt;Compiler API&lt;/a&gt;"
645
      <group title="&lt;a href=&quot;@TOP@org/openide/compiler/doc-files/api.html&quot;&gt;Compiler API&lt;/a&gt;"
646
             packages="org.openide.compiler"/>
646
             packages="org.openide.compiler"/>
647
      <group title="&lt;a href=&quot;@TOP@org/openide/execution/doc-files/api.html&quot;&gt;Execution API&lt;/a&gt;"
647
      <group title="&lt;a href=&quot;@TOP@org/openide/execution/doc-files/api.html&quot;&gt;Execution API&lt;/a&gt;"
648
             packages="org.openide.execution"/>
648
             packages="org.openide.execution"/>
649
      <group title="&lt;a href=&quot;@TOP@org/openide/debugger/doc-files/api.html&quot;&gt;Debugger API&lt;/a&gt;"
650
             packages="org.openide.debugger"/>
651
      <group title="&lt;a href=&quot;@TOP@org/openide/text/doc-files/api.html&quot;&gt;Editor API&lt;/a&gt;"
649
      <group title="&lt;a href=&quot;@TOP@org/openide/text/doc-files/api.html&quot;&gt;Editor API&lt;/a&gt;"
652
             packages="org.openide.text"/>
650
             packages="org.openide.text"/>
653
      <group title="&lt;a href=&quot;@TOP@org/openide/windows/doc-files/api.html&quot;&gt;Window System API&lt;/a&gt;"
651
      <group title="&lt;a href=&quot;@TOP@org/openide/windows/doc-files/api.html&quot;&gt;Window System API&lt;/a&gt;"
654
             packages="org.openide.windows"/>
652
             packages="org.openide.windows"/>
655
      <group title="&lt;a href=&quot;@TOP@org/openide/options/doc-files/api.html&quot;&gt;Options API&lt;/a&gt;"
653
      <group title="&lt;a href=&quot;@TOP@org/openide/options/doc-files/api.html&quot;&gt;Options API&lt;/a&gt;"
656
             packages="org.openide.options"/>
654
             packages="org.openide.options"/>
657
      <group title="&lt;a href=&quot;@TOP@org/openide/src/doc-files/api.html&quot;&gt;Java Hierarchy API&lt;/a&gt;"
658
             packages="org.openide.src:org.openide.src.nodes"/>
659
      <group title="&lt;a href=&quot;@TOP@org/openide/util/doc-files/api.html&quot;&gt;Utility Classes&lt;/a&gt;"
655
      <group title="&lt;a href=&quot;@TOP@org/openide/util/doc-files/api.html&quot;&gt;Utility Classes&lt;/a&gt;"
660
             packages="org.openide.awt:org.openide.util:org.openide.util.enum:org.openide.util.io:org.openide.xml"/>
656
             packages="org.openide.awt:org.openide.util:org.openide.util.enum:org.openide.util.io:org.openide.xml"/>
661
    </javadoc>
657
    </javadoc>
(-)openide/manifest.mf (-9 / +3 lines)
Lines 25-33 Link Here
25
Name: /org/openide/compiler/
25
Name: /org/openide/compiler/
26
Package-Title: org.openide.compiler
26
Package-Title: org.openide.compiler
27
27
28
Name: /org/openide/debugger/
29
Package-Title: org.openide.debugger
30
31
Name: /org/openide/execution/
28
Name: /org/openide/execution/
32
Package-Title: org.openide.execution
29
Package-Title: org.openide.execution
33
30
Lines 43-48 Link Here
43
Name: /org/openide/explorer/view/
40
Name: /org/openide/explorer/view/
44
Package-Title: org.openide.explorer.view
41
Package-Title: org.openide.explorer.view
45
42
43
Name: /org/openide/filesystems/
44
Package-Title: org.openide.filesystems
45
46
Name: /org/openide/loaders/
46
Name: /org/openide/loaders/
47
Package-Title: org.openide.loaders
47
Package-Title: org.openide.loaders
48
48
Lines 51-62 Link Here
51
51
52
Name: /org/openide/options/
52
Name: /org/openide/options/
53
Package-Title: org.openide.options
53
Package-Title: org.openide.options
54
55
Name: /org/openide/src/
56
Package-Title: org.openide.src
57
58
Name: /org/openide/src/nodes/
59
Package-Title: org.openide.src.nodes
60
54
61
Name: /org/openide/text/
55
Name: /org/openide/text/
62
Package-Title: org.openide.text
56
Package-Title: org.openide.text
(-)openide/openide-spec-vers.properties (-1 / +1 lines)
Lines 5-8 Link Here
5
# Must always be numeric (numbers separated by '.', e.g. 1.11.3).
5
# Must always be numeric (numbers separated by '.', e.g. 1.11.3).
6
# See http://openide.netbeans.org/versioning-policy.html for more.
6
# See http://openide.netbeans.org/versioning-policy.html for more.
7
7
8
org.openide.specification.version=3.13
8
org.openide.specification.version=3.14
(-)openide/api/doc/ToDo.txt (-76 / +1 lines)
Lines 5-11 Link Here
5
5
6
* FAQs
6
* FAQs
7
Write pending items.
7
Write pending items.
8
High-visibility: getting an Element from a Node.
9
Update stuff that is now crusty, such as manifest parsing, etc.
8
Update stuff that is now crusty, such as manifest parsing, etc.
10
9
11
* Prose APIs
10
* Prose APIs
Lines 25-40 Link Here
25
possibly "hind API" (i.e. used by core implementation to register
24
possibly "hind API" (i.e. used by core implementation to register
26
itself with the Open APIs).
25
itself with the Open APIs).
27
26
28
** Cookies for elements
29
Should generally pick up those of the source file (i.e. holder of
30
SourceCookie). I.e. the std Editor gives a node selection acc. to the
31
element the cursor is on, so many actions will require all of these
32
elements to have the same cookies (at least) as the data object.
33
34
* JavaDoc
27
* JavaDoc
35
28
36
#3936.
37
38
** Xlinks [important]
29
** Xlinks [important]
39
MORE TO PROSE!!!
30
MORE TO PROSE!!!
40
31
Lines 45-92 Link Here
45
IndentEngine
36
IndentEngine
46
DefaultPrintable
37
DefaultPrintable
47
TreeView D&D support, AutoScrollJList...check all of explorer.view
38
TreeView D&D support, AutoScrollJList...check all of explorer.view
48
DebuggerType (also Debugger) [maybe javadoc only]
49
EditorSupport.Editor.updateName
39
EditorSupport.Editor.updateName
50
AttributedCharacters, DefaultPrintable
40
AttributedCharacters, DefaultPrintable
51
JavaDoc and related.
41
JavaDoc and related.
52
PositionRef, PositionBounds
42
PositionRef, PositionBounds
53
ClassElement.Finder
54
new Identifier, Type, MethodParameter, ElementFormat.sourceFormat
55
MultiFileSystem
43
MultiFileSystem
56
FileUtil.create{Folder,Data}
44
FileUtil.create{Folder,Data}
57
XMLDataObject
45
XMLDataObject
58
{Build,Compile,Save,Execute,Open}ProjectAction
59
HttpServer.getResourceRoot
46
HttpServer.getResourceRoot
60
NodePropertyEditor & NodeCustomizer; also PropertyDetails.nodes
47
NodePropertyEditor & NodeCustomizer; also PropertyDetails.nodes
61
WizardDescriptor.titleFormat, WizardDescriptor.Panel.helpCtx
48
WizardDescriptor.titleFormat, WizardDescriptor.Panel.helpCtx
62
DialogDescriptor's actionListener's
49
DialogDescriptor's actionListener's
63
FileSystemCapability (incl. {Jar,Local}FileSystem const.)
64
DataFolder.Index(DataFolder,Node)
50
DataFolder.Index(DataFolder,Node)
65
InstanceDataObject.{create,remove} by Class
66
InstanceDataObject.find
51
InstanceDataObject.find
67
OpenSupport.openCloneableTopComponent
52
OpenSupport.openCloneableTopComponent
68
HttpServer.allowAccess
53
HttpServer.allowAccess
69
window system [prose done, pending Javadoc]
54
window system [prose done, pending Javadoc]
70
ClassChildren categories, protected members
71
FilterFactory
72
new DataObjectFilter(Class[])
55
new DataObjectFilter(Class[])
73
datatransfer [prose done, pending Javadoc]
56
datatransfer [prose done, pending Javadoc]
74
ClassElementFilter sorting
75
SourceCookie.Editor.findElement (mention easy implementation)
76
Element.markCurrent
77
SourceElement.runAtomic{,AsUser}
78
ExecSupport.entry
79
EditAction
57
EditAction
80
MultiDataObject.registerEntry
58
MultiDataObject.registerEntry
81
BeanNode.getBean
59
BeanNode.getBean
82
ProcessExecutor.TAG_*
60
ProcessExecutor.TAG_*
83
DocumentLine.Set
61
DocumentLine.Set
84
DataNode.createActions
62
DataNode.createActions
85
Places.Nodes.{services,project}
86
CleanAction, CleanAllAction
63
CleanAction, CleanAllAction
87
ExternalCompiler.ErrorExpression: POSIX, not Perl5
64
ExternalCompiler.ErrorExpression: POSIX, not Perl5
88
DataObject.PROP_PRIMARY_FILE
65
DataObject.PROP_PRIMARY_FILE
89
ProjectSensitiveAction
90
EditorCookie: openedPanes has no propchglist, use TC.Reg instead
66
EditorCookie: openedPanes has no propchglist, use TC.Reg instead
91
FileObject.lock -- should provide no message, or a user-friendly localized one
67
FileObject.lock -- should provide no message, or a user-friendly localized one
92
DataObject.setValid(false) [& maybe mention in DataSystems]
68
DataObject.setValid(false) [& maybe mention in DataSystems]
Lines 96-102 Link Here
96
expl: pending D&D, node visualizers
72
expl: pending D&D, node visualizers
97
win: pending new support
73
win: pending new support
98
editor: pending review, new supports
74
editor: pending review, new supports
99
java: pending javadoc support, lazy idents
100
misc: in progress
75
misc: in progress
101
76
102
** Javadoc Warnings
77
** Javadoc Warnings
Lines 111-125 Link Here
111
** Children.Keys
86
** Children.Keys
112
For all subclasses intended to be themselves subclassable, mention
87
For all subclasses intended to be themselves subclassable, mention
113
what the convention for keys used by that class
88
what the convention for keys used by that class
114
is. E.g. SourceChildren should say what it uses, etc.
89
is.
115
90
116
** NotifyDescriptor
91
** NotifyDescriptor
117
Explain how to make a dialog with conditionally enabled OK button.
92
Explain how to make a dialog with conditionally enabled OK button.
118
93
119
** ClassElement.add(MethodElement) etc.
120
Make very clear that this will create a copy of the added element, if
121
the added element is a memory impl.
122
123
** missing @serial field
94
** missing @serial field
124
What to do?!
95
What to do?!
125
96
Lines 152-197 Link Here
152
mentioned in the NotSerExc uses page. Probably ditto for subclasses of
123
mentioned in the NotSerExc uses page. Probably ditto for subclasses of
153
Error/RuntimeException.
124
Error/RuntimeException.
154
125
155
*** doc for overriding/implementing method
156
Should be possible to only write components which change from the
157
parent's docs. E.g., if you have an interface specifying:
158
159
/** Get a foo.
160
 * (long description...)
161
 * @return the foo
162
 * @throws IOException if that failed
163
 */
164
165
it should be possible to write an implementing method so:
166
167
/**
168
 * @return the same foo as {@link #getFooToo} returns
169
 */
170
171
and have JavaDoc just display (w/o warnings):
172
173
public Foo getFoo() throws IOException
174
--------------------------------------
175
Get a foo.
176
_Returns_ the same foo as _getFooToo(boolean)_ returns
177
_Throws_ IOException if that failed
178
_Specified By_ _getFoo()_ in _FooGetter_
179
180
I.e., summary lines (but not the body), and descriptions of
181
parameters, return value, and throws would be copied from the
182
superclass unless otherwise specified. But this would only be done if
183
you provided a /** ... */ JD comment, even if empty; otherwise there
184
would be no text generated at all, except the signature and
185
specified-by, as currently done.
186
187
Alt., if a method overrides that in a superclass or implemented
188
inetrface, and does not provide a JavaDoc comment, remove it from the
189
main list of methods; leave it in the "inherited" block in small
190
print, with a note "(overridden)".
191
192
*** Javadoc intro sentence
193
Should also be terminated by '?', '!', etc., acc. to locale.
194
195
*** Inner class references in @see/@link
126
*** Inner class references in @see/@link
196
Do not seem to resolve properly. E.g. from one inner class having
127
Do not seem to resolve properly. E.g. from one inner class having
197
access to another, the unqualified name does not always seem to be
128
access to another, the unqualified name does not always seem to be
Lines 200-211 Link Here
200
*** method summary lines
131
*** method summary lines
201
Surely "final" is as useful to know right off as "abstract",
132
Surely "final" is as useful to know right off as "abstract",
202
"protected", etc.?
133
"protected", etc.?
203
204
*** spaces in anchors
205
Really, really annoying for a variety of reasons, not least of which
206
is that many web browsers will ignore everything after the
207
space. Should at least be option to generate both spaceful and
208
spaceless anchors, and always link to the spaceless ones.
209
134
210
* Write
135
* Write
211
136
(-)openide/api/doc/overview.html (-8 lines)
Lines 100-117 Link Here
100
classloader issues), or allows a custom execution engine (say for profiling) to be
100
classloader issues), or allows a custom execution engine (say for profiling) to be
101
integrated.
101
integrated.
102
102
103
<li> The <a href="org/openide/debugger/doc-files/api.html"><b>Debugger API</b></a>
104
specifies how a Java debugger should interact with the IDE. It may be used to create a
105
module implementing a custom debugger, or to interact with the default system debugger.
106
107
<li> The <a href="org/openide/text/doc-files/api.html"><b>Editor API</b></a> provides
103
<li> The <a href="org/openide/text/doc-files/api.html"><b>Editor API</b></a> provides
108
access to the basic functionality of the Editor and its support for different content
104
access to the basic functionality of the Editor and its support for different content
109
types; and the ability to insert custom editors conforming to the Swing Editor Kit
105
types; and the ability to insert custom editors conforming to the Swing Editor Kit
110
conventions.
106
conventions.
111
112
<li> The <a href="org/openide/src/doc-files/api.html"><b>Java Hierarchy API</b></a>
113
encapsulates the result of either parsing Java source documents, or introspecting on Java
114
classes - a structured representation of the Java class objects and their members.
115
107
116
<li> <a href="org/openide/util/doc-files/api.html"><b>Utility
108
<li> <a href="org/openide/util/doc-files/api.html"><b>Utility
117
Classes</b></a> providing support functionality for the primary
109
Classes</b></a> providing support functionality for the primary
(-)openide/api/doc/changes/apichanges.xml (-1 / +123 lines)
Lines 629-635 Link Here
629
        <class package="org.openide.util" name="HttpServer"/>
629
        <class package="org.openide.util" name="HttpServer"/>
630
        <issue number="14501"/>
630
        <issue number="14501"/>
631
    </change>
631
    </change>
632
    
632
633
    <change id="19443">
634
      <summary>API separation, phase I</summary>
635
      <version major="3" minor="14"/>
636
      <date day="15" month="10" year="2002"/>
637
      <author login="jglick"/>
638
      <compatibility binary="compatible" source="incompatible" deprecation="yes">
639
        <p>
640
          The deprecated classes continue to be available in the module
641
          <code>org.openide.deprecated</code> which you may depend on it you
642
          cannot remove uses of the deprecated APIs. In order for
643
          <code>TopManager.getDefault()</code> to work, you must also require the
644
          token <code>org.openide.TopManager</code>, which is provided by an
645
          unspecified module. The deprecated API module and its implementation
646
          module are autoloads, meaning they will not be loaded unless some
647
          module still requires them.
648
        </p>
649
        <p>
650
          Similarly, the Java Hierarchy API was moved to the module
651
          <code>org.openide.src</code> which you should depend on in order to use
652
          this API.
653
        </p>
654
        <p>
655
          For compatibility, the above three dependencies are added to your module
656
          <em>automatically</em> in case it either requests no specific API
657
          version at all, or requests an API version prior to 3.14. Modules
658
          requesting APIs 3.14 or higher must declare these dependencies
659
          explicitly if they in fact need them.
660
        </p>
661
      </compatibility>
662
      <description>
663
        <p>
664
          Many classes were moved to a separate module,
665
          <samp>openide-deprecated.jar</samp>, not available to modules by
666
          default. Uses of these classes in modules should be cleaned up whenever
667
          possible.
668
        </p>
669
        <p>
670
          Additionally, the entire contents of <code>org.openide.src.*</code> and
671
          <code>org.openide.src.nodes.*</code>, as well as
672
          <code>org.openide.cookies.SourceCookie</code> and some associated
673
          property editors, were moved to a separate module.
674
        </p>
675
        <p>
676
          The most common apparent symptom for module authors will be the absence
677
          of <code>TopManager</code>. Most methods in this class have been
678
          replaced by newer utility classes in a straightforward manner. See the
679
          Upgrade Guide.
680
        </p>
681
      </description>
682
      <class package="org.openide" name="DialogDisplayer"/>
683
      <class package="org.openide" name="LifecycleManager"/>
684
      <class package="org.openide" name="Places"/>
685
      <class package="org.openide" name="TopManager"/>
686
      <class package="org.openide.actions" name="AddWatchAction"/>
687
      <class package="org.openide.actions" name="BuildProjectAction"/>
688
      <class package="org.openide.actions" name="CompileProjectAction"/>
689
      <class package="org.openide.actions" name="DebugProjectAction"/>
690
      <class package="org.openide.actions" name="ExecuteProjectAction"/>
691
      <class package="org.openide.actions" name="FinishDebuggerAction"/>
692
      <class package="org.openide.actions" name="GoAction"/>
693
      <class package="org.openide.actions" name="GoToCursorAction"/>
694
      <class package="org.openide.actions" name="HelpAction"/>
695
      <class package="org.openide.actions" name="OpenProjectAction"/>
696
      <class package="org.openide.actions" name="SaveProjectAction"/>
697
      <class package="org.openide.actions" name="StartDebuggerAction"/>
698
      <class package="org.openide.actions" name="StepOutAction"/>
699
      <class package="org.openide.actions" name="ToggleBreakpointAction"/>
700
      <class package="org.openide.actions" name="TraceIntoAction"/>
701
      <class package="org.openide.actions" name="TraceOverAction"/>
702
      <class package="org.openide.awt" name="HtmlBrowser"/>
703
      <class package="org.openide.awt" name="StatusDisplayer"/>
704
      <class package="org.openide.cookies" name="DebuggerCookie"/>
705
      <class package="org.openide.cookies" name="ElementCookie"/>
706
      <class package="org.openide.cookies" name="ProjectCookie"/>
707
      <class package="org.openide.cookies" name="SourceCookie"/>
708
      <class package="org.openide.explorer.propertysheet.editors" name="ChoicePropertyEditor"/>
709
      <class package="org.openide.explorer.propertysheet.editors" name="DirectoryOnlyEditor"/>
710
      <class package="org.openide.explorer.propertysheet.editors" name="ElementFormatEditor"/>
711
      <class package="org.openide.explorer.propertysheet.editors" name="ExternalCompiler"/>
712
      <class package="org.openide.explorer.propertysheet.editors" name="FileEditor"/>
713
      <class package="org.openide.explorer.propertysheet.editors" name="FileOnlyEditor"/>
714
      <class package="org.openide.explorer.propertysheet.editors" name="IconEditor"/>
715
      <class package="org.openide.explorer.propertysheet.editors" name="IdentifierArrayEditor"/>
716
      <class package="org.openide.explorer.propertysheet.editors" name="MethodParameterArrayEditor"/>
717
      <class package="org.openide.explorer.propertysheet.editors" name="ModifierEditor"/>
718
      <class package="org.openide.explorer.propertysheet.editors" name="StringArrayCustomEditor"/>
719
      <class package="org.openide.explorer.propertysheet.editors" name="StringArrayCustomizable"/>
720
      <class package="org.openide.explorer.propertysheet.editors" name="StringArrayEditor"/>
721
      <class package="org.openide.explorer.propertysheet.editors" name="TypeEditor"/>
722
      <class package="org.openide.loaders" name="DataObjectFilter"/>
723
      <class package="org.openide.loaders" name="ExecSupport"/>
724
      <class package="org.openide.loaders" name="ExecutionSupport"/>
725
      <class package="org.openide.loaders" name="ExtensionListEditor"/>
726
      <class package="org.openide.loaders" name="RepositoryNodeFactory"/>
727
      <class package="org.openide.modules" name="IllegalModuleException"/>
728
      <class package="org.openide.modules" name="ManifestSection"/>
729
      <class package="org.openide.modules" name="ModuleDescription"/>
730
      <class package="org.openide.nodes" name="NodeOperation"/>
731
      <class package="org.openide.options" name="ControlPanel"/>
732
      <class package="org.openide.util.actions" name="ProjectSensitiveAction"/>
733
      <class package="org.openide.windows" name="IOProvider"/>
734
      <package name="org.openide.debugger"/>
735
      <package name="org.openide.src"/>
736
      <package name="org.openide.src.nodes"/>
737
      <issue number="19443"/>
738
      <issue number="20898"/>
739
    </change>
740
633
    <change>
741
    <change>
634
        <api name="datasystems"/>
742
        <api name="datasystems"/>
635
        <summary>Target name of a template wizard may not be set</summary>
743
        <summary>Target name of a template wizard may not be set</summary>
Lines 891-901 Link Here
891
      <summary>The whole <code>org.openide.explorer.propertysheet.editors</code> package is deprecated</summary>
999
      <summary>The whole <code>org.openide.explorer.propertysheet.editors</code> package is deprecated</summary>
892
      <compatibility deprecation="yes"/>
1000
      <compatibility deprecation="yes"/>
893
      <description>
1001
      <description>
1002
        <p>
894
        The entire
1003
        The entire
895
        <code>org.openide.explorer.propertysheet.editors</code>
1004
        <code>org.openide.explorer.propertysheet.editors</code>
896
        package is
1005
        package is
897
        <a href="http://openide.netbeans.org/proposals/ReasonsToDeleteEditorsPackage.html">generally deprecated</a>
1006
        <a href="http://openide.netbeans.org/proposals/ReasonsToDeleteEditorsPackage.html">generally deprecated</a>
898
        and no longer included in Javadoc.
1007
        and no longer included in Javadoc.
1008
        </p>
1009
        <p>
1010
          As of 3.14, this package is again included in the Javadoc, though only
1011
          only a few interfaces remain, and of these several are in fact
1012
          deprecated, and the rest will probably be deprecated at some point.
1013
        </p>
899
      </description>
1014
      </description>
900
      <package name="org.openide.explorer.propertysheet.editors"/>
1015
      <package name="org.openide.explorer.propertysheet.editors"/>
901
    </change>
1016
    </change>
Lines 4200-4205 Link Here
4200
        archive contains fake superclasses for some classes; the fake
4315
        archive contains fake superclasses for some classes; the fake
4201
        superclasses will be inserted into the inheritance tree at runtime and
4316
        superclasses will be inserted into the inheritance tree at runtime and
4202
        include methods and interfaces which are not available in source code.
4317
        include methods and interfaces which are not available in source code.
4318
      </p>
4319
      <p>
4320
        In some cases, old modules (as determined by their declared dependency on
4321
        the Open APIs specification version, if any) are also given automatic
4322
        dependencies on newly split-off API modules. When building from source,
4323
        you will need to change your classpath, but precompiled JARs should run
4324
        as before.
4203
      </p>
4325
      </p>
4204
4326
4205
    </body>
4327
    </body>
(-)openide/api/doc/org/openide/package.html (-21 / +5 lines)
Lines 7-42 Link Here
7
   - http://www.sun.com/
7
   - http://www.sun.com/
8
   - 
8
   - 
9
   - The Original Code is NetBeans. The Initial Developer of the Original
9
   - The Original Code is NetBeans. The Initial Developer of the Original
10
   - Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
   - Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
   - Microsystems, Inc. All Rights Reserved.
11
   - Microsystems, Inc. All Rights Reserved.
12
  -->
12
  -->
13
13
14
<html>
14
<html>
15
<body>
15
<body>
16
16
17
Jumping-off points for all the rest of the IDE's functionality.
17
Miscellaneous general classes.
18
18
19
<p>The
19
<p>See
20
20
21
<a href="TopManager.html"><code>TopManager</code></a>
21
<a href="DialogDisplayer.html"><code>DialogDisplayer</code></a>
22
22
23
documentation should be consulted for a start on how to access any
23
and referenced classes for displaying dialogs.
24
part of the IDE; it provides all of the standard system objects, and
25
can be used to perform a few top-level actions like exiting, showing
26
dialogs, etc.
27
28
<p><code>TopManager.getDefault().<a href="TopManager.html#getPlaces()">getPlaces</a>()</code>
29
30
may be used to get a list of interesting locations (nodes and folders
31
in the IDE).
32
33
<p>The superclass
34
35
<a href="ServiceType.html"><code>ServiceType</code></a>
36
37
is the basis of the
38
39
<a href="doc-files/services-api.html">Services API</a>.
40
24
41
</body>
25
</body>
42
</html>
26
</html>
(-)openide/api/doc/org/openide/actions/doc-files/api.html (-16 / +4 lines)
Lines 596-606 Link Here
596
596
597
is used by the IDE to construct the menu bar for the Main
597
is used by the IDE to construct the menu bar for the Main
598
Window. By default it looks for the proper contents of these menus
598
Window. By default it looks for the proper contents of these menus
599
in the folder given by
599
in the <code>Menu</code> folder in the system file
600
601
<a href="../../Places.Folders.html#menus()"><code>Places.Folders.menus()</code></a>,
602
603
corresponding to the <code>Menu</code> folder in the system file
604
system. To add menu items to the Main Window, for example:
600
system. To add menu items to the Main Window, for example:
605
601
606
<pre>
602
<pre>
Lines 689-699 Link Here
689
to it, you must have a system action with a toolbar presenter
685
to it, you must have a system action with a toolbar presenter
690
(which most do by default); simply add an
686
(which most do by default); simply add an
691
<code>InstanceDataObject</code> providing this action to the
687
<code>InstanceDataObject</code> providing this action to the
692
<code>Data</code> subfolder of
688
<code>Data</code> subfolder of the folder <samp>Toolbars/</samp> in the system filesystem,
693
694
<a href="../../Places.Folders.html#toolbars()"><code>Places.Folders.toolbars()</code></a>
695
696
which on the system filesystem is the folder <samp>Toolbars/</samp>,
697
689
698
ensure the folder ordering is correct, and you should
690
ensure the folder ordering is correct, and you should
699
have a button for your action appear on that toolbar (remember to
691
have a button for your action appear on that toolbar (remember to
Lines 808-818 Link Here
808
800
809
<h3><a name="install-pool">Actions pool</a></h3>
801
<h3><a name="install-pool">Actions pool</a></h3>
810
802
811
The folder obtained by
803
The <samp>Actions/</samp> folder in the system filesystem
812
813
<a href="../../Places.Folders.html#actions()"><code>Places.Folders.actions()</code></a>
814
815
(folder <samp>Actions/</samp>)
816
contains a list of standard actions, as instances in the same style
804
contains a list of standard actions, as instances in the same style
817
as is used for menus and toolbars. The contents of this pool are
805
as is used for menus and toolbars. The contents of this pool are
818
not used directly by the IDE, other than appearing under Session
806
not used directly by the IDE, other than appearing under Session
Lines 835-841 Link Here
835
823
836
Such instances will be used to create the
824
Such instances will be used to create the
837
825
838
<a href="../../TopManager.html#getGlobalKeymap()">global keymap</a>.</p>
826
global keymap (accessible by searching Lookup for <code>Keymap</code>).</p>
839
827
840
<div class="nonnormative">
828
<div class="nonnormative">
841
829
(-)openide/api/doc/org/openide/cookies/package.html (-5 / +3 lines)
Lines 33-51 Link Here
33
33
34
<p>For example, the
34
<p>For example, the
35
35
36
<a href="ExecCookie.html">execution cookie</a>,
36
<a href="ExecCookie.html">execution cookie</a>
37
38
<a href="ArgumentsCookie.html">arguments cookie</a>,
39
37
40
and
38
and
41
39
42
<a href="DebuggerCookie.html">debugger cookie</a>
40
<a href="ArgumentsCookie.html">arguments cookie</a>
43
41
44
specify various ways in which an IDE object (e.g. a compiled class)
42
specify various ways in which an IDE object (e.g. a compiled class)
45
may be invoked; a reasonable implementation for all three may be
43
may be invoked; a reasonable implementation for all three may be
46
created using an
44
created using an
47
45
48
<a href="../loaders/ExecSupport.html">execution support</a>,
46
<a href="../loaders/ExecutionSupport.html">execution support</a>,
49
47
50
which may be attached to an appropriate data object or node.
48
which may be attached to an appropriate data object or node.
51
49
(-)openide/api/doc/org/openide/doc-files/faq.html (-37 / +8 lines)
Lines 267-305 Link Here
267
<b>Q:</b> How do I find a Java class by name in the Repository? What about
267
<b>Q:</b> How do I find a Java class by name in the Repository? What about
268
the source file (or <code>*.class</code> file) it came from?
268
the source file (or <code>*.class</code> file) it came from?
269
269
270
<p><b>A:</b> Use
270
<p><b>A:</b> Use the Classpath API, documented separately from the Open APIs.
271
272
<a href="../src/ClassElement.html#forName(java.lang.String)"><code>ClassElement.forName(String)</code></a>.
273
274
This will give you the class element, if one can be found by that
275
name.
276
277
<p>You can try to look for the file it came from, too. However, be
278
aware that elements do not need to come from any physical source:
279
e.g. <code>ClassElement.forName("java.util.Vector")</code> will
280
probably give you an element that is not based on any file, but
281
rather the live <code>Vector</code> class in the Java VM. With that
282
caveat:
283
284
<pre>
285
ClassElement ce = ClassElement.forName (myClassName);
286
if (ce != null) {
287
    SourceElement se = ce.getSource ();
288
    if (se != null) {
289
        DataObject dob = (DataObject) se.getCookie (DataObject.class);
290
        if (dob != null) {
291
            FileObject fo = dob.getPrimaryFile ();
292
            // check if desired that fo.getExt ().equals ("java"), etc.
293
        } else {
294
            // didn't specify where it came from
295
        }
296
    } else {
297
        // no containing source, probably a class found only in the VM
298
    }
299
} else {
300
    // not found at all
301
}
302
</pre>
303
271
304
<h2><a name="window-dialog">Windows &amp; dialogs</a></h2>
272
<h2><a name="window-dialog">Windows &amp; dialogs</a></h2>
305
273
Lines 324-330 Link Here
324
292
325
<p>You can also use
293
<p>You can also use
326
294
327
<a href="../TopManager.html#notify(org.openide.NotifyDescriptor)"><code>TopManager.notify(NotifyDescriptor)</code></a>
295
<a href="../DialogDisplayer.html#notify(org.openide.NotifyDescriptor)"><code>DialogDisplayer.notify(NotifyDescriptor)</code></a>
328
296
329
to show dialogs that interact well with the IDE's window system,
297
to show dialogs that interact well with the IDE's window system,
330
and have a number of bits of prebuilt UI. You can use various
298
and have a number of bits of prebuilt UI. You can use various
Lines 389-395 Link Here
389
<p><b>A:</b> This is possible using code such as:
357
<p><b>A:</b> This is possible using code such as:
390
358
391
<pre>
359
<pre>
392
DataLoader loader = TopManager.getDefault ().getLoaderPool ().firstProducerOf (SomeDataObject.class);
360
DataLoader loader = ((DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class)).firstProducerOf(SomeDataObject.class);
393
if (loader != null) {
361
if (loader != null) {
394
    SystemAction[] actions = loader.getActions ();
362
    SystemAction[] actions = loader.getActions ();
395
    SystemAction[] newactions = new SystemAction[actions.length + 2];
363
    SystemAction[] newactions = new SystemAction[actions.length + 2];
Lines 649-655 Link Here
649
617
650
<p><b>A:</b> No, the
618
<p><b>A:</b> No, the
651
619
652
<a href="../TopManager.html#getGlobalKeymap()"><code>TopManager.getGlobalKeymap()</code></a>
620
global keymap (get <code>Keymap</code> from Lookup)
653
621
654
is a master keymap for the whole IDE, and like all keymaps accepts
622
is a master keymap for the whole IDE, and like all keymaps accepts
655
only one action per binding. If you want multiple actions to be
623
only one action per binding. If you want multiple actions to be
Lines 680-690 Link Here
680
and use this keystroke to rebind - so user customizations will
648
and use this keystroke to rebind - so user customizations will
681
remain intact.
649
remain intact.
682
650
651
<p>A future version of the APIs will permit more flexibility in binding
652
keys differently according to their context.
653
683
<h2><a name="show-url">Launch internal web browser?</a></h2>
654
<h2><a name="show-url">Launch internal web browser?</a></h2>
684
655
685
<p>Just call
656
<p>Just call
686
657
687
<a href="../TopManager.html#showUrl(java.net.URL)"><code>TopManager.showUrl(URL)</code></a>
658
<a href="../awt/HtmlBrowser.URLDisplayer.html#showURL(java.net.URL)"><code>HtmlBrowser.URLDisplayer.showURL(URL)</code></a>
688
659
689
to open the IDE's default web browser (internal or external) on some
660
to open the IDE's default web browser (internal or external) on some
690
page. If you want to make a menu item to do this, just create a
661
page. If you want to make a menu item to do this, just create a
(-)openide/api/doc/org/openide/doc-files/services-api.html (-52 / +14 lines)
Lines 30-38 Link Here
30
30
31
<p>The standard subclasses are
31
<p>The standard subclasses are
32
32
33
<a href="../compiler/CompilerType.html"><code>CompilerType</code></a>,
33
<a href="../compiler/CompilerType.html"><code>CompilerType</code></a>
34
35
<a href="../debugger/DebuggerType.html"><code>DebuggerType</code></a>,
36
34
37
and
35
and
38
36
Lines 100-106 Link Here
100
introduced to provide for consistent configuration and management of a few very common types of objects that modules can install
98
introduced to provide for consistent configuration and management of a few very common types of objects that modules can install
101
and users can configure.
99
and users can configure.
102
100
103
<p>Presently there are several <em>varieties</em> of services in the IDE - <em>compiler types</em>, <em>debugger types</em>,
101
<p>Presently there are several <em>varieties</em> of services in the IDE - <em>compiler types</em>,
104
<em>executors</em>, <em>script types</em>, and perhaps <em>search types</em>.
102
<em>executors</em>, <em>script types</em>, and perhaps <em>search types</em>.
105
(It is possible for a module to <a href="#variety">add more</a> to this list.)
103
(It is possible for a module to <a href="#variety">add more</a> to this list.)
106
Each variety serves quite a different function in the IDE - the only reason they are grouped together as services is that they
104
Each variety serves quite a different function in the IDE - the only reason they are grouped together as services is that they
Lines 156-168 Link Here
156
154
157
<a href="../compiler/doc-files/api.html#create">Compiler API</a>.
155
<a href="../compiler/doc-files/api.html#create">Compiler API</a>.
158
156
159
<li><a href="../debugger/DebuggerType.html"><code>DebuggerType</code></a>
160
161
is used for objects which know how to invoke the IDE debugger correctly according to the type of file, e.g. default debugging,
162
JPDA debugging, or applet debugging. Details are in the
163
164
<a href="../debugger/doc-files/api.html#createtype">Debugger API</a>.
165
166
<li><a href="../execution/ScriptType.html"><code>ScriptType</code></a>
157
<li><a href="../execution/ScriptType.html"><code>ScriptType</code></a>
167
158
168
permits scripting languages to be plugged in.
159
permits scripting languages to be plugged in.
Lines 291-303 Link Here
291
and a default instance of the service type will be created and made available to the user.
282
and a default instance of the service type will be created and made available to the user.
292
However it is much preferable to <a href="#instance-folders">register them via lookup</a>.
283
However it is much preferable to <a href="#instance-folders">register them via lookup</a>.
293
284
294
<!-- No longer works:
295
It is possible to request that your
296
service type be treated as the IDE default for that variety, unless overridden by data objects with different preferences or
297
user-defined specific associations; this option is most likely to be useful for debugger types, if you are creating a debugger
298
implementation and wish to give a standard default style of debugger invocation.
299
-->
300
301
<p>Normally the manifest section specifies the service type class, and the default constructor is called to make the default
285
<p>Normally the manifest section specifies the service type class, and the default constructor is called to make the default
302
instance. However, you may instead specify a serialized instance in the manifest section, according to the JavaBeans
286
instance. However, you may instead specify a serialized instance in the manifest section, according to the JavaBeans
303
specification, and this preconfigured instance will be installed instead (possibly adding multiple predefined entries to a
287
specification, and this preconfigured instance will be installed instead (possibly adding multiple predefined entries to a
Lines 311-319 Link Here
311
295
312
<h3><a name="use-find">Finding Services</a></h3>
296
<h3><a name="use-find">Finding Services</a></h3>
313
297
314
Services may be found using the registry (available via
298
Services may be found using the registry (available via lookup),
315
316
<a href="../TopManager.html#getServices()"><code>TopManager.getServices()</code></a>),
317
299
318
by using the calls
300
by using the calls
319
301
Lines 321-337 Link Here
321
303
322
(to find an instance by display name), or
304
(to find an instance by display name), or
323
305
324
<a href="../ServiceType.Registry.html#find(java.lang.Class)"><code>ServiceType.Registry.find(Class)</code></a>
306
directly looking up an instance in Lookup by its class.
325
326
(to find the default instance of the specified class).
327
328
Available services can also be listed using
329
330
<a href="../ServiceType.Registry.html#services()"><code>ServiceType.Registry.services()</code></a>;
331
307
332
or more commonly, restricted to some superclass (typically a variety) using
308
Available services can also be listed using lookup.
333
334
<a href="../ServiceType.Registry.html#services(java.lang.Class)"><code>ServiceType.Registry.services(Class)</code></a>.
335
309
336
<p>You may also create handles using
310
<p>You may also create handles using
337
311
Lines 344-359 Link Here
344
318
345
Whenever service types are to be stored, it is desirable to use a handle instead of the actual instance.
319
Whenever service types are to be stored, it is desirable to use a handle instead of the actual instance.
346
320
347
<p>Varieties of service generally have their own convenience accessors, such as
348
349
<a href="../execution/Executor.html#executors()"><code>Executor.executors()</code></a>
350
351
or
352
353
<a href="../execution/Executor.html#find(java.lang.String)"><code>Executor.find(String)</code></a>,
354
355
which just delegate to the more general methods in the service registry.
356
357
<p>Finally, the IDE implementation includes standard property editors for <code>ServiceType</code> as well as some standard
321
<p>Finally, the IDE implementation includes standard property editors for <code>ServiceType</code> as well as some standard
358
varieties, which displays a dialog listing all registered services of that variety, permitting the user to select one, as well as
322
varieties, which displays a dialog listing all registered services of that variety, permitting the user to select one, as well as
359
configure the details of the service instance with a property sheet. Although these property editors are a convenient way to
323
configure the details of the service instance with a property sheet. Although these property editors are a convenient way to
Lines 367-375 Link Here
367
Most data objects which wish to have one or more varieties of service associated with them persistently will use standard
331
Most data objects which wish to have one or more varieties of service associated with them persistently will use standard
368
<em>service supports</em> which are cookie supports available in the APIs. The two existing supports are
332
<em>service supports</em> which are cookie supports available in the APIs. The two existing supports are
369
333
370
<a href="../loaders/ExecSupport.html"><code>ExecSupport</code></a>
334
<a href="../loaders/ExecutionSupport.html"><code>ExecutionSupport</code></a>
371
335
372
(for both <code>Executor</code> and <code>DebuggerType</code> associations) and
336
(for <code>Executor</code> associations) and
373
337
374
<a href="../loaders/CompilerSupport.html"><code>CompilerSupport</code></a>
338
<a href="../loaders/CompilerSupport.html"><code>CompilerSupport</code></a>
375
339
Lines 377-394 Link Here
377
delegating the requested operation to the associated service instance, which is stored persistently in the extended attributes of
341
delegating the requested operation to the associated service instance, which is stored persistently in the extended attributes of
378
the data object's primary file, and which may be accessed via e.g.
342
the data object's primary file, and which may be accessed via e.g.
379
343
380
<a href="../loaders/ExecSupport.html#getExecutor(org.openide.loaders.MultiDataObject.Entry)"><code>ExecSupport.getExecutor(MultiDataObject.Entry)</code></a>
344
<a href="../loaders/ExecutionSupport.html#getExecutor(org.openide.loaders.MultiDataObject.Entry)"><code>ExecutionSupport.getExecutor(MultiDataObject.Entry)</code></a>
381
345
382
and
346
and
383
347
384
<a href="../loaders/ExecSupport.html#setExecutor(org.openide.loaders.MultiDataObject.Entry, org.openide.execution.Executor)"><code>ExecSupport.setExecutor(...)</code></a>.
348
<a href="../loaders/ExecutionSupport.html#setExecutor(org.openide.loaders.MultiDataObject.Entry, org.openide.execution.Executor)"><code>ExecutionSupport.setExecutor(...)</code></a>.
385
349
386
<p>Note that data object templates often come with appropriate service instances preconfigured on them, which will be
350
<p>Note that data object templates often come with appropriate service instances preconfigured on them, which will be
387
automatically applied to objects created from these templates. When no specific association has been made for a particular file
351
automatically applied to objects created from these templates. When no specific association has been made for a particular file
388
(either because the template did not specify one, or because the file in question was created outside the IDE and "discovered" by
352
(either because the template did not specify one, or because the file in question was created outside the IDE and "discovered" by
389
it), the support will use a default instance as specified by e.g.
353
it), the support will use a default instance as specified by e.g.
390
354
391
<a href="../loaders/ExecSupport.html#defaultExecutor()"><code>ExecSupport.defaultExecutor()</code></a>;
355
<a href="../loaders/ExecutionSupport.html#defaultExecutor()"><code>ExecutionSupport.defaultExecutor()</code></a>;
392
356
393
the default implementation will look for the default instance of the default service type for the appropriate variety, but often
357
the default implementation will look for the default instance of the default service type for the appropriate variety, but often
394
data objects (or whatever code is creating a support) will use a customized subclass of the support that overrides this
358
data objects (or whatever code is creating a support) will use a customized subclass of the support that overrides this
Lines 416-422 Link Here
416
380
417
<p>Service supports will also typically provide methods, e.g.
381
<p>Service supports will also typically provide methods, e.g.
418
382
419
<a href="../loaders/ExecSupport.html#addProperties(org.openide.nodes.Sheet.Set)"><code>ExecSupport.addProperties(Sheet.Set)</code></a>,
383
<a href="../loaders/ExecutionSupport.html#addProperties(org.openide.nodes.Sheet.Set)"><code>ExecutionSupport.addProperties(Sheet.Set)</code></a>,
420
384
421
to add one or more properties to a property set permitting the user to configure the desired service instance on the represented
385
to add one or more properties to a property set permitting the user to configure the desired service instance on the represented
422
file. Data objects generally use these methods to build their nodes' property sheets.
386
file. Data objects generally use these methods to build their nodes' property sheets.
Lines 435-441 Link Here
435
<li> Defining the proper abstract methods, or other behavior hooks, in the variety's superclass - i.e. providing an API. This API
399
<li> Defining the proper abstract methods, or other behavior hooks, in the variety's superclass - i.e. providing an API. This API
436
can be present in a module, and other modules may implement it, if desired.
400
can be present in a module, and other modules may implement it, if desired.
437
401
438
<li> Writing supports in the style of <code>ExecSupport</code> to associate the services to files.
402
<li> Writing supports in the style of <code>ExecutionSupport</code> to associate the services to files.
439
403
440
<li> Ensuring that data objects which can take advantage of the variety are aware of it and use the correct support.
404
<li> Ensuring that data objects which can take advantage of the variety are aware of it and use the correct support.
441
405
Lines 543-552 Link Here
543
507
544
<p>Since reflection is used to create the new instance, just as in the
508
<p>Since reflection is used to create the new instance, just as in the
545
realm of JavaBeans, the class must be loadable from your module or
509
realm of JavaBeans, the class must be loadable from your module or
546
otherwise from within the IDE (technically, via
510
otherwise from within the IDE (technically, via the classloader found
547
511
by querying Lookup for <code>ClassLoader</code>);
548
<a href="../TopManager.html#currentClassLoader()"><code>TopManager.currentClassLoader</code></a>);
549
550
public; and have a public no-argument constructor. This form is often
512
public; and have a public no-argument constructor. This form is often
551
used for <em>singleton</em> classes such as system actions: there is
513
used for <em>singleton</em> classes such as system actions: there is
552
no need to specify any parameters to the constructor, any instance
514
no need to specify any parameters to the constructor, any instance
(-)openide/api/doc/org/openide/doc-files/threading.html (-39 / +5 lines)
Lines 158-179 Link Here
158
folder with many files in it is expanded for the first time, and
158
folder with many files in it is expanded for the first time, and
159
objects appear as they are available.
159
objects appear as they are available.
160
160
161
<li>Java Hierarchy element implementations may block for a while
162
when accessing elements below the level of
163
164
<a href="../src/SourceElement.html"><code>SourceElement</code></a>,
165
166
while waiting to parse the source object. For this reason,
167
168
<a href="../src/SourceElement.html#prepare()"><code>SourceElement.prepare()</code></a>
169
170
and related calls is available to permit the parsing to be done
171
172
<a href="#tasked">asynchronously</a>;
173
174
upon completion of the parse, accesses to subelements should be
175
fast.
176
177
<li><a href="../text/CloneableEditorSupport.html#prepareDocument()"><code>CloneableEditorSupport.prepareDocument()</code></a>
161
<li><a href="../text/CloneableEditorSupport.html#prepareDocument()"><code>CloneableEditorSupport.prepareDocument()</code></a>
178
162
179
may be used to load a text document
163
may be used to load a text document
Lines 438-451 Link Here
438
API users can at least be assured that compilation levels will be
422
API users can at least be assured that compilation levels will be
439
run in the proper order.
423
run in the proper order.
440
424
441
<p>Note that the Debugger API is technically completely thread-safe;
442
this is possible since there is no implementation to speak of in
443
it! In practice, a debugger would generally be an external process,
444
which means it would use the execution engine to manage its
445
progress; it is completely up to the debugger implementation to be
446
thread-safe and responsive, as there is no special engine for it to
447
use.
448
449
<h2><a name="tasked">Tasks</a></h2>
425
<h2><a name="tasked">Tasks</a></h2>
450
426
451
For explicit control over the performance of miscellaneous
427
For explicit control over the performance of miscellaneous
Lines 494-512 Link Here
494
API). Most code to really handle modules is present in the private
470
API). Most code to really handle modules is present in the private
495
implementation, and thus has no documented model.
471
implementation, and thus has no documented model.
496
472
497
<dt><a href="../TopManager.html">TopManager and Places</a>
473
<dt><a href="../DialogDisplayer.html"><code>DialogDisplayer</code></a>
498
474
499
<dd>Generally thread-safe;
475
<dd>Generally thread-safe;
500
476
501
<a href="../TopManager.html#notify(org.openide.NotifyDescriptor)"><code>TopManager.notify(...)</code></a>
477
<a href="../DialogDisplayer.html#notify(org.openide.NotifyDescriptor)"><code>DialogDisplayer.notify(...)</code></a>
502
478
503
and similar calls (customize and select nodes) use the event queue in
479
and similar calls (customize and select nodes) use the event queue in
504
GUI mode, however, and is assumed to block (so do not hold any locks
480
GUI mode, however, and is assumed to block (so do not hold any locks
505
when you call it).
481
when you call it).
506
482
507
<a href="../TopManager.html#notifyException(java.lang.Throwable)"><code>TopManager.notifyException(...)</code></a>
483
<dt><a href="../ErrorManager.html#notify(java.lang.Throwable)"><code>ErrorManager.notify(...)</code></a>
508
484
509
is thread-safe.
485
<dd>Thread-safe.
510
486
511
<dt><a href="../filesystems/doc-files/api.html">Filesystems</a>
487
<dt><a href="../filesystems/doc-files/api.html">Filesystems</a>
512
488
Lines 546-552 Link Here
546
<a href="../actions/InstantiateAction.html"><code>InstantiateAction</code></a>);
522
<a href="../actions/InstantiateAction.html"><code>InstantiateAction</code></a>);
547
523
548
create a modal dialog and block on it (or whatever
524
create a modal dialog and block on it (or whatever
549
<code>TopManager.notify</code> and similar do; e.g.
525
<code>DialogDisplayer.notify</code> and similar do; e.g.
550
526
551
<a href="../actions/CustomizeAction.html"><code>CustomizeAction</code></a>);
527
<a href="../actions/CustomizeAction.html"><code>CustomizeAction</code></a>);
552
528
Lines 571-581 Link Here
571
547
572
<dd>As for Compiler.
548
<dd>As for Compiler.
573
549
574
<dt><a href="../debugger/doc-files/api.html">Debugger</a>
575
576
<dd>Unspecified in the APIs (no implementation) - assumed
577
thread-safe.
578
579
<dt><a href="../text/doc-files/api.html">Editor</a>
550
<dt><a href="../text/doc-files/api.html">Editor</a>
580
551
581
<dd>Mostly thread-safe. Text documents should be locked using
552
<dd>Mostly thread-safe. Text documents should be locked using
Lines 583-593 Link Here
583
also be run as a task. Contains a default editor pane
554
also be run as a task. Contains a default editor pane
584
implementation which is displayed in the event queue, though
555
implementation which is displayed in the event queue, though
585
document-related operations are still thread-safe.
556
document-related operations are still thread-safe.
586
587
<dt><a href="../src/doc-files/api.html">Java Hierarchy</a>
588
589
<dd>Thread-safe. Parsing may be run as a task. Element nodes are
590
subject to the same threading model as any other nodes.
591
557
592
<dt><a href="../util/doc-files/api.html">Utility Classes</a>
558
<dt><a href="../util/doc-files/api.html">Utility Classes</a>
593
559
(-)openide/api/doc/org/openide/doc-files/tips.html (-4 / +4 lines)
Lines 437-443 Link Here
437
<li>Nodes can generally be easily tested by creating a new instance
437
<li>Nodes can generally be easily tested by creating a new instance
438
of the node, and then calling
438
of the node, and then calling
439
439
440
<a href="../TopManager.NodeOperation.html#explore(org.openide.nodes.Node)"><code>TopManager.NodeOperation.explore(Node)</code></a>.
440
<a href="../nodes/NodeOperation.html#explore(org.openide.nodes.Node)"><code>NodeOperation.explore(Node)</code></a>.
441
441
442
Especially useful is to call this on a newly created
442
Especially useful is to call this on a newly created
443
443
Lines 454-462 Link Here
454
<li>For testing editor kits (in the Editor API), try registering an
454
<li>For testing editor kits (in the Editor API), try registering an
455
editor kit for the desired content type which, when
455
editor kit for the desired content type which, when
456
<code>clone()</code> is called, does not create a new instance of
456
<code>clone()</code> is called, does not create a new instance of
457
its own class but rather uses the
457
its own class but rather uses
458
458
459
<a href="../TopManager.html#currentClassLoader()"><code>TopManager.currentClassLoader()</code></a>
459
<a href="../execution/NbClassLoader.html"><code>NbClassLoader</code></a>
460
460
461
to load the "real" editor kit to use, which could then be code in
461
to load the "real" editor kit to use, which could then be code in
462
the Repository - so the normal edit-compile-test cycle could be
462
the Repository - so the normal edit-compile-test cycle could be
Lines 480-486 Link Here
480
quick change and recompile. For <code>NodeAction</code>s (including
480
quick change and recompile. For <code>NodeAction</code>s (including
481
<code>CookieAction</code>s), you may want to use
481
<code>CookieAction</code>s), you may want to use
482
482
483
<a href="../TopManager.NodeOperation.html#select(java.lang.String, java.lang.String, org.openide.nodes.Node, org.openide.nodes.NodeAcceptor)"><code>TopManager.NodeOperation.select(...)</code></a>
483
<a href="../nodes/NodeOperation.html#select(java.lang.String, java.lang.String, org.openide.nodes.Node, org.openide.nodes.NodeAcceptor)"><code>NodeOperation.select(...)</code></a>
484
484
485
to permit you to select test nodes to run the action on.
485
to permit you to select test nodes to run the action on.
486
486
(-)openide/api/doc/org/openide/doc-files/typical-uses.html (-1 / +1 lines)
Lines 54-60 Link Here
54
<code>DataObject</code> type), <b>Actions</b>, <b>Nodes</b>,
54
<code>DataObject</code> type), <b>Actions</b>, <b>Nodes</b>,
55
<b>Editor</b>, <b>Interpreter</b>
55
<b>Editor</b>, <b>Interpreter</b>
56
56
57
<dt> JNDI or other hierarchies <dd> <b>Nodes</b>, <b>Places</b>, data-transfer
57
<dt> JNDI or other hierarchies <dd> <b>Nodes</b>, data-transfer
58
58
59
<dt> Custom compiler <dd> <b>Compiler</b>, <b>Actions</b>
59
<dt> Custom compiler <dd> <b>Compiler</b>, <b>Actions</b>
60
60
(-)openide/api/doc/org/openide/doc-files/upgrade.html (+148 lines)
Lines 36-41 Link Here
36
      <ul>
36
      <ul>
37
        <li><a href="#4.0incompat">Notable Incompatibilities</a>
37
        <li><a href="#4.0incompat">Notable Incompatibilities</a>
38
            <ul>
38
            <ul>
39
              <li><a href="#4.0i-sep">Open APIs Separation and Deprecation</a>
39
              <li><a href="#4.0i-indirect-dep-cp">Indirect dependencies do not count for a module's "effective classpath"</a>
40
              <li><a href="#4.0i-indirect-dep-cp">Indirect dependencies do not count for a module's "effective classpath"</a>
40
            </ul>
41
            </ul>
41
        <li><a href="#4.0desired-changes">Desirable Changes in Modules</a>
42
        <li><a href="#4.0desired-changes">Desirable Changes in Modules</a>
Lines 201-206 Link Here
201
202
202
<p>Check for changes here which might cause problems for your module
203
<p>Check for changes here which might cause problems for your module
203
if left uncorrected.</p>
204
if left uncorrected.</p>
205
206
<h3><a name="4.0i-sep">Open APIs Separation and Deprecation</a></h3>
207
208
<p>Many classes in the Open APIs have been deprecated and moved to a
209
separate module, <samp>openide-deprecated.jar</samp>. The Java
210
Hierarchy API and a few associated classes were moved also to
211
<samp>java-src-model.jar</samp>. The core implementations of
212
deprecated APIs were moved to <samp>core-deprecated.jar</samp>.</p>
213
214
<p>Module developers who did not use any of the deprecated API classes
215
to begin with, or who are able and willing to clean up their modules
216
to not use them, should request:</p>
217
218
<pre>
219
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
220
</pre>
221
222
<p>Otherwise they may compile against
223
<samp>openide-deprecated.jar</samp> for the time being and
224
declare:</p>
225
226
<pre>
227
OpenIDE-Module-Module-Dependencies: org.openide.deprecated
228
OpenIDE-Module-Requires: org.openide.TopManager
229
</pre>
230
231
<p>Modules which wish to use the Java Hierarchy API may compile
232
against <samp>java-src-model.jar</samp> and declare:</p>
233
234
<pre>
235
OpenIDE-Module-Module-Dependencies: org.openide.src
236
</pre>
237
238
<p>For compatibility, modules with no <samp>IDE/1</samp> dependency,
239
or a dependency older than 3.14, will be automatically given the three
240
dependencies above at runtime. The three new modules are autoloads, so
241
they will only be loaded if at least one module requests them
242
(explicitly or implicitly).</p>
243
244
<p>See the Open APIs Changes List for a complete list of classes and
245
packages which were deprecated. The ones which were most commonly used
246
are:</p>
247
248
<dl>
249
250
<dt><code>org.openide.TopManager</code>
251
252
<dd>
253
254
<p>All methods from this class are deprecated. Most of the getter
255
methods can be replaced by using
256
<code>Lookup.getDefault().lookup(InterfaceClass.class)</code>.</p>
257
258
<p>Most utility methods, such as showing a URL, displaying status
259
text, etc., have been replaced by separate utility classes with
260
similar semantics, all of which have a <code>getDefault()</code>
261
method:</p>
262
263
<ul>
264
<li><code>org.openide.DialogManager</code></li>
265
<li><code>org.openide.LifecycleManager</code></li>
266
<li><code>org.openide.awt.HtmlBrowser.URLDisplayer</code></li>
267
<li><code>org.openide.awt.StatusDisplayer</code></li>
268
<li><code>org.openide.loaders.RepositoryNodeFactory</code></li>
269
<li><code>org.openide.nodes.NodeOperation</code></li>
270
<li><code>org.openide.windows.IOProvider</code></li>
271
</ul>
272
273
<p>Showing help should be done using the JavaHelp API module.</p>
274
275
<p><code>systemClassLoader()</code> should be replaced with lookup on
276
<code>ClassLoader.class</code>. <code>currentClassLoader</code> has no
277
undeprecated equivalent, since it misuses the Java classpath; for now,
278
use <code>NbClassLoader</code> (you may wish to add
279
<code>AllPermissions</code> to a subclass in some cases).</p>
280
281
<p>Forcible initialization of the NetBeans core using
282
<code>TopManager.getDefault()</code> (in standalone applications,
283
tests, and scripts) can in some cases be deleted, since many services
284
are now available standalone. If it is necessary to force modules to
285
be loaded, ask lookup for <code>ModuleInfo.class</code> to scan for
286
and install modules, as well as performing other unspecified
287
initialization activities in the core.</p>
288
289
<dt><code>org.openide.Places</code>
290
291
<dd>
292
293
<p>Everything here is deprecated. To find folders, find them by file
294
path on the system filesystem:
295
<code>Repository.getDefault().getDefaultFileSystem()</code>. Most
296
nodes are no longer made available to modules, as they are details of
297
the GUI implementation, but see <code>RepositoryNodeFactory</code> for
298
<code>repository()</code>.</p>
299
300
<dt><code>org.openide.debugger.*</code> and related cookies, actions,
301
and <code>org.openide.loaders.ExecSupport</code>
302
303
<dd>
304
305
<p>The Debugger API is deprecated, as it never really exposed the
306
actual power of the <code>debuggercore</code> module. As of this
307
writing, a full replacement is still pending. <code>ExecSupport</code>
308
may be replaced by <code>org.openide.loaders.ExecutionSupport</code>
309
which provides just the ability to select an <code>Executor</code>,
310
without referring to debugger types.</p>
311
312
<dt><code>org.openide.cookies.ElementCookie</code> and
313
<code>org.openide.loaders.DataObjectFilter</code>
314
315
<dd>
316
317
<p>Ancient APIs used only by the old Object Browser. Should be
318
replaced by the Looks API when available.</p>
319
320
<dt><code>org.openide.cookies.ProjectCookie</code> and related actions
321
322
<dd>
323
324
<p>Will be obsoleted by the new projects system.</p>
325
326
<dt>Many classes in
327
<code>org.openide.explorer.propertysheet.editors.*</code>, and
328
<code>org.openide.loaders.ExtensionListEditor</code>
329
330
<dd>
331
332
<p>These property editor implementations are obsolete. Simply declare
333
your properties to be of the correct type, and often a suitable editor
334
will be found automatically. For cases where more control is needed,
335
hints may be passed to the property editor implementation; see the
336
Explorer API.</p>
337
338
<dt><code>org.openide.options.ControlPanel</code>, several classes in
339
<code>org.openide.modules.*</code>, and
340
<code>org.openide.actions.HelpAction</code>
341
342
<dd>
343
344
<p>Various classes which have not been used in the APIs or core for
345
some time and can be considered obsolete.</p>
346
347
</dl>
348
349
<p>For more details, see
350
351
<a href="http://www.netbeans.org/issues/show_bug.cgi?id=19443">issue #19443</a>.</p>
204
352
205
<h3><a name="4.0i-indirect-dep-cp">Indirect dependencies do not count for a module's "effective classpath"</a></h3>
353
<h3><a name="4.0i-indirect-dep-cp">Indirect dependencies do not count for a module's "effective classpath"</a></h3>
206
354
(-)openide/api/doc/org/openide/doc-files/xray.html (-33 / +32 lines)
Lines 87-97 Link Here
87
87
88
of the <code>Templates</code> subdirectory of the
88
of the <code>Templates</code> subdirectory of the
89
89
90
<a href="../filesystems/Repository.html#getDefaultFileSystem()">system filesystem</a>,
90
<a href="../filesystems/Repository.html#getDefaultFileSystem()">system filesystem</a>.
91
92
which may be obtained easily via
93
94
<a href="../Places.Folders.html#templates()"><code>Places.Folders.templates()</code></a>.
95
91
96
It specially looks for
92
It specially looks for
97
93
Lines 164-170 Link Here
164
160
165
by the data object). The selector is invoked on the Repository,
161
by the data object). The selector is invoked on the Repository,
166
162
167
<a href="../Places.Nodes.html#repository(org.openide.loaders.DataFilter)">filtered</a>
163
<a href="../loaders/RepositoryNodeFactory.html#repository(org.openide.loaders.DataFilter)">filtered</a>
168
164
169
to only display directories.
165
to only display directories.
170
166
Lines 243-249 Link Here
243
details of constructing the Editor window, loading the document,
239
details of constructing the Editor window, loading the document,
244
and many other things.
240
and many other things.
245
241
246
(<a href="../TopManager.html#setStatusText(java.lang.String)"><code>TopManager.setStatusText(...)</code></a>
242
(<a href="../awt/StatusDisplayer.html#setStatusText(java.lang.String)"><code>StatusDisplayer.setStatusText(...)</code></a>
247
243
248
can handle the message - this is done automatically by
244
can handle the message - this is done automatically by
249
<code>DataEditorSupport</code> in
245
<code>DataEditorSupport</code> in
Lines 296-307 Link Here
296
them. A regular Java source file (as determined by the Java Source
292
them. A regular Java source file (as determined by the Java Source
297
module) has a node containing the structure of its source-code
293
module) has a node containing the structure of its source-code
298
294
299
<a href="../src/Element.html">elements</a>
295
elements
300
296
301
within it, e.g. the top-level class, its methods, etc. - these
297
within it, e.g. the top-level class, its methods, etc. - these
302
subnodes are generally created using
298
subnodes are generally created using
303
299
304
<a href="../src/nodes/SourceChildren.html"><code>SourceChildren</code></a>.
300
<code>SourceChildren</code>.
305
301
306
A form node then adds an extra subhierarchy corresponding to the
302
A form node then adds an extra subhierarchy corresponding to the
307
AWT component structure of the form - all of these subnodes are
303
AWT component structure of the form - all of these subnodes are
Lines 436-442 Link Here
436
432
437
<p>The
433
<p>The
438
434
439
<a href="../src/package-summary.html">Java Hierarchy API</a>
435
Java Hierarchy API
440
436
441
could also be used to perform these modifications, but that would
437
could also be used to perform these modifications, but that would
442
have the disadvantage that if the user was actively editing "inert"
438
have the disadvantage that if the user was actively editing "inert"
Lines 658-664 Link Here
658
the proper <code>main</code> function, say). This cookie is
654
the proper <code>main</code> function, say). This cookie is
659
implemented by
655
implemented by
660
656
661
<a href="../loaders/ExecSupport.html"><code>ExecSupport</code></a>,
657
<a href="../loaders/ExecutionSupport.html"><code>ExecutionSupport</code></a>,
662
658
663
which permits the user to choose from among standard
659
which permits the user to choose from among standard
664
660
Lines 666-672 Link Here
666
662
667
installed in the system - it may be used to
663
installed in the system - it may be used to
668
664
669
<a href="../loaders/ExecSupport.html#addProperties(org.openide.nodes.Sheet.Set)">add node properties</a>
665
<a href="../loaders/ExecutionSupport.html#addProperties(org.openide.nodes.Sheet.Set)">add node properties</a>
670
666
671
to the data object's node representing the current choice (there is
667
to the data object's node representing the current choice (there is
672
a standard property editor which lists the choices in a
668
a standard property editor which lists the choices in a
Lines 684-690 Link Here
684
(corresponding to external and internal execution, resp.). The user
680
(corresponding to external and internal execution, resp.). The user
685
of this tutorial did not specify which to use, so one is already
681
of this tutorial did not specify which to use, so one is already
686
selected as the default, probably <code>ProcessExecutor</code>. Now
682
selected as the default, probably <code>ProcessExecutor</code>. Now
687
the <code>ExecSupport</code> when asked to run the frame, calls
683
the <code>ExecutionSupport</code> when asked to run the frame, calls
688
684
689
<a href="../execution/Executor.html#execute(org.openide.execution.ExecInfo)"><code>Executor.execute(ExecInfo)</code></a>;
685
<a href="../execution/Executor.html#execute(org.openide.execution.ExecInfo)"><code>Executor.execute(ExecInfo)</code></a>;
690
686
Lines 756-761 Link Here
756
	track the state of threads, and more.  All of this can be done in an easy
752
	track the state of threads, and more.  All of this can be done in an easy
757
	and intuitive graphical user interface.</i></b>
753
	and intuitive graphical user interface.</i></b>
758
754
755
        <p><strong>Warning:</strong> much of the following section is obsolete due to changes
756
        in the Debugger API.</p>
757
759
	<P><FONT COLOR="#96252B"><B>Preliminary Setup :</B></FONT>
758
	<P><FONT COLOR="#96252B"><B>Preliminary Setup :</B></FONT>
760
759
761
	<UL>
760
	<UL>
Lines 768-774 Link Here
768
767
769
<br>This is also available as a popup menu under the
768
<br>This is also available as a popup menu under the
770
769
771
<a href="../Places.Nodes.html#repository()">Repository node</a>,
770
<a href="../loaders/RepositoryNodeFactory.html#repository(org.openide.loaders.DataFilter)">Repository node</a>,
772
771
773
either as an explicit action, or as a
772
either as an explicit action, or as a
774
773
Lines 776-782 Link Here
776
775
777
filesystem
776
filesystem
778
777
779
<a href="../modules/ModuleDescription.html#SECTION_FILESYSTEM">installed</a>
778
installed
780
779
781
into the system appears as a potential addition. Selecting one
780
into the system appears as a potential addition. Selecting one
782
causes a new instance to be constructed and
781
causes a new instance to be constructed and
Lines 841-853 Link Here
841
840
842
to make the
841
to make the
843
842
844
<a href="../actions/ToggleBreakpointAction.html"><code>ToggleBreakpointAction</code></a>
843
<code>ToggleBreakpointAction</code>
845
844
846
do the right thing. It must find where the user currently has the
845
do the right thing. It must find where the user currently has the
847
cursor positioned in the document (as usual, the Swing
846
cursor positioned in the document (as usual, the Swing
848
<code>Document</code> interface is used for this), then both
847
<code>Document</code> interface is used for this), then both
849
848
850
<a href="../debugger/Debugger.html#createBreakpoint(org.openide.text.Line)">adds</a>
849
adds
851
850
852
a breakpoint to the current debugger implementation, and
851
a breakpoint to the current debugger implementation, and
853
852
Lines 877-918 Link Here
877
876
878
<br>The
877
<br>The
879
878
880
<a href="../actions/GoAction.html"><code>GoAction</code></a>
879
<code>GoAction</code>
881
880
882
does not do much itself. Basically, it makes sure the selected node
881
does not do much itself. Basically, it makes sure the selected node
883
is debuggable by looking for a
882
is debuggable by looking for a
884
883
885
<a href="../cookies/DebuggerCookie.html"><code>DebuggerCookie</code></a>;
884
<code>DebuggerCookie</code>;
886
885
887
spawns a new thread (since the debugging should be started as soon
886
spawns a new thread (since the debugging should be started as soon
888
as possible, but may take a while to "warm up"); automatically
887
as possible, but may take a while to "warm up"); automatically
889
compiles the file in the same way as mentioned above for execution;
888
compiles the file in the same way as mentioned above for execution;
890
and finally hands off the real work to
889
and finally hands off the real work to
891
890
892
<a href="../cookies/DebuggerCookie.html#debug(boolean)"><code>DebuggerCookie.debug(...)</code></a>.
891
<code>DebuggerCookie.debug(...)</code>.
893
892
894
<p>Normally this cookie will be implemented by an
893
<p>Normally this cookie will be implemented by an
895
894
896
<a href="../loaders/ExecSupport.html"><code>ExecSupport</code></a>
895
<a href="../loaders/ExecutionSupport.html"><code>ExecutionSupport</code></a>
897
896
898
(a very useful cookie support to use!), which gets the
897
(a very useful cookie support to use!), which gets the
899
correct
898
correct
900
899
901
<a href="../debugger/DebuggerType.html"><code>DebuggerType</code></a>
900
<code>DebuggerType</code>
902
901
903
describing how to launch the process in the debugger, which in turn
902
describing how to launch the process in the debugger, which in turn
904
gets the
903
gets the
905
904
906
<a href="../TopManager.html#getDebugger()">system debugger</a>,
905
system debugger,
907
906
908
then goes ahead and
907
then goes ahead and
909
908
910
<a href="../debugger/Debugger.html#startDebugger(org.openide.debugger.DebuggerInfo)">starts it</a>.
909
starts it.
911
910
912
<p>It is up to the installed Debugger module to determine exactly
911
<p>It is up to the installed Debugger module to determine exactly
913
what to do during debugging, provided it implements the basic
912
what to do during debugging, provided it implements the basic
914
913
915
<a href="../debugger/Debugger.html"><code>Debugger</code></a>
914
<code>Debugger</code>
916
915
917
interface
916
interface
918
to permit itself to be controlled in a few ways by other components
917
to permit itself to be controlled in a few ways by other components
Lines 933-939 Link Here
933
932
934
<br>Breakpoints and watches are specified in general terms by the
933
<br>Breakpoints and watches are specified in general terms by the
935
934
936
<a href="../debugger/package-summary.html">Debugger API</a>;
935
Debugger API;
937
936
938
however the debugger module is providing nodes to represent them
937
however the debugger module is providing nodes to represent them
939
visually to the user (and present an alternative way of organizing
938
visually to the user (and present an alternative way of organizing
Lines 960-966 Link Here
960
959
961
<br>When the debugger halts at a breakpoint, it
960
<br>When the debugger halts at a breakpoint, it
962
961
963
<a href="../debugger/Debugger.html#DEBUGGER_STOPPED">notifies</a>
962
notifies
964
963
965
the system of this, and also finds the Java source file where the
964
the system of this, and also finds the Java source file where the
966
breakpoint was set - for example, using
965
breakpoint was set - for example, using
Lines 1000-1006 Link Here
1000
999
1001
<br>All of these actions simply invoke the proper method on the
1000
<br>All of these actions simply invoke the proper method on the
1002
1001
1003
<a href="../debugger/Debugger.html"><code>Debugger</code></a>
1002
<code>Debugger</code>
1004
1003
1005
interface, the implementation of which controls the JDK debugger
1004
interface, the implementation of which controls the JDK debugger
1006
agent (in this case).
1005
agent (in this case).
Lines 1077-1087 Link Here
1077
is provided: here, the current value of a watch is accessible to
1076
is provided: here, the current value of a watch is accessible to
1078
the system (as well as the node representative) via
1077
the system (as well as the node representative) via
1079
1078
1080
<a href="../debugger/Watch.html#getAsText()"><code>Watch.getAsText()</code></a>,
1079
<code>Watch.getAsText()</code>,
1081
1080
1082
and standard Java property changes are fired on
1081
and standard Java property changes are fired on
1083
1082
1084
<a href="../debugger/Watch.html#PROP_AS_TEXT"><code>Watch.PROP_AS_TEXT</code></a>
1083
<code>Watch.PROP_AS_TEXT</code>
1085
1084
1086
whenever this text changes.
1085
whenever this text changes.
1087
1086
Lines 1106-1116 Link Here
1106
1105
1107
<br>Both
1106
<br>Both
1108
1107
1109
<a href="../debugger/Breakpoint.html"><code>Breakpoint</code></a>
1108
<code>Breakpoint</code>
1110
1109
1111
and
1110
and
1112
1111
1113
<a href="../debugger/Watch.html"><code>Watch</code></a>
1112
<code>Watch</code>
1114
1113
1115
are serializable, and the set of them is stored using serialization
1114
are serializable, and the set of them is stored using serialization
1116
while the IDE is shut down (the IDE core handles this
1115
while the IDE is shut down (the IDE core handles this
Lines 1124-1130 Link Here
1124
1123
1125
<br>Again, this action just calls
1124
<br>Again, this action just calls
1126
1125
1127
<a href="../debugger/Debugger.html#finishDebugger()"><code>Debugger.finishDebugger()</code></a>
1126
<code>Debugger.finishDebugger()</code>
1128
1127
1129
and the debugger implementation handles the details of stopping the
1128
and the debugger implementation handles the details of stopping the
1130
process, cleaning up the "current line" marks in the Editor window,
1129
process, cleaning up the "current line" marks in the Editor window,
(-)openide/api/doc/org/openide/execution/doc-files/api.html (-17 / +8 lines)
Lines 113-119 Link Here
113
113
114
<li>The preferred approach, though, is to use
114
<li>The preferred approach, though, is to use
115
115
116
<a href="../../loaders/ExecSupport.html#getExecutor(org.openide.loaders.MultiDataObject.Entry)"><code>ExecSupport.getExecutor(...)</code></a>,
116
<a href="../../loaders/ExecutionSupport.html#getExecutor(org.openide.loaders.MultiDataObject.Entry)"><code>ExecutionSupport.getExecutor(...)</code></a>,
117
117
118
which permits data loaders to specify a particular executor to use on
118
which permits data loaders to specify a particular executor to use on
119
a class (actually, the data object containing it). For example, a data
119
a class (actually, the data object containing it). For example, a data
Lines 138-144 Link Here
138
138
139
Note that
139
Note that
140
140
141
<a href="../../loaders/ExecSupport.html#getArguments(org.openide.loaders.MultiDataObject.Entry)"><code>ExecSupport.getArguments(MultiDataObject.Entry)</code></a>
141
<a href="../../loaders/ExecutionSupport.html#getArguments(org.openide.loaders.MultiDataObject.Entry)"><code>ExecutionSupport.getArguments(MultiDataObject.Entry)</code></a>
142
142
143
may be used to get default arguments for the class, which the user may
143
may be used to get default arguments for the class, which the user may
144
set appropriately.
144
set appropriately.
Lines 661-674 Link Here
661
661
662
<li>You may use
662
<li>You may use
663
663
664
<a href="../../TopManager.html#getIO(java.lang.String)"><code>TopManager.getIO(String)</code></a>
664
<a href="../../windows/IOProvider.html#getIO(java.lang.String, boolean)"><code>IOProvider.getIO(String,boolean)</code></a>
665
665
666
to create an Output Window tab with a specified name and return its
666
to create an Output Window tab with a specified name and return its
667
<code>InputOutput</code> representative. Or, use
667
<code>InputOutput</code> representative. Or, try to reuse an existing tab of the same name, if there is one.
668
669
<a href="../../TopManager.html#getIO(java.lang.String, boolean)"><code>TopManager.getIO(String,false)</code></a>
670
671
to try to reuse an existing tab of the same name, if there is one.
672
668
673
<li>If
669
<li>If
674
670
Lines 714-720 Link Here
714
using dynamic scope.
710
using dynamic scope.
715
(You may obtain the <code>ExecutionEngine</code> via
711
(You may obtain the <code>ExecutionEngine</code> via
716
712
717
<code>TopManager.<a href="../../TopManager.html#getDefault()">getDefault</a>().<a href="../../TopManager.html#getExecutionEngine()">getExecutionEngine</a>()</code>.)
713
<code>ExecutionEngine.<a href="../ExecutionEngine.html#getDefault()">getDefault</a>()</code>.)
718
714
719
The supplied <code>Runnable</code> is run
715
The supplied <code>Runnable</code> is run
720
asynchronously in its own thread and thread group, i.e. well-isolated
716
asynchronously in its own thread and thread group, i.e. well-isolated
Lines 793-807 Link Here
793
creates a special classloader that is aware of an
789
creates a special classloader that is aware of an
794
<code>InputOutput</code> obtained as above. Normally
790
<code>InputOutput</code> obtained as above. Normally
795
<code>NbClassLoader</code> is just used to load classes from the
791
<code>NbClassLoader</code> is just used to load classes from the
796
Repository, and is used e.g. by
792
Repository. This constructor,
797
798
<a href="../../TopManager.html#currentClassLoader()"><code>TopManager.currentClassLoader()</code></a>
799
800
(which also refreshes the classloader as needed). This constructor,
801
however, is "magic" in that it will still load classes from the
793
however, is "magic" in that it will still load classes from the
802
Repository (always giving preference to its parent
794
Repository (always giving preference to its parent
803
795
class loader),
804
<a href="../../TopManager.html#systemClassLoader()"><code>TopManager.systemClassLoader()</code></a>),
805
796
806
but I/O calls quasi-lexically contained in such classes (i.e. made
797
but I/O calls quasi-lexically contained in such classes (i.e. made
807
directly by such a class, or by other invoked code when such a class
798
directly by such a class, or by other invoked code when such a class
Lines 834-840 Link Here
834
restricted from security-sensitive calls (but do not count on it).
825
restricted from security-sensitive calls (but do not count on it).
835
Such code can still call
826
Such code can still call
836
827
837
<a href="../../TopManager.html#exit()"><code>TopManager.exit()</code></a>
828
<a href="../../LifecycleManager.html#exit()"><code>LifecycleManager.exit()</code></a>
838
829
839
to explicitly exit the IDE.
830
to explicitly exit the IDE.
840
831
(-)openide/api/doc/org/openide/explorer/doc-files/api.html (-2 / +2 lines)
Lines 136-142 Link Here
136
136
137
Probably the easiest way to pop up an Explorer window is just to call
137
Probably the easiest way to pop up an Explorer window is just to call
138
138
139
<a href="../../TopManager.NodeOperation.html#explore(org.openide.nodes.Node)"><code>TopManager.NodeOperation.explore(...)</code></a>.
139
<a href="../../nodes/NodeOperation.html#explore(org.openide.nodes.Node)"><code>NodeOperation.explore(...)</code></a>.
140
140
141
This will simply show a node and its subtree (if any) in a new window
141
This will simply show a node and its subtree (if any) in a new window
142
using the normal tree-style Explorer view. It does not permit any
142
using the normal tree-style Explorer view. It does not permit any
Lines 476-482 Link Here
476
            p.setValue("files", Boolean.FALSE); // passing the custom property value here
476
            p.setValue("files", Boolean.FALSE); // passing the custom property value here
477
            s.get (Sheet.PROPERTIES).put(p);
477
            s.get (Sheet.PROPERTIES).put(p);
478
        } catch (Exception ex) {
478
        } catch (Exception ex) {
479
            TopManager.getDefault().getErrorManager ().notify (ex);
479
            ErrorManager.getDefault().notify(ex);
480
        }
480
        }
481
        return s;
481
        return s;
482
    }
482
    }
(-)openide/api/doc/org/openide/filesystems/doc-files/api.html (-3 / +3 lines)
Lines 143-149 Link Here
143
Explorer), but if that is necessary it is not difficult:
143
Explorer), but if that is necessary it is not difficult:
144
144
145
<pre>
145
<pre>
146
<a href="../Repository.html">Repository</a> repo=<a href="../../TopManager.html#getDefault()">TopManager.getDefault</a>().<a href="../../TopManager.html#getRepository()">getRepository</a>();
146
<a href="../Repository.html">Repository</a> repo=<a href="../Repository.html#getDefault()">Repository.getDefault</a>();
147
<a href="../LocalFileSystem.html">LocalFileSystem</a> fs=new LocalFileSystem();
147
<a href="../LocalFileSystem.html">LocalFileSystem</a> fs=new LocalFileSystem();
148
fs.<a href="../LocalFileSystem.html#setRootDirectory(java.io.File)">setRootDirectory</a>(new File("c:\\some directory\\"));
148
fs.<a href="../LocalFileSystem.html#setRootDirectory(java.io.File)">setRootDirectory</a>(new File("c:\\some directory\\"));
149
repo.<a href="../Repository.html#addFileSystem(org.openide.filesystems.FileSystem)">addFileSystem</a>(fs);
149
repo.<a href="../Repository.html#addFileSystem(org.openide.filesystems.FileSystem)">addFileSystem</a>(fs);
Lines 284-290 Link Here
284
284
285
<pre>
285
<pre>
286
URL url=<a href="../FileObject.html#getURL()">file.getURL ()</a>;
286
URL url=<a href="../FileObject.html#getURL()">file.getURL ()</a>;
287
TopManager.getDefault().<a href="../../TopManager.html#showUrl(java.net.URL)">showUrl</a>(url);
287
HtmlBrowser.URLDisplayer.getDefault().<a href="../../awt/HtmlBrowser.URLDisplayer.html#showURL(java.net.URL)">showURL</a>(url);
288
</pre>
288
</pre>
289
289
290
<h3><a name="create-delete-rename">Creating, deleting, and renaming files and folders</a></h3>
290
<h3><a name="create-delete-rename">Creating, deleting, and renaming files and folders</a></h3>
Lines 739-745 Link Here
739
attributes - for example, the arguments for a file to be executed
739
attributes - for example, the arguments for a file to be executed
740
are stored by
740
are stored by
741
741
742
<a href="../../loaders/ExecSupport.html"><code>ExecSupport</code></a>
742
<a href="../../loaders/ExecutionSupport.html"><code>ExecutionSupport</code></a>
743
743
744
in the file's attributes. So for writable filesystems, these
744
in the file's attributes. So for writable filesystems, these
745
attributes should generally be supported; normally the <a
745
attributes should generally be supported; normally the <a
(-)openide/api/doc/org/openide/loaders/doc-files/api.html (-27 / +4 lines)
Lines 640-664 Link Here
640
special node subclass for the delegate, as you may provide an icon,
640
special node subclass for the delegate, as you may provide an icon,
641
cookies, and common actions without doing so.
641
cookies, and common actions without doing so.
642
642
643
<p>For data objects which ought to have a different representation
644
in the Object Browser (or others users of
645
646
<a href="../DataObjectFilter.html"><code>DataObjectFilter</code></a>)
647
648
than in the Explorer, you should
649
650
<a href="#write-support">provide</a>
651
652
an implementation of
653
654
<a href="../../cookies/ElementCookie.html"><code>ElementCookie</code></a>,
655
656
whose alternate node may also usefully provide
657
658
<a href="../../cookies/FilterCookie.html">filtering support</a>.
659
660
In this case, the normal node delegate is not used.
661
662
<h3><a name="sys-loaders">System loaders</a></h3>
643
<h3><a name="sys-loaders">System loaders</a></h3>
663
644
664
The IDE installs a few extra "hidden" loaders into the loader pool, as
645
The IDE installs a few extra "hidden" loaders into the loader pool, as
Lines 838-861 Link Here
838
method, which will be invoked as from the Java launcher. So, the
819
method, which will be invoked as from the Java launcher. So, the
839
standard support
820
standard support
840
821
841
<a href="../ExecSupport.html"><code>ExecSupport</code></a>
822
<a href="../ExecutionSupport.html"><code>ExecutionSupport</code></a>
842
823
843
performs this scanning for the main method, construction of the proper
824
performs this scanning for the main method, construction of the proper
844
execution engine, and so on. It also happens to implement
825
execution engine, and so on. It also happens to implement
845
826
846
<a href="../../cookies/ArgumentsCookie.html"><code>ArgumentsCookie</code></a>
827
<a href="../../cookies/ArgumentsCookie.html"><code>ArgumentsCookie</code></a>,
847
848
and
849
850
<a href="../../cookies/DebuggerCookie.html"><code>DebuggerCookie</code></a>,
851
828
852
since these cookies are also appropriate under the same
829
since this cookie is also appropriate under the same
853
conditions. So, whatever data loader is responsible for creating data
830
conditions. So, whatever data loader is responsible for creating data
854
objects corresponding to compiled class files makes sure that any
831
objects corresponding to compiled class files makes sure that any
855
class files with a <code>main</code> have this support associated with
832
class files with a <code>main</code> have this support associated with
856
them, passing in the relevant file entry in the
833
them, passing in the relevant file entry in the
857
834
858
<a href="../ExecSupport.html#ExecSupport(org.openide.loaders.MultiDataObject.Entry)">constructor</a>.
835
<a href="../ExecutionSupport.html#ExecutionSupport(org.openide.loaders.MultiDataObject.Entry)">constructor</a>.
859
836
860
The node delegates for these classes will also implicitly contain the
837
The node delegates for these classes will also implicitly contain the
861
same cookies, of course, so the user is able to invoke the Execute
838
same cookies, of course, so the user is able to invoke the Execute
(-)openide/api/doc/org/openide/modules/doc-files/api.html (-54 / +8 lines)
Lines 59-65 Link Here
59
<li> <a href="#sec-action">Action</a>
59
<li> <a href="#sec-action">Action</a>
60
<li> <a href="#sec-option">Option</a>
60
<li> <a href="#sec-option">Option</a>
61
<li> <a href="#sec-loader">Data loader</a>
61
<li> <a href="#sec-loader">Data loader</a>
62
<li> <a href="#sec-debugger">Debugger</a>
63
<li> <a href="#sec-executor">Service</a>
62
<li> <a href="#sec-executor">Service</a>
64
<li> <a href="#sec-filesystem">Filesystem</a>
63
<li> <a href="#sec-filesystem">Filesystem</a>
65
<li> <a href="#sec-environment">Node</a>
64
<li> <a href="#sec-environment">Node</a>
Lines 359-367 Link Here
359
    restored ();
358
    restored ();
360
  }
359
  }
361
360
362
  public void <a href="../ModuleInstall.html#restored()">restored</a>() {
361
  // Nothing special required here.
363
    <a href="../../filesystems/FileUtil.html#setMIMEType(java.lang.String, java.lang.String)">FileUtil.setMIMEType</a>("test", "text/x-clipboard-content-test");
362
  // public void <a href="../ModuleInstall.html#restored()">restored</a>() {
364
  }
363
  // }
365
364
366
  // Do not need to do anything special on uninstall.
365
  // Do not need to do anything special on uninstall.
367
  // Tools action will be removed automatically.
366
  // Tools action will be removed automatically.
Lines 376-409 Link Here
376
}
375
}
377
</pre>
376
</pre>
378
377
379
Some common things that module main classes tend to do:
380
381
<ol>
382
383
<li>Install
384
385
<a href="@JDK@/javax/swing/JEditorPane.html#registerEditorKitForContentType(java.lang.String, java.lang.String)">editor kits</a>.
386
387
<!-- Deprecated as of Mar 8 '01:
388
<li>Install an
389
390
<a href="../../awt/HtmlBrowser.html#setFactory(org.openide.awt.HtmlBrowser.Factory)">HTML browser</a>.
391
-->
392
393
<!-- Deprecated as of Apr 12 '02:
394
<li>Or, install an
395
396
<a href="../../util/HttpServer.html#registerServer(org.openide.util.HttpServer.Impl)">HTTP server</a>.
397
-->
398
399
<li>Install a
400
401
<a href="../../src/ClassElement.html#register(org.openide.src.ClassElement.Finder)">class element finder</a>
402
403
into the system.
404
405
</ol>
406
407
</div>
378
</div>
408
379
409
<p>The <code>installed</code> handler may do more or less what it
380
<p>The <code>installed</code> handler may do more or less what it
Lines 413-420 Link Here
413
during earlier phases of IDE initialization. Therefore, it should
384
during earlier phases of IDE initialization. Therefore, it should
414
not use presentation-oriented features of the IDE, such as the
385
not use presentation-oriented features of the IDE, such as the
415
Explorer or Window System APIs. However, the other APIs are
386
Explorer or Window System APIs. However, the other APIs are
416
acceptable to use in <code>restored</code>, including the
387
acceptable to use in <code>restored</code>, including
417
TopManager's dialog notification methods.
388
<code>DialogDisplayer</code>.
418
389
419
<p>The
390
<p>The
420
391
Lines 1221-1242 Link Here
1221
tags; the ordering hints will simply be ignored unless and until the other
1192
tags; the ordering hints will simply be ignored unless and until the other
1222
module is installed, at which time they will take effect.
1193
module is installed, at which time they will take effect.
1223
1194
1224
<h3><a name="sec-debugger">Debugger</a></h3>
1225
1226
The class <code>Debugger</code> installs a new
1227
1228
<a href="../../debugger/Debugger.html">system debugger,</a>
1229
1230
replacing the previous one. Refer to the
1231
1232
<a href="../../debugger/doc-files/api.html">Debugger API</a>
1233
1234
for details on how to write a debugger.
1235
1236
<p>Installation of debuggers from manifest is now deprecated. See the
1237
<a href="../../doc-files/services-api.html#instance-folders">Services API</a>
1238
instead.
1239
1240
<h3><a name="sec-executor">Service</a></h3>
1195
<h3><a name="sec-executor">Service</a></h3>
1241
1196
1242
The class <code>Service</code> installs a new
1197
The class <code>Service</code> installs a new
Lines 1548-1554 Link Here
1548
1503
1549
<li> <a href="../../ServiceType.html#getHelpCtx()"><code>ServiceType.getHelpCtx()</code></a>
1504
<li> <a href="../../ServiceType.html#getHelpCtx()"><code>ServiceType.getHelpCtx()</code></a>
1550
1505
1551
(applies equally to executors, debugger types, and compiler types)
1506
(applies equally to executors and compiler types)
1552
1507
1553
</ul>
1508
</ul>
1554
1509
Lines 1629-1637 Link Here
1629
1584
1630
<a href="../../explorer/ExplorerPanel.html"><code>ExplorerPanel</code></a>).
1585
<a href="../../explorer/ExplorerPanel.html"><code>ExplorerPanel</code></a>).
1631
1586
1632
Programmatically, you may also display help by calling
1587
Programmatically, you may also display help by using
1633
1588
the JavaHelp module API.</p>
1634
<a href="../../TopManager.html#showHelp(org.openide.util.HelpCtx)"><code>TopManager.showHelp(HelpCtx)</code></a>.</p>
1635
1589
1636
<p class="nonnormative">If you are having trouble figuring out why you
1590
<p class="nonnormative">If you are having trouble figuring out why you
1637
are not seeing the help you expect, try running the IDE with the
1591
are not seeing the help you expect, try running the IDE with the
(-)openide/api/doc/org/openide/nodes/doc-files/api.html (-4 / +2 lines)
Lines 1103-1111 Link Here
1103
clipboard, without needing to have <code>CopyAction</code> be
1103
clipboard, without needing to have <code>CopyAction</code> be
1104
invoked on a node, if that were the desired behavior. Then the
1104
invoked on a node, if that were the desired behavior. Then the
1105
transferable derived from <code>NodeTransfer.createPaste</code>
1105
transferable derived from <code>NodeTransfer.createPaste</code>
1106
could be added directly to the system clipboard (use
1106
could be added directly to the system clipboard (use lookup on <code>Clipboard</code>),
1107
1108
<a href="../../TopManager.html#getClipboard()"><code>TopManager.getClipboard()</code></a>),
1109
1107
1110
or added as an alternate flavor to any transferable already there.
1108
or added as an alternate flavor to any transferable already there.
1111
1109
Lines 1133-1139 Link Here
1133
permit any string selection in the clipboard (say, placed there by
1131
permit any string selection in the clipboard (say, placed there by
1134
the Editor) to be pasted onto node having
1132
the Editor) to be pasted onto node having
1135
1133
1136
<a href="../../src/ClassElement.html"><code>ClassElement</code></a>
1134
<code>ClassElement</code> (from <samp>java-src-model.jar</samp>)
1137
1135
1138
as a cookie by way of inserting a new method with that name. Such a
1136
as a cookie by way of inserting a new method with that name. Such a
1139
convertor should work with any editor, as well as with any implementation
1137
convertor should work with any editor, as well as with any implementation
(-)openide/api/doc/org/openide/text/doc-files/api.html (-8 / +2 lines)
Lines 283-290 Link Here
283
scratch. Also, exception handling is not illustrated here.
283
scratch. Also, exception handling is not illustrated here.
284
284
285
<pre>
285
<pre>
286
<a href="../../filesystems/FileObject.html">FileObject</a> fo=<a href="../../TopManager.html#getDefault()">TopManager.getDefault</a>().<a href="../../TopManager.html#getRepository()">getRepository</a>().<a href="../../filesystems/Repository.html#find(java.lang.String, java.lang.String, java.lang.String)">find</a>("my.pkg", "MyFile", "java");
286
<a href="../../filesystems/FileObject.html">FileObject</a> fo = Repository.getDefault().<a href="../../filesystems/Repository.html#find(java.lang.String, java.lang.String, java.lang.String)">find</a>("my.pkg", "MyFile", "java");
287
<a href="../../loaders/DataObject.html">DataObject</a> do=<a href="../../TopManager.html">TopManager</a>.<a href="../../TopManager.html#getDefault()">getDefault</a>().<a href="../../TopManager.html#getLoaderPool()">getLoaderPool</a>().<a href="../../loaders/DataLoaderPool.html#findDataObject(org.openide.filesystems.FileObject)">findDataObject</a>(fo);
287
<a href="../../loaders/DataObject.html">DataObject</a> do = DataObject.find(fo);
288
<a href="../../cookies/EditorCookie.html">EditorCookie</a> ec=(EditorCookie)(do.<a href="../../loaders/DataObject.html#getCookie(java.lang.Class)">getCookie</a>(EditorCookie.class));
288
<a href="../../cookies/EditorCookie.html">EditorCookie</a> ec=(EditorCookie)(do.<a href="../../loaders/DataObject.html#getCookie(java.lang.Class)">getCookie</a>(EditorCookie.class));
289
<a href="@JDK@/javax/swing/text/StyledDocument.html">StyledDocument</a> doc=ec.<a href="../../cookies/EditorCookie.html#openDocument()">openDocument</a>();
289
<a href="@JDK@/javax/swing/text/StyledDocument.html">StyledDocument</a> doc=ec.<a href="../../cookies/EditorCookie.html#openDocument()">openDocument</a>();
290
</pre>
290
</pre>
Lines 798-809 Link Here
798
with IDE-supplied <em>annotations</em>, e.g. background color, gutter
798
with IDE-supplied <em>annotations</em>, e.g. background color, gutter
799
glyphs, or as much as feasible, and change these display markings upon
799
glyphs, or as much as feasible, and change these display markings upon
800
request.
800
request.
801
802
<!--
803
<li>Be able to mark certain lines of the document with IDE-supplied
804
background colors (e.g. for debugger breakpoints) and change these
805
colors upon request.
806
-->
807
801
808
</ul>
802
</ul>
809
803
(-)openide/api/doc/org/openide/windows/doc-files/api.html (-6 / +6 lines)
Lines 316-322 Link Here
316
}
316
}
317
<font class="keyword">private</font> <font class="keyword">static</font> <font class="keyword">final</font> <font class="type">String</font> <font class="variable-name">WIDGET_MODE_NAME</font> = <font class="string">"MyWidgets"</font>; <font class="comment">// NOI18N
317
<font class="keyword">private</font> <font class="keyword">static</font> <font class="keyword">final</font> <font class="type">String</font> <font class="variable-name">WIDGET_MODE_NAME</font> = <font class="string">"MyWidgets"</font>; <font class="comment">// NOI18N
318
// ...
318
// ...
319
</font><font class="type">Workspace</font> <font class="variable-name">ws</font> = TopManager.getDefault().getWindowManager().getCurrentWorkspace();
319
</font><font class="type">Workspace</font> <font class="variable-name">ws</font> = WindowManager.getDefault().getCurrentWorkspace();
320
<font class="type">Mode</font> <font class="variable-name">myMode</font> = ws.findMode(WIDGET_MODE_NAME);
320
<font class="type">Mode</font> <font class="variable-name">myMode</font> = ws.findMode(WIDGET_MODE_NAME);
321
<font class="keyword">if</font> (myMode == <font class="constant">null</font>) {
321
<font class="keyword">if</font> (myMode == <font class="constant">null</font>) {
322
    myMode = ws.createMode(WIDGET_MODE_NAME,
322
    myMode = ws.createMode(WIDGET_MODE_NAME,
Lines 580-586 Link Here
580
    <font class="keyword">try</font> {
580
    <font class="keyword">try</font> {
581
        toWrite = <font class="keyword">new</font> <font class="type">NbMarshalledObject</font>(state);
581
        toWrite = <font class="keyword">new</font> <font class="type">NbMarshalledObject</font>(state);
582
    } <font class="keyword">catch</font> (<font class="type">Exception</font> <font class="variable-name">e</font>) {
582
    } <font class="keyword">catch</font> (<font class="type">Exception</font> <font class="variable-name">e</font>) {
583
        TopManager.getDefault().getErrorManager().notify(ErrorManager.WARNING, e);
583
        ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
584
        toWrite = <font class="constant">null</font>;
584
        toWrite = <font class="constant">null</font>;
585
    }
585
    }
586
    oo.writeObject(toWrite);
586
    oo.writeObject(toWrite);
Lines 592-598 Link Here
592
        <font class="keyword">try</font> {
592
        <font class="keyword">try</font> {
593
            state = (<font class="type">MySerObject</font>)read.get();
593
            state = (<font class="type">MySerObject</font>)read.get();
594
        } <font class="keyword">catch</font> (<font class="type">Exception</font> <font class="variable-name">e</font>) {
594
        } <font class="keyword">catch</font> (<font class="type">Exception</font> <font class="variable-name">e</font>) {
595
            TopManager.getDefault().getErrorManager().notify(ErrorManager.WARNING, e);
595
            ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
596
        }
596
        }
597
    }
597
    }
598
}
598
}
Lines 690-696 Link Here
690
<li>Workspaces may be retrieved using the
690
<li>Workspaces may be retrieved using the
691
<code>WindowManager</code>, which is obtained by
691
<code>WindowManager</code>, which is obtained by
692
692
693
<a href="../../TopManager.html#getWindowManager()"><code>TopManager.getWindowManager()</code></a>.
693
<a href="../WindowManager.html#getDefault()"><code>WindowManager.getDefault()</code></a>.
694
694
695
Then the calls
695
Then the calls
696
696
Lines 1545-1551 Link Here
1545
you might for example retrieve a mode as follows:</p>
1545
you might for example retrieve a mode as follows:</p>
1546
1546
1547
<pre>
1547
<pre>
1548
<font class="type">FileSystem</font> <font class="variable-name">sfs</font> = TopManager.getDefault().getRepository().getDefaultFileSystem();
1548
<font class="type">FileSystem</font> <font class="variable-name">sfs</font> = Repository.getDefault().getDefaultFileSystem();
1549
<font class="comment">// Assume these two were known somehow:
1549
<font class="comment">// Assume these two were known somehow:
1550
</font><font class="type">String</font> <font class="variable-name">wsName</font> = <font class="string">"Editing"</font>;
1550
</font><font class="type">String</font> <font class="variable-name">wsName</font> = <font class="string">"Editing"</font>;
1551
<font class="type">String</font> <font class="variable-name">modeName</font> = <font class="string">"editor"</font>;
1551
<font class="type">String</font> <font class="variable-name">modeName</font> = <font class="string">"editor"</font>;
Lines 1796-1802 Link Here
1796
<p>The Output Window is organized into tabs, each of which is
1796
<p>The Output Window is organized into tabs, each of which is
1797
capable of handling both input and output.
1797
capable of handling both input and output.
1798
1798
1799
<a href="../../TopManager.html#getIO(java.lang.String)"><code>TopManager.getIO(String)</code></a>
1799
<a href="../IOProvider.html#getIO(java.lang.String, boolean)"><code>IOProvider.getIO(String, boolean)</code></a>
1800
1800
1801
will get the
1801
will get the
1802
1802
(-)openide/src/org/openide/DialogDescriptor.java (-1 / +1 lines)
Lines 20-26 Link Here
20
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
21
21
22
/** A description of a standard dialog.
22
/** A description of a standard dialog.
23
 * It may be built later using {@link TopManager#createDialog} or shown with {@link TopManager#notify}.
23
 * It may be built later using {@link DialogDisplayer#createDialog} or shown with {@link DialogDisplayer#notify}.
24
* It extends <code>NotifyDescriptor</code>'s capabilities by allowing specification of the
24
* It extends <code>NotifyDescriptor</code>'s capabilities by allowing specification of the
25
* modal/nonmodal state of the dialog, button behavior and alignment, help, and
25
* modal/nonmodal state of the dialog, button behavior and alignment, help, and
26
* a listener on button presses.
26
* a listener on button presses.
(-)openide/src/org/openide/NotifyDescriptor.java (-4 / +4 lines)
Lines 33-50 Link Here
33
* <pre>
33
* <pre>
34
* NotifyDescriptor d =
34
* NotifyDescriptor d =
35
*     new NotifyDescriptor.Message("Hello...", NotifyDescriptor.INFORMATION_MESSAGE);
35
*     new NotifyDescriptor.Message("Hello...", NotifyDescriptor.INFORMATION_MESSAGE);
36
* TopManager.getDefault().notify(d);
36
* DialogDisplayer.getDefault().notify(d);
37
* </pre>
37
* </pre>
38
* or to get a result:
38
* or to get a result:
39
* <pre>
39
* <pre>
40
* NotifyDescriptor d =
40
* NotifyDescriptor d =
41
*     new NotifyDescriptor.Confirmation("Really do this?!", "Dialog Title",
41
*     new NotifyDescriptor.Confirmation("Really do this?!", "Dialog Title",
42
*                                       NotifyDescriptor.OK_CANCEL_OPTION);
42
*                                       NotifyDescriptor.OK_CANCEL_OPTION);
43
* if (TopManager.getDefault().notify(d) == NotifyDescriptor.OK_OPTION) {
43
* if (DialogDisplayer.getDefault().notify(d) == NotifyDescriptor.OK_OPTION) {
44
*     // really do it...
44
*     // really do it...
45
* }
45
* }
46
* </pre>
46
* </pre>
47
* @see TopManager#notify
47
* @see DialogDisplayer#notify
48
* @author David Peroutka, Jaroslav Tulach
48
* @author David Peroutka, Jaroslav Tulach
49
*/
49
*/
50
public class NotifyDescriptor extends Object {
50
public class NotifyDescriptor extends Object {
Lines 688-694 Link Here
688
    /**
688
    /**
689
    * Provides a description of an exception that occurred during
689
    * Provides a description of an exception that occurred during
690
    * execution of the IDE.
690
    * execution of the IDE.
691
    * @deprecated Better to use {@link TopManager#notifyException}, or for more control various methods in {@link ErrorManager}.
691
    * @deprecated Better to use {@link ErrorManager#notify}.
692
    */
692
    */
693
    public static final class Exception extends Confirmation
693
    public static final class Exception extends Confirmation
694
    {
694
    {
(-)openide/src/org/openide/ServiceType.java (-5 / +5 lines)
Lines 19-24 Link Here
19
import java.util.Enumeration;
19
import java.util.Enumeration;
20
20
21
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
22
import org.openide.util.Lookup;
22
23
23
/** This class represents an abstract subclass for services
24
/** This class represents an abstract subclass for services
24
* (compilation, execution, debugging, etc.) that can be registered in
25
* (compilation, execution, debugging, etc.) that can be registered in
Lines 282-296 Link Here
282
        */
283
        */
283
        public ServiceType getServiceType () {
284
        public ServiceType getServiceType () {
284
            if (serviceType == null) {
285
            if (serviceType == null) {
285
                TopManager tm = TopManager.getDefault ();
286
                
287
                // the class to search for
286
                // the class to search for
288
                Class clazz;
287
                Class clazz;
289
                // the first subclass of ServiceType to search for
288
                // the first subclass of ServiceType to search for
290
                Class serviceTypeClass;
289
                Class serviceTypeClass;
291
                // try to find it by class
290
                // try to find it by class
292
                try {
291
                try {
293
                    clazz = Class.forName (className, true, tm.systemClassLoader ());
292
                    clazz = Class.forName (className, true, (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class));
294
                    
293
                    
295
                    serviceTypeClass = clazz;
294
                    serviceTypeClass = clazz;
296
                    while (serviceTypeClass.getSuperclass () != ServiceType.class) {
295
                    while (serviceTypeClass.getSuperclass () != ServiceType.class) {
Lines 306-313 Link Here
306
                
305
                
307
                
306
                
308
                // try to find the executor by name
307
                // try to find the executor by name
309
                Enumeration en = tm.getServices ().services (clazz);
308
                ServiceType.Registry r = (ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class);
310
                ServiceType some = tm.getServices ().find (clazz);
309
                Enumeration en = r.services (clazz);
310
                ServiceType some = r.find (clazz);
311
                while (en.hasMoreElements ()) {
311
                while (en.hasMoreElements ()) {
312
                    ServiceType t = (ServiceType)en.nextElement ();
312
                    ServiceType t = (ServiceType)en.nextElement ();
313
                    
313
                    
(-)openide/src/org/openide/WizardDescriptor.java (-2 / +2 lines)
Lines 47-53 Link Here
47
* may be traversed at the proper times using the "Previous"
47
* may be traversed at the proper times using the "Previous"
48
* and "Next" buttons (or "Finish" on the last one).
48
* and "Next" buttons (or "Finish" on the last one).
49
* @author Ian Formanek, Jaroslav Tulach
49
* @author Ian Formanek, Jaroslav Tulach
50
* @see TopManager#createDialog
50
* @see DialogDisplayer#createDialog
51
*/
51
*/
52
public class WizardDescriptor extends DialogDescriptor {
52
public class WizardDescriptor extends DialogDescriptor {
53
53
Lines 978-984 Link Here
978
                    panels.previousPanel();
978
                    panels.previousPanel();
979
                    if (ise.getMessage() != null) {
979
                    if (ise.getMessage() != null) {
980
                        // this is only for backward compatitility
980
                        // this is only for backward compatitility
981
                        TopManager.getDefault().notify(new NotifyDescriptor.Message(ise.getMessage()));
981
                        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(ise.getMessage()));
982
                    } else {
982
                    } else {
983
                        // this should be used (it checks for exception
983
                        // this should be used (it checks for exception
984
                        // annotations and severity)
984
                        // annotations and severity)
(-)openide/src/org/openide/actions/AbstractCompileAction.java (-3 / +3 lines)
Lines 19-25 Link Here
19
19
20
import org.openide.loaders.DataObject;
20
import org.openide.loaders.DataObject;
21
import org.openide.loaders.CompilerSupport;
21
import org.openide.loaders.CompilerSupport;
22
import org.openide.TopManager;
22
import org.openide.awt.StatusDisplayer;
23
import org.openide.compiler.CompilerJob;
23
import org.openide.compiler.CompilerJob;
24
import org.openide.compiler.Compiler;
24
import org.openide.compiler.Compiler;
25
import org.openide.compiler.CompilerTask;
25
import org.openide.compiler.CompilerTask;
Lines 95-101 Link Here
95
    * @param nodes the nodes
95
    * @param nodes the nodes
96
    */
96
    */
97
    void compileNodes (final Node[] nodes) {
97
    void compileNodes (final Node[] nodes) {
98
        TopManager.getDefault ().setStatusText (message ());
98
        StatusDisplayer.getDefault().setStatusText(message());
99
        CompilerJob job;
99
        CompilerJob job;
100
        DataObject[] objects;
100
        DataObject[] objects;
101
        boolean useNodes;
101
        boolean useNodes;
Lines 120-126 Link Here
120
        } finally { // #10889
120
        } finally { // #10889
121
            // In case some RuntimeException during creation of job,
121
            // In case some RuntimeException during creation of job,
122
            // best to clear the status line since no one else will.
122
            // best to clear the status line since no one else will.
123
            TopManager.getDefault ().setStatusText (""); // NOI18N
123
            StatusDisplayer.getDefault().setStatusText(""); // NOI18N
124
        }
124
        }
125
125
126
        job.setDisplayName (useNodes ? findName (nodes) : findName(objects));
126
        job.setDisplayName (useNodes ? findName (nodes) : findName(objects));
(-)openide/src/org/openide/actions/CustomizeAction.java (-3 / +3 lines)
Lines 19-24 Link Here
19
import org.openide.util.actions.NodeAction;
19
import org.openide.util.actions.NodeAction;
20
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
21
import org.openide.nodes.Node;
21
import org.openide.nodes.Node;
22
import org.openide.nodes.NodeOperation;
22
23
23
import javax.swing.JMenuItem;
24
import javax.swing.JMenuItem;
24
import javax.swing.JDialog;
25
import javax.swing.JDialog;
Lines 29-37 Link Here
29
import javax.swing.JPanel;
30
import javax.swing.JPanel;
30
31
31
/** Customize a node (rather than using its property sheet).
32
/** Customize a node (rather than using its property sheet).
32
* @see org.openide.TopManager.NodeOperation#customize
33
* @see NodeOperation#customize
33
* @author   Ian Formanek, Jan Jancura
34
* @author   Ian Formanek, Jan Jancura
34
* @version  0.11, May 16, 1998
35
*/
35
*/
36
public class CustomizeAction extends NodeAction {
36
public class CustomizeAction extends NodeAction {
37
    /** generated Serialized Version UID */
37
    /** generated Serialized Version UID */
Lines 115-121 Link Here
115
                throw new IllegalStateException();
115
                throw new IllegalStateException();
116
            }
116
            }
117
            if (nodes.length == 1) {
117
            if (nodes.length == 1) {
118
                org.openide.TopManager.getDefault ().getNodeOperation ().customize (nodes[0]);
118
                NodeOperation.getDefault().customize(nodes[0]);
119
            }
119
            }
120
        }
120
        }
121
    }
121
    }
(-)openide/src/org/openide/actions/CustomizeBeanAction.java (-6 / +8 lines)
Lines 24-29 Link Here
24
import javax.swing.*;
24
import javax.swing.*;
25
25
26
import org.openide.*;
26
import org.openide.*;
27
import org.openide.DialogDisplayer;
27
import org.openide.loaders.*;
28
import org.openide.loaders.*;
28
import org.openide.cookies.*;
29
import org.openide.cookies.*;
29
import org.openide.filesystems.FileObject;
30
import org.openide.filesystems.FileObject;
Lines 160-166 Link Here
160
                dd.setOptions(new Object[] { DialogDescriptor.CLOSED_OPTION });
161
                dd.setOptions(new Object[] { DialogDescriptor.CLOSED_OPTION });
161
                dd.setHelpCtx( new HelpCtx( HELP_KEY_CUSTOMIZING )); 
162
                dd.setHelpCtx( new HelpCtx( HELP_KEY_CUSTOMIZING )); 
162
                
163
                
163
                w = TopManager.getDefault ().createDialog (dd);
164
                w = DialogDisplayer.getDefault ().createDialog (dd);
164
            }
165
            }
165
166
166
        final Window window = w;
167
        final Window window = w;
Lines 230-236 Link Here
230
                                 );
231
                                 );
231
232
232
233
233
        dialog[0] = TopManager.getDefault ().createDialog (descr);
234
        dialog[0] = DialogDisplayer.getDefault ().createDialog (descr);
234
        
235
        
235
        // add listener to close bean window  
236
        // add listener to close bean window  
236
      
237
      
Lines 266-272 Link Here
266
267
267
        try {
268
        try {
268
            if (file == null) {
269
            if (file == null) {
269
                TopManager tm = TopManager.getDefault ();
270
                JPanel p = new JPanel(new java.awt.BorderLayout(12, 0));
270
                JPanel p = new JPanel(new java.awt.BorderLayout(12, 0));
271
                JTextField tf = new JTextField (20);
271
                JTextField tf = new JTextField (20);
272
                JLabel l = new JLabel(bundle.getString("CTL_SerializeTarget"));
272
                JLabel l = new JLabel(bundle.getString("CTL_SerializeTarget"));
Lines 278-287 Link Here
278
                tf.getAccessibleContext().setAccessibleDescription(bundle.getString("ACSD_SerializeTarget"));
278
                tf.getAccessibleContext().setAccessibleDescription(bundle.getString("ACSD_SerializeTarget"));
279
                try {
279
                try {
280
                    // selects one folder from data systems
280
                    // selects one folder from data systems
281
                    DataFolder df = (DataFolder)tm.getNodeOperation ().select (
281
                    DataFolder df = (DataFolder)NodeOperation.getDefault().select (
282
                                        bundle.getString ("CTL_SerializeAs"),
282
                                        bundle.getString ("CTL_SerializeAs"),
283
                                        bundle.getString ("CTL_SaveIn"),
283
                                        bundle.getString ("CTL_SaveIn"),
284
                                        tm.getPlaces().nodes().repository(new FolderFilter()),
284
                                        RepositoryNodeFactory.getDefault().repository(new FolderFilter()),
285
                                        new FolderAcceptor(),
285
                                        new FolderAcceptor(),
286
                                        p
286
                                        p
287
                                    )[0].getCookie(DataFolder.class);
287
                                    )[0].getCookie(DataFolder.class);
Lines 297-303 Link Here
297
                targetFS = file.getFileSystem ();
297
                targetFS = file.getFileSystem ();
298
            }
298
            }
299
        } catch (org.openide.filesystems.FileStateInvalidException e) {
299
        } catch (org.openide.filesystems.FileStateInvalidException e) {
300
            TopManager.getDefault ().notify (new NotifyDescriptor.Exception (e, bundle.getString ("EXC_Serialization") + " " + name));
300
            // XXX I18N violation to separate strings this way - use format instead
301
            ErrorManager.getDefault().annotate(e, bundle.getString ("EXC_Serialization") + " " + name);
302
            ErrorManager.getDefault().notify(e);
301
            return false;
303
            return false;
302
        }
304
        }
303
305
(-)openide/src/org/openide/actions/InstantiateAction.java (-1 / +1 lines)
Lines 74-80 Link Here
74
74
75
    /** Instantiate a template object.
75
    /** Instantiate a template object.
76
    * Asks user for the target file's folder and creates the file.
76
    * Asks user for the target file's folder and creates the file.
77
    * Then runs the node delegate's {@link TopManager.NodeOperation#customize customizer} (if there is one).
77
    * Then runs the node delegate's {@link org.openide.nodes.NodeOperation#customize customizer} (if there is one).
78
    * Also the node's {@link Node#getDefaultAction default action}, if any, is run.
78
    * Also the node's {@link Node#getDefaultAction default action}, if any, is run.
79
    * @param obj the template to use
79
    * @param obj the template to use
80
    * @return set of created objects or null if user canceled the action
80
    * @return set of created objects or null if user canceled the action
(-)openide/src/org/openide/actions/NewAction.java (-2 / +2 lines)
Lines 15-20 Link Here
15
15
16
import java.awt.MenuShortcut;
16
import java.awt.MenuShortcut;
17
import javax.swing.event.*;
17
import javax.swing.event.*;
18
import org.openide.DialogDisplayer;
18
19
19
import org.openide.util.datatransfer.NewType;
20
import org.openide.util.datatransfer.NewType;
20
import org.openide.loaders.DataObject;
21
import org.openide.loaders.DataObject;
Lines 23-29 Link Here
23
import org.openide.util.actions.*;
24
import org.openide.util.actions.*;
24
import org.openide.awt.*;
25
import org.openide.awt.*;
25
import org.openide.nodes.Node;
26
import org.openide.nodes.Node;
26
import org.openide.TopManager;
27
import org.openide.NotifyDescriptor;
27
import org.openide.NotifyDescriptor;
28
import org.openide.explorer.ExplorerManager;
28
import org.openide.explorer.ExplorerManager;
29
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
Lines 72-78 Link Here
72
            }
72
            }
73
            types[indx].create();
73
            types[indx].create();
74
        } catch (java.io.IOException e) {
74
        } catch (java.io.IOException e) {
75
            TopManager.getDefault().notify(new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE));
75
            DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE));
76
        } finally {
76
        } finally {
77
            if (sel != null) {
77
            if (sel != null) {
78
                sel.select ();
78
                sel.select ();
(-)openide/src/org/openide/actions/NewTemplateAction.java (-13 / +4 lines)
Lines 96-108 Link Here
96
            wizard.instantiate ();
96
            wizard.instantiate ();
97
        } catch (IOException e) {
97
        } catch (IOException e) {
98
            ErrorManager em = ErrorManager.getDefault();
98
            ErrorManager em = ErrorManager.getDefault();
99
            Throwable e1 = em.annotate(e, "Creating from template did not succeed."); // NOI18N
99
            em.annotate(e, NbBundle.getMessage(NewTemplateAction.class, "EXC_TemplateFailed"));
100
            em.notify(ErrorManager.INFORMATIONAL, e1);
100
            em.notify(e);
101
            String msg = e.getMessage();
102
            if ((msg == null) || msg.equals("")) { // NOI18N
103
                msg = NbBundle.getMessage(NewTemplateAction.class, "EXC_TemplateFailed");
104
            }
105
            TopManager.getDefault().notify(new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE));
106
        }
101
        }
107
        finally {
102
        finally {
108
            if (wizard instanceof DefaultTemplateWizard) {
103
            if (wizard instanceof DefaultTemplateWizard) {
Lines 256-267 Link Here
256
                wizard.instantiate (obj, targetFolder);
251
                wizard.instantiate (obj, targetFolder);
257
            } catch (IOException e) {
252
            } catch (IOException e) {
258
                ErrorManager em = ErrorManager.getDefault();
253
                ErrorManager em = ErrorManager.getDefault();
259
                Throwable e1 = em.annotate(e, "Creating from template did not succeed."); // NOI18N
254
                em.annotate(e, NbBundle.getMessage(NewTemplateAction.class, "EXC_TemplateFailed"));
260
                em.notify(ErrorManager.INFORMATIONAL, e1);
255
                em.notify(e);
261
                String msg = e.getMessage();
262
                if ((msg == null) || msg.equals("")) // NOI18N
263
                    msg = NbBundle.getMessage(NewTemplateAction.class, "EXC_TemplateFailed");
264
                TopManager.getDefault().notify(new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE));
265
            }
256
            }
266
257
267
            // ok
258
            // ok
(-)openide/src/org/openide/actions/OpenLocalExplorerAction.java (-4 / +4 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 18-30 Link Here
18
import org.openide.util.HelpCtx;
18
import org.openide.util.HelpCtx;
19
import org.openide.util.actions.NodeAction;
19
import org.openide.util.actions.NodeAction;
20
import org.openide.nodes.Node;
20
import org.openide.nodes.Node;
21
import org.openide.TopManager;
21
import org.openide.nodes.NodeOperation;
22
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
23
23
24
24
25
/** Open an Explorer window with a particular root node.
25
/** Open an Explorer window with a particular root node.
26
* Final only for better performance.
26
* Final only for better performance.
27
* @see TopManager.NodeOperation#explore
27
* @see NodeOperation#explore
28
* @author   Ian Formanek
28
* @author   Ian Formanek
29
*/
29
*/
30
public final class OpenLocalExplorerAction extends NodeAction {
30
public final class OpenLocalExplorerAction extends NodeAction {
Lines 36-42 Link Here
36
        if ((activatedNodes != null) && 
36
        if ((activatedNodes != null) && 
37
              (activatedNodes.length == 1) &&
37
              (activatedNodes.length == 1) &&
38
              (activatedNodes[0].isLeaf() == false) ) {
38
              (activatedNodes[0].isLeaf() == false) ) {
39
           TopManager.getDefault().getNodeOperation ().explore(activatedNodes[0]);
39
           NodeOperation.getDefault().explore(activatedNodes[0]);
40
        }
40
        }
41
    }
41
    }
42
42
(-)openide/src/org/openide/actions/PropertiesAction.java (-42 / +10 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 18-23 Link Here
18
import org.openide.util.actions.NodeAction;
18
import org.openide.util.actions.NodeAction;
19
import org.openide.util.actions.SystemAction;
19
import org.openide.util.actions.SystemAction;
20
import org.openide.nodes.Node;
20
import org.openide.nodes.Node;
21
import org.openide.nodes.NodeOperation;
21
import org.openide.awt.Actions;
22
import org.openide.awt.Actions;
22
import org.openide.awt.JInlineMenu;
23
import org.openide.awt.JInlineMenu;
23
import org.openide.explorer.propertysheet.PropertySheet;
24
import org.openide.explorer.propertysheet.PropertySheet;
Lines 28-68 Link Here
28
29
29
/** Get properties of a node.
30
/** Get properties of a node.
30
*
31
*
31
* @see TopManager.NodeOperation#showProperties(Node[])
32
* @see NodeOperation#showProperties(Node[])
32
* @author   Ian Formanek, Jan Jancura
33
* @author   Ian Formanek, Jan Jancura
33
*/
34
*/
34
public class PropertiesAction extends NodeAction {
35
public class PropertiesAction extends NodeAction {
35
    /** generated Serialized Version UID */
36
    /** generated Serialized Version UID */
36
    static final long serialVersionUID = 5485687384586248747L;
37
    static final long serialVersionUID = 5485687384586248747L;
37
    
38
    
38
    static ThreadLocal activated = new ThreadLocal();
39
40
    /* Actually performs action of showing properties
39
    /* Actually performs action of showing properties
41
    * @param activatedNodes Array of activated nodes
40
    * @param activatedNodes Array of activated nodes
42
    */
41
    */
43
    protected void performAction (Node[] activatedNodes) {
42
    protected void performAction (Node[] activatedNodes) {
44
        try {
43
        if (activatedNodes == null) {
45
            Class c = Class.forName("org.openide.actions.PropertiesAction$ShowPropertiesInvoker");
44
            throw new IllegalStateException();
46
            Runnable r = (Runnable)c.newInstance();
45
        }
47
            activated.set(activatedNodes);
46
        if (activatedNodes.length == 1) {
48
            r.run();
47
            NodeOperation.getDefault().showProperties(activatedNodes[0]);
49
            return;
48
        } else {
50
        } catch (Exception e) {
49
            NodeOperation.getDefault().showProperties(activatedNodes);
51
//            e.printStackTrace();
52
        } catch (LinkageError e) {
53
//            e.printStackTrace();
54
        }
50
        }
55
        // this will be executed only if the ide is not present
56
        // (or something went wrong)
57
        PropertySheet ps = new PropertySheet();
58
        ps.setNodes(activatedNodes);
59
        JDialog d = new JDialog();
60
        d.setModal(true);
61
        d.getContentPane().setLayout(new java.awt.BorderLayout());
62
        d.getContentPane().add(ps, java.awt.BorderLayout.CENTER);
63
        d.pack();
64
        d.show();
65
        d.dispose();
66
    }
51
    }
67
52
68
    /* Manages enable - disable logic
53
    /* Manages enable - disable logic
Lines 122-142 Link Here
122
        return "org/openide/resources/actions/properties.gif"; // NOI18N
107
        return "org/openide/resources/actions/properties.gif"; // NOI18N
123
    }
108
    }
124
    
109
    
125
    /** If the IDE is present this will perform the action. */
126
    static class ShowPropertiesInvoker implements Runnable {
127
        public void run() {
128
            Node[] activatedNodes = (Node[])activated.get();
129
            activated.set(null);
130
            if (activatedNodes == null) {
131
                throw new IllegalStateException();
132
            }
133
            if (activatedNodes.length == 1) {
134
                org.openide.TopManager.getDefault().getNodeOperation().
135
                showProperties(activatedNodes[0]);
136
            } else {
137
                org.openide.TopManager.getDefault().getNodeOperation().
138
                showProperties(activatedNodes);
139
            }
140
        }
141
    }
142
}
110
}
(-)openide/src/org/openide/actions/RenameAction.java (-2 / +2 lines)
Lines 13-19 Link Here
13
13
14
package org.openide.actions;
14
package org.openide.actions;
15
15
16
import org.openide.TopManager;
16
import org.openide.DialogDisplayer;
17
import org.openide.NotifyDescriptor;
17
import org.openide.NotifyDescriptor;
18
import org.openide.ErrorManager;
18
import org.openide.ErrorManager;
19
import org.openide.util.NbBundle;
19
import org.openide.util.NbBundle;
Lines 68-74 Link Here
68
            NbBundle.getMessage(RenameAction.class, "CTL_RenameLabel"),
68
            NbBundle.getMessage(RenameAction.class, "CTL_RenameLabel"),
69
            NbBundle.getMessage(RenameAction.class, "CTL_RenameTitle"));
69
            NbBundle.getMessage(RenameAction.class, "CTL_RenameTitle"));
70
        dlg.setInputText(n.getName());
70
        dlg.setInputText(n.getName());
71
        if (NotifyDescriptor.OK_OPTION.equals(TopManager.getDefault().notify(dlg))) {
71
        if (NotifyDescriptor.OK_OPTION.equals(DialogDisplayer.getDefault().notify(dlg))) {
72
            String newname = null;
72
            String newname = null;
73
            try {
73
            try {
74
                newname = dlg.getInputText();
74
                newname = dlg.getInputText();
(-)openide/src/org/openide/actions/ReorderAction.java (-1 lines)
Lines 15-21 Link Here
15
15
16
import java.io.IOException;
16
import java.io.IOException;
17
17
18
import org.openide.TopManager;
19
import org.openide.util.HelpCtx;
18
import org.openide.util.HelpCtx;
20
import org.openide.util.NbBundle;
19
import org.openide.util.NbBundle;
21
import org.openide.util.actions.*;
20
import org.openide.util.actions.*;
(-)openide/src/org/openide/actions/SaveAction.java (-2 / +2 lines)
Lines 15-21 Link Here
15
15
16
import java.io.IOException;
16
import java.io.IOException;
17
17
18
import org.openide.TopManager;
18
import org.openide.awt.StatusDisplayer;
19
import org.openide.ErrorManager;
19
import org.openide.ErrorManager;
20
import org.openide.util.HelpCtx;
20
import org.openide.util.HelpCtx;
21
import org.openide.util.actions.CookieAction;
21
import org.openide.util.actions.CookieAction;
Lines 44-50 Link Here
44
        if (sc != null) {
44
        if (sc != null) {
45
            try {
45
            try {
46
                sc.save();
46
                sc.save();
47
                TopManager.getDefault().setStatusText(
47
                StatusDisplayer.getDefault().setStatusText(
48
                    NbBundle.getMessage(
48
                    NbBundle.getMessage(
49
                        SaveAction.class, 
49
                        SaveAction.class, 
50
                        "MSG_saved",
50
                        "MSG_saved",
(-)openide/src/org/openide/actions/SaveAllAction.java (-3 / +3 lines)
Lines 15-22 Link Here
15
15
16
import javax.swing.event.ChangeEvent;
16
import javax.swing.event.ChangeEvent;
17
import javax.swing.event.ChangeListener;
17
import javax.swing.event.ChangeListener;
18
import org.openide.LifecycleManager;
18
19
19
import org.openide.TopManager;
20
import org.openide.loaders.DataObject;
20
import org.openide.loaders.DataObject;
21
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
22
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
Lines 26-32 Link Here
26
/** Save all open objects.
26
/** Save all open objects.
27
* This class is final only for performance reasons.
27
* This class is final only for performance reasons.
28
* @see DataObject#getRegistry
28
* @see DataObject#getRegistry
29
* @see TopManager#saveAll
29
* @see LifecycleManager#saveAll
30
*
30
*
31
* @author   Jan Jancura, Ian Formanek
31
* @author   Jan Jancura, Ian Formanek
32
*/
32
*/
Lines 78-84 Link Here
78
78
79
    /* Saves all. */
79
    /* Saves all. */
80
    public void performAction() {
80
    public void performAction() {
81
        TopManager.getDefault().saveAll();
81
        LifecycleManager.getDefault().saveAll();
82
    }
82
    }
83
83
84
    /* Listens to the chnages in list of modified data objects
84
    /* Listens to the chnages in list of modified data objects
(-)openide/src/org/openide/actions/SaveAsTemplateAction.java (-5 / +11 lines)
Lines 24-37 Link Here
24
import org.openide.loaders.DataFolder;
24
import org.openide.loaders.DataFolder;
25
import org.openide.loaders.DataObject;
25
import org.openide.loaders.DataObject;
26
import org.openide.loaders.DataObjectNotFoundException;
26
import org.openide.loaders.DataObjectNotFoundException;
27
import org.openide.TopManager;
28
import org.openide.ErrorManager;
27
import org.openide.ErrorManager;
29
import org.openide.filesystems.*;
28
import org.openide.filesystems.*;
29
import org.openide.nodes.NodeOperation;
30
import org.openide.util.NbBundle;
30
import org.openide.util.NbBundle;
31
31
32
/** Saves a data object to a folder under in the
32
/** Saves a data object to a folder under in the
33
* system's templates area.
33
* system's templates area.
34
* @see org.openide.Places.Folders#templates
35
*
34
*
36
* @author  Ales Novak, Dafe Simonek
35
* @author  Ales Novak, Dafe Simonek
37
*/
36
*/
Lines 98-110 Link Here
98
        NodeAcceptor acceptor = FolderNodeAcceptor.getInstance();
97
        NodeAcceptor acceptor = FolderNodeAcceptor.getInstance();
99
        String title = NbBundle.getMessage(SaveAsTemplateAction.class, "Title_SaveAsTemplate");
98
        String title = NbBundle.getMessage(SaveAsTemplateAction.class, "Title_SaveAsTemplate");
100
        String rootTitle = NbBundle.getMessage(SaveAsTemplateAction.class, "CTL_SaveAsTemplate");
99
        String rootTitle = NbBundle.getMessage(SaveAsTemplateAction.class, "CTL_SaveAsTemplate");
101
        DataObject templates =
100
        FileObject fo = Repository.getDefault().getDefaultFileSystem().findResource("Templates"); // NOI18N
102
            TopManager.getDefault().getPlaces().folders().templates();
101
        if (fo == null) return;
102
        DataObject templates;
103
        try {
104
            templates = DataObject.find(fo);
105
        } catch (IOException ioe) {
106
            ErrorManager.getDefault().notify(ioe);
107
            return;
108
        }
103
        Node templatesNode = templates.getNodeDelegate();
109
        Node templatesNode = templates.getNodeDelegate();
104
        Node[] selected;
110
        Node[] selected;
105
        // ask user: where to save the templates?
111
        // ask user: where to save the templates?
106
        try {
112
        try {
107
            selected = TopManager.getDefault().getNodeOperation().
113
            selected = NodeOperation.getDefault().
108
                       select(title, rootTitle, templatesNode, acceptor, null);
114
                       select(title, rootTitle, templatesNode, acceptor, null);
109
        } catch (UserCancelException ex) {
115
        } catch (UserCancelException ex) {
110
            // user cancelled the operation
116
            // user cancelled the operation
(-)openide/src/org/openide/actions/ToolsAction.java (-4 / +5 lines)
Lines 17-27 Link Here
17
import javax.swing.*;
17
import javax.swing.*;
18
import javax.swing.event.*;
18
import javax.swing.event.*;
19
import java.util.*;
19
import java.util.*;
20
import org.openide.actions.ActionManager;
20
21
21
import org.openide.TopManager;
22
import org.openide.awt.JInlineMenu;
22
import org.openide.awt.JInlineMenu;
23
import org.openide.util.NbBundle;
23
import org.openide.util.NbBundle;
24
import org.openide.util.HelpCtx;
24
import org.openide.util.HelpCtx;
25
import org.openide.util.Lookup;
25
import org.openide.util.actions.*;
26
import org.openide.util.actions.*;
26
27
27
/** A "meta-action" that displays (in a submenu) a list of enabled actions provided by modules.
28
/** A "meta-action" that displays (in a submenu) a list of enabled actions provided by modules.
Lines 100-106 Link Here
100
    * @param list (can be null)
101
    * @param list (can be null)
101
    */
102
    */
102
    private static List generate (boolean forMenu) {
103
    private static List generate (boolean forMenu) {
103
        ActionManager am = TopManager.getDefault ().getActionManager ();
104
        ActionManager am = (ActionManager)Lookup.getDefault().lookup(ActionManager.class);
104
        SystemAction[] actions = am.getContextActions ();
105
        SystemAction[] actions = am.getContextActions ();
105
        List list = new ArrayList( actions.length );
106
        List list = new ArrayList( actions.length );
106
107
Lines 329-335 Link Here
329
        public static final String PROP_STATE = "actionsState"; // NOI18N
330
        public static final String PROP_STATE = "actionsState"; // NOI18N
330
        
331
        
331
        public G() {
332
        public G() {
332
            ActionManager am = TopManager.getDefault().getActionManager();
333
            ActionManager am = (ActionManager)Lookup.getDefault().lookup(ActionManager.class);
333
            am.addPropertyChangeListener ( this );
334
            am.addPropertyChangeListener ( this );
334
            actionsListChanged();
335
            actionsListChanged();
335
        }
336
        }
Lines 368-374 Link Here
368
                }
369
                }
369
            }
370
            }
370
371
371
            ActionManager am = TopManager.getDefault ().getActionManager ();
372
            ActionManager am = (ActionManager)Lookup.getDefault().lookup(ActionManager.class);
372
            copy = am.getContextActions ();
373
            copy = am.getContextActions ();
373
            for (int i = 0; i < copy.length; i++) {
374
            for (int i = 0; i < copy.length; i++) {
374
                SystemAction act = copy[i];
375
                SystemAction act = copy[i];
(-)openide/src/org/openide/awt/Actions.java (-47 / +13 lines)
Lines 16-21 Link Here
16
import java.awt.*;
16
import java.awt.*;
17
import java.awt.event.*;
17
import java.awt.event.*;
18
import java.beans.*;
18
import java.beans.*;
19
import java.util.Observable;
20
import java.util.Observer;
19
import javax.swing.*;
21
import javax.swing.*;
20
import javax.swing.event.*;
22
import javax.swing.event.*;
21
import javax.swing.text.Keymap;
23
import javax.swing.text.Keymap;
Lines 33-43 Link Here
33
*/
35
*/
34
public class Actions extends Object {
36
public class Actions extends Object {
35
    
37
    
36
    /** Top manager listener listens on TopManager.PROP_GLOBAL_KEYMAP, initialized
37
    * lazily
38
    */
39
    private static Object GLOBAL_KEYMAP;
40
    
41
    /** Method that finds the keydescription assigned to this action.
38
    /** Method that finds the keydescription assigned to this action.
42
    * @param action action to find key for
39
    * @param action action to find key for
43
    * @return the text representing the key or null if  there is no text assigned
40
    * @return the text representing the key or null if  there is no text assigned
Lines 129-156 Link Here
129
        b.updateState (null);
126
        b.updateState (null);
130
    }
127
    }
131
128
132
    /** Adds a change listener to TopManager's keymap.
129
    /** Adds a change listener to default keymap.
133
    */
130
    */
134
    private static void addKeymapListener (PropertyChangeListener l) {
131
    private static void addKeymapListener (final PropertyChangeListener l) {
135
        if (GLOBAL_KEYMAP == null) {
132
        Keymap map = (Keymap)org.openide.util.Lookup.getDefault().lookup(Keymap.class);
136
            synchronized (Actions.class) {
133
        // This is a hack. Since there is no official API for notifying changes
137
                if (GLOBAL_KEYMAP == null) {
134
        // from Keymap, just rely on fact that core impl is an Observable.
138
                    try {
135
        if (map instanceof Observable) {
139
                        Class c = Class.forName("org.openide.awt.Actions$GlobalKeymapL"); // NOI18N
136
            Observable o = (Observable)map;
140
                        GLOBAL_KEYMAP = (PropertyChangeSupport)c.newInstance();
137
            o.addObserver(new Observer() {
141
                    } catch (Exception e) {
138
                public void update(Observable o, Object arg) {
142
                        // any object just do not ask again
139
                    l.propertyChange(new PropertyChangeEvent(o, "globalKeymap", null, null)); // NOI18N
143
                        GLOBAL_KEYMAP = new Object ();
144
                    } catch (LinkageError e) {
145
                        GLOBAL_KEYMAP = new Object ();
146
                    }
147
                }
140
                }
148
            }
141
            });
149
        }
150
        if (GLOBAL_KEYMAP instanceof PropertyChangeSupport) {
151
            ((PropertyChangeSupport)GLOBAL_KEYMAP).addPropertyChangeListener (
152
                WeakListener.propertyChange(l, GLOBAL_KEYMAP)
153
            );
154
        }
142
        }
155
    }
143
    }
156
144
Lines 1145-1170 Link Here
1145
        }
1133
        }
1146
    }
1134
    }
1147
1135
1148
    
1149
    /** Inner class that listens on property change of top manager and
1150
    * if PROP_GLOBAL_KEYMAP is fired, then fires to own listeners
1151
    * in AWT thread.
1152
    */
1153
    static final class GlobalKeymapL extends PropertyChangeSupport 
1154
    implements PropertyChangeListener, Runnable {
1155
        GlobalKeymapL () {
1156
            super (org.openide.TopManager.getDefault());
1157
            org.openide.TopManager.getDefault ().addPropertyChangeListener (this);
1158
        }
1159
        
1160
        public void propertyChange(PropertyChangeEvent ev) {
1161
            if (org.openide.TopManager.PROP_GLOBAL_KEYMAP == ev.getPropertyName ()) {
1162
                Mutex.EVENT.readAccess (this);
1163
            }
1164
        }
1165
        
1166
        public void run () {
1167
            firePropertyChange (org.openide.TopManager.PROP_GLOBAL_KEYMAP, null, null);
1168
        }
1169
    }
1170
}
1136
}
(-)openide/src/org/openide/awt/HtmlBrowser.java (-4 / +34 lines)
Lines 57-69 Link Here
57
/**
57
/**
58
* Object that provides viewer for HTML pages.
58
* Object that provides viewer for HTML pages.
59
* <p>If all you want to do is to show some URL in the IDE's normal way, this
59
* <p>If all you want to do is to show some URL in the IDE's normal way, this
60
* is overkill. Just use {@link TopManager#showUrl} instead. Using <code>HtmlBrowser</code>
60
* is overkill. Just use {@link HtmlBrowser.URLDisplayer#showURL} instead. Using <code>HtmlBrowser</code>
61
* is appropriate mainly if you want to embed a web browser in some other GUI component
61
* is appropriate mainly if you want to embed a web browser in some other GUI component
62
* (if the user has selected an external browser, this will fall back to a simple Swing
62
* (if the user has selected an external browser, this will fall back to a simple Swing
63
* renderer). Similarly <code>BrowserComponent</code> provides a dockable window with
63
* renderer). Similarly <code>Impl</code> (coming from a <code>Factory</code>) is the lower-level
64
* the same, and <code>Impl</code> (coming from a <code>Factory</code>) is the lower-level
65
* renderer itself (sans toolbar).
64
* renderer itself (sans toolbar).
66
* <p>Summary: for client use, try <code>TopManager.showUrl</code>, or for more control
65
* <p>Summary: for client use, try <code>URLDisplayer.showURL</code>, or for more control
67
* or where embedding is needed, create an <code>HtmlBrowser</code>. For provider use,
66
* or where embedding is needed, create an <code>HtmlBrowser</code>. For provider use,
68
* create a <code>Factory</code> and register an instance of it to lookup.
67
* create a <code>Factory</code> and register an instance of it to lookup.
69
*/
68
*/
Lines 616-621 Link Here
616
        }
615
        }
617
    }
616
    }
618
617
618
    /** A dockable component showing a browser.
619
     * @deprecated Better to use either {@link HtmlBrowser} directly
620
     *             if you know you want an embedded browser pane, or
621
     *             {@link HtmlBrowser.URLDisplayer} if you simply wish
622
     *             to display a page but want to use the configured web
623
     *             browser, possibly an external browser if available.
624
     */
619
    public static class BrowserComponent extends CloneableTopComponent {
625
    public static class BrowserComponent extends CloneableTopComponent {
620
        /** generated Serialized Version UID */
626
        /** generated Serialized Version UID */
621
        static final long                   serialVersionUID = 2912844785502987960L;
627
        static final long                   serialVersionUID = 2912844785502987960L;
Lines 1001-1006 Link Here
1001
        * Returns a new instance of BrowserImpl implementation.
1007
        * Returns a new instance of BrowserImpl implementation.
1002
        */
1008
        */
1003
        public Impl createHtmlBrowserImpl ();
1009
        public Impl createHtmlBrowserImpl ();
1010
    }
1011
    
1012
    /** A manager class which can display URLs in the proper way.
1013
     * Might open a selected HTML browser, knows about embedded vs. external
1014
     * browsers, etc.
1015
     * @since 3.14
1016
     */
1017
    public static abstract class URLDisplayer {
1018
        
1019
        /** Get the default URL displayer.
1020
         * @return the default instance from lookup
1021
         */
1022
        public static URLDisplayer getDefault() {
1023
            return (URLDisplayer)Lookup.getDefault().lookup(URLDisplayer.class);
1024
        }
1025
        
1026
        /** Subclass constructor. */
1027
        protected URLDisplayer() {}
1028
1029
        /** Display a URL to the user somehow.
1030
         * @param u the URL to show
1031
         */
1032
        public abstract void showURL(URL u);
1033
        
1004
    }
1034
    }
1005
    
1035
    
1006
////// Accessibility //////
1036
////// Accessibility //////
(-)openide/src/org/openide/awt/MenuBar.java (-4 / +10 lines)
Lines 19-28 Link Here
19
import java.util.*;
19
import java.util.*;
20
import java.util.Iterator;
20
import java.util.Iterator;
21
import javax.swing.*;
21
import javax.swing.*;
22
import org.openide.ErrorManager;
22
23
23
import org.openide.TopManager;
24
import org.openide.loaders.*;
24
import org.openide.loaders.*;
25
import org.openide.cookies.InstanceCookie;
25
import org.openide.cookies.InstanceCookie;
26
import org.openide.filesystems.FileObject;
27
import org.openide.filesystems.Repository;
26
import org.openide.nodes.*;
28
import org.openide.nodes.*;
27
import org.openide.util.actions.Presenter;
29
import org.openide.util.actions.Presenter;
28
import org.openide.util.*;
30
import org.openide.util.*;
Lines 73-81 Link Here
73
    public MenuBar(DataFolder folder) {
75
    public MenuBar(DataFolder folder) {
74
        super();
76
        super();
75
        // PENDING(david) -- setBorder(new MenuBorder());
77
        // PENDING(david) -- setBorder(new MenuBorder());
76
        startLoading((folder == null)
78
        DataFolder theFolder = folder;
77
                     ? TopManager.getDefault().getPlaces().folders().menus()
79
        if (theFolder == null) {
78
                     : folder);
80
            FileObject fo = Repository.getDefault().getDefaultFileSystem().findResource("Menu");
81
            if (fo == null) throw new IllegalStateException("No Menu/"); // NOI18N
82
            theFolder = DataFolder.findFolder(fo);
83
        }
84
        startLoading(theFolder);
79
85
80
        if(folder != null) {
86
        if(folder != null) {
81
            getAccessibleContext().setAccessibleDescription(folder.getName());
87
            getAccessibleContext().setAccessibleDescription(folder.getName());
(-)openide/src/org/openide/awt/SwingBrowserImpl.java (-9 / +7 lines)
Lines 313-332 Link Here
313
         * <p>
313
         * <p>
314
         * If debugger runs it will set content type to text/html.
314
         * If debugger runs it will set content type to text/html.
315
         * Forwarding is not supported is that case.
315
         * Forwarding is not supported is that case.
316
         * <p>Control using sysprop org.openide.awt.SwingBrowserImpl.do-not-block-awt=true.
316
         *
317
         *
317
         * @param page  the URL of the page
318
         * @param page  the URL of the page
318
         */
319
         */
319
        protected InputStream getStream (URL page) throws IOException {
320
        protected InputStream getStream (URL page) throws IOException {
320
            try {
321
            // XXX debugger ought to set this temporarily
321
                if (org.openide.TopManager.getDefault ().getDebugger ().getState () == org.openide.debugger.Debugger.DEBUGGER_NOT_RUNNING)
322
            if (Boolean.getBoolean("org.openide.awt.SwingBrowserImpl.do-not-block-awt")) {
322
                    return super.getStream (page);
323
                // try to set contentType quickly and return (don't block AWT Thread)
323
            } catch (org.openide.debugger.DebuggerNotFoundException ex) {
324
                setContentType ("text/html"); // NOI18N
325
                return new FilteredInputStream (page.openConnection());
326
            } else {
324
                return super.getStream (page);
327
                return super.getStream (page);
325
            }
328
            }
326
            
327
            // try to set contentType quickly and return (don't block AWT Thread)
328
            setContentType ("text/html");   // NOI18N
329
            return new FilteredInputStream (page.openConnection());
330
        }
329
        }
331
        
330
        
332
    }
331
    }
Lines 392-395 Link Here
392
    }
391
    }
393
    
392
    
394
}
393
}
395
(-)openide/src/org/openide/awt/ToolbarPool.java (-3 / +6 lines)
Lines 29-34 Link Here
29
import org.openide.*;
29
import org.openide.*;
30
import org.openide.loaders.*;
30
import org.openide.loaders.*;
31
import org.openide.cookies.InstanceCookie;
31
import org.openide.cookies.InstanceCookie;
32
import org.openide.filesystems.FileObject;
33
import org.openide.filesystems.Repository;
32
import org.openide.util.Task;
34
import org.openide.util.Task;
33
import org.openide.util.TaskListener;
35
import org.openide.util.TaskListener;
34
36
Lines 74-82 Link Here
74
     */
76
     */
75
    public static synchronized ToolbarPool getDefault () {
77
    public static synchronized ToolbarPool getDefault () {
76
        if (defaultPool == null) {
78
        if (defaultPool == null) {
77
            defaultPool = new ToolbarPool (
79
            FileObject fo = Repository.getDefault().getDefaultFileSystem().findResource("Toolbars"); // NOI18N
78
                TopManager.getDefault ().getPlaces ().folders ().toolbars ()
80
            if (fo == null) throw new IllegalStateException("No Toolbars/"); // NOI18N
79
            );
81
            DataFolder folder = DataFolder.findFolder(fo);
82
            defaultPool = new ToolbarPool(folder);
80
            // we mustn't do this in constructor to prevent from
83
            // we mustn't do this in constructor to prevent from
81
            // nevereding recursive calls to this method.
84
            // nevereding recursive calls to this method.
82
            defaultPool.instance.recreate();
85
            defaultPool.instance.recreate();
(-)openide/src/org/openide/compiler/CompilationEngine.java (-1 / +1 lines)
Lines 18-24 Link Here
18
/** Provides support for compilation of
18
/** Provides support for compilation of
19
* <code>CompilerJob</code>s; not needed directly by modules.
19
* <code>CompilerJob</code>s; not needed directly by modules.
20
* There is only one instance in the system,
20
* There is only one instance in the system,
21
* accessible via {@link org.openide.TopManager#getCompilationEngine}.
21
* accessible via {@link #getDefault}.
22
*
22
*
23
* @author Jaroslav Tulach
23
* @author Jaroslav Tulach
24
*/
24
*/
(-)openide/src/org/openide/compiler/CompilerExecutor.java (-4 / +6 lines)
Lines 18-29 Link Here
18
import java.io.IOException;
18
import java.io.IOException;
19
import java.util.List;
19
import java.util.List;
20
import java.util.LinkedList;
20
import java.util.LinkedList;
21
import org.openide.LifecycleManager;
21
22
22
import org.openide.TopManager;
23
import org.openide.awt.StatusDisplayer;
23
import org.openide.execution.*;
24
import org.openide.execution.*;
24
import org.openide.filesystems.*;
25
import org.openide.filesystems.*;
25
import org.openide.util.io.FoldingIOException;
26
import org.openide.util.io.FoldingIOException;
26
import org.openide.util.NbBundle;
27
import org.openide.util.NbBundle;
28
import org.openide.windows.IOProvider;
27
import org.openide.windows.InputOutput;
29
import org.openide.windows.InputOutput;
28
30
29
/** For external compilation - runs external compiler through std
31
/** For external compilation - runs external compiler through std
Lines 71-77 Link Here
71
    
73
    
72
    private static InputOutput getCompilerIO() {
74
    private static InputOutput getCompilerIO() {
73
        String outName = NbBundle.getBundle("org.openide.compiler.Bundle").getString ("CTL_CompileTab");
75
        String outName = NbBundle.getBundle("org.openide.compiler.Bundle").getString ("CTL_CompileTab");
74
        return TopManager.getDefault().getIO(outName, false);
76
        return IOProvider.getDefault().getIO(outName, false);
75
    }
77
    }
76
78
77
    /** Executes a compilation
79
    /** Executes a compilation
Lines 145-154 Link Here
145
        public void run() {
147
        public void run() {
146
            try {
148
            try {
147
                // Save all modified files
149
                // Save all modified files
148
                TopManager.getDefault().saveAll();
150
                LifecycleManager.getDefault().saveAll();
149
                String msg = eeg.getStatusLineText();
151
                String msg = eeg.getStatusLineText();
150
152
151
                TopManager.getDefault().setStatusText(msg);
153
                StatusDisplayer.getDefault().setStatusText(msg);
152
154
153
                csp = new CompilerSysProcess(
155
                csp = new CompilerSysProcess(
154
                          this,
156
                          this,
(-)openide/src/org/openide/compiler/CompilerType.java (-9 / +4 lines)
Lines 16-24 Link Here
16
import java.util.*;
16
import java.util.*;
17
17
18
import org.openide.ServiceType;
18
import org.openide.ServiceType;
19
import org.openide.TopManager;
20
import org.openide.loaders.DataObject;
19
import org.openide.loaders.DataObject;
21
import org.openide.util.HelpCtx;
20
import org.openide.util.HelpCtx;
21
import org.openide.util.Lookup;
22
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
23
23
24
/** Base class defining method for compilation service.
24
/** Base class defining method for compilation service.
Lines 50-56 Link Here
50
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
50
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
51
    */
51
    */
52
    public static Enumeration compilerTypes () {
52
    public static Enumeration compilerTypes () {
53
        return TopManager.getDefault ().getServices ().services (CompilerType.class);
53
        return Collections.enumeration(Lookup.getDefault().lookup(new Lookup.Template(CompilerType.class)).allInstances());
54
    }
54
    }
55
55
56
    /** Find the
56
    /** Find the
Lines 66-77 Link Here
66
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
66
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
67
    */
67
    */
68
    public static CompilerType find (Class clazz) {
68
    public static CompilerType find (Class clazz) {
69
        ServiceType t = TopManager.getDefault ().getServices ().find (clazz);
69
        return (CompilerType)Lookup.getDefault().lookup(clazz);
70
        if (t instanceof CompilerType) {
71
            return (CompilerType)t;
72
        } else {
73
            return null;
74
        }
75
    }
70
    }
76
71
77
    /** Find the
72
    /** Find the
Lines 86-92 Link Here
86
    * @return the desired compiler or <code>null</code> if it does not exist
81
    * @return the desired compiler or <code>null</code> if it does not exist
87
    */
82
    */
88
    public static CompilerType find (String name) {
83
    public static CompilerType find (String name) {
89
        ServiceType t = TopManager.getDefault ().getServices ().find (name);
84
        ServiceType t = ((ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class)).find (name);
90
        if (t instanceof CompilerType) {
85
        if (t instanceof CompilerType) {
91
            return (CompilerType)t;
86
            return (CompilerType)t;
92
        } else {
87
        } else {
(-)openide/src/org/openide/compiler/NoCompiler.java (-3 / +3 lines)
Lines 7-18 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
package org.openide.compiler;
13
package org.openide.compiler;
14
14
15
import org.openide.TopManager;
15
import org.openide.awt.StatusDisplayer;
16
import org.openide.loaders.DataObject;
16
import org.openide.loaders.DataObject;
17
import org.openide.util.HelpCtx;
17
import org.openide.util.HelpCtx;
18
import org.openide.util.NbBundle;
18
import org.openide.util.NbBundle;
Lines 36-42 Link Here
36
    }
36
    }
37
37
38
    public void prepareJob (CompilerJob ign1, Class ign2, DataObject dob) {
38
    public void prepareJob (CompilerJob ign1, Class ign2, DataObject dob) {
39
        TopManager.getDefault ().setStatusText (
39
        StatusDisplayer.getDefault ().setStatusText (
40
                NbBundle.getMessage (NoCompiler.class, "MSG_NoCompiler", // NOI18N
40
                NbBundle.getMessage (NoCompiler.class, "MSG_NoCompiler", // NOI18N
41
                dob.getPrimaryFile ().getPath())
41
                dob.getPrimaryFile ().getPath())
42
        );
42
        );
(-)openide/src/org/openide/cookies/FilterCookie.java (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
/** Cookie for node groups which can somehow be filtered.
18
/** Cookie for node groups which can somehow be filtered.
19
 * This would be applied to a subclass of {@link org.openide.nodes.Children Children}.
19
 * This would be applied to a subclass of {@link org.openide.nodes.Children Children}.
20
*
20
* @deprecated Use Looks instead.
21
* @author Jaroslav Tulach, Jan Jancura, Dafe Simonek
21
* @author Jaroslav Tulach, Jan Jancura, Dafe Simonek
22
*/
22
*/
23
public interface FilterCookie extends Node.Cookie {
23
public interface FilterCookie extends Node.Cookie {
(-)openide/src/org/openide/execution/Executor.java (-11 / +6 lines)
Lines 16-30 Link Here
16
import java.io.ObjectInputStream;
16
import java.io.ObjectInputStream;
17
import java.io.ObjectOutputStream;
17
import java.io.ObjectOutputStream;
18
import java.io.IOException;
18
import java.io.IOException;
19
import java.util.Collections;
19
import java.util.Enumeration;
20
import java.util.Enumeration;
20
21
21
import org.openide.TopManager;
22
import org.openide.ServiceType;
22
import org.openide.ServiceType;
23
import org.openide.util.HelpCtx;
23
import org.openide.util.HelpCtx;
24
import org.openide.loaders.DataObject;
24
import org.openide.loaders.DataObject;
25
import org.openide.loaders.ExecSupport;
26
import org.openide.loaders.FileEntry;
25
import org.openide.loaders.FileEntry;
27
import org.openide.cookies.ArgumentsCookie;
26
import org.openide.cookies.ArgumentsCookie;
27
import org.openide.util.Lookup;
28
28
29
/** Implements the execution of a class.
29
/** Implements the execution of a class.
30
* There may be several different types of executors installed in the system,
30
* There may be several different types of executors installed in the system,
Lines 91-97 Link Here
91
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
91
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
92
    */
92
    */
93
    public static Enumeration executors () {
93
    public static Enumeration executors () {
94
        return TopManager.getDefault ().getServices ().services (Executor.class);
94
        return Collections.enumeration(Lookup.getDefault().lookup(new Lookup.Template(Executor.class)).allInstances());
95
    }
95
    }
96
96
97
    /** Find the
97
    /** Find the
Lines 107-118 Link Here
107
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
107
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
108
    */
108
    */
109
    public static Executor find (Class clazz) {
109
    public static Executor find (Class clazz) {
110
        ServiceType t = TopManager.getDefault ().getServices ().find (clazz);
110
        return (Executor)Lookup.getDefault().lookup(clazz);
111
        if (t instanceof Executor) {
112
            return (Executor)t;
113
        } else {
114
            return null;
115
        }
116
    }
111
    }
117
112
118
    /** Find the
113
    /** Find the
Lines 127-133 Link Here
127
    * @return the desired executor or <code>null</code> if it does not exist
122
    * @return the desired executor or <code>null</code> if it does not exist
128
    */
123
    */
129
    public static Executor find (String name) {
124
    public static Executor find (String name) {
130
        ServiceType t = TopManager.getDefault ().getServices ().find (name);
125
        ServiceType t = ((ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class)).find (name);
131
        if (t instanceof Executor) {
126
        if (t instanceof Executor) {
132
            return (Executor)t;
127
            return (Executor)t;
133
        } else {
128
        } else {
Lines 136-142 Link Here
136
    }
131
    }
137
132
138
    /** Get the default executor for the system's execution engine.
133
    /** Get the default executor for the system's execution engine.
139
    * <p>You may actually want {@link org.openide.loaders.ExecSupport#getExecutor}.
134
    * <p>You may actually want {@link org.openide.loaders.ExecutionSupport#getExecutor}.
140
    * @return the default executor
135
    * @return the default executor
141
    * @deprecated The notion of a default executor for all file types is probably meaningless.
136
    * @deprecated The notion of a default executor for all file types is probably meaningless.
142
    */
137
    */
(-)openide/src/org/openide/execution/ExecutorType.java (-3 / +3 lines)
Lines 19-24 Link Here
19
import java.util.Enumeration;
19
import java.util.Enumeration;
20
20
21
import org.openide.*;
21
import org.openide.*;
22
import org.openide.util.Lookup;
22
23
23
/** Patch for backward compatibility of executors and debugger types.
24
/** Patch for backward compatibility of executors and debugger types.
24
*
25
*
Lines 54-67 Link Here
54
            ServiceType exc = null;
55
            ServiceType exc = null;
55
56
56
            // try to find the executor by name
57
            // try to find the executor by name
57
            TopManager tm = TopManager.getDefault ();
58
            ServiceType.Registry r = (ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class);
58
            ServiceType.Registry r = tm.getServices ();
59
            exc = r.find (name);
59
            exc = r.find (name);
60
            if (exc == null) {
60
            if (exc == null) {
61
                // try to find it by class
61
                // try to find it by class
62
                try {
62
                try {
63
                    exc = r.find (
63
                    exc = r.find (
64
                              Class.forName (className, true, tm.systemClassLoader ())
64
                              Class.forName (className, true, (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class))
65
                          );
65
                          );
66
                } catch (ClassNotFoundException ex) {
66
                } catch (ClassNotFoundException ex) {
67
                }
67
                }
(-)openide/src/org/openide/execution/NbClassLoader.java (-5 lines)
Lines 27-33 Link Here
27
import java.util.jar.Manifest;
27
import java.util.jar.Manifest;
28
28
29
import org.openide.ErrorManager;
29
import org.openide.ErrorManager;
30
import org.openide.TopManager;
31
import org.openide.filesystems.*;
30
import org.openide.filesystems.*;
32
import org.openide.util.Lookup;
31
import org.openide.util.Lookup;
33
import org.openide.windows.InputOutput;
32
import org.openide.windows.InputOutput;
Lines 59-65 Link Here
59
    /** Create a new class loader retrieving classes from the core IDE as well as the Repository.
58
    /** Create a new class loader retrieving classes from the core IDE as well as the Repository.
60
     * @see FileSystemCapability#EXECUTE
59
     * @see FileSystemCapability#EXECUTE
61
     * @see FileSystemCapability#fileSystems
60
     * @see FileSystemCapability#fileSystems
62
     * @see TopManager#systemClassLoader
63
    */
61
    */
64
    public NbClassLoader () {
62
    public NbClassLoader () {
65
        super (
63
        super (
Lines 72-78 Link Here
72
    * and redirecting system I/O.
70
    * and redirecting system I/O.
73
     * @param io an I/O tab in the Output Window
71
     * @param io an I/O tab in the Output Window
74
     * @see org.openide.filesystems.Repository#getFileSystems
72
     * @see org.openide.filesystems.Repository#getFileSystems
75
     * @see TopManager#systemClassLoader
76
     */
73
     */
77
    public NbClassLoader(InputOutput io) {
74
    public NbClassLoader(InputOutput io) {
78
        this();
75
        this();
Lines 81-87 Link Here
81
78
82
    /** Create a new class loader retrieving classes from the core IDE as well as specified file systems.
79
    /** Create a new class loader retrieving classes from the core IDE as well as specified file systems.
83
     * @param fileSystems file systems to load classes from
80
     * @param fileSystems file systems to load classes from
84
     * @see TopManager#systemClassLoader
85
    */
81
    */
86
    public NbClassLoader (FileSystem[] fileSystems) {
82
    public NbClassLoader (FileSystem[] fileSystems) {
87
        this(fileSystems, systemClassLoader());
83
        this(fileSystems, systemClassLoader());
Lines 196-202 Link Here
196
                pc = super.getPermissions(cs);
192
                pc = super.getPermissions(cs);
197
            }
193
            }
198
        } else {
194
        } else {
199
            // OK to use TopManager here; no one could create an InputOutput otherwise...
200
            ExecutionEngine engine = ExecutionEngine.getDefault();
195
            ExecutionEngine engine = ExecutionEngine.getDefault();
201
            pc = engine.createPermissions(cs, inout);
196
            pc = engine.createPermissions(cs, inout);
202
            if (defaultPermissions != null) {
197
            if (defaultPermissions != null) {
(-)openide/src/org/openide/execution/NbProcessDescriptor.java (-1 lines)
Lines 22-28 Link Here
22
import java.lang.reflect.Method;
22
import java.lang.reflect.Method;
23
import java.util.*;
23
import java.util.*;
24
24
25
import org.openide.TopManager;
26
import org.openide.ErrorManager;
25
import org.openide.ErrorManager;
27
import org.openide.util.NbBundle;
26
import org.openide.util.NbBundle;
28
import org.openide.util.Utilities;
27
import org.openide.util.Utilities;
(-)openide/src/org/openide/execution/NbResourceStreamHandler.java (-5 / +4 lines)
Lines 17-24 Link Here
17
import java.net.*;
17
import java.net.*;
18
import java.util.*;
18
import java.util.*;
19
19
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
21
import org.openide.util.Lookup;
22
import org.openide.util.NbBundle;
22
import org.openide.util.NbBundle;
23
23
24
/** Stream handler for internal resource-based URLs.
24
/** Stream handler for internal resource-based URLs.
Lines 90-100 Link Here
90
		ClassLoader loader;
90
		ClassLoader loader;
91
                switch (current) {
91
                switch (current) {
92
                case 2:
92
                case 2:
93
                    loader = TopManager.getDefault ().currentClassLoader ();
93
                    loader = new NbClassLoader();
94
                    if (loader != null) break;
94
                    break;
95
                    // otherwise try another loader
96
                case 1:
95
                case 1:
97
                    loader = TopManager.getDefault ().systemClassLoader ();
96
                    loader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
98
                    if (loader != null) break;
97
                    if (loader != null) break;
99
                    // otherwise try another loader
98
                    // otherwise try another loader
100
                case 0:
99
                case 0:
(-)openide/src/org/openide/execution/NbfsStreamHandlerFactory.java (-2 lines)
Lines 65-72 Link Here
65
     * <strong>Deprecated - meaning of "system classpath" is ill-defined. Use nbresloc instead.</strong>
65
     * <strong>Deprecated - meaning of "system classpath" is ill-defined. Use nbresloc instead.</strong>
66
     * </dl>
66
     * </dl>
67
     * @see NbfsURLConnection
67
     * @see NbfsURLConnection
68
     * @see org.openide.TopManager#systemClassLoader
69
     * @see org.openide.TopManager#currentClassLoader
70
     * @see NbBundle#getLocalizedFile(String,String,Locale,ClassLoader)
68
     * @see NbBundle#getLocalizedFile(String,String,Locale,ClassLoader)
71
     */
69
     */
72
    public NbfsStreamHandlerFactory () {
70
    public NbfsStreamHandlerFactory () {
(-)openide/src/org/openide/execution/ProcessExecutor.java (-1 lines)
Lines 28-34 Link Here
28
import java.util.ArrayList;
28
import java.util.ArrayList;
29
import java.util.StringTokenizer;
29
import java.util.StringTokenizer;
30
30
31
import org.openide.TopManager;
32
import org.openide.ErrorManager;
31
import org.openide.ErrorManager;
33
import org.openide.filesystems.*;
32
import org.openide.filesystems.*;
34
import org.openide.loaders.DataObject;
33
import org.openide.loaders.DataObject;
(-)openide/src/org/openide/execution/ScriptType.java (-8 / +5 lines)
Lines 14-22 Link Here
14
package org.openide.execution;
14
package org.openide.execution;
15
15
16
import java.lang.reflect.InvocationTargetException;
16
import java.lang.reflect.InvocationTargetException;
17
import java.util.Collections;
17
18
18
import org.openide.filesystems.*;
19
import org.openide.filesystems.*;
19
import org.openide.*;
20
import org.openide.*;
21
import org.openide.util.Lookup;
20
22
21
/**
23
/**
22
 * Base class for scripting interpreters.
24
 * Base class for scripting interpreters.
Lines 107-113 Link Here
107
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
109
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
108
    */
110
    */
109
    public static java.util.Enumeration scriptTypes () {
111
    public static java.util.Enumeration scriptTypes () {
110
        return TopManager.getDefault ().getServices ().services (ScriptType.class);
112
        return Collections.enumeration(Lookup.getDefault().lookup(new Lookup.Template(ScriptType.class)).allInstances());
111
    }
113
    }
112
114
113
    /** 
115
    /** 
Lines 117-128 Link Here
117
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
119
    * @deprecated Please use {@link org.openide.util.Lookup} instead.
118
     */
120
     */
119
    public static ScriptType find (Class clazz) {
121
    public static ScriptType find (Class clazz) {
120
        ServiceType t = TopManager.getDefault ().getServices ().find (clazz);
122
        return (ScriptType)Lookup.getDefault().lookup(clazz);
121
        if (t instanceof ScriptType) {
122
            return (ScriptType)t;
123
        } else {
124
            return null;
125
        }
126
    }
123
    }
127
124
128
    /** 
125
    /** 
Lines 131-137 Link Here
131
     * @return the desired script type or <code>null</code> if it does not exist
128
     * @return the desired script type or <code>null</code> if it does not exist
132
     */
129
     */
133
    public static ScriptType find (String name) {
130
    public static ScriptType find (String name) {
134
        ServiceType t = TopManager.getDefault ().getServices ().find (name);
131
        ServiceType t = ((ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class)).find (name);
135
        if (t instanceof ScriptType) {
132
        if (t instanceof ScriptType) {
136
            return (ScriptType)t;
133
            return (ScriptType)t;
137
        } else {
134
        } else {
(-)openide/src/org/openide/explorer/ExplorerActions.java (-149 / +62 lines)
Lines 24-37 Link Here
24
24
25
import java.beans.PropertyChangeListener;
25
import java.beans.PropertyChangeListener;
26
import java.beans.PropertyChangeEvent;
26
import java.beans.PropertyChangeEvent;
27
import org.openide.DialogDisplayer;
27
28
28
import org.openide.util.datatransfer.*;
29
import org.openide.util.datatransfer.*;
29
import org.openide.ErrorManager;
30
import org.openide.ErrorManager;
31
import org.openide.NotifyDescriptor;
30
32
31
import org.openide.actions.CutAction;
33
import org.openide.actions.CutAction;
32
import org.openide.actions.CopyAction;
34
import org.openide.actions.CopyAction;
33
import org.openide.actions.PasteAction;
35
import org.openide.actions.PasteAction;
34
import org.openide.actions.DeleteAction;
36
import org.openide.actions.DeleteAction;
37
import org.openide.filesystems.FileObject;
38
import org.openide.filesystems.FileStateInvalidException;
39
import org.openide.filesystems.FileSystem;
40
import org.openide.filesystems.Repository;
41
import org.openide.loaders.DataObject;
42
import org.openide.loaders.DataShadow;
35
43
36
import org.openide.util.actions.ActionPerformer;
44
import org.openide.util.actions.ActionPerformer;
37
import org.openide.nodes.Node;
45
import org.openide.nodes.Node;
Lines 455-468 Link Here
455
            if ((sel == null) || (sel.length == 0))
463
            if ((sel == null) || (sel.length == 0))
456
                return;
464
                return;
457
465
458
            isConfirmed = !confirmDelete;
459
            // ask for confirmation if not confirmed
460
            if (isConfirmed == false) {
461
                selectedNodes.set(sel);
462
                doConfirm();
463
            }
464
            // perform action if confirmed
466
            // perform action if confirmed
465
            if (isConfirmed) {
467
            if (!confirmDelete || doConfirm(sel)) {
466
468
467
                // clear selected nodes
469
                // clear selected nodes
468
                try {
470
                try {
Lines 479-639 Link Here
479
            }
481
            }
480
        }
482
        }
481
        
483
        
482
        private void doConfirm() {
484
        private boolean doConfirm(Node[] sel) {
483
            try {
485
            String message, title;
484
                Class c = Class.forName("org.openide.explorer.ExplorerActions$ConfirmationInvoker"); // NOI18N
485
                Runnable r = (Runnable) c.newInstance();
486
                r.run();
487
                return;
488
            } catch (Exception e) {
489
                // if something went wrong just
490
                // resort to swing (IDE probably not present)
491
            } catch (LinkageError e) {
492
            }
493
            int res = javax.swing.JOptionPane.showConfirmDialog(null, 
494
                message, title,
495
                javax.swing.JOptionPane.YES_NO_OPTION);
496
            isConfirmed = (res == JOptionPane.YES_OPTION);
497
        }
498
        
499
        private void doDestroy(Node[] sel) {
500
            DestroyAtomic da = new DestroyAtomic();
501
            da.sel = sel;
502
            destroyRunnable.set(da);
503
            try {
504
                Class c = Class.forName("org.openide.explorer.ExplorerActions$DestroyInvoker"); // NOI18N
505
                Runnable r = (Runnable) c.newInstance();
506
                r.run();
507
                return;
508
            } catch (IllegalStateException ise) {
509
                // this should be annotated properly and should
510
                // come from DestroyInvoker. It means real problem
511
                // and rethrow
512
                throw ise;
513
            } catch (Exception e) {
514
                // if something went wrong just
515
                // call the action directly (IDE probably not present)
516
            } catch (LinkageError e) {
517
            }
518
            try {
519
                da.invoke(null, null, null);
520
            } catch (Exception e) {
521
                ErrorManager.getDefault ().notify(e);
522
            }
523
        }
524
        
525
        /** "runnable" used by DestroyInvoker */
526
        private class DestroyAtomic implements InvocationHandler {
527
            Node [] sel; // sel has to be non null before calling run!
528
            public Object invoke(Object proxy, Method method, Object[] args) throws Exception {
529
                for (int i=0; i<sel.length; i++) {
530
                    try {
531
                        sel[i].destroy ();
532
                    } catch (IOException e) {
533
                        ErrorManager.getDefault ().notify(e);
534
                    }
535
                }
536
                return null;
537
            }
538
        }
539
        
540
    }
541
    
542
    // these variables are for passing values
543
    // to ConfirmationInvoker and DestroyInvoker
544
    private static boolean isConfirmed;    
545
    private static String title;
546
    private static String message;
547
    private static ThreadLocal destroyRunnable = new ThreadLocal();
548
    private static ThreadLocal selectedNodes = new ThreadLocal();
549
550
    /** This class separates the reference to TopManager and
551
     * will not be present in standalone library.
552
     */
553
    static class DestroyInvoker implements Runnable {
554
        public void run() {
555
            Object dr = destroyRunnable.get();
556
            destroyRunnable.set(null); // free the reference after use
557
            if (dr == null) {
558
                throw new IllegalStateException("DestroyInvoker didn't get parameter dr."); // NOI18N
559
            }
560
            try {
561
                org.openide.filesystems.FileSystem.AtomicAction faa = 
562
                    (org.openide.filesystems.FileSystem.AtomicAction)
563
                    Proxy.newProxyInstance(org.openide.filesystems.FileSystem.AtomicAction.class.getClassLoader(),
564
                        new Class[] { org.openide.filesystems.FileSystem.AtomicAction.class }, (InvocationHandler)dr);
565
                org.openide.TopManager.getDefault().getRepository().getDefaultFileSystem().runAtomicAction(faa);
566
                return;
567
            } catch (java.io.IOException ioe) {
568
                IllegalStateException ise = new IllegalStateException();
569
        	ErrorManager.getDefault ().annotate(ise, ioe); 
570
                throw ise;
571
            }
572
        }
573
    }
574
    
575
    /** This class separates the reference to TopManager and
576
     * will not be present in standalone library.
577
     */
578
    static class ConfirmationInvoker implements Runnable {
579
        public void run() {
580
            Node[] sel = (Node[])selectedNodes.get();
581
            selectedNodes.set(null); // clear after use!
582
            if (sel == null) {
583
                throw new IllegalStateException("ConfirmationInvoker didn't get parameter sel."); // NOI18N
584
            }
585
            if (sel.length == 1) {
486
            if (sel.length == 1) {
586
                if (sel[0].getCookie (org.openide.loaders.DataShadow.class) != null) {
487
                if (sel[0].getCookie(DataShadow.class) != null) {
587
                    title = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteShadowTitle");
488
                    title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteShadowTitle");
588
                    org.openide.loaders.DataShadow obj = (org.openide.loaders.DataShadow)sel[0].getCookie (org.openide.loaders.DataShadow.class);
489
                    DataShadow obj = (DataShadow)sel[0].getCookie(DataShadow.class);
589
                    message = NbBundle.getMessage
490
                    message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteShadow",
590
                        (ExplorerActions.class, "MSG_ConfirmDeleteShadow",
491
                        new Object[] {
591
                         new Object[] {
492
                            obj.getName(), // name of the shadow
592
                             obj.getName (), // name of the shadow
493
                            sel[0].getDisplayName(), // name of original
593
                             sel[0].getDisplayName (), // name of original
494
                            fullName(obj), // full name of file for shadow
594
                             fullName (obj), // full name of file for shadow
495
                            fullName(obj.getOriginal()) // full name of original file
595
                             fullName (obj.getOriginal ()) // full name of original file
496
                        });
596
                         });
597
                } else if (sel[0].getCookie(org.openide.loaders.DataFolder.class) != null) {
497
                } else if (sel[0].getCookie(org.openide.loaders.DataFolder.class) != null) {
598
                    message = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteFolder",
498
                    message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteFolder",
599
                                                   sel[0].getDisplayName());
499
                    sel[0].getDisplayName());
600
                    title = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteFolderTitle");
500
                    title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteFolderTitle");
601
                } else {
501
                } else {
602
                    message = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteObject",
502
                    message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObject",
603
                                                   sel[0].getDisplayName());
503
                    sel[0].getDisplayName());
604
                    title = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteObjectTitle");
504
                    title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObjectTitle");
605
                }
505
                }
606
            }
506
            }
607
            else {
507
            else {
608
                message = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteObjects",
508
                message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObjects",
609
                                               new Integer(sel.length));
509
                new Integer(sel.length));
610
                title = NbBundle.getMessage (ExplorerActions.class, "MSG_ConfirmDeleteObjectsTitle");
510
                title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObjectsTitle");
611
            }
511
            }
612
            org.openide.NotifyDescriptor desc = new 
512
            NotifyDescriptor desc = new NotifyDescriptor.Confirmation(message, title, NotifyDescriptor.YES_NO_OPTION);
613
                org.openide.NotifyDescriptor.Confirmation(
513
            return NotifyDescriptor.YES_OPTION.equals(DialogDisplayer.getDefault().notify(desc));
614
                    message,
514
        }
615
                    title,
515
        private String fullName(DataObject obj) {
616
                    org.openide.NotifyDescriptor.YES_NO_OPTION
516
            FileObject f = obj.getPrimaryFile();
617
                );
517
            if (f.isRoot()) {
618
            isConfirmed = org.openide.NotifyDescriptor.YES_OPTION.equals (
619
                          org.openide.TopManager.getDefault().notify(desc));
620
        }
621
622
        private String fullName (org.openide.loaders.DataObject obj) {
623
            org.openide.filesystems.FileObject f = obj.getPrimaryFile ();
624
            if (f.isRoot ()) {
625
                try {
518
                try {
626
                    return f.getFileSystem ().getDisplayName ();
519
                    return f.getFileSystem().getDisplayName();
627
                } catch (org.openide.filesystems.FileStateInvalidException e) {
520
                } catch (FileStateInvalidException e) {
628
                    return ""; //NOI18N
521
                    return ""; //NOI18N
629
                }
522
                }
630
            } else {
523
            } else {
631
                return f.toString ();
524
                return f.toString();
632
            }
525
            }
633
        }
526
        }
527
        
528
        private void doDestroy(final Node[] sel) {
529
            try {
530
                Repository.getDefault().getDefaultFileSystem().runAtomicAction(new FileSystem.AtomicAction() {
531
                    public void run() throws IOException {
532
                        for (int i=0; i< sel.length; i++) {
533
                            try {
534
                                sel[i].destroy();
535
                            } catch (IOException e) {
536
                                ErrorManager.getDefault().notify(e);
537
                            }
538
                        }
539
                    }
540
                });
541
            } catch (IOException ioe) {
542
                IllegalStateException ise = new IllegalStateException();
543
                ErrorManager.getDefault().annotate(ise, ioe);
544
                throw ise;
545
            }
546
        }
547
        
634
    }
548
    }
635
549
    
636
637
    private class ActionStateUpdater implements PropertyChangeListener,
550
    private class ActionStateUpdater implements PropertyChangeListener,
638
                                                ClipboardListener,
551
                                                ClipboardListener,
639
                                                ActionListener
552
                                                ActionListener
(-)openide/src/org/openide/explorer/propertysheet/PropertyDialogManager.java (-2 / +2 lines)
Lines 158-164 Link Here
158
    // other methods ............................................................
158
    // other methods ............................................................
159
    
159
    
160
    /** Creates proper DialogDescriptor and obtain dialog instance
160
    /** Creates proper DialogDescriptor and obtain dialog instance
161
     * via TopManager.createDialog() call.
161
     * via DialogDisplayer.createDialog() call.
162
     */
162
     */
163
    private void createDialog() {
163
    private void createDialog() {
164
        if (component instanceof Window) {
164
        if (component instanceof Window) {
Lines 542-548 Link Here
542
                pdm.actionListener
542
                pdm.actionListener
543
            );
543
            );
544
544
545
            pdm.dialog = org.openide.TopManager.getDefault().createDialog(descriptor);
545
            pdm.dialog = org.openide.DialogDisplayer.getDefault().createDialog(descriptor);
546
        }
546
        }
547
    }
547
    }
548
}
548
}
(-)openide/src/org/openide/explorer/propertysheet/PropertySheet.java (-79 / +21 lines)
Lines 18-23 Link Here
18
import java.awt.event.*;
18
import java.awt.event.*;
19
import java.beans.*;
19
import java.beans.*;
20
import java.io.IOException;
20
import java.io.IOException;
21
import java.lang.reflect.Method;
21
import java.util.ResourceBundle;
22
import java.util.ResourceBundle;
22
23
23
import javax.swing.*;
24
import javax.swing.*;
Lines 35-40 Link Here
35
import org.openide.nodes.Node;
36
import org.openide.nodes.Node;
36
import org.openide.nodes.NodeAdapter;
37
import org.openide.nodes.NodeAdapter;
37
import org.openide.nodes.NodeListener;
38
import org.openide.nodes.NodeListener;
39
import org.openide.nodes.NodeOperation;
40
import org.openide.util.Lookup;
38
41
39
/**
42
/**
40
* Implements a "property sheet" for a set of selected beans.
43
* Implements a "property sheet" for a set of selected beans.
Lines 194-199 Link Here
194
        setPreferredSize(new Dimension(200, 300));
197
        setPreferredSize(new Dimension(200, 300));
195
    }
198
    }
196
199
200
    static ThreadLocal current = new ThreadLocal();
201
197
    /** Reference to PropertySheetSettings are separated here.*/
202
    /** Reference to PropertySheetSettings are separated here.*/
198
    private static class PropertySheetSettingsInvoker implements Runnable {
203
    private static class PropertySheetSettingsInvoker implements Runnable {
199
        // constructor avoid IllegalAccessException during creating new instance
204
        // constructor avoid IllegalAccessException during creating new instance
Lines 564-656 Link Here
564
     * Invokes the customization on the currently selected Node (JavaBean).
569
     * Invokes the customization on the currently selected Node (JavaBean).
565
     */
570
     */
566
    void invokeCustomization () {
571
    void invokeCustomization () {
567
        try {
572
        NodeOperation.getDefault().customize(activeNode);
568
            Class c = Class.forName("org.openide.explorer.propertysheet.PropertySheet$CustomizationInvoker"); // NOI18N
569
            Runnable r = (Runnable) c.newInstance();
570
            current.set(this);
571
            r.run();
572
            return;
573
        } catch (Exception e) {
574
            // if something went wrong just
575
            // resort to swing (IDE probably not present)
576
        } catch (LinkageError e) {
577
        }
578
579
        if (activeNode == null) {
580
            throw new IllegalStateException();
581
        }
582
583
        // There is problematic #18300, and also test node if really
584
        // return non-null customizer.
585
        Component customizer = activeNode.getCustomizer();
586
        if(customizer == null) {
587
            throw new IllegalStateException("Node " // NOI18N
588
                + activeNode + " doesn't have a customizer"); // NOI18N
589
        }
590
        
591
        final JDialog d = new JDialog();
592
        d.getContentPane().setLayout(new BorderLayout());
593
        d.getContentPane().add(customizer, BorderLayout.CENTER);
594
        JPanel p = new JPanel();
595
        JButton b = new JButton(NbBundle.getBundle(PropertySheet.class).getString("CTL_Close"));
596
        b.addActionListener(new ActionListener() {
597
            public void actionPerformed(ActionEvent ev) {
598
                d.setVisible(false);
599
                d.dispose();
600
            }
601
        });
602
        p.add(b);
603
        d.getContentPane().add(p, BorderLayout.SOUTH);
604
        d.pack();
605
        d.show();
606
//        JOptionPane.showMessageDialog(null, activeNode.getCustomizer(), "", JOptionPane.CLOSED_OPTION);
607
    }
573
    }
608
    
574
    
609
    /** Show help on the selected tab.
575
    /** Show help on the selected tab.
610
     */
576
     */
611
    void invokeHelp() {
577
    void invokeHelp() {
578
        HelpCtx h = new HelpCtx(getPageHelpID());
579
        // Awkward but should work. Copied from NbTopManager.showHelp.
612
        try {
580
        try {
613
            Class c = Class.forName("org.openide.explorer.propertysheet.PropertySheet$HelpInvoker"); // NOI18N
581
            Class c = ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass("org.netbeans.api.javahelp.Help"); // NOI18N
614
            Runnable r = (Runnable)c.newInstance();
582
            Object o = Lookup.getDefault().lookup(c);
615
            current.set(this);
583
            if (o != null) {
616
            r.run();
584
                Method m = c.getMethod("showHelp", new Class[] {HelpCtx.class}); // NOI18N
617
            return;
585
                m.invoke(o, new Object[] {h});
618
        } catch (Exception e) {
586
                return;
619
            // if something went wrong just
620
            // don't bother (IDE probably not present, cannot show help)
621
        } catch (LinkageError e) {
622
        }
623
    }
624
    
625
    static ThreadLocal current = new ThreadLocal();
626
    
627
    
628
    /**
629
     * Class separating a reference to T opManager. If
630
     * the IDE is not present this class won't be loaded.
631
     */
632
    static class CustomizationInvoker implements Runnable {
633
        public void run() {
634
            PropertySheet instance = (PropertySheet) current.get();
635
            current.set(null);
636
            if ((instance == null) || (instance.activeNode == null)){
637
                throw new IllegalStateException();
638
            }
639
            org.openide.TopManager.getDefault ().getNodeOperation ().customize (instance.activeNode);
640
        }
641
    }
642
    
643
    /** Shows help for the selected tab without using the top manager.
644
     */
645
    static class HelpInvoker implements Runnable {
646
        public void run() {
647
            PropertySheet instance = (PropertySheet)current.get();
648
            current.set(null);
649
            if (instance == null || instance.getPageHelpID() == null){
650
                throw new IllegalStateException();
651
            }
587
            }
652
            org.openide.TopManager.getDefault().showHelp(new HelpCtx(instance.getPageHelpID()));
588
        } catch (ClassNotFoundException cnfe) {
589
            // ignore - maybe javahelp module is not installed, not so strange
590
        } catch (Exception e) {
591
            // potentially more serious
592
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
653
        }
593
        }
594
        // Did not work.
595
        Toolkit.getDefaultToolkit().beep();
654
    }
596
    }
655
    
597
    
656
    private class ActiveNodeListener extends NodeAdapter {
598
    private class ActiveNodeListener extends NodeAdapter {
(-)openide/src/org/openide/explorer/propertysheet/editors/EnhancedCustomPropertyEditor.java (+1 lines)
Lines 22-27 Link Here
22
* instead sets the acquired value after the custom editor is closed.
22
* instead sets the acquired value after the custom editor is closed.
23
*
23
*
24
* @author  Ian Formanek
24
* @author  Ian Formanek
25
* @deprecated Use PropertyEnv instead.
25
*/
26
*/
26
public interface EnhancedCustomPropertyEditor {
27
public interface EnhancedCustomPropertyEditor {
27
28
(-)openide/src/org/openide/explorer/propertysheet/editors/NodeCustomizer.java (+1 lines)
Lines 21-26 Link Here
21
* it customizes.
21
* it customizes.
22
*
22
*
23
* @author Jaroslav Tulach
23
* @author Jaroslav Tulach
24
* @deprecated Use PropertyEnv instead.
24
*/
25
*/
25
public interface NodeCustomizer extends Customizer {
26
public interface NodeCustomizer extends Customizer {
26
    /** Informs this customizer, that it has been connected
27
    /** Informs this customizer, that it has been connected
(-)openide/src/org/openide/explorer/propertysheet/editors/NodePropertyEditor.java (+1 lines)
Lines 21-26 Link Here
21
* is displayed by this editor.
21
* is displayed by this editor.
22
*
22
*
23
* @author Jaroslav Tulach
23
* @author Jaroslav Tulach
24
* @deprecated Use PropertyEnv instead.
24
*/
25
*/
25
public interface NodePropertyEditor extends PropertyEditor {
26
public interface NodePropertyEditor extends PropertyEditor {
26
    /** Informs the editor that the property that it
27
    /** Informs the editor that the property that it
(-)openide/src/org/openide/explorer/view/DragDropUtilities.java (-24 / +8 lines)
Lines 30-38 Link Here
30
import javax.swing.JPopupMenu;
30
import javax.swing.JPopupMenu;
31
import javax.swing.JMenuItem;
31
import javax.swing.JMenuItem;
32
import javax.swing.SwingUtilities;
32
import javax.swing.SwingUtilities;
33
import org.openide.DialogDisplayer;
33
34
34
import org.openide.awt.JPopupMenuPlus;
35
import org.openide.awt.JPopupMenuPlus;
35
import org.openide.ErrorManager;
36
import org.openide.ErrorManager;
37
import org.openide.NotifyDescriptor;
36
import org.openide.nodes.Node;
38
import org.openide.nodes.Node;
37
import org.openide.nodes.NodeTransfer;
39
import org.openide.nodes.NodeTransfer;
38
import org.openide.util.datatransfer.*;
40
import org.openide.util.datatransfer.*;
Lines 332-350 Link Here
332
334
333
    /** Notifies user that the drop was not succesfull. */
335
    /** Notifies user that the drop was not succesfull. */
334
    static void dropNotSuccesfull () {
336
    static void dropNotSuccesfull () {
335
        try {
337
        DialogDisplayer.getDefault().notify(
336
            Class c = Class.forName("org.openide.explorer.view.DragDropUtilities.WarningInvoker"); // NOI18N
338
            new NotifyDescriptor.Message(
337
            Runnable r = (Runnable) c.newInstance();
339
            NbBundle.getBundle(TreeViewDropSupport.class).
338
            r.run();
340
                getString("MSG_NoPasteTypes"),
339
            return;
341
            NotifyDescriptor.WARNING_MESSAGE)
340
        } catch (Exception e) {
342
        );
341
            // if something went wrong just
342
            // resort to swing (IDE probably not present)
343
        } catch (LinkageError e) {
344
        }
345
        javax.swing.JOptionPane.showMessageDialog(null, "", // NOI18N
346
            NbBundle.getBundle(TreeViewDropSupport.class).getString("MSG_NoPasteTypes"),
347
            javax.swing.JOptionPane.WARNING_MESSAGE);
348
    }
343
    }
349
    
344
    
350
    /** If our clipboard is not found return the default system clipboard. */
345
    /** If our clipboard is not found return the default system clipboard. */
Lines 357-373 Link Here
357
        return c;
352
        return c;
358
    }
353
    }
359
354
360
    private static class WarningInvoker implements Runnable {
361
        public void run() {
362
            org.openide.TopManager.getDefault().notify(
363
                new org.openide.NotifyDescriptor.Message(
364
                NbBundle.getBundle(TreeViewDropSupport.class).
365
                    getString("MSG_NoPasteTypes"),
366
                org.openide.NotifyDescriptor.WARNING_MESSAGE)
367
            );
368
        }
369
    }
370
    
371
    /** Paste type used when in clipbopard is MultiTransferable */
355
    /** Paste type used when in clipbopard is MultiTransferable */
372
    static final class MultiPasteType extends PasteType {
356
    static final class MultiPasteType extends PasteType {
373
357
(-)openide/src/org/openide/explorer/view/ListTableView.java (-1 lines)
Lines 271-277 Link Here
271
        SwingUtilities.invokeLater(new Runnable() {
271
        SwingUtilities.invokeLater(new Runnable() {
272
            public void run() {
272
            public void run() {
273
                Node n = new org.netbeans.core.ModuleNode();
273
                Node n = new org.netbeans.core.ModuleNode();
274
                //org.openide.T opManager.getDefault ().getPlaces ().nodes ().repository ();
275
                ExplorerManager em = new ExplorerManager();
274
                ExplorerManager em = new ExplorerManager();
276
                em.setRootContext(n);
275
                em.setRootContext(n);
277
                ListTableView ttv = new ListTableView();
276
                ListTableView ttv = new ListTableView();
(-)openide/src/org/openide/explorer/view/MenuView.java (-1 lines)
Lines 23-29 Link Here
23
import javax.swing.*;
23
import javax.swing.*;
24
import javax.swing.event.*;
24
import javax.swing.event.*;
25
25
26
import org.openide.TopManager;
27
import org.openide.explorer.*;
26
import org.openide.explorer.*;
28
import org.openide.nodes.*;
27
import org.openide.nodes.*;
29
import org.openide.util.WeakListener;
28
import org.openide.util.WeakListener;
(-)openide/src/org/openide/explorer/view/NodeTableModel.java (-2 / +2 lines)
Lines 26-32 Link Here
26
import org.openide.nodes.Node;
26
import org.openide.nodes.Node;
27
import org.openide.nodes.Node.Property;
27
import org.openide.nodes.Node.Property;
28
import org.openide.DialogDescriptor;
28
import org.openide.DialogDescriptor;
29
import org.openide.TopManager;
29
import org.openide.DialogDisplayer;
30
import org.openide.util.NbBundle;
30
import org.openide.util.NbBundle;
31
31
32
/** 
32
/** 
Lines 527-533 Link Here
527
                null
527
                null
528
           );
528
           );
529
        
529
        
530
        final Dialog dialog = TopManager.getDefault().createDialog(dlg);
530
        final Dialog dialog = DialogDisplayer.getDefault().createDialog(dlg);
531
        dialog.show();
531
        dialog.show();
532
        
532
        
533
        if (dlg.getValue().equals( DialogDescriptor.OK_OPTION )) {
533
        if (dlg.getValue().equals( DialogDescriptor.OK_OPTION )) {
(-)openide/src/org/openide/explorer/view/TreeTableView.java (-2 / +1 lines)
Lines 36-42 Link Here
36
import org.openide.util.actions.SystemAction;
36
import org.openide.util.actions.SystemAction;
37
import org.openide.util.NbBundle;
37
import org.openide.util.NbBundle;
38
import org.openide.NotifyDescriptor;
38
import org.openide.NotifyDescriptor;
39
import org.openide.TopManager;
40
import org.openide.awt.MouseUtils;
39
import org.openide.awt.MouseUtils;
41
40
42
/** Explorer view. Allows to view tree of nodes on the left
41
/** Explorer view. Allows to view tree of nodes on the left
Lines 1079-1085 Link Here
1079
        SwingUtilities.invokeLater(new Runnable() {
1078
        SwingUtilities.invokeLater(new Runnable() {
1080
            public void run() {
1079
            public void run() {
1081
                Node n = //new org.netbeans.core.ModuleNode();
1080
                Node n = //new org.netbeans.core.ModuleNode();
1082
                    org.openide.TopManager.getDefault ().getPlaces ().nodes ().repository ();
1081
                    RepositoryNodeFactory.getDefault().repository(DataFilter.ALL);
1083
1082
1084
                org.openide.explorer.ExplorerManager em = new org.openide.explorer.ExplorerManager();
1083
                org.openide.explorer.ExplorerManager em = new org.openide.explorer.ExplorerManager();
1085
                em.setRootContext(n);
1084
                em.setRootContext(n);
(-)openide/src/org/openide/filesystems/DefaultAttributes.java (-1 / +1 lines)
Lines 88-94 Link Here
88
    /**  readOnlyAttrs is name of virtual attribute. This name of virtual attribute 
88
    /**  readOnlyAttrs is name of virtual attribute. This name of virtual attribute 
89
     * is shared between classes (and should be changed everywhere): 
89
     * is shared between classes (and should be changed everywhere): 
90
     * - org.openide.filesystems.DefaultAttributes
90
     * - org.openide.filesystems.DefaultAttributes
91
     * - org.openide.loaders.ExecSupport
91
     * - org.openide.loaders.ExecutionSupport
92
     * - org.openide.loaders.CompilerSupport
92
     * - org.openide.loaders.CompilerSupport
93
     * - org.netbeans.core.ExJarFileSystem
93
     * - org.netbeans.core.ExJarFileSystem
94
     */
94
     */
(-)openide/src/org/openide/filesystems/Repository.java (-1 / +1 lines)
Lines 27-33 Link Here
27
* At any given time, no two filesystems in the pool may share the same {@link FileSystem#getSystemName name}
27
* At any given time, no two filesystems in the pool may share the same {@link FileSystem#getSystemName name}
28
* (unless all but one are {@link FileSystem#isValid invalid}).
28
* (unless all but one are {@link FileSystem#isValid invalid}).
29
*
29
*
30
* <p>Use {@link org.openide.TopManager#getRepository} to retrieve the default instance.
30
* <p>Use {@link #getDefault} to retrieve the default instance.
31
*
31
*
32
* <p>Note that you may construct additional instances of the Repository if you
32
* <p>Note that you may construct additional instances of the Repository if you
33
* wish. The serialization replacer of this class specifically deals with the
33
* wish. The serialization replacer of this class specifically deals with the
(-)openide/src/org/openide/loaders/CompilerSupport.java (-1 / +1 lines)
Lines 52-58 Link Here
52
    /**  readOnlyAttrs is name of virtual attribute. This name of virtual attribute 
52
    /**  readOnlyAttrs is name of virtual attribute. This name of virtual attribute 
53
     * is shared between classes (and should be changed everywhere): 
53
     * is shared between classes (and should be changed everywhere): 
54
     * - org.openide.filesystems.DefaultAttributes
54
     * - org.openide.filesystems.DefaultAttributes
55
     * - org.openide.loaders.ExecSupport
55
     * - org.openide.loaders.ExecutionSupport
56
     * - org.openide.loaders.CompilerSupport
56
     * - org.openide.loaders.CompilerSupport
57
     * - org.netbeans.core.ExJarFileSystem
57
     * - org.netbeans.core.ExJarFileSystem
58
     */    
58
     */    
(-)openide/src/org/openide/loaders/DataFilter.java (-1 / +1 lines)
Lines 15-21 Link Here
15
15
16
16
17
/** Allows certain data objects to be excluded from being displayed.
17
/** Allows certain data objects to be excluded from being displayed.
18
*
18
* @see RepositoryNodeFactory
19
* @author Jaroslav Tulach
19
* @author Jaroslav Tulach
20
*/
20
*/
21
public interface DataFilter extends java.io.Serializable {
21
public interface DataFilter extends java.io.Serializable {
(-)openide/src/org/openide/loaders/DataFolder.java (-11 / +13 lines)
Lines 24-31 Link Here
24
import java.lang.reflect.InvocationTargetException;
24
import java.lang.reflect.InvocationTargetException;
25
import java.util.*;
25
import java.util.*;
26
import javax.swing.event.ChangeEvent;
26
import javax.swing.event.ChangeEvent;
27
import org.openide.DialogDisplayer;
27
28
28
import org.openide.TopManager;
29
import org.openide.ErrorManager;
29
import org.openide.ErrorManager;
30
import org.openide.NotifyDescriptor;
30
import org.openide.NotifyDescriptor;
31
import org.openide.compiler.Compiler;
31
import org.openide.compiler.Compiler;
Lines 36-41 Link Here
36
import org.openide.actions.ReorderAction;
36
import org.openide.actions.ReorderAction;
37
import org.openide.util.HelpCtx;
37
import org.openide.util.HelpCtx;
38
import org.openide.nodes.*;
38
import org.openide.nodes.*;
39
import org.openide.util.Lookup;
39
import org.openide.util.enum.QueueEnumeration;
40
import org.openide.util.enum.QueueEnumeration;
40
import org.openide.util.enum.SequenceEnumeration;
41
import org.openide.util.enum.SequenceEnumeration;
41
import org.openide.util.enum.RemoveDuplicatesEnumeration;
42
import org.openide.util.enum.RemoveDuplicatesEnumeration;
Lines 44-49 Link Here
44
import org.openide.util.WeakListener;
45
import org.openide.util.WeakListener;
45
import org.openide.util.RequestProcessor;
46
import org.openide.util.RequestProcessor;
46
import org.openide.util.Utilities;
47
import org.openide.util.Utilities;
48
import org.openide.windows.IOProvider;
47
49
48
/** A folder containing data objects.
50
/** A folder containing data objects.
49
* Is actually itself a data object, whose primary (and only) file object
51
* Is actually itself a data object, whose primary (and only) file object
Lines 569-581 Link Here
569
                    obj.copy (newFolder);
571
                    obj.copy (newFolder);
570
                } else {
572
                } else {
571
                    // data object can not be copied, inform user
573
                    // data object can not be copied, inform user
572
                    TopManager.getDefault().getStdOut().println(
574
                    IOProvider.getDefault().getStdOut().println(
573
                        NbBundle.getMessage(DataFolder.class,
575
                        NbBundle.getMessage(DataFolder.class,
574
			    "FMT_CannotCopyDo", obj.getName() )
576
			    "FMT_CannotCopyDo", obj.getName() )
575
                    );
577
                    );
576
                }
578
                }
577
            } catch (IOException ex) {
579
            } catch (IOException ex) {
578
                TopManager.getDefault ().notifyException (ex);
580
                ErrorManager.getDefault().notify(ex);
579
            }
581
            }
580
        }
582
        }
581
583
Lines 710-723 Link Here
710
                        keepAlive = true;
712
                        keepAlive = true;
711
                        
713
                        
712
                        // data object can not be moved, inform user
714
                        // data object can not be moved, inform user
713
                        TopManager.getDefault ().getStdOut ().println (
715
                        IOProvider.getDefault ().getStdOut ().println (
714
                            NbBundle.getMessage (DataFolder.class,
716
                            NbBundle.getMessage (DataFolder.class,
715
				    "FMT_CannotMoveDo", obj.getName ())
717
				    "FMT_CannotMoveDo", obj.getName ())
716
                        );
718
                        );
717
                    }
719
                    }
718
                } catch (IOException ex) {
720
                } catch (IOException ex) {
719
                    keepAlive = true;
721
                    keepAlive = true;
720
                    TopManager.getDefault ().notifyException (ex);
722
                    ErrorManager.getDefault().notify(ex);
721
                }
723
                }
722
            }
724
            }
723
725
Lines 779-785 Link Here
779
                DataObject obj = (DataObject)en.nextElement ();
781
                DataObject obj = (DataObject)en.nextElement ();
780
                obj.createFromTemplate (newFolder);
782
                obj.createFromTemplate (newFolder);
781
            } catch (IOException ex) {
783
            } catch (IOException ex) {
782
                TopManager.getDefault ().notifyException (ex);
784
                ErrorManager.getDefault().notify(ex);
783
            }
785
            }
784
        }
786
        }
785
787
Lines 1164-1170 Link Here
1164
                                                   DataObject.getString ("CTL_NewFolderName"), DataObject.getString ("CTL_NewFolderTitle")
1166
                                                   DataObject.getString ("CTL_NewFolderName"), DataObject.getString ("CTL_NewFolderTitle")
1165
                                               );
1167
                                               );
1166
            input.setInputText (DataObject.getString ("CTL_NewFolderValue"));
1168
            input.setInputText (DataObject.getString ("CTL_NewFolderValue"));
1167
            if (TopManager.getDefault ().notify (input) == NotifyDescriptor.OK_OPTION) {
1169
            if (DialogDisplayer.getDefault ().notify (input) == NotifyDescriptor.OK_OPTION) {
1168
                String folderName = input.getInputText ();
1170
                String folderName = input.getInputText ();
1169
                if ("".equals (folderName)) return; // empty name = cancel // NOI18N
1171
                if ("".equals (folderName)) return; // empty name = cancel // NOI18N
1170
1172
Lines 1179-1185 Link Here
1179
                    FileObject existingFile = folder.getFileObject (subFolder);
1181
                    FileObject existingFile = folder.getFileObject (subFolder);
1180
                    if (existingFile != null) {
1182
                    if (existingFile != null) {
1181
                        if (!existingFile.isFolder ()) {
1183
                        if (!existingFile.isFolder ()) {
1182
                            TopManager.getDefault ().notify (
1184
                            DialogDisplayer.getDefault ().notify (
1183
                                new NotifyDescriptor.Message (
1185
                                new NotifyDescriptor.Message (
1184
                                    NbBundle.getMessage (DataObject.class,
1186
                                    NbBundle.getMessage (DataObject.class,
1185
					    "MSG_FMT_FileExists",
1187
					    "MSG_FMT_FileExists",
Lines 1204-1210 Link Here
1204
                    FileObject existingFile = folder.getFileObject (folderName);
1206
                    FileObject existingFile = folder.getFileObject (folderName);
1205
                    if (existingFile != null) {
1207
                    if (existingFile != null) {
1206
                        if (existingFile.isFolder ()) {
1208
                        if (existingFile.isFolder ()) {
1207
                            TopManager.getDefault ().notify (
1209
                            DialogDisplayer.getDefault ().notify (
1208
                                new NotifyDescriptor.Message (
1210
                                new NotifyDescriptor.Message (
1209
                                    NbBundle.getMessage (DataObject.class,
1211
                                    NbBundle.getMessage (DataObject.class,
1210
					    "MSG_FMT_FolderExists",
1212
					    "MSG_FMT_FolderExists",
Lines 1213-1219 Link Here
1213
                                )
1215
                                )
1214
                            );
1216
                            );
1215
                        } else {
1217
                        } else {
1216
                            TopManager.getDefault ().notify (
1218
                            DialogDisplayer.getDefault ().notify (
1217
                                new NotifyDescriptor.Message (
1219
                                new NotifyDescriptor.Message (
1218
                                    NbBundle.getMessage (DataObject.class,
1220
                                    NbBundle.getMessage (DataObject.class,
1219
					    "MSG_FMT_FileExists",
1221
					    "MSG_FMT_FileExists",
Lines 1234-1240 Link Here
1234
1236
1235
                    DataObject created = DataObject.find(folder.createFolder (folderName));
1237
                    DataObject created = DataObject.find(folder.createFolder (folderName));
1236
                    if (created != null) {
1238
                    if (created != null) {
1237
                        TopManager.getDefault().getLoaderPool().fireOperationEvent(
1239
                        ((DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class)).fireOperationEvent(
1238
                            new OperationEvent.Copy (created, DataFolder.this), OperationEvent.TEMPL
1240
                            new OperationEvent.Copy (created, DataFolder.this), OperationEvent.TEMPL
1239
                        );
1241
                        );
1240
                    }
1242
                    }
(-)openide/src/org/openide/loaders/DataLoader.java (-2 / +2 lines)
Lines 17-26 Link Here
17
import java.io.*;
17
import java.io.*;
18
import java.util.*;
18
import java.util.*;
19
19
20
import org.openide.TopManager;
21
import org.openide.ErrorManager;
20
import org.openide.ErrorManager;
22
import org.openide.filesystems.*;
21
import org.openide.filesystems.*;
23
import org.openide.nodes.NodeOp;
22
import org.openide.nodes.NodeOp;
23
import org.openide.util.Lookup;
24
import org.openide.util.NbBundle;
24
import org.openide.util.NbBundle;
25
import org.openide.util.SharedClassObject;
25
import org.openide.util.SharedClassObject;
26
import org.openide.util.Utilities;
26
import org.openide.util.Utilities;
Lines 343-349 Link Here
343
                    Class c = Class.forName (
343
                    Class c = Class.forName (
344
                        Utilities.translate((String)arr[i]),
344
                        Utilities.translate((String)arr[i]),
345
                        false, // why resolve?? --jglick
345
                        false, // why resolve?? --jglick
346
                        TopManager.getDefault ().systemClassLoader ()
346
                        (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)
347
                    );
347
                    );
348
                    SystemAction ac = SystemAction.get (c);
348
                    SystemAction ac = SystemAction.get (c);
349
                    
349
                    
(-)openide/src/org/openide/loaders/DataLoaderPool.java (-3 / +2 lines)
Lines 45-52 Link Here
45
 * {@link DataLoader loaders} in the system. They are used to find valid data objects
45
 * {@link DataLoader loaders} in the system. They are used to find valid data objects
46
 * for given files.
46
 * for given files.
47
 * <P>
47
 * <P>
48
 * The default instance can be retrieved with
48
 * The default instance can be retrieved using lookup.
49
 * {@link org.openide.TopManager#getLoaderPool}.
50
 *
49
 *
51
 * @author Jaroslav Tulach, Petr Hamernik, Dafe Simonek
50
 * @author Jaroslav Tulach, Petr Hamernik, Dafe Simonek
52
 */
51
 */
Lines 456-462 Link Here
456
                Class loaderClass = Class.forName (
455
                Class loaderClass = Class.forName (
457
                assignedLoaderName,
456
                assignedLoaderName,
458
                true,
457
                true,
459
                TopManager.getDefault().systemClassLoader()
458
                (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)
460
                );
459
                );
461
                return DataLoader.getLoader(loaderClass);
460
                return DataLoader.getLoader(loaderClass);
462
            } catch (Exception ex) {
461
            } catch (Exception ex) {
(-)openide/src/org/openide/loaders/DataObject.java (-1 / +1 lines)
Lines 442-448 Link Here
442
    public static DataObject find (FileObject fo)
442
    public static DataObject find (FileObject fo)
443
    throws DataObjectNotFoundException {
443
    throws DataObjectNotFoundException {
444
        if (fo == null)
444
        if (fo == null)
445
            throw new IllegalArgumentException();
445
            throw new IllegalArgumentException("Called DataObject.find on null"); // NOI18N
446
        
446
        
447
        try {
447
        try {
448
            if (!fo.isValid())
448
            if (!fo.isValid())
(-)openide/src/org/openide/loaders/DataTransferSupport.java (-2 / +2 lines)
Lines 18-24 Link Here
18
18
19
package org.openide.loaders;
19
package org.openide.loaders;
20
20
21
import org.openide.TopManager;
22
import org.openide.util.Utilities;
21
import org.openide.util.Utilities;
23
import org.openide.cookies.InstanceCookie;
22
import org.openide.cookies.InstanceCookie;
24
import org.openide.util.HelpCtx;
23
import org.openide.util.HelpCtx;
Lines 29-34 Link Here
29
import java.awt.datatransfer.*;
28
import java.awt.datatransfer.*;
30
import java.io.IOException;
29
import java.io.IOException;
31
import java.io.ObjectOutputStream;
30
import java.io.ObjectOutputStream;
31
import org.openide.DialogDisplayer;
32
32
33
/** Support for data transfer Paste operation.
33
/** Support for data transfer Paste operation.
34
 * @author  Vita Stejskal
34
 * @author  Vita Stejskal
Lines 165-171 Link Here
165
                                                  );
165
                                                  );
166
            nd.setInputText (name);
166
            nd.setInputText (name);
167
167
168
            if (NotifyDescriptor.OK_OPTION == TopManager.getDefault ().notify (nd)) {
168
            if (NotifyDescriptor.OK_OPTION == DialogDisplayer.getDefault ().notify (nd)) {
169
                trg.getPrimaryFile ().getFileSystem ().runAtomicAction (new FileSystem.AtomicAction () {
169
                trg.getPrimaryFile ().getFileSystem ().runAtomicAction (new FileSystem.AtomicAction () {
170
                            public void run () throws IOException {
170
                            public void run () throws IOException {
171
                                FileObject fo = trg.getPrimaryFile ().createData (nd.getInputText (), "ser"); // NOI18N
171
                                FileObject fo = trg.getPrimaryFile ().createData (nd.getInputText (), "ser"); // NOI18N
(-)openide/src/org/openide/loaders/InstanceDataObject.java (-1 / +2 lines)
Lines 941-947 Link Here
941
            ServiceType sr = (ServiceType) obj;
941
            ServiceType sr = (ServiceType) obj;
942
            name = name == null? sr.getName(): name;
942
            name = name == null? sr.getName(): name;
943
            String stName = name;
943
            String stName = name;
944
            for (int i = 1; TopManager.getDefault().getServices().find(stName) != null; i++) {
944
            ServiceType.Registry r = (ServiceType.Registry)Lookup.getDefault().lookup(ServiceType.Registry.class);
945
            for (int i = 1; r.find(stName) != null; i++) {
945
                stName = new StringBuffer(name.length() + 2).
946
                stName = new StringBuffer(name.length() + 2).
946
                    append(name).append('_').append(i).toString();
947
                    append(name).append('_').append(i).toString();
947
            }
948
            }
(-)openide/src/org/openide/loaders/InstanceSupport.java (-2 / +2 lines)
Lines 17-23 Link Here
17
import java.io.*;
17
import java.io.*;
18
18
19
import org.openide.ErrorManager;
19
import org.openide.ErrorManager;
20
import org.openide.TopManager;
21
import org.openide.cookies.InstanceCookie;
20
import org.openide.cookies.InstanceCookie;
22
import org.openide.filesystems.FileObject;
21
import org.openide.filesystems.FileObject;
23
import org.openide.util.HelpCtx;
22
import org.openide.util.HelpCtx;
Lines 39-44 Link Here
39
import org.openide.util.Utilities;
38
import org.openide.util.Utilities;
40
import org.openide.util.SharedClassObject;
39
import org.openide.util.SharedClassObject;
41
import org.openide.execution.NbClassLoader;
40
import org.openide.execution.NbClassLoader;
41
import org.openide.util.Lookup;
42
42
43
// Encapsulates working with classes and optimize it.
43
// Encapsulates working with classes and optimize it.
44
/** An instance cookie implementation that works with files or entries.
44
/** An instance cookie implementation that works with files or entries.
Lines 530-536 Link Here
530
                    c = customLoader.loadClass(name);
530
                    c = customLoader.loadClass(name);
531
                } else {
531
                } else {
532
                    // to save the space with wasting classloaders, try the system first
532
                    // to save the space with wasting classloaders, try the system first
533
                    c = TopManager.getDefault ().systemClassLoader ().loadClass (name);
533
                    c = ((ClassLoader)Lookup.getDefault().lookup(ClassLoader.class)).loadClass (name);
534
                }
534
                }
535
            } catch (ClassNotFoundException ex) {
535
            } catch (ClassNotFoundException ex) {
536
                // ok, ignore and try our class loader
536
                // ok, ignore and try our class loader
(-)openide/src/org/openide/loaders/MultiDataObject.java (+2 lines)
Lines 175-180 Link Here
175
     * @return The private field <CODE>secondary</CODE>.
175
     * @return The private field <CODE>secondary</CODE>.
176
     */
176
     */
177
    Object synchObjectSecondary() {
177
    Object synchObjectSecondary() {
178
        Object lock = getSecondary();
179
        if (lock == null) throw new IllegalStateException("getSecondary was null from " + this); // NOI18N
178
        return getSecondary();
180
        return getSecondary();
179
    }
181
    }
180
    
182
    
(-)openide/src/org/openide/loaders/NewObjectPanel.java (-1 lines)
Lines 20-26 Link Here
20
import javax.swing.KeyStroke;
20
import javax.swing.KeyStroke;
21
import javax.swing.SwingUtilities;
21
import javax.swing.SwingUtilities;
22
22
23
import org.openide.TopManager;
24
import org.openide.util.HelpCtx;
23
import org.openide.util.HelpCtx;
25
import org.openide.util.Utilities;
24
import org.openide.util.Utilities;
26
import org.openide.loaders.*;
25
import org.openide.loaders.*;
(-)openide/src/org/openide/loaders/TemplateWizard.java (-4 / +4 lines)
Lines 172-179 Link Here
172
        return template;
172
        return template;
173
    }
173
    }
174
174
175
    /** Sets the template. If under the TopManager.getPlaces ().folders ().
175
    /** Sets the template. If under the Templates/
176
    * templates () directory it will be selected by the dialog.
176
    * directory it will be selected by the dialog.
177
    *
177
    *
178
    * @param obj the template to start with
178
    * @param obj the template to start with
179
    */
179
    */
Lines 184-190 Link Here
184
    }
184
    }
185
    
185
    
186
    /** Setter for the folder with templates. If not specified the 
186
    /** Setter for the folder with templates. If not specified the 
187
     * TopManager.getPlaces ().folders ().templates () is used.
187
     * Templates/ folder is used.
188
     *
188
     *
189
     * @param folder the root folder for all templates if null the
189
     * @param folder the root folder for all templates if null the
190
     *    default folder is used
190
     *    default folder is used
Lines 390-396 Link Here
390
390
391
                try {
391
                try {
392
                    updateState();
392
                    updateState();
393
                    final java.awt.Dialog d = TopManager.getDefault().createDialog(this);
393
                    final java.awt.Dialog d = DialogDisplayer.getDefault().createDialog(this);
394
                    // Bugfix #16161: if there was a message to the user, notify it
394
                    // Bugfix #16161: if there was a message to the user, notify it
395
                    // after the dialog has been shown on screen:
395
                    // after the dialog has been shown on screen:
396
                    if (thrownMessage != null) {
396
                    if (thrownMessage != null) {
(-)openide/src/org/openide/loaders/XMLDataObjectImpl.java (-1 / +1 lines)
Lines 166-172 Link Here
166
            final String NAME = "org-openide-loaders-XMLDataObject-catalog";
166
            final String NAME = "org-openide-loaders-XMLDataObject-catalog";
167
            final String EXT = "xml";
167
            final String EXT = "xml";
168
168
169
            FileObject services = TopManager.getDefault().getRepository().
169
            FileObject services = Repository.getDefault().
170
                getDefaultFileSystem().findResource("Services/Hidden");
170
                getDefaultFileSystem().findResource("Services/Hidden");
171
171
172
            if (services == null) {
172
            if (services == null) {
(-)openide/src/org/openide/nodes/Children.java (-4 / +2 lines)
Lines 2071-2077 Link Here
2071
2071
2072
    /* JST: Useful test routine ;-) *
2072
    /* JST: Useful test routine ;-) *
2073
    static {
2073
    static {
2074
     if (TopManager.getDefault () != null) {
2075
      final TopComponent.Registry r = TopComponent.getRegistry ();
2074
      final TopComponent.Registry r = TopComponent.getRegistry ();
2076
      r.addPropertyChangeListener (new PropertyChangeListener () {
2075
      r.addPropertyChangeListener (new PropertyChangeListener () {
2077
        Node last = new AbstractNode (LEAF);
2076
        Node last = new AbstractNode (LEAF);
Lines 2081-2092 Link Here
2081
          if (arr != null && arr.length == 1) {
2080
          if (arr != null && arr.length == 1) {
2082
            last = arr[0];
2081
            last = arr[0];
2083
          }
2082
          }
2084
          TopManager.getDefault ().setStatusText (
2083
          System.out.println (
2085
            "Activated node: " + last + " \nparent: " + last.getParentNode ()
2084
            "Activated node: " + last + " \nparent: " + last.getParentNode ()
2086
          );
2085
          );
2087
        }
2086
        }
2088
      });
2087
      });
2089
     }
2088
    }
2090
}
2091
    */
2089
    */
2092
}
2090
}
(-)openide/src/org/openide/nodes/NodeAcceptor.java (-2 / +1 lines)
Lines 15-25 Link Here
15
15
16
/** Discriminator accepting only certain sets of nodes.
16
/** Discriminator accepting only certain sets of nodes.
17
* <P>
17
* <P>
18
* Currently used in {@link org.openide.TopManager.NodeOperation#explore}
18
* Currently used in {@link NodeOperation#select}
19
* to find out if the currently selected beans are valid or not.
19
* to find out if the currently selected beans are valid or not.
20
*
20
*
21
* @author Jaroslav Tulach
21
* @author Jaroslav Tulach
22
* @version 0.10, Jan 26, 1998
23
*/
22
*/
24
public interface NodeAcceptor {
23
public interface NodeAcceptor {
25
    /** Is the set of nodes acceptable?
24
    /** Is the set of nodes acceptable?
(-)openide/src/org/openide/nodes/TMUtil.java (-2 / +2 lines)
Lines 240-246 Link Here
240
        public void run () {
240
        public void run () {
241
            Object obj = TALK.get ();
241
            Object obj = TALK.get ();
242
            if (obj instanceof org.openide.DialogDescriptor) {
242
            if (obj instanceof org.openide.DialogDescriptor) {
243
                TALK.set (org.openide.TopManager.getDefault ().createDialog(
243
                TALK.set (org.openide.DialogDisplayer.getDefault ().createDialog(
244
                    (org.openide.DialogDescriptor)obj
244
                    (org.openide.DialogDescriptor)obj
245
                ));
245
                ));
246
            } else {
246
            } else {
Lines 295-301 Link Here
295
            org.openide.DialogDescriptor dd = new org.openide.DialogDescriptor(p, Node.getString("LAB_order"));
295
            org.openide.DialogDescriptor dd = new org.openide.DialogDescriptor(p, Node.getString("LAB_order"));
296
            dd.setModal(true);
296
            dd.setModal(true);
297
            dd.setOptionType(org.openide.DialogDescriptor.DEFAULT_OPTION);
297
            dd.setOptionType(org.openide.DialogDescriptor.DEFAULT_OPTION);
298
            Object result = org.openide.TopManager.getDefault().notify(dd);
298
            Object result = org.openide.DialogDisplayer.getDefault().notify(dd);
299
            if (result == org.openide.DialogDescriptor.OK_OPTION) {
299
            if (result == org.openide.DialogDescriptor.OK_OPTION) {
300
                ic.doClose();
300
                ic.doClose();
301
            }
301
            }
(-)openide/src/org/openide/options/SystemOption.java (-1 lines)
Lines 29-35 Link Here
29
import java.util.Iterator;
29
import java.util.Iterator;
30
import java.util.ResourceBundle;
30
import java.util.ResourceBundle;
31
31
32
import org.openide.TopManager;
33
import org.openide.ErrorManager;
32
import org.openide.ErrorManager;
34
import org.openide.util.HelpCtx;
33
import org.openide.util.HelpCtx;
35
import org.openide.util.NbBundle;
34
import org.openide.util.NbBundle;
(-)openide/src/org/openide/text/CloneableEditorSupport.java (-11 / +12 lines)
Lines 57-68 Link Here
57
import javax.swing.undo.CannotRedoException;
57
import javax.swing.undo.CannotRedoException;
58
import javax.swing.undo.UndoableEdit;
58
import javax.swing.undo.UndoableEdit;
59
import javax.swing.undo.AbstractUndoableEdit;
59
import javax.swing.undo.AbstractUndoableEdit;
60
import org.openide.DialogDisplayer;
60
61
61
import org.openide.awt.UndoRedo;
62
import org.openide.awt.UndoRedo;
62
import org.openide.actions.*;
63
import org.openide.actions.*;
63
import org.openide.TopManager;
64
import org.openide.ErrorManager;
64
import org.openide.ErrorManager;
65
import org.openide.NotifyDescriptor;
65
import org.openide.NotifyDescriptor;
66
import org.openide.awt.StatusDisplayer;
66
import org.openide.cookies.EditorCookie;
67
import org.openide.cookies.EditorCookie;
67
import org.openide.cookies.OpenCookie;
68
import org.openide.cookies.OpenCookie;
68
import org.openide.cookies.CloseCookie;
69
import org.openide.cookies.CloseCookie;
Lines 557-567 Link Here
557
    
558
    
558
    static void notifyInAWT(final String msg) {
559
    static void notifyInAWT(final String msg) {
559
        if (java.awt.EventQueue.isDispatchThread()) {
560
        if (java.awt.EventQueue.isDispatchThread()) {
560
            TopManager.getDefault().notify(new NotifyDescriptor.Message(msg));
561
            DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(msg));
561
        } else {
562
        } else {
562
            java.awt.EventQueue.invokeLater(new Runnable() { // display in the awt thread
563
            java.awt.EventQueue.invokeLater(new Runnable() { // display in the awt thread
563
                                                public void run() {
564
                                                public void run() {
564
                                                    TopManager.getDefault().notify(new NotifyDescriptor.Message(msg));
565
                                                    DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(msg));
565
                                                }
566
                                                }
566
                                            });
567
                                            });
567
        }
568
        }
Lines 608-614 Link Here
608
                saveOption
609
                saveOption
609
            );
610
            );
610
                
611
                
611
            Object ret = TopManager.getDefault().notify(nd);
612
            Object ret = DialogDisplayer.getDefault().notify(nd);
612
613
613
            if (NotifyDescriptor.CANCEL_OPTION.equals(ret)
614
            if (NotifyDescriptor.CANCEL_OPTION.equals(ret)
614
                    || NotifyDescriptor.CLOSED_OPTION.equals(ret)
615
                    || NotifyDescriptor.CLOSED_OPTION.equals(ret)
Lines 634-640 Link Here
634
            MessageFormat format = new MessageFormat(NbBundle.getBundle(EditorSupport.class).getString("MSG_SaveFile")); // NOI18N
635
            MessageFormat format = new MessageFormat(NbBundle.getBundle(EditorSupport.class).getString("MSG_SaveFile")); // NOI18N
635
            String msg = format.format(new Object[] { entry.getDataObject().getName()});
636
            String msg = format.format(new Object[] { entry.getDataObject().getName()});
636
            NotifyDescriptor nd = new NotifyDescriptor.Confirmation(msg, NotifyDescriptor.YES_NO_CANCEL_OPTION);
637
            NotifyDescriptor nd = new NotifyDescriptor.Confirmation(msg, NotifyDescriptor.YES_NO_CANCEL_OPTION);
637
            Object ret = TopManager.getDefault().notify(nd);
638
            Object ret = DialogDisplayer.getDefault().notify(nd);
638
639
639
            if (NotifyDescriptor.CANCEL_OPTION.equals(ret)
640
            if (NotifyDescriptor.CANCEL_OPTION.equals(ret)
640
                    || NotifyDescriptor.CLOSED_OPTION.equals(ret)
641
                    || NotifyDescriptor.CLOSED_OPTION.equals(ret)
Lines 647-653 Link Here
647
                    savec.save();
648
                    savec.save();
648
                }
649
                }
649
                catch (IOException e) {
650
                catch (IOException e) {
650
                    TopManager.getDefault().notifyException(e);
651
                    ErrorManager.getDefault().notify(e);
651
                    return false;
652
                    return false;
652
                }
653
                }
653
            }
654
            }
Lines 929-935 Link Here
929
		    SwingUtilities.invokeLater(new Runnable() {
930
		    SwingUtilities.invokeLater(new Runnable() {
930
			    public void run () {
931
			    public void run () {
931
				NotifyDescriptor nd = new NotifyDescriptor.Confirmation (ex.getLocalizedMessage ());
932
				NotifyDescriptor nd = new NotifyDescriptor.Confirmation (ex.getLocalizedMessage ());
932
				Object res = TopManager.getDefault ().notify (nd);
933
				Object res = DialogDisplayer.getDefault ().notify (nd);
933
				if (NotifyDescriptor.OK_OPTION.equals(res)) {
934
				if (NotifyDescriptor.OK_OPTION.equals(res)) {
934
				    try {
935
				    try {
935
					ex.confirmed ();
936
					ex.confirmed ();
Lines 947-953 Link Here
947
            locked = false;
948
            locked = false;
948
        } catch (IOException e) { // locking failed
949
        } catch (IOException e) { // locking failed
949
            if (e.getMessage () != e.getLocalizedMessage ()) {
950
            if (e.getMessage () != e.getLocalizedMessage ()) {
950
                TopManager.getDefault ().setStatusText (e.getLocalizedMessage ());
951
                StatusDisplayer.getDefault().setStatusText(e.getLocalizedMessage());
951
            }
952
            }
952
            locked = false;
953
            locked = false;
953
        }
954
        }
Lines 1224-1230 Link Here
1224
1225
1225
            reloadDialogOpened = true;
1226
            reloadDialogOpened = true;
1226
            try {
1227
            try {
1227
                Object ret = TopManager.getDefault().notify(nd);
1228
                Object ret = DialogDisplayer.getDefault().notify(nd);
1228
                if (NotifyDescriptor.YES_OPTION.equals(ret)) {
1229
                if (NotifyDescriptor.YES_OPTION.equals(ret)) {
1229
                    doReload = true;
1230
                    doReload = true;
1230
                }
1231
                }
Lines 1303-1309 Link Here
1303
                // no opened editor
1304
                // no opened editor
1304
                String msg = messageOpening ();
1305
                String msg = messageOpening ();
1305
                if (msg != null) {
1306
                if (msg != null) {
1306
                    TopManager.getDefault().setStatusText(msg);
1307
                    StatusDisplayer.getDefault().setStatusText(msg);
1307
                }
1308
                }
1308
1309
1309
                // initializes the document if not initialized
1310
                // initializes the document if not initialized
Lines 1318-1324 Link Here
1318
                if (msg == null) {
1319
                if (msg == null) {
1319
                    msg = ""; // NOI18N
1320
                    msg = ""; // NOI18N
1320
                }
1321
                }
1321
                TopManager.getDefault ().setStatusText (msg);
1322
                StatusDisplayer.getDefault().setStatusText(msg);
1322
                return ce;
1323
                return ce;
1323
            }
1324
            }
1324
        }
1325
        }
(-)openide/src/org/openide/text/DataEditorSupport.java (-3 / +3 lines)
Lines 52-61 Link Here
52
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
52
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
53
import javax.swing.text.html.HTMLDocument;
53
import javax.swing.text.html.HTMLDocument;
54
import javax.swing.undo.CannotUndoException;
54
import javax.swing.undo.CannotUndoException;
55
import org.openide.DialogDisplayer;
55
56
56
import org.openide.awt.UndoRedo;
57
import org.openide.awt.UndoRedo;
57
import org.openide.actions.*;
58
import org.openide.actions.*;
58
import org.openide.TopManager;
59
import org.openide.ErrorManager;
59
import org.openide.ErrorManager;
60
import org.openide.NotifyDescriptor;
60
import org.openide.NotifyDescriptor;
61
import org.openide.cookies.EditorCookie;
61
import org.openide.cookies.EditorCookie;
Lines 232-238 Link Here
232
     * for read-only property of saving file and warns user in that case. */
232
     * for read-only property of saving file and warns user in that case. */
233
    protected boolean canClose() {
233
    protected boolean canClose() {
234
        if(env().isModified() && isEnvReadOnly()) {
234
        if(env().isModified() && isEnvReadOnly()) {
235
            Object result = TopManager.getDefault().notify(
235
            Object result = DialogDisplayer.getDefault().notify(
236
                new NotifyDescriptor.Confirmation(
236
                new NotifyDescriptor.Confirmation(
237
                    NbBundle.getMessage(DataEditorSupport.class,
237
                    NbBundle.getMessage(DataEditorSupport.class,
238
                        "MSG_FileReadOnlyClosing", 
238
                        "MSG_FileReadOnlyClosing", 
Lines 251-257 Link Here
251
     * for read-only property of saving file and warns user in that case. */
251
     * for read-only property of saving file and warns user in that case. */
252
    public void saveDocument() throws IOException {
252
    public void saveDocument() throws IOException {
253
        if(env().isModified() && isEnvReadOnly()) {
253
        if(env().isModified() && isEnvReadOnly()) {
254
            TopManager.getDefault().notify(
254
            DialogDisplayer.getDefault().notify(
255
                new NotifyDescriptor.Message(
255
                new NotifyDescriptor.Message(
256
                    NbBundle.getMessage(DataEditorSupport.class,
256
                    NbBundle.getMessage(DataEditorSupport.class,
257
                        "MSG_FileReadOnlySaving", 
257
                        "MSG_FileReadOnlySaving", 
(-)openide/src/org/openide/text/DefaultPrintable.java (-3 / +4 lines)
Lines 41-48 Link Here
41
import javax.swing.text.Document;
41
import javax.swing.text.Document;
42
import javax.swing.text.BadLocationException;
42
import javax.swing.text.BadLocationException;
43
43
44
import org.openide.TopManager;
45
import org.openide.DialogDescriptor;
44
import org.openide.DialogDescriptor;
45
import org.openide.DialogDisplayer;
46
import org.openide.ErrorManager;
46
import org.openide.NotifyDescriptor;
47
import org.openide.NotifyDescriptor;
47
import org.openide.util.HelpCtx;
48
import org.openide.util.HelpCtx;
48
49
Lines 598-604 Link Here
598
                }
599
                }
599
            }
600
            }
600
        } catch (BadLocationException e){
601
        } catch (BadLocationException e){
601
            TopManager.getDefault().notifyException(e);
602
            ErrorManager.getDefault().notify(e);
602
        }
603
        }
603
        AttributedCharacterIterator[] iters = new AttributedCharacterIterator[iterators.size()];
604
        AttributedCharacterIterator[] iters = new AttributedCharacterIterator[iterators.size()];
604
        iterators.toArray(iters);
605
        iterators.toArray(iters);
Lines 645-651 Link Here
645
                                         }
646
                                         }
646
                                     }
647
                                     }
647
                                 );
648
                                 );
648
        setDialog(TopManager.getDefault().createDialog(ddesc));
649
        setDialog(DialogDisplayer.getDefault().createDialog(ddesc));
649
    }
650
    }
650
651
651
    /** Closes cancellationDialog */
652
    /** Closes cancellationDialog */
(-)openide/src/org/openide/text/EditorSupport.java (-2 / +2 lines)
Lines 52-61 Link Here
52
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
52
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
53
import javax.swing.text.html.HTMLDocument;
53
import javax.swing.text.html.HTMLDocument;
54
import javax.swing.undo.CannotUndoException;
54
import javax.swing.undo.CannotUndoException;
55
import org.openide.ErrorManager;
55
56
56
import org.openide.awt.UndoRedo;
57
import org.openide.awt.UndoRedo;
57
import org.openide.actions.*;
58
import org.openide.actions.*;
58
import org.openide.TopManager;
59
import org.openide.NotifyDescriptor;
59
import org.openide.NotifyDescriptor;
60
import org.openide.cookies.EditorCookie;
60
import org.openide.cookies.EditorCookie;
61
import org.openide.cookies.OpenCookie;
61
import org.openide.cookies.OpenCookie;
Lines 895-901 Link Here
895
                }
895
                }
896
                return (org.openide.nodes.CookieSet) getCookieSetMethod.invoke (obj, new Object[] { });
896
                return (org.openide.nodes.CookieSet) getCookieSetMethod.invoke (obj, new Object[] { });
897
            } catch (Exception e) {
897
            } catch (Exception e) {
898
                TopManager.getDefault ().notifyException (e);
898
                ErrorManager.getDefault().notify(e);
899
                return new org.openide.nodes.CookieSet ();
899
                return new org.openide.nodes.CookieSet ();
900
            }
900
            }
901
        }
901
        }
(-)openide/src/org/openide/text/IndentEngine.java (-2 / +3 lines)
Lines 14-24 Link Here
14
package org.openide.text;
14
package org.openide.text;
15
15
16
import java.io.Writer;
16
import java.io.Writer;
17
import java.util.Collections;
17
import java.util.Enumeration;
18
import java.util.Enumeration;
18
import javax.swing.text.*;
19
import javax.swing.text.*;
19
import org.openide.ServiceType;
20
import org.openide.ServiceType;
20
import org.openide.TopManager;
21
import org.openide.util.HelpCtx;
21
import org.openide.util.HelpCtx;
22
import org.openide.util.Lookup;
22
23
23
/** Indentation engine for formating text in documents.
24
/** Indentation engine for formating text in documents.
24
* Provides mapping between MIME types and engines, so anybody
25
* Provides mapping between MIME types and engines, so anybody
Lines 96-102 Link Here
96
     * @return enumeration of IndentEngine
97
     * @return enumeration of IndentEngine
97
     */
98
     */
98
    public static Enumeration indentEngines() {
99
    public static Enumeration indentEngines() {
99
        return TopManager.getDefault().getServices().services(IndentEngine.class);
100
        return Collections.enumeration(Lookup.getDefault().lookup(new Lookup.Template(IndentEngine.class)).allInstances());
100
    }
101
    }
101
102
102
    /** Finds engine associated with given mime type.
103
    /** Finds engine associated with given mime type.
(-)openide/src/org/openide/text/PositionRef.java (-1 lines)
Lines 26-32 Link Here
26
import org.openide.cookies.EditorCookie;
26
import org.openide.cookies.EditorCookie;
27
import org.openide.ErrorManager;
27
import org.openide.ErrorManager;
28
import org.openide.loaders.DataObject;
28
import org.openide.loaders.DataObject;
29
import org.openide.TopManager;
30
import org.openide.util.NbBundle;
29
import org.openide.util.NbBundle;
31
import org.openide.util.RequestProcessor;
30
import org.openide.util.RequestProcessor;
32
31
(-)openide/src/org/openide/util/HttpServer.java (-1 lines)
Lines 107-113 Link Here
107
    * @param resourcePath path of the resource in classloader format (e.g. <code>/some/path/resources/icon32.gif</code>)
107
    * @param resourcePath path of the resource in classloader format (e.g. <code>/some/path/resources/icon32.gif</code>)
108
    * @return a URL providing access to it
108
    * @return a URL providing access to it
109
    * @see ClassLoader#getResource(java.lang.String)
109
    * @see ClassLoader#getResource(java.lang.String)
110
    * @see org.openide.TopManager#systemClassLoader()
111
    * @throws MalformedURLException for the usual reasons
110
    * @throws MalformedURLException for the usual reasons
112
    * @throws UnknownHostException for the usual reasons, or if there is no registered server
111
    * @throws UnknownHostException for the usual reasons, or if there is no registered server
113
    */
112
    */
(-)openide/src/org/openide/util/Lookup.java (-21 / +27 lines)
Lines 14-19 Link Here
14
package org.openide.util;
14
package org.openide.util;
15
15
16
import java.util.*;
16
import java.util.*;
17
import org.openide.util.lookup.Lookups;
18
import org.openide.util.lookup.ProxyLookup;
17
19
18
/*
20
/*
19
 * I admit that the class is inspirated by JINI(tm). The difference 
21
 * I admit that the class is inspirated by JINI(tm). The difference 
Lines 42-76 Link Here
42
            return defaultLookup;
44
            return defaultLookup;
43
        }
45
        }
44
        
46
        
47
        // You can specify a Lookup impl using a system property if you like.
45
        String className = System.getProperty(
48
        String className = System.getProperty(
46
                               "org.openide.util.Lookup" // NOI18N
49
                               "org.openide.util.Lookup" // NOI18N
47
                           );
50
                           );
48
        
51
        ClassLoader l = Thread.currentThread().getContextClassLoader();
49
        boolean fallback = className == null || className.length () == 0;
50
        if (className == null) {
51
            className = "org.netbeans.core.NbTopManager$Lkp"; // NOI18N
52
        }
53
54
        try {
52
        try {
55
            Class c = Class.forName(className);
53
            if (className != null) {
56
            defaultLookup = (Lookup)c.newInstance();
54
                defaultLookup = (Lookup)Class.forName(className, true, l).newInstance();
57
        } catch (Exception ex) {
58
            defaultLookup = new MetaInfServicesLookup();
59
            if (fallback) {
60
                // ok, this was just fallback to get the default netbeans Lookup
61
                return defaultLookup;
55
                return defaultLookup;
62
            }
56
            }
63
            // else this is a problem, somebody specified a property and
57
        } catch (Exception e) {
64
            // the lookup has not be found
58
            e.printStackTrace();
65
            ex.printStackTrace();
66
            throw new InternalError ();
67
        }
59
        }
68
60
        
69
        // late initialization of the lookup if needed
61
        // OK, none specified (successfully) in a system property.
70
        if (defaultLookup instanceof Runnable) {
62
        // Try MetaInfServicesLookup as a default, which may also
71
            ((Runnable)defaultLookup).run ();
63
        // have a org.openide.util.Lookup line specifying the lookup.
64
        Lookup misl = new MetaInfServicesLookup(l);
65
        defaultLookup = (Lookup)misl.lookup(Lookup.class);
66
        if (defaultLookup != null) {
67
            return defaultLookup;
72
        }
68
        }
73
69
        // You may also specify a Lookup.Provider.
70
        Lookup.Provider prov = (Lookup.Provider)misl.lookup(Lookup.Provider.class);
71
        if (prov != null) {
72
            defaultLookup = Lookups.proxy(prov);
73
            return defaultLookup;
74
        }
75
        // Had no such line, use simple impl.
76
        // It does however need to have ClassLoader available or many things will break.
77
        // Use the thread context classloader in effect now.
78
        Lookup clLookup = Lookups.singleton(l);
79
        defaultLookup = new ProxyLookup(new Lookup[] {misl, clLookup});
74
        return defaultLookup;
80
        return defaultLookup;
75
    }
81
    }
76
    
82
    
(-)openide/src/org/openide/util/MetaInfServicesLookup.java (-4 / +23 lines)
Lines 35-40 Link Here
35
 */
35
 */
36
final class MetaInfServicesLookup extends AbstractLookup {
36
final class MetaInfServicesLookup extends AbstractLookup {
37
    
37
    
38
    // Better not to use ErrorManager here - EM.gD will use this class, might cause cycles etc.
39
    private static final boolean DEBUG = Boolean.getBoolean("org.openide.util.MetaInfServicesLookup.DEBUG"); // NOI18N
40
    
38
    private static final Map knownInstances = new WeakHashMap(); // Map<Class,Object>
41
    private static final Map knownInstances = new WeakHashMap(); // Map<Class,Object>
39
    
42
    
40
    /** A set of all requested classes.
43
    /** A set of all requested classes.
Lines 58-63 Link Here
58
     */
61
     */
59
    public MetaInfServicesLookup(ClassLoader loader) {
62
    public MetaInfServicesLookup(ClassLoader loader) {
60
        this.loader = loader;
63
        this.loader = loader;
64
        if (DEBUG) System.err.println("Created: " + this); // NOI18N
61
    }
65
    }
62
    
66
    
63
    public String toString() {
67
    public String toString() {
Lines 87-92 Link Here
87
     * @param result collection to add Pair to
91
     * @param result collection to add Pair to
88
     */
92
     */
89
    private void search(Class clazz, Collection result) {
93
    private void search(Class clazz, Collection result) {
94
        if (DEBUG) System.err.println("Searching for " + clazz.getName() + " in " + clazz.getClassLoader() + " from " + this); // NOI18N
90
        String res = "META-INF/services/" + clazz.getName(); // NOI18N
95
        String res = "META-INF/services/" + clazz.getName(); // NOI18N
91
        Enumeration en;
96
        Enumeration en;
92
        try {
97
        try {
Lines 127-132 Link Here
127
                if (realMcCoy != clazz) {
132
                if (realMcCoy != clazz) {
128
                    // Either the interface class is not available at all in our loader,
133
                    // Either the interface class is not available at all in our loader,
129
                    // or it is not the same version as we expected. Don't provide results.
134
                    // or it is not the same version as we expected. Don't provide results.
135
                    if (DEBUG) {
136
                        if (realMcCoy != null) {
137
                            System.err.println(clazz.getName() + " is not the real McCoy! Actually found it in " + realMcCoy.getClassLoader()); // NOI18N
138
                        } else {
139
                            System.err.println(clazz.getName() + " could not be found in " + loader); // NOI18N
140
                        }
141
                    }
130
                    return;
142
                    return;
131
                }
143
                }
132
            }
144
            }
Lines 158-163 Link Here
158
                        // Most lines are fully-qualified class names.
170
                        // Most lines are fully-qualified class names.
159
                        Class inst = Class.forName(line, false, loader);
171
                        Class inst = Class.forName(line, false, loader);
160
                        if (!clazz.isAssignableFrom(inst)) {
172
                        if (!clazz.isAssignableFrom(inst)) {
173
                            if (DEBUG) System.err.println("Not a subclass"); // NOI18N
161
                            throw new ClassNotFoundException(inst.getName() + " not a subclass of " + clazz.getName()); // NOI18N
174
                            throw new ClassNotFoundException(inst.getName() + " not a subclass of " + clazz.getName()); // NOI18N
162
                        }
175
                        }
163
                        
176
                        
Lines 177-182 Link Here
177
            }
190
            }
178
        }
191
        }
179
        
192
        
193
        if (DEBUG) System.err.println("Found impls of " + clazz.getName() + ": " + foundClasses + " and removed: " + removeClasses + " from: " + this); // NOI18N
180
        foundClasses.removeAll (removeClasses);
194
        foundClasses.removeAll (removeClasses);
181
        Iterator it = foundClasses.iterator ();
195
        Iterator it = foundClasses.iterator ();
182
        while (it.hasNext ()) {
196
        while (it.hasNext ()) {
Lines 242-255 Link Here
242
                    try {
256
                    try {
243
                        Class c = ((Class)o);
257
                        Class c = ((Class)o);
244
                        synchronized (knownInstances) { // guards only the static cache
258
                        synchronized (knownInstances) { // guards only the static cache
245
                            object = knownInstances.get(c);
259
                            o = knownInstances.get(c);
246
                        }
260
                        }
247
                        if (object == null) {
261
                        if (o == null) {
248
                            object = c.newInstance();
262
                            o = c.newInstance();
249
                            synchronized (knownInstances) { // guards only the static cache
263
                            synchronized (knownInstances) { // guards only the static cache
250
                                knownInstances.put(c, object);
264
                                knownInstances.put(c, o);
251
                            }
265
                            }
252
                        }
266
                        }
267
                        // Do not assign to instance var unless there is a complete synch
268
                        // block between the newInstance and this line. Otherwise we could
269
                        // be assigning a half-constructed instance that another thread
270
                        // could see and return immediately.
271
                        object = o;
253
                    } catch (Exception ex) {
272
                    } catch (Exception ex) {
254
                        ErrorManager.getDefault().notify(ex);
273
                        ErrorManager.getDefault().notify(ex);
255
                        object = null;
274
                        object = null;
(-)openide/src/org/openide/windows/CloneableOpenSupport.java (-3 / +3 lines)
Lines 14-22 Link Here
14
package org.openide.windows;
14
package org.openide.windows;
15
15
16
import java.beans.*;
16
import java.beans.*;
17
import org.openide.awt.StatusDisplayer;
17
18
18
import org.openide.util.*;
19
import org.openide.util.*;
19
import org.openide.TopManager;
20
import org.openide.cookies.OpenCookie;
20
import org.openide.cookies.OpenCookie;
21
import org.openide.cookies.ViewCookie;
21
import org.openide.cookies.ViewCookie;
22
import org.openide.cookies.CloseCookie;
22
import org.openide.cookies.CloseCookie;
Lines 159-165 Link Here
159
159
160
                String msg = messageOpening ();
160
                String msg = messageOpening ();
161
                if (msg != null) {
161
                if (msg != null) {
162
                    TopManager.getDefault().setStatusText(msg);
162
                    StatusDisplayer.getDefault().setStatusText(msg);
163
                }
163
                }
164
164
165
                CloneableTopComponent editor = createCloneableTopComponent ();
165
                CloneableTopComponent editor = createCloneableTopComponent ();
Lines 170-176 Link Here
170
                if (msg == null) {
170
                if (msg == null) {
171
                    msg = ""; // NOI18N
171
                    msg = ""; // NOI18N
172
                }
172
                }
173
                TopManager.getDefault ().setStatusText (msg);
173
                StatusDisplayer.getDefault().setStatusText(msg);
174
174
175
                return editor;
175
                return editor;
176
            }
176
            }
(-)openide/src/org/openide/windows/WindowManager.java (-10 / +3 lines)
Lines 51-67 Link Here
51
    public static final WindowManager getDefault () {
51
    public static final WindowManager getDefault () {
52
        synchronized (WindowManager.class) {
52
        synchronized (WindowManager.class) {
53
            if (wmInstance == null) {
53
            if (wmInstance == null) {
54
                Lookup.Item resultItem = Lookup.getDefault().lookupItem(
54
                wmInstance = (WindowManager)Lookup.getDefault().lookup(WindowManager.class);
55
                    new Lookup.Template(WindowManager.class)
55
                if (wmInstance == null) throw new IllegalStateException(
56
                );
56
                    "Fatal error, can't find window manager instance in " + Lookup.getDefault() // NOI18N
57
                if ((resultItem == null) || 
58
                    !(resultItem.getInstance() instanceof WindowManager)) {
59
                    // panic, we can't find window manager
60
                    throw new IllegalStateException(
61
                        "Fatal error, can't find window manager instance in lookup." // NOI18N
62
                    );
57
                    );
63
                }
64
                wmInstance = (WindowManager)resultItem.getInstance();
65
            }
58
            }
66
            return wmInstance;
59
            return wmInstance;
67
        }
60
        }
(-)openide/test/build.xml (-2 / +12 lines)
Lines 302-310 Link Here
302
                <pathelement location="../netbeans/lib/openide.jar"/>
302
                <pathelement location="../netbeans/lib/openide.jar"/>
303
                <fileset dir="../../core/netbeans/lib">
303
                <fileset dir="../../core/netbeans/lib">
304
            		<include name="core.jar"/>
304
            		<include name="core.jar"/>
305
            		<include name="core-windows.jar"/>
306
            		<include name="ext/*.jar"/>
305
            		<include name="ext/*.jar"/>
307
                </fileset>             
306
                </fileset>             
307
                <fileset dir="../../core/windows/netbeans/lib">
308
            		<include name="core-windows.jar"/>
309
                </fileset>             
308
    	</path>
310
    	</path>
309
    </target>
311
    </target>
310
        
312
        
Lines 321-328 Link Here
321
                <pathelement location="../src/"/>
323
                <pathelement location="../src/"/>
322
                <pathelement location="../../core/src/"/>
324
                <pathelement location="../../core/src/"/>
323
                <fileset dir="../../core/netbeans/lib">
325
                <fileset dir="../../core/netbeans/lib">
326
            		<include name="core.jar"/> <!-- for the manifest -->
324
            		<include name="ext/*.jar"/>
327
            		<include name="ext/*.jar"/>
325
                </fileset>             
328
                </fileset>             
329
                <fileset dir="../../core/windows/netbeans/lib">
330
            		<include name="core-windows.jar"/>
331
                </fileset>             
332
326
       	</path>
333
       	</path>
327
    </target>
334
    </target>
328
335
Lines 338-347 Link Here
338
 	      --> 
345
 	      --> 
339
             <fileset dir="${netbeans.home}/lib">
346
             <fileset dir="${netbeans.home}/lib">
340
            		<include name="core.jar"/>
347
            		<include name="core.jar"/>
341
            		<include name="core-windows.jar"/>
342
                        <include name="openide.jar"/>
348
                        <include name="openide.jar"/>
343
            		<include name="ext/*.jar"/>
349
            		<include name="ext/*.jar"/>
344
             </fileset>             
350
             </fileset>             
351
                <fileset dir="../../core/windows/netbeans/lib">
352
            		<include name="core-windows.jar"/>
353
                </fileset>             
354
345
        </path>
355
        </path>
346
    </target>
356
    </target>
347
    
357
    
(-)openide/test/qa-functional/src/DataLoaderTests/DataObjectTest/DataObjectTest.java (-1 / +1 lines)
Lines 96-102 Link Here
96
    void prepare() {
96
    void prepare() {
97
        try{
97
        try{
98
            //initializing ide
98
            //initializing ide
99
            org.openide.TopManager.getDefault();
99
//            org.openide.TopManager.getDefault();
100
            
100
            
101
            //when not in XTest harness -> woring directory will be under actual userdir
101
            //when not in XTest harness -> woring directory will be under actual userdir
102
            if (Manager.getWorkDirPath()==null) System.setProperty("nbjunit.workdir",System.getProperty("netbeans.user"));
102
            if (Manager.getWorkDirPath()==null) System.setProperty("nbjunit.workdir",System.getProperty("netbeans.user"));
(-)openide/test/qa-functional/src/DataLoaderTests/DataObjectTest/DataObjectTestsGenerator.java (-3 / +8 lines)
Lines 19-24 Link Here
19
19
20
package DataLoaderTests.DataObjectTest;
20
package DataLoaderTests.DataObjectTest;
21
21
22
import org.openide.filesystems.Repository;
23
24
22
/**
25
/**
23
 *
26
 *
24
 * @author  jzajicek
27
 * @author  jzajicek
Lines 34-40 Link Here
34
     * @param args the command line arguments
37
     * @param args the command line arguments
35
     */
38
     */
36
    public static void main(String args[]) {
39
    public static void main(String args[]) {
37
        org.openide.filesystems.FileObject fo = org.openide.TopManager.getDefault().getRepository().findResource(PACKAGE + "/" + DATAOBJECTS + "/" + "Backup");
40
        org.openide.filesystems.FileObject fo = Repository.getDefault()
41
                .findResource(PACKAGE + "/" + DATAOBJECTS + "/" + "Backup");
42
        
38
        org.openide.loaders.DataFolder df = null;
43
        org.openide.loaders.DataFolder df = null;
39
        try{
44
        try{
40
            if ( fo.isFolder() ) {
45
            if ( fo.isFolder() ) {
Lines 95-102 Link Here
95
    
100
    
96
    final static String PACKAGE = new DataObjectTestsGenerator().getClass().getPackage().getName().replace('.','/');
101
    final static String PACKAGE = new DataObjectTestsGenerator().getClass().getPackage().getName().replace('.','/');
97
    
102
    
98
    final static String ROOT = org.openide.filesystems.FileUtil.toFile(org.openide.TopManager.getDefault()
103
    final static String ROOT = org.openide.filesystems.FileUtil.toFile(
99
    .getRepository().findResource(PACKAGE)).getAbsolutePath();
104
        Repository.getDefault().findResource(PACKAGE)).getAbsolutePath();
100
    
105
    
101
    final static String DATAOBJECTS = "data";
106
    final static String DATAOBJECTS = "data";
102
    final static String MANIPULATION = "manipulation";
107
    final static String MANIPULATION = "manipulation";
(-)openide/test/qa-functional/src/DataLoaderTests/LoaderPoolTest/LoaderPoolTest.java (-12 / +15 lines)
Lines 106-112 Link Here
106
    void prepare() {
106
    void prepare() {
107
        try{
107
        try{
108
            //initializing ide
108
            //initializing ide
109
            TopManager.getDefault();
109
//            TopManager.getDefault();
110
            
110
            
111
            //when not in XTest harness -> woring directory will be under actual userdir
111
            //when not in XTest harness -> woring directory will be under actual userdir
112
            if (Manager.getWorkDirPath()==null) System.setProperty("nbjunit.workdir",System.getProperty("netbeans.user"));
112
            if (Manager.getWorkDirPath()==null) System.setProperty("nbjunit.workdir",System.getProperty("netbeans.user"));
Lines 129-137 Link Here
129
            
129
            
130
            DLP = (DataLoaderPool) Lookup.getDefault().lookup(DataLoaderPool.class);
130
            DLP = (DataLoaderPool) Lookup.getDefault().lookup(DataLoaderPool.class);
131
            //following doesn't work in nongui mode ;-(
131
            //following doesn't work in nongui mode ;-(
132
            LPN = (LoaderPoolNode) ((Places)Lookup.getDefault().lookup(Places.class)).nodes().loaderPool();
132
            // XXX Places are deprecated at all but the repository node (RepositoryNodeFactory), 
133
            changel = new LoaderPoolTest.ChL(this);
133
            // The rest is not useful.
134
            DLP.addChangeListener( changel );
134
//            LPN = (LoaderPoolNode) ((Places)Lookup.getDefault().lookup(Places.class)).nodes().loaderPool();
135
//            changel = new LoaderPoolTest.ChL(this);
136
//            DLP.addChangeListener( changel );
135
        }catch(Exception e){
137
        }catch(Exception e){
136
            e.printStackTrace();
138
            e.printStackTrace();
137
            e.printStackTrace(getRef());
139
            e.printStackTrace(getRef());
Lines 472-485 Link Here
472
     *Two ways should return the same
474
     *Two ways should return the same
473
     */
475
     */
474
    void compareTest(){
476
    void compareTest(){
475
        writeRef("\nComparing instances of NbLoaderPool ...");
477
        // See above XXX.
476
        //dlp should be NbLoaderPool
478
//        writeRef("\nComparing instances of NbLoaderPool ...");
477
        LoaderPoolNode.NbLoaderPool nblp = (LoaderPoolNode.NbLoaderPool) DLP;
479
//        //dlp should be NbLoaderPool
478
        LoaderPoolNode lpn = (LoaderPoolNode) ((Places)Lookup.getDefault().lookup(Places.class)).nodes().loaderPool();
480
//        LoaderPoolNode.NbLoaderPool nblp = (LoaderPoolNode.NbLoaderPool) DLP;
479
        LoaderPoolNode.NbLoaderPool nblp_temp = lpn.getNbLoaderPool();
481
////        LoaderPoolNode lpn = (LoaderPoolNode) ((Places)Lookup.getDefault().lookup(Places.class)).nodes().loaderPool();
480
        //nblp and nblp_temp should be the same
482
//        LoaderPoolNode.NbLoaderPool nblp_temp = lpn.getNbLoaderPool();
481
        if ( ! nblp.equals(nblp_temp) ) writeRef("Got two different instances of DataLoaderPool!",FAILED);
483
//        //nblp and nblp_temp should be the same
482
        else writeRef(PASSED);
484
//        if ( ! nblp.equals(nblp_temp) ) writeRef("Got two different instances of DataLoaderPool!",FAILED);
485
//        else writeRef(PASSED);
483
    }
486
    }
484
    
487
    
485
    /**
488
    /**
(-)openide/test/qa-functional/src/FileSystemTest/CapabilityTest.java (-1 lines)
Lines 19-25 Link Here
19
import java.util.Enumeration;
19
import java.util.Enumeration;
20
import junit.framework.*;
20
import junit.framework.*;
21
import org.netbeans.junit.*;
21
import org.netbeans.junit.*;
22
import org.openide.TopManager;
23
import org.openide.actions.AbstractCompileAction;
22
import org.openide.actions.AbstractCompileAction;
24
import org.openide.cookies.CompilerCookie;
23
import org.openide.cookies.CompilerCookie;
25
import org.openide.cookies.*;
24
import org.openide.cookies.*;
(-)openide/test/qa-functional/src/FileSystemTest/FSTest.java (-4 / +4 lines)
Lines 11-17 Link Here
11
import java.util.Iterator;
11
import java.util.Iterator;
12
import java.util.Set;
12
import java.util.Set;
13
13
14
import org.openide.TopManager;
15
import org.openide.nodes.Children;
14
import org.openide.nodes.Children;
16
import org.openide.nodes.Node;
15
import org.openide.nodes.Node;
17
import org.openide.windows.Mode;
16
import org.openide.windows.Mode;
Lines 21-30 Link Here
21
import org.openide.filesystems.*;
20
import org.openide.filesystems.*;
22
import org.openide.loaders.DataObject;
21
import org.openide.loaders.DataObject;
23
import org.openide.loaders.DataObjectNotFoundException;
22
import org.openide.loaders.DataObjectNotFoundException;
23
import org.openide.loaders.DataFilter;
24
import org.openide.loaders.RepositoryNodeFactory;
24
25
25
import junit.framework.*;
26
import junit.framework.*;
26
import org.netbeans.junit.*;
27
import org.netbeans.junit.*;
27
import org.openide.Places;
28
import org.openide.util.Lookup;
28
import org.openide.util.Lookup;
29
29
30
/**
30
/**
Lines 79-85 Link Here
79
         FileSystem fs = null;
79
         FileSystem fs = null;
80
         try {
80
         try {
81
           try {  
81
           try {  
82
             TopManager tm = TopManager.getDefault();
82
//             TopManager tm = TopManager.getDefault();
83
83
84
            // get node of dataObject 
84
            // get node of dataObject 
85
85
Lines 95-101 Link Here
95
           } catch (FileStateInvalidException fsie ) {
95
           } catch (FileStateInvalidException fsie ) {
96
               failTest (fsie);
96
               failTest (fsie);
97
           }
97
           }
98
             Node repNode = ((Places)Lookup.getDefault ().lookup (Places.class)).nodes().repository();
98
           Node repNode = RepositoryNodeFactory.getDefault().repository(DataFilter.ALL);
99
             fs.setHidden(false);
99
             fs.setHidden(false);
100
//                     System.out.println("status:" + ((fs.isHidden()) ? "hidden" : "shown"));
100
//                     System.out.println("status:" + ((fs.isHidden()) ? "hidden" : "shown"));
101
             if (findNode(repNode,node,2) == false ) {
101
             if (findNode(repNode,node,2) == false ) {
(-)openide/test/regr/src/org/openide/text/ReloadDeadlockTest.java (-1 lines)
Lines 29-35 Link Here
29
import org.openide.filesystems.FileObject;
29
import org.openide.filesystems.FileObject;
30
import org.openide.filesystems.LocalFileSystem;
30
import org.openide.filesystems.LocalFileSystem;
31
import org.openide.text.CloneableEditorSupport;
31
import org.openide.text.CloneableEditorSupport;
32
import org.openide.TopManager;
33
32
34
33
35
/**
34
/**
(-)openide/test/regr/src/org/openide/text/SaveDocumentTest.java (-2 / +2 lines)
Lines 28-36 Link Here
28
28
29
import org.openide.cookies.EditorCookie;
29
import org.openide.cookies.EditorCookie;
30
import org.openide.filesystems.FileObject;
30
import org.openide.filesystems.FileObject;
31
import org.openide.filesystems.Repository;
31
import org.openide.loaders.DataObject;
32
import org.openide.loaders.DataObject;
32
import org.openide.text.CloneableEditorSupport;
33
import org.openide.text.CloneableEditorSupport;
33
import org.openide.TopManager;
34
34
35
35
36
/**
36
/**
Lines 62-68 Link Here
62
    public void testSaveDocument() throws Exception {
62
    public void testSaveDocument() throws Exception {
63
        System.err.println("Test Save Document");
63
        System.err.println("Test Save Document");
64
        
64
        
65
        FileObject fo = TopManager.getDefault().getRepository().getDefaultFileSystem()
65
        FileObject fo = Repository.getDefault().getDefaultFileSystem()
66
            .getRoot().createData("test", "txt");
66
            .getRoot().createData("test", "txt");
67
67
68
        DataObject data = DataObject.find(fo);
68
        DataObject data = DataObject.find(fo);
(-)openide/test/unit/src/org/openide/TopManagerTest.java (-29 / +34 lines)
Lines 7-30 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
14
package org.openide;
14
package org.openide;
15
15
16
import java.awt.datatransfer.Clipboard;
16
import java.lang.reflect.Method;
17
import java.lang.reflect.Method;
17
18
import javax.swing.text.Keymap;
18
19
19
import junit.framework.*;
20
import junit.framework.*;
21
20
import org.netbeans.junit.*;
22
import org.netbeans.junit.*;
21
23
22
/** Test for TopManager returning valid values.
24
import org.openide.actions.ActionManager;
25
import org.openide.filesystems.Repository;
26
import org.openide.loaders.DataLoaderPool;
27
import org.openide.nodes.NodeOperation;
28
import org.openide.ServiceType;
29
import org.openide.util.Lookup;
30
import org.openide.util.datatransfer.ExClipboard;
31
import org.openide.windows.IOProvider;
32
import org.openide.windows.WindowManager;
33
34
35
/** Test for basic stuff (orig. TopManager) being in lookup.
23
 *
36
 *
24
 * @author Jaroslav Tulach
37
 * @author Jaroslav Tulach, Jesse Glick
25
 */
38
 */
26
public class TopManagerTest extends NbTestCase {
39
public class TopManagerTest extends NbTestCase {
27
    private TopManager tm;
40
41
    /*
42
    static {
43
        System.setProperty("org.openide.util.MetaInfServicesLookup.DEBUG", "true");
44
    }
45
    */
28
    
46
    
29
    public TopManagerTest(java.lang.String testName) {
47
    public TopManagerTest(java.lang.String testName) {
30
        super(testName);
48
        super(testName);
Lines 40-93 Link Here
40
        return suite;
58
        return suite;
41
    }
59
    }
42
    
60
    
43
    protected void setUp () {
44
        tm = TopManager.getDefault();
45
    }
46
    
47
    public void testLoaderPoolNotNull () {
61
    public void testLoaderPoolNotNull () {
48
        assertNotNull (tm.getLoaderPool ());
62
        assertNotNull(Lookup.getDefault().lookup(DataLoaderPool.class));
49
    }
63
    }
50
64
51
    public void testRepositoryNotNull () {
65
    public void testRepositoryNotNull () {
52
        // still old
66
        assertNotNull(Repository.getDefault());
53
        assertNotNull (tm.getRepository());
54
    }
67
    }
55
    /* Faling due to classnot found
56
    public void testStdOut () {
68
    public void testStdOut () {
57
        assertNotNull (tm.getStdOut()); 
69
        assertNotNull (IOProvider.getDefault()); 
58
    }
70
    }
59
     */
60
    
71
    
61
    public void testGetClipboardNotNull () {
72
    public void testGetClipboardNotNull () {
62
        assertNotNull (tm.getClipboard ());
73
        Clipboard c = (Clipboard)Lookup.getDefault().lookup(Clipboard.class);
63
    }
74
        assertNotNull(c);
64
    
75
        assertEquals(c, Lookup.getDefault().lookup(ExClipboard.class));
65
    public void testGetControlPanel () {
66
        assertNotNull (tm.getControlPanel ());
67
    }
76
    }
68
    
77
    
69
    public void testGetServices () {
78
    public void testGetServices () {
70
        assertNotNull (tm.getServices ());
79
        assertNotNull(Lookup.getDefault().lookup(ServiceType.Registry.class));
71
    }
80
    }
72
    
81
    
73
    public void testGetActionManager () {
82
    public void testGetActionManager () {
74
        assertNotNull (tm.getActionManager ());
83
        assertNotNull(Lookup.getDefault().lookup(ActionManager.class));
75
    }
84
    }
76
    
85
    
77
    public void testGlobalKeymap () {
86
    public void testGlobalKeymap () {
78
        assertNotNull (tm.getGlobalKeymap ());
87
        assertNotNull(Lookup.getDefault().lookup(Keymap.class));
79
    }
88
    }
80
    
89
    
81
    public void testNodeOperation () {
90
    public void testNodeOperation () {
82
        assertNotNull (tm.getNodeOperation ());
91
        assertNotNull(NodeOperation.getDefault());
83
    }
84
    
85
    public void testPlaces () {
86
        assertNotNull (tm.getPlaces ());
87
    }
92
    }
88
    
93
    
89
    public void testWindowManager () {
94
    public void testWindowManager () {
90
        assertNotNull (tm.getWindowManager ());
95
        assertNotNull(WindowManager.getDefault());
91
    }
96
    }
92
  
97
  
93
}
98
}
(-)openide/test/unit/src/org/openide/explorer/propertysheet/PropertySheetTest.java (-2 / +5 lines)
Lines 29-34 Link Here
29
import junit.framework.*;
29
import junit.framework.*;
30
import junit.textui.TestRunner;
30
import junit.textui.TestRunner;
31
import org.netbeans.junit.*;
31
import org.netbeans.junit.*;
32
import org.openide.nodes.NodeOperation;
33
import org.openide.util.Lookup;
32
34
33
// This test class tests the main functionality of the property sheet
35
// This test class tests the main functionality of the property sheet
34
public class PropertySheetTest extends NbTestCase {
36
public class PropertySheetTest extends NbTestCase {
Lines 49-58 Link Here
49
        // Create new TNode
51
        // Create new TNode
50
        tn = new TNode();
52
        tn = new TNode();
51
53
54
        NodeOperation no = (NodeOperation)Lookup.getDefault().lookup(NodeOperation.class);
52
        // Display Node
55
        // Display Node
53
        TopManager.getDefault().getNodeOperation().explore(tn);
56
        no.explore(tn);
54
        // Display Properties of a Node
57
        // Display Properties of a Node
55
        TopManager.getDefault().getNodeOperation().showProperties(tn);
58
        no.showProperties(tn);
56
        
59
        
57
        try {
60
        try {
58
            // Wait for the initialization
61
            // Wait for the initialization
(-)openide/test/unit/src/org/openide/explorer/view/ListViewTest.java (-4 / +4 lines)
Lines 53-59 Link Here
53
     * 3. Shift-Click another node by java.awt.Robot
53
     * 3. Shift-Click another node by java.awt.Robot
54
     */
54
     */
55
    public void testNodeSelectionByRobot() throws Exception {
55
    public void testNodeSelectionByRobot() throws Exception {
56
        TopManager.getDefault();
56
//        TopManager.getDefault();
57
        final Children c = new Children.Array();
57
        final Children c = new Children.Array();
58
        Node n = new AbstractNode (c);
58
        Node n = new AbstractNode (c);
59
        final PListView lv = new PListView();
59
        final PListView lv = new PListView();
Lines 99-105 Link Here
99
     * Removes selected node by calling destroy
99
     * Removes selected node by calling destroy
100
     */
100
     */
101
    public void testDestroySelectedNodes() throws Exception {
101
    public void testDestroySelectedNodes() throws Exception {
102
        TopManager.getDefault();
102
//        TopManager.getDefault();
103
        final Children c = new Children.Array();
103
        final Children c = new Children.Array();
104
        Node n = new AbstractNode (c);
104
        Node n = new AbstractNode (c);
105
        final PListView lv = new PListView();
105
        final PListView lv = new PListView();
Lines 129-135 Link Here
129
     * Removes selected node by calling Children.Array.remove
129
     * Removes selected node by calling Children.Array.remove
130
     */
130
     */
131
    public void testRemoveAndAddNodes() throws Exception {
131
    public void testRemoveAndAddNodes() throws Exception {
132
        TopManager.getDefault();
132
//        TopManager.getDefault();
133
        final Children c = new Children.Array();
133
        final Children c = new Children.Array();
134
        Node n = new AbstractNode (c);
134
        Node n = new AbstractNode (c);
135
        final PListView lv = new PListView();
135
        final PListView lv = new PListView();
Lines 165-171 Link Here
165
     * and replace with the other one (several times).
165
     * and replace with the other one (several times).
166
     */
166
     */
167
    public void testNodeAddingAndRemoving() throws Exception {
167
    public void testNodeAddingAndRemoving() throws Exception {
168
        TopManager.getDefault();
168
//        TopManager.getDefault();
169
        final Children c = new Children.Array();
169
        final Children c = new Children.Array();
170
        Node n = new AbstractNode (c);
170
        Node n = new AbstractNode (c);
171
        final PListView lv = new PListView();
171
        final PListView lv = new PListView();
(-)openide/test/unit/src/org/openide/explorer/view/SelectionModeTest.java (-1 / +1 lines)
Lines 69-75 Link Here
69
        if (prepared)
69
        if (prepared)
70
            return ;
70
            return ;
71
        
71
        
72
        TopManager.getDefault ();
72
//        TopManager.getDefault ();
73
        
73
        
74
        // create tree:
74
        // create tree:
75
        // root +--- parent_one +--- one1
75
        // root +--- parent_one +--- one1
(-)openide/test/unit/src/org/openide/filesystems/MfoOnSFSTestHid.java (-3 / +2 lines)
Lines 18-24 Link Here
18
import org.openide.util.Queue;
18
import org.openide.util.Queue;
19
import org.openide.util.NbBundle;
19
import org.openide.util.NbBundle;
20
import org.openide.util.enum.QueueEnumeration;
20
import org.openide.util.enum.QueueEnumeration;
21
//import org.openide.filesystems.hidden.*;
21
import org.openide.filesystems.Repository;
22
22
23
import junit.framework.*;
23
import junit.framework.*;
24
24
Lines 71-78 Link Here
71
71
72
    
72
    
73
    protected void setUp() throws java.lang.Exception {
73
    protected void setUp() throws java.lang.Exception {
74
        TopManager tm = TopManager.getDefault();
74
        this.testedFS = sfs = Repository.getDefault().getDefaultFileSystem();;
75
        this.testedFS = sfs = tm.getRepository().getDefaultFileSystem();;
76
    }
75
    }
77
    
76
    
78
}
77
}
(-)openide/test/unit/src/org/openide/loaders/AddLoaderManuallyHid.java (-3 / +7 lines)
Lines 13-25 Link Here
13
13
14
package org.openide.loaders;
14
package org.openide.loaders;
15
15
16
import org.openide.TopManager;
16
17
import org.openide.filesystems.FileObject;
17
import org.openide.filesystems.FileObject;
18
import java.lang.reflect.*;
18
import java.lang.reflect.*;
19
import java.util.*;
19
import java.util.*;
20
import javax.swing.event.ChangeEvent;
20
import javax.swing.event.ChangeEvent;
21
import java.beans.PropertyChangeListener;
21
import java.beans.PropertyChangeListener;
22
22
23
import org.openide.util.Lookup;
24
23
/** Utility to add a loader to the loader pool.
25
/** Utility to add a loader to the loader pool.
24
 * Should only be used in external execution mode!
26
 * Should only be used in external execution mode!
25
 * Requires core.jar in classpath.
27
 * Requires core.jar in classpath.
Lines 32-38 Link Here
32
    /** Add a loader to the pool (to the front of the free area). */
34
    /** Add a loader to the pool (to the front of the free area). */
33
    public static void addRemoveLoader(DataLoader l, boolean add) throws Exception {
35
    public static void addRemoveLoader(DataLoader l, boolean add) throws Exception {
34
        // Initialize IDE:
36
        // Initialize IDE:
35
        TopManager.getDefault();
37
//        TopManager.getDefault();
38
        
36
        // Now add the loader. Would be easy enough if we could directly access
39
        // Now add the loader. Would be easy enough if we could directly access
37
        // core classes, but then this test would have to be compiled with core.jar
40
        // core classes, but then this test would have to be compiled with core.jar
38
        // in the classpath...
41
        // in the classpath...
Lines 47-53 Link Here
47
            if (! loaders.contains(l)) throw new IllegalArgumentException();
50
            if (! loaders.contains(l)) throw new IllegalArgumentException();
48
            loaders.remove(l);
51
            loaders.remove(l);
49
        }
52
        }
50
        DataLoaderPool pool = TopManager.getDefault().getLoaderPool();
53
        
54
        DataLoaderPool pool = (DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class);
51
        if (add) {
55
        if (add) {
52
            l.addPropertyChangeListener((PropertyChangeListener)pool);
56
            l.addPropertyChangeListener((PropertyChangeListener)pool);
53
        } else {
57
        } else {
(-)openide/test/unit/src/org/openide/loaders/BasicDataObjectTest.java (-1 lines)
Lines 14-20 Link Here
14
package org.openide.loaders;
14
package org.openide.loaders;
15
15
16
import org.openide.filesystems.*;
16
import org.openide.filesystems.*;
17
import org.openide.TopManager;
18
import org.openide.loaders.*;
17
import org.openide.loaders.*;
19
import java.beans.*;
18
import java.beans.*;
20
import junit.textui.TestRunner;
19
import junit.textui.TestRunner;
(-)openide/test/unit/src/org/openide/loaders/DataFolderMoveTest.java (-1 lines)
Lines 15-21 Link Here
15
15
16
import org.openide.filesystems.*;
16
import org.openide.filesystems.*;
17
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
17
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
18
import org.openide.TopManager;
19
import org.openide.nodes.Node;
18
import org.openide.nodes.Node;
20
19
21
import java.beans.*;
20
import java.beans.*;
(-)openide/test/unit/src/org/openide/loaders/DataFolderTest.java (-4 / +3 lines)
Lines 14-20 Link Here
14
package org.openide.loaders;
14
package org.openide.loaders;
15
15
16
import org.openide.filesystems.*;
16
import org.openide.filesystems.*;
17
import org.openide.TopManager;
18
17
19
import java.beans.*;
18
import java.beans.*;
20
import java.io.IOException;
19
import java.io.IOException;
Lines 490-496 Link Here
490
        // Adding it to the repository is necessary for the test to work.
489
        // Adding it to the repository is necessary for the test to work.
491
        // Otherwise PROP_CHILDREN is never fired, and getChildren sticks
490
        // Otherwise PROP_CHILDREN is never fired, and getChildren sticks
492
        // to whatever it last had. #15572
491
        // to whatever it last had. #15572
493
        TopManager.getDefault().getRepository().addFileSystem(lfs);
492
        Repository.getDefault().addFileSystem(lfs);
494
        try {
493
        try {
495
            FileObject folder = lfs.findResource("folder");
494
            FileObject folder = lfs.findResource("folder");
496
            DataLoader l = DataLoader.getLoader(DataLoaderTest.SimpleUniFileLoader.class);
495
            DataLoader l = DataLoader.getLoader(DataLoaderTest.SimpleUniFileLoader.class);
Lines 508-514 Link Here
508
                //System.err.println("added it");
507
                //System.err.println("added it");
509
                Thread.sleep(5000); // give it time to refresh
508
                Thread.sleep(5000); // give it time to refresh
510
                //System.err.println("5 secs later");
509
                //System.err.println("5 secs later");
511
                //System.err.println("loader pool: " + java.util.Arrays.asList(TopManager.getDefault().getLoaderPool().toArray()));
510
                //System.err.println("loader pool: " + java.util.Arrays.asList(Lookup.getDefault().lookup(DataLoaderPool.class)).toArray()));
512
                //System.err.println("our old object: " + old0);
511
                //System.err.println("our old object: " + old0);
513
                //System.err.println("loader recog says: " + DataObject.find(lfs.findResource(names[0])));
512
                //System.err.println("loader recog says: " + DataObject.find(lfs.findResource(names[0])));
514
                //System.err.println("but on next one loader recog says: " + DataObject.find(lfs.findResource(names[1])));
513
                //System.err.println("but on next one loader recog says: " + DataObject.find(lfs.findResource(names[1])));
Lines 527-533 Link Here
527
            assertEquals("org.openide.loaders.DefaultDataObject", DataObject.find(lfs.findResource(names[0])).getClass().getName());
526
            assertEquals("org.openide.loaders.DefaultDataObject", DataObject.find(lfs.findResource(names[0])).getClass().getName());
528
            assertTrue("Removing a loader also triggers PROP_CHILDREN", ol.gotSomething());
527
            assertTrue("Removing a loader also triggers PROP_CHILDREN", ol.gotSomething());
529
        } finally {
528
        } finally {
530
            TopManager.getDefault().getRepository().removeFileSystem(lfs);
529
            Repository.getDefault().removeFileSystem(lfs);
531
        }
530
        }
532
        TestUtilHid.destroyLocalFileSystem(name());
531
        TestUtilHid.destroyLocalFileSystem(name());
533
    }
532
    }
(-)openide/test/unit/src/org/openide/loaders/DataLoaderPoolTest.java (-2 / +2 lines)
Lines 17-25 Link Here
17
17
18
import org.openide.filesystems.*;
18
import org.openide.filesystems.*;
19
import java.io.IOException;
19
import java.io.IOException;
20
import org.openide.TopManager;
21
import java.util.*;
20
import java.util.*;
22
import org.netbeans.junit.*;
21
import org.netbeans.junit.*;
22
import org.openide.util.Lookup;
23
23
24
/** Test basic functionality of data loader pool.
24
/** Test basic functionality of data loader pool.
25
 * @author Vita Stejskal
25
 * @author Vita Stejskal
Lines 51-57 Link Here
51
        AddLoaderManuallyHid.addRemoveLoader(loaderA, true);
51
        AddLoaderManuallyHid.addRemoveLoader(loaderA, true);
52
        AddLoaderManuallyHid.addRemoveLoader(loaderB, true);
52
        AddLoaderManuallyHid.addRemoveLoader(loaderB, true);
53
        try {
53
        try {
54
            pool = TopManager.getDefault().getLoaderPool();
54
            pool = (DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class);
55
            assertTrue(Arrays.asList(pool.toArray()).contains(loaderA));
55
            assertTrue(Arrays.asList(pool.toArray()).contains(loaderA));
56
            assertTrue(Arrays.asList(pool.toArray()).contains(loaderB));
56
            assertTrue(Arrays.asList(pool.toArray()).contains(loaderB));
57
            
57
            
(-)openide/test/unit/src/org/openide/loaders/DataLoaderTest.java (-3 / +3 lines)
Lines 16-23 Link Here
16
import junit.textui.TestRunner;
16
import junit.textui.TestRunner;
17
17
18
import org.openide.filesystems.*;
18
import org.openide.filesystems.*;
19
import org.openide.util.Lookup;
19
import java.io.IOException;
20
import java.io.IOException;
20
import org.openide.TopManager;
21
import java.util.*;
21
import java.util.*;
22
import org.netbeans.junit.*;
22
import org.netbeans.junit.*;
23
import java.beans.PropertyChangeListener;
23
import java.beans.PropertyChangeListener;
Lines 47-53 Link Here
47
        DataLoaderPool pool;
47
        DataLoaderPool pool;
48
        AddLoaderManuallyHid.addRemoveLoader(l, true);
48
        AddLoaderManuallyHid.addRemoveLoader(l, true);
49
        try {
49
        try {
50
            pool = TopManager.getDefault().getLoaderPool();
50
            pool = (DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class);
51
            assertTrue(Arrays.asList(pool.toArray()).contains(l));
51
            assertTrue(Arrays.asList(pool.toArray()).contains(l));
52
            FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), new String[] {
52
            FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), new String[] {
53
                "folder/file.simple",
53
                "folder/file.simple",
Lines 70-76 Link Here
70
        DataLoaderPool pool;
70
        DataLoaderPool pool;
71
        AddLoaderManuallyHid.addRemoveLoader(l, true);
71
        AddLoaderManuallyHid.addRemoveLoader(l, true);
72
        try {
72
        try {
73
            pool = TopManager.getDefault().getLoaderPool();
73
            pool = (DataLoaderPool)Lookup.getDefault().lookup(DataLoaderPool.class);
74
            assertTrue(Arrays.asList(pool.toArray()).contains(l));
74
            assertTrue(Arrays.asList(pool.toArray()).contains(l));
75
            FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), new String[] {
75
            FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), new String[] {
76
                "folder/file.simple",
76
                "folder/file.simple",
(-)openide/test/unit/src/org/openide/loaders/DataNodeTest.java (-3 / +3 lines)
Lines 15-24 Link Here
15
15
16
import junit.textui.TestRunner;
16
import junit.textui.TestRunner;
17
import org.openide.filesystems.FileSystem;
17
import org.openide.filesystems.FileSystem;
18
import org.openide.TopManager;
19
import java.util.Enumeration;
18
import java.util.Enumeration;
20
import org.openide.nodes.Node;
19
import org.openide.nodes.Node;
21
import org.openide.cookies.InstanceCookie;
20
import org.openide.cookies.InstanceCookie;
21
import org.openide.filesystems.Repository;
22
import org.netbeans.junit.*;
22
import org.netbeans.junit.*;
23
23
24
/** Test things about node delegates.
24
/** Test things about node delegates.
Lines 53-61 Link Here
53
    public void testDataNodeHasObjectAsCookie() throws Exception {
53
    public void testDataNodeHasObjectAsCookie() throws Exception {
54
        // First make sure some core is installed. This could be run inside or
54
        // First make sure some core is installed. This could be run inside or
55
        // outside a running IDE.
55
        // outside a running IDE.
56
        TopManager tm = TopManager.getDefault();
56
//        TopManager tm = TopManager.getDefault();
57
        // Now scan SFS for all DO's and check the assertion.
57
        // Now scan SFS for all DO's and check the assertion.
58
        FileSystem sfs = tm.getRepository().getDefaultFileSystem();
58
        FileSystem sfs = Repository.getDefault().getDefaultFileSystem();
59
        DataFolder top = DataFolder.findFolder(sfs.getRoot());
59
        DataFolder top = DataFolder.findFolder(sfs.getRoot());
60
        Enumeration e = top.children(true);
60
        Enumeration e = top.children(true);
61
        while (e.hasMoreElements()) {
61
        while (e.hasMoreElements()) {
(-)openide/test/unit/src/org/openide/loaders/FolderChildrenTest.java (-1 lines)
Lines 22-28 Link Here
22
import org.openide.cookies.*;
22
import org.openide.cookies.*;
23
import org.openide.util.*;
23
import org.openide.util.*;
24
24
25
import org.openide.TopManager;
26
import org.netbeans.junit.*;
25
import org.netbeans.junit.*;
27
import java.util.Enumeration;
26
import java.util.Enumeration;
28
import org.openide.nodes.Node;
27
import org.openide.nodes.Node;
(-)openide/test/unit/src/org/openide/loaders/FolderInstanceTest.java (-3 / +2 lines)
Lines 22-28 Link Here
22
import org.openide.cookies.*;
22
import org.openide.cookies.*;
23
import org.openide.util.*;
23
import org.openide.util.*;
24
24
25
import org.openide.TopManager;
26
import org.netbeans.junit.*;
25
import org.netbeans.junit.*;
27
import java.util.Enumeration;
26
import java.util.Enumeration;
28
27
Lines 356-362 Link Here
356
        }
355
        }
357
        TestUtilHid.destroyLocalFileSystem(name());
356
        TestUtilHid.destroyLocalFileSystem(name());
358
        FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), names);
357
        FileSystem lfs = TestUtilHid.createLocalFileSystem(name(), names);
359
        TopManager.getDefault().getRepository().addFileSystem(lfs);
358
        Repository.getDefault().addFileSystem(lfs);
360
        try {
359
        try {
361
            FileObject folder = lfs.findResource("folder");
360
            FileObject folder = lfs.findResource("folder");
362
            DataLoader l = DataLoader.getLoader(DataLoaderTest.SimpleUniFileLoader.class);
361
            DataLoader l = DataLoader.getLoader(DataLoaderTest.SimpleUniFileLoader.class);
Lines 413-419 Link Here
413
            Thread.sleep(1000);
412
            Thread.sleep(1000);
414
            assert(icfi.ok);
413
            assert(icfi.ok);
415
        } finally {
414
        } finally {
416
            TopManager.getDefault().getRepository().removeFileSystem(lfs);
415
            Repository.getDefault().removeFileSystem(lfs);
417
        }
416
        }
418
        TestUtilHid.destroyLocalFileSystem(name());
417
        TestUtilHid.destroyLocalFileSystem(name());
419
    }
418
    }
(-)openide/test/unit/src/org/openide/loaders/InstanceDataObjectTest.java (-1 lines)
Lines 16-22 Link Here
16
import org.openide.filesystems.*;
16
import org.openide.filesystems.*;
17
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
17
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
18
import org.openide.loaders.*;
18
import org.openide.loaders.*;
19
import org.openide.TopManager;
20
import org.openide.cookies.*;
19
import org.openide.cookies.*;
21
import org.openide.util.*;
20
import org.openide.util.*;
22
21
(-)openide/test/unit/src/org/openide/loaders/MultiDataObjectFilesTest.java (-1 lines)
Lines 17-23 Link Here
17
17
18
import org.openide.filesystems.*;
18
import org.openide.filesystems.*;
19
import java.io.IOException;
19
import java.io.IOException;
20
import org.openide.TopManager;
21
import java.util.*;
20
import java.util.*;
22
import org.netbeans.junit.*;
21
import org.netbeans.junit.*;
23
22
(-)openidex/build.xml (-3 / +2 lines)
Lines 29-37 Link Here
29
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
29
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
30
      <classpath>
30
      <classpath>
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
31
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
32
        <fileset dir="../openide/netbeans/lib">
32
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
33
          <include name="openide*.jar" />
33
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
34
        </fileset>
35
        <fileset dir="../core/external">
34
        <fileset dir="../core/external">
36
          <include name="xml-apis*.jar" />
35
          <include name="xml-apis*.jar" />
37
        </fileset>
36
        </fileset>
(-)openidex/manifest.mf (-2 / +4 lines)
Lines 1-7 Link Here
1
OpenIDE-Module: org.openidex.util/2
1
OpenIDE-Module: org.openidex.util/2
2
OpenIDE-Module-Localizing-Bundle: org/openidex/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/openidex/Bundle.properties
3
OpenIDE-Module-Specification-Version: 2.4
3
OpenIDE-Module-Specification-Version: 2.5
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/openidex/resources/mf-layer.xml
5
OpenIDE-Module-Layer: org/openidex/resources/mf-layer.xml
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
8
OpenIDE-Module-Requires: org.openide.TopManager
7
9
(-)projects/build.xml (-3 / +2 lines)
Lines 28-36 Link Here
28
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
29
      <classpath>
29
      <classpath>
30
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
31
        <fileset dir="../openide/netbeans/lib">
31
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
32
          <include name="openide*.jar" />
32
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
33
        </fileset>
34
        <pathelement location="../core/netbeans/lib/core.jar"/>
33
        <pathelement location="../core/netbeans/lib/core.jar"/>
35
        <fileset dir="../core/external">
34
        <fileset dir="../core/external">
36
          <include name="xml-apis*.jar" />
35
          <include name="xml-apis*.jar" />
(-)projects/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.projects/1
1
OpenIDE-Module: org.netbeans.modules.projects/1
2
OpenIDE-Module-Install: org/netbeans/modules/projects/ProjectsModule.class
2
OpenIDE-Module-Install: org/netbeans/modules/projects/ProjectsModule.class
3
OpenIDE-Module-Layer: org/netbeans/modules/projects/resources/projects-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/projects/resources/projects-layer.xml
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
4
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
5
OpenIDE-Module-Specification-Version: 1.9
5
OpenIDE-Module-Requires: org.openide.TopManager
6
OpenIDE-Module-Specification-Version: 1.10
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1
8
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1, org.openide.deprecated > 1.0
8
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projects/Bundle.properties
9
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projects/Bundle.properties
9
10
10
Name: org/netbeans/modules/projects/ProjectDataLoader.class
11
Name: org/netbeans/modules/projects/ProjectDataLoader.class
(-)projects/src/org/netbeans/modules/projects/Add2ProjectAction.java (-1 / +1 lines)
Lines 40-46 Link Here
40
    }
40
    }
41
41
42
    public void performAction () {
42
    public void performAction () {
43
        Node n = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
43
        Node n = CurrentProjectNode.get();
44
        ProjectDataObject pdo = (ProjectDataObject) n.getCookie(ProjectDataObject.class);
44
        ProjectDataObject pdo = (ProjectDataObject) n.getCookie(ProjectDataObject.class);
45
        if (pdo != null) {
45
        if (pdo != null) {
46
            DataObject dobjs[] = selectDataObjects ();
46
            DataObject dobjs[] = selectDataObjects ();
(-)projects/src/org/netbeans/modules/projects/AddNewAction.java (-1 / +1 lines)
Lines 82-88 Link Here
82
                Iterator it = set.iterator();
82
                Iterator it = set.iterator();
83
                while (it.hasNext()) {
83
                while (it.hasNext()) {
84
                    DataObject dobj = (DataObject) it.next();
84
                    DataObject dobj = (DataObject) it.next();
85
                    ProjectDataObject pdo = (ProjectDataObject) TopManager.getDefault().getPlaces().nodes().projectDesktop().getCookie(ProjectDataObject.class);
85
                    ProjectDataObject pdo = (ProjectDataObject) CurrentProjectNode.get().getCookie(ProjectDataObject.class);
86
                    if (pdo != null) {
86
                    if (pdo != null) {
87
                        if (!pdo.isAccessibleFromFolder(dobj)) {
87
                        if (!pdo.isAccessibleFromFolder(dobj)) {
88
                            pdo.add(dobj);
88
                            pdo.add(dobj);
(-)projects/src/org/netbeans/modules/projects/AddToProjectAction.java (-2 / +2 lines)
Lines 32-38 Link Here
32
    /** Enabled only if the current project is ProjectDataObject.
32
    /** Enabled only if the current project is ProjectDataObject.
33
    */
33
    */
34
    public boolean enable (Node[] arr) {
34
    public boolean enable (Node[] arr) {
35
        org.openide.nodes.Node n = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
35
        org.openide.nodes.Node n = CurrentProjectNode.get();
36
        if (n.getCookie (ProjectDataObject.class) == null) {
36
        if (n.getCookie (ProjectDataObject.class) == null) {
37
            return false;
37
            return false;
38
        };
38
        };
Lines 92-98 Link Here
92
    * @param activatedNodes gives array of actually activated nodes.
92
    * @param activatedNodes gives array of actually activated nodes.
93
    */
93
    */
94
    protected void performAction (Node[] activatedNodes) {
94
    protected void performAction (Node[] activatedNodes) {
95
        org.openide.nodes.Node n = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
95
        org.openide.nodes.Node n = CurrentProjectNode.get();
96
        ProjectDataObject project = (ProjectDataObject)n.getCookie (ProjectDataObject.class);
96
        ProjectDataObject project = (ProjectDataObject)n.getCookie (ProjectDataObject.class);
97
97
98
        for (int i = 0; i < activatedNodes.length; i++) {
98
        for (int i = 0; i < activatedNodes.length; i++) {
(-)projects/src/org/netbeans/modules/projects/PSupport.java (+2 lines)
Lines 210-215 Link Here
210
        if (save != SAVE_MODULES) {
210
        if (save != SAVE_MODULES) {
211
            openOldProject (save);
211
            openOldProject (save);
212
        }
212
        }
213
        
214
        CurrentProjectNode.set(projectDesktop());
213
215
214
        tm.setStatusText (NbBundle.getMessage (PSupport.class, "MSG_OpenProjectDone", getProjectDO ().getName ())); // NOI18N
216
        tm.setStatusText (NbBundle.getMessage (PSupport.class, "MSG_OpenProjectDone", getProjectDO ().getName ())); // NOI18N
215
    }
217
    }
(-)projects/src/org/netbeans/modules/projects/ProjectDataLoader.java (-1 / +1 lines)
Lines 115-121 Link Here
115
        }
115
        }
116
116
117
        public void run() {
117
        public void run() {
118
            Node p = org.openide.TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
118
            Node p = CurrentProjectNode.get();
119
            ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
119
            ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
120
            if (pdo != null) {
120
            if (pdo != null) {
121
                try {
121
                try {
(-)projects/src/org/netbeans/modules/projects/ProjectDataNode.java (-1 / +1 lines)
Lines 177-183 Link Here
177
        static final long serialVersionUID = -8515898905571314270L;
177
        static final long serialVersionUID = -8515898905571314270L;
178
178
179
        public Node getNode() throws java.io.IOException {
179
        public Node getNode() throws java.io.IOException {
180
            return TopManager.getDefault().getPlaces().nodes().projectDesktop();
180
            return CurrentProjectNode.get();
181
        }
181
        }
182
    }
182
    }
183
183
(-)projects/src/org/netbeans/modules/projects/ProjectDataObject.java (-1 / +1 lines)
Lines 201-207 Link Here
201
     * @return true if node of this DO is the same as system project node.
201
     * @return true if node of this DO is the same as system project node.
202
     */
202
     */
203
    public boolean isCurrentProject() {
203
    public boolean isCurrentProject() {
204
        Node node = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
204
        Node node = CurrentProjectNode.get();
205
        return (node != null) && (node.getCookie(ProjectDataObject.class) == this);
205
        return (node != null) && (node.getCookie(ProjectDataObject.class) == this);
206
    }
206
    }
207
207
(-)projects/src/org/netbeans/modules/projects/ProjectRootFilterNode.java (-2 / +2 lines)
Lines 44-50 Link Here
44
        /** Return a node for the current project.
44
        /** Return a node for the current project.
45
        */
45
        */
46
        public Node getNode () {
46
        public Node getNode () {
47
            return TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
47
            return CurrentProjectNode.get();
48
        }
48
        }
49
    }
49
    }
50
50
Lines 105-111 Link Here
105
                return false;
105
                return false;
106
            }
106
            }
107
            
107
            
108
            Node prjNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
108
            Node prjNode = CurrentProjectNode.get();
109
            ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
109
            ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
110
110
111
            if (pdo == null || link == null) {
111
            if (pdo == null || link == null) {
(-)projects/src/org/netbeans/modules/projects/SetMainClassAction.java (-2 / +2 lines)
Lines 49-61 Link Here
49
    }
49
    }
50
50
51
    public boolean isEnabled () {
51
    public boolean isEnabled () {
52
        Node p = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
52
        Node p = CurrentProjectNode.get();
53
        ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
53
        ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
54
        return pdo != null;
54
        return pdo != null;
55
    }
55
    }
56
56
57
    public void performAction () {
57
    public void performAction () {
58
        Node p = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
58
        Node p = CurrentProjectNode.get();
59
        ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
59
        ProjectDataObject pdo = (ProjectDataObject) p.getCookie (ProjectDataObject.class);
60
        if (pdo != null) {
60
        if (pdo != null) {
61
            ProjectOption opt = (ProjectOption)ProjectOption.findObject (ProjectOption.class, true);
61
            ProjectOption opt = (ProjectOption)ProjectOption.findObject (ProjectOption.class, true);
(-)projects/src/org/netbeans/modules/projects/SetMainClassCookieAction.java (-2 / +2 lines)
Lines 38-44 Link Here
38
        if (n.length != 1) 
38
        if (n.length != 1) 
39
            return false;
39
            return false;
40
        
40
        
41
        Node nodePrj = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
41
        Node nodePrj = CurrentProjectNode.get();
42
        ProjectDataObject pdo = (ProjectDataObject) nodePrj.getCookie (ProjectDataObject.class);
42
        ProjectDataObject pdo = (ProjectDataObject) nodePrj.getCookie (ProjectDataObject.class);
43
        if (pdo == null) {
43
        if (pdo == null) {
44
            return false;
44
            return false;
Lines 57-63 Link Here
57
                opt.setMainClass (dobj);
57
                opt.setMainClass (dobj);
58
58
59
                // add link to main class if it isn't accessible from the project
59
                // add link to main class if it isn't accessible from the project
60
                Node nodePrj = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
60
                Node nodePrj = CurrentProjectNode.get();
61
                ProjectDataObject pdo = (ProjectDataObject) nodePrj.getCookie (ProjectDataObject.class);
61
                ProjectDataObject pdo = (ProjectDataObject) nodePrj.getCookie (ProjectDataObject.class);
62
                if (pdo != null && !pdo.isAccessibleFromFolder (dobj) && ProjectOption.canAddToProject (dobj)) {
62
                if (pdo != null && !pdo.isAccessibleFromFolder (dobj) && ProjectOption.canAddToProject (dobj)) {
63
                    try {
63
                    try {
(-)projects/src/org/netbeans/modules/projects/content/ProjectErrorManager.java (-1 / +2 lines)
Lines 17-22 Link Here
17
import java.awt.datatransfer.*;
17
import java.awt.datatransfer.*;
18
import java.io.IOException;
18
import java.io.IOException;
19
import javax.swing.*;
19
import javax.swing.*;
20
import org.netbeans.modules.projects.CurrentProjectNode;
20
21
21
import org.openide.*;
22
import org.openide.*;
22
import org.openide.nodes.*;
23
import org.openide.nodes.*;
Lines 208-214 Link Here
208
            setIconBase("org/netbeans/modules/projects/resources/AllErrorsNodeIcon"); // NOI18N
209
            setIconBase("org/netbeans/modules/projects/resources/AllErrorsNodeIcon"); // NOI18N
209
            // Whatever is most relevant to a user:
210
            // Whatever is most relevant to a user:
210
//            setDefaultAction (SystemAction.get (PropertiesAction.class));
211
//            setDefaultAction (SystemAction.get (PropertiesAction.class));
211
            Node n = TopManager.getDefault().getPlaces().nodes().projectDesktop();
212
            Node n = CurrentProjectNode.get();
212
            String name = NbBundle.getMessage(ProjectErrorManager.class, "LBL_AllErrorsNode", n.getName());
213
            String name = NbBundle.getMessage(ProjectErrorManager.class, "LBL_AllErrorsNode", n.getName());
213
            setName(name);
214
            setName(name);
214
            setDisplayName(name);
215
            setDisplayName(name);
(-)projects/src/org/netbeans/modules/projects/resources/projects-layer.xml (+4 lines)
Lines 119-124 Link Here
119
                </folder>
119
                </folder>
120
            </folder>
120
            </folder>
121
        </folder>
121
        </folder>
122
        <folder name="Runtime">
123
            <!-- XXX better as a root tab, but that is poorly supported currently -->
124
            <file name="org-netbeans-modules-projects-CurrentProjectNode.instance"/>
125
        </folder>
122
    </folder>
126
    </folder>
123
127
124
    <!-- default workspaces, frames and their layout defined by core-->
128
    <!-- default workspaces, frames and their layout defined by core-->
(-)projects/src/org/netbeans/modules/projects/settings/ProjectOption.java (-2 / +3 lines)
Lines 14-19 Link Here
14
package org.netbeans.modules.projects.settings;
14
package org.netbeans.modules.projects.settings;
15
15
16
import java.io.IOException;
16
import java.io.IOException;
17
import org.netbeans.modules.projects.CurrentProjectNode;
17
18
18
import org.openide.TopManager;
19
import org.openide.TopManager;
19
import org.openide.NotifyDescriptor;
20
import org.openide.NotifyDescriptor;
Lines 125-131 Link Here
125
    }
126
    }
126
127
127
    public DataObject getMainClass () {
128
    public DataObject getMainClass () {
128
        Node prjNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
129
        Node prjNode = CurrentProjectNode.get();
129
        ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
130
        ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
130
        DataShadow shadow = pdo == null ? null : getMainClassShadow (pdo);
131
        DataShadow shadow = pdo == null ? null : getMainClassShadow (pdo);
131
132
Lines 136-142 Link Here
136
     * the mainClass property is ALWAYS project-specific.
137
     * the mainClass property is ALWAYS project-specific.
137
     */
138
     */
138
    public void setMainClass (DataObject value) {
139
    public void setMainClass (DataObject value) {
139
        Node prjNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
140
        Node prjNode = CurrentProjectNode.get();
140
        ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
141
        ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
141
        DataShadow shadow = null;
142
        DataShadow shadow = null;
142
143
(-)projects/src/org/netbeans/modules/projects/settings/ProjectOptionBeanInfo.java (-1 / +2 lines)
Lines 17-22 Link Here
17
import java.beans.*;
17
import java.beans.*;
18
import java.util.LinkedList;
18
import java.util.LinkedList;
19
import java.util.Iterator;
19
import java.util.Iterator;
20
import org.netbeans.modules.projects.CurrentProjectNode;
20
21
21
import org.openide.TopManager;
22
import org.openide.TopManager;
22
import org.openide.ErrorManager;
23
import org.openide.ErrorManager;
Lines 106-112 Link Here
106
        while (i.hasNext ()) {
107
        while (i.hasNext ()) {
107
            PropertyDescriptor p = (PropertyDescriptor) i.next ();
108
            PropertyDescriptor p = (PropertyDescriptor) i.next ();
108
            if (p.getName ().equals ("mainClass")) { //NOI18N
109
            if (p.getName ().equals ("mainClass")) { //NOI18N
109
                Node prjNode = TopManager.getDefault ().getPlaces ().nodes ().projectDesktop ();
110
                Node prjNode = CurrentProjectNode.get();
110
                ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
111
                ProjectDataObject pdo = (ProjectDataObject) prjNode.getCookie (ProjectDataObject.class);
111
                DataFolder files = pdo == null ? null : pdo.getFilesFolder ();
112
                DataFolder files = pdo == null ? null : pdo.getFilesFolder ();
112
                if (files != null) {
113
                if (files != null) {
(-)properties/build.xml (-3 / +2 lines)
Lines 28-36 Link Here
28
      <exclude name="org/netbeans/modules/properties/syntax/"/>
28
      <exclude name="org/netbeans/modules/properties/syntax/"/>
29
      <classpath>
29
      <classpath>
30
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
30
        <pathelement location="../openide/openide-13javac-workaround.jar"/>
31
        <fileset dir="../openide/netbeans/lib">
31
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
32
          <include name="openide*.jar" />
32
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
33
        </fileset>
34
      </classpath>
33
      </classpath>
35
    </javac>
34
    </javac>
36
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
35
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
(-)properties/manifest-syntax.mf (-2 / +2 lines)
Lines 1-9 Link Here
1
OpenIDE-Module: org.netbeans.modules.properties.syntax/1
1
OpenIDE-Module: org.netbeans.modules.properties.syntax/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/properties/syntax/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/properties/syntax/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.9
3
OpenIDE-Module-Specification-Version: 1.10
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Install: org/netbeans/modules/properties/syntax/RestoreColoring.class
5
OpenIDE-Module-Install: org/netbeans/modules/properties/syntax/RestoreColoring.class
6
OpenIDE-Module-Layer: org/netbeans/modules/properties/syntax/Layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/properties/syntax/Layer.xml
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.properties/1 > 1.5, org.netbeans.modules.editor/1 > 1.6
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.properties/1 > 1.5, org.netbeans.modules.editor/1 > 1.6
9
9
(-)properties/manifest.mf (-2 / +4 lines)
Lines 1-9 Link Here
1
OpenIDE-Module: org.netbeans.modules.properties/1
1
OpenIDE-Module: org.netbeans.modules.properties/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/properties/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/properties/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.9
3
OpenIDE-Module-Specification-Version: 1.10
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/netbeans/modules/properties/Layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/properties/Layer.xml
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.5
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
8
OpenIDE-Module-Requires: org.openide.TopManager
7
9
8
Name: org/netbeans/modules/properties/PropertiesDataLoader.class
10
Name: org/netbeans/modules/properties/PropertiesDataLoader.class
9
OpenIDE-Module-Class: Loader
11
OpenIDE-Module-Class: Loader
(-)properties/src/org/netbeans/modules/properties/syntax/EditorSettingsCopy.java (-2 / +1 lines)
Lines 39-45 Link Here
39
import org.netbeans.modules.properties.TableViewSettingsFactory.TableViewSettings;
39
import org.netbeans.modules.properties.TableViewSettingsFactory.TableViewSettings;
40
40
41
import org.openide.ErrorManager;
41
import org.openide.ErrorManager;
42
import org.openide.TopManager;
43
import org.openide.util.SharedClassObject;
42
import org.openide.util.SharedClassObject;
44
43
45
44
Lines 247-253 Link Here
247
            TableViewSettingsFactory.setTableViewSettings(settingsCopy);
246
            TableViewSettingsFactory.setTableViewSettings(settingsCopy);
248
        } catch (SecurityException se) {
247
        } catch (SecurityException se) {
249
            // Came too late.
248
            // Came too late.
250
            TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, se);
249
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, se);
251
        }
250
        }
252
    }
251
    }
253
252
(-)rmi/build.xml (-4 / +3 lines)
Lines 63-72 Link Here
63
      <classpath>
63
      <classpath>
64
        <pathelement location="libsrc"/>
64
        <pathelement location="libsrc"/>
65
        <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
65
        <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
66
        <!--<pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>-->
66
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
67
        <fileset dir="${nbroot}/openide/netbeans/lib">
67
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
68
          <include name="openide*.jar" />
68
        <pathelement location="${nbroot}/java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
69
        </fileset>
70
	<pathelement location="${nbroot}/java/netbeans/modules/java.jar"/>
69
	<pathelement location="${nbroot}/java/netbeans/modules/java.jar"/>
71
	<pathelement location="${nbroot}/debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
70
	<pathelement location="${nbroot}/debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
72
        <!-- Hopefully set up by nbbuild/build.xml: -->
71
        <!-- Hopefully set up by nbbuild/build.xml: -->
(-)rmi/manifest.mf (-4 / +4 lines)
Lines 2-11 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/rmi/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/rmi/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/rmi/RMIModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/rmi/RMIModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/rmi/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/rmi/resources/mf-layer.xml
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.6, org.netbeans.modules.debugger.jpda/1 > 1.11, org.netbeans.modules.utilities/1 > 1.2
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1 > 1.6, org.netbeans.modules.debugger.core/3, org.netbeans.modules.debugger.jpda/1 > 1.11, org.netbeans.modules.utilities/1 > 1.2, org.openide.deprecated > 1.0, org.openide.src > 1.0
7
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl, org.netbeans.api.javahelp.Help
7
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl, org.netbeans.api.javahelp.Help, org.openide.TopManager
8
OpenIDE-Module-Specification-Version: 1.6
8
OpenIDE-Module-Specification-Version: 1.7
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
10
Class-Path: docs/rmi.jar
10
Class-Path: docs/rmi.jar
11
11
(-)scripting/build.xml (-3 / +2 lines)
Lines 27-35 Link Here
27
        <ant dir="external" target="unscramble"/>
27
        <ant dir="external" target="unscramble"/>
28
        <path id="scripting-cp">
28
        <path id="scripting-cp">
29
            <pathelement location="../openide/openide-13javac-workaround.jar"/>
29
            <pathelement location="../openide/openide-13javac-workaround.jar"/>
30
            <fileset dir="../openide/netbeans/lib">
30
            <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
                <include name="openide*.jar" />
31
            <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
            </fileset>
33
            <pathelement location="../core/netbeans/lib/core.jar"/>
32
            <pathelement location="../core/netbeans/lib/core.jar"/>
34
            <fileset dir="external">
33
            <fileset dir="external">
35
                <include name="*.jar"/>
34
                <include name="*.jar"/>
(-)scripting/manifest.mf (-3 / +3 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.scripting/1
1
OpenIDE-Module: org.netbeans.modules.scripting/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/scripting/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/scripting/Bundle.properties
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
3
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
4
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1
4
OpenIDE-Module-Module-Dependencies: org.netbeans.core/1 > 1.1, org.openide.deprecated > 1.0
5
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help
5
OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help, org.openide.TopManager
6
OpenIDE-Module-Specification-Version: 1.6
6
OpenIDE-Module-Specification-Version: 1.6
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
8
OpenIDE-Module-Layer: org/netbeans/modules/scripting/resources/Layer.xml
8
OpenIDE-Module-Layer: org/netbeans/modules/scripting/resources/Layer.xml
(-)text/build.xml (-3 / +2 lines)
Lines 27-35 Link Here
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
      <classpath>
28
      <classpath>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
29
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
30
        <fileset dir="../openide/netbeans/lib">
30
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
31
          <include name="openide*.jar" />
31
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
        </fileset>
33
      </classpath>
32
      </classpath>
34
    </javac>
33
    </javac>
35
  </target>
34
  </target>
(-)text/manifest.mf (-2 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.text/1
1
OpenIDE-Module: org.netbeans.modules.text/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/text/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/text/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/text/TXTModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/text/TXTModule.class
4
OpenIDE-Module-Specification-Version: 1.9
4
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Layer: org/netbeans/modules/text/Layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/text/Layer.xml
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.openide.deprecated > 1.0
9
OpenIDE-Module-Requires: org.openide.TopManager
8
10
9
Name: org/netbeans/modules/text/TXTDataLoader.class
11
Name: org/netbeans/modules/text/TXTDataLoader.class
10
OpenIDE-Module-Class: Loader
12
OpenIDE-Module-Class: Loader
(-)tomcatint/tomcat40/build.xml (-3 / +3 lines)
Lines 85-93 Link Here
85
          <include name="xml-apis*.jar"/>
85
          <include name="xml-apis*.jar"/>
86
          <include name="xerces*.jar"/>
86
          <include name="xerces*.jar"/>
87
        </fileset>
87
        </fileset>
88
        <fileset dir="${nb_root}/openide/netbeans/lib">
88
        <pathelement location="${nb_root}/openide/netbeans/lib/openide.jar"/>
89
          <include name="openide*.jar" />
89
        <pathelement location="${nb_root}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
90
        </fileset>
90
        <pathelement location="${nb_root}/java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
91
      </classpath>
91
      </classpath>
92
    </javac>
92
    </javac>
93
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
93
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
(-)tomcatint/tomcat40/manifest-autocompile.mf (-2 / +2 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.web.tomcat.tomcat40.autocompile/1
1
OpenIDE-Module: org.netbeans.modules.web.tomcat.tomcat40.autocompile/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tomcat/tomcat40/autocompile/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tomcat/tomcat40/autocompile/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.3
3
OpenIDE-Module-Specification-Version: 1.4
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Requires: org.netbeans.modules.tomcatint.tomcat40
5
OpenIDE-Module-Requires: org.netbeans.modules.tomcatint.tomcat40
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, org.netbeans.modules.httpserver/1
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, org.netbeans.modules.httpserver/1
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
8
(-)tomcatint/tomcat40/manifest.mf (-3 / +4 lines)
Lines 1-12 Link Here
1
OpenIDE-Module: org.netbeans.modules.web.tomcat.tomcat40/1
1
OpenIDE-Module: org.netbeans.modules.web.tomcat.tomcat40/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tomcat/tomcat40/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/tomcat/tomcat40/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/tomcat/tomcat40/resources/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/tomcat/tomcat40/resources/layer.xml
4
OpenIDE-Module-Specification-Version: 1.5
4
OpenIDE-Module-Specification-Version: 1.6
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Install: org/netbeans/modules/tomcat/tomcat40/Tomcat40ModuleInstall.class
6
OpenIDE-Module-Install: org/netbeans/modules/tomcat/tomcat40/Tomcat40ModuleInstall.class
7
OpenIDE-Module-Provides: org.netbeans.modules.tomcatint.tomcat40
7
OpenIDE-Module-Provides: org.netbeans.modules.tomcatint.tomcat40
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.j2eeserver/2, org.netbeans.modules.web.core/1 > 1.8, org.netbeans.modules.schema2beans/1, org.netbeans.modules.servletapi23/1, org.netbeans.modules.web.jspparser/1 > 1.2
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.j2eeserver/2, org.netbeans.modules.web.core/1 > 1.8, org.netbeans.modules.schema2beans/1, org.netbeans.modules.servletapi23/1, org.netbeans.modules.web.jspparser/1 > 1.2, org.netbeans.modules.debugger.core/3, org.openide.deprecated > 1.0, org.openide.src > 1.0
9
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
9
OpenIDE-Module-Requires: org.openide.TopManager
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
10
OpenIDE-Module-Package-Dependencies: [javax.servlet.ServletException], [org.apache.jasper.Constants], [org.apache.jasper.Options], [org.apache.xml.serialize.EncodingInfo]
11
OpenIDE-Module-Package-Dependencies: [javax.servlet.ServletException], [org.apache.jasper.Constants], [org.apache.jasper.Options], [org.apache.xml.serialize.EncodingInfo]
11
Class-Path: docs/tomcat40.jar
12
Class-Path: docs/tomcat40.jar
12
13
(-)tomcatint/tomcat40/src/org/netbeans/modules/tomcat/tomcat40/autocompile/CompileServlet.java (-4 / +3 lines)
Lines 24-30 Link Here
24
import org.openide.actions.CompileAction;
24
import org.openide.actions.CompileAction;
25
import org.openide.filesystems.*;
25
import org.openide.filesystems.*;
26
import org.openide.loaders.*;
26
import org.openide.loaders.*;
27
import org.openide.TopManager;
28
import org.openide.ErrorManager;
27
import org.openide.ErrorManager;
29
import org.openide.util.NbBundle;
28
import org.openide.util.NbBundle;
30
29
Lines 82-92 Link Here
82
        }
81
        }
83
        catch (DataObjectNotFoundException e) {
82
        catch (DataObjectNotFoundException e) {
84
            // neither success nor failed
83
            // neither success nor failed
85
            TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, e);
84
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
86
        }
85
        }
87
        catch (Exception e) {
86
        catch (Exception e) {
88
            // neither success nor failed
87
            // neither success nor failed
89
            TopManager.getDefault().getErrorManager().notify(ErrorManager.INFORMATIONAL, e);
88
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
90
        }
89
        }
91
        // now compilationOK and compilationFailed have the right values
90
        // now compilationOK and compilationFailed have the right values
92
        response.setContentType("text/plain"); // NOI18N
91
        response.setContentType("text/plain"); // NOI18N
Lines 103-109 Link Here
103
    
102
    
104
    /** Finds a fileobject for an absolute file name or null if not found */
103
    /** Finds a fileobject for an absolute file name or null if not found */
105
    private static FileObject findFileObjectForFile(String fileName, String uriToEnsure) {
104
    private static FileObject findFileObjectForFile(String fileName, String uriToEnsure) {
106
        Repository rep = TopManager.getDefault().getRepository();
105
        Repository rep = Repository.getDefault();
107
        for (Enumeration en = rep.getFileSystems(); en.hasMoreElements(); ) {
106
        for (Enumeration en = rep.getFileSystems(); en.hasMoreElements(); ) {
108
            FileSystem fs = (FileSystem)en.nextElement();
107
            FileSystem fs = (FileSystem)en.nextElement();
109
            FileObject fo = JspCompileUtil.findFileObjectForFile(fs, fileName);
108
            FileObject fo = JspCompileUtil.findFileObjectForFile(fs, fileName);
(-)ui/welcome/build.xml (-3 / +2 lines)
Lines 27-35 Link Here
27
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
27
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
28
            <classpath>
28
            <classpath>
29
                <pathelement location="../../openide/openide-13javac-workaround.jar"/>
29
                <pathelement location="../../openide/openide-13javac-workaround.jar"/>
30
                <fileset dir="../../openide/netbeans/lib">
30
                <pathelement location="../../openide/netbeans/lib/openide.jar"/>
31
                    <include name="openide*.jar" />
31
                <pathelement location="../../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
32
                </fileset>
33
                <pathelement location="../../core/netbeans/lib/core.jar"/>
32
                <pathelement location="../../core/netbeans/lib/core.jar"/>
34
                <pathelement location="../../utilities/netbeans/modules/utilities.jar"/>
33
                <pathelement location="../../utilities/netbeans/modules/utilities.jar"/>
35
            </classpath>
34
            </classpath>
(-)ui/welcome/manifest.mf (-3 / +4 lines)
Lines 1-11 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module-Specification-Version: 1.3
2
OpenIDE-Module-Specification-Version: 1.4
3
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
3
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module: org.netbeans.modules.welcome/1
4
OpenIDE-Module: org.netbeans.modules.welcome/1
5
OpenIDE-Module-Layer: org/netbeans/modules/welcome/mf-layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/welcome/mf-layer.xml
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0, org.netbeans.modules.usersguide/1 > 1.0,
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0, org.netbeans.modules.usersguide/1 > 1.0,
8
  org.netbeans.core.ui/1 > 1.0, org.netbeans.modules.utilities/1 > 1.8
9
  org.netbeans.core.ui/1 > 1.0, org.netbeans.core/1 > 1.7, org.netbeans.modules.utilities/1 > 1.8, org.openide.deprecated > 1.0
9
Class-Path: docs/welcome.jar
10
Class-Path: docs/welcome.jar
10
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/welcome/Bundle.properties
11
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/welcome/Bundle.properties
11
OpenIDE-Module-Install: org/netbeans/modules/welcome/WelcomeInstall.class
12
OpenIDE-Module-Install: org/netbeans/modules/welcome/WelcomeInstall.class
(-)usersguide/manifest.mf (-2 / +2 lines)
Lines 2-10 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/usersguide/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/usersguide/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/usersguide/UGModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/usersguide/UGModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/usersguide/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/usersguide/layer.xml
5
OpenIDE-Module-Specification-Version: 1.11
5
OpenIDE-Module-Specification-Version: 1.12
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.2
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.javahelp/1 > 1.0
9
Class-Path: docs/usersguide.jar
9
Class-Path: docs/usersguide.jar
10
10
(-)usersguide/src/org/netbeans/modules/usersguide/UGModule.java (-2 / +1 lines)
Lines 22-28 Link Here
22
import java.util.zip.ZipInputStream;
22
import java.util.zip.ZipInputStream;
23
23
24
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
25
import org.openide.TopManager;
26
import org.openide.filesystems.*;
25
import org.openide.filesystems.*;
27
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
26
import org.openide.filesystems.FileSystem; // override java.io.FileSystem
28
import org.openide.modules.ModuleInstall;
27
import org.openide.modules.ModuleInstall;
Lines 39-45 Link Here
39
38
40
    //private static final String PROP_INSTALL_COUNT = "installCount"; // NOI18N
39
    //private static final String PROP_INSTALL_COUNT = "installCount"; // NOI18N
41
40
42
    private static ErrorManager err = TopManager.getDefault ().getErrorManager ();
41
    private static ErrorManager err = ErrorManager.getDefault ();
43
42
44
    /*
43
    /*
45
    private static int icount = 0;
44
    private static int icount = 0;
(-)utilities/build.xml (-3 / +2 lines)
Lines 26-34 Link Here
26
  <target name="init">
26
  <target name="init">
27
    <path id="utilities-cp">
27
    <path id="utilities-cp">
28
      <pathelement location="../openide/openide-13javac-workaround.jar"/>
28
      <pathelement location="../openide/openide-13javac-workaround.jar"/>
29
      <fileset dir="../openide/netbeans/lib">
29
      <pathelement location="../openide/netbeans/lib/openide.jar"/>
30
        <include name="openide*.jar" />
30
      <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
31
      </fileset>
32
      <pathelement location="../openidex/netbeans/modules/autoload/openidex.jar"/>
31
      <pathelement location="../openidex/netbeans/modules/autoload/openidex.jar"/>
33
      <fileset dir="../core/external">
32
      <fileset dir="../core/external">
34
        <include name="regexp*.jar"/>
33
        <include name="regexp*.jar"/>
(-)utilities/manifest.mf (-3 / +5 lines)
Lines 1-13 Link Here
1
OpenIDE-Module: org.netbeans.modules.utilities/1
1
OpenIDE-Module: org.netbeans.modules.utilities/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/utilities/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/utilities/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.9
3
OpenIDE-Module-Specification-Version: 1.10
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Install: org/netbeans/modules/utilities/Installer.class
5
OpenIDE-Module-Install: org/netbeans/modules/utilities/Installer.class
6
OpenIDE-Module-Layer: org/netbeans/modules/utilities/Layer.xml
6
OpenIDE-Module-Layer: org/netbeans/modules/utilities/Layer.xml
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.23
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: 
8
OpenIDE-Module-Module-Dependencies: 
9
 org.openidex.util/2,
9
 org.openidex.util/2,
10
 org.netbeans.modules.settings/1 > 1.0
10
 org.netbeans.modules.settings/1 > 1.0,
11
 org.openide.deprecated > 1.0
12
OpenIDE-Module-Requires: org.openide.TopManager
11
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
13
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
12
Main-Class: org.netbeans.modules.openfile.Main
14
Main-Class: org.netbeans.modules.openfile.Main
13
15
(-)vcscore/build.xml (-3 / +2 lines)
Lines 32-40 Link Here
32
        <pathelement location="../editor/netbeans/modules/ext/nb-editor.jar"/>
32
        <pathelement location="../editor/netbeans/modules/ext/nb-editor.jar"/>
33
        <pathelement location="../openidex/netbeans/modules/autoload/openidex.jar"/>
33
        <pathelement location="../openidex/netbeans/modules/autoload/openidex.jar"/>
34
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
34
	<pathelement location="../openide/openide-13javac-workaround.jar"/>
35
        <fileset dir="../openide/netbeans/lib">
35
        <pathelement location="../openide/netbeans/lib/openide.jar"/>
36
          <include name="openide*.jar" />
36
        <pathelement location="../openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
37
        </fileset>
38
        <fileset dir="../core/external">
37
        <fileset dir="../core/external">
39
          <include name="regexp*.jar" />
38
          <include name="regexp*.jar" />
40
        </fileset>
39
        </fileset>
(-)vcscore/manifest.mf (-3 / +4 lines)
Lines 1-9 Link Here
1
OpenIDE-Module: org.netbeans.modules.vcscore/1
1
OpenIDE-Module: org.netbeans.modules.vcscore/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcscore/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcscore/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.7
3
OpenIDE-Module-Specification-Version: 1.8
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Layer: org/netbeans/modules/vcscore/resources/mf-layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/vcscore/resources/mf-layer.xml
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.8
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.openidex.util/2, org.netbeans.modules.editor/1 > 1.7
7
OpenIDE-Module-Module-Dependencies: org.openidex.util/2, org.netbeans.modules.editor/1 > 1.7, org.openide.deprecated > 1.0
8
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
10
(-)vcsgeneric/build.xml (-4 / +2 lines)
Lines 41-50 Link Here
41
        excludes="org/netbeans/modules/vcs/advanced/config/">
41
        excludes="org/netbeans/modules/vcs/advanced/config/">
42
      <classpath>        
42
      <classpath>        
43
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
43
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
44
        <!--<pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>-->
44
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
45
        <fileset dir="${nbroot}/openide/netbeans/lib">
45
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
46
          <include name="openide*.jar" />
47
        </fileset>
48
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
46
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
49
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
47
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
50
        <pathelement location="${nbroot}/diff/netbeans/modules/diff.jar"/>
48
        <pathelement location="${nbroot}/diff/netbeans/modules/diff.jar"/>
(-)vcsgeneric/manifest.mf (-2 / +3 lines)
Lines 2-9 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/advanced/config/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/advanced/config/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.7
3
OpenIDE-Module-Specification-Version: 1.7
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.5
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1 > 1.6,org.netbeans.modules.diff/1 > 1.4
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1 > 1.6,org.netbeans.modules.diff/1 > 1.4, org.openide.deprecated > 1.0
7
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Layer: org/netbeans/modules/vcs/advanced/config/mf-layer.xml
8
OpenIDE-Module-Layer: org/netbeans/modules/vcs/advanced/config/mf-layer.xml
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
10
(-)vcsgeneric/profiles/cvsprofiles/build.xml (-4 / +2 lines)
Lines 34-43 Link Here
34
        destdir="src">
34
        destdir="src">
35
      <classpath>        
35
      <classpath>        
36
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
36
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
37
        <!--<pathelement location="${nbroot1}/openide/netbeans/lib/openide.jar"/>-->
37
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
38
        <fileset dir="${nbroot}/openide/netbeans/lib">
38
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
39
          <include name="openide*.jar" />
40
        </fileset>
41
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
39
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
42
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
40
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
43
	<pathelement location="${nbroot}/vcsgeneric/netbeans/modules/vcsgen.jar"/>
41
	<pathelement location="${nbroot}/vcsgeneric/netbeans/modules/vcsgen.jar"/>
(-)vcsgeneric/profiles/cvsprofiles/manifest.mf (-2 / +3 lines)
Lines 2-9 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/cvsprofiles/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/cvsprofiles/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1,org.netbeans.modules.diff/1
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1,org.netbeans.modules.diff/1, org.openide.deprecated > 1.0
7
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/cvsprofiles/mf-layer.xml
8
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/cvsprofiles/mf-layer.xml
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
10
(-)vcsgeneric/profiles/pvcs/build.xml (-4 / +2 lines)
Lines 35-44 Link Here
35
        destdir="src">
35
        destdir="src">
36
      <classpath>        
36
      <classpath>        
37
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
37
	<pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
38
        <!--<pathelement location="${nbroot1}/openide/netbeans/lib/openide.jar"/>-->
38
        <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
39
        <fileset dir="${nbroot}/openide/netbeans/lib">
39
        <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
40
          <include name="openide*.jar" />
41
        </fileset>
42
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
40
	<pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
43
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
41
	<pathelement location="${nbroot}/vcscore/netbeans/modules/autoload/vcscore.jar"/>
44
	<pathelement location="${nbroot}/vcsgeneric/netbeans/modules/vcsgen.jar"/>
42
	<pathelement location="${nbroot}/vcsgeneric/netbeans/modules/vcsgen.jar"/>
(-)vcsgeneric/profiles/pvcs/manifest.mf (-3 / +4 lines)
Lines 1-9 Link Here
1
OpenIDE-Module: org.netbeans.modules.vcs.profiles.pvcs/1
1
OpenIDE-Module: org.netbeans.modules.vcs.profiles.pvcs/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/pvcs/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/pvcs/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.2
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1, org.openide.deprecated > 1.0
7
OpenIDE-Module-Requires: org.openide.TopManager
7
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/pvcs/mf-layer.xml
8
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/pvcs/mf-layer.xml
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
9
10
(-)vcsgeneric/profiles/vss/manifest.mf (-2 / +2 lines)
Lines 1-8 Link Here
1
OpenIDE-Module: org.netbeans.modules.vcs.profiles.vss/1
1
OpenIDE-Module: org.netbeans.modules.vcs.profiles.vss/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/vss/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/vcs/profiles/vss/Bundle.properties
3
OpenIDE-Module-Specification-Version: 1.1
3
OpenIDE-Module-Specification-Version: 1.2
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1
6
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.vcscore/1,org.netbeans.modules.vcs.advanced/1
7
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/vss/mf-layer.xml
7
OpenIDE-Module-Layer: org/netbeans/modules/vcs/profiles/vss/mf-layer.xml
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
8
OpenIDE-Module-Package-Dependencies: org.apache.regexp[RE]
(-)vcsgeneric/profiles/vss/src/org/netbeans/modules/vcs/profiles/vss/commands/VssVerifyAction.java (-2 / +2 lines)
Lines 28-34 Link Here
28
import javax.swing.SwingUtilities;
28
import javax.swing.SwingUtilities;
29
29
30
import org.openide.DialogDescriptor;
30
import org.openide.DialogDescriptor;
31
import org.openide.TopManager;
31
import org.openide.DialogDisplayer;
32
import org.openide.filesystems.FileObject;
32
import org.openide.filesystems.FileObject;
33
import org.openide.loaders.DataObject;
33
import org.openide.loaders.DataObject;
34
import org.openide.loaders.DataObjectNotFoundException;
34
import org.openide.loaders.DataObjectNotFoundException;
Lines 193-199 Link Here
193
                }
193
                }
194
            });
194
            });
195
        }
195
        }
196
        final Dialog dial = TopManager.getDefault().createDialog(dd);
196
        final Dialog dial = DialogDisplayer.getDefault().createDialog(dd);
197
        SwingUtilities.invokeLater(new Runnable() {
197
        SwingUtilities.invokeLater(new Runnable() {
198
            public void run() {
198
            public void run() {
199
                dial.show();
199
                dial.show();
(-)web/core/build.xml (-3 / +3 lines)
Lines 71-79 Link Here
71
        <pathelement location="${nb_root}/jarpackager/netbeans/modules/jarpackager.jar"/>
71
        <pathelement location="${nb_root}/jarpackager/netbeans/modules/jarpackager.jar"/>
72
        <pathelement location="${nb_root}/debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
72
        <pathelement location="${nb_root}/debuggercore/netbeans/modules/autoload/debuggerCore.jar"/>
73
        <pathelement path="${nb_root}/schema2beans/netbeans/modules/schema2beans.jar" />
73
        <pathelement path="${nb_root}/schema2beans/netbeans/modules/schema2beans.jar" />
74
        <fileset dir="${nb_root}/openide/netbeans/lib">
74
        <pathelement location="${nb_root}/openide/netbeans/lib/openide.jar"/>
75
          <include name="openide*.jar" />
75
        <pathelement location="${nb_root}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
76
        </fileset>
76
        <pathelement location="${nb_root}/java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
77
        <pathelement location="${nb_root}/openidex/netbeans/modules/autoload/openidex.jar"/>
77
        <pathelement location="${nb_root}/openidex/netbeans/modules/autoload/openidex.jar"/>
78
        <pathelement location="${nb_root}/j2eeserver/netbeans/modules/autoload/j2eeserver.jar"/>
78
        <pathelement location="${nb_root}/j2eeserver/netbeans/modules/autoload/j2eeserver.jar"/>
79
	<pathelement path="${nb_root}/xml/api/netbeans/modules/autoload/xml-api.jar" />
79
	<pathelement path="${nb_root}/xml/api/netbeans/modules/autoload/xml-api.jar" />
(-)web/core/manifest.mf (-3 / +4 lines)
Lines 2-11 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/core/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/core/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/web/core/ServletSupportModule.class
3
OpenIDE-Module-Install: org/netbeans/modules/web/core/ServletSupportModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/web/core/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/web/core/resources/layer.xml
5
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Specification-Version: 1.11
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.13
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1,org.netbeans.modules.j2eeserver/2, org.netbeans.modules.schema2beans/1, org.netbeans.modules.html/1, org.netbeans.modules.jarpackager/2, org.openidex.util/2, org.netbeans.api.xml/1
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.java/1,org.netbeans.modules.debugger.core/3, org.netbeans.modules.j2eeserver/2, org.netbeans.modules.schema2beans/1, org.netbeans.modules.html/1, org.netbeans.modules.jarpackager/2, org.openidex.util/2, org.netbeans.api.xml/1, org.openide.deprecated > 1.0, org.openide.src > 1.0
9
OpenIDE-Module-Requires: org.openide.TopManager
9
10
10
Name: org/netbeans/modules/web/dd/DDDataLoader.class
11
Name: org/netbeans/modules/web/dd/DDDataLoader.class
11
OpenIDE-Module-Class: Loader
12
OpenIDE-Module-Class: Loader
(-)web/jspdebug/manifest.mf (-1 / +1 lines)
Lines 4-10 Link Here
4
OpenIDE-Module-Layer: org/netbeans/modules/web/debug/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/web/debug/layer.xml
5
OpenIDE-Module-Specification-Version: 1.3
5
OpenIDE-Module-Specification-Version: 1.3
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.10
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.10, org.netbeans.modules.debugger.core/3
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
9
9
10
Name: org/netbeans/modules/web/debug/JspLoaderIE.class
10
Name: org/netbeans/modules/web/debug/JspLoaderIE.class
(-)web/jspparser/build.xml (-3 / +2 lines)
Lines 41-49 Link Here
41
        <fileset dir="../external">
41
        <fileset dir="../external">
42
          <include name="*.jar"/>
42
          <include name="*.jar"/>
43
        </fileset>
43
        </fileset>
44
        <fileset dir="${nb_root}/openide/netbeans/lib">
44
        <pathelement location="${nb_root}/openide/netbeans/lib/openide.jar"/>
45
          <include name="openide*.jar" />
45
        <pathelement location="${nb_root}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
46
        </fileset>
47
      </classpath>
46
      </classpath>
48
    </javac>
47
    </javac>
49
  </target>
48
  </target>
(-)web/jspparser/manifest.mf (-3 / +4 lines)
Lines 1-10 Link Here
1
OpenIDE-Module: org.netbeans.modules.web.jspparser/1
1
OpenIDE-Module: org.netbeans.modules.web.jspparser/1
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/jspparser/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/jspparser/Bundle.properties
3
OpenIDE-Module-Layer: org/netbeans/modules/web/jspparser/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/web/jspparser/layer.xml
4
OpenIDE-Module-Specification-Version: 1.3
4
OpenIDE-Module-Specification-Version: 1.4
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, org.netbeans.modules.servletapi23/1
7
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, org.netbeans.modules.servletapi23/1, org.openide.deprecated > 1.0
8
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Package-Dependencies: [javax.servlet.ServletException], [org.apache.jasper.Constants], [org.apache.jasper.Options]
9
OpenIDE-Module-Package-Dependencies: [javax.servlet.ServletException], [org.apache.jasper.Constants], [org.apache.jasper.Options]
9
Class-Path: ext/jasper-runtime-4.0.4.jar ext/jasper-compiler-4.0.4.jar
10
Class-Path: ext/jasper-runtime-4.0.4.jar ext/jasper-compiler-4.0.4.jar
10
11
(-)web/jspsyntax/build.xml (-3 / +2 lines)
Lines 38-46 Link Here
38
        <pathelement location="${nb_root}/xml/text-edit/netbeans/modules/xml-text-edit.jar"/>
38
        <pathelement location="${nb_root}/xml/text-edit/netbeans/modules/xml-text-edit.jar"/>
39
        <pathelement location="${core_root}/src/"/>
39
        <pathelement location="${core_root}/src/"/>
40
        <pathelement location="../external/servlet-2.3.jar"/>
40
        <pathelement location="../external/servlet-2.3.jar"/>
41
        <fileset dir="${nb_root}/openide/netbeans/lib">
41
        <pathelement location="${nb_root}/openide/netbeans/lib/openide.jar"/>
42
          <include name="openide*.jar" />
42
        <pathelement location="${nb_root}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
43
        </fileset>
44
      </classpath>
43
      </classpath>
45
    </javac>
44
    </javac>
46
45
(-)web/jspsyntax/manifest.mf (-3 / +5 lines)
Lines 2-12 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/core/syntax/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/core/syntax/Bundle.properties
3
OpenIDE-Module-Install: org/netbeans/modules/web/core/syntax/RestoreColoring.class
3
OpenIDE-Module-Install: org/netbeans/modules/web/core/syntax/RestoreColoring.class
4
OpenIDE-Module-Layer: org/netbeans/modules/web/core/syntax/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/web/core/syntax/layer.xml
5
OpenIDE-Module-Specification-Version: 1.10
5
OpenIDE-Module-Specification-Version: 1.11
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.3
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, 
8
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.web.core/1 > 1.6, 
9
  org.netbeans.modules.editor/1 > 1.6, 
9
  org.netbeans.modules.editor/1 > 1.6, 
10
  org.netbeans.modules.servletapi23/1, 
10
  org.netbeans.modules.servletapi23/1, 
11
  org.netbeans.modules.xml.text/1
11
  org.netbeans.modules.xml.text/1,
12
  org.openide.deprecated > 1.0
13
OpenIDE-Module-Requires: org.openide.TopManager
12
14
(-)xml/spec-vers.properties (-1 / +1 lines)
Lines 16-22 Link Here
16
16
17
17
18
# common module specification.version
18
# common module specification.version
19
xml.common=0.7
19
xml.common=0.8
20
20
21
21
22
# XML tools API
22
# XML tools API
(-)xml/catalog/build.xml (-3 / +2 lines)
Lines 48-56 Link Here
48
        <echo message="Compiling XML catalog module classes..."/>
48
        <echo message="Compiling XML catalog module classes..."/>
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
50
            <classpath>        
50
            <classpath>        
51
                <fileset dir="${nbroot}/openide/netbeans/lib">
51
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
52
                    <include name="openide*.jar"/>
52
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
53
                </fileset>
54
                <fileset dir="${nbroot}/core/external">
53
                <fileset dir="${nbroot}/core/external">
55
                    <include name="xml-apis*.jar"/>
54
                    <include name="xml-apis*.jar"/>
56
                </fileset>
55
                </fileset>
(-)xml/catalog/manifest.mf (-2 / +5 lines)
Lines 7-14 Link Here
7
OpenIDE-Module-Public-Packages: 
7
OpenIDE-Module-Public-Packages: 
8
 org.netbeans.modules.xml.catalog.spi.**,
8
 org.netbeans.modules.xml.catalog.spi.**,
9
 org.netbeans.modules.xml.catalog.settings.*
9
 org.netbeans.modules.xml.catalog.settings.*
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
11
OpenIDE-Module-Module-Dependencies: 
11
OpenIDE-Module-Module-Dependencies: 
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
13
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@
13
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
14
 org.openide.deprecated > 1.0
15
OpenIDE-Module-Requires: org.openide.TopManager
14
Class-Path: ext/resolver-1_1_nb.jar
16
Class-Path: ext/resolver-1_1_nb.jar
17
(-)xml/compat/manifest.mf (-1 / +1 lines)
Lines 2-8 Link Here
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/resources/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/resources/Bundle.properties
3
OpenIDE-Module-Specification-Version: @COMPAT_SPEC_VERS_SUBST@
3
OpenIDE-Module-Specification-Version: @COMPAT_SPEC_VERS_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
4
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.42
5
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
6
OpenIDE-Module-Module-Dependencies: 
6
OpenIDE-Module-Module-Dependencies: 
7
 org.netbeans.modules.xml.catalog/1 > @CATALOG_SPEC_VERS_SUBST@,
7
 org.netbeans.modules.xml.catalog/1 > @CATALOG_SPEC_VERS_SUBST@,
8
 org.netbeans.modules.xml.core/1 > @CORE_SPEC_VERS_SUBST@,
8
 org.netbeans.modules.xml.core/1 > @CORE_SPEC_VERS_SUBST@,
(-)xml/core/build.xml (-3 / +2 lines)
Lines 49-57 Link Here
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
50
            <classpath>        
50
            <classpath>        
51
                <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
51
                <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
52
                <fileset dir="${nbroot}/openide/netbeans/lib">
52
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
53
                    <include name="openide*.jar"/>
53
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
54
                </fileset>
55
                <pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
54
                <pathelement location="${nbroot}/openidex/netbeans/modules/autoload/openidex.jar"/>
56
                <pathelement location="${tax_lib_root}/src/"/>
55
                <pathelement location="${tax_lib_root}/src/"/>
57
                <pathelement location="${api_root}/src/"/>
56
                <pathelement location="${api_root}/src/"/>
(-)xml/core/manifest.mf (-2 / +4 lines)
Lines 7-17 Link Here
7
OpenIDE-Module-Public-Packages: 
7
OpenIDE-Module-Public-Packages: 
8
 org.netbeans.modules.xml.api.**,
8
 org.netbeans.modules.xml.api.**,
9
 org.netbeans.modules.xml.spi.**
9
 org.netbeans.modules.xml.spi.**
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.8
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
11
OpenIDE-Module-Module-Dependencies: 
11
OpenIDE-Module-Module-Dependencies: 
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
13
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
13
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
14
 org.openidex.util/2 > 2.1.1
14
 org.openidex.util/2 > 2.1.1,
15
 org.openide.deprecated > 1.0
16
OpenIDE-Module-Requires: org.openide.TopManager
15
Class-Path: docs/xml-core.jar
17
Class-Path: docs/xml-core.jar
16
18
17
Name: org/netbeans/modules/xml/core/XMLDataLoader.class
19
Name: org/netbeans/modules/xml/core/XMLDataLoader.class
(-)xml/core/compat/src/org/netbeans/modules/xml/settings/XMLSettings.java (-4 / +3 lines)
Lines 15-21 Link Here
15
import java.io.ObjectStreamException;
15
import java.io.ObjectStreamException;
16
import java.lang.reflect.*;
16
import java.lang.reflect.*;
17
17
18
import org.openide.TopManager;
19
import org.openide.options.SystemOption;
18
import org.openide.options.SystemOption;
20
19
21
import org.netbeans.modules.xml.core.settings.CoreSettings;
20
import org.netbeans.modules.xml.core.settings.CoreSettings;
Lines 88-94 Link Here
88
87
89
    private void initTreeEditSettings () {
88
    private void initTreeEditSettings () {
90
        try {
89
        try {
91
            ClassLoader classLoader = TopManager.getDefault().systemClassLoader();
90
            ClassLoader classLoader = (ClassLoader)Lookup.getDefault().lookup(ClassLoader.class);
92
91
93
//             TreeEditSettings treeEditSettings = TreeEditSettings.getDefault();
92
//             TreeEditSettings treeEditSettings = TreeEditSettings.getDefault();
94
            Class treeEditSettingsClass = classLoader.loadClass ("org.netbeans.modules.xml.tree.settings.TreeEditSettings");
93
            Class treeEditSettingsClass = classLoader.loadClass ("org.netbeans.modules.xml.tree.settings.TreeEditSettings");
Lines 157-163 Link Here
157
            klass = loader.loadClass("org.netbeans.modules.xml.catalog.setting.CatalogSettings");  //NOI18N
156
            klass = loader.loadClass("org.netbeans.modules.xml.catalog.setting.CatalogSettings");  //NOI18N
158
            readerKlass = loader.loadClass("org.netbeans.modules.xml.catalog.spi.CatalogReader");  //NOI18N
157
            readerKlass = loader.loadClass("org.netbeans.modules.xml.catalog.spi.CatalogReader");  //NOI18N
159
        } catch (ClassNotFoundException ex) {            
158
        } catch (ClassNotFoundException ex) {            
160
            ErrorManager err = TopManager.getDefault().getErrorManager();
159
            ErrorManager err = ErrorManager.getDefault();
161
            err.annotate(ex, NbBundle.getMessage(getClass(), "EXC_catalog_transfer_fail"));
160
            err.annotate(ex, NbBundle.getMessage(getClass(), "EXC_catalog_transfer_fail"));
162
            err.notify(ErrorManager.INFORMATIONAL, ex);
161
            err.notify(ErrorManager.INFORMATIONAL, ex);
163
        }
162
        }
Lines 178-184 Link Here
178
                addMethod.invoke(settings, new Object[] {next});
177
                addMethod.invoke(settings, new Object[] {next});
179
            }
178
            }
180
        } catch (Exception ex) {
179
        } catch (Exception ex) {
181
            ErrorManager err = TopManager.getDefault().getErrorManager();
180
            ErrorManager err = ErrorManager.getDefault();
182
            err.annotate(ex, NbBundle.getMessage(getClass(), "EXC_catalog_transfer_fail"));
181
            err.annotate(ex, NbBundle.getMessage(getClass(), "EXC_catalog_transfer_fail"));
183
            err.notify(ErrorManager.INFORMATIONAL, ex);
182
            err.notify(ErrorManager.INFORMATIONAL, ex);
184
        }
183
        }
(-)xml/css/build.xml (-3 / +2 lines)
Lines 46-54 Link Here
46
        <echo message="Compiling CSS module classes..."/>
46
        <echo message="Compiling CSS module classes..."/>
47
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
47
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
48
            <classpath>        
48
            <classpath>        
49
                <fileset dir="${nbroot}/openide/netbeans/lib">
49
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
50
                    <include name="openide*.jar"/>
50
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
51
                </fileset>
52
                <pathelement location="${api_root}/src/"/>
51
                <pathelement location="${api_root}/src/"/>
53
                <pathelement location="${nbroot}/editor/netbeans/modules/ext/nb-editor.jar"/>
52
                <pathelement location="${nbroot}/editor/netbeans/modules/ext/nb-editor.jar"/>
54
                <pathelement location="${nbroot}/editor/netbeans/modules/editor.jar"/>
53
                <pathelement location="${nbroot}/editor/netbeans/modules/editor.jar"/>
(-)xml/css/manifest.mf (-2 / +5 lines)
Lines 5-14 Link Here
5
OpenIDE-Module-Specification-Version: @CSS_SPEC_VERS_SUBST@
5
OpenIDE-Module-Specification-Version: @CSS_SPEC_VERS_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Public-Packages: -
7
OpenIDE-Module-Public-Packages: -
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Requires: org.openide.TopManager
9
OpenIDE-Module-Module-Dependencies: 
10
OpenIDE-Module-Module-Dependencies: 
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
11
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
11
 org.netbeans.modules.editor/1 > 1.8
12
 org.netbeans.modules.editor/1 > 1.8,
13
 org.openide.deprecated > 1.0
12
Class-Path: ext/flute.jar ext/sac.jar
14
Class-Path: ext/flute.jar ext/sac.jar
13
15
14
Name: org/netbeans/modules/css/CSSLoader.class
16
Name: org/netbeans/modules/css/CSSLoader.class
Lines 16-18 Link Here
16
Install-After: org.netbeans.modules.xml.core.XMLDataObject
18
Install-After: org.netbeans.modules.xml.core.XMLDataObject
17
Install-After: org.netbeans.modules.xml.core.DTDDataObject
19
Install-After: org.netbeans.modules.xml.core.DTDDataObject
18
Install-Before: org.netbeans.modules.text.TXTDataObject
20
Install-Before: org.netbeans.modules.text.TXTDataObject
21
(-)xml/schema/manifest.mf (-1 / +1 lines)
Lines 3-9 Link Here
3
OpenIDE-Module-Layer: org/netbeans/modules/xml/schema/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/xml/schema/resources/mf-layer.xml
4
OpenIDE-Module-Specification-Version: @SCHEMA_SPEC_VERS_SUBST@
4
OpenIDE-Module-Specification-Version: @SCHEMA_SPEC_VERS_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: 
7
OpenIDE-Module-Module-Dependencies: 
8
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
8
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
9
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
9
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
(-)xml/schema/src/org/netbeans/modules/xml/schema/cookies/Util.java (-17 lines)
Lines 12-37 Link Here
12
 */
12
 */
13
package org.netbeans.modules.xml.schema.cookies;
13
package org.netbeans.modules.xml.schema.cookies;
14
14
15
import java.awt.event.ActionEvent;
16
import java.io.File;
15
import java.io.File;
17
import java.util.Iterator;
18
import java.util.Set;
19
import java.util.StringTokenizer;
20
import java.util.TreeSet;
21
22
import javax.swing.JFileChooser;
23
import javax.swing.filechooser.FileFilter;
24
25
import org.openide.NotifyDescriptor;
26
import org.openide.TopManager;
27
28
import org.netbeans.api.xml.services.UserCatalog;
29
16
30
import org.netbeans.modules.xml.core.lib.AbstractUtil;
17
import org.netbeans.modules.xml.core.lib.AbstractUtil;
31
import org.openide.loaders.DataObject;
32
import org.openide.nodes.Node;
33
import org.openide.util.Lookup;
34
import org.openide.util.actions.SystemAction;
35
18
36
/**
19
/**
37
 * Collection of static support methods.
20
 * Collection of static support methods.
(-)xml/tax/build.xml (-3 / +2 lines)
Lines 47-55 Link Here
47
        <echo message="Compiling TAX module classes..."/>
47
        <echo message="Compiling TAX module classes..."/>
48
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
48
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
49
            <classpath>        
49
            <classpath>        
50
                <fileset dir="${nbroot}/openide/netbeans/lib">
50
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
51
                    <include name="openide*.jar"/>
51
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
52
                </fileset>
53
                <pathelement location="${lib_root}/src"/>
52
                <pathelement location="${lib_root}/src"/>
54
                <pathelement location="${api_root}/src/"/>
53
                <pathelement location="${api_root}/src/"/>
55
            </classpath>
54
            </classpath>
(-)xml/tax/manifest.mf (-2 / +3 lines)
Lines 3-10 Link Here
3
OpenIDE-Module-Install: org/netbeans/modules/xml/tax/TAXModuleInstall.class
3
OpenIDE-Module-Install: org/netbeans/modules/xml/tax/TAXModuleInstall.class
4
OpenIDE-Module-Specification-Version: @TAX_SPEC_VERS_SUBST@
4
OpenIDE-Module-Specification-Version: @TAX_SPEC_VERS_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
6
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
7
OpenIDE-Module-Module-Dependencies: org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@
7
OpenIDE-Module-Requires: org.openide.TopManager
8
OpenIDE-Module-Module-Dependencies: org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@, org.openide.deprecated > 1.0
8
Class-Path: ext/tax.jar ext/xerces2.jar
9
Class-Path: ext/tax.jar ext/xerces2.jar
9
OpenIDE-Module-Public-Packages: -
10
OpenIDE-Module-Public-Packages: -
10
11
(-)xml/text-edit/manifest.mf (-1 / +2 lines)
Lines 5-13 Link Here
5
OpenIDE-Module-Specification-Version: @TEXT_SPEC_VERS_SUBST@
5
OpenIDE-Module-Specification-Version: @TEXT_SPEC_VERS_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Public-Packages: org.netbeans.modules.xml.text.syntax.*
7
OpenIDE-Module-Public-Packages: org.netbeans.modules.xml.text.syntax.*
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Module-Dependencies: 
9
OpenIDE-Module-Module-Dependencies: 
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
13
 org.netbeans.modules.editor/1 > 1.7
13
 org.netbeans.modules.editor/1 > 1.7
14
(-)xml/text-edit/src/org/netbeans/modules/xml/text/completion/GrammarManager.java (-2 / +2 lines)
Lines 31-37 Link Here
31
import org.netbeans.modules.xml.text.syntax.SyntaxElement;
31
import org.netbeans.modules.xml.text.syntax.SyntaxElement;
32
import org.netbeans.modules.xml.text.syntax.XMLSyntaxSupport;
32
import org.netbeans.modules.xml.text.syntax.XMLSyntaxSupport;
33
import org.netbeans.modules.xml.text.syntax.dom.SyntaxNode;
33
import org.netbeans.modules.xml.text.syntax.dom.SyntaxNode;
34
import org.openide.TopManager;
35
import org.openide.filesystems.FileObject;
34
import org.openide.filesystems.FileObject;
36
import org.openide.loaders.DataObject;
35
import org.openide.loaders.DataObject;
37
import org.openide.text.NbDocument;
36
import org.openide.text.NbDocument;
Lines 40-45 Link Here
40
import org.openide.util.enum.QueueEnumeration;
39
import org.openide.util.enum.QueueEnumeration;
41
import org.w3c.dom.Node;
40
import org.w3c.dom.Node;
42
import org.xml.sax.InputSource;
41
import org.xml.sax.InputSource;
42
import org.openide.awt.StatusDisplayer;
43
43
44
/**
44
/**
45
 * Manages grammar to text editor association. It is able to
45
 * Manages grammar to text editor association. It is able to
Lines 207-213 Link Here
207
     */
207
     */
208
    private void notifyProgress(Task loader, String msg) {
208
    private void notifyProgress(Task loader, String msg) {
209
        if (this.loader != loader) return;
209
        if (this.loader != loader) return;
210
        TopManager.getDefault().setStatusText(msg);
210
        StatusDisplayer.getDefault().setStatusText(msg);
211
    }
211
    }
212
212
213
    /**
213
    /**
(-)xml/text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java (-1 lines)
Lines 44-50 Link Here
44
44
45
import javax.swing.Icon;
45
import javax.swing.Icon;
46
import org.netbeans.modules.xml.text.syntax.dom.SyntaxNode;
46
import org.netbeans.modules.xml.text.syntax.dom.SyntaxNode;
47
import org.openide.TopManager;
48
47
49
/**
48
/**
50
 * Consults grammar and presents list of possible choices
49
 * Consults grammar and presents list of possible choices
(-)xml/text-edit/src/org/netbeans/modules/xml/text/syntax/XMLKit.java (-1 / +2 lines)
Lines 27-32 Link Here
27
import javax.swing.*;
27
import javax.swing.*;
28
28
29
import org.openide.*;
29
import org.openide.*;
30
import org.openide.awt.StatusDisplayer;
30
31
31
// we depend on NetBeans editor stuff
32
// we depend on NetBeans editor stuff
32
import org.netbeans.editor.*;
33
import org.netbeans.editor.*;
Lines 131-137 Link Here
131
         * Uniform way of reporting problem while action executing #15589
132
         * Uniform way of reporting problem while action executing #15589
132
         */
133
         */
133
        protected void problem(String reason) {
134
        protected void problem(String reason) {
134
            if (reason != null) TopManager.getDefault().setStatusText("Cannot proceed: " + reason);
135
            if (reason != null) StatusDisplayer.getDefault().setStatusText("Cannot proceed: " + reason);
135
            new Panel().getToolkit().beep();
136
            new Panel().getToolkit().beep();
136
        }
137
        }
137
    }
138
    }
(-)xml/tools/build.xml (-3 / +3 lines)
Lines 48-56 Link Here
48
        <echo message="Compiling XML tools module classes..."/>
48
        <echo message="Compiling XML tools module classes..."/>
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
49
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
50
            <classpath>        
50
            <classpath>        
51
                <fileset dir="${nbroot}/openide/netbeans/lib">
51
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
52
                    <include name="openide*.jar"/>
52
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
53
                </fileset>
53
                <pathelement location="${nbroot}/java/srcmodel/netbeans/modules/autoload/java-src-model.jar"/>
54
                <fileset dir="${nbroot}/core/external">
54
                <fileset dir="${nbroot}/core/external">
55
                    <include name="xml-apis*.jar"/>
55
                    <include name="xml-apis*.jar"/>
56
                </fileset>
56
                </fileset>
(-)xml/tools/manifest.mf (-2 / +5 lines)
Lines 5-13 Link Here
5
OpenIDE-Module-Specification-Version: @TOOLS_SPEC_VERS_SUBST@
5
OpenIDE-Module-Specification-Version: @TOOLS_SPEC_VERS_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Public-Packages: -
7
OpenIDE-Module-Public-Packages: -
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Module-Dependencies: 
9
OpenIDE-Module-Module-Dependencies: 
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@, 
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@, 
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@, 
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@, 
13
 org.netbeans.libs.jaxp/1
13
 org.netbeans.libs.jaxp/1,
14
 org.openide.deprecated > 1.0, org.openide.src > 1.0
15
OpenIDE-Module-Requires: org.openide.TopManager
16
(-)xml/tree-edit/build.xml (-3 / +2 lines)
Lines 51-59 Link Here
51
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
51
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
52
            <classpath>        
52
            <classpath>        
53
                <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
53
                <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
54
                <fileset dir="${nbroot}/openide/netbeans/lib">
54
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
55
                    <include name="openide*.jar"/>
55
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
56
                </fileset>
57
                <fileset dir="${nbroot}/core/external">
56
                <fileset dir="${nbroot}/core/external">
58
                    <include name="xml-apis*.jar"/>
57
                    <include name="xml-apis*.jar"/>
59
                </fileset>
58
                </fileset>
(-)xml/tree-edit/manifest.mf (-2 / +5 lines)
Lines 5-13 Link Here
5
OpenIDE-Module-Specification-Version: @TREE_SPEC_VERS_SUBST@
5
OpenIDE-Module-Specification-Version: @TREE_SPEC_VERS_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
7
OpenIDE-Module-Public-Packages: -
7
OpenIDE-Module-Public-Packages: -
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
8
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
9
OpenIDE-Module-Module-Dependencies: 
9
OpenIDE-Module-Module-Dependencies: 
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
10
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
11
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
13
 org.openidex.util/2 > 2.1.1
13
 org.openidex.util/2 > 2.1.1,
14
 org.openide.deprecated > 1.0
15
OpenIDE-Module-Requires: org.openide.TopManager
16
(-)xml/xsl/build.xml (-3 / +2 lines)
Lines 51-59 Link Here
51
        <echo message="Compiling XSL module classes..."/>
51
        <echo message="Compiling XSL module classes..."/>
52
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
52
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
53
            <classpath>
53
            <classpath>
54
                <fileset dir="${nbroot}/openide/netbeans/lib">
54
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
55
                    <include name="openide*.jar"/>
55
                <pathelement location="${nbroot}/openide/deprecated/netbeans/modules/autoload/openide-deprecated.jar"/> <!-- XXX -->
56
                </fileset>
57
                <fileset dir="${nbroot}/core/external">
56
                <fileset dir="${nbroot}/core/external">
58
                    <include name="xml-apis*.jar"/>
57
                    <include name="xml-apis*.jar"/>
59
                </fileset>
58
                </fileset>
(-)xml/xsl/manifest.mf (-3 / +5 lines)
Lines 4-19 Link Here
4
OpenIDE-Module-Specification-Version: @XSL_SPEC_VERS_SUBST@
4
OpenIDE-Module-Specification-Version: @XSL_SPEC_VERS_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
5
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
6
OpenIDE-Module-Public-Packages: org.netbeans.modules.xsl.api.**
6
OpenIDE-Module-Public-Packages: org.netbeans.modules.xsl.api.**
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 2.19
7
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.14
8
OpenIDE-Module-Module-Dependencies: 
8
OpenIDE-Module-Module-Dependencies: 
9
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
9
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
10
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
10
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
11
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
11
 org.netbeans.modules.xml.core/1 = @BUILD_NUMBER_SUBST@,
12
 org.netbeans.libs.jaxp/1,
12
 org.netbeans.libs.jaxp/1,
13
 org.netbeans.libs.xalan/1 > 1.1,
13
 org.netbeans.libs.xalan/1 > 1.1,
14
 org.netbeans.modules.servletapi/1
14
 org.netbeans.modules.servletapi/1,
15
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl
15
 org.openide.deprecated > 1.0
16
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl, org.openide.TopManager
16
17
17
Name: org/netbeans/modules/xsl/XSLDataLoader.class
18
Name: org/netbeans/modules/xsl/XSLDataLoader.class
18
OpenIDE-Module-Class: Loader
19
OpenIDE-Module-Class: Loader
19
Install-Before: org.netbeans.modules.xml.core.XMLDataObject
20
Install-Before: org.netbeans.modules.xml.core.XMLDataObject
21
(-)xtest/src/org/netbeans/xtest/NbMultiTaskDef.java (-3 lines)
Lines 24-31 Link Here
24
import java.util.LinkedList;
24
import java.util.LinkedList;
25
import java.util.Iterator;
25
import java.util.Iterator;
26
26
27
//import org.openide.TopManager;
28
29
/**
27
/**
30
 *
28
 *
31
 * @author  vs124454
29
 * @author  vs124454
Lines 72-78 Link Here
72
    public void execute () throws BuildException {
70
    public void execute () throws BuildException {
73
        if (null != System.getProperty("test.ant.file")) {
71
        if (null != System.getProperty("test.ant.file")) {
74
            log("Using Netbeans classloader.", Project.MSG_DEBUG);
72
            log("Using Netbeans classloader.", Project.MSG_DEBUG);
75
            //loader = org.openide.TopManager.getDefault().currentClassLoader();
76
            loader = Thread.currentThread().getContextClassLoader();
73
            loader = Thread.currentThread().getContextClassLoader();
77
            System.out.println("NetBeans class loader: "+loader);
74
            System.out.println("NetBeans class loader: "+loader);
78
        }
75
        }
(-)xtest/src/org/netbeans/xtest/ide/Main.java (-11 / +10 lines)
Lines 115-122 Link Here
115
        // second - use Runtime and Processes Nodes (to be sure) ...
115
        // second - use Runtime and Processes Nodes (to be sure) ...
116
        
116
        
117
        // get runtime node
117
        // get runtime node
118
        Places places = TopManager.getDefault().getPlaces();
118
        Node runtime = org.netbeans.core.NbPlaces.getDefault().environment();
119
        Node runtime = places.nodes().environment();
120
119
121
        // find Processes node
120
        // find Processes node
122
        // bundle = org.netbeans.core.execution.Bundle.properties
121
        // bundle = org.netbeans.core.execution.Bundle.properties
Lines 222-227 Link Here
222
        
221
        
223
        // need to initialize org.openide.TopManager, not org.netbeans.core.Plain
222
        // need to initialize org.openide.TopManager, not org.netbeans.core.Plain
224
          System.getProperties().put (
223
          System.getProperties().put (
224
              // Note this is really the NbTopManager impl now:
225
            "org.openide.TopManager", // NOI18N
225
            "org.openide.TopManager", // NOI18N
226
            "org.netbeans.core.Main" // NOI18N
226
            "org.netbeans.core.Main" // NOI18N
227
          );
227
          );
Lines 282-288 Link Here
282
282
283
        
283
        
284
        // get the static ErrorManager instance
284
        // get the static ErrorManager instance
285
        errMan = TopManager.getDefault().getErrorManager();
285
        errMan = ErrorManager.getDefault();
286
        // and initialize it (if XTestErrorManage is used)
286
        // and initialize it (if XTestErrorManage is used)
287
        //errMan.log(ErrorManager.EXCEPTION,"Starting tests");
287
        //errMan.log(ErrorManager.EXCEPTION,"Starting tests");
288
            
288
            
Lines 293-299 Link Here
293
                    new QueueEmpty().waitEventQueueEmpty(2000);
293
                    new QueueEmpty().waitEventQueueEmpty(2000);
294
                }
294
                }
295
                catch (Exception ex) {
295
                catch (Exception ex) {
296
                    TopManager.getDefault().getErrorManager().notify(ErrorManager.EXCEPTION, ex);
296
                    errMan.notify(ErrorManager.EXCEPTION, ex);
297
                }
297
                }
298
            }
298
            }
299
        });
299
        });
Lines 341-348 Link Here
341
        if (System.getProperty(TEST_CLASS) == null)
341
        if (System.getProperty(TEST_CLASS) == null)
342
            return;                
342
            return;                
343
        
343
        
344
        // Yarda Tulach's line - is this good for anything ?
344
        org.netbeans.core.NbTopManager.get();
345
        Object jarda = org.openide.filesystems.Repository.getDefault ();
346
        
345
        
347
        if (System.getProperty(TEST_REDIRECT) != null && System.getProperty(TEST_REDIRECT).equals("true")) {
346
        if (System.getProperty(TEST_REDIRECT) != null && System.getProperty(TEST_REDIRECT).equals("true")) {
348
           OutputSettings os = (OutputSettings) Lookup.getDefault().lookup( OutputSettings.class );
347
           OutputSettings os = (OutputSettings) Lookup.getDefault().lookup( OutputSettings.class );
Lines 419-425 Link Here
419
                    }
418
                    }
420
                }
419
                }
421
                catch (Exception ex) {
420
                catch (Exception ex) {
422
                    TopManager.getDefault().getErrorManager().notify(ErrorManager.EXCEPTION, ex);
421
                    errMan.notify(ErrorManager.EXCEPTION, ex);
423
                }
422
                }
424
            }
423
            }
425
        });
424
        });
Lines 463-469 Link Here
463
                        System.out.println("Exception when terminating processes started from IDE");
462
                        System.out.println("Exception when terminating processes started from IDE");
464
                        e.printStackTrace();
463
                        e.printStackTrace();
465
                    }
464
                    }
466
                    TopManager.getDefault().exit();
465
                    LifecycleManager.getDefault().exit();
467
                }
466
                }
468
            });
467
            });
469
            // try to exit nicely first
468
            // try to exit nicely first
Lines 507-513 Link Here
507
    
506
    
508
    
507
    
509
    private static void mountFileSystems() {
508
    private static void mountFileSystems() {
510
        Repository repo = TopManager.getDefault().getRepository();
509
        Repository repo = Repository.getDefault();
511
        
510
        
512
        // unmount the currently mounted filesystems
511
        // unmount the currently mounted filesystems
513
        // (could be more sofisticated some day)
512
        // (could be more sofisticated some day)
Lines 535-548 Link Here
535
                }
534
                }
536
            }
535
            }
537
            catch (Exception ex) {
536
            catch (Exception ex) {
538
                TopManager.getDefault().getErrorManager().notify(ErrorManager.EXCEPTION, ex);
537
                ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ex);
539
            }
538
            }
540
        }
539
        }
541
    }
540
    }
542
    
541
    
543
    
542
    
544
    private static void setNodeProperties() {
543
    private static void setNodeProperties() {
545
        FileObject fo = TopManager.getDefault().getRepository().findResource(System.getProperty(TEST_CLASS) + ".java");
544
        FileObject fo = Repository.getDefault().findResource(System.getProperty(TEST_CLASS) + ".java");
546
        if (fo != null) {
545
        if (fo != null) {
547
            try {
546
            try {
548
                DataObject obj = DataObject.find(fo);
547
                DataObject obj = DataObject.find(fo);
(-)xtest/src/org/netbeans/xtest/ide/XTestErrorManager.java (-5 lines)
Lines 22-28 Link Here
22
22
23
import org.openide.ErrorManager;
23
import org.openide.ErrorManager;
24
import org.openide.ErrorManager.Annotation;
24
import org.openide.ErrorManager.Annotation;
25
import org.openide.TopManager;
26
import java.util.*;
25
import java.util.*;
27
import java.io.*;
26
import java.io.*;
28
import java.lang.ref.*;
27
import java.lang.ref.*;
Lines 125-134 Link Here
125
    }
124
    }
126
    
125
    
127
126
128
    
129
    private static boolean isTopManagerInitialized() {
130
        return (System.getProperty("org.openide.TopManager")!=null);
131
    }
132
    
127
    
133
    private PrintWriter ideLogWriter = new PrintWriter(System.err);
128
    private PrintWriter ideLogWriter = new PrintWriter(System.err);
134
        
129
        

Return to bug 19443