Skip to content

Commit 816dc9b

Browse files
snjezargrunber
authored andcommitted
Fix Open Java Formatter Settings
Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
1 parent f5d03c4 commit 816dc9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ async function openFormatter(extensionPath) {
673673
const formatterUrl: string = getJavaConfiguration().get('format.settings.url');
674674
if (formatterUrl && formatterUrl.length > 0) {
675675
if (isRemote(formatterUrl)) {
676-
commands.executeCommand(Commands.OPEN_BROWSER, Uri.parse(formatterUrl));
676+
return commands.executeCommand(Commands.OPEN_BROWSER, Uri.parse(formatterUrl));
677677
} else {
678678
const document = getPath(formatterUrl);
679679
if (document && fs.existsSync(document)) {
@@ -742,7 +742,7 @@ function openDocument(extensionPath, formatterUrl, defaultFormatter, relativePat
742742
}
743743

744744
function isRemote(f) {
745-
return f !== null && f.startsWith('http:/') || f.startsWith('https:/');
745+
return f !== null && f.startsWith('http:/') || f.startsWith('https:/') || f.startsWith('file:/');
746746
}
747747

748748
async function addFormatter(extensionPath, formatterUrl, defaultFormatter, relativePath) {

0 commit comments

Comments
 (0)