blob: 315b4e7b9a756b4d018fcbee07b20ebda0353c07 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.framework;
import org.eclipse.viatra2.codegen.CodeOutputPluginFactory;
import org.eclipse.viatra2.core.IModelSpace;
import org.eclipse.viatra2.framework.properties.IViatraPropertyProvider;
import org.eclipse.viatra2.framework.properties.VPMProperties;
import org.eclipse.viatra2.imports.NativeImporterFactory;
import org.eclipse.viatra2.interpreters.ModelInterpreterFactory;
import org.eclipse.viatra2.loaders.LoaderFactory;
import org.eclipse.viatra2.logger.Logger;
import org.eclipse.viatra2.logger.LoggerFactory;
import org.eclipse.viatra2.natives.ASMNativeFunction;
/**
* This is the interface of the extension module loader of the framework.
* Different extension module loaders are required for the Eclipse framework and
* for the command line environment. In Eclipse, extensions are loaded using the
* Eclipse plugin framework. In the command line environment, extensions are
* loaded by a command line extension framework.
*
* @author Andras Schmidt, Istvan Rath
*/
public interface ExtensionProvider {
/**
* Get the default logger, which can log initialisation problems too (loaded
* before any other logger)
*
* @return logger or null
*/
Logger getDefaultLogger() throws FrameworkException;
/**
* Returns all available loggers
*
* @return Returns all available loggers
*/
LoggerFactory[] getAvailableLoggers() throws FrameworkException;
/**
* Returns the loggers which should be initially bounded to the
* modelSpace(in addition to the default logger)
*
* @param p
* properties for the environment
* @return the loggers which should be initially bounded to the
* modelSpace(in addition to the default logger)
* @throws FrameworkException
*/
// LoggerFactory[] getInitLoggers(Properties p) throws FrameworkException;
/**
* Returns all available code output plugins
*
* @param p
* @return all available code output plugins
* @throws FrameworkException
*/
CodeOutputPluginFactory[] getCodeOutputPlugins() throws FrameworkException;
/**
* Returns code output plugins, which should initially be bounded to the
* modelSpace
*
* @param p
* properties of the environment
* @return code output plugins, which should initially be bounded to the
* modelSpace
* @throws FrameworkException
*/
// CodeOutputPluginFactory[] getInitCodeOutputs(Properties p) throws
// FrameworkException;
/**
* Returns all available importers
*
* @param p
* @return all available importers
* @throws FrameworkException
*/
NativeImporterFactory[] getNativeImporters(VPMProperties p)
throws FrameworkException;
/**
* Returns all available loaders
*
* @param p
* @throws FrameworkException
*/
LoaderFactory[] getLoaders(VPMProperties p) throws FrameworkException;
/**
* Gets an empty modelspace
*
* @param props
* @return
*/
IModelSpace getEmptyModelspace(VPMProperties props);
/**
* Get the default properties for a new modelspace
*
* @return
* @throws FrameworkException
*/
VPMProperties getDefaultProperties() throws FrameworkException;
/**
* Set the logger for this class. Initialisation problems will be logged in
* the given logger.
*
* @param l
*/
// void setLogger(Logger l);
/**
* Returns all available interpreters.
*
* @return all available interpreters
*/
ModelInterpreterFactory[] getInterpreters();
/**
* Return all native functions defined in the environment
*
* @return all native functions defined in the environment
*/
ASMNativeFunction[] getNativeFunctions();
/**
* Returns all property providers defined in the environment
*/
IViatraPropertyProvider[] getPropertyProviders();
}