1.1 --- a/corba/test/build_qa-functional.xml Thu Oct 17 13:56:01 2002 +0000
1.2 +++ b/corba/test/build_qa-functional.xml Thu Oct 17 15:11:48 2002 +0000
1.3 @@ -59,6 +59,7 @@
1.4 <pathelement location="${netbeans.home}/modules/properties.jar"/>
1.5 <pathelement location="${netbeans.home}/modules/corba.jar"/>
1.6 <pathelement location="${netbeans.home}/modules/java.jar"/>
1.7 + <pathelement location="${netbeans.home}/modules/autoload/java-src-model.jar"/>
1.8 </path>
1.9 </target>
1.10
2.1 --- a/corba/test/qa-functional/src/test/app/AppGenerator.java Thu Oct 17 13:56:01 2002 +0000
2.2 +++ b/corba/test/qa-functional/src/test/app/AppGenerator.java Thu Oct 17 15:11:48 2002 +0000
2.3 @@ -20,7 +20,6 @@
2.4 import org.openide.nodes.Node;
2.5 import javax.swing.text.StyledDocument;
2.6 import org.netbeans.modules.corba.settings.ORBSettingsBundle;
2.7 -import org.openide.TopManager;
2.8 import java.util.StringTokenizer;
2.9 import org.openide.loaders.DataFolder;
2.10 import org.netbeans.modules.corba.IDLDataObject;
2.11 @@ -352,9 +351,12 @@
2.12 }
2.13
2.14 public static DataObject getTemplateFromTokenizer(StringTokenizer st) {
2.15 - if (! st.hasMoreTokens())
2.16 + return null;
2.17 + // !!! do it - always fail
2.18 +/* if (! st.hasMoreTokens())
2.19 return null;
2.20 - DataObject dao = TopManager.getDefault().getPlaces().folders().templates();
2.21 + FileSystem fs = Repository.getDefault().getDefaultFileSystem();
2.22 + DataObject dao = .templates();
2.23 while (st.hasMoreTokens()) {
2.24 String str = st.nextToken();
2.25 DataObject[] daos = ((DataFolder) dao).getChildren();
2.26 @@ -368,7 +370,7 @@
2.27 if (dao == null)
2.28 return null;
2.29 }
2.30 - return dao;
2.31 + return dao;*/
2.32 }
2.33
2.34 public void doGenerateAndCompile() {
3.1 --- a/corba/test/qa-functional/src/test/irnodes/Main.java Thu Oct 17 13:56:01 2002 +0000
3.2 +++ b/corba/test/qa-functional/src/test/irnodes/Main.java Thu Oct 17 15:11:48 2002 +0000
3.3 @@ -33,7 +33,6 @@
3.4 import org.netbeans.jemmy.JemmyProperties;
3.5 import org.netbeans.jemmy.Timeouts;
3.6 import org.netbeans.modules.corba.browser.ir.IRRootNode;
3.7 -import org.openide.TopManager;
3.8 import org.openide.nodes.Node;
3.9 import org.openide.actions.PropertiesAction;
3.10 import org.openide.util.actions.SystemAction;
4.1 --- a/corba/test/qa-functional/src/test/overall/Helper.java Thu Oct 17 13:56:01 2002 +0000
4.2 +++ b/corba/test/qa-functional/src/test/overall/Helper.java Thu Oct 17 15:11:48 2002 +0000
4.3 @@ -16,8 +16,8 @@
4.4 import java.io.*;
4.5 import java.awt.datatransfer.*;
4.6
4.7 -import org.openide.TopManager;
4.8 import org.openide.nodes.*;
4.9 +import org.openide.util.Lookup;
4.10 import org.openide.util.actions.*;
4.11 import org.openide.util.datatransfer.*;
4.12
4.13 @@ -79,7 +79,7 @@
4.14 * @throws UnsupportedFlavorException
4.15 */
4.16 public static void printClipboardAsString (PrintStream out) throws IOException, UnsupportedFlavorException {
4.17 - ExClipboard clip = TopManager.getDefault ().getClipboard ();
4.18 + ExClipboard clip = (ExClipboard) Lookup.getDefault().lookup(ExClipboard.class);
4.19 Transferable str = (Transferable) clip.getContents (null);
4.20 out.println (str.getTransferData (DataFlavor.stringFlavor).toString ());
4.21 }
5.1 --- a/corba/test/qa-functional/src/test/overall/Main.java Thu Oct 17 13:56:01 2002 +0000
5.2 +++ b/corba/test/qa-functional/src/test/overall/Main.java Thu Oct 17 15:11:48 2002 +0000
5.3 @@ -14,7 +14,6 @@
5.4 package test.overall;
5.5
5.6 import java.io.File;
5.7 -import org.openide.TopManager;
5.8 import org.openide.nodes.Node;
5.9 import org.netbeans.modules.corba.browser.ns.ContextNode;
5.10 import org.netbeans.modules.corba.browser.ir.IRRootNode;
5.11 @@ -57,12 +56,11 @@
5.12 out.println();
5.13
5.14 /* Get CORBA Naming Service and CORBA Interface Repository node */
5.15 - Node n, rn = TopManager.getDefault().getPlaces().nodes().environment();
5.16 - n = Helper.waitSubNode(rn, "CORBA Naming Service");
5.17 + Node n = ContextNode.getDefault ();
5.18 assertNotNull ("CORBA Naming Service node does not exists!", n);
5.19 //ContextNode nsNode = (ContextNode) Helper.getOriginalNode (n);
5.20 ContextNode nsNode = ContextNode.getDefault();
5.21 - n = Helper.waitSubNode(rn, "CORBA Interface Repository");
5.22 + n = IRRootNode.getDefault();
5.23 assertNotNull ("CORBA Interface Repository node does not exists!", n);
5.24 //IRRootNode irNode = (IRRootNode) Helper.getOriginalNode (n);
5.25 IRRootNode irNode = IRRootNode.getDefault();
6.1 --- a/corba/test/qa-functional/src/test/overall/SystemOptionTest.java Thu Oct 17 13:56:01 2002 +0000
6.2 +++ b/corba/test/qa-functional/src/test/overall/SystemOptionTest.java Thu Oct 17 15:11:48 2002 +0000
6.3 @@ -72,7 +72,7 @@
6.4
6.5 try {
6.6 // get class
6.7 - Class clazz = org.openide.TopManager.getDefault().systemClassLoader().loadClass(className);
6.8 + Class clazz = ClassLoader.getSystemClassLoader().loadClass(className);
6.9 println(" className = " + clazz.getName());
6.10
6.11 // get option
7.1 --- a/corba/test/qa-functional/src/test/parser/Main.java Thu Oct 17 13:56:01 2002 +0000
7.2 +++ b/corba/test/qa-functional/src/test/parser/Main.java Thu Oct 17 15:11:48 2002 +0000
7.3 @@ -15,7 +15,6 @@
7.4
7.5 import java.io.PrintStream;
7.6 import org.netbeans.junit.NbTestCase;
7.7 -import org.openide.TopManager;
7.8 import org.openide.filesystems.FileObject;
7.9 import org.netbeans.modules.corba.IDLDataObject;
7.10 import org.netbeans.modules.corba.settings.CORBASupportSettings;
8.1 --- a/corba/test/qa-functional/src/test/poasearch/Main.java Thu Oct 17 13:56:01 2002 +0000
8.2 +++ b/corba/test/qa-functional/src/test/poasearch/Main.java Thu Oct 17 15:11:48 2002 +0000
8.3 @@ -32,9 +32,9 @@
8.4 import org.netbeans.junit.AssertionFailedErrorException;
8.5 import org.netbeans.modules.corba.settings.CORBASupportSettings;
8.6 import org.netbeans.modules.corba.settings.ORBSettingsBundle;
8.7 -import org.openide.TopManager;
8.8 import org.openide.filesystems.FileSystem;
8.9 import org.openide.filesystems.LocalFileSystem;
8.10 +import org.openide.filesystems.Repository;
8.11 import util.Environment;
8.12 import util.Helper;
8.13
8.14 @@ -87,11 +87,11 @@
8.15 try {
8.16 String name = System.getProperty("work.dir") + "/tests/qa-functional/src/data/poasearch";
8.17 System.out.println (name);
8.18 - FileSystem fs = TopManager.getDefault().getRepository().findFileSystem(name);
8.19 + FileSystem fs = Repository.getDefault ().findFileSystem(name);
8.20 if (fs == null) {
8.21 LocalFileSystem lfs = new LocalFileSystem();
8.22 lfs.setRootDirectory(new File(name));
8.23 - TopManager.getDefault().getRepository().addFileSystem(lfs);
8.24 + Repository.getDefault ().addFileSystem(lfs);
8.25 fsroot = lfs.getDisplayName ();
8.26 } else
8.27 fsroot = fs.getDisplayName ();
9.1 --- a/corba/test/qa-functional/src/test/synchro/Main.java Thu Oct 17 13:56:01 2002 +0000
9.2 +++ b/corba/test/qa-functional/src/test/synchro/Main.java Thu Oct 17 15:11:48 2002 +0000
9.3 @@ -17,12 +17,18 @@
9.4 import javax.swing.JDialog;
9.5 import org.netbeans.jemmy.operators.JDialogOperator;
9.6 import org.netbeans.jemmy.operators.JButtonOperator;
9.7 -import org.openide.src.*;
9.8 -import org.openide.cookies.SourceCookie;
9.9 import java.util.Comparator;
9.10 import java.util.Arrays;
9.11 import org.netbeans.junit.AssertionFailedErrorException;
9.12 import org.netbeans.junit.NbTestCase;
9.13 +import org.openide.cookies.SourceCookie;
9.14 +import org.openide.src.ClassElement;
9.15 +import org.openide.src.ConstructorElement;
9.16 +import org.openide.src.FieldElement;
9.17 +import org.openide.src.Identifier;
9.18 +import org.openide.src.InitializerElement;
9.19 +import org.openide.src.MethodElement;
9.20 +import org.openide.src.SourceElement;
9.21 import util.Environment;
9.22 import util.Helper;
9.23
10.1 --- a/corba/test/qa-functional/src/util/Environment.java Thu Oct 17 13:56:01 2002 +0000
10.2 +++ b/corba/test/qa-functional/src/util/Environment.java Thu Oct 17 15:11:48 2002 +0000
10.3 @@ -17,7 +17,6 @@
10.4 import java.util.Enumeration;
10.5 import org.netbeans.modules.corba.settings.CORBASupportSettings;
10.6 import org.netbeans.modules.corba.settings.ORBSettingsBundle;
10.7 -import org.openide.TopManager;
10.8 import org.openide.execution.NbProcessDescriptor;
10.9 import org.openide.filesystems.FileObject;
10.10 import org.openide.filesystems.FileSystem;
10.11 @@ -178,11 +177,11 @@
10.12
10.13 public static String mountDir(String name) {
10.14 try {
10.15 - if (TopManager.getDefault().getRepository().findFileSystem(name) != null)
10.16 + if (Repository.getDefault ().findFileSystem(name) != null)
10.17 return null;
10.18 LocalFileSystem lfs = new LocalFileSystem();
10.19 lfs.setRootDirectory(new File(name));
10.20 - TopManager.getDefault().getRepository().addFileSystem(lfs);
10.21 + Repository.getDefault ().addFileSystem(lfs);
10.22 return lfs.getDisplayName ();
10.23 } catch (Exception e) {
10.24 return null;
10.25 @@ -191,11 +190,11 @@
10.26
10.27 public static void mountJar(String name) {
10.28 try {
10.29 - if (TopManager.getDefault().getRepository().findFileSystem(name) != null)
10.30 + if (Repository.getDefault ().findFileSystem(name) != null)
10.31 return;
10.32 JarFileSystem jfs = new JarFileSystem();
10.33 jfs.setJarFile(new File(name));
10.34 - TopManager.getDefault().getRepository().addFileSystem(jfs);
10.35 + Repository.getDefault ().addFileSystem(jfs);
10.36 } catch (Exception e) {
10.37 }
10.38 }
10.39 @@ -213,11 +212,11 @@
10.40
10.41 public static void unmountDir(String name) {
10.42 name = removeEndingSeparator (name);
10.43 - Enumeration e = TopManager.getDefault().getRepository().getFileSystems();
10.44 + Enumeration e = Repository.getDefault ().getFileSystems();
10.45 while (e.hasMoreElements()) {
10.46 FileSystem fs = (FileSystem) e.nextElement();
10.47 if (compareFileSystemNames (fs.getSystemName(), name))
10.48 - TopManager.getDefault().getRepository().removeFileSystem (fs);
10.49 + Repository.getDefault ().removeFileSystem (fs);
10.50 }
10.51 }
10.52
10.53 @@ -227,13 +226,13 @@
10.54 } catch (Exception e) {
10.55 return;
10.56 }
10.57 - Enumeration e = TopManager.getDefault().getRepository().getFileSystems();
10.58 + Enumeration e = Repository.getDefault ().getFileSystems();
10.59 while (e.hasMoreElements()) {
10.60 FileSystem fs = (FileSystem) e.nextElement();
10.61 if (fs instanceof JarFileSystem) {
10.62 JarFileSystem jfs = (JarFileSystem) fs;
10.63 if (compareFileSystemNames (jfs.getJarFile().getAbsolutePath(), name))
10.64 - TopManager.getDefault().getRepository().removeFileSystem (jfs);
10.65 + Repository.getDefault ().removeFileSystem (jfs);
10.66 }
10.67 }
10.68 }
11.1 --- a/corba/test/qa-functional/src/util/Helper.java Thu Oct 17 13:56:01 2002 +0000
11.2 +++ b/corba/test/qa-functional/src/util/Helper.java Thu Oct 17 15:11:48 2002 +0000
11.3 @@ -20,9 +20,9 @@
11.4 import java.lang.reflect.InvocationTargetException;
11.5 import java.lang.reflect.Method;
11.6 import java.util.ArrayList;
11.7 -import org.openide.TopManager;
11.8 import org.openide.nodes.FilterNode;
11.9 import org.openide.nodes.Node;
11.10 +import org.openide.util.Lookup;
11.11 import org.openide.util.datatransfer.ExClipboard;
11.12
11.13 public class Helper {
11.14 @@ -50,7 +50,7 @@
11.15
11.16 public static String getStringFromClipboard() {
11.17 try {
11.18 - ExClipboard clip = TopManager.getDefault().getClipboard();
11.19 + ExClipboard clip = (ExClipboard) Lookup.getDefault().lookup(ExClipboard.class);
11.20 Transferable str = (Transferable) clip.getContents(null);
11.21 Object o = str.getTransferData(DataFlavor.stringFlavor);
11.22 return o.toString ();
12.1 --- a/corba/test/qa-functional/src/util/StatusBarTracer.java Thu Oct 17 13:56:01 2002 +0000
12.2 +++ b/corba/test/qa-functional/src/util/StatusBarTracer.java Thu Oct 17 15:11:48 2002 +0000
12.3 @@ -13,13 +13,13 @@
12.4
12.5 package util;
12.6
12.7 -import java.beans.PropertyChangeEvent;
12.8 -import java.beans.PropertyChangeListener;
12.9 import java.util.ArrayList;
12.10 +import javax.swing.event.ChangeEvent;
12.11 +import javax.swing.event.ChangeListener;
12.12 import junit.framework.AssertionFailedError;
12.13 -import org.openide.TopManager;
12.14 +import org.openide.awt.StatusDisplayer;
12.15
12.16 -public class StatusBarTracer implements PropertyChangeListener {
12.17 +public class StatusBarTracer implements ChangeListener {
12.18
12.19 ArrayList array;
12.20
12.21 @@ -28,18 +28,16 @@
12.22 }
12.23
12.24 public void start () {
12.25 - TopManager.getDefault().addPropertyChangeListener(this);
12.26 + StatusDisplayer.getDefault().addChangeListener(this);
12.27 }
12.28
12.29 public void stop () {
12.30 - TopManager.getDefault().removePropertyChangeListener(this);
12.31 + StatusDisplayer.getDefault().removeChangeListener(this);
12.32 }
12.33
12.34 - public void propertyChange(PropertyChangeEvent evt) {
12.35 - if ("statusText".equals (evt.getPropertyName())) {
12.36 - synchronized (this) {
12.37 - array.add ((evt.getNewValue() != null) ? evt.getNewValue().toString () : "<NULL>");
12.38 - }
12.39 + public void stateChanged(ChangeEvent evt) {
12.40 + synchronized (this) {
12.41 + array.add (StatusDisplayer.getDefault ().getStatusText ());
12.42 }
12.43 }
12.44