Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319763 - [explorer] Expanding a JS file in a Library in the Project explorer results in a console error
Summary: [explorer] Expanding a JS file in a Library in the Project explorer results i...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-13 13:48 EDT by Ian Tewksbury CLA
Modified: 2010-07-20 11:22 EDT (History)
2 users (show)

See Also:
david_williams: pmc_approved+
thatnitind: pmc_approved? (raghunathan.srinivasan)
thatnitind: pmc_approved? (naci.dai)
deboer: pmc_approved+
thatnitind: pmc_approved? (neil.hauge)
thatnitind: pmc_approved? (kaloyan)
cmjaun: review+
thatnitind: review+


Attachments
Patch (1.11 KB, patch)
2010-07-13 13:48 EDT, Ian Tewksbury CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-07-13 13:48:36 EDT
Created attachment 174187 [details]
Patch

This bug is an offshoot off Bug 319638.

The problem is that JS files in libraries do not like to be opened to have their structured built.  Because a proper solution for this is bigger then 3.2.1 for now I am supplying a patch to ignore the error being printed to the console.  The side effect to the user is that no children are displayed for files in library folders.  This is not a regression in any way because all of this functionality is new for 3.2 we just don't want to be logging an error for a known issue.

patch attached.
Comment 1 Nitin Dahyabhai CLA 2010-07-14 01:40:16 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

In 3.2, JavaScript files in the workspace can be expanded to view their structure in the Project Explorer without opening them in the editor.  Expanding JavaScript files inside a Library, however, triggers a stack trace to the console for each file the user tries to open in that Library.  This becomes alarming pretty quickly, if not at least very annoying.

* Is there a work-around? If so, why do you believe the work-around is insufficient? 

No workaround.

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

Manual test.

* Give a brief technical overview. Who has reviewed this fix? 

We've been looking at different approaches to fixing the full problem (bug 319638) this week, but haven't produced a safe and correct fix yet.  It looks like it would be a larger change than we'd be comfortable making at this point, so we're proposing we squelch the output for now and continue to work on a full fix for 3.2.2.

* What is the risk associated with this fix?

None, we're bypassing a printStackTrace() call by catching the more specific Exception type that's being thrown in this situation.  Ideally all of the printStackTraces will also be removed in the 3.2.2 timeframe.
Comment 2 Tim deBoer CLA 2010-07-14 09:20:42 EDT
+1. Please make sure you have another bug open to track removing all calls to printStackTrace(), as this isn't appropriate in an Eclipse environment.
Comment 3 Ian Tewksbury CLA 2010-07-14 09:27:52 EDT
(In reply to comment #2)
> +1. Please make sure you have another bug open to track removing all calls to
> printStackTrace(), as this isn't appropriate in an Eclipse environment.

Done.  Bug 319851
Comment 4 Chris Jaun CLA 2010-07-14 15:21:36 EDT
Patch checked in.