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 88957 Details for
Bug 209327
[api] add additional IO support to import/export of tasks
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]
updated patch
clipboard.txt (text/plain), 2.47 KB, created by
Steffen Pingel
on 2008-02-05 22:19:10 EST
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Steffen Pingel
Created:
2008-02-05 22:19:10 EST
Size:
2.47 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java,v >retrieving revision 1.44 >diff -u -r1.44 TaskListWriter.java >--- src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java 5 Feb 2008 04:23:10 -0000 1.44 >+++ src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java 6 Feb 2008 03:18:41 -0000 >@@ -121,6 +121,14 @@ > } > > public void writeTaskList(TaskList taskList, File outFile) { >+ try { >+ writeTaskList(taskList, new FileOutputStream(outFile)); >+ } catch (Exception e) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task data was not written", e)); >+ } >+ } >+ >+ public void writeTaskList(TaskList taskList, OutputStream outputStream) { > Document doc = createTaskListDocument(); > if (doc == null) { > return; >@@ -177,7 +185,7 @@ > } > > // doc.appendChild(root); >- writeDOMtoFile(doc, outFile); >+ writeDOMtoFile(doc, outputStream); > return; > } > >@@ -207,9 +215,9 @@ > * > * doc - the document to write file - the file to be written to > */ >- private void writeDOMtoFile(Document doc, File file) { >+ private void writeDOMtoFile(Document doc, OutputStream stream) { > try { >- ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file)); >+ ZipOutputStream outputStream = new ZipOutputStream(stream); > writeTaskList(doc, outputStream); > outputStream.close(); > } catch (Exception e) { >@@ -661,6 +669,14 @@ > } > > public void writeTask(AbstractTask task, File outFile) { >+ try { >+ writeTask(task, new FileOutputStream(outFile)); >+ } catch (Exception e) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task data was not written", e)); >+ } >+ } >+ >+ public void writeTask(AbstractTask task, OutputStream stream) { > Set<TaskRepository> repositories = new HashSet<TaskRepository>(); > if (!task.isLocal()) { > repositories.add(TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryUrl())); >@@ -675,7 +691,7 @@ > > delagatingExternalizer.createTaskElement(task, doc, root); > try { >- ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(outFile)); >+ ZipOutputStream outputStream = new ZipOutputStream(stream); > // write task data > writeTaskList(doc, outputStream);
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 209327
:
82592
|
82593
| 88957