-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ExternalUtils: Check coala binary before execution
Fixes #13
- Loading branch information
1 parent
01af287
commit 9cf253d
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.coala.core.utils; | ||
|
||
import org.eclipse.jface.dialogs.MessageDialog; | ||
|
||
import java.io.IOException; | ||
import java.net.URI; | ||
import java.net.URISyntaxException; | ||
|
||
public class DialogUtils { | ||
/** | ||
* Dialog asking the user to install the coala framework. | ||
* If the user answers in affirmative the coala website is opened | ||
* in the default web browser. | ||
*/ | ||
public static void installcoalaDialog() { | ||
URI coalaWebsite = null; | ||
try { | ||
coalaWebsite = new URI("http://coala-analyzer.org"); | ||
} catch (URISyntaxException ex) { | ||
ex.printStackTrace(); | ||
} | ||
boolean ret = MessageDialog.openQuestion(null, "coala is not installed", | ||
"The coala framework is required to run code analysis. " | ||
+ "Do you want to know how to install coala?"); | ||
if (ret) { | ||
try { | ||
java.awt.Desktop.getDesktop().browse(coalaWebsite); | ||
} catch (IOException ex) { | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters