-
Notifications
You must be signed in to change notification settings - Fork 408
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
fix: Changes on Formatter profiles have no effect before reloading #1738
fix: Changes on Formatter profiles have no effect before reloading #1738
Conversation
Signed-off-by: Shi Chen <[email protected]>
@@ -193,7 +194,12 @@ public void fileChanged(String uriString, CHANGE_TYPE changeType) { | |||
List<URI> uris = getURIs(formatterUrl); | |||
boolean changed = false; | |||
for (URI formatterUri : uris) { | |||
if (formatterUri.equals(uri)) { | |||
if (Platform.OS_WIN32.equals(Platform.getOS()) && URIUtil.isFileURI(formatterUri) && URIUtil.isFileURI(uri)) { |
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.
Could you add similar code for the settingsUri variable - 008b542#diff-f23d0258ce24117c110acd6753e8490a09fbdf0bc039d662bdffe279c8c28469L177 ?
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.
added in c88f8f5
Signed-off-by: Shi Chen <[email protected]>
@@ -175,7 +176,12 @@ public void fileChanged(String uriString, CHANGE_TYPE changeType) { | |||
List<URI> uris = getURIs(settingsUrl); | |||
boolean changed = false; | |||
for (URI settingsURI : uris) { | |||
if (settingsURI.equals(uri)) { | |||
if (Platform.OS_WIN32.equals(Platform.getOS()) && URIUtil.isFileURI(settingsURI) && URIUtil.isFileURI(uri)) { |
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.
this could be a helper method compareURI(URI uri1, URI uri2)
.
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.
Should this util be put into JDTUtils?
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.
org.eclipse.core.runtime.URIUtil#sameURI
seems to do the same thing you want. Could you check if that satisfies your needs?
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.
It works. I'll use it then.
Signed-off-by: Shi Chen <[email protected]>
test this please |
1 similar comment
test this please |
fix: #1736
Signed-off-by: Shi Chen [email protected]