Hi Ben.

Ok, I'll bite.  Seems like a nice idea in principle, but I'm not sure how
useful it would be in practice.  In particular, colour is a "flat"
representation, so if I have a nested expression like <xmas>this is
<i>very</i> important</xmas>, how do I represent the word "very"?  Do I
override the <xmas> style with the <i> style?  Do I create a separate colour
for <i> when it occurs within <xmas> tags?  What if the whole segment is
inside a <santa></santa> tag pair?  Does it get yet another colour?  (Sorry,
getting a bit festive here.)

My other concern would be colour overload.  I can just about keep track of,
say, half a dozen different colours on a screen.  If I use a different set
of colours for each of the 20 struts <html:xxx> tags, the 10 <bean:xxx>
tags, etc - I will end up forgetting which colour represents which tag.
Another strategy might be to have all the <bean:xxx> tag contents in one
colour, the <html:xxx> tags another colour, etc, but how useful will that
actually be?

Sorry to be a wet blanket, but it seems it's the kind of idea where for
large numbers of tags it wouldn't be practical, and for small numbers it
wouldn't be necessary.  Perhaps there's a middle ground where it would be
useful?

Just my $0.02 on a Friday afternoon...

Cheers,
Dan

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 07 December 2001 16:53
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [Eap-features] Alternative code represenations
> 
> 
> Hi
> 
> I posted an idea similar to this before, but I came across 
> something today
> that made me think about it some more.
> 
> In the new JSP spec, there is provision to write the entire 
> page in XML. As
> a result, the short <%= ... %> syntax is replaced by
> <jsp:expression>...</jsp:expression>.  This is fine in 
> principal, but in
> the everyday writing of JSP pages, the syntax is too long and 
> obtrusive in
> editors.  I'd like to be able to choose a different way of 
> displaying this
> construct -- using visual highlighting features like coloured text and
> backgrounds.  IDEA is a visual editor, after all.
> 
> Suppose I have the following:
> 
>      Hello <jsp:expression>  userProfile.getDisplayName()
> </jsp:expression>, Welcome Back!
> 
> Long and ugly, right?  I select the whole expression tag, and 
> choose an
> "Alternative Representation" for that block of code.   This 
> is simply a
> regular expression:
> 
>      "<jsp:expression>(.*)</jsp:expression>"
> 
> I also give a formatting spec, which says how I want the 
> block I selected
> to be actually displayed:
> 
>      "display with a green background the contents of group 1".
> 
> So what I would see would be
> 
>      Hello userProfile.getDisplayName(), Welcome Back!
> 
> (The userProfile.getDisplayName() would, obviously, be in 
> green).  In the
> editor, the part that was replaced would be obvious, and 
> would be so much
> easier to scan in the editor, and to edit.  I'd be able to say what I
> actually *mean*, rather than letting the syntax get in the way.
> 
> In the example above, there'd be a way of configuring the 
> editor to add
> this alternative view as I typed it, of course, as well as a 
> drop-down list
> of presets I can choose from.  The area would remain 'live', 
> and I'd be
> able to change the text in the green part and the contents of the
> jsp:expression tag would change.  I'd also probably expect to 
> be able to
> hover over the green part to show the full version.
> 
> I hope this is clear; I'd appreciate comments on this.   In 
> the previous
> mails I sent on this subject, I gave several other 
> applications of this,
> including Java code comments, <xsl:value-of> tags in XSLT and others.
> 
> Cheers.
> Ben,
> 
> 
> 
> 
> Cheers,
> Ben.
> 
> 
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features
> 


***************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify [EMAIL PROTECTED] 
immediately.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.
***************************************************************************************

_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to