diff --git a/html.editor.lib/nbproject/project.xml b/html.editor.lib/nbproject/project.xml --- a/html.editor.lib/nbproject/project.xml +++ b/html.editor.lib/nbproject/project.xml @@ -111,14 +111,6 @@ - org.openide.loaders - - - - 7.17 - - - org.openide.modules diff --git a/html.editor.lib/src/org/netbeans/editor/ext/html/parser/api/HtmlSource.java b/html.editor.lib/src/org/netbeans/editor/ext/html/parser/api/HtmlSource.java --- a/html.editor.lib/src/org/netbeans/editor/ext/html/parser/api/HtmlSource.java +++ b/html.editor.lib/src/org/netbeans/editor/ext/html/parser/api/HtmlSource.java @@ -47,7 +47,6 @@ import org.netbeans.modules.parsing.api.Snapshot; import org.openide.cookies.EditorCookie; import org.openide.filesystems.FileObject; -import org.openide.loaders.DataObject; import org.openide.util.Exceptions; /** @@ -103,9 +102,7 @@ private void loadContentFromFileObject() { try { - DataObject dobj = DataObject.find(sourceFileObject); - if (dobj != null) { - EditorCookie cake = dobj.getCookie(EditorCookie.class); + EditorCookie cake = sourceFileObject.getLookup().lookup(EditorCookie.class); final Document doc = cake.openDocument(); doc.render(new Runnable() { @Override @@ -117,7 +114,6 @@ } } }); - } } catch (IOException ex) { Exceptions.printStackTrace(ex); }