Community
Participate
Working Groups
Bugzilla – Bug 108671
"Error trying to set new file into editor" error message under WST project
Last modified: 2006-09-22 21:07:30 EDT
When I try to create a new Visual Class under a Dynamic Web Project (WST 0.7) an error message "Error trying to set new file into editor" appears. Configuration: - Eclipse SDK 3.1 (JDK 1.5.0_04) - EMF 2.1 - GEF 3.1 - VE 1.1 - WST 0.7 Here is how to reproduce the problem (in brackets are my options): 1. Create a new Dynamic Web Project (Target Server: Apache Tomcat 5.0.28, Module Version: 2.4, Context Root: same as project name) 2. Create a new Visual Class (Swing/Application, main option checked) for this project. 3. VE pops up a error dialog saying "Error trying to set new file into editor. Reason: java.lang.NullPointerException". It appears that the message pops up when selecting visual class style Swing or AWT (tested with Swing/Application, Swing/Frame and AWT/Frame). On the contrary, VE works ok when try to create a visual class with SWT style (SWT/Shell).
When you say WST, do you mean WTP? WST doesn't have Web project support? Which download of WTP did you install? Was it R-0.7-200507290654/wtp-sdk-0.7.zip
Created attachment 26859 [details] The stack trace of when it fails. It is due to a call to a method from WTP that isn't normally called by straight VE. The problem is that the method WorkbenchResourceHelperBase.getResource(URI) is called for a resource. This method turns around and calls WorkspaceResourceHandler.getResource(ResourceSet, URI) but it passes in "null" for the resource set. This will always be a problem because the current implementation of WorkspaceResourceHandler.getResource(ResourceSet, URI) requires ResourceSet to be not null.
(In reply to comment #1) > When you say WST, do you mean WTP? WST doesn't have Web project support? > > Which download of WTP did you install? Was it > > R-0.7-200507290654/wtp-sdk-0.7.zip Yes, it is the Web Standard Tools feature of WTP. I didn't download any zip file, I used Eclipse's update manager. The version installed is 0.7.0
*** Bug 109907 has been marked as a duplicate of this bug. ***
John will review for M8 need.
This is really needed for M8, it is a blocker for VE
This is fixed for the WTP M8 final driver. Tested by full suite of JUnits.
Thanks Gili, after many discussions and reviews and tests, we feel comfortable with a "work around" in our M8 code for the bug that is essentially in JEM code. Does JEM already have a bug to fix the basic API? If not, will you please open one for it, and document here, to make sure gets fixed in future versions of JEM? I've opened bug 110386 to track a few other places we in WTP should remove use of the getResource(uri, true) method, but turns out as code currently is they would not have this "blocking" problem.
David, I've just sent out a note to JEM mailing list and to you and Chuck with a proposal on what to do. If that proposal is accepted I will open a defect on it. I need to send it to mailing list because JEM is opensource and I need to get everyone's acceptance on this change.
This bug is being moved to the "closed" state since it has been in the fixed state for a so long it is being assumed fixed, without explicit verification from the originator. If there is still a problem, in the most recent 1.5.x builds, please reopen or open another bug.