Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 19443 | Differences between
and this patch

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