JBoss Community

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

created by nimo stephan in JBoss Tools - View the full discussion

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:

 

<html>

<head>

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

</head>

<body>

<div class="test_class">

hello

</div>

</body>

</html>

 

this is in style.css:

 

.test_class{

 

    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"/>

    </wb-module>

</project-modules>

 

 

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"/>

    </wb-module>

</project-modules>

 

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