Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-05-28 17:32:19 -0400
committerrelves2010-05-28 17:32:19 -0400
commitcc4b17bc3fd958e42ae877effe23782323f7b3fb (patch)
treeee1c7dea88913fd27c4b86b2ddc86dbd74aa44bf /org.eclipse.mylyn.tasks.ui
parent51d5e224e95881648029f6a1f12634121c66681e (diff)
downloadorg.eclipse.mylyn.tasks-cc4b17bc3fd958e42ae877effe23782323f7b3fb.tar.gz
org.eclipse.mylyn.tasks-cc4b17bc3fd958e42ae877effe23782323f7b3fb.tar.xz
org.eclipse.mylyn.tasks-cc4b17bc3fd958e42ae877effe23782323f7b3fb.zip
NEW - bug 302907: [api] support categorization in Task Repositories view
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302907
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java42
1 files changed, 36 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
index c7425f1ef..085bed07c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
@@ -27,13 +27,14 @@ import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.jface.wizard.WizardDialog;
@@ -46,7 +47,6 @@ import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.EmptyCategoriesFilter;
import org.eclipse.mylyn.internal.tasks.ui.views.GradientDrawer;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesViewSorter;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
@@ -88,6 +88,36 @@ public abstract class SelectRepositoryPage extends WizardSelectionPage {
private TeamRepositoriesContentProvider contentProvider;
+ class RepositoryContentProvider implements ITreeContentProvider {
+
+ public Object[] getChildren(Object parentElement) {
+ return null;
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return repositories.toArray();
+ }
+
+ public void dispose() {
+ // ignore
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // ignore
+
+ }
+
+ }
+
public SelectRepositoryPage(ITaskRepositoryFilter taskRepositoryFilter) {
super(Messages.SelectRepositoryPage_Select_a_repository);
@@ -178,11 +208,11 @@ public abstract class SelectRepositoryPage extends WizardSelectionPage {
}
protected Tree createTableViewer(Composite container) {
- contentProvider = new TeamRepositoriesContentProvider();
viewer = new TreeViewer(container, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(contentProvider);
- ViewerFilter[] filters = { new EmptyCategoriesFilter(contentProvider) };
- viewer.setFilters(filters);
+// contentProvider = new TeamRepositoriesContentProvider();
+ viewer.setContentProvider(new RepositoryContentProvider());
+// ViewerFilter[] filters = { new EmptyCategoriesFilter(contentProvider) };
+// viewer.setFilters(filters);
// viewer.setLabelProvider(new TaskRepositoryLabelProvider());
viewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(),
PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));

Back to the top