This commit was manufactured by cvs2svn to create branch 'e_3_2_m_1_0'.
Sprout from master 2006-12-23 00:40:36 UTC mkersten 'Version update'
Delete:
org.eclipse.mylyn.sandbox.tests/.classpath
org.eclipse.mylyn.sandbox.tests/.cvsignore
org.eclipse.mylyn.sandbox.tests/.project
org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.jdt.core.prefs
org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.mylar.tasklist.prefs
org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
org.eclipse.mylyn.sandbox.tests/build.properties
org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/AllSandboxTests.java
org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/BugzillaActiveSearchTest.java
org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/CollabNetRegularExpressionTest.java
org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
diff --git a/org.eclipse.mylyn.sandbox.tests/.classpath b/org.eclipse.mylyn.sandbox.tests/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/org.eclipse.mylyn.sandbox.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.sandbox.tests/.cvsignore b/org.eclipse.mylyn.sandbox.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/org.eclipse.mylyn.sandbox.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.mylyn.sandbox.tests/.project b/org.eclipse.mylyn.sandbox.tests/.project
deleted file mode 100644
index ac678ea..0000000
--- a/org.eclipse.mylyn.sandbox.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylar.sandbox.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0ccdeb5..0000000
--- a/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Fri Oct 13 22:09:55 EDT 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.mylar.tasklist.prefs b/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index 407161f..0000000
--- a/org.eclipse.mylyn.sandbox.tests/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:24 PDT 2006
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index d842884..0000000
--- a/org.eclipse.mylyn.sandbox.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylar Sandbox Tests Plug-in
-Bundle-SymbolicName: org.eclipse.mylar.sandbox.tests
-Bundle-Version: 0.0.0
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.mylar.context.core,
- org.eclipse.mylar.context.ui,
- org.eclipse.mylar.java,
- org.eclipse.jdt.core,
- org.eclipse.mylar.tasks.ui,
- org.eclipse.core.resources,
- org.eclipse.ui.browser,
- org.junit,
- org.eclipse.mylar.bugzilla.core,
- org.eclipse.mylar.bugzilla.ui,
- org.eclipse.jface.text,
- org.eclipse.ui.ide,
- org.eclipse.mylar.java.tests,
- org.eclipse.mylar.tasks.core,
- org.eclipse.mylar.monitor,
- org.eclipse.ui.forms,
- org.eclipse.mylar.sandbox
-Eclipse-LazyStart: true
diff --git a/org.eclipse.mylyn.sandbox.tests/build.properties b/org.eclipse.mylyn.sandbox.tests/build.properties
deleted file mode 100644
index 34d2e4d..0000000
--- a/org.eclipse.mylyn.sandbox.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/AllSandboxTests.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/AllSandboxTests.java
deleted file mode 100644
index 93bd96a..0000000
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/AllSandboxTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 Mylar 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.mylar.sandbox.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllSandboxTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylar.sandbox.tests");
- //$JUnit-BEGIN$
-
-// suite.addTestSuite(SharedTaskFolderTest.class);
-// suite.addTestSuite(BugzillaActiveSearchTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/BugzillaActiveSearchTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/BugzillaActiveSearchTest.java
deleted file mode 100644
index 47461ee..0000000
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/BugzillaActiveSearchTest.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 University Of British Columbia 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
- *
- * Contributors:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Nov 19, 2004
- */
-package org.eclipse.mylar.sandbox.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylar.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylar.internal.context.core.IActiveSearchListener;
-import org.eclipse.mylar.internal.sandbox.bridge.bugs.BugzillaMylarSearch;
-import org.eclipse.mylar.internal.sandbox.bridge.bugs.BugzillaReportInfo;
-import org.eclipse.mylar.internal.sandbox.bridge.bugs.MylarBugsManager;
-import org.eclipse.mylar.java.tests.search.SearchPluginTestHelper;
-import org.eclipse.mylar.java.tests.search.WorkspaceSetupHelper;
-import org.eclipse.mylar.tasks.core.TaskCategory;
-import org.eclipse.mylar.tasks.core.TaskRepository;
-import org.eclipse.mylar.tasks.ui.TaskListManager;
-import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
-
-/*
- * TEST CASES TO HANDLE 1. what is here 2. different scopes ( local and remote )
- * 3. no bugs 4. offline bugs
- *
- * DEGREE OF SEPARATIONS 1 Local bug, qualified reference 2 local bug,
- * unqualified reference 3 remote bug, qualified reference 4 remote bug,
- * unqualified reference 5 NONE
- */
-
-/**
- * Test the bugzilla search functionality of the bridge
- *
- * @author Shawn Minto
- */
-public class BugzillaActiveSearchTest extends TestCase {
-
- private TaskRepository repository;
-
- // SHAWNTODO Add tests for the different types of searches (local qual,
- // local unqual, fully qual, unqual) and mock up a bugs db for testing
-
- /** The expected number of results when searching for astNode */
- // SHAWNTODO add back in when we have a test server mocked up
- // private static final int NUM_AST_RESULTS = 302;
- //
- // private static final int NUM_AST_SETSOURCERANGE_RESULTS = 15;
- /** list to add collectors to when notified */
- private List<List<?>> lists = new ArrayList<List<?>>();
-
- private IType astNodeType;
-
- @Override
- protected void setUp() throws Exception {
- WorkspaceSetupHelper.setupWorkspace();
- repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- IJavaProject jp = WorkspaceSetupHelper.getJdtCoreDomProject();
- astNodeType = WorkspaceSetupHelper.getType(jp, "org.eclipse.jdt.core.dom.ASTNode");
- }
-
- @Override
- protected void tearDown() throws Exception {
- WorkspaceSetupHelper.clearDoiModel();
- TasksUiPlugin.getRepositoryManager().removeRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- /**
- * Test adding and removing ISearchCompletedListeners
- */
- public void testSearchCompletedListenerAddAndRemove() {
- lists.clear();
-
- // create 2 listeners
- IActiveSearchListener l1 = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> l) {
- lists.add(l);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
- IActiveSearchListener l2 = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> l) {
- lists.add(l);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
-
- BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.UNQUAL, astNodeType,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-
- // add the first listener
- s.addListener(l1);
- // remove the first listener
- s.removeListener(l1);
-
- // perform the search
- SearchPluginTestHelper.search(s, l2);
-
- // make sure that only the second listener added has any results left
- assertTrue("listener was not removed", lists.size() >= 1 && !l1.resultsGathered());
- assertTrue("listener was not added", lists.size() == 1);
-
- // display the time it took for the search
- MylarBugsManager.getBridge().removeFromLandmarksHash(astNodeType);
- }
-
- /**
- * Tests that the bridge gets the right data for us This test is wierd
- * because it waits on results.
- */
- public void testBridge() {
- lists.clear();
- BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.UNQUAL, astNodeType,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-
- IActiveSearchListener l = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> results) {
- lists.add(results);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
-
- // perform the search
- SearchPluginTestHelper.search(s, l);
-
- // make sure we got the right number of bugs back
- assertTrue("No collector returned", lists.size() != 0);
- List<?> c = lists.get(0);
- assertTrue("Results not the right size", c.size() > 0); // TODO should
- // be
- // assertEquals
- // on expected
- // size
-
- // display the time it took for the search and the results returned
- MylarBugsManager.getBridge().removeFromLandmarksHash(astNodeType);
-
- }
-
- /**
- * Tests that the bridge saves the results of a search so that it can be
- * used later
- */
- public void testSaveResults() {
- lists.clear();
- BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.UNQUAL, astNodeType,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-
- IActiveSearchListener l = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> results) {
- lists.add(results);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
-
- // perform the search
- SearchPluginTestHelper.search(s, l);
-
- // do an inital search
- assertTrue("No collectors returned", lists.size() != 0);
- List<?> c = lists.get(0);
- assertTrue("Results not the right size", c.size() > 0); // TODO should
- // be
- // assertEquals
- // on expected
- // size
-
- // check that the search has been saved
- List<BugzillaReportInfo> saved = MylarBugsManager.getBridge().getFromLandmarksHash(astNodeType,
- BugzillaMylarSearch.UNQUAL);
- assertTrue("Results not cached", saved != null);
- assertTrue("Results not the right size", saved.size() > 0); // TODO
- // should be
- // assertEquals
- // on
- // expected
- // size
-
- assertTrue(c.containsAll(saved) && saved.containsAll(c));
- MylarBugsManager.getBridge().removeFromLandmarksHash(astNodeType);
- }
-
- public void testLocalBugUnqual() throws InterruptedException {
- lists.clear();
-
- String bugPrefix = "<server>-";
-
- // TaskList t = MylarTaskListPlugin.getTaskListManager().getTaskList();
- // MylarTaskListPlugin.getTaskListManager().setTaskList(t);
- TaskListManager manager = TasksUiPlugin.getTaskListManager();
- TaskCategory cat = new TaskCategory("Testing Category", manager.getTaskList());
- manager.getTaskList().addCategory(cat);
- BugzillaTask bugTask1 = new BugzillaTask(bugPrefix + 94185, "<bugzilla info>", true);
-
- manager.getTaskList().moveToContainer(cat, bugTask1);
- // cat.addTask(bugTask1);
- while (bugTask1.isSynchronizing()) {
- Thread.sleep(500);
- }
- BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 3692, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask2);
- // cat.addTask(bugTask2);
- while (bugTask2.isSynchronizing()) {
- Thread.sleep(500);
- }
- BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask3);
- // cat.addTask(bugTask3);
- while (bugTask3.isSynchronizing()) {
- Thread.sleep(500);
- }
-
- BugzillaTask bugTask4 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask4);
- // cat.addTask(bugTask4);
- while (bugTask4.isSynchronizing()) {
- Thread.sleep(500);
- }
-
- BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.LOCAL_UNQUAL, astNodeType,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-
- IActiveSearchListener l = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> results) {
- lists.add(results);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
-
- // perform the search
- SearchPluginTestHelper.search(s, l);
-
- // do an inital search
- assertTrue("No collectors returned", lists.size() != 0);
- List<?> c = lists.get(0);
- assertEquals("Results not the right size", 3, c.size());
-
- MylarBugsManager.getBridge().removeFromLandmarksHash(astNodeType);
- TasksUiPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
- }
-
- // TODO need to test a bug that wraps...should fail since we can only search
- // on a single line
- public void testLocalBugFullyQual() throws InterruptedException {
- lists.clear();
-
- String bugPrefix = "Bugzilla-";
-
- // TaskList t = MylarTaskListPlugin.getTaskListManager().getTaskList();
- // MylarTaskListPlugin.getTaskListManager().setTaskList(t);
- TaskListManager manager = TasksUiPlugin.getTaskListManager();
- TaskCategory cat = new TaskCategory("Testing Category", manager.getTaskList());
- manager.getTaskList().addCategory(cat);
- BugzillaTask bugTask1 = new BugzillaTask(bugPrefix + 94185, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask1);
- // cat.addTask(bugTask1);
- while (bugTask1.isSynchronizing()) {
- Thread.sleep(500);
- }
-
- BugzillaTask bugTask2 = new BugzillaTask(bugPrefix + 9583, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask2);
- // cat.addTask(bugTask2);
- while (bugTask2.isSynchronizing()) {
- Thread.sleep(500);
- }
- BugzillaTask bugTask3 = new BugzillaTask(bugPrefix + 3693, "<bugzilla info>", true);
- manager.getTaskList().moveToContainer(cat, bugTask3);
- // cat.addTask(bugTask3);
- while (bugTask3.isSynchronizing()) {
- Thread.sleep(500);
- }
-
- BugzillaMylarSearch s = new BugzillaMylarSearch(BugzillaMylarSearch.LOCAL_QUAL, astNodeType,
- IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-
- IActiveSearchListener l = new IActiveSearchListener() {
- private boolean gathered = false;
-
- public void searchCompleted(List<?> results) {
- lists.add(results);
- gathered = true;
- }
-
- public boolean resultsGathered() {
- return gathered;
- }
- };
-
- // perform the search
- SearchPluginTestHelper.search(s, l);
-
- // do an inital search
- assertTrue("No collectors returned", lists.size() != 0);
- List<?> c = lists.get(0);
- assertEquals("Results not the right size", 1, c.size());
-
- MylarBugsManager.getBridge().removeFromLandmarksHash(astNodeType);
- TasksUiPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
- }
-
-}
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/CollabNetRegularExpressionTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/CollabNetRegularExpressionTest.java
deleted file mode 100644
index 8d6200f..0000000
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/CollabNetRegularExpressionTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-///*******************************************************************************
-// * Copyright (c) 2004 - 2006 University Of British Columbia 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
-// *
-// * Contributors:
-// * University Of British Columbia - initial API and implementation
-// *******************************************************************************/
-//
-//package org.eclipse.mylar.sandbox.tests;
-//
-//import java.io.BufferedReader;
-//import java.io.IOException;
-//import java.io.StringReader;
-//
-//import junit.framework.TestCase;
-//
-//import org.eclipse.core.runtime.IProgressMonitor;
-//import org.eclipse.core.runtime.NullProgressMonitor;
-//import org.eclipse.core.runtime.OperationCanceledException;
-//import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants;
-//import org.eclipse.mylar.internal.bugzilla.ui.BugzillaUiPlugin;
-//import org.eclipse.mylar.internal.bugzilla.ui.search.BugzillaSearchHit;
-//
-//import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;
-//import com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression;
-//
-///**
-// * @author Mik Kersten
-// * @author Marco Sferra
-// */
-//public class CollabNetRegularExpressionTest extends TestCase {
-//
-// private static final RegularExpression reColVal1 = new RegularExpression(
-// "<span class=\"issue_type\">([^>]+)</span>", "i");
-//
-// private static final RegularExpression reColVal2 = new RegularExpression("<span class=\"priority\">([^>]+)</span>",
-// "i");
-//
-// private static final RegularExpression reColVal3 = new RegularExpression("<span class=\"platform\">([^>]+)</span>",
-// "i");
-//
-// private static final RegularExpression reColVal4 = new RegularExpression("<span class=\"owner\">([^>]+)</span>",
-// "i");
-//
-// private static final RegularExpression reColVal5 = new RegularExpression("<span class=\"status\">([^>]+)</span>",
-// "i");
-//
-// private static final RegularExpression reColVal6 = new RegularExpression(
-// "<span class=\"resolution\">([^>]+)</span>", "i");
-//
-// private static final RegularExpression reColVal7 = new RegularExpression("<span class=\"summary\">([^>]+)</span>",
-// "i");
-//
-// public void testMatchV220() throws IOException {
-// BufferedReader in = new BufferedReader(new StringReader(EXAMPLE_REPORT));
-// Match match = new Match();
-// BugzillaSearchHit hit = createHit(new NullProgressMonitor(), in, match,
-// IBugzillaConstants.ECLIPSE_BUGZILLA_URL, 123);
-// assertEquals("nor", hit.getSeverity());
-// assertEquals("P2", hit.getPriority());
-// }
-//
-// BugzillaSearchHit createHit(IProgressMonitor monitor, BufferedReader in, Match match, String serverUrl, int id)
-// throws IOException {
-//
-// String severity = "none";
-// String priority = "none";
-// String platform = "none";
-// String owner = "none";
-// String state = "none";
-// String result = "none";
-// String summary = "none";
-//
-// do {
-// if (monitor.isCanceled()) {
-// throw new OperationCanceledException("Search cancelled");
-// }
-// String line = in.readLine();
-// if (line == null) {
-// break;
-// }
-// line = line.trim();
-// if (severity.equals("none")) {
-// severity = readSeverity(line);
-// }
-// if (priority.equals("none")) {
-// priority = readPriority(line);
-// }
-// if (platform.equals("none")) {
-// platform = readPlatform(line);
-// }
-// if (owner.equals("none")) {
-// owner = readOwner(line);
-// }
-// if (state.equals("none")) {
-// state = readStatus(line);
-// }
-// if (result.equals("none")) {
-// result = readResolution(line);
-// }
-// if (summary.equals("none")) {
-// summary = readSummary(line);
-// }
-// } while (summary.equals("none"));
-//
-// String description = "<activate to view description>";
-//
-// // String server = "<unknown server>";
-//
-// String query = "";
-// try {
-// String recentQuery = BugzillaUiPlugin.getMostRecentQuery();
-// if (recentQuery != null) {
-// query = recentQuery;
-// }
-// // server = BugzillaPlugin.getDefault().getServerName();
-// } catch (Exception exception1) {
-// }
-// return new BugzillaSearchHit(serverUrl, id, description, severity, priority, platform, state, result, owner,
-// query);
-//
-// }
-//
-// private static final String EXAMPLE_REPORT = "<tr class=\"b\">\n" + "<td>\n"
-// + "<a href=\"show_bug.cgi?id=1\">1</a>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"issue_type\">nor</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"priority\">P2</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"platform\">All</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"owner\">euxx</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"status\">NEW</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"resolution\">no result</span>\n" + "</td>\n"
-// + "<td class=\"red\"><span class=\"summary\">Security context is not getting propagated</span>\n"
-// + "</td>\n" + "</tr>\n";
-//
-// public static String readSeverity(String line) {
-// Match match = new Match();
-// if (reColVal1.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readPriority(String line) {
-// Match match = new Match();
-// if (reColVal2.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readPlatform(String line) {
-// Match match = new Match();
-// if (reColVal3.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readOwner(String line) {
-// Match match = new Match();
-// if (reColVal4.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readStatus(String line) {
-// Match match = new Match();
-// if (reColVal5.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readResolution(String line) {
-// Match match = new Match();
-// if (reColVal6.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-// public static String readSummary(String line) {
-// Match match = new Match();
-// if (reColVal7.matches(line, match)) {
-// return match.getCapturedText(1);
-// } else {
-// return "none";
-// }
-// }
-//
-//}
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
deleted file mode 100644
index a4142e5..0000000
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.mylar.sandbox.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.context.core.InteractionEvent;
-import org.eclipse.mylar.internal.context.core.MylarContext;
-import org.eclipse.mylar.internal.sandbox.MylarSandboxPlugin;
-import org.eclipse.mylar.internal.sandbox.share.SwitchTaskDataFolderAction;
-import org.eclipse.mylar.tasks.core.ITask;
-import org.eclipse.mylar.tasks.core.Task;
-import org.eclipse.mylar.tasks.ui.TaskListManager;
-import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
-
-/**
- * Tests changing the shared task directory
- * currently in use.
- *
- * @author Wesley Coelho
- */
-public class SharedTaskFolderTest extends TestCase{
-
- private File sharedDataRootDir = null;
- private File bobsDataDir = null;
- private File jillsDataDir = null;
- private String originalMainDataDir = null;
- private String originalSharedDataDir = null;
- private TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- /**
- * Set up a shared task directory structure by creating some data
- * in the main directory and copying it to the shared directories.
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- //Get the original main data directory so that it can be reset later
- originalMainDataDir = TasksUiPlugin.getDefault().getDataDirectory();
-
- //Create a task to make sure there is some data in the main directory
- createAndSaveTask("Task1");
-
- //Create the shared data directory structure
- sharedDataRootDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "SharedDataDir");
- sharedDataRootDir.mkdir();
- assertTrue(sharedDataRootDir.exists());
-
- bobsDataDir = new File(sharedDataRootDir.getPath() + File.separator + "Bob");
- bobsDataDir.mkdir();
- assertTrue(bobsDataDir.exists());
-
- jillsDataDir = new File(sharedDataRootDir.getPath() + File.separator + "Jill");
- jillsDataDir.mkdir();
- assertTrue(jillsDataDir.exists());
-
- //Start the shared data dirs off with copies of the main data
- File mainDataDir = new File(originalMainDataDir);
- for ( File currFile : mainDataDir.listFiles()) {
- File destFile = new File(bobsDataDir.getPath() + File.separator + currFile.getName());
- copy(currFile, destFile);
- destFile = new File(jillsDataDir.getPath() + File.separator + currFile.getName());
- copy(currFile, destFile);
- }
-
- //Set the shared data dir
- originalSharedDataDir = MylarSandboxPlugin.getDefault().getSharedDataDirectoryManager().getSharedDataDirectory();
-// MylarReportsPlugin.getDefault().getPreferenceStore().setValue(MylarReportsPlugin.SHARED_TASK_DATA_ROOT_DIR, sharedDataRootDir.getPath());
- MylarSandboxPlugin.getDefault().getSharedDataDirectoryManager().setSharedDataDirectory(sharedDataRootDir.getPath());
- assertFalse(TasksUiPlugin.getDefault().getDataDirectory().equals(sharedDataRootDir.getPath()));
- }
-
- /**
- * Tests moving the main mylar data directory to another location
- */
- public void testSharedDataDirSwitching(){
- SwitchTaskDataFolderAction switchAction = new SwitchTaskDataFolderAction();
-
- //Create a task to appear in the main data dir only
- ITask mainDataDirTask = createAndSaveTask("Main Dir Task");
-
- //Check the options of folders to switch to
- String[] sharedDataFolderOptions = switchAction.getFolderStrings();
- //Note that index 0 is a string indicating a switch back to the main data directory
- assertTrue(sharedDataFolderOptions[0].equals("Bob"));
- assertTrue(sharedDataFolderOptions[1].equals("Jill"));
-
- //Switch to Bob's folder
- switchAction.switchTaskDataFolder(sharedDataFolderOptions[0]);
-
- //Check that the task created in the main data dir isn't there
- File mainDataDirTaskFile = ContextCorePlugin.getContextManager().getFileForContext(mainDataDirTask.getHandleIdentifier());
-// File mainDataDirTaskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + mainDataDirTask.getContextPath() + MylarTaskListPlugin.FILE_EXTENSION);
- assertFalse(mainDataDirTaskFile.exists());
- assertNull(manager.getTaskList().getTask(mainDataDirTask.getHandleIdentifier()));
-
- fail(); // uncomment below
- //Create a new task in bob's task data folder only and check that it exists in the right place
-// ITask bobsTask = createAndSaveTask("Bob's Task");
-//
-// File bobsTaskFile = new File(bobsDataDir.getPath() + File.separator +
-// ContextCorePlugin.getContextManager().getFileForContext(mainDataDirTask.getHandleIdentifier()).getName());
-// assertTrue(bobsTaskFile.exists());
-// bobsTaskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + bobsTask.getContextPath() + MylarTaskListPlugin.FILE_EXTENSION);
-// assertTrue(bobsTaskFile.exists());
-// assertNotNull(manager.getTaskForHandle(bobsTask.getHandleIdentifier(), false));
-//
-// //Switch to Jill's folder
-// switchAction.switchTaskDataFolder(sharedDataFolderOptions[1]);
-//
-// //Check that Bob's task isn't there
-// bobsTaskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + bobsTask.getContextPath() + MylarTaskListPlugin.FILE_EXTENSION);
-// assertFalse(bobsTaskFile.exists());
-// assertNull(manager.getTaskForHandle(bobsTask.getHandleIdentifier(), false));
-//
-// //Switch back to Bob's folder
-// switchAction.switchTaskDataFolder(sharedDataFolderOptions[0]);
-//
-// //Check that bob's task is still there
-// bobsTaskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + bobsTask.getContextPath() + MylarTaskListPlugin.FILE_EXTENSION);
-// assertTrue(bobsTaskFile.exists());
-// assertNotNull(manager.getTaskForHandle(bobsTask.getHandleIdentifier(), false));
-//
-// //Switch back to the main data folder
-// sharedDataFolderOptions = switchAction.getFolderStrings();
-// switchAction.switchTaskDataFolder(sharedDataFolderOptions[0]);
-//
-// //Check that the main task is there
-// mainDataDirTaskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + mainDataDirTask.getContextPath() + MylarTaskListPlugin.FILE_EXTENSION);
-// assertTrue(mainDataDirTaskFile.exists());
-// assertNotNull(manager.getTaskForHandle(mainDataDirTask.getHandleIdentifier(), false));
-
- }
-
- /**
- * Creates a task with an interaction event and checks that it has
- * been properly saved in the currently active data directory
- */
- protected ITask createAndSaveTask(String taskName){
-
- //Create the task and add it to the root of the task list
- ITask newTask = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), taskName, true);
- manager.getTaskList().moveToRoot(newTask);
- MylarContext mockContext = ContextCorePlugin.getContextManager().loadContext(newTask.getHandleIdentifier());//, newTask.getContextPath());
- InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT,"structureKind","handle","originId");
- mockContext.parseEvent(event);
- ContextCorePlugin.getContextManager().activateContext(mockContext);
-
- fail(); // uncomment below
-// //Save the context file and check that it exists
-// ContextCorePlugin.getContextManager().saveContext(mockContext.getId());//, newTask.getContextPath());
-// File taskFile = new File(ContextCorePlugin.getDefault().getDataDirectory() + File.separator + newTask.getContextPath() + MylarContextManager.CONTEXT_FILE_EXTENSION);
-// assertTrue(ContextCorePlugin.getContextManager().hasContext(newTask.getContextPath()));
-// assertTrue(taskFile.exists());
-
- return newTask;
- }
-
- protected void tearDown() throws Exception{
-
- //Reset the shared directory to the original value
- MylarSandboxPlugin.getDefault().getSharedDataDirectoryManager().setSharedDataDirectory(originalSharedDataDir);
-// MylarReportsPlugin.getDefault().getPreferenceStore().setValue(MylarReportsPlugin.SHARED_TASK_DATA_ROOT_DIR, originalSharedDataDir);
-
- //Delete the test shared data directories
- deleteDir(bobsDataDir);
- deleteDir(jillsDataDir);
- deleteDir(sharedDataRootDir);
-
- super.tearDown();
- }
-
- private void deleteDir(File targetDir){
- File[] files = targetDir.listFiles();
- for (File file : files) {
- file.delete();
- }
-
- targetDir.delete();
- assertFalse(targetDir.exists());
- }
-
- // Note: Copied from MylarTaskListPlugin
- private boolean copy(File src, File dst) {
- try {
- InputStream in = new FileInputStream(src);
- OutputStream out = new FileOutputStream(dst);
-
- // Transfer bytes from in to out
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- return true;
- } catch (IOException ioe) {
- return false;
- }
- }
-
-}