-
Notifications
You must be signed in to change notification settings - Fork 95
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
Suppor for textDocument/documentColor #1431
Conversation
To play with this PR with vscode-xml, please use the PR redhat-developer/vscode-xml#849 |
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/colors/XMLColorsPlugin.java
Outdated
Show resolved
Hide resolved
To test this PR, write this XML color file (android) <?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="opaque_red">#f00</color>
<color name="translucent_red">#80ff0000</color>
</resources> Write this settings: "xml.colors": [
{
"pattern": "**/res/values/colors.xml",
"expressions": [
{
"xpath": "resources/color/text()"
}
]
}
] You should see color: |
See redhat-developer/vscode-xml#853 for declaring |
4dd68bf
to
903edec
Compare
please fix the commit message typo |
fixed |
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.
Other than the comment I left which hopefully will improve conversion between hex/hexa and rgb/rgba color, it works well and the code looks good!
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/colors/utils/ColorUtils.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/services/XMLDocumentColor.java
Outdated
Show resolved
Hide resolved
fe95db4
to
4646146
Compare
fedfff5
to
d5608e1
Compare
Fixes eclipse-lemminx#639 Signed-off-by: azerr <azerr@redhat.com>
Suppor for textDocument/documentColor
Fixes #639
Signed-off-by: azerr azerr@redhat.com