blob: 805f999fbf477f41221c8ea5a7ee01e15d4cf769 [file] [log] [blame]
// *****************************************************************************
// Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency
// 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:
// Steve Monnier OBEO - Initial API and implementation
//
// SPDX-License-Identifier: EPL-1.0
// *****************************************************************************
@GenModel(prefix="ApogyCoreJavaScriptPrograms",
childCreationExtenders="true",
extensibleProviderFactory="true",
multipleEditorPages="false",
copyrightText="*******************************************************************************
Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency
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:
Steve Monnier OBEO - Initial API and implementation
SPDX-License-Identifier: EPL-1.0
*******************************************************************************",
modelName="ApogyCoreJavaScriptPrograms",
suppressGenModelAnnotations="false", publicConstructors="true")
@GenModel(dynamicTemplates="true", templateDirectory="platform:/plugin/org.eclipse.apogy.common.emf.codegen/templates")
@GenModel(modelDirectory="/org.eclipse.apogy.core.programs.javascript/src-gen")
@GenModel(editDirectory="/org.eclipse.apogy.core.programs.javascript.edit/src-gen")
package org.eclipse.apogy.core.programs.javascript
import org.eclipse.apogy.core.invocator.InvocatorSession
import org.eclipse.apogy.core.invocator.OperationCallContainer
import org.eclipse.apogy.core.invocator.AbstractProgramRuntime
import org.eclipse.apogy.core.invocator.ScriptBasedProgram
import org.eclipse.apogy.core.invocator.ProgramFactory
import org.eclipse.apogy.common.Apogy
@Apogy(isSingleton="true", hasCustomClass="true")
class ApogyJavaScriptFacade
{
/**
* Create the default Java Script code template. This template includes the required header and main function.
* @param session The session in which the script is being defined.
* @param javaScriptProgram The JavaScriptProgram for which the script is being created.
*/
op String createJavaScriptCodeTemplate(InvocatorSession session, JavaScriptProgram javaScriptProgram)
}
/*
* A JavaScriptProgram is an entity that invokes Operation Calls on Variables through a JavaScript program file.
*/
@Apogy(hasCustomItemProvider="true")
class JavaScriptProgram extends ScriptBasedProgram, OperationCallContainer
{
String scriptPath
}
/*
* Specialization of AbstractProgramRuntime used for executing Java Scripts.
*/
@Apogy(hasCustomClass="true")
class JavaScriptProgramRuntime extends AbstractProgramRuntime
{
}
/*
* Javascript Factory
*/
@Apogy(hasCustomClass="true")
class JavaScriptProgramFactory extends ProgramFactory
{
}