| /** |
| * 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.emf.ecore.resource.Resource; |
| import org.eclipse.osbp.bpm.api.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.eclipse.xtext.xbase.compiler.output.TreeAppendable; |
| import org.eclipse.xtext.xbase.lib.Extension; |
| import org.osgi.framework.FrameworkUtil; |
| |
| @SuppressWarnings("all") |
| public class FunctionLibraryModelGenerator extends AdvancedJvmModelGenerator { |
| @Inject |
| @Extension |
| private BasicDslGeneratorUtils _basicDslGeneratorUtils; |
| |
| public TreeAppendable createAppendable(final EObject context, final ImportManager importManager, final GeneratorConfig config) { |
| TreeAppendable _xblockexpression = null; |
| { |
| Resource _eResource = context.eResource(); |
| this.setBuilder(_eResource); |
| this._basicDslGeneratorUtils.addImportFor(this, importManager, this._typeReferenceBuilder, BlipBaseFunctionGroup.class, FrameworkUtil.class, IFunctionLibraryGroup.class, IFunctionLibraryPackage.class); |
| _xblockexpression = super.createAppendable(context, importManager, config); |
| } |
| return _xblockexpression; |
| } |
| } |