1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
Hello,
I had also this problem with eclipse 3.0.0 and Lomboz 3.01.
use case:
- Lomboz since eclipse 3M8 only for editing JSP files (code assist)
- SYSDEO Tomcat plugin for creating projects and debugging servlets/jsp
- (Web) Projects are created with default tomcat configuration. (project/WEB-INF/web.xml)
- a complete Tomcat installation in a project sub-folder
After I upgraded to Lomboz 3.01 eclipse was hanging when I tried to open a JSP file.
I debugged Lomboz code and found that at every opening of a jsp file all (sub) folders of all projects are scanned
for Lomboz "webmodules". This is timeconsuming because of the many Tomcat folders.
Following change in com.objectlearn.jdt.j2ee.core.Project limits this search to a subfolder depth of 4.
This change reduced the jsp open time to a acceptable value.
***************
line 549
private void initModulesIn(IFolder moduleFolder) throws Exception {
if (isValidModule(moduleFolder)) {
createModule(moduleFolder);
}
// inserted lines begin ***
IPath path =moduleFolder.getProjectRelativePath();
if (path.segmentCount()>4)
return;
// inserted lines end ***
moduleFolder.accept(new IResourceVisitor() {
public boolean visit(IResource resource) throws CoreException {
***************
I had also a problem with code assist in jsp files:
Error Sep 11, 2004 11:00:19.140 J2EE Plugin internal error
org.apache.jasper.JasperException: File "/Test_file.jsp" not found
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:379)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
at org.apache.jasper.compiler.JspUtil.getInputStream(JspUtil.java:838)
at org.apache.jasper.compiler.JspUtil.getReader(JspUtil.java:1034)
at org.apache.jasper.compiler.JspReader.<init>(JspReader.java:81)
at com.objectlearn.jasper.LombozParserController.determineSyntaxAndEncoding(LombozParserController.java:511)
at com.objectlearn.jasper.LombozParserController.parse(LombozParserController.java:342)
at com.objectlearn.jasper.LombozParserController.parse(LombozParserController.java:188)
at com.objectlearn.jasper.LombozParserController.parse(LombozParserController.java:156)
at com.objectlearn.jasper.LombozJspC.parseInternal(LombozJspC.java:179)
at com.objectlearn.jasper.LombozJspC.parse(LombozJspC.java:124)
at com.objectlearn.jdt.j2ee.core.WebModule.internalParseJSP(WebModule.java:274)
at com.objectlearn.jdt.j2ee.core.WebModule.forceParseJSP(WebModule.java:255)
at com.objectlearn.jdt.j2ee.core.Project.parseJSP(Project.java:769)
at com.objectlearn.jdt.j2ee.ui.editor.assist.JspScriptCompletionProcessor.createParseTree(JspScriptCompletionProcessor.java:350)
at com.objectlearn.jdt.j2ee.ui.editor.assist.JspScriptCompletionProcessor.internalComputeCompletionProposals(JspScriptCompletionProcessor.java:284)
at com.objectlearn.jdt.j2ee.ui.editor.assist.JspScriptCompletionProcessor.computeCompletionProposals(JspScriptCompletionProcessor.java:159)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1472)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:242)
....
this is because the jsp file was not found within a webmodule and the declared "default webmodule" does not exist´.
When I used the code assist a select box popup requested for a new "default webmodule".
But closing the box without selecting a webmodule did not clear the "default webmodule".
Following change in selectDefaultWebApp() clears the default webmodule in the project if no webmodule is selected in the box.
Code assist was afterwards usable again.
old code: **********
final Object[] results = dlg.getResult();
if (results != null && results.length > 0) {
defaultWebModule = (WebModule) results[0];
try {
getProject().setPersistentProperty(Project.DEFAULT_WEB_APP,
defaultWebModule.getName());
} catch (CoreException e) {
J2EEPlugin.log(e);
}
}
old code: **********
new code: **********
final Object[] results = dlg.getResult();
String name = null;
if (results != null && results.length > 0) {
defaultWebModule = (WebModule) results[0];
name = defaultWebModule.getName();
}
try {
getProject().setPersistentProperty(Project.DEFAULT_WEB_APP, name);
} catch (CoreException e) {
J2EEPlugin.log(e);
}
new code: **********
I hope this changes will be usefull for others.
Karl-Heinz |
Partager