當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。