Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-25 23:48:34 +0000
committermkersten2007-06-25 23:48:34 +0000
commita4d1a12a18c05c94c86292c7357d704b41a3d39b (patch)
treebe2fab47900a5ee0233bf15be82d6088bb38bfd9 /org.eclipse.mylyn.tasks.ui
parenta931b21be7dd85eab75c372f59fe33a743ee395a (diff)
downloadorg.eclipse.mylyn.tasks-a4d1a12a18c05c94c86292c7357d704b41a3d39b.tar.gz
org.eclipse.mylyn.tasks-a4d1a12a18c05c94c86292c7357d704b41a3d39b.tar.xz
org.eclipse.mylyn.tasks-a4d1a12a18c05c94c86292c7357d704b41a3d39b.zip
NEW - bug 193423: merge Open Repository Task dialog and Search
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193423
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gifbin0 -> 301 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gifbin301 -> 88 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java6
4 files changed, 44 insertions, 17 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif
new file mode 100644
index 000000000..db812dfce
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif
index db812dfce..7ea0cf0d1 100644
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
index ad40e1e4b..50fbb97ad 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTask;
import org.eclipse.mylyn.monitor.core.StatusHandler;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -39,9 +40,12 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.ImageHyperlink;
/**
* @author Rob Elves
@@ -110,19 +114,19 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
}
private void createRepositoryGroup(Composite control) {
- // Group group = new Group(control, SWT.NONE);
- // group.setText("Repository");
- // GridLayout layout = new GridLayout();
- // layout.numColumns = 1;
- // group.setLayout(layout);
- // GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- // gd.horizontalSpan = 1;
- // group.setLayoutData(gd);
-
- Label label = new Label(control, SWT.NONE);
- label.setText("Repository");
-
- repositoryCombo = new Combo(control, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
+ Composite group = new Composite(control, SWT.NONE);
+// group.setText("Repository");
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 4;
+ group.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ group.setLayoutData(gd);
+
+ Label label = new Label(group, SWT.NONE);
+ label.setText("Select Repository: ");
+
+ repositoryCombo = new Combo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
repositoryCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -130,6 +134,31 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
}
});
repositoryCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
+
+ label = new Label(group, SWT.NONE);
+ label.setText(" ");
+
+ ImageHyperlink openHyperlink = new ImageHyperlink(group, SWT.NONE);
+ openHyperlink.setText("Open Repository Task by Key/ID...");
+ openHyperlink.setForeground(TaskListColorsAndFonts.COLOR_HYPERLINK_WIDGET);
+ openHyperlink.setUnderlined(true);
+ openHyperlink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkActivated(HyperlinkEvent e) {
+ new OpenRepositoryTask().run(null);
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ // ignore
+ }
+
+ public void linkExited(HyperlinkEvent e) {
+ // ignore
+ }
+
+ });
+// openHyperlink.set
+// openHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.QUERY));
}
private Control createPage(TaskRepository repository, ISearchPage searchPage) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java
index adf74041a..bc9c02791 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java
@@ -50,8 +50,6 @@ public class DeleteAction extends Action {
String message = "Delete the elements listed? If categories or queries are selected contained tasks"
+ " will not be deleted. Contexts will be deleted for selected tasks.\n\n";
-// + "This operation cannot be undone (the Task List can be restored from
-// history).\n\n";
int i = 0;
for (Object object : toDelete) {
i++;
@@ -78,7 +76,7 @@ public class DeleteAction extends Action {
TasksUiPlugin.getTaskListManager().deactivateTask(task);
TasksUiPlugin.getTaskListManager().getTaskList().deleteTask(task);
ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiUtil.closeEditorInActivePage(task, true);
+ TasksUiUtil.closeEditorInActivePage(task, false);
} else if (selectedObject instanceof AbstractRepositoryQuery) {
// boolean deleteConfirmed =
// MessageDialog.openQuestion(PlatformUI.getWorkbench()
@@ -98,7 +96,7 @@ public class DeleteAction extends Action {
TaskCategory cat = (TaskCategory) selectedObject;
for (AbstractTask task : cat.getChildren()) {
ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiUtil.closeEditorInActivePage(task, true);
+ TasksUiUtil.closeEditorInActivePage(task, false);
}
TasksUiPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
} else {

Back to the top