blob: cc93f4fd6ae4e7c37f700c89a99c056bb4d4c06d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Mylyn project committers and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.mylyn.internal.tasks.core;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask.PriorityLevel;
import org.eclipse.mylyn.tasks.core.ITask;
/**
* Holds orphaned or uncategorized tasks for a given repository
*
* @author Rob Elves
*/
public class UnmatchedTaskContainer extends AbstractTaskCategory {
public static final String LABEL = "Uncategorized";
public static final String HANDLE = "orphans";
private String repositoryUrl;
private final String connectorKind;
public UnmatchedTaskContainer(String connectorKind, String repositoryUrl) {
super(repositoryUrl + "-" + HANDLE);
this.repositoryUrl = repositoryUrl;
this.connectorKind = connectorKind;
}
@Override
public String getPriority() {
return PriorityLevel.P1.toString();
}
@Override
public String getSummary() {
return "Unmatched [" + getRepositoryUrl() + "]";
}
@Override
public boolean isUserManaged() {
return false;
}
public String getRepositoryUrl() {
return repositoryUrl;
}
public String getConnectorKind() {
return connectorKind;
}
/**
* setting will also refactor handle
*/
public void setRepositoryUrl(String repositoryUrl) {
this.repositoryUrl = repositoryUrl;
this.setHandleIdentifier(repositoryUrl + "-" + HANDLE);
}
@Override
public boolean contains(String handle) {
for (ITask child : getChildrenInternal()) {
if (child.getHandleIdentifier().equals(handle)) {
return true;
}
}
return false;
}
@Override
@Deprecated
public boolean isUserDefined() {
return isUserManaged();
}
}
|