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 83913 Details for
Bug 210686
rich task editor should have handle to drag that task into a category in the task list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
support for repository tasks
aaa.patch (text/plain), 3.94 KB, created by
Eugene Kuleshov
on 2007-11-27 18:20:29 EST
(
hide
)
Description:
support for repository tasks
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2007-11-27 18:20:29 EST
Size:
3.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java,v >retrieving revision 1.250 >diff -u -r1.250 AbstractRepositoryTaskEditor.java >--- src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java 27 Nov 2007 02:22:54 -0000 1.250 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java 27 Nov 2007 23:16:54 -0000 >@@ -9,6 +9,9 @@ > package org.eclipse.mylyn.tasks.ui.editors; > > import java.io.File; >+import java.io.IOException; >+import java.io.UnsupportedEncodingException; >+import java.net.URLEncoder; > import java.util.ArrayList; > import java.util.Arrays; > import java.util.Collections; >@@ -69,6 +72,7 @@ > import org.eclipse.jface.viewers.ViewerSorter; > import org.eclipse.jface.window.ToolTip; > import org.eclipse.mylyn.internal.tasks.core.CommentQuoter; >+import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; > import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider; > import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider; > import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts; >@@ -124,6 +128,8 @@ > import org.eclipse.swt.custom.VerifyKeyListener; > import org.eclipse.swt.dnd.Clipboard; > import org.eclipse.swt.dnd.DND; >+import org.eclipse.swt.dnd.DragSourceAdapter; >+import org.eclipse.swt.dnd.DragSourceEvent; > import org.eclipse.swt.dnd.DropTarget; > import org.eclipse.swt.dnd.FileTransfer; > import org.eclipse.swt.dnd.TextTransfer; >@@ -597,6 +603,58 @@ > // setFormHeaderLabel(); > addHeaderControls(); > >+ Transfer[] transferTypes; >+ if (repositoryTask == null) { >+ transferTypes = new Transfer[] { TextTransfer.getInstance() }; >+ } else { >+ transferTypes = new Transfer[] { TextTransfer.getInstance(), FileTransfer.getInstance() }; >+ } >+ parentEditor.getTopForm().addTitleDragSupport(DND.DROP_COPY | DND.DROP_LINK, transferTypes, >+ new DragSourceAdapter() { >+ @Override >+ public void dragSetData(DragSourceEvent event) { >+ if (TextTransfer.getInstance().isSupportedType(event.dataType)) { >+ if (repositoryTask != null) { >+ event.data = repositoryTask.getUrl(); >+ return; >+ } else if (editorInput.getUrl() != null) { >+ event.data = editorInput.getUrl(); >+ return; >+ } >+ } >+ if (FileTransfer.getInstance().isSupportedType(event.dataType)) { >+ // similar code is in TaskListDragSourceListener, maybe move to an utility class >+ if (repositoryTask != null) { >+ String encodedName = "task-" + repositoryTask.getTaskKey(); >+ try { >+ encodedName = URLEncoder.encode(repositoryTask.getHandleIdentifier(), >+ ITasksUiConstants.FILENAME_ENCODING); >+ } catch (UnsupportedEncodingException e) { >+ StatusHandler.fail(e, "Could not determine path for context", false); >+ } >+ >+ File tempDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator >+ + "temp"); >+ if (!tempDir.exists()) { >+ tempDir.mkdir(); >+ } >+ >+ File taskTempFile; >+ try { >+ taskTempFile = File.createTempFile(encodedName, ITasksUiConstants.FILE_EXTENSION, >+ tempDir); >+ taskTempFile.deleteOnExit(); >+ TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask(repositoryTask, >+ taskTempFile); >+ event.data = new String[] { taskTempFile.getAbsolutePath() }; >+ } catch (IOException e) { >+ StatusHandler.fail(e, "Cannot create a temp query file for Drag&Drop", true); >+ } >+ } >+ } >+ } >+ }); >+ > if (summaryTextViewer != null) { > summaryTextViewer.getTextWidget().setFocus(); > }
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 Raw
Actions:
View
Attachments on
bug 210686
:
83911
|
83912
| 83913 |
84047
|
84048
|
84201
|
84309
|
84310
|
84939
|
88136
|
88394
|
88395
|
88426
|
88962
|
88963