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

Don't send invalid catalog notifications for paths with file scheme #834

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Conversation

xorye
Copy link

@xorye xorye commented Aug 5, 2020

Fixes redhat-developer/vscode-xml#289

The reason why completion from the catalog was working even though there was an error notification was because XMLCatalogResolverExtension used new URI(catalogFile).getPath() while XMLCatalogPlugin used new URI(catalogFile).toString().

I removed isXMLCatalogFileValid() from XMLCatalogResolverExtension and XMLCatalogPlugin, and moved it into a utils class.

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

@xorye xorye changed the title Allow file scheme when checking if catalog exists Don't send invalid catalog notifications for paths with file scheme Aug 5, 2020
* @param path the path to check
* @return true if the provided path exists and false otherwise
*/
public static boolean pathExists(String path) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you could use the existing FilesUtils.getPath to avoid creating a new utility method?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I removed this method and now I am using Files.notExists(FilesUtils.getPath(c)); and Files.exists(FilesUtils.getPath(c));

@angelozerr angelozerr merged commit 3079293 into eclipse:master Aug 10, 2020
@angelozerr
Copy link
Contributor

Thanks @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.

Error prompt Invalid path for setting 'xml.catalogs'
3 participants