| /******************************************************************************* |
| * Copyright (c) 2014 Bosch Software Innovations GmbH and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * and Eclipse Distribution License v1.0 which accompany this distribution. |
| * |
| * The Eclipse Public License is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * The Eclipse Distribution License is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * Contributors: |
| * Bosch Software Innovations GmbH - Please refer to git log |
| * |
| *******************************************************************************/ |
| package org.eclipse.vorto.fbeditor.generator; |
| |
| import static com.google.common.collect.Sets.newHashSet; |
| |
| import java.util.Set; |
| |
| import org.eclipse.xtext.generator.IFileSystemAccess; |
| import org.eclipse.xtext.generator.IOutputConfigurationProvider; |
| import org.eclipse.xtext.generator.OutputConfiguration; |
| |
| |
| public class FbOutputConfigurationProvider implements |
| IOutputConfigurationProvider { |
| |
| public static final String FB_OUTPUT = "src-gen"; |
| |
| @Override |
| public Set<OutputConfiguration> getOutputConfigurations() { |
| OutputConfiguration defaultOutput = new OutputConfiguration( |
| IFileSystemAccess.DEFAULT_OUTPUT); |
| defaultOutput |
| .setDescription("Output folder for generated XML, XSD and binding files"); |
| defaultOutput.setOutputDirectory(FB_OUTPUT); |
| defaultOutput.setOverrideExistingResources(true); |
| defaultOutput.setCreateOutputDirectory(true); |
| defaultOutput.setCanClearOutputDirectory(true); |
| defaultOutput.setCleanUpDerivedResources(true); |
| defaultOutput.setSetDerivedProperty(false); |
| |
| OutputConfiguration rootOutput = new OutputConfiguration("root_Output"); |
| rootOutput.setDescription("Output folder for generated POM"); |
| rootOutput.setOutputDirectory("."); |
| rootOutput.setOverrideExistingResources(true); |
| rootOutput.setCreateOutputDirectory(true); |
| rootOutput.setCanClearOutputDirectory(false); |
| rootOutput.setCleanUpDerivedResources(false); |
| rootOutput.setSetDerivedProperty(false); |
| |
| return newHashSet(defaultOutput, rootOutput); |
| } |
| |
| } |