-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fuzzy Element name codeaction #591
Fuzzy Element name codeaction #591
Conversation
1cb6185
to
fa67d6d
Compare
org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/XMLAssert.java
Outdated
Show resolved
Hide resolved
...p4xml/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_aCodeAction.java
Show resolved
Hide resolved
...4xml/src/test/java/org/eclipse/lsp4xml/extensions/contentmodel/XMLSchemaDiagnosticsTest.java
Show resolved
Hide resolved
fa67d6d
to
299fa68
Compare
@angelozerr Thanks for your implementation, I used it but had to do some modifications since the order of the CMElementDeclarations was not idempotent and tests would fail. Instead the codeactions will be in order of the element names. |
299fa68
to
b6f4f3a
Compare
@NikolasKomonen your PR works great but not with prefix. Given this XML file: <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camel:bea></camel:bea>
</beans> You should have code action (similar code action with Given this XML file: <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camel:XXXXX></camel:XXXXX>
</beans> You should have a list of code action. |
b68fc68
to
655e17c
Compare
Sorry @NikolasKomonen my sample was not relevant. You provide bean and beans although it should provide only bean. I think you provide bean coming from spring but not from camel. Given this XML file:
You should see |
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/dom/DOMElement.java
Outdated
Show resolved
Hide resolved
...p4xml/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_aCodeAction.java
Outdated
Show resolved
Hide resolved
...p4xml/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_aCodeAction.java
Show resolved
Hide resolved
...p4xml/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_aCodeAction.java
Outdated
Show resolved
Hide resolved
...p4xml/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_aCodeAction.java
Outdated
Show resolved
Hide resolved
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/XMLPositionUtility.java
Outdated
Show resolved
Hide resolved
...4xml/src/test/java/org/eclipse/lsp4xml/extensions/contentmodel/XMLSchemaDiagnosticsTest.java
Outdated
Show resolved
Hide resolved
655e17c
to
7485764
Compare
Handles regular element names and ones with prefixes Fixes eclipse-lemminx#589 Refer to eclipse-lemminx#589 for code to test Signed-off-by: Nikolas Komonen <[email protected]>
7485764
to
9071ea4
Compare
@angelozerr updated to work with 2 namespaces, will only provide codeactions for elements in the current namespace. |
It works like a charm @NikolasKomonen great job! |
Fixes #589
Refer to #589 for code to test
Signed-off-by: Nikolas Komonen [email protected]