- This topic has 11 replies, 6 voices, and was last updated 20 years, 10 months ago by
Scott Anderson.
-
AuthorPosts
-
Charles HasegawaMemberWhenever I paste in a medium length string into a JSP page, everything after the point I pasted into “loses” syntax colors and becomes plain black text.
For example, I paste in:
<c:out value="${param.highMonthRange}" />
and all tags (html or otherwise) and scriptlet code etc becomes plain black text. I have to then either format or close and re-open the editor to fix it.
Eclipse M3 and MyEclipse 3.6.2
support-michaelKeymasterThanks for this report. A number of coloring issues will be addressed in the upcoming maintenance release. I’ll make sure your example is added to the test suite.
Regards,
Michael
MyEclipse Support
Knut Erik BallestadMemberI also get this colouring error, but in a slightly different setting:
After an HTML comment, the colouring is gone on line 4!
On line n, the colouring ‘magically re-appears!1: <tr>
2: <td width=”10″></td><td valign=”top”>
3: <!– Error messages & dropdowns –>
4: <table border=”0″ cellpadding=”0″ cellspacing=”5″>
….
n: <%@include file=”/include/footer.jsp”%>
Scott AndersonParticipantKeb,
The problem you’re seeing is a new bug in recognition of single-line comments. Changing line 3 to a block comment style is the current workaround.
<!-- Error Messages & dropdowns --> or <!-- Error Messages & dropdowns -->
Sorry for the inconvenience.
–Scott
MyEclipse Support
interprosrl.itMemberIt seems to me that even changing HTML comments to block comment style doesn’t resolve all problems: the first multi-line HTML comment doesn’t break syntax coloring, but the second one does.
I have this JSP example:[...] <!-- First HTML comment on page --> <span>Colored</span> <!-- Comment 2 --> <span>NOT colored until end of file</span> </body> </html>
I have to say I’m a bit disappointed by this: I have just downloaded and installed latest MyEclipse release (2.6.3 on Eclipse 2.1.1) in the hope to have resolved some issue about syntax coloring, and now there is this new one :/
Is it only on my installation or there is somebody else experimenting same problem?Anyway we find MyEclipse a very good product for J2EE development. It is a true shame that JSP syntax coloring had such annoying bugs.
Keep up the good work!
Fabio Da Soghe
interprosrl.itMemberMaybe I’ve found a little workaround: use JSP comments instead of HTML comments.
<%-- Comment 1 --%> <span>Colored</span> <%-- Comment 2 --%> <span>Still properly colored.</span> <jsp:useBean /> </body> </html>
Anyway we’re waiting for the next maintenance release 😉
Fabio Da Soghe
Scott AndersonParticipantFabio,
Excellent workaround. Thanks for posting it.
Anyway we’re waiting for the next maintenance release 😉
We’re already working on it. 🙂
–Scott
MyEclipse Support
Chandrakant ChandrakerMemberIf jsp contains javascript inside <script> tag and if javascript code is not defined under html comment block <!– –> then a single left angle bracket < in the javascript will cause the color problem.
e.g.
<script language=”javascript”>
function xyz()
{
for(int i=0; i<10; i++)
alert(i);
}
</script>left angle bracket in the for loop will cause all the color trouble.
Thanks
interprosrl.itMemberEr… we’ve just encountered another problem. It seems that my workaround (use JSP comments) doesn’t resolve the whole thing too 🙁
After several JSP comments (couldn’t say how many), singleline and multiline, at a certain point it stops to syntax-coloring and all code gets black.
Scott, could it be possible to have a quick maintenance release just to correct these syntax-coloring issues? This new release (2.6.3) is very good and has many useful features so we are very reluctant to get back to the previous one, but ours JSPs are quite complex with a lot of nested JSTL tags and for us a proper syntax coloring makes the difference between night and day.
Thank you.
Fabio Da Soghe
Scott AndersonParticipantFabio,
Scott, could it be possible to have a quick maintenance release just to correct these syntax-coloring issues? This new release (2.6.3) is very good and has many useful features so we are very reluctant to get back to the previous one, but ours JSPs are quite complex with a lot of nested JSTL tags and for us a proper syntax coloring makes the difference between night and day.
We’re implementing the fixes now are are planning an update as soon as they are resolved and tested. If you have some complex JSP examples you can share with our QA folks, that would probably help ensure we have the issues all resolved. Unfortunately, since JSP’s are a hodge-podge of different grammars (HTML, javascript, Java, etc) it’s not exactly a “well-formed grammar”. This makes the coloring problem quite a bit harder than on something that is regular, like XML. 🙂
–Scott
MyEclipse Support
interprosrl.itMemberSorry sorry sorry. My last post was wrong. I don’t get any coloring error regarding comments in JSP using only JSP comments. Maybe yesterday I missed some HTML comments that intruduced the error in the page.
Scott, please could you tell me how I can post an example JSP in this forum? I cannot find a way to put attachments to posts. I would have some JSPs that have some coloring issues and other precompiling problems.
Thank you.Fabio Da Soghe
Scott AndersonParticipantFabio,
Scott, please could you tell me how I can post an example JSP in this forum? I cannot find a way to put attachments to posts. I would have some JSPs that have some coloring issues and other precompiling problems.
Posting to the forum is a little tough. The best way to get them to us is to put them in a zip archive and email them to support@genuitec.com. The more examples the better. Thanks!
–Scott
MyEclipse Support -
AuthorPosts