### Eclipse Workspace Patch 1.0 #P org.eclipse.wst.jsdt.core Index: src/org/eclipse/wst/jsdt/internal/core/DocumentContextFragmentRoot.java =================================================================== RCS file: /home/product/myeclipse-oss/cvsroot/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/DocumentContextFragmentRoot.java,v retrieving revision 1.1 diff -u -r1.1 DocumentContextFragmentRoot.java --- src/org/eclipse/wst/jsdt/internal/core/DocumentContextFragmentRoot.java 21 Jul 2008 16:13:03 -0000 1.1 +++ src/org/eclipse/wst/jsdt/internal/core/DocumentContextFragmentRoot.java 25 Jul 2008 14:29:58 -0000 @@ -430,6 +430,11 @@ } public IPath resolveChildPath(String childPathString) { + // Genuitec Begin Fix 6149: Exception opening external HTML file + if (getResource() == null) { + return null; + } + // Genuitec End Fix 6149: Exception opening external HTML file /* relative paths: * ./testfile.js are relative to file scope * absolute paths: /scripts/file.js are relative to absolutePath, and must be made relative to this resource #P org.eclipse.wst.jsdt.web.ui Index: src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterForJs.java =================================================================== RCS file: /home/product/myeclipse-oss/cvsroot/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterForJs.java,v retrieving revision 1.1 diff -u -r1.1 JFaceNodeAdapterForJs.java --- src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterForJs.java 21 Jul 2008 15:50:51 -0000 1.1 +++ src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterForJs.java 25 Jul 2008 14:30:00 -0000 @@ -216,6 +216,11 @@ startOffset = ((NodeImpl) node).getStartOffset(); endOffset = ((NodeImpl) node).getEndOffset(); IJavaScriptUnit unit = getLazyCu(node); + // Genuitec Begin Fix 6149: Exception opening external HTML file + if (unit == null) { + return new Object[0]; + } + // Genuitec End Fix 6149: Exception opening external HTML file try { if(ensureConsistant) unit.makeConsistent(getProgressMonitor()); } catch (JavaScriptModelException ex1) { @@ -300,12 +305,16 @@ private IJavaScriptUnit getLazyCu(Node node) { if(lazyCu==null) { lazyCu = getTranslation(node).getCompilationUnit(); - try { - lazyCu.makeConsistent( new NullProgressMonitor() ); - } catch (JavaScriptModelException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + // Genuitec Begin Fix 6149: Exception opening external HTML file + if (lazyCu != null) { + try { + lazyCu.makeConsistent(new NullProgressMonitor()); + } catch (JavaScriptModelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + // Genuitec End Fix 6149: Exception opening external HTML file } return lazyCu; } #P org.eclipse.wst.jsdt.web.core Index: src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java =================================================================== RCS file: /home/product/myeclipse-oss/cvsroot/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java,v retrieving revision 1.2 diff -u -r1.2 JsTranslation.java --- src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java 24 Jul 2008 18:00:30 -0000 1.2 +++ src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java 25 Jul 2008 14:30:02 -0000 @@ -254,6 +254,11 @@ * @see org.eclipse.wst.jsdt.web.core.internal.java.IJsTranslation#getCompilationUnit() */ public IJavaScriptUnit getCompilationUnit() { + // Genuitec Begin Fix 6149: Exception opening external HTML file + if (!getJavaProject().exists()) { + return null; + } + // Genuitec End Fix 6149: Exception opening external HTML file synchronized (fLock) { try { if (fCompilationUnit == null) {