Code completion in html

Are we supposed to have CSS code completion in an html page?

Meaning if I have:

]]> where the | is the cursor, hitting command + space does
nothing.

This is with the css added as part of an import, which is part of site
mesh, not the page itself. In other words this means the css completion
would have to be available module-wide not directly to jsp.

I ask cuz it doesn't work :)

R

9 comments
Comment actions Permalink

Make sure you linked css to an html via <link/>

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

Are we supposed to have CSS code completion in an html page?

Meaning if I have:

<tr > where the | is the cursor, hitting command + space
does nothing.

This is with the css added as part of an import, which is part of site
mesh, not the page itself. In other words this means the css
completion would have to be available module-wide not directly to jsp.

I ask cuz it doesn't work :)

R



0
Comment actions Permalink

Make sure you linked css to an html via <link/>


That's exactly the problem. The will be there in the generated page, but it's added by a servlet filter (sitemesh). We need some way to tell IDEA "hey, you can use these CSS file for this collection of pages -- don't worry to check ]]> tags, something will figure out how to do that at runtime".

Where "collection of pages" is something like:

- A whole web application
- A subtree in a web application
- A resource pattern (*.html)

0
Comment actions Permalink

BTW, this is not exclusive to CSS. We need a way to do the same thing for scripts, includes, etc.

0
Comment actions Permalink

I guess this is not supported?
@import ""; @import ""; ]]>

R

0
Comment actions Permalink

Not yet.

Robert S. Sfeir wrote:

I guess this is not supported?
<style media="screen" type="text/css">
@import "<c:url value='/styles/main.css'/>";
@import "<c:url value='/styles/menus.css'/>";
</style>

R



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

k, I filed 2 issues on this:
1- even if I use I don't get code completion, even if I'm in the SAME document the link is specified, forget across documents... the simple way doesn't work. 2- ]]></span> tag is important to be used since we have a lot of code which <br/>uses that, and going through to change it to link to match up with irida <br/>is just too time consuming, and we lose the convenience of code <br/>completion if we don't.<br/><br/>3- This has to work across files. Especially in a web env with jsp you <br/>almost never put the header info in all the jsps, includes are the thing <br/>to use, and as such your implementation of the css/html/jsp support <br/>should be geared towards webapp developers, not html developers... which <br/>it seems to be right now.<br/><br/>Thanks<br/>R<br/></p>

0
Comment actions Permalink

>>Make sure you linked css to an html via <link/>


That's exactly the problem. The <link> will be there in the generated page,
but it's added by a servlet filter (sitemesh).

This is a very big problem with IDEA indeed. Not only for CSS but for JS
too. A lot of frameworks 'decorate' or 'inject' 'relations' at runtime
nowadays.

We need some way to tell IDEA "hey, you can use these CSS file for this collection of pages --
don't worry to check <link> tags, something will figure out how to do that at runtime".

Where "collection of pages" is something like:

- A whole web application
- A subtree in a web application
- A resource pattern (*.html)

The problem is not only with HTML, but with JavaScript files too(or
maybe with other custom file types): to tell IDEA that it can use the
functions/resources from one file in other files.

IMHO this problem should be solved before the final release of IRIDA.

Ahmed.

0
Comment actions Permalink

I suggested a solution which would solve a little bit of the riddle,
though not all of it. Much like we import external resources for
resolving entities, the same thing can be applied to this case. Say you
have a c:url value="/foo/bar.html" if idea discovers that it can't find
the file, there could be a quick fix option which would popup a relation
window where there would be a list of files from which we could pick the
file which relates to this one. Then IDEA can map the entry in the
module or project so it can find it later. This would then lead to
being able to draw graphs of document relationships if we wanted to so
we can see file dependencies visually.

R

0
Comment actions Permalink

Can you link to the issues you submitted to upvote them? It is 2014 and it seems the problem still remains.

0

Please sign in to leave a comment.