Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 56202 Details for
Bug 164661
allow adding multiple existing tasks at once via Add Existing Task wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
clipboard17822.txt (text/plain), 5.29 KB, created by
Willian Mitsuda
on 2006-12-27 14:08:50 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Willian Mitsuda
Created:
2006-12-27 14:08:50 EST
Size:
5.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylar.tasks.ui >Index: src/org/eclipse/mylar/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.mylar/org.eclipse.mylar.tasks.ui/src/org/eclipse/mylar/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java,v >retrieving revision 1.6 >diff -u -r1.6 RemoteTaskSelectionDialog.java >--- src/org/eclipse/mylar/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java 28 Nov 2006 14:54:55 -0000 1.6 >+++ src/org/eclipse/mylar/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java 27 Dec 2006 19:05:04 -0000 >@@ -114,13 +114,6 @@ > idLabel.setText("Enter Key/&ID: "); > idText = new Text(area, SWT.BORDER); > idText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); >- idText.addModifyListener(new ModifyListener() { >- >- public void modifyText(ModifyEvent e) { >- validate(); >- } >- >- }); > > Label matchingTasksLabel = new Label(area, SWT.NONE); > matchingTasksLabel.setText("&Matching tasks:"); >@@ -133,12 +126,22 @@ > > @Override > public boolean select(Viewer viewer, Object parentElement, Object element) { >+ if (selectedIds == null) { >+ return false; >+ } >+ > // Only shows exact task matches > if (!(element instanceof AbstractRepositoryTask)) { > return false; > } > AbstractRepositoryTask task = (AbstractRepositoryTask) element; >- return idText.getText().trim().equals(task.getIdLabel()); >+ String taskId = task.getIdLabel(); >+ for (String id : selectedIds) { >+ if (id.equals(taskId)) { >+ return true; >+ } >+ } >+ return false; > } > > }); >@@ -146,6 +149,8 @@ > idText.addModifyListener(new ModifyListener() { > > public void modifyText(ModifyEvent e) { >+ computeIds(); >+ validate(); > tasksViewer.refresh(false); > } > >@@ -331,7 +336,7 @@ > updateStatus(new Status(IStatus.OK, TasksUiPlugin.PLUGIN_ID, 0, "", null)); > } > >- private String selectedId; >+ private String[] selectedIds; > > private TaskRepository selectedRepository; > >@@ -341,8 +346,8 @@ > > private AbstractTaskContainer selectedCategory; > >- public String getSelectedId() { >- return selectedId; >+ public String[] getSelectedIds() { >+ return selectedIds; > } > > public TaskRepository getSelectedTaskRepository() { >@@ -363,7 +368,8 @@ > > @Override > protected void computeResult() { >- selectedId = idText.getText().trim(); >+ computeIds(); >+ > ISelection taskSelection = tasksViewer.getSelection(); > if (!taskSelection.isEmpty()) { > selectedTask = (AbstractRepositoryTask) ((IStructuredSelection) taskSelection).getFirstElement(); >@@ -378,4 +384,11 @@ > } > } > >+ private void computeIds() { >+ selectedIds = idText.getText().split(","); >+ for (String id : selectedIds) { >+ id = id.trim(); >+ } >+ } >+ > } >Index: src/org/eclipse/mylar/internal/tasks/ui/actions/OpenRepositoryTask.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.mylar/org.eclipse.mylar.tasks.ui/src/org/eclipse/mylar/internal/tasks/ui/actions/OpenRepositoryTask.java,v >retrieving revision 1.2 >diff -u -r1.2 OpenRepositoryTask.java >--- src/org/eclipse/mylar/internal/tasks/ui/actions/OpenRepositoryTask.java 7 Dec 2006 04:38:04 -0000 1.2 >+++ src/org/eclipse/mylar/internal/tasks/ui/actions/OpenRepositoryTask.java 27 Dec 2006 19:05:01 -0000 >@@ -29,7 +29,7 @@ > public class OpenRepositoryTask extends Action implements IWorkbenchWindowActionDelegate { > > private static final String OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS = "org.eclipse.mylar.tasks.ui.open.remote"; >- >+ > public void run(IAction action) { > RemoteTaskSelectionDialog dlg = new RemoteTaskSelectionDialog(PlatformUI.getWorkbench() > .getActiveWorkbenchWindow().getShell()); >@@ -66,23 +66,28 @@ > * Selected a repository, so try to obtain the task using id > */ > private void openRemoteTask(RemoteTaskSelectionDialog dlg) { >+ String[] selectedIds = dlg.getSelectedIds(); > if (dlg.shouldAddToTaskList()) { >- final IProgressService svc = PlatformUI.getWorkbench().getProgressService(); >- final AddExistingTaskJob job = new AddExistingTaskJob(dlg.getSelectedTaskRepository(), dlg.getSelectedId(), >- dlg.getSelectedCategory()); >- job.schedule(); >- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >- >- public void run() { >- svc.showInDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), job); >- } >+ for (String id : selectedIds) { >+ final IProgressService svc = PlatformUI.getWorkbench().getProgressService(); >+ final AddExistingTaskJob job = new AddExistingTaskJob(dlg.getSelectedTaskRepository(), id, dlg >+ .getSelectedCategory()); >+ job.schedule(); >+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >+ >+ public void run() { >+ svc.showInDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), job); >+ } > >- }); >+ }); >+ } > } else { >- TasksUiUtil.openRepositoryTask(dlg.getSelectedTaskRepository(), dlg.getSelectedId()); >+ for (String id : selectedIds) { >+ TasksUiUtil.openRepositoryTask(dlg.getSelectedTaskRepository(), id); >+ } > } > } >- >+ > public void dispose() { > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 164661
: 56202 |
56203