Index: build.xml
===================================================================
RCS file: /cvs/openide/build.xml,v
--- build.xml 14 Mar 2003 22:51:53 -0000 1.138
+++ build.xml 19 Mar 2003 14:49:53 -0000
@@ -104,26 +104,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -176,10 +160,6 @@
-
-
-
-
@@ -376,6 +356,7 @@
Index: src/org/openide/actions/SaveAction.java
===================================================================
RCS file: /cvs/openide/src/org/openide/actions/SaveAction.java,v
--- src/org/openide/actions/SaveAction.java 16 Oct 2002 06:07:25 -0000 1.26
+++ src/org/openide/actions/SaveAction.java 19 Mar 2003 14:49:54 -0000
@@ -19,7 +19,6 @@
import org.openide.ErrorManager;
import org.openide.util.HelpCtx;
import org.openide.util.actions.CookieAction;
-import org.openide.loaders.DataObject;
import org.openide.nodes.Node;
import org.openide.cookies.SaveCookie;
import org.openide.util.NbBundle;
@@ -73,6 +72,8 @@
* @return name that should be printed to the user.
*/
private String getSaveMessage(Node n) {
+ /* PENDING-JST: Do we really need this to get the message?
+ *
DataObject d = (DataObject)n.getCookie(DataObject.class);
if (d != null) {
Node n2 = d.getNodeDelegate();
@@ -80,6 +81,8 @@
return n2.getDisplayName();
}
}
+ */
+
return n.getDisplayName();
}
Index: src/org/openide/explorer/ExplorerActions.java
===================================================================
RCS file: /cvs/openide/src/org/openide/explorer/ExplorerActions.java,v
--- src/org/openide/explorer/ExplorerActions.java 25 Feb 2003 13:46:23 -0000 1.54
+++ src/org/openide/explorer/ExplorerActions.java 19 Mar 2003 14:49:54 -0000
@@ -38,8 +38,6 @@
import org.openide.filesystems.FileStateInvalidException;
import org.openide.filesystems.FileSystem;
import org.openide.filesystems.Repository;
-import org.openide.loaders.DataObject;
-import org.openide.loaders.DataShadow;
import org.openide.util.actions.ActionPerformer;
import org.openide.nodes.Node;
@@ -624,6 +622,8 @@
private boolean doConfirm(Node[] sel) {
String message, title;
if (sel.length == 1) {
+ /* PENDING-JST: What to do with these special cases!?
+ *
if (sel[0].getCookie(DataShadow.class) != null) {
title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteShadowTitle");
DataShadow obj = (DataShadow)sel[0].getCookie(DataShadow.class);
@@ -638,7 +638,9 @@
message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteFolder",
sel[0].getDisplayName());
title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteFolderTitle");
- } else {
+ } else
+ */
+ {
message = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObject",
sel[0].getDisplayName());
title = NbBundle.getMessage(ExplorerActions.class, "MSG_ConfirmDeleteObjectTitle");
@@ -652,7 +654,8 @@
NotifyDescriptor desc = new NotifyDescriptor.Confirmation(message, title, NotifyDescriptor.YES_NO_OPTION);
return NotifyDescriptor.YES_OPTION.equals(DialogDisplayer.getDefault().notify(desc));
}
- private String fullName(DataObject obj) {
+ /*
+ private String fullName(org.openide.loaders.DataObject obj) {
FileObject f = obj.getPrimaryFile();
if (f.isRoot()) {
try {
@@ -664,6 +667,7 @@
return f.toString();
}
}
+ */
private void doDestroy(final Node[] sel) {
try {
Index: src/org/openide/filesystems/AbstractFileSystem.java
===================================================================
RCS file: /cvs/openide/src/org/openide/filesystems/AbstractFileSystem.java,v
--- src/org/openide/filesystems/AbstractFileSystem.java 27 Feb 2003 23:40:44 -0000 1.53
+++ src/org/openide/filesystems/AbstractFileSystem.java 19 Mar 2003 14:49:54 -0000
@@ -191,8 +191,10 @@
} else {
if (SYSTEM_ACTIONS == null) {
try {
- Class c = Class.forName ("org.openide.filesystems.RefreshAction"); // NOI18N
- RefreshAction ra = (RefreshAction) SharedClassObject.findObject (c, true);
+ ClassLoader l = (ClassLoader)org.openide.util.Lookup.getDefault().lookup (ClassLoader.class);
+ if (l == null) l = getClass ().getClassLoader();
+ Class c = Class.forName ("org.openide.actions.FileSystemRefreshAction", true, l); // NOI18N
+ SystemAction ra = (SystemAction) SharedClassObject.findObject (c, true);
// initialize the SYSTEM_ACTIONS
SYSTEM_ACTIONS = new SystemAction[] { ra };
} catch (Exception ex) {
Index: src/org/openide/nodes/TMUtil.java
===================================================================
RCS file: /cvs/openide/src/org/openide/nodes/TMUtil.java,v
--- src/org/openide/nodes/TMUtil.java 16 Oct 2002 06:08:23 -0000 1.7
+++ src/org/openide/nodes/TMUtil.java 19 Mar 2003 14:49:54 -0000
@@ -224,11 +224,18 @@
static final class Help implements Runnable {
public void run () {
BeanNode node = (BeanNode)TALK.get ();
- HelpCtx h = org.openide.loaders.InstanceSupport.findHelp (
- (org.openide.cookies.InstanceCookie) node.getCookie (
- org.openide.cookies.InstanceCookie.class
- )
+ org.openide.cookies.InstanceCookie ic = (org.openide.cookies.InstanceCookie) node.getCookie (
+ org.openide.cookies.InstanceCookie.class
);
+ HelpCtx h = null;
+ try {
+ Object inst = ic.instanceCreate();
+ h = HelpCtx.findHelp (inst);
+ } catch (java.io.IOException ex) {
+ // ignore
+ } catch (ClassNotFoundException ex) {
+ // ignore
+ }
TALK.set (h);
}
}
Index: src/org/openide/text/CloneableEditor.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/CloneableEditor.java,v
--- src/org/openide/text/CloneableEditor.java 7 Mar 2003 12:26:18 -0000 1.58
+++ src/org/openide/text/CloneableEditor.java 19 Mar 2003 14:49:54 -0000
@@ -27,10 +27,8 @@
import javax.swing.text.*;
import org.openide.awt.UndoRedo;
-import org.openide.actions.FileSystemAction;
import org.openide.ErrorManager;
import org.openide.cookies.EditorCookie;
-import org.openide.loaders.*;
import org.openide.windows.*;
import org.openide.util.Task;
import org.openide.util.TaskListener;
@@ -102,7 +100,7 @@
* @return context help
*/
public HelpCtx getHelpCtx() {
- HelpCtx fromKit = InstanceSupport.findHelp (new InstanceSupport.Instance (support.kit ()));
+ HelpCtx fromKit = HelpCtx.findHelp (support.kit ());
if (fromKit != null)
return fromKit;
else
@@ -304,10 +302,20 @@
public SystemAction[] getSystemActions() {
SystemAction[] sa = super.getSystemActions ();
+
+ try {
+ ClassLoader l = (ClassLoader)org.openide.util.Lookup.getDefault().lookup (ClassLoader.class);
+ if (l == null) l = getClass ().getClassLoader();
+ Class c = Class.forName ("org.openide.actions.FileSystemAction", true, l); // NOI18N
+ SystemAction ra = (SystemAction) SystemAction.findObject (c, true);
+ // initialize the SYSTEM_ACTIONS
+
+ sa = SystemAction.linkActions (sa, new SystemAction[] { null, ra });
+ } catch (Exception ex) {
+ // ok, we no action like this I guess
+ }
- return SystemAction.linkActions (sa,
- new SystemAction[] { null, SystemAction.get(FileSystemAction.class) }
- );
+ return sa;
}
/** Transfer the focus to the editor pane.
@@ -445,7 +453,12 @@
int offset;
Object firstObject = in.readObject ();
+
+ /* Getting rid of backward compatibility - this style of serialization
+ was used in 3.3, so it is simpler to not support it anymore, especially
+ when we do not have access to EditorSupport and DataObject
+
if (firstObject instanceof DataObject) {
// backward compatibility
@@ -465,15 +478,19 @@
support = supp.del;
}
}
- } else {
+ } else */
+ {
// New deserialization that uses Env environment,
// and which could be null(!) see writeExternal.
if(firstObject instanceof CloneableOpenSupport.Env) {
CloneableOpenSupport.Env env = (CloneableOpenSupport.Env)firstObject;
CloneableOpenSupport os = env.findCloneableOpenSupport ();
+
+ /* PENDING-JST: What to do with EditorSupport? Maybe EditorSupport.getLookup (),lookup (CloneableEditorSupport.class)?
+ *
if (os instanceof EditorSupport) {
support = ((EditorSupport)os).del;
- } else {
+ } else */{
support = (CloneableEditorSupport)os;
}
}
Index: src/org/openide/text/CloneableEditorSupport.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v
--- src/org/openide/text/CloneableEditorSupport.java 4 Mar 2003 12:26:59 -0000 1.82
+++ src/org/openide/text/CloneableEditorSupport.java 19 Mar 2003 14:49:54 -0000
@@ -48,7 +48,6 @@
import org.openide.awt.StatusDisplayer;
import org.openide.cookies.EditorCookie;
import org.openide.filesystems.*;
-import org.openide.loaders.*;
import org.openide.windows.*;
import org.openide.util.Task;
import org.openide.util.TaskListener;
@@ -1059,11 +1058,11 @@
}
- /** Getter for data object associated with this
+ /** Getter for context associated with this
* data object.
*/
- DataObject getDataObjectHack () {
- return null;
+ org.openide.util.Lookup getDataObjectHack () {
+ return org.openide.util.Lookup.EMPTY;
}
Index: src/org/openide/text/DocumentLine.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/DocumentLine.java,v
--- src/org/openide/text/DocumentLine.java 13 Jun 2002 12:47:58 -0000 1.47
+++ src/org/openide/text/DocumentLine.java 19 Mar 2003 14:49:55 -0000
@@ -20,7 +20,6 @@
import javax.swing.SwingUtilities;
import org.openide.ErrorManager;
-import org.openide.loaders.DataObject;
import org.openide.util.WeakListener;
import org.openide.text.EnhancedChangeEvent;
@@ -64,10 +63,12 @@
static final long serialVersionUID =3213776466939427487L;
/** Constructor.
- * @param obj data object we belong to
+ * @param obj context we belong to
* @param pos position on the line
+ *
+ * PENDING-JST: Incompatible change of argument (maybe duplicated constructor to accept java.lang.Object as well?)
*/
- public DocumentLine (DataObject obj, PositionRef pos) {
+ public DocumentLine (org.openide.util.Lookup obj, PositionRef pos) {
super (obj);
this.pos = pos;
}
Index: src/org/openide/text/EditorSupportLineSet.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/EditorSupportLineSet.java,v
--- src/org/openide/text/EditorSupportLineSet.java 3 Dec 2002 14:12:06 -0000 1.31
+++ src/org/openide/text/EditorSupportLineSet.java 19 Mar 2003 14:49:55 -0000
@@ -19,7 +19,6 @@
import javax.swing.text.StyledDocument;
import javax.swing.text.Position;
-import org.openide.loaders.*;
import org.openide.util.WeakListener;
/** Line set for an EditorSupport.
@@ -52,6 +51,7 @@
PositionRef ref = new PositionRef(
support.getPositionManager (), offset, Position.Bias.Forward
);
+ // PENDING-JST: Support shall provide some kind of context
return new SupportLine (support.getDataObjectHack (), ref, support);
}
@@ -62,7 +62,7 @@
static final long serialVersionUID =7282223299866986051L;
/** Position reference to a place in document
*/
- public SupportLine (DataObject obj, PositionRef ref, CloneableEditorSupport support) {
+ public SupportLine (org.openide.util.Lookup obj, PositionRef ref, CloneableEditorSupport support) {
super (obj, ref);
}
@@ -155,7 +155,7 @@
PositionRef ref = new PositionRef (support.getPositionManager (), line, 0, Position.Bias.Forward);
// obj can be null, sorry...
- DataObject obj = support.getDataObjectHack ();
+ org.openide.util.Lookup obj = support.getDataObjectHack ();
return this.registerLine(new SupportLine(obj, ref, support));
}
Index: src/org/openide/text/Line.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/Line.java,v
--- src/org/openide/text/Line.java 3 Dec 2002 14:12:06 -0000 1.24
+++ src/org/openide/text/Line.java 19 Mar 2003 14:49:55 -0000
@@ -19,7 +19,6 @@
import java.util.Date;
import java.util.WeakHashMap;
-import org.openide.loaders.DataObject;
import org.openide.util.NbBundle;
/** Represents one line in a text document.
@@ -36,18 +35,28 @@
/** Property name of the line number */
public static final String PROP_LINE_NUMBER = "lineNumber"; // NOI18N
- /** DataObject that is parent of the line */
- private DataObject dataObject;
+ /** context of this line */
+ private org.openide.util.Lookup dataObject;
- /**
+ /*
* Create a new line object based on a given data object.
* This implementation is abstract, so the specific line number is not used here. Subclasses should somehow specify the position.
* @param obj the data object this line is a part of
- */
- public Line(DataObject obj) {
+ *
+ * PENDING-JST: Incompatible change - replaced with Object constructor
+ public Line(org.openide.loaders.DataObject obj) {
super();
dataObject = obj;
}
+ */
+ /**
+ * Create a new line object based on a given data object.
+ * This implementation is abstract, so the specific line number is not used here. Subclasses should somehow specify the position.
+ * @param context the context for this line
+ */
+ public Line(org.openide.util.Lookup obj) {
+ dataObject = obj;
+ }
/** Shows the line only if the editor is open.
* @see #show(int) show
@@ -74,22 +83,28 @@
* @return human presentable name that should identify the line
*/
public String getDisplayName () {
- if (getDataObject() == null)
+ // PENDING-JST: Do not know how to compute this one
+
+// if (getDataObject() == null)
return getClass().getName() + ":" + getLineNumber(); // NOI18N
+/*
return NbBundle.getMessage(Line.class, "FMT_LineDisplayName",
getDataObject ().getName (),
getDataObject ().getPrimaryFile ().getPath(),
new Integer (getLineNumber () + 1) );
+*/
}
/**
* Get the data object this line is a part of.
* @return data object. May be null.
- */
- public final DataObject getDataObject () {
+ *
+ * PENDING-JST: Incompatible change
+ public final org.openide.loaders.DataObject getDataObject () {
return dataObject;
}
+ */
/** Get the line number. The last condition in following should
Index: src/org/openide/text/PositionRef.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/PositionRef.java,v
--- src/org/openide/text/PositionRef.java 3 Dec 2002 14:12:07 -0000 1.48
+++ src/org/openide/text/PositionRef.java 19 Mar 2003 14:49:55 -0000
@@ -21,7 +21,6 @@
import javax.swing.text.StyledDocument;
import javax.swing.text.BadLocationException;
-import org.openide.loaders.DataObject;
import org.openide.util.RequestProcessor;
@@ -111,11 +110,15 @@
* @exception ClassCastException if the position is attached to CloneableEditorSupport
* that is not subclass of EditorSupport
* @deprecated Please use {@link #getCloneableEditorSupport} instead.
- */
+ *
+ *
+ * // PENDING-JST: Incompatible change
+ *
public EditorSupport getEditorSupport () {
return EditorSupport.extract (getCloneableEditorSupport ());
}
-
+ */
+
/** @return the bias of the position
*/
public Position.Bias getPositionBias() {
@@ -209,10 +212,14 @@
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException {
Object firstObject = in.readObject();
+ /* Get rid of backward compatibility
+
if (firstObject instanceof DataObject) {
DataObject obj = (DataObject)firstObject;
support = (CloneableEditorSupport) obj.getCookie(CloneableEditorSupport.class);
- } else {
+ } else */
+
+ {
// first object is environment
CloneableEditorSupport.Env env = (CloneableEditorSupport.Env)firstObject;
support = (CloneableEditorSupport)env.findCloneableOpenSupport ();
Index: src/org/openide/util/HelpCtx.java
===================================================================
RCS file: /cvs/openide/src/org/openide/util/HelpCtx.java,v
--- src/org/openide/util/HelpCtx.java 11 Mar 2003 19:28:16 -0000 1.33
+++ src/org/openide/util/HelpCtx.java 19 Mar 2003 14:49:55 -0000
@@ -164,7 +164,112 @@
}
if (err != null) err.log("nothing found");
return DEFAULT_HELP;
+
+ /* PENDING-JST: This is a code from InstanceSupport that I do not understand
+ * why it is there and not here:
+ *
+
+ // If a component, look for attached help.
+ if (JComponent.class.isAssignableFrom (clazz)) {
+ JComponent comp = (JComponent) instance.instanceCreate ();
+ if (comp != null) {
+ String hid = (String) comp.getClientProperty ("HelpID"); // NOI18N
+ if (hid != null)
+ return new HelpCtx (hid);
+ }
+ }
+
+ // [a.n] I have moved the code here as those components's BeanInfo do not contain helpID
+ // - it is faster
+ // Help on some standard components. Note that borders/layout managers do not really work here.
+ if (java.awt.Component.class.isAssignableFrom (clazz) || java.awt.MenuComponent.class.isAssignableFrom (clazz)) {
+ String name = clazz.getName ();
+ String[] pkgs = new String[] { "java.awt.", "javax.swing.", "javax.swing.border." }; // NOI18N
+ for (int i = 0; i < pkgs.length; i++) {
+ if (name.startsWith (pkgs[i]) && name.substring (pkgs[i].length ()).indexOf ('.') == -1)
+ return new HelpCtx (name);
+ }
+ }
+ */
+
}
+
+ /** Finds help context for a generic object. Does a lot of tricks
+ *
+ *
+ * @param instance to search help for
+ * @return the help for the object or null
if HelpCtx cannot be found
+ *
+ * PENDING-JST: mark as addition
+ */
+ public static HelpCtx findHelp (Object instance) {
+ if (instance instanceof java.awt.Component) {
+ return findHelp ((java.awt.Component)instance);
+ }
+
+
+// WDP: WizardDescriptor.Panel is handled bellow by reflection
+ if (
+ instance instanceof HelpCtx.Provider ||
+// WDP: instance instanceof WizardDescriptor.Panel ||
+ instance instanceof HelpCtx
+ ) {
+ HelpCtx test;
+ Object obj = instance;
+ if (obj instanceof HelpCtx.Provider)
+ test = ((HelpCtx.Provider)obj).getHelpCtx();
+// WDP: else if (obj instanceof WizardDescriptor.Panel)
+// WDP: test = ((WizardDescriptor.Panel) obj).getHelp ();
+ /*
+ else if (obj instanceof ManifestSection.FileSystemSection)
+ test = ((ManifestSection.FileSystemSection) obj).getHelpCtx ();
+ */
+ else if (obj instanceof HelpCtx)
+ test = (HelpCtx) obj;
+ else
+ test = null; // obj==null or bad cookie
+ if (test != null && ! test.equals (HelpCtx.DEFAULT_HELP))
+ return test;
+ }
+
+
+
+
+ try {
+ // Look for Bean help. Also works on components not found above.
+ Class c = instance instanceof Class ? (Class)instance : instance.getClass ();
+ java.beans.BeanDescriptor desc = Utilities.getBeanInfo (c).getBeanDescriptor ();
+ if (desc != null) {
+ // [PENDING] ideally would also look for a help set and add that to the system
+ // set if found, but there is no API for this at the moment
+ String val = (String) desc.getValue ("helpID"); // NOI18N
+ if (val != null) return new HelpCtx (val);
+ }
+ } catch (Exception e) {
+ ErrorManager.getDefault().notify(e);
+ return null;
+ }
+
+ //
+ // In order to handle WizardDescriptor.Panel.getHelp we use
+ // reflection
+ //
+
+ try {
+ java.lang.reflect.Method m = instance.getClass ().getMethod("getHelp", new Class[0] );
+ if (m.getReturnType() == HelpCtx.class) {
+ return (HelpCtx)m.invoke (instance, new Object[0]);
+ }
+ } catch (NoSuchMethodException ex) {
+ // ok, go on
+ } catch (Exception e) {
+ ErrorManager.getDefault().notify(e);
+ }
+
+ // all failed
+ return null;
+ }
+
/**
* An object implementing this interface is willing to answer
Index: src/org/openide/util/WeakListener.java
===================================================================
RCS file: /cvs/openide/src/org/openide/util/WeakListener.java,v
--- src/org/openide/util/WeakListener.java 21 Dec 2002 08:40:33 -0000 1.56
+++ src/org/openide/util/WeakListener.java 19 Mar 2003 14:49:55 -0000
@@ -25,8 +25,6 @@
import org.openide.ErrorManager;
import org.openide.filesystems.*;
-import org.openide.loaders.OperationListener;
-import org.openide.loaders.OperationEvent;
import org.openide.nodes.*;
/**
@@ -431,12 +429,16 @@
* @param source the source that the listener should detach from when
* listener l
is freed, can be null
* @return a OperationListener delegating to l
.
- */
- public static OperationListener operation (OperationListener l, Object source) {
+ *
+ * //PENDING-JST: Replaced with org.openide.loaders.createWeakOperationListener
+ *
+ *
+ public static org.openide.loaders.OperationListener operation (org.openide.loaders.OperationListener l, Object source) {
WeakListener.Operation wl = new WeakListener.Operation (l);
wl.setSource (source);
return wl;
}
+ */
/** A generic WeakListener factory.
* Creates a weak implementation of a listener of type lType
.
@@ -855,82 +857,6 @@
return "removeFocusListener"; // NOI18N
}
- }
-
- /** Weak property change listener
- */
- final static class Operation extends WeakListener
- implements OperationListener {
- /** Constructor.
- * @param l listener to delegate to
- */
- public Operation (OperationListener l) {
- super (OperationListener.class, l);
- }
-
-
- /** Method name to use for removing the listener.
- * @return name of method of the source object that should be used
- * to remove the listener from listening on source of events
- */
- protected String removeMethodName () {
- return "removeOperationListener"; // NOI18N
- }
-
- /** Object has been recognized by
- * {@link DataLoaderPool#findDataObject}.
- * This allows listeners
- * to attach additional cookies, etc.
- *
- * @param ev event describing the action
- */
- public void operationPostCreate(OperationEvent ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationPostCreate (ev);
- }
- /** Object has been successfully copied.
- * @param ev event describing the action
- */
- public void operationCopy(OperationEvent.Copy ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationCopy (ev);
- }
- /** Object has been successfully moved.
- * @param ev event describing the action
- */
- public void operationMove(OperationEvent.Move ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationMove (ev);
- }
- /** Object has been successfully deleted.
- * @param ev event describing the action
- */
- public void operationDelete(OperationEvent ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationDelete (ev);
- }
- /** Object has been successfully renamed.
- * @param ev event describing the action
- */
- public void operationRename(OperationEvent.Rename ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationRename (ev);
- }
-
- /** A shadow of a data object has been created.
- * @param ev event describing the action
- */
- public void operationCreateShadow (OperationEvent.Copy ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationCreateShadow (ev);
- }
- /** New instance of an object has been created.
- * @param ev event describing the action
- */
- public void operationCreateFromTemplate(OperationEvent.Copy ev) {
- OperationListener l = (OperationListener)super.get (ev);
- if (l != null) l.operationCreateFromTemplate (ev);
- }
}
Index: src/org/openide/windows/CloneableOpenSupport.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/CloneableOpenSupport.java,v
--- src/org/openide/windows/CloneableOpenSupport.java 27 Feb 2003 23:41:14 -0000 1.18
+++ src/org/openide/windows/CloneableOpenSupport.java 19 Mar 2003 14:49:55 -0000
@@ -207,11 +207,11 @@
/** that is fired when the objects wants to mark itself as
* invalid, so all components should be closed.
*/
- public static final String PROP_VALID = org.openide.loaders.DataObject.PROP_VALID;
+ public static final String PROP_VALID = "valid"; // NOI18N
/** that is fired when the objects wants to mark itself modified
* or not modified.
*/
- public static final String PROP_MODIFIED = org.openide.loaders.DataObject.PROP_MODIFIED;
+ public static final String PROP_MODIFIED = "modified"; // NOI18N
/** Adds property listener.
*/
Index: src/org/openide/windows/CloneableTopComponent.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/CloneableTopComponent.java,v
--- src/org/openide/windows/CloneableTopComponent.java 4 Mar 2003 09:38:33 -0000 1.25
+++ src/org/openide/windows/CloneableTopComponent.java 19 Mar 2003 14:49:55 -0000
@@ -16,7 +16,6 @@
import java.io.IOException;
import java.util.*;
-import org.openide.loaders.DataObject;
import org.openide.util.io.NbMarshalledObject;
import org.openide.util.NbBundle;
@@ -44,11 +43,15 @@
/** Create a cloneable top component associated with a data object.
* @param obj the data object
* @see TopComponent#TopComponent(DataObject)
- */
- public CloneableTopComponent (DataObject obj) {
+ *
+ *
+ * PENDING-JST: Incompatible change
+ *
+ public CloneableTopComponent (org.openide.loaders.DataObject obj) {
super (obj);
}
-
+ */
+
/** Clone the top component and register the clone.
* @return the new component
*/
Index: src/org/openide/windows/DefaultTopComponentLookup.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/DefaultTopComponentLookup.java,v
--- src/org/openide/windows/DefaultTopComponentLookup.java 27 Feb 2003 23:41:15 -0000 1.10
+++ src/org/openide/windows/DefaultTopComponentLookup.java 19 Mar 2003 14:49:55 -0000
@@ -17,7 +17,6 @@
import java.util.*;
import org.openide.actions.*;
-import org.openide.loaders.*;
import org.openide.nodes.*;
import org.openide.util.Lookup;
import org.openide.util.LookupListener;
Index: src/org/openide/windows/TopComponent.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/TopComponent.java,v
--- src/org/openide/windows/TopComponent.java 18 Mar 2003 18:15:01 -0000 1.96
+++ src/org/openide/windows/TopComponent.java 19 Mar 2003 14:49:55 -0000
@@ -42,7 +42,6 @@
import org.openide.ErrorManager;
import org.openide.awt.UndoRedo;
-import org.openide.loaders.*;
import org.openide.actions.*;
import org.openide.util.actions.SystemAction;
import org.openide.nodes.*;
@@ -149,8 +148,10 @@
* installing NodeName inner class and attaching it to the node delegate.
*
* @param obj the data object
- */
- public TopComponent (DataObject obj) {
+ *
+ *
+ * // PENDING-JST: Incompatible change
+ public TopComponent (org.openide.loaders.DataObject obj) {
this ();
Node n = obj.getNodeDelegate ();
@@ -159,6 +160,7 @@
getAccessibleContext().setAccessibleDescription(n.getDisplayName());
}
+ */
/** Getter for class that allows obtaining of information about components.
* It allows to find out which component is selected, which nodes are
@@ -620,16 +622,23 @@
serialVersion = 0;
closeOperation = ((Integer)firstObject).intValue();
- DataObject obj = (DataObject)in.readObject();
+
+
+// BCR: this is backward compatibility read and is likely not needed
+// BCR: anymore. So let's just ignore the read of the data object
+// BCR: DataObject obj = (DataObject)in.readObject();
+ in.readObject ();
super.setName((String)in.readObject());
setToolTipText((String)in.readObject());
// initialize the connection to a data object
+/* BCR: Remove this as we ignore the DataObject
if (obj != null) {
nodeName = new NodeName (this);
nodeName.attach (obj.getNodeDelegate ());
}
+*/
} else {
// new serialization
serialVersion = ((Short)firstObject).shortValue ();