Line.getDataObject() is urgently deprecated and should not be used in BLD200308260100
authorjglick@netbeans.org
Mon, 25 Aug 2003 19:17:53 +0000
changeset 3517a62c34bd7698
parent 3516 d72a46f6905a
child 3518 ebe2f6d18721
Line.getDataObject() is urgently deprecated and should not be used in
dev code (will soon begin not compiling, and throwing errors if
compiled earlier).
tasklist.html/src/org/netbeans/modules/tasklist/html/RewriteAction.java
     1.1 --- a/tasklist.html/src/org/netbeans/modules/tasklist/html/RewriteAction.java	Mon Aug 25 14:20:00 2003 +0000
     1.2 +++ b/tasklist.html/src/org/netbeans/modules/tasklist/html/RewriteAction.java	Mon Aug 25 19:17:53 2003 +0000
     1.3 @@ -25,6 +25,7 @@
     1.4  import org.openide.DialogDisplayer;
     1.5  import org.openide.NotifyDescriptor;
     1.6  import org.openide.nodes.Node;
     1.7 +import org.openide.text.DataEditorSupport;
     1.8  import org.openide.util.HelpCtx;
     1.9  import org.openide.util.NbBundle;
    1.10  import org.openide.util.actions.NodeAction;
    1.11 @@ -97,12 +98,12 @@
    1.12          DataObject dobj;
    1.13          if (item != null) {
    1.14              Line l = item.getLine();
    1.15 -            dobj = l.getDataObject();
    1.16 +            dobj = DataEditorSupport.findDataObject(l);
    1.17          } else {
    1.18              dobj = (DataObject)node[0].getCookie(DataObject.class);
    1.19 -            if (dobj == null) {
    1.20 -                return;
    1.21 -            }
    1.22 +        }
    1.23 +        if (dobj == null) {
    1.24 +            return;
    1.25          }
    1.26          Document doc = TLUtils.getDocument(dobj);
    1.27          if (doc == null) {