Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 209343 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/hyades/trace/ui/internal/piclient/XMLTraceDataProcessor.java (-16 / +18 lines)
Lines 37-43 Link Here
37
import org.eclipse.hyades.internal.execution.local.control.InactiveAgentException;
37
import org.eclipse.hyades.internal.execution.local.control.InactiveAgentException;
38
import org.eclipse.hyades.loaders.util.InvalidXMLException;
38
import org.eclipse.hyades.loaders.util.InvalidXMLException;
39
import org.eclipse.hyades.loaders.util.LoadersUtils;
39
import org.eclipse.hyades.loaders.util.LoadersUtils;
40
import org.eclipse.hyades.loaders.util.XMLLoader;
40
import org.eclipse.hyades.loaders.util.BinaryLoader;
41
import org.eclipse.hyades.models.hierarchy.HierarchyPackage;
41
import org.eclipse.hyades.models.hierarchy.HierarchyPackage;
42
import org.eclipse.hyades.models.hierarchy.TRCAgent;
42
import org.eclipse.hyades.models.hierarchy.TRCAgent;
43
import org.eclipse.hyades.models.hierarchy.TRCAgentProxy;
43
import org.eclipse.hyades.models.hierarchy.TRCAgentProxy;
Lines 61-67 Link Here
61
import com.ibm.icu.text.DateFormat;
61
import com.ibm.icu.text.DateFormat;
62
import com.ibm.icu.text.MessageFormat;
62
import com.ibm.icu.text.MessageFormat;
63
63
64
public class XMLTraceDataProcessor extends XMLLoader implements ExtendedDataServerListener {
64
public class XMLTraceDataProcessor extends BinaryLoader implements ExtendedDataServerListener {
65
	//~ Instance fields
65
	//~ Instance fields
66
	// ----------------------------------------------------------------------------
66
	// ----------------------------------------------------------------------------
67
67
Lines 393-398 Link Here
393
		return true;
393
		return true;
394
	}
394
	}
395
395
396
	protected void loadEventHook(byte[] buffer, int offset, int length) {
397
		if (firstEvent) {
398
			if (length > 1 && !(buffer[offset] == '<' && buffer[offset + 1] == '?')) {
399
				LoadersUtils.loadRootEvent(this);
400
			}
401
			firstEvent = false;
402
		}
403
		super.loadEvent(buffer, offset, length);
404
	}
405
	
406
	protected void loadEventHook(byte[] buffer, int length) {
407
		loadEventHook(buffer, 0, length);
408
	}
409
	
396
	/**
410
	/**
397
	 * Insert the method's description here. Creation date: (3/1/01 12:06:07 PM)
411
	 * Insert the method's description here. Creation date: (3/1/01 12:06:07 PM)
398
	 * 
412
	 * 
Lines 419-431 Link Here
419
					writeByte(buffer, offset, length);
433
					writeByte(buffer, offset, length);
420
				}
434
				}
421
			} else {
435
			} else {
422
				if (firstEvent) {
436
				loadEventHook(buffer, offset, length);
423
					if (length > 1 && !(buffer[offset] == '<' && buffer[offset + 1] == '?')) {
424
						LoadersUtils.loadRootEvent(this);
425
					}
426
					firstEvent = false;
427
				}
428
				super.loadEvent(buffer, offset, length);
429
			}
437
			}
430
		} catch (InvalidXMLException e) {
438
		} catch (InvalidXMLException e) {
431
		} catch (java.lang.OutOfMemoryError e) {
439
		} catch (java.lang.OutOfMemoryError e) {
Lines 479-491 Link Here
479
				//new emf
487
				//new emf
480
				//                super.loadEvent(newBuffer, length, false, true);
488
				//                super.loadEvent(newBuffer, length, false, true);
481
			} else {
489
			} else {
482
				if (firstEvent) {
490
				loadEventHook(newBuffer, length);
483
					if (length > 1 && !(buffer[0] == '<' && buffer[1] == '?')) {
484
						LoadersUtils.loadRootEvent(this);
485
					}
486
					firstEvent = false;
487
				}
488
				super.loadEvent(newBuffer, length);
489
			}
491
			}
490
		} catch (InvalidXMLException e) {
492
		} catch (InvalidXMLException e) {
491
		} catch (java.lang.OutOfMemoryError e) {
493
		} catch (java.lang.OutOfMemoryError e) {

Return to bug 209343