-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References support for text node #1432
Conversation
Given this web.xml: <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<servlet>
<servlet-name>comingsoon</servlet-name>
<servlet-class>mysite.server.ComingSoonServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>comingsoon</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app> If you declare this settings: "xml.references": [
{
"pattern": "**/web.xml",
"expressions": [
{
"from": "servlet-mapping/servlet-name/text()",
"to": "servlet/servlet-name/text()"
}
]
}
] You shoud benefit with references for servlet-name: |
3932b31
to
e7f5f21
Compare
The PR can be reviewed now, the code should be cleaned and I have written some tests. |
...g/eclipse/lemminx/extensions/references/participants/XMLReferencesCompletionParticipant.java
Outdated
Show resolved
Hide resolved
...g/eclipse/lemminx/extensions/references/participants/XMLReferencesCompletionParticipant.java
Show resolved
Hide resolved
...emminx/src/main/java/org/eclipse/lemminx/extensions/references/utils/XMLReferencesUtils.java
Outdated
Show resolved
Hide resolved
...emminx/src/main/java/org/eclipse/lemminx/extensions/references/utils/XMLReferencesUtils.java
Outdated
Show resolved
Hide resolved
...inx/src/main/java/org/eclipse/lemminx/extensions/references/utils/XMLReferencesSearcher.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works very well on my end!
...src/main/java/org/eclipse/lemminx/extensions/references/settings/XMLReferenceExpression.java
Show resolved
Hide resolved
e7f5f21
to
19c28a6
Compare
Signed-off-by: azerr <azerr@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for me, and the code looks good. Thanks, Angelo!
References support for text node
Signed-off-by: azerr azerr@redhat.com