Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 110587 Details for
Bug 244839
Exception when opening JavaScript file from outside of workspace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix the issue
Exception_opening_external_HTML_files.txt (text/plain), 4.00 KB, created by
Eugene Ostroukhov
on 2008-08-21 12:12:10 EDT
(
hide
)
Description:
Patch to fix the issue
Filename:
MIME Type:
Creator:
Eugene Ostroukhov
Created:
2008-08-21 12:12:10 EDT
Size:
4.00 KB
patch
obsolete
>### 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) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 244839
: 110587