org.eclipse.ocl.examples.validity.locator
Class UMLUIConstraintLocator.DebugStarter

java.lang.Object
  extended by org.eclipse.ocl.examples.validity.locator.UMLUIConstraintLocator.DebugStarter
All Implemented Interfaces:
org.eclipse.jface.operation.IRunnableWithProgress
Enclosing class:
UMLUIConstraintLocator

protected static class UMLUIConstraintLocator.DebugStarter
extends java.lang.Object
implements org.eclipse.jface.operation.IRunnableWithProgress

The DebugStarter sequences the start up of the debugger off the thread.


Field Summary
protected  org.eclipse.emf.ecore.EObject contextObject
           
protected  java.lang.String expression
           
protected  MetaModelManager metaModelManager
           
protected  org.eclipse.swt.widgets.Shell shell
           
 
Constructor Summary
UMLUIConstraintLocator.DebugStarter(org.eclipse.swt.widgets.Shell shell, MetaModelManager metaModelManager, org.eclipse.emf.ecore.EObject contextObject, java.lang.String expression)
           
 
Method Summary
protected  org.eclipse.emf.common.util.URI createDocument(org.eclipse.core.runtime.IProgressMonitor monitor)
          Create a test Complete OCL document that wraps the required OCL text up as the body of a test operation.
 org.eclipse.debug.core.ILaunch getLaunch()
           
protected  org.eclipse.debug.core.ILaunch launchDebugger(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.emf.ecore.EObject contextObject, ExpressionInOCL expressionInOCL)
          Create and launch an internal launch configuration to debug expressionInOCL applied to contextObject.
protected  BaseCSResource loadDocument(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.emf.common.util.URI documentURI)
          Load and parse the test document.
protected  ExpressionInOCL loadExpression(org.eclipse.core.runtime.IProgressMonitor monitor, BaseCSResource csResource)
          Extract the embedded ExpressionInOCL.
protected  void openError(java.lang.String message)
           
protected  void openError(java.lang.String message, java.lang.Exception e)
           
 void run(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shell

@NonNull
protected final org.eclipse.swt.widgets.Shell shell

metaModelManager

@NonNull
protected final MetaModelManager metaModelManager

contextObject

@Nullable
protected final org.eclipse.emf.ecore.EObject contextObject

expression

@NonNull
protected final java.lang.String expression
Constructor Detail

UMLUIConstraintLocator.DebugStarter

public UMLUIConstraintLocator.DebugStarter(@NonNull
                                           org.eclipse.swt.widgets.Shell shell,
                                           @NonNull
                                           MetaModelManager metaModelManager,
                                           @Nullable
                                           org.eclipse.emf.ecore.EObject contextObject,
                                           @NonNull
                                           java.lang.String expression)
Method Detail

createDocument

@NonNull
protected org.eclipse.emf.common.util.URI createDocument(org.eclipse.core.runtime.IProgressMonitor monitor)
                                                  throws java.io.IOException,
                                                         org.eclipse.core.runtime.CoreException
Create a test Complete OCL document that wraps the required OCL text up as the body of a test operation. Returns its URI.

Throws:
java.io.IOException
org.eclipse.core.runtime.CoreException

getLaunch

public org.eclipse.debug.core.ILaunch getLaunch()

launchDebugger

protected org.eclipse.debug.core.ILaunch launchDebugger(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                        @Nullable
                                                        org.eclipse.emf.ecore.EObject contextObject,
                                                        @NonNull
                                                        ExpressionInOCL expressionInOCL)
                                                 throws org.eclipse.core.runtime.CoreException
Create and launch an internal launch configuration to debug expressionInOCL applied to contextObject.

Throws:
org.eclipse.core.runtime.CoreException

loadDocument

@Nullable
protected BaseCSResource loadDocument(org.eclipse.core.runtime.IProgressMonitor monitor,
                                               @NonNull
                                               org.eclipse.emf.common.util.URI documentURI)
                               throws java.lang.Exception
Load and parse the test document.

Throws:
java.io.IOException
java.lang.Exception

loadExpression

@Nullable
protected ExpressionInOCL loadExpression(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                  BaseCSResource csResource)
Extract the embedded ExpressionInOCL.


openError

protected void openError(java.lang.String message)

openError

protected void openError(java.lang.String message,
                         @NonNull
                         java.lang.Exception e)

run

public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
run in interface org.eclipse.jface.operation.IRunnableWithProgress