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 87439 Details for
Bug 215071
report as Bug should include subentries too
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
clipboard.txt (text/plain), 2.83 KB, created by
Willian Mitsuda
on 2008-01-21 15:19:10 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Willian Mitsuda
Created:
2008-01-21 15:19:10 EST
Size:
2.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.ide >Index: src/org/eclipse/mylyn/internal/bugzilla/ide/actions/NewTaskFromErrorAction.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ide/src/org/eclipse/mylyn/internal/bugzilla/ide/actions/NewTaskFromErrorAction.java,v >retrieving revision 1.9 >diff -u -r1.9 NewTaskFromErrorAction.java >--- src/org/eclipse/mylyn/internal/bugzilla/ide/actions/NewTaskFromErrorAction.java 12 Jan 2008 05:48:29 -0000 1.9 >+++ src/org/eclipse/mylyn/internal/bugzilla/ide/actions/NewTaskFromErrorAction.java 21 Jan 2008 20:15:05 -0000 >@@ -12,6 +12,7 @@ > package org.eclipse.mylyn.internal.bugzilla.ide.actions; > > import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.mylyn.tasks.core.TaskSelection; >@@ -35,11 +36,31 @@ > private LogEntry entry; > > public void run() { >- createTask(entry); >- } >+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); >+ boolean includeChildren = false; >+ >+ if (entry.hasChildren() && MessageDialog.openQuestion(shell, "Report Bug", "Include subentries too?")) { >+ includeChildren = true; >+ } > >- protected void createTask(LogEntry entry) { > StringBuilder sb = new StringBuilder(); >+ buildDescriptionFromLogEntry(entry, sb, includeChildren); >+ >+ TaskSelection taskSelection = new TaskSelection("", sb.toString()); >+ TasksUiUtil.openNewTaskEditor(shell, taskSelection, null); >+ } >+ >+ /** >+ * Fills a {@link StringBuilder} with {@link LogEntry} information, optionally including subentries too >+ * >+ * @param entry >+ * The {@link LogEntry} who provides the information >+ * @param sb >+ * An {@link StringBuilder} to be filled with >+ * @param includeChildren >+ * Indicates if it should include subentries, if the {@link LogEntry} have any >+ */ >+ private void buildDescriptionFromLogEntry(LogEntry entry, StringBuilder sb, boolean includeChildren) { > sb.append("\n\n-- Error Log --\nDate: "); > sb.append(entry.getDate()); > sb.append("\nMessage: "); >@@ -54,9 +75,14 @@ > sb.append(entry.getStack()); > } > >- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); >- TaskSelection taskSelection = new TaskSelection("", sb.toString()); >- TasksUiUtil.openNewTaskEditor(shell, taskSelection, null); >+ if (includeChildren && entry.hasChildren()) { >+ Object[] children = entry.getChildren(null); >+ for (Object child : children) { >+ if (child instanceof LogEntry) { >+ buildDescriptionFromLogEntry((LogEntry) child, sb, includeChildren); >+ } >+ } >+ } > } > > public void run(IAction action) {
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 215071
: 87439 |
87440
|
87913