Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-25 19:48:34 -0400
committermkersten2007-06-25 19:48:34 -0400
commita4d1a12a18c05c94c86292c7357d704b41a3d39b (patch)
treebe2fab47900a5ee0233bf15be82d6088bb38bfd9
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
-rw-r--r--org.eclipse.mylyn-feature/feature.xml6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java32
-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
6 files changed, 50 insertions, 49 deletions
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml
index 4d2f3ce45..bd77025ab 100644
--- a/org.eclipse.mylyn-feature/feature.xml
+++ b/org.eclipse.mylyn-feature/feature.xml
@@ -226,8 +226,7 @@ litigation.
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.ui.cheatsheets"/>
<import plugin="org.eclipse.ui.intro"/>
- <import plugin="org.eclipse.core.net"/>
- <import plugin="org.eclipse.mylyn.web.core"/>
+ <import plugin="org.eclipse.help.webapp"/>
<import plugin="org.eclipse.mylyn.monitor.core"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.mylyn.context.core"/>
@@ -241,6 +240,9 @@ litigation.
<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>
<plugin
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index d8b9c5f0c..b198a3009 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -197,34 +197,6 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
WorkbenchHelpSystem.getInstance().setHelp(control, BugzillaUiPlugin.SEARCH_PAGE_CONTEXT);
}
- // 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 = 2;
- // group.setLayoutData(gd);
- //
- // repositoryCombo = new Combo(group, SWT.SINGLE | SWT.BORDER);
- // repositoryCombo.addSelectionListener(new SelectionAdapter() {
- // @Override
- // public void widgetSelected(SelectionEvent e) {
- // String repositoryUrl =
- // repositoryCombo.getItem(repositoryCombo.getSelectionIndex());
- // repository =
- // TasksUiPlugin.getRepositoryManager().getRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- // repositoryUrl);
- // updateAttributesFromRepository(repositoryUrl, null, false);
- // restoring = true;
- // restoreWidgetValues();
- // }
- // });
- // gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- // repositoryCombo.setLayoutData(gd);
- // }
-
private void createSearchGroup(Composite control) {
Group group = new Group(control, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -253,7 +225,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Info text
label = new Label(group, SWT.LEFT);
- label.setText("Summary/taskId contains: ");
+ label.setText("Summary: ");
gd = new GridData(GridData.BEGINNING);
gd.horizontalSpan = 1;
label.setLayoutData(gd);
@@ -300,7 +272,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Info text
label = new Label(group, SWT.LEFT);
- label.setText("Comment contains: ");
+ label.setText("Comment: ");
gd = new GridData(GridData.BEGINNING);
label.setLayoutData(gd);
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