All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.epsilon.eol.IEolModule Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2008 The University of York.
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * Contributors:
 *     Dimitrios Kolovos - initial API and implementation
 ******************************************************************************/
package org.eclipse.epsilon.eol;

import java.io.File;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.eclipse.epsilon.common.module.IModule;
import org.eclipse.epsilon.common.parse.problem.ParseProblem;
import org.eclipse.epsilon.eol.debug.IEolDebugger;
import org.eclipse.epsilon.eol.dom.Import;
import org.eclipse.epsilon.eol.dom.ModelDeclaration;
import org.eclipse.epsilon.eol.dom.OperationList;
import org.eclipse.epsilon.eol.dom.Statement;
import org.eclipse.epsilon.eol.dom.StatementBlock;
import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
import org.eclipse.epsilon.eol.execute.context.IEolContext;

public interface IEolModule extends IModule {
	
	Object execute() throws EolRuntimeException;
	
	StatementBlock getMain();
	
	List getPostOperationStatements();
	
	@Override
	boolean parse(String code, File file) throws Exception;
	
	OperationList getDeclaredOperations();
	
	OperationList getOperations();
	
	List getDeclaredModelDeclarations();
	
	Set getModelDeclarations();
	
	IEolModule getParentModule();
	
	void setParentModule(IEolModule parent);
	
	List getImports();
	
	IEolContext getContext();
	
	void setContext(IEolContext context);
	
	@Override
	List getParseProblems();
	
	/**
	 * Configure the IEolModule with the given properties
	 * @param properties a map of property:value 
	 * @since 1.6
	 */
	default void configure(Map properties) {
		
	}
	
	/**
	 * Get the set of property names that should be retrieved from the ILaunchConfiguration in order
	 * to configure this module.
	 * @return
	 * @since 1.6
	 */
	default Set getConfigurationProperties() {
		return Collections.emptySet();
	}

	/**
	 * Returns an object that caches the imports made by a module.
	 *
	 * @since 2.5
	 */
	IImportManager getImportManager();

	/**
	 * Sets the object that will cache imports to be done by a module.
	 *
	 * @since 2.5
	 */
	void setImportManager(IImportManager importManager);

	/**
	 * Creates an object that implements debugging (i.e. breakpoints and stepping) for this module.
	 *
	 * @since 2.6
	 */
	IEolDebugger createDebugger();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy