当前位置: 首页>>代码示例>>Java>>正文


Java IExecutionEngine类代码示例

本文整理汇总了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);
			}
		});
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:20,代码来源:GenericSequentialModelDebugger.java

示例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;
				}			
			});
	}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:22,代码来源:EnginesStatusView.java

示例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);
      }
	 });
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:21,代码来源:EnginesStatusView.java

示例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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:21,代码来源:ViewContentProvider.java

示例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));
					
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:18,代码来源:AbstractEngineAction.java

示例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);
	
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:18,代码来源:AbstractGemocDebugger.java

示例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);
		}
	});
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:15,代码来源:GenericSequentialModelDebugger.java

示例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;
		}
	});
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:14,代码来源:GenericSequentialModelDebugger.java

示例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.");
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:12,代码来源:GenericSequentialModelDebugger.java

示例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);
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:9,代码来源:GenericSequentialModelDebugger.java

示例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);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:10,代码来源:GenericSequentialModelDebugger.java

示例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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:12,代码来源:Launcher.java

示例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();
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:16,代码来源:StateGraphViewPart.java

示例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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:11,代码来源:MultidimensionalTimelineViewPart.java

示例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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:15,代码来源:OpenSemanticsHandler.java


注:本文中的org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。