Skip to content
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

Create EntityNotDeclared code action #724

Merged
merged 2 commits into from
Jun 2, 2020
Merged

Create EntityNotDeclared code action #724

merged 2 commits into from
Jun 2, 2020

Conversation

xorye
Copy link

@xorye xorye commented May 26, 2020

Fixes #532

This PR adds a new code action to locally declare an undeclared entity.

<?xml version="1.0" encoding="UTF-8"?>
<article>
   &nbsp;
</article>

Demo:
demo

The codeaction works whether or not <!DOCTYPE is declared or not, and whether the internal subset [] exists or not.

Signed-off-by: David Kwon [email protected]

@fbricon
Copy link
Contributor

fbricon commented May 28, 2020

please rebase against master

@xorye
Copy link
Author

xorye commented May 28, 2020

Thank you, fixed

@xorye
Copy link
Author

xorye commented May 29, 2020

Fixed, I also added a second commit that adds tests for #686, since that issue is being fixed thanks to this new method:
https://github.com/eclipse/lemminx/blob/765bc8fe1959f2f54bea9667e6c4b8e6320ea450/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/utils/XMLBuilder.java#L423-L432

@xorye
Copy link
Author

xorye commented Jun 1, 2020

Great feedback, fixed

@angelozerr
Copy link
Contributor

@xorye you have 2 commits for this PR. I think the commit 084c611 should be removed, no?

@fbricon
Copy link
Contributor

fbricon commented Jun 2, 2020

@angelozerr see #724 (comment)

@angelozerr
Copy link
Contributor

@angelozerr see #724 (comment)

Thanks @fbricon

@angelozerr angelozerr merged commit 84d2689 into eclipse-lemminx:master Jun 2, 2020
@angelozerr
Copy link
Contributor

Great PR @xorye !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeAction for EntityNotDeclared
5 participants