20 comments

+10.


--
-


Grant Gochnauer
http://www.gochnauer.org


"won-seok choi" <no_mail@jetbrains.com> wrote in message
news:16565286.1066804580482.JavaMail.itn@is.intellij.net...

sometimes we need to reformat JSP files like java files.



0

Make those votes count! Vote for issue 2783[/url], "support JSP reformat code."

0

Hmmm, reformat would be better, but re-indent (on the code bits) does work.
and thats typically my #1 reformatting need.
Now "optimize imports" for JSP would be really nice.

"won-seok choi" <no_mail@jetbrains.com> wrote in message
news:16565286.1066804580482.JavaMail.itn@is.intellij.net...

sometimes we need to reformat JSP files like java files.



0

won-seok choi wrote:

sometimes we need to reformat JSP files like java files.



I filed this as an SCR like a year ago almost when they were taking
feature requests for Aurora. It's still open, and I'm told it's not
gonna happen in Aurora.

I wanted to get JSP and HTML code formatting.

No one said it would be easy, but if a program like Homesite can do it,
I'm sure it can be done. If it was close enough to perfect I would
still accept it.

R

0

Michael Werle wrote:

Make those votes count! Vote for issue 2783[/url], "support JSP reformat code."

Just plopped 100 votes on it. It already has over 1000, but it seems to
not be a high priority! Go figure.

I have a funny feeling that because of some of the issues involved that
the underlying framework can't support this right now, and might need to
be a big change for the next rev of the product.

R

0

i'm currently using a plugin that a colleague of mine wrote that works nicely, at least for my needs. I haven't tried it on Aurora yet but if anyone interested, I'm pretty sure he'd be happy to share it (assuming it works on the eap builds).

0

Duc Nguyen wrote:

i'm currently using a plugin that a colleague of mine wrote that works nicely, at least for my needs. I haven't tried it on Aurora yet but if anyone interested, I'm pretty sure he'd be happy to share it (assuming it works on the eap builds).

Man I don't care, I'll use it with 3.0.5 if I have to! SHARE SHARE! :)

R

0

While we're talking about JSP reformatting, while about suggesting HTML tags for completion the same way as Aurora does for JSP tags? This is the #1 complaining among my coworkers here.

0

Please don`t "bundle" the request for JSP-Reformating (means the Java-Code inside a JSP) with the request to reformat HTML.

I would love to be able to reformat JSPs. But don´t forget that IDEA isn´t a HTML-Editor. So use Dreamweaver or whatever you want (Plugin?) for that HTML-stuff. :)



0

No, IDEA isn't a html editor. But, it is a jsp editor and jsp contains html.
So, I think it's a perfectly valid request. That being said, if we had to
make a choice, I would much rather have jsp formating than html tag
completion.

"Johannes Schneider" <idea@johannes-schneider.info> wrote in message
news:30095359.1066911794311.JavaMail.itn@is.intellij.net...
Please don`t "bundle" the request for JSP-Reformating (means the Java-Code
inside a JSP) with the request to reformat HTML.

I would love to be able to reformat JSPs. But don´t forget that IDEA isn´t a
HTML-Editor. So use Dreamweaver or whatever you want (Plugin?) for that
HTML-stuff. :)





0

I wish the refactoring was much more powerful. Anyone know if there's already a SCR open for this?

0

Robert,

you are right again :). This request requires us to implement at least a
good HTML parser which is not a piece of cake by itself. But this is not
the only problem. Second, we have to deal with both XML and HTML in the
same JSP. They are too different languages and we have to know which one
are you trying to generate to perform highlighting, completion, etc..

What's about another solution: we will support XML in JSP and XML by
itself. You use XHTML instead of plain HTML and define all XHTML
documents as XML with XHTML-DTD. That's it. You have all features of our
XML support in HTML documents and JSPs (when we implement XML support
for JSP).

What do you think on this?

IK

Robert S. Sfeir wrote:

Michael Werle wrote:

>> Make those votes count! Vote for issue
>> 2783[/url],
>> "support JSP reformat code."


Just plopped 100 votes on it. It already has over 1000, but it seems to
not be a high priority! Go figure.

I have a funny feeling that because of some of the issues involved that
the underlying framework can't support this right now, and might need to
be a big change for the next rev of the product.

R



