Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-26 23:43:18 -0400
committermkersten2007-06-26 23:43:18 -0400
commit2b9e77534d72bbb83d0a45856b54668b02dba340 (patch)
tree7aae200468ef541424dcec4890ee9e5bc1bf4058
parent9e6b8adfff1206a5587864055babc81c57b59b84 (diff)
downloadorg.eclipse.mylyn.tasks-2b9e77534d72bbb83d0a45856b54668b02dba340.tar.gz
org.eclipse.mylyn.tasks-2b9e77534d72bbb83d0a45856b54668b02dba340.tar.xz
org.eclipse.mylyn.tasks-2b9e77534d72bbb83d0a45856b54668b02dba340.zip
Version update
-rw-r--r--org.eclipse.mylyn-feature/feature.xml2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java135
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java21
4 files changed, 10 insertions, 150 deletions
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml
index d13c9a997..fbe87a4b4 100644
--- a/org.eclipse.mylyn-feature/feature.xml
+++ b/org.eclipse.mylyn-feature/feature.xml
@@ -239,9 +239,7 @@ litigation.
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.ui.net"/>
<import plugin="org.eclipse.mylyn.web.core"/>
- <import plugin="org.eclipse.core.net"/>
<import plugin="org.eclipse.mylar" version="2.0.0.v20070614-1800"/>
</requires>
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
index a5c869b95..5822290e0 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
@@ -32,7 +32,7 @@ public class AllBugzillaTests {
suite.addTestSuite(RepositoryEditorWizardTest.class);
suite.addTestSuite(RepositoryReportFactoryTest.class);
suite.addTestSuite(BugzillaConfigurationTest.class);
- suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
+// suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
suite.addTestSuite(BugzillaSearchEngineTest.class);
// suite.addTestSuite(Bugzilla220ParserTest.class);
suite.addTestSuite(BugzillaRepositoryConnectorTest.class);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
deleted file mode 100644
index a4dfe3d9e..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * 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.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
-
- private static final String DUPLICATE_NUMBER = "112233";
-
- private static final String DUPLICATE = "duplicate of " + DUPLICATE_NUMBER;
-
- private String TASK_FORMAT_1 = "task#1";
-
- private String TASK_FORMAT_2 = "task# 1";
-
- private String TASK_FORMAT_3 = "task1";
-
- private String TASK_FORMAT_4 = "task #1";
-
- private String BUG_FORMAT_1 = "bug# 1";
-
- private String BUG_FORMAT_2 = "bug # 1";
-
- private String BUG_FORMAT_3 = "bug1";
-
- private String BUG_FORMAT_4 = "bug #1";
-
- private String BUG_FORMAT_1_2 = "bug# 2";
-
- //private BugzillaTaskHyperlinkDetector detector = new BugzillaTaskHyperlinkDetector();
- private TaskHyperlinkDetector detector = new TaskHyperlinkDetector();
-
- private TaskRepository dummyRepository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, "repository_url");
-
- private RepositoryTextViewer viewer = new RepositoryTextViewer(dummyRepository, new Shell(), SWT.NONE);
-
- private String[] formats = { TASK_FORMAT_1, TASK_FORMAT_2, TASK_FORMAT_3, TASK_FORMAT_4, BUG_FORMAT_1,
- BUG_FORMAT_2, BUG_FORMAT_3, BUG_FORMAT_4 };
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testBeginning() {
- for (String format : formats) {
- String testString = format + " is at the beginning";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testEnd() {
- for (String format : formats) {
- String testString = "is ends with " + format;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(format), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testMiddle() {
- for (String format : formats) {
- String testString = "is a " + format + " in the middle";
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(format), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testTwoOnSingleLine() {
- String testString = "is a " + BUG_FORMAT_1 + " in the middle and at the end " + BUG_FORMAT_1_2;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(BUG_FORMAT_1_2), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(BUG_FORMAT_1_2), links[0].getHyperlinkRegion().getOffset());
- }
-
- public void testMultiLine() {
- String testString = "is a the first line\n this is the second which ends with a bug, " + BUG_FORMAT_1_2;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(BUG_FORMAT_1_2), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(BUG_FORMAT_1_2), links[0].getHyperlinkRegion().getOffset());
- }
-
- public void testDuplicate() {
- String testString = "*** This bug has been marked as a " + DUPLICATE + " ***";
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(DUPLICATE), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(DUPLICATE_NUMBER), links[0].getHyperlinkRegion().getOffset());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 7023c2d86..c19c32916 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -266,7 +266,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener {
protected String[] columnNames = new String[] { "Summary" };
- protected int[] columnWidths = new int[] { 200 };
+ protected int[] columnWidths = new int[] { 900 };
private TreeColumn[] columns;
@@ -918,27 +918,23 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener {
}
private void configureColumns(final String[] columnNames, final int[] columnWidths) {
-// TreeColumnLayout layout = (TreeColumnLayout) getViewer().getTree().getParent().getLayout();
getViewer().setColumnProperties(columnNames);
+ // for (TreeColumn col: columns) {
+ // col.dispose();
+ // }
columns = new TreeColumn[columnNames.length];
for (int i = 0; i < columnNames.length; i++) {
columns[i] = new TreeColumn(getViewer().getTree(), 0);
columns[i].setText(columnNames[i]);
-
-// if (i == 0) {
-// layout.setColumnData(columns[i], new ColumnWeightData(100));
-// } else {
-// layout.setColumnData(columns[i], new ColumnPixelData(columnWidths[i]));
-// }
-
-// final int index = i;
+ columns[i].setWidth(columnWidths[i]);
+// final int index = i;
columns[i].addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
-// sortByIndex = index;
+// sortIndex = index;
sortDirection *= DEFAULT_SORT_DIRECTION;
-// tableSorter.setColumn(columnNames[sortByIndex]);
+// tableSorter.setColumn(columnNames[sortIndex]);
getViewer().refresh(false);
}
});
@@ -958,6 +954,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener {
}
}
+
/**
* Tracks editor activation and jump to corresponding task, if applicable
*/

Back to the top