Search in sources :

Example 1 with IdeScriptException

use of org.jetbrains.ide.script.IdeScriptException in project intellij-plugins by JetBrains.

the class Reveal method refreshRevealPreOnePointSix.

private static void refreshRevealPreOnePointSix(@NotNull String bundleID, @Nullable String deviceName) throws ExecutionException {
    // Pre Reveal 1.6, the refresh script was not bundled with the application
    String script = "activate\n" + "repeat with doc in documents\n" + " refresh doc " + "   application bundle identifier \"" + StringUtil.escapeQuotes(bundleID) + "\"";
    if (deviceName != null) {
        script += "   device name \"" + StringUtil.escapeQuotes(deviceName) + "\"";
    }
    script += "   when available\n" + "end repeat\n" + "activate\n";
    try {
        AppleScript.tell("Reveal", script, true);
    } catch (IdeScriptException e) {
        LOG.info("Reveal script failed:\n" + script);
        throw new ExecutionException("Cannot refresh Reveal: " + e.getMessage(), e);
    }
}
Also used : IdeScriptException(org.jetbrains.ide.script.IdeScriptException) ExecutionException(com.intellij.execution.ExecutionException)

Aggregations

ExecutionException (com.intellij.execution.ExecutionException)1 IdeScriptException (org.jetbrains.ide.script.IdeScriptException)1