Java Code Examples for org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine

The following are top voted examples for showing how to use org.eclipse.gemoc.xdsmlframework.api.core.IExecutionEngine. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 6 votes vote down vote up
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);
			}
		});
	}
}
 
Example 2
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 6 votes vote down vote up
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;
				}			
			});
	}
 
Example 3
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 6 votes vote down vote up
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);
      }
	 });
}
 
Example 4
Project: gemoc-studio-modeldebugging   File: ViewContentProvider.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 5
Project: gemoc-studio-modeldebugging   File: AbstractEngineAction.java   Source Code and License 6 votes vote down vote up
@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));
					
	}
}
 
Example 6
Project: gemoc-studio-modeldebugging   File: AbstractGemocDebugger.java   Source Code and License 6 votes vote down vote up
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);
	
}
 
Example 7
Project: ModelDebugging   File: GenericSequentialModelDebugger.java   Source Code and License 6 votes vote down vote up
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);
			}
		});
	}
}
 
Example 8
Project: ModelDebugging   File: EnginesStatusView.java   Source Code and License 6 votes vote down vote up
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;
				}			
			});
	}
 
Example 9
Project: ModelDebugging   File: EnginesStatusView.java   Source Code and License 6 votes vote down vote up
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);
      }
	 });
}
 
Example 10
Project: ModelDebugging   File: ViewContentProvider.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 11
Project: ModelDebugging   File: AbstractEngineAction.java   Source Code and License 6 votes vote down vote up
@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));
					
	}
}
 
Example 12
Project: ModelDebugging   File: AbstractGemocDebugger.java   Source Code and License 6 votes vote down vote up
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);
	
}
 
Example 13
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 5 votes vote down vote up
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);
		}
	});
}
 
Example 14
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 5 votes vote down vote up
@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;
		}
	});
}
 
Example 15
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 5 votes vote down vote up
@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.");
		}
	}
}
 
Example 16
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 5 votes vote down vote up
@Override
public void stepExecuted(IExecutionEngine engine, Step<?> step) {
	MSEOccurrence mseOccurrence = step.getMseoccurrence();
	if (mseOccurrence != null) {
		ToPushPop stackModification = new ToPushPop(mseOccurrence, false);
		toPushPop.add(stackModification);
	}
}
 
Example 17
Project: gemoc-studio-modeldebugging   File: GenericSequentialModelDebugger.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 18
Project: gemoc-studio-modeldebugging   File: Launcher.java   Source Code and License 5 votes vote down vote up
@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;
}
 
Example 19
Project: gemoc-studio-modeldebugging   File: StateGraphViewPart.java   Source Code and License 5 votes vote down vote up
@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();
		}
	}
}
 
Example 20
Project: gemoc-studio-modeldebugging   File: MultidimensionalTimelineViewPart.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 21
Project: gemoc-studio-modeldebugging   File: OpenSemanticsHandler.java   Source Code and License 5 votes vote down vote up
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;
}
 
Example 22
Project: gemoc-studio-modeldebugging   File: EventManager.java   Source Code and License 5 votes vote down vote up
@Override
public void engineAboutToStart(IExecutionEngine engine) {
	final Set<IBehavioralAPI> apis = engine.getAddonsTypedBy(IBehavioralAPI.class);
	if (!apis.isEmpty()) {
		api = apis.iterator().next();
	}
}
 
Example 23
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 5 votes vote down vote up
/**
 * get the selection
 * @return the engine selected or null if no engine selected
 */
public IExecutionEngine getSelectedEngine()
{
	try{
		IStructuredSelection selection = (IStructuredSelection) _viewer.getSelection();
		return (IExecutionEngine)selection.getFirstElement();
	} catch(Exception e){
		Activator.error(e.getMessage(), e);
	}
	return null;
}
 
Example 24
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 5 votes vote down vote up
private void fireEngineSelectionChanged() {
	IExecutionEngine engine = getSelectedEngine();
	if (engine != selectedEngine) {
		selectedEngine = engine;
		for(IEngineSelectionListener listener: Activator.getDefault().getEngineSelectionManager().getEngineSelectionListeners()) {
			listener.engineSelectionChanged(selectedEngine);
		}
	}
}
 
