use of com.thoughtworks.gauge.PluginNotInstalledException in project Intellij-Plugin by getgauge.
the class GaugeLibHelper method gaugeLib.
private ProjectLib gaugeLib(Module module) {
String libRoot;
try {
GaugeService gaugeService = Gauge.getGaugeService(module, true);
if (gaugeService == null) {
gaugeService = GaugeModuleComponent.createGaugeService(module);
}
GaugeConnection gaugeConnection = gaugeService.getGaugeConnection();
if (gaugeConnection == null) {
throw new IOException("Gauge api connection not established");
}
libRoot = gaugeConnection.getLibPath("java");
} catch (IOException e) {
System.err.println("Could not add gauge lib, add it manually: " + e.getMessage());
LOG.debug("Could not add gauge lib, add it manually: " + e.getMessage());
return null;
} catch (PluginNotInstalledException e) {
throw new RuntimeException("Gauge " + JAVA + " plugin is not installed.");
}
return new ProjectLib(GAUGE_LIB, new File(libRoot));
}
Aggregations