Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2006-10-13 20:42:53 -0400
committerspingel2006-10-13 20:42:53 -0400
commit274437b4d19b9be426e498c372eff3a61fd6ff4b (patch)
tree0f01b460e5162bc5e4ee390c04e70fcc42f09f51 /org.eclipse.mylyn.trac.core/src
parent9e88d4839c9bec3f3aa11b0d9fdae3f144e2d775 (diff)
downloadorg.eclipse.mylyn.tasks-274437b4d19b9be426e498c372eff3a61fd6ff4b.tar.gz
org.eclipse.mylyn.tasks-274437b4d19b9be426e498c372eff3a61fd6ff4b.tar.xz
org.eclipse.mylyn.tasks-274437b4d19b9be426e498c372eff3a61fd6ff4b.zip
Progress on: 154629: preselect ticket status on Trac search page
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154629
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java6
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java9
2 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java
index 345be816a..146b28d06 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java
@@ -91,8 +91,12 @@ public abstract class AbstractTracClient implements ITracClient {
return (data.versions != null) ? data.versions.toArray(new TracVersion[0]) : null;
}
+ public boolean hasAttributes() {
+ return (data.lastUpdate != 0);
+ }
+
public void updateAttributes(IProgressMonitor monitor, boolean force) throws TracException {
- if (data.lastUpdate == 0 || force) {
+ if (!hasAttributes() || force) {
updateAttributes(monitor);
data.lastUpdate = System.currentTimeMillis();
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java
index 90c1430d8..3e2188b14 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java
@@ -115,6 +115,15 @@ public interface ITracClient {
void validate() throws TracException;
/**
+ * Returns true, if the repository details are cached. If this method
+ * returns true, invoking <tt>updateAttributes(monitor, false)</tt> will
+ * return without opening a connection.
+ *
+ * @see #updateAttributes(IProgressMonitor, boolean)
+ */
+ boolean hasAttributes();
+
+ /**
* Updates cached repository details: milestones, versions etc.
*
* @throws TracException

Back to the top