--
Igor Kuralenok
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

+What's about another solution: we will support XML in JSP and XML by
itself. You use XHTML instead of plain HTML and define all XHTML
documents as XML with XHTML-DTD. That's it. You have all features of our
XML support in HTML documents and JSPs (when we implement XML support
for JSP).

What do you think on this?+

That would be more than enough IMO ....

Surely the likes of DreamWeaver and GoLive, can generate proper XHTML by now?

0

+10

"Igor Kuralenok (JetBrains)" <ik@intellij.com> wrote in message
news:bn8n2a$fuh$1@is.intellij.net...

Robert,

>

you are right again :). This request requires us to implement at least a
good HTML parser which is not a piece of cake by itself. But this is not
the only problem. Second, we have to deal with both XML and HTML in the
same JSP. They are too different languages and we have to know which one
are you trying to generate to perform highlighting, completion, etc..

>

What's about another solution: we will support XML in JSP and XML by
itself. You use XHTML instead of plain HTML and define all XHTML
documents as XML with XHTML-DTD. That's it. You have all features of our
XML support in HTML documents and JSPs (when we implement XML support
for JSP).

>

What do you think on this?

>

IK

>

Robert S. Sfeir wrote:

Michael Werle wrote:

>
>> Make those votes count! Vote for issue
>>

2783[/url],

>> "support JSP reformat code."
>

Just plopped 100 votes on it. It already has over 1000, but it seems to
not be a high priority! Go figure.

>

I have a funny feeling that because of some of the issues involved that
the underlying framework can't support this right now, and might need to
be a big change for the next rev of the product.

>

R

>

>
>

--
Igor Kuralenok
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

>


0

Igor Kuralenok (JetBrains) wrote:

Robert,

you are right again :). This request requires us to implement at least a
good HTML parser which is not a piece of cake by itself. But this is not
the only problem. Second, we have to deal with both XML and HTML in the
same JSP. They are too different languages and we have to know which one
are you trying to generate to perform highlighting, completion, etc..

What's about another solution: we will support XML in JSP and XML by
itself. You use XHTML instead of plain HTML and define all XHTML
documents as XML with XHTML-DTD. That's it. You have all features of our
XML support in HTML documents and JSPs (when we implement XML support
for JSP).

What do you think on this?


+100000!

YES! I didn't know if you could do that, I was going to suggest it!
That would be a beautiful thing. Personally, I use tags for everything,
so I would have no issues using xhtml, and I do do that anyway, and it
would allow us to find out quickly if our doc tags are not closed right.

Only one condition, proper support of the DTD and code completion ;)

THanks so much, that would be very cool.

R

0

Sebastien Gagnon wrote:

I wish the refactoring was much more powerful. Anyone know if there's already a SCR open for this?

Yes I opened one myself and listed which existing Refactorings would be
useful.

http://www.intellij.net/tracker/idea/viewSCR?publicId=15774

R

0


Definately. I submitted SCR 9812 where I basically pointed out that there are lots of cool features in the XML editor that could be adapted to the JSP editor if you treated the HTML as well-formed XML. (9812 was subsequently marked as a dup of 2783.)

However, be a little careful with this approach. At the very least, I'd say that you need to provide the option to have the formatter work if the XML is well-formed but not valid (that is, there is no DTD/Schema). This is needed because a lot of the JSP that we work on is fragments that are then assembled using includes into a whole page. So applying a DTD to a page fragment (say, the navigation bar of the site) doesn't make sense.

Also, you need to allow for lots of "exceptions". That is, the inclusion of other elements in the JSP page. The most obvious example is java code in the page (i.e., skip the <% to %> parts when evaluating the XHTML compliance of the page). But there are lots of others. Like allowing a JSP tag inside an HTML tag will violate XML well-formed-ness, and so on.

So, a few gotchas. But I think that this is the right track.

0

Ditto here. Everyone who has tried it loves it. The only complaint I get
is it does not know HTML.


"Marcus Brito" <pazu@animegaiden.com.br> wrote in message
news:5457555.1066908689847.JavaMail.itn@is.intellij.net...

While we're talking about JSP reformatting, while about suggesting HTML

tags for completion the same way as Aurora does for JSP tags? This is the #1
complaining among my coworkers here.


0

Please sign in to leave a comment.