Example 25
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 5 votes vote down vote up
@Override
public void engineRegistered(final IExecutionEngine engine) 
{
	Display.getDefault().syncExec(new Runnable() {
	      public void run() {
	  		engine.getExecutionContext().getExecutionPlatform().addEngineAddon(EnginesStatusView.this);
	    	_viewer.setInput(org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry);
	    	TreeViewerHelper.resizeColumns(_viewer);
    		TreePath treePath = new TreePath(new Object[] {engine});
    		TreeSelection newSelection = new TreeSelection(treePath);
    		_viewer.setSelection(newSelection, true);			      }
	 });
}
 
Example 26
Project: gemoc-studio-modeldebugging   File: EnginesStatusView.java   Source Code and License 5 votes vote down vote up
private void reselectEngine(final IExecutionEngine engine)
{
	Display.getDefault().syncExec(new Runnable() {
	      public void run() {
	    	  updateUserInterface(engine);
	    	  if (getSelectedEngine() == engine)
	    	  {
	    		  fireEngineSelectionChanged();
	    	  }
	      }
	 });

}
 
Example 27
Project: gemoc-studio-modeldebugging   File: ViewContentProvider.java   Source Code and License 5 votes vote down vote up
public Object[] getElements(Object parent) {
	if (parent instanceof GemocRunningEnginesRegistry)
	{
		GemocRunningEnginesRegistry registry = org.eclipse.gemoc.executionframework.engine.Activator.getDefault().gemocRunningEngineRegistry;
		List<IExecutionEngine> engines = new ArrayList<IExecutionEngine>(registry.getRunningEngines().values());
		Collections.sort(engines, getComparator()); 
		return engines.toArray();
	}
	return null;
}
 
Example 28
Project: gemoc-studio-modeldebugging   File: DisposeStoppedEngineAction.java   Source Code and License 5 votes vote down vote up
@Override
public void engineSelectionChanged(IExecutionEngine engine) 
{
	super.engineSelectionChanged(engine);
	if (getCurrentSelectedEngine() != null)
	{
		setEnabled(	getCurrentSelectedEngine().getRunningStatus().equals(RunStatus.Stopped));
					
	}
}
 
Example 29
Project: gemoc-studio-modeldebugging   File: StopEngineAction.java   Source Code and License 5 votes vote down vote up
@Override
public void engineSelectionChanged(IExecutionEngine engine) {
	_currentSelectedEngine = engine;

	if (_currentSelectedEngine == null) {
		setEnabled(false);
	} else {
		setEnabled(!_currentSelectedEngine.getRunningStatus().equals(RunStatus.Stopped));

	}
}
 
Example 30
Project: gemoc-studio-modeldebugging   File: EventManagerViewPart.java   Source Code and License 5 votes vote down vote up
@Override
public void engineSelectionChanged(IExecutionEngine engine) {
	if (engine != null) {
		eventManagerRenderer.setExecutedModel(engine.getExecutionContext().getResourceModel());
		engine.getExecutionContext().getExecutionPlatform().addEngineAddon(eventManagerRenderer);
	} else {
		eventManagerRenderer.setExecutedModel(null);
	}
}
 
Example 31
Project: gemoc-studio-modeldebugging   File: EventManagerRenderer.java   Source Code and License 5 votes vote down vote up
@Override
public void engineInitialized(IExecutionEngine executionEngine) {
	Set<IEventManager> eventManagers = executionEngine.getAddonsTypedBy(IEventManager.class);
	if (!eventManagers.isEmpty()) {
		setEventInterpreter(eventManagers.iterator().next());
	}
}
 
Example 32
Project: gemoc-studio-modeldebugging   File: EventManagerRenderer.java   Source Code and License 5 votes vote down vote up
@Override
public void engineStopped(IExecutionEngine engine) {
	executedModel = null;
	eventTypeToEventTableView.clear();
	Platform.runLater(() -> {
		eventList.clear();
		scrollPane.setContent(null);
	});
}
 
