long () { long result = myExecutionId; if (result == -1) { ExecutionEnvironment executionEnvironment = null; if (myConsole != null) { DataContext consoleContext = DataManager.getInstance().getDataContext(myConsole); executionEnvironment = ExecutionDataKeys.EXECUTION_ENVIRONMENT.getData(consoleContext); if (executionEnvironment == null) { ViewContext viewContext = ViewContext.CONTEXT_KEY.getData(consoleContext); if (viewContext != null) { JComponent tabsComponent = viewContext.getContentManager().getComponent(); executionEnvironment = ExecutionDataKeys.EXECUTION_ENVIRONMENT.getData(DataManager.getInstance().getDataContext(tabsComponent)); } } } myExecutionId = result = executionEnvironment != null ? executionEnvironment.getExecutionId() : 0; } return result; }