本文整理匯總了Java中com.intellij.tasks.config.TaskSettings.getInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java TaskSettings.getInstance方法的具體用法?Java TaskSettings.getInstance怎麽用?Java TaskSettings.getInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.tasks.config.TaskSettings
的用法示例。
在下文中一共展示了TaskSettings.getInstance方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: update
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@Override
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
Project project = e.getData(CommonDataKeys.PROJECT);
ComboBoxButton button = (ComboBoxButton)presentation.getClientProperty(CUSTOM_COMPONENT_PROPERTY);
if (project == null || project.isDefault() || project.isDisposed() || button == null) {
presentation.setEnabled(false);
presentation.setText("");
presentation.setIcon(null);
}
else {
TaskManager taskManager = TaskManager.getManager(project);
LocalTask activeTask = taskManager.getActiveTask();
presentation.setVisible(true);
presentation.setEnabled(true);
if (isImplicit(activeTask) &&
taskManager.getAllRepositories().length == 0 &&
!TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO) {
presentation.setVisible(false);
}
else {
String s = getText(activeTask);
presentation.setText(s);
presentation.setIcon(activeTask.getIcon());
presentation.setDescription(activeTask.getSummary());
}
}
}
示例2: createRequestConfig
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@NotNull
protected RequestConfig createRequestConfig() {
TaskSettings tasksSettings = TaskSettings.getInstance();
RequestConfig.Builder builder = RequestConfig.custom()
.setConnectTimeout(3000)
.setSocketTimeout(tasksSettings.CONNECTION_TIMEOUT);
if (isUseProxy()) {
IdeHttpClientHelpers.ApacheHttpClient4.setProxyForUrlIfEnabled(builder, getUrl());
}
return builder.build();
}
示例3: setUp
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@Override
public void setUp() throws Exception {
super.setUp();
TaskSettings.getInstance().CONNECTION_TIMEOUT = 20000;
myRepository = new JiraRepository(new JiraRepositoryType());
myRepository.setUrl(JIRA_5_TEST_SERVER_URL);
myRepository.setUsername("buildtest");
myRepository.setPassword("buildtest");
}
示例4: update
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@Override
public void update(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
Presentation presentation = e.getPresentation();
if (project == null || project.isDisposed() || (ActionPlaces.MAIN_MENU.equals(e.getPlace()) && findFrame(e) == null)) {
presentation.setEnabled(false);
presentation.setText("");
presentation.setIcon(null);
}
else {
TaskManager taskManager = TaskManager.getManager(project);
LocalTask activeTask = taskManager.getActiveTask();
presentation.setVisible(true);
presentation.setEnabled(true);
if (isImplicit(activeTask) &&
taskManager.getAllRepositories().length == 0 &&
!TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO) {
presentation.setVisible(false);
}
else {
String s = getText(activeTask);
presentation.setText(s);
presentation.setIcon(activeTask.getIcon());
presentation.setDescription(activeTask.getSummary());
}
}
}
示例5: testTaskComboVisible
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
public void testTaskComboVisible() throws Exception {
TaskManager manager = TaskManager.getManager(getProject());
SwitchTaskCombo combo = new SwitchTaskCombo();
LocalTask defaultTask = manager.getActiveTask();
assertTrue(defaultTask.isDefault());
assertEquals(defaultTask.getCreated(), defaultTask.getUpdated());
Presentation presentation = doTest(combo);
assertFalse(presentation.isVisible());
try {
TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO = true;
presentation = doTest(combo);
assertTrue(presentation.isVisible());
}
finally {
TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO = false;
}
LocalTask task = manager.createLocalTask("test");
manager.activateTask(task, false);
presentation = doTest(combo);
assertTrue(presentation.isVisible());
manager.activateTask(defaultTask, false);
task = manager.getActiveTask();
assertTrue(task.isDefault());
presentation = doTest(combo);
if (!presentation.isVisible()) {
LocalTask activeTask = manager.getActiveTask();
System.out.println(activeTask);
System.out.println(activeTask.getCreated());
System.out.println(activeTask.getUpdated());
fail();
}
}
示例6: update
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@Override
public void update(AnActionEvent e)
{
Presentation presentation = e.getPresentation();
Project project = e.getData(CommonDataKeys.PROJECT);
ComboBoxButton button = (ComboBoxButton) presentation.getClientProperty(CUSTOM_COMPONENT_PROPERTY);
if(project == null || project.isDefault() || project.isDisposed() || button == null)
{
presentation.setEnabled(false);
presentation.setText("");
presentation.setIcon(null);
}
else
{
TaskManager taskManager = TaskManager.getManager(project);
LocalTask activeTask = taskManager.getActiveTask();
presentation.setVisible(true);
presentation.setEnabled(true);
if(isImplicit(activeTask) && taskManager.getAllRepositories().length == 0 && !TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO)
{
presentation.setVisible(false);
}
else
{
String s = getText(activeTask);
presentation.setText(s);
presentation.setIcon(activeTask.getIcon());
presentation.setDescription(activeTask.getSummary());
}
}
}
示例7: createRequestConfig
import com.intellij.tasks.config.TaskSettings; //導入方法依賴的package包/類
@NotNull
protected RequestConfig createRequestConfig()
{
TaskSettings tasksSettings = TaskSettings.getInstance();
RequestConfig.Builder builder = RequestConfig.custom().setConnectTimeout(3000).setSocketTimeout(tasksSettings.CONNECTION_TIMEOUT);
if(isUseProxy())
{
IdeHttpClientHelpers.ApacheHttpClient4.setProxyForUrlIfEnabled(builder, getUrl());
}
return builder.build();
}