当前位置: 首页>>代码示例>>Java>>正文


Java TaskSettings类代码示例

本文整理汇总了Java中com.intellij.tasks.config.TaskSettings的典型用法代码示例。如果您正苦于以下问题:Java TaskSettings类的具体用法?Java TaskSettings怎么用?Java TaskSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TaskSettings类属于com.intellij.tasks.config包,在下文中一共展示了TaskSettings类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureHttpClient

import com.intellij.tasks.config.TaskSettings; //导入依赖的package包/类
protected void configureHttpClient(HttpClient client) {
  client.getParams().setConnectionManagerTimeout(3000);
  client.getParams().setSoTimeout(TaskSettings.getInstance().CONNECTION_TIMEOUT);
  if (isUseProxy()) {
    HttpConfigurable proxy = HttpConfigurable.getInstance();
    client.getHostConfiguration().setProxy(proxy.PROXY_HOST, proxy.PROXY_PORT);
    if (proxy.PROXY_AUTHENTICATION) {
      AuthScope authScope = new AuthScope(proxy.PROXY_HOST, proxy.PROXY_PORT);
      Credentials credentials = getCredentials(proxy.PROXY_LOGIN, proxy.getPlainProxyPassword(), proxy.PROXY_HOST);
      client.getState().setProxyCredentials(authScope, credentials);
    }
  }
  if (isUseHttpAuthentication()) {
    client.getParams().setCredentialCharset("UTF-8");
    client.getParams().setAuthenticationPreemptive(true);
    client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(getUsername(), getPassword()));
  }
  else {
    client.getState().clearCredentials();
    client.getParams().setAuthenticationPreemptive(false);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:BaseRepositoryImpl.java

示例2: configureHttpClient

import com.intellij.tasks.config.TaskSettings; //导入依赖的package包/类
protected void configureHttpClient(HttpClient client) {
  client.getParams().setConnectionManagerTimeout(3000);
  client.getParams().setSoTimeout(TaskSettings.getInstance().CONNECTION_TIMEOUT);
  if (isUseProxy()) {
    HttpConfigurable proxy = HttpConfigurable.getInstance();
    client.getHostConfiguration().setProxy(proxy.PROXY_HOST, proxy.PROXY_PORT);
    if (proxy.PROXY_AUTHENTICATION) {
      AuthScope authScope = new AuthScope(proxy.PROXY_HOST, proxy.PROXY_PORT);
      Credentials credentials = getCredentials(proxy.PROXY_LOGIN, proxy.getPlainProxyPassword(), proxy.PROXY_HOST);
      client.getState().setProxyCredentials(authScope, credentials);
    }
  }
  if (isUseHttpAuthentication()) {
    client.getParams().setCredentialCharset("UTF-8");
    client.getParams().setAuthenticationPreemptive(true);
    client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(getUsername(), getPassword()));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:BaseRepositoryImpl.java

示例3: 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());
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:SwitchTaskCombo.java

示例4: 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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:NewBaseRepositoryImpl.java

示例5: 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");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JiraIntegrationTest.java

示例6: 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());
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:SwitchTaskCombo.java

示例7: 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();
    }
  }
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:41,代码来源:TaskUiTest.java

示例8: 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());
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:33,代码来源:SwitchTaskCombo.java

示例9: 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();
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:13,代码来源:NewBaseRepositoryImpl.java

示例10: configureHttpClient

import com.intellij.tasks.config.TaskSettings; //导入依赖的package包/类
protected void configureHttpClient(HttpClient client)
{
	client.getParams().setConnectionManagerTimeout(3000);
	client.getParams().setSoTimeout(TaskSettings.getInstance().CONNECTION_TIMEOUT);
	if(isUseProxy())
	{
		HttpConfigurable proxy = HttpConfigurable.getInstance();
		client.getHostConfiguration().setProxy(proxy.PROXY_HOST, proxy.PROXY_PORT);
		if(proxy.PROXY_AUTHENTICATION)
		{
			AuthScope authScope = new AuthScope(proxy.PROXY_HOST, proxy.PROXY_PORT);
			Credentials credentials = getCredentials(proxy.getProxyLogin(), proxy.getPlainProxyPassword(), proxy.PROXY_HOST);
			client.getState().setProxyCredentials(authScope, credentials);
		}
	}
	if(isUseHttpAuthentication())
	{
		client.getParams().setCredentialCharset("UTF-8");
		client.getParams().setAuthenticationPreemptive(true);
		client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(getUsername(), getPassword()));
	}
	else
	{
		client.getState().clearCredentials();
		client.getParams().setAuthenticationPreemptive(false);
	}
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:28,代码来源:BaseRepositoryImpl.java


注:本文中的com.intellij.tasks.config.TaskSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。