Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FUMLThread.java')
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FUMLThread.java81
1 files changed, 81 insertions, 0 deletions
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FUMLThread.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FUMLThread.java
new file mode 100644
index 00000000000..b0796075a3a
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/FUMLThread.java
@@ -0,0 +1,81 @@
+package org.eclipse.papyrus.moka.fuml.debug;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.moka.debug.MokaDebugTarget;
+import org.eclipse.papyrus.moka.debug.MokaThread;
+import org.eclipse.papyrus.moka.ui.presentation.IPresentation;
+import org.eclipse.swt.graphics.Image;
+
+public class FUMLThread extends MokaThread implements IPresentation {
+
+ protected boolean isTerminated = false ;
+
+ protected int reasonForSuspending = -1 ;
+
+ protected int reasonForResuming = DebugEvent.CLIENT_REQUEST ;
+
+ public FUMLThread(MokaDebugTarget debugTarget) {
+ super(debugTarget);
+ }
+
+ public String getLabel() {
+ String label = "" ;
+ try {
+ label = this.getName() + " [";
+ if (this.isTerminated()) {
+ label += "TERMINATED]" ;
+ }
+ else if (this.isStepping()) {
+ label += "STEPPING]" ;
+ }
+ else if (this.isSuspended()) {
+ label += "SUSPENDED]" ;
+ }
+ else {
+ label += "RUNNING]" ;
+ }
+ } catch (DebugException e) {
+ Activator.log.error(e);
+ label += "Default" ;
+ }
+ return label ;
+ }
+
+ public String getDetails() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Image getImage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return this.isTerminated ;
+ }
+
+ public void setIsTerminated(boolean isTerminated) {
+ this.isTerminated = isTerminated ;
+ }
+
+ public int getReasonForSuspending() {
+ return reasonForSuspending;
+ }
+
+ public void setReasonForSuspending(int reasonForSuspending) {
+ this.reasonForSuspending = reasonForSuspending;
+ }
+
+ public int getReasonForResuming() {
+ return reasonForResuming;
+ }
+
+ public void setReasonForResuming(int reasonForResuming) {
+ this.reasonForResuming = reasonForResuming;
+ }
+
+}

Back to the top