Example 33
Project: gemoc-studio-modeldebugging   File: GemocRunningEnginesRegistry.java   Source Code and License 5 votes vote down vote up
/**
 * Add the given engine with this name
 * @param baseName (not used !? should be removed from API)
 * @param engine to add
 * @return the unique name really used for this engine
 */
 public synchronized String registerEngine(String baseName, IExecutionEngine engine){
	int uniqueInstance = 0;
	String engineName = Thread.currentThread().getName() + " ("+uniqueInstance+")";
	synchronized(runningEngines)
	{
		while(runningEngines.containsKey(engineName)){
			uniqueInstance = uniqueInstance +1;
			engineName = Thread.currentThread().getName() + " ("+uniqueInstance+")";
		}
		runningEngines.put(engineName, engine);
	}
	notifyEngineRegistered(engine);			
	return engineName;
}
 
Example 34
Project: gemoc-studio-modeldebugging   File: GemocRunningEnginesRegistry.java   Source Code and License 5 votes vote down vote up
public void unregisterEngine(String engineName) 
{
	synchronized(runningEngines)
	{
		IExecutionEngine engine = runningEngines.get(engineName);
		if (engine != null)
		{
			runningEngines.remove(engineName);
			notifyEngineUnregistered(engine);
		}			
	}
}
 
Example 35
Project: gemoc-studio-modeldebugging   File: GemocRunningEnginesRegistry.java   Source Code and License 5 votes vote down vote up
private void notifyEngineRegistered(IExecutionEngine engine) {
	synchronized (_engineRegistrationListeners) {
		for (IEngineRegistrationListener l : _engineRegistrationListeners)
		{
			l.engineRegistered(engine);
		}			
	}
}
 
Example 36
Project: gemoc-studio-modeldebugging   File: GemocRunningEnginesRegistry.java   Source Code and License 5 votes vote down vote up
private void notifyEngineUnregistered(IExecutionEngine engine) {
	synchronized (_engineRegistrationListeners) {
		for (IEngineRegistrationListener l : _engineRegistrationListeners)
		{
			l.engineUnregistered(engine);
		}			
	}
}
 
Example 37
Project: gemoc-studio-modeldebugging   File: AbstractGemocDebugger.java   Source Code and License 5 votes vote down vote up
@Override
/**
 * Breakpoints are persistent, and can trigger pauses as long as they are not removed.
 */
public void addPredicateBreakpoint(BiPredicate<IExecutionEngine, MSEOccurrence> predicate) {
	predicateBreakPoints.add(predicate);
}
 
Example 38
Project: gemoc-studio-modeldebugging   File: AbstractGemocDebugger.java   Source Code and License 5 votes vote down vote up
@Override
/**
 * A Break only trigger a single pause, then is removed.
 */
public void addPredicateBreak(BiPredicate<IExecutionEngine, MSEOccurrence> predicate) {
	predicateBreaks.add(predicate);
}
 
Example 39
Project: gemoc-studio-modeldebugging   File: SimpleModelChangeListenerAddon.java   Source Code and License 5 votes vote down vote up
@Override
public void engineAboutToStop(IExecutionEngine engine) {
	Set<Resource> allResources = org.eclipse.gemoc.commons.eclipse.emf.EMFResource.getRelatedResources(this.engine
			.getExecutionContext().getResourceModel());
	allResources.stream().forEach(r -> {
		r.eAdapters().remove(adapter);
	});
}
 
Example 40
Project: coordination   File: CoordinatedModelExecutionContext.java   Source Code and License 5 votes vote down vote up
protected IFile getTimemodelFile(IExecutionEngine engine) {
	URI modelURI = engine.getExecutionContext().getResourceModel().getURI();
	String modelPathName = modelURI.toPlatformString(true);
	String tmpModelProjectName = modelPathName.substring(1, modelPathName.length());
	String modelprojectName = tmpModelProjectName.substring(0, tmpModelProjectName.indexOf('/'));
	IProject modelProject = ResourcesPlugin.getWorkspace().getRoot().getProject(modelprojectName);
	String modelName = modelPathName.substring(modelPathName.lastIndexOf('/'));
	String modelNameWithoutExtension = modelName.substring(0, modelName.lastIndexOf('.'));
	IFile modelTimemodelFile = modelProject.getFile("gemoc-gen"+ modelNameWithoutExtension+".timemodel");
	return modelTimemodelFile;
}