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 84115 Details for
Bug 100715
[logview] LogReader does not read in multi-line messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
patch.txt (text/plain), 2.70 KB, created by
Jacek Pospychala
on 2007-11-29 18:54:50 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jacek Pospychala
Created:
2007-11-29 18:54:50 EST
Size:
2.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.views.log >Index: src/org/eclipse/ui/internal/views/log/LogReader.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java,v >retrieving revision 1.4 >diff -u -r1.4 LogReader.java >--- src/org/eclipse/ui/internal/views/log/LogReader.java 24 Oct 2007 20:02:28 -0000 1.4 >+++ src/org/eclipse/ui/internal/views/log/LogReader.java 29 Nov 2007 23:44:39 -0000 >@@ -61,9 +61,7 @@ > if (line == null) > break; > line = line.trim(); >- if (line.length() == 0) >- continue; >- >+ > if (line.startsWith("!SESSION")) { //$NON-NLS-1$ > state = SESSION_STATE; > } else if (line.startsWith("!ENTRY")) { //$NON-NLS-1$ >@@ -84,15 +82,7 @@ > } > > if (writer != null) { >- if (writerState == STACK_STATE && current != null) { >- current.setStack(swriter.toString()); >- } else if (writerState == SESSION_STATE && session != null) { >- session.setSessionData(swriter.toString()); >- } else if (writerState == MESSAGE_STATE && current != null){ >- StringBuffer sb = new StringBuffer(current.getMessage()); >- sb.append(swriter.toString()); >- current.setMessage(sb.toString().trim()); >- } >+ setData(current, session, writerState, swriter); > writerState = UNKNOWN_STATE; > swriter = null; > writer.close(); >@@ -148,8 +138,10 @@ > } > } > >- if (swriter != null && current != null && writerState == STACK_STATE) >+ if (swriter != null && current != null && writerState == STACK_STATE) { >+ writerState = UNKNOWN_STATE; > current.setStack(swriter.toString()); >+ } > } catch (FileNotFoundException e) { > } catch (IOException e) { > } finally { >@@ -158,8 +150,27 @@ > reader.close(); > } catch (IOException e1) { > } >- if (writer != null) >+ if (writer != null) { >+ setData(current, session, writerState, swriter); > writer.close(); >+ } >+ } >+ } >+ >+ /** >+ * Assigns data from writer to appropriate field of current Log Entry or Session, >+ * depending on writer state. >+ */ >+ private static void setData(LogEntry current, LogSession session, >+ int writerState, StringWriter swriter) { >+ if (writerState == STACK_STATE && current != null) { >+ current.setStack(swriter.toString()); >+ } else if (writerState == SESSION_STATE && session != null) { >+ session.setSessionData(swriter.toString()); >+ } else if (writerState == MESSAGE_STATE && current != null){ >+ StringBuffer sb = new StringBuffer(current.getMessage()); >+ sb.append(swriter.toString()); >+ current.setMessage(sb.toString().trim()); > } > } >
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 100715
:
82401
| 84115 |
84116
|
84117