本文整理汇总了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);
}
}
示例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()));
}
}
示例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());
}
}
}
示例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();
}
示例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");
}
示例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());
}
}
}
示例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();
}
}
示例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());
}
}
}
示例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();
}
示例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);
}
}