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 63267 Details for
Bug 168562
LTA RCP & Eclipse Message details not displaying full message
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
bug168562.txt (text/plain), 3.86 KB, created by
Paul Klicnik
on 2007-04-09 11:43:00 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Paul Klicnik
Created:
2007-04-09 11:43:00 EDT
Size:
3.86 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.log.views >Index: src/org/eclipse/tptp/platform/log/views/internal/views/CommonBaseSection.java >=================================================================== >RCS file: /cvsroot/tptp/platform/org.eclipse.tptp.platform.log.views/src/org/eclipse/tptp/platform/log/views/internal/views/CommonBaseSection.java,v >retrieving revision 1.15 >diff -u -r1.15 CommonBaseSection.java >--- src/org/eclipse/tptp/platform/log/views/internal/views/CommonBaseSection.java 15 Dec 2006 16:59:38 -0000 1.15 >+++ src/org/eclipse/tptp/platform/log/views/internal/views/CommonBaseSection.java 9 Apr 2007 15:40:15 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2006 IBM Corporation and others. >+ * Copyright (c) 2005, 2007 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -12,8 +12,10 @@ > > package org.eclipse.tptp.platform.log.views.internal.views; > >+import org.eclipse.emf.common.util.EList; > import org.eclipse.hyades.models.cbe.CBECommonBaseEvent; > import org.eclipse.hyades.models.cbe.CBEDefaultEvent; >+import org.eclipse.hyades.models.cbe.CBEExtendedDataElement; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.swt.SWT; >@@ -167,7 +169,57 @@ > extensionNameText.setText(cbeEvent.getExtensionName()!=null ? cbeEvent.getExtensionName() : ""); > sequenceNumberText.setText(cbeEvent.getSequenceNumber()+""); //$NON-NLS-1$ > severityText.setText(cbeEvent.getSeverity()+""); //$NON-NLS-1$ >- messageText.setText(cbeEvent.getMsg()!=null ? cbeEvent.getMsg() : ""); >+ >+ /* >+ * Bug 168562 >+ * If the message text is greater than 1024 bytes, the message is added into a >+ * single extended data element. We need to check if the "message" extended data >+ * element exists and set the message accordingly. >+ */ >+ EList extendedProperties = cbeEvent.getExtendedProperties(); >+ int count = 0; >+ >+ while ( true ) { >+ try { >+ CBEExtendedDataElement cbeImpl = (CBEExtendedDataElement) extendedProperties.get( count ); >+ >+ if ( cbeImpl.getName().equals("message") ) { >+ /* >+ * There is extended data holding a "message". This implies >+ * the message is longer than 1024 bytes. We now need to >+ * concatinate the strings together to create the original message >+ */ >+ EList values = cbeImpl.getValues(); >+ >+ StringBuffer sb = new StringBuffer(); >+ for ( int j = 0; j < values.size(); j++ ) { >+ sb.append( (String) values.get( j ) ); >+ } >+ >+ messageText.setText( sb.toString() ); >+ break; >+ } >+ >+ if ( count == extendedProperties.size() - 1 ) { >+ /* No extended data message properties found - this implies >+ * it is sufficient to use the message returned by the >+ * getMsg() method. >+ */ >+ messageText.setText(cbeEvent.getMsg()!=null ? cbeEvent.getMsg() : ""); >+ break; >+ } >+ >+ count++; >+ >+ } catch ( ClassCastException e ) { >+ /* >+ * The extended data element is stored in the CBEExtendedDataElement class >+ * If a class cast exception is thrown, we can ignore it because it >+ * just means that there is other data stored as an extended property >+ */ >+ } >+ } >+ > // versionText.addModifyListener(listener); > //} >
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 168562
: 63267