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 72527 Details for
Bug 166406
Improve query tooltip layout
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]
fixes whitespaces in updated attribute values
clipboard.txt (text/plain), 2.37 KB, created by
Eugene Kuleshov
on 2007-06-26 16:33:03 EDT
(
hide
)
Description:
fixes whitespaces in updated attribute values
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2007-06-26 16:33:03 EDT
Size:
2.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java,v >retrieving revision 1.129 >diff -u -r1.129 TasksUiPlugin.java >--- src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java 26 Jun 2007 14:13:17 -0000 1.129 >+++ src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java 26 Jun 2007 20:27:38 -0000 >@@ -860,11 +860,7 @@ > TaskComment lastComment = taskComments.get(taskComments.size() - 1); > if (lastComment != null) { > descriptionText += "Comment by " + lastComment.getAuthor() + ":\n "; >- String commentText = lastComment.getText().replaceAll("\\s", " ").trim(); >- if (commentText.length() > 60) { >- commentText = commentText.substring(0, 55) + "..."; >- } >- descriptionText += commentText; >+ descriptionText += cleanValue(lastComment.getText()); > } > } > } >@@ -911,8 +907,8 @@ > String sep = ""; > int n = 0; > for (Change change : changes) { >- String removed = change.removed.toString(); >- String added = change.added.toString(); >+ String removed = cleanValues(change.removed); >+ String added = cleanValues(change.added); > details += sep + " " + change.field + " " + removed; > if (removed.length() > 30) { > details += "\n "; >@@ -931,7 +927,8 @@ > // } > > n++; >- if (n > 5) { // that may not be enough >+ if (n > 5) { >+ details += "\nOpen to view more changes"; > break; > } > } >@@ -941,6 +938,26 @@ > return details; > } > >+ private static String cleanValues(List<String> values) { >+ StringBuilder sb = new StringBuilder(); >+ sb.append("["); >+ boolean first = true; >+ for (String value : values) { >+ if(!first) sb.append(", "); >+ sb.append(cleanValue(value)); >+ } >+ sb.append("]"); >+ return sb.toString(); >+ } >+ >+ private static String cleanValue(String value) { >+ String commentText = value.replaceAll("\\s", " ").trim(); >+ if (commentText.length() > 60) { >+ commentText = commentText.substring(0, 55) + "..."; >+ } >+ return commentText; >+ } >+ > private static Change getDiff(String field, List<String> oldValues, List<String> newValues) { > Change change = new Change(field, newValues); > if (oldValues != null) {
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 166406
:
71690
|
71692
|
71763
|
71764
|
71772
|
71782
|
71811
|
71971
|
72100
|
72101
|
72389
|
72390
|
72447
| 72527 |
72607