1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Added provider name to plugins (Bug 154346).

Added a stack trace collecting mechanism to DsfRunnable.
This commit is contained in:
Pawel Piech 2006-08-25 21:52:40 +00:00
parent 2adca3eb1d
commit 9a2e04c09a
5 changed files with 54 additions and 2 deletions

View file

@ -1,6 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui Plug-in
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.dd.dsf.ui
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.dd.dsf.ui.DsfUIPlugin

View file

@ -0,0 +1,13 @@
###############################################################################
# Copyright (c) 2006 Wind River Systems 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
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Wind River Systems - initial API and implementation
###############################################################################
pluginName=DSDP/DD Debugger Services Framework (DSF), UI
providerName=Eclipse.org

View file

@ -1,6 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DSF Plug-in
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.dd.dsf
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.dd.dsf.DsfPlugin

View file

@ -0,0 +1,13 @@
###############################################################################
# Copyright (c) 2006 Wind River Systems 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
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Wind River Systems - initial API and implementation
###############################################################################
pluginName=DSDP/DD Debugger Services Framework (DSF)
providerName=Eclipse.org

View file

@ -18,4 +18,28 @@ package org.eclipse.dd.dsf.concurrent;
* place holder for future tracing enhancments for DSF.
*/
abstract public class DsfRunnable implements Runnable {
private StackTraceElement [] fStackTrace = null;
public DsfRunnable() {
// Use assertion flag (-ea) to jre to avoid affecting performance when not debugging.
boolean assertsEnabled = false;
assert assertsEnabled = true;
if (assertsEnabled) {
fStackTrace = Thread.currentThread().getStackTrace();
}
}
public String toString () {
// If assertions are not turned on.
if (fStackTrace == null) return super.toString();
StringBuilder builder = new StringBuilder() ;
// ommit the first elements in the stack trace
for ( int i= 3 ; i < fStackTrace.length; i++ ) {
builder.append ( "\tat " ) ;
builder.append ( fStackTrace [ i ] .toString ()) ;
builder.append ( "\n" ) ;
}
return builder.toString () ;
}
}