本文整理汇总了Java中org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine类的典型用法代码示例。如果您正苦于以下问题:Java IExecutionEngine类的具体用法?Java IExecutionEngine怎么用?Java IExecutionEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IExecutionEngine类属于org.eclipse.gemoc.xdsmlframework.api.core包,在下文中一共展示了IExecutionEngine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupStepReturnPredicateBreak
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
protected void setupStepReturnPredicateBreak() {
final IExecutionEngine seqEngine = (IExecutionEngine) engine;
final Deque<MSEOccurrence> stack = seqEngine.getCurrentStack();
if (stack.size() > 1) {
final Iterator<MSEOccurrence> it = stack.iterator();
it.next();
addPredicateBreak(new BiPredicate<IExecutionEngine, MSEOccurrence>() {
// The operation we want to step return
private MSEOccurrence steppedReturn = it.next();
@Override
public boolean test(IExecutionEngine t, MSEOccurrence u) {
// We finished stepping over once the mseoccurrence is not
// there anymore
return !seqEngine.getCurrentStack().contains(steppedReturn);
}
});
}
}
示例2: createColumn3
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
private void createColumn3()
{
TreeColumn column = new TreeColumn(_viewer.getTree(), SWT.LEFT);
// column.setText("Step");
TreeViewerColumn viewerColumn = new TreeViewerColumn(_viewer, column);
viewerColumn.setLabelProvider(
new ColumnLabelProvider()
{
@Override
public String getText(Object element)
{
String result = "";
if (element instanceof IExecutionEngine)
{
IExecutionEngine engine = (IExecutionEngine)element;
result = String.format("%d", engine.getEngineStatus().getNbLogicalStepRun());
}
return result;
}
});
}
示例3: removeStoppedEngines
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
public void removeStoppedEngines(){
Display.getDefault().syncExec(new Runnable() {
public void run() {
// we may be triggered by a registry change or by an engine change
// if registry changes, then may need to observe the new engine
for (Entry<String, IExecutionEngine> engineEntry : org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.getRunningEngines().entrySet())
{
switch(engineEntry.getValue().getRunningStatus())
{
case Stopped:
engineEntry.getValue().dispose();
org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry.unregisterEngine(engineEntry.getKey());
break;
default:
}
}
_viewer.setInput(org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry);
}
});
}
示例4: getComparator
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
private Comparator<IExecutionEngine> getComparator()
{
Comparator<IExecutionEngine> comparator = new Comparator<IExecutionEngine>() {
public int compare(IExecutionEngine c1, IExecutionEngine c2)
{
int c1Value = c1.getRunningStatus().ordinal();
int c2Value = c2.getRunningStatus().ordinal();
if (c1Value < c2Value)
{
return -1;
}
else if (c1Value > c2Value)
{
return 1;
}
return 0;
}
};
return comparator;
}
示例5: engineSelectionChanged
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void engineSelectionChanged(IExecutionEngine engine)
{
_currentSelectedEngine = engine;
if (_currentSelectedEngine == null)
{
setEnabled(false);
}
else
{
setEnabled(
!_currentSelectedEngine.getRunningStatus().equals(RunStatus.Stopped)
&& _currentSelectedEngine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Animation));
}
}
示例6: AbstractGemocDebugger
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
public AbstractGemocDebugger(IDSLDebugEventProcessor target, IExecutionEngine engine) {
super(target);
this.engine = engine;
// This prevents a null pointer exception if the engine does not have a
// Language Definition Extension.
// In that case, the getLanguageDefinitionExtension() returns null
// e.g., the coordination engine
if (engine.getExecutionContext().getLanguageDefinitionExtension() != null) {
bundleSymbolicName = engine.getExecutionContext().getLanguageDefinitionExtension().getName().toLowerCase();
}
registerModelChangeListener();
Activator openSourceActivator = Activator.getDefault();
openSourceActivator.setHandlerFieldSuppliers(() -> this.engine, () -> this.bundleSymbolicName);
}
示例7: setupStepOverPredicateBreak
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
protected void setupStepOverPredicateBreak() {
addPredicateBreak(new BiPredicate<IExecutionEngine, MSEOccurrence>() {
final IExecutionEngine seqEngine = (IExecutionEngine) engine;
// The operation we want to step over
private MSEOccurrence steppedOver = seqEngine.getCurrentMSEOccurrence();
@Override
public boolean test(IExecutionEngine t, MSEOccurrence u) {
// We finished stepping over once the mseoccurrence is not there
// anymore
return !seqEngine.getCurrentStack().contains(steppedOver);
}
});
}
示例8: steppingInto
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void steppingInto(String threadName) {
// To send notifications, but probably useless
super.steppingInto(threadName);
// We add a future break asap
addPredicateBreak(new BiPredicate<IExecutionEngine, MSEOccurrence>() {
@Override
public boolean test(IExecutionEngine t, MSEOccurrence u) {
// We finished stepping as soon as we encounter a new step
return true;
}
});
}
示例9: aboutToExecuteStep
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void aboutToExecuteStep(IExecutionEngine executionEngine, Step<?> step) {
MSEOccurrence mseOccurrence = step.getMseoccurrence();
if (mseOccurrence != null) {
ToPushPop stackModification = new ToPushPop(mseOccurrence, true);
toPushPop.add(stackModification);
if (!control(threadName, mseOccurrence)) {
throw new EngineStoppedException("Debug thread has stopped.");
}
}
}
示例10: stepExecuted
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void stepExecuted(IExecutionEngine engine, Step<?> step) {
MSEOccurrence mseOccurrence = step.getMseoccurrence();
if (mseOccurrence != null) {
ToPushPop stackModification = new ToPushPop(mseOccurrence, false);
toPushPop.add(stackModification);
}
}
示例11: engineAboutToStop
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void engineAboutToStop(IExecutionEngine engine) {
// Simulating breakpoint
// TODO maybe display a warning informing the user the execution has
// ended, as resuming execution will prevent further interactions with the
// trace and the debugging facilities, which might not be desirable.
executionTerminated = true;
control(threadName, FAKE_INSTRUCTION);
}
示例12: createExecutionEngine
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
protected IExecutionEngine createExecutionEngine(RunConfiguration runConfiguration, ExecutionMode executionMode)
throws CoreException, EngineContextException {
// create and initialize engine
IExecutionEngine executionEngine = new PlainK3ExecutionEngine();
ModelExecutionContext executioncontext = new SequentialModelExecutionContext(runConfiguration, executionMode);
executioncontext.getExecutionPlatform().getModelLoader().setProgressMonitor(this.launchProgressMonitor);
executioncontext.initializeResourceModel();
executionEngine.initialize(executioncontext);
return executionEngine;
}
示例13: engineSelectionChanged
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
@Override
public void engineSelectionChanged(IExecutionEngine engine) {
if (engine != null) {
Set<IMultiDimensionalTraceAddon> traceAddons = engine.getAddonsTypedBy(IMultiDimensionalTraceAddon.class);
if (!traceAddons.isEmpty()) {
final IMultiDimensionalTraceAddon<Step<?>, State<?,?>, TracedObject<?>, Dimension<?>, Value<?>> traceAddon = traceAddons.iterator().next();
stateGraph = new StateGraph();
stateGraph.setTraceExtractor(traceAddon.getTraceExtractor());
stateGraph.setTraceExplorer(traceAddon.getTraceExplorer());
traceAddon.getTraceNotifier().addListener(stateGraph);
renderer.setStateGraph(stateGraph);
stateGraph.update();
}
}
}
示例14: canDisplayTimeline
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
private boolean canDisplayTimeline(IExecutionEngine engine) {
if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Run)
&& engine.getRunningStatus().equals(RunStatus.Stopped)) {
return true;
}
if (engine.getExecutionContext().getExecutionMode().equals(ExecutionMode.Animation)) {
return true;
}
return false;
}
示例15: execute
import org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException {
Supplier<IExecutionEngine> engineSupplier = org.eclipse.gemoc.executionframework.debugger.Activator.getDefault().getEngineSupplier();
Supplier<String> bundleSupplier = org.eclipse.gemoc.executionframework.debugger.Activator.getDefault().getBundleSymbolicNameSupplier();
if (engineSupplier != null) {
this.engine = engineSupplier.get();
}
if (bundleSupplier != null) {
this.bundleSymbolicName = bundleSupplier.get();
}
TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
locateAndOpenSource(selection);
return null;
}