Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-23 02:51:08 +0000
committermkersten2007-06-23 02:51:08 +0000
commit393921ed540ab62420a4e4048ccd903bc74ca0e9 (patch)
tree0a2972af09c1da3cca81c3d9e63feb8309d7a9ea /org.eclipse.mylyn.bugzilla.tests
parentf62348bfe50d32f3af3e5054ff9481da9bf7e86b (diff)
downloadorg.eclipse.mylyn.tasks-393921ed540ab62420a4e4048ccd903bc74ca0e9.tar.gz
org.eclipse.mylyn.tasks-393921ed540ab62420a4e4048ccd903bc74ca0e9.tar.xz
org.eclipse.mylyn.tasks-393921ed540ab62420a4e4048ccd903bc74ca0e9.zip
NEW - bug 193842: [api] review Mylyn 2.0 APIs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193842
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java3
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java56
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java27
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java3
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java1
8 files changed, 48 insertions, 56 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
index 475e60fca..f73831cb8 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
@@ -60,7 +60,7 @@ public abstract class AbstractBugzillaTest extends TestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
manager = TasksUiPlugin.getRepositoryManager();
TasksUiPlugin.getTaskListManager().getTaskList().reset();
manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
@@ -89,6 +89,7 @@ public abstract class AbstractBugzillaTest extends TestCase {
init(IBugzillaConstants.TEST_BUGZILLA_218_URL);
}
+ @SuppressWarnings("deprecation")
protected void init(String url) {
repository = new TaskRepository(DEFAULT_KIND, url);
Credentials credentials = TestUtil.readCredentials();
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
index 7dd4e3b2c..fc19a368a 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
@@ -49,7 +49,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
public void testFocedQuerySynchronization() throws CoreException {
init222();
TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
assertEquals(0, taskList.getAllTasks().size());
BugzillaRepositoryQuery bugQuery = new BugzillaRepositoryQuery(
IBugzillaConstants.TEST_BUGZILLA_222_URL,
@@ -62,13 +62,13 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
assertEquals(1, bugQuery.getChildren().size());
AbstractTask hit = (AbstractTask) bugQuery.getChildren().toArray()[0];
- assertTrue(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
- TasksUiPlugin.getDefault().getTaskDataManager().remove(hit.getRepositoryUrl(), hit.getTaskId());
+ assertTrue(TasksUiPlugin.getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
+ TasksUiPlugin.getTaskDataManager().remove(hit.getRepositoryUrl(), hit.getTaskId());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, bugQuery, null, true);
assertEquals(1, bugQuery.getChildren().size());
hit = (AbstractTask) bugQuery.getChildren().toArray()[0];
- assertTrue(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
+ assertTrue(TasksUiPlugin.getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
}
@@ -83,7 +83,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
BugzillaTask task = generateLocalTaskAndDownload("1");
assertNotNull(task);
- assertNotNull(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
+ assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
BugzillaTask retrievedTask = (BugzillaTask) taskList.getTask(task.getHandleIdentifier());
@@ -132,7 +132,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
public void testUpdate() throws Exception {
init222();
String taskNumber = "3";
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
assertEquals(0, TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks().size());
BugzillaTask task = this.generateLocalTaskAndDownload(taskNumber);
assertEquals("search-match-test 2", task.getSummary());
@@ -149,7 +149,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
public void testUpdateWithSubTasks() throws Exception {
init222();
String taskNumber = "23";
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
assertEquals(0, TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks().size());
BugzillaTask task = this.generateLocalTaskAndDownload(taskNumber);
assertNotNull(task.getChildren());
@@ -160,7 +160,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
init218();
BugzillaTask task = this.generateLocalTaskAndDownload("3");
assertNotNull(task);
- assertNotNull(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
+ assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
TasksUiPlugin.getTaskListManager().activateTask(task);
File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
@@ -179,12 +179,12 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
public void testSynchronize() throws CoreException {
init222();
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
// Get the task
BugzillaTask task = generateLocalTaskAndDownload("3");
- RepositoryTaskData taskData = TasksUiPlugin.getDefault().getTaskDataManager().getEditableCopy(task.getRepositoryUrl(), task.getTaskId());
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(), task.getTaskId());
assertNotNull(taskData);
TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
@@ -196,7 +196,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
taskData.setNewComment(newCommentText);
Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getDefault().getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
+ TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
// Submit changes
submit(task, taskData);
@@ -204,7 +204,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
// After submit task should be in SYNCHRONIZED state
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- RepositoryTaskData taskData2 = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ RepositoryTaskData taskData2 = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertFalse(taskData2.getLastModified().equals(taskData.getLastModified()));
// Still not read
assertFalse(taskData2.getLastModified().equals(task.getLastReadTimeStamp()));
@@ -216,11 +216,11 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
// because task doesn't have bug report (new query hit)
// Result: retrieved with no incoming status
// task.setSyncState(RepositoryTaskSyncState.SYNCHRONIZED);
- TasksUiPlugin.getDefault().getTaskDataManager().remove(task.getRepositoryUrl(), task.getTaskId());
+ TasksUiPlugin.getTaskDataManager().remove(task.getRepositoryUrl(), task.getTaskId());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, false, null);
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
RepositoryTaskData bugReport2 = null;
- bugReport2 = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ bugReport2 = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertNotNull(bugReport2);
assertEquals(task.getTaskId(), bugReport2.getId());
@@ -265,7 +265,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
init222();
String taskNumber = "33";
BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
- RepositoryTaskData taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertNotNull(task);
assertNotNull(taskData);
@@ -326,7 +326,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
}
task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber, new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertEquals(numAttached, taskData.getAttachments().size());
/* Test uploading a proper file */
@@ -344,7 +344,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber, new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertEquals(numAttached + 1, taskData.getAttachments().size());
// use assertion to track clean-up
@@ -356,14 +356,14 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
init222();
String taskID = "4";
BugzillaTask task4 = generateLocalTaskAndDownload(taskID);
- RepositoryTaskData taskData4 = TasksUiPlugin.getDefault().getTaskDataManager().getEditableCopy(task4.getRepositoryUrl(), task4.getTaskId());
+ RepositoryTaskData taskData4 = TasksUiPlugin.getTaskDataManager().getEditableCopy(task4.getRepositoryUrl(), task4.getTaskId());
assertNotNull(task4);
assertNotNull(taskData4);
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task4.getSynchronizationState());
assertEquals(taskID, taskData4.getId());
BugzillaTask task5 = generateLocalTaskAndDownload("5");
- RepositoryTaskData taskData5 = TasksUiPlugin.getDefault().getTaskDataManager().getEditableCopy(task5.getRepositoryUrl(), task5.getTaskId());
+ RepositoryTaskData taskData5 = TasksUiPlugin.getTaskDataManager().getEditableCopy(task5.getRepositoryUrl(), task5.getTaskId());
assertNotNull(task5);
assertNotNull(taskData5);
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task5.getSynchronizationState());
@@ -431,7 +431,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
init222();
BugzillaTask task7 = generateLocalTaskAndDownload("7");
- RepositoryTaskData recentTaskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task7.getRepositoryUrl(), task7.getTaskId());
+ RepositoryTaskData recentTaskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task7.getRepositoryUrl(), task7.getTaskId());
assertNotNull(recentTaskData);
TasksUiPlugin.getSynchronizationManager().setTaskRead(task7, true);
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task7.getSynchronizationState());
@@ -443,10 +443,10 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository, task7.getLastReadTimeStamp(),
TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertNotNull(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
- TasksUiPlugin.getDefault().getTaskDataManager().remove(task7.getRepositoryUrl(), task7.getTaskId());
+ assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
+ TasksUiPlugin.getTaskDataManager().remove(task7.getRepositoryUrl(), task7.getTaskId());
- assertNull(TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
+ assertNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task7.getSynchronizationState());
assertNotNull(task7.getLastReadTimeStamp());
@@ -464,7 +464,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
recentTaskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
}
// REMOVE ALL TASK DATA
- TasksUiPlugin.getDefault().getTaskDataManager().clear();
+ TasksUiPlugin.getTaskDataManager().clear();
connector.getTaskDataHandler().postTaskData(repository, recentTaskData, new NullProgressMonitor());
TasksUiPlugin.getSynchronizationManager().synchronizeChanged(connector, repository);
assertEquals(RepositoryTaskSyncState.INCOMING, task7.getSynchronizationState());
@@ -498,7 +498,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
*/
protected void timeTracker(int taskid, boolean enableDeadline) throws Exception {
BugzillaTask bugtask = generateLocalTaskAndDownload("" + taskid);
- RepositoryTaskData bugtaskdata = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
+ RepositoryTaskData bugtaskdata = TasksUiPlugin.getTaskDataManager().getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
assertNotNull(bugtaskdata);
assertEquals(taskid + "", bugtaskdata.getId());
assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, bugtask.getSynchronizationState());
@@ -542,7 +542,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
bugtaskdata.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), deadline);
// for (AbstractTask task : tasks) {
-// RepositoryTaskData taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(
+// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
// task.getHandleIdentifier());
bugtaskdata.setAttributeValue(BugzillaReportElement.ADD_COMMENT.getKeyString(), "New Estimate: "
+ estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime);
@@ -551,7 +551,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
synchAndAssertState(tasks, RepositoryTaskSyncState.SYNCHRONIZED);
- bugtaskdata = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
+ bugtaskdata = TasksUiPlugin.getTaskDataManager().getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
assertEquals(estimatedTime,
Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString())));
@@ -588,7 +588,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
boolean isPatch[] = { false, true, false, false, false, false, false, true, false, false };
boolean isObsolete[] = { false, true, false, true, false, false, false, false, false, false };
- RepositoryTaskData taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
task.getRepositoryUrl(), task.getTaskId());
Iterator<RepositoryAttachment> iter = taskData.getAttachments().iterator();
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java
index 90dbb83f8..b8d437122 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java
@@ -23,7 +23,6 @@ import org.eclipse.mylyn.internal.tasks.ui.TaskFactory;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.TaskList;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
@@ -104,6 +103,7 @@ public class BugzillaSearchEngineTest extends TestCase {
assertEquals(NUM_EXPECTED_HITS, hits.size());
}
+ @SuppressWarnings("deprecation")
private Set<AbstractTask> runQuery(String repositoryURL, String SearchString) throws Exception {
TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
BugzillaCorePlugin.REPOSITORY_KIND, repositoryURL);
@@ -115,7 +115,7 @@ public class BugzillaSearchEngineTest extends TestCase {
AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
BugzillaCorePlugin.REPOSITORY_KIND);
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
+// TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository));
connector.performQuery(repositoryQuery, repository, new NullProgressMonitor(), collector);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
index ec58a0dd6..c1d825c3c 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
@@ -45,8 +45,7 @@ public class DuplicateDetetionTest extends TestCase {
String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
@@ -63,8 +62,7 @@ public class DuplicateDetetionTest extends TestCase {
public void testNoStackTrace() throws Exception {
String fakeStackTrace = "this is not really a stacktrace";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(fakeStackTrace);
model.setNew(true);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
@@ -84,8 +82,7 @@ public class DuplicateDetetionTest extends TestCase {
String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)";
String extraText = "\nExtra text that isnt' part of the stack trace java:";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(extraText + "\n" + stackTrace + "\n");
model.setNew(true);
@@ -114,8 +111,7 @@ public class DuplicateDetetionTest extends TestCase {
"(JarURLConnection.java:124)\n" +
"at org.eclipse.jdt.internal.core.JavaElement\n.getURLContents(JavaElement.java:734)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -143,8 +139,7 @@ public class DuplicateDetetionTest extends TestCase {
" at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)\n" +
" at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -168,8 +163,7 @@ public class DuplicateDetetionTest extends TestCase {
" at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)\n" +
" at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -192,8 +186,7 @@ public class DuplicateDetetionTest extends TestCase {
" at testcase.main (testcase.java)\n" +
" at java.lang.reflect.Method.Invoke (Method.java)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -218,8 +211,7 @@ public class DuplicateDetetionTest extends TestCase {
" at java/util/Properties.load(Properties.java:192)\n" +
" at java/util/logging/LogManager.readConfiguration(L:555)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -243,8 +235,7 @@ public class DuplicateDetetionTest extends TestCase {
" at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)\n" +
" at java.lang.VirtualMachine.main (VirtualMachine.java:108)";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
index 22e65f947..c1924f814 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
@@ -67,7 +67,7 @@ public class EncodingTest extends AbstractBugzillaTest {
init222();
repository.setCharacterEncoding("UTF-8");
BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingId(repository, "57", new NullProgressMonitor());
- RepositoryTaskData taskData = TasksUiPlugin.getDefault().getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
+ RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
assertNotNull(task);
assertTrue(task.getSummary().equals("\u00E6"));//"\u05D0"));
String priority = null;
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
index 098bd69ee..c4e05b69f 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
@@ -57,8 +57,7 @@ public class TaskEditorTest extends TestCase {
IBugzillaConstants.TEST_BUGZILLA_222_URL);
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getDefault()
- .getTaskDataManager().getNewRepositoryTaskId());
+ BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager().getNewRepositoryTaskId());
model.setNew(true);
BugzillaRepositoryConnector.setupNewBugAttributes(repository, model);
NewTaskEditorInput editorInput = new NewTaskEditorInput(repository, model);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
index 0dfca0666..be9d7fdf4 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
@@ -57,7 +57,7 @@ public class TaskListNotificationManagerTest extends TestCase {
TasksUiPlugin.getTaskListManager().getTaskList().addTask(task1);
TasksUiPlugin.getTaskListManager().getTaskList().addTask(task2);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getDefault().getTaskListNotificationManager();
+ TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
notificationManager.collectNotifications();
task0 = TasksUiPlugin.getTaskListManager().getTaskList().getTask("local-0");
@@ -81,7 +81,7 @@ public class TaskListNotificationManagerTest extends TestCase {
assertEquals( RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
assertFalse(task.isNotified());
TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getDefault().getTaskListNotificationManager();
+ TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
notificationManager.collectNotifications();
assertTrue(notificationManager.getNotifications().contains(new TaskListNotificationIncoming(task)));
task = (AbstractTask) TasksUiPlugin.getTaskListManager().getTaskList().getTask(
@@ -98,7 +98,7 @@ public class TaskListNotificationManagerTest extends TestCase {
TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
TasksUiPlugin.getTaskListManager().getTaskList().addTask(hit, query);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getDefault().getTaskListNotificationManager();
+ TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
assertFalse(hit.isNotified());
notificationManager.collectNotifications();
for (ITaskListNotification notification : notificationManager.getNotifications()) {
@@ -117,7 +117,7 @@ public class TaskListNotificationManagerTest extends TestCase {
"summary");
TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
TasksUiPlugin.getTaskListManager().getTaskList().addTask(hit, query);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getDefault().getTaskListNotificationManager();
+ TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
notificationManager.collectNotifications();
for (ITaskListNotification notification : notificationManager.getNotifications()) {
notification.getLabel().equals(hit.getSummary());
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
index 1f5a3e093..2b10582e2 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
@@ -126,6 +126,7 @@ public class BugzillaQueryTest extends TestCase {
// taskData.getAttributeValue(BugzillaReportElement.PRIORITY.getKeyString()));
// }
+ @SuppressWarnings("deprecation")
public void testQueryViaConnector() throws Exception {
String queryUrlString = repository.getUrl()
+ "/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";

Back to the top