[jboss-user] [JBoss Tools] - Current text selection does not resolve to a file (html-css-relations)

nimo stephan do-not-reply at jboss.com
Tue Jan 25 05:39:53 EST 2011

nimo stephan [http://community.jboss.org/people/nimo22] created the discussion

"Current text selection does not resolve to a file (html-css-relations)"

To view the discussion, visit: http://community.jboss.org/message/582996#582996

Eclipse build-in WebToolsPlattform (WTP) provides useful things like clicking a class in a html-document and jumping to that corresponding css-class:

for example:

this is in index.html:

<link rel="stylesheet" href="style.css" type="text/css"/>
<div class="test_class">

this is in style.css:


    font-size: 12px;

Now, when I hover the word "test-class" in the html-editor, a link appears and I can click it - eclipse opens the "style.css" and jumps automatically to the class .test_class. This works wonderful.

But when using jsf-project with rf-tools this does not work anymore. When clicking a class, then a red text at the left down side appears with the message:

*Current text selection does not resolve to a file*

I found out, that the file in my static-web-project .project-folder called "*org.eclipse.wst.common.component"* is responsible for that:

+This is the content of my static web project (where html-jumping to css works):+
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="my_website">
        <wb-resource deploy-path="/" source-path="/WebContent"/>
        <property name="context-root" value="my_website"/>

+This is the content of my JSF-project (where html-jumping to css DOES NOT work):+
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="my_jsf_website">
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
        <property name="context-root" value="my_jsf_website"/>
        <property name="java-output-path" value="/MES/target/classes"/>

The /src/main/webapp of my JSF-Project has indeed the web content (such as html, css,..). However, the html-jumping to css does not work.

Why is the jumping works in a static html-project (with no jsf)? 
Why is the jumping does *not* work in a jsf-project?
How can I fix it?

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110125/a448697f/attachment.html 

More information about the jboss-user mailing list