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 244740 Details for
Bug 438402
Occurrences are not marked for ThrowStatements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
fix
throw-statements.patch (text/plain), 2.50 KB, created by
Michael Rennie
on 2014-07-02 12:08:01 EDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2014-07-02 12:08:01 EDT
Size:
2.50 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/finder.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/finder.js >index 48b6148..06e2b33 100644 >--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/finder.js >+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/finder.js >@@ -189,6 +189,10 @@ > case Estraverse.Syntax.WithStatement: > this.checkId(node.object); > break; >+ case Estraverse.Syntax.ThrowStatement: { >+ this.checkId(node.argument); >+ break; >+ } > } > }, > >diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/javascript/occurrencesTests.js b/bundles/org.eclipse.orion.client.javascript/web/js-tests/javascript/occurrencesTests.js >index 93fd924..4ca4035 100644 >--- a/bundles/org.eclipse.orion.client.javascript/web/js-tests/javascript/occurrencesTests.js >+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/javascript/occurrencesTests.js >@@ -1983,5 +1983,52 @@ > }); > }); > >+ /** >+ * Tests throw statements >+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 >+ */ >+ it('test_throwStatement1', function() { >+ editorContext.text = "var a; throw a;"; >+ return occurrences.computeOccurrences(editorContext, setContext(4, 4)).then(function(results) { >+ try { >+ assertOccurrences(results, [{start:4, end:5}, {start:13, end:14}]); >+ } >+ finally { >+ tearDown(); >+ } >+ }); >+ }); >+ >+ /** >+ * Tests throw statements >+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 >+ */ >+ it('test_throwStatement2', function() { >+ editorContext.text = "var a; function f() { if(a) { throw a; }}"; >+ return occurrences.computeOccurrences(editorContext, setContext(25, 25)).then(function(results) { >+ try { >+ assertOccurrences(results, [{start:4, end:5}, {start:25, end:26}, {start:36, end:37}]); >+ } >+ finally { >+ tearDown(); >+ } >+ }); >+ }); >+ >+ /** >+ * Tests throw statements >+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438402 >+ */ >+ it('test_throwStatement3', function() { >+ editorContext.text = "var a; function f() { if(a) { throw a; }}"; >+ return occurrences.computeOccurrences(editorContext, setContext(36, 36)).then(function(results) { >+ try { >+ assertOccurrences(results, [{start:4, end:5}, {start:25, end:26}, {start:36, end:37}]); >+ } >+ finally { >+ tearDown(); >+ } >+ }); >+ }); > }); > }); >\ No newline at end of file
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
Actions:
View
|
Diff
Attachments on
bug 438402
: 244740