| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| * |
| * This copyright notice shows up in the generated Java code |
| * |
| */ |
| |
| package org.eclipse.osbp.xtext.functionlibrarydsl.jvmmodel |
| |
| import javax.inject.Inject |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.osbp.bpm.BlipBaseFunctionGroup |
| import org.eclipse.osbp.ui.api.functionlibrary.IFunctionLibraryGroup |
| import org.eclipse.osbp.ui.api.functionlibrary.IFunctionLibraryPackage |
| import org.eclipse.osbp.xtext.addons.AdvancedJvmModelGenerator |
| import org.eclipse.osbp.xtext.basic.generator.BasicDslGeneratorUtils |
| import org.eclipse.xtext.xbase.compiler.GeneratorConfig |
| import org.eclipse.xtext.xbase.compiler.ImportManager |
| import org.osgi.framework.FrameworkUtil |
| |
| class FunctionLibraryModelGenerator extends AdvancedJvmModelGenerator { |
| @Inject extension BasicDslGeneratorUtils |
| override createAppendable(EObject context, ImportManager importManager, GeneratorConfig config) { |
| // required to initialize the needed builder to avoid deprecated methods |
| builder = context.eResource |
| // --------- |
| addImportFor(importManager, _typeReferenceBuilder |
| , BlipBaseFunctionGroup |
| , FrameworkUtil |
| , IFunctionLibraryGroup |
| , IFunctionLibraryPackage |
| ) |
| super.createAppendable(context, importManager, config) |
| } |
| } |