Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2010-06-15 14:12:25 -0400
committersminto2010-06-15 14:12:25 -0400
commit64ddad6bb4995653feaa55658c1ebbacd1bf9258 (patch)
treee9998956ed9ddcf33cc182a368fb23a251c10d78
parent15c5633e66abbb9886573e1f60b0b2c0d701dc65 (diff)
downloadorg.eclipse.mylyn.tasks-64ddad6bb4995653feaa55658c1ebbacd1bf9258.tar.gz
org.eclipse.mylyn.tasks-64ddad6bb4995653feaa55658c1ebbacd1bf9258.tar.xz
org.eclipse.mylyn.tasks-64ddad6bb4995653feaa55658c1ebbacd1bf9258.zip
RESOLVED - bug 316832: search repository for key link is displayed even if o.e.m.tasks.search is not available
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316832
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java61
1 files changed, 32 insertions, 29 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
index 86209d4d5..4bd91ac84 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
@@ -134,9 +134,8 @@ public class TaskListFilteredTree extends AbstractFilteredTree {
TasksUi.getTaskActivityManager().removeActivityListener(taskProgressBarActivityListener);
}
if (taskProgressBarWorkingSetListener != null) {
- PlatformUI.getWorkbench()
- .getWorkingSetManager()
- .removePropertyChangeListener(taskProgressBarWorkingSetListener);
+ PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(
+ taskProgressBarWorkingSetListener);
}
actionGroup.setSelectionProvider(null);
activeTaskMenuManager.dispose();
@@ -226,35 +225,39 @@ public class TaskListFilteredTree extends AbstractFilteredTree {
@Override
protected Composite createSearchComposite(Composite container) {
- Composite searchComposite = new Composite(container, SWT.NONE);
- GridLayout searchLayout = new GridLayout(1, false);
- searchLayout.marginWidth = 8;
- searchLayout.marginHeight = 0;
- searchLayout.marginBottom = 0;
- searchLayout.horizontalSpacing = 0;
- searchLayout.verticalSpacing = 0;
- searchComposite.setLayout(searchLayout);
- searchComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 4, 1));
-
- final TaskScalingHyperlink searchLink = new TaskScalingHyperlink(searchComposite, SWT.LEFT);
- searchLink.setText(LABEL_SEARCH);
-
- searchLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- SearchUtil.openSearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- }
+ if (SearchUtil.supportsTaskSearch()) {
+ Composite searchComposite = new Composite(container, SWT.NONE);
+ GridLayout searchLayout = new GridLayout(1, false);
+ searchLayout.marginWidth = 8;
+ searchLayout.marginHeight = 0;
+ searchLayout.marginBottom = 0;
+ searchLayout.horizontalSpacing = 0;
+ searchLayout.verticalSpacing = 0;
+ searchComposite.setLayout(searchLayout);
+ searchComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 4, 1));
+
+ final TaskScalingHyperlink searchLink = new TaskScalingHyperlink(searchComposite, SWT.LEFT);
+ searchLink.setText(LABEL_SEARCH);
+
+ searchLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
+ SearchUtil.openSearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ }
- public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- searchLink.setUnderlined(true);
- }
+ public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
+ searchLink.setUnderlined(true);
+ }
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- searchLink.setUnderlined(false);
- }
- });
+ public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
+ searchLink.setUnderlined(false);
+ }
+ });
- return searchComposite;
+ return searchComposite;
+ } else {
+ return super.createSearchComposite(container);
+ }
}
private void updateTaskProgressBar() {

Back to the top