- This topic has 8 replies, 2 voices, and was last updated 18 years ago by Jeremy Stein.
-
AuthorPosts
-
Jeremy SteinMemberMyEclipse gives me errors on my JSP fragments even though I turned off JSPF validation.
Windows XP SP2
Eclipse 3.2
MyEclipse 5.0.1 GASteps to reproduce:
1. (Window > Preferences > MyEclipse > Editors > JSP) turn off “Validate JSP Fragments”
2. Create a new web project.
3. Create a new file WEB-INF/jspf/test.jspf
4. Put an unknown tag in the file: <unknown:tag/>
5. Re-build (Project > Clean)Note the warning in the problems view.
Since my JSP fragments use tags that are declared in the containing JSP, I don’t want them to be validated. I still get this problem when I turn off JSP Fragment validation through the project-specific setting (Project > Properties > MyEclipse > JSP Fragments)[/list][/list]
Riyad KallaMemberJeremy,
Just as a quick sanity check, if you download and install the MyEclipse 5.1 All-In-One installer to a new location, and reopen your workspace with it, and do a project clean, does the problem still appear? (I cannot reproduce this on my end btw using the all-in-one installer)
Jeremy SteinMemberI ran the all-in-one installer, then opened my project with it. Project > Clean gave me the same error. Also, I was still able to follow my steps above to reproduce in a new project (although “Editors” is now called “Files & Editors”).
Riyad KallaMemberUsing the All-In-One install, if you go to FIle > Switch Workspace > C:\tempworkspace, and hit OK to restart. Then you create a new web project, and a single index.jspf file (notice the jspf extension) then put some gibberish in it, like
<% BLAH BLAH
is it marked with an error or ignored?
Jeremy SteinMemberI get this error:
Syntax error, insert “;” to complete BlockStatementsIf I turn off JSPF validation, the error goes away (but I still get a warning for an unknown tag if I add one)
Riyad KallaMemberJust to clarify, the validation we are speaking of only pertains to left-margin markers and things in the problem view… our goal (as I understand it) is to get MyEclipse to stop validating your incomplete JSP fragments (as it should) and placing problem markers in the left margin and down in the problem view.
From your last post, it sounds like in a new workspace this is working… but in the old workspace it does not work… is this accurate?
Jeremy SteinMemberI’m sorry; I should have been more clear. The new workspace works the same as the old: I can’t turn off the warnings for JSPFs. The exercise you suggested was to create an error. When I turn off JSPF validation, it does turn off errors. I didn’t realize before that exercise that my problem only pertains to warnings.
A clarifying test:
I used a new workspace with MyEclipse 5.1 from the All-in-one installer.I created two files, error.jsp and error.jspf with this code:
<% BAD CODE %>And I created warning.jsp and warning.jspf with this code:
<unknown:tag/>This resulted in 2 errors and 2 warnings.
When I turned off JSP fragment validation, closed all files, ran Project>Clean, the jspf error disappeared leaving me with 1 error and 2 warnings.
Riyad KallaMemberJeremy,
I recreated this exact test scenario and see the unnecessary validation warning in the fragment about the unknown tag just like you said. So I will send a test case to the developers and see if this can get fixed quickly. In the mean time you can exclude these files manually from validation by right clicking on them or managing them from the project properties under MyEclipse > Validation > Excluded Resources.Thanks for hanging in there and helping me understand what was going on.
Jeremy SteinMemberI didn’t know you could exclude files from validation; that works great. Now I’ll just add .settings/com.genuitec.eclipse.core.prefs to CVS and the other developers will enjoy the same empty problems pane (until they add problems!).
Thank you!
-
AuthorPosts