use of com.intellij.tasks.impl.TaskManagerImpl in project intellij-community by JetBrains.
the class TaskConfigurable method apply.
@Override
public void apply() throws ConfigurationException {
boolean oldUpdateEnabled = getConfig().updateEnabled;
super.apply();
TaskManager manager = TaskManager.getManager(myProject);
if (getConfig().updateEnabled && !oldUpdateEnabled) {
manager.updateIssues(null);
}
TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO = myAlwaysDisplayTaskCombo.isSelected();
int oldConnectionTimeout = TaskSettings.getInstance().CONNECTION_TIMEOUT;
Integer connectionTimeout = Integer.valueOf(myConnectionTimeout.getText());
TaskSettings.getInstance().CONNECTION_TIMEOUT = connectionTimeout;
if (manager instanceof TaskManagerImpl && connectionTimeout != oldConnectionTimeout) {
((TaskManagerImpl) manager).reconfigureRepositoryClients();
}
}
use of com.intellij.tasks.impl.TaskManagerImpl in project intellij-community by JetBrains.
the class TaskAutoCompletionListProvider method createInsertHandler.
@Override
protected InsertHandler<LookupElement> createInsertHandler(@NotNull final Task task) {
return new InsertHandler<LookupElement>() {
@Override
public void handleInsert(InsertionContext context, LookupElement item) {
Document document = context.getEditor().getDocument();
String s = ((TaskManagerImpl) TaskManager.getManager(context.getProject())).getChangelistName(task);
s = StringUtil.convertLineSeparators(s);
document.replaceString(context.getStartOffset(), context.getTailOffset(), s);
context.getEditor().getCaretModel().moveToOffset(context.getStartOffset() + s.length());
TaskAutoCompletionListProvider.this.handleInsert(task);
}
};
}
use of com.intellij.tasks.impl.TaskManagerImpl in project intellij-community by JetBrains.
the class CreateChangelistAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
TaskManagerImpl manager = (TaskManagerImpl) getTaskManager(e);
assert manager != null;
LocalTask activeTask = manager.getActiveTask();
String name = Messages.showInputDialog(getProject(e), "Changelist name:", "Create Changelist", null, manager.getChangelistName(activeTask), null);
if (name != null) {
manager.createChangeList(activeTask, name);
}
}
Aggregations