Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2007-11-07 07:33:27 +0000
committerspingel2007-11-07 07:33:27 +0000
commit2c0c1eac2aaab8112dee5a706346d95b19bb1fb8 (patch)
treeffe74a8a42659d059c2b9dbf85096a0929a0f8da /org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal
parent8220ddc571a9400be01bca85e8e12cf0e1f5cf2b (diff)
downloadorg.eclipse.mylyn.tasks-2c0c1eac2aaab8112dee5a706346d95b19bb1fb8.tar.gz
org.eclipse.mylyn.tasks-2c0c1eac2aaab8112dee5a706346d95b19bb1fb8.tar.xz
org.eclipse.mylyn.tasks-2c0c1eac2aaab8112dee5a706346d95b19bb1fb8.zip
NEW - bug 143011: [api] synchronization jobs should be cancellable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=143011
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java12
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java20
3 files changed, 8 insertions, 28 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
index 914ded788..4d83b87c2 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
@@ -8,8 +8,6 @@
package org.eclipse.mylyn.internal.trac.ui.editor;
-import java.net.MalformedURLException;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
@@ -63,8 +61,6 @@ public class TracRenderingEngine extends AbstractRenderingEngine {
throw new CoreException(TracCorePlugin.toStatus(new TracException(
"Preview is available only in XML-RPC access mode"), repository));
}
- } catch (MalformedURLException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
} catch (TracException e) {
throw new CoreException(TracCorePlugin.toStatus(e, repository));
} finally {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
index bd6c6544e..c5e1be52c 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
@@ -9,7 +9,6 @@
package org.eclipse.mylyn.internal.trac.ui.wizard;
import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -99,13 +98,7 @@ public class NewTracTaskPage extends WizardPage {
private void updateAttributesFromRepository() {
TracRepositoryConnector connector = (TracRepositoryConnector) TasksUiPlugin.getRepositoryManager()
.getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client;
- try {
- client = connector.getClientManager().getRepository(taskRepository);
- } catch (MalformedURLException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e, taskRepository));
- return;
- }
+ final ITracClient client = connector.getClientManager().getRepository(taskRepository);
if (!client.hasAttributes()) {
try {
@@ -121,7 +114,8 @@ public class NewTracTaskPage extends WizardPage {
getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(), taskRepository));
+ StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(),
+ taskRepository));
return;
} catch (InterruptedException e) {
return;
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
index a04e7075a..81971f075 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
@@ -8,7 +8,6 @@
package org.eclipse.mylyn.internal.trac.ui.wizard;
import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Map;
@@ -364,24 +363,14 @@ public class TracCustomQueryPage extends AbstractRepositoryQueryPage {
private boolean hasAttributes() {
TracRepositoryConnector connector = (TracRepositoryConnector) TasksUiPlugin.getRepositoryManager()
.getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- try {
- ITracClient client = connector.getClientManager().getRepository(repository);
- return client.hasAttributes();
- } catch (MalformedURLException e) {
- return false;
- }
+ ITracClient client = connector.getClientManager().getRepository(repository);
+ return client.hasAttributes();
}
private void updateAttributesFromRepository(final boolean force) {
TracRepositoryConnector connector = (TracRepositoryConnector) TasksUiPlugin.getRepositoryManager()
.getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client;
- try {
- client = connector.getClientManager().getRepository(repository);
- } catch (MalformedURLException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e, repository));
- return;
- }
+ final ITracClient client = connector.getClientManager().getRepository(repository);
if (!client.hasAttributes() || force) {
try {
@@ -404,7 +393,8 @@ public class TracCustomQueryPage extends AbstractRepositoryQueryPage {
service.run(true, true, runnable);
}
} catch (InvocationTargetException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(), repository));
+ StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(),
+ repository));
return;
} catch (InterruptedException e) {
return;

Back to the top