当前位置: 首页>>代码示例>>Java>>正文


Java OutputConfiguration类代码示例

本文整理汇总了Java中org.eclipse.xtext.generator.OutputConfiguration的典型用法代码示例。如果您正苦于以下问题:Java OutputConfiguration类的具体用法?Java OutputConfiguration怎么用?Java OutputConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

OutputConfiguration类属于org.eclipse.xtext.generator包,在下文中一共展示了OutputConfiguration类的40个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configureFSA

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Setting the compile output-configurations to contain path-locations relative to the user.dir: Wrapper function
 * written against Xtext 2.7.1.
 *
 * In Eclipse-compile mode there are "projects" and the FSA is configured relative to these projects. In this
 * filebasedWorkspace here there is no "project"-concept for the generator. So the paths of the FSA need to be
 * reconfigured to contain the navigation to the IN4JSProject-root.
 *
 * @param project
 *            project to be compiled
 */
private void configureFSA(IN4JSProject project) {
	Map<String, OutputConfiguration> outputConfigToBeWrapped = getInitialOutputConfigurations();
	File currentDirectory = new File(".");
	File projectLocation = new File(project.getLocation().toFileString());

	// If project is not in a sub directory of the current directory an absolute path is computed.
	final java.net.URI projectURI = currentDirectory.toURI().relativize(projectLocation.toURI());
	final String projectPath = projectURI.getPath();
	if (projectPath.length() == 0) {
		// same directory, skip
		return;
	}

	// set different output configuration.
	fsa.setOutputConfigurations(transformedOutputConfiguration(projectPath, outputConfigToBeWrapped));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:28,代码来源:N4HeadlessCompiler.java


示例2: cleanOutput

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private void cleanOutput(IProject aProject, OutputConfiguration config, IProgressMonitor monitor)
		throws CoreException {
	IContainer container = getContainer(aProject, config.getOutputDirectory());
	if (!container.exists()) {
		return;
	}
	if (config.isCanClearOutputDirectory()) {
		for (IResource resource : container.members()) {
			resource.delete(IResource.KEEP_HISTORY, monitor);
		}
	} else if (config.isCleanUpDerivedResources()) {
		List<IFile> resources = derivedResourceMarkers.findDerivedResources(container, null);
		for (IFile iFile : resources) {
			iFile.delete(IResource.KEEP_HISTORY, monitor);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:18,代码来源:CleanInstruction.java


示例3: getGeneratorMarkers

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
protected Map<OutputConfiguration, Iterable<IMarker>> getGeneratorMarkers(IProject builtProject,
		Collection<OutputConfiguration> outputConfigurations) throws CoreException {

	if (builtProject instanceof ExternalProject) {
		return emptyMap();
	}

	Map<OutputConfiguration, Iterable<IMarker>> generatorMarkers = newHashMap();
	for (OutputConfiguration config : outputConfigurations) {
		if (config.isCleanUpDerivedResources()) {
			List<IMarker> markers = Lists.newArrayList();
			for (IContainer container : getOutputs(builtProject, config)) {
				Iterables.addAll(
						markers,
						getDerivedResourceMarkers().findDerivedResourceMarkers(container,
								getGeneratorIdProvider().getGeneratorIdentifier()));
			}
			generatorMarkers.put(config, markers);
		}
	}
	return generatorMarkers;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:24,代码来源:N4JSBuilderParticipant.java


示例4: createDescriptor

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private static CompilerDescriptor createDescriptor() {
	final CompilerDescriptor result = new CompilerDescriptor();
	result.setIdentifier(COMPILER_ID);
	result.setName("N4JS to ECMAScript transpiler");
	result.setDescription(
			"Transpiles N4JS to ECMAScript, currently ES5 plus some selected ES6 features supported by V8.");
	result.setActive(true);
	result.setCompiledFileExtension("js");
	result.setCompiledFileSourceMapExtension("map");
	final OutputConfiguration outCfg = new OutputConfiguration(COMPILER_ID);
	outCfg.setDescription("N4JS to ECMAScript transpiler");
	outCfg.setOutputDirectory(calculateOutputDirectory("src-gen", COMPILER_ID));
	outCfg.setOverrideExistingResources(true);
	outCfg.setCreateOutputDirectory(true);
	outCfg.setCleanUpDerivedResources(true);
	outCfg.setSetDerivedProperty(true);
	outCfg.setKeepLocalHistory(true);
	outCfg.setCanClearOutputDirectory(true);
	result.setOutputConfiguration(outCfg);
	return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:22,代码来源:EcmaScriptSubGenerator.java


示例5: getFileSystemAccess

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
protected IFileSystemAccess2 getFileSystemAccess(final IProject project, final IProgressMonitor monitor) {
	EclipseResourceFileSystemAccess2 access = fileSystemAccessProvider.get();
	access.setContext(project);
	access.setMonitor(monitor);
	OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
	defaultOutput.setDescription("Output Folder");
	defaultOutput.setOutputDirectory("./");
	defaultOutput.setOverrideExistingResources(true);
	defaultOutput.setCreateOutputDirectory(true);
	defaultOutput.setCleanUpDerivedResources(false);
	defaultOutput.setSetDerivedProperty(false);
	defaultOutput.setKeepLocalHistory(false);
	HashMap<String, OutputConfiguration> outputConfigurations = new HashMap<String, OutputConfiguration>();
	outputConfigurations.put(IFileSystemAccess.DEFAULT_OUTPUT, defaultOutput);
	access.setOutputConfigurations(outputConfigurations);
	return access;
}
 
开发者ID:vicegd,项目名称:org.xtext.dsl.restaurante,代码行数:18,代码来源:RestauranteProjectCreator.java


示例6: getFileSystemAccess

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private ISCTFileSystemAccess getFileSystemAccess(GeneratorEntry entry) {
	final ISCTFileSystemAccess fileSystemAccess = this.factory.create(entry);

	final FeatureConfiguration featureConfiguration = entry
			.getFeatureConfiguration(IArduinoFeatureConstants.FEATURE_NAME);
	if (featureConfiguration != null) {
		final String userSrcFolder = featureConfiguration
				.getParameterValue(IArduinoFeatureConstants.PARAM_USER_SRC_FOLDER).getStringValue();
		fileSystemAccess.setOutputPath(IArduinoFeatureConstants.PARAM_USER_SRC_FOLDER, userSrcFolder);

		final OutputConfiguration outputConfiguration = fileSystemAccess.getOutputConfigurations()
				.get(IArduinoFeatureConstants.PARAM_USER_SRC_FOLDER);
		outputConfiguration.setCreateOutputDirectory(true);
		outputConfiguration.setOverrideExistingResources(false);
		outputConfiguration.setSetDerivedProperty(false);
	}

	return fileSystemAccess;
}
 
开发者ID:wendehals,项目名称:arduino_sct_tools,代码行数:20,代码来源:ArduinoCppCodeGenerator.java


示例7: before

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Before
public void before() {
  try {
    final Path tmpPath = Paths.get(StandardSystemProperty.JAVA_IO_TMPDIR.value());
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("tempFolder_");
    UUID _randomUUID = UUID.randomUUID();
    _builder.append(_randomUUID);
    final Path output = Files.createTempDirectory(tmpPath, _builder.toString());
    final Path resource = Files.createFile(output.resolve(URIBasedFileSystemAccessTest.EXISTING_RESOURCE_NAME));
    resource.toFile().deleteOnExit();
    output.toFile().deleteOnExit();
    final OutputConfiguration config = IterableExtensions.<OutputConfiguration>head(this.configProvider.getOutputConfigurations());
    config.setOutputDirectory(output.toString());
    Pair<String, OutputConfiguration> _mappedTo = Pair.<String, OutputConfiguration>of(IFileSystemAccess.DEFAULT_OUTPUT, config);
    this.fsa.setOutputConfigurations(Collections.<String, OutputConfiguration>unmodifiableMap(CollectionLiterals.<String, OutputConfiguration>newHashMap(_mappedTo)));
    this.fsa.setConverter(this.uriConverter);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:22,代码来源:URIBasedFileSystemAccessTest.java


示例8: outputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Test
public void outputConfigurations() {
  Set<OutputConfiguration> configs = new Antlr4OutputConfigurationProvider()
      .getOutputConfigurations();

  assertNotNull(configs);
  assertEquals(1, configs.size());

  OutputConfiguration config = configs.iterator().next();
  assertNotNull(config);
  assertEquals("Options", config.getDescription());
  assertEquals("DEFAULT_OUTPUT", config.getName());
  assertEquals("./target/generated-sources/antlr4", config.getOutputDirectory());
  assertEquals(false, config.isCanClearOutputDirectory());
  assertEquals(true, config.isCreateOutputDirectory());
  assertEquals(true, config.isHideSyntheticLocalVariables());
  assertEquals(false, config.isInstallDslAsPrimarySource());
  assertEquals(true, config.isKeepLocalHistory());
  assertEquals(true, config.isOverrideExistingResources());
  assertEquals(true, config.isSetDerivedProperty());
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:22,代码来源:Antlr4OutputConfigurationProviderTest.java


示例9: WrappedOutputConfiguration

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
public WrappedOutputConfiguration(OutputConfiguration delegate, String pathprefix) {
	super(delegate.getName());
	this.delegate = delegate;
	this.pathprefix = normalize(pathprefix);
	// Wrapp all sourcemappings:
	sourceMappings = Sets.<WrappedSourceMapping> newHashSet();
	for (SourceMapping sm : delegate.getSourceMappings()) {
		sourceMappings.add(new WrappedSourceMapping(sm, this));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:WrappedOutputConfiguration.java


示例10: getInitialOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/** Build an output configuration from a composite generator. */
private Map<String, OutputConfiguration> getInitialOutputConfigurations() {
	if (initialOutputConfiguration == null) {
		initialOutputConfiguration = new HashMap<>();
		for (CompilerDescriptor desc : compositeGenerator.getCompilerDescriptors()) {
			initialOutputConfiguration.put(desc.getIdentifier(), desc.getOutputConfiguration());
		}

	}
	return initialOutputConfiguration;
	// return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:13,代码来源:N4HeadlessCompiler.java


示例11: transformedOutputConfiguration

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Wraps the output-configurations with a delegate that transparently injects the relative path to the project-root.
 *
 * @param projectPath
 *            relative path to the project-root
 * @return wrapped configurations.
 */
private Map<String, OutputConfiguration> transformedOutputConfiguration(String projectPath,
		Map<String, OutputConfiguration> outputConfigToBeWrapped) {
	Map<String, OutputConfiguration> result = new HashMap<>();

	for (Entry<String, OutputConfiguration> pair : outputConfigToBeWrapped.entrySet()) {
		final OutputConfiguration input = pair.getValue();
		OutputConfiguration transOC = new WrappedOutputConfiguration(input, projectPath);
		result.put(pair.getKey(), transOC);
	}

	return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:N4HeadlessCompiler.java


示例12: BuildInstruction

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Create a build instruction for the given project.
 */
public BuildInstruction(IProject project,
		Map<String, OutputConfiguration> outputConfigurations,
		IDerivedResourceMarkers derivedResourceMarkers,
		EclipseResourceFileSystemAccess2 access,
		Map<OutputConfiguration, Iterable<IMarker>> generatorMarkers,
		IStorage2UriMapper storage2UriMapper, ICompositeGenerator compositeGenerator,
		Injector injector) {
	super(project, outputConfigurations, derivedResourceMarkers);
	this.access = access;
	this.generatorMarkers = generatorMarkers;
	this.storage2UriMapper = storage2UriMapper;
	this.compositeGenerator = compositeGenerator;
	this.injector = injector;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:18,代码来源:BuildInstruction.java


示例13: deleteEmptyDirectories

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private void deleteEmptyDirectories(IProgressMonitor progressMonitor) throws CoreException {
	for (OutputConfiguration config : outputConfigurations.values()) {
		IFolder folder = project.getFolder(config.getOutputDirectory());
		if (null != folder && folder.exists()) {
			deleteEmptyDirectories(folder, progressMonitor);
			folder.getParent().refreshLocal(IResource.DEPTH_INFINITE, progressMonitor);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:10,代码来源:BuildInstruction.java


示例14: recordDerivedResources

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private void recordDerivedResources(final String uri) {
	for (OutputConfiguration config : outputConfigurations.values()) {
		if (config.isCleanUpDerivedResources()) {
			Iterable<IMarker> markers = generatorMarkers.get(config);
			if (null != markers) {
				for (IMarker marker : markers) {
					String source = derivedResourceMarkers.getSource(marker);
					if (source != null && source.equals(uri)) {
						derivedResources.add((IFile) marker.getResource());
					}
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:BuildInstruction.java


示例15: CleanInstruction

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Creates a new clean operation for the given project.
 */
public CleanInstruction(IProject project, Map<String, OutputConfiguration> outputConfigurations,
		IDerivedResourceMarkers derivedResourceMarkers) {
	super(project, outputConfigurations, derivedResourceMarkers);
	this.project = project;
	this.outputConfigurations = outputConfigurations;
	this.derivedResourceMarkers = derivedResourceMarkers;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:CleanInstruction.java


示例16: finish

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public void finish(List<Delta> deltas, IProgressMonitor progressMonitor) throws CoreException {
	SubMonitor cleanMonitor = SubMonitor.convert(progressMonitor, outputConfigurations.size());
	for (OutputConfiguration config : outputConfigurations.values()) {
		cleanOutput(project, config, cleanMonitor.newChild(1));
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:CleanInstruction.java


示例17: prepareBuild

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Intentionally package visible producer for the {@link IBuildParticipantInstruction}.
 *
 * @param project
 *            the currently build project
 * @param buildType
 *            the current build type
 * @return a StatefulBuilderParticipant. Never <code>null</code>.
 */
IBuildParticipantInstruction prepareBuild(IProject project, IXtextBuilderParticipant.BuildType buildType)
		throws CoreException {

	if (!isEnabled(project)) {
		return IBuildParticipantInstruction.NOOP;
	}
	EclipseResourceFileSystemAccess2 access = fileSystemAccessProvider.get();
	access.setProject(project);
	final Map<String, OutputConfiguration> outputConfigurations = getOutputConfigurations(project);
	refreshOutputFolders(project, outputConfigurations, null);
	access.setOutputConfigurations(outputConfigurations);
	if (buildType == BuildType.CLEAN || buildType == BuildType.RECOVERY) {
		IBuildParticipantInstruction clean = new CleanInstruction(project, outputConfigurations,
				getDerivedResourceMarkers());
		if (buildType == BuildType.RECOVERY) {
			clean.finish(Collections.<Delta> emptyList(), null);
		} else {
			return clean;
		}
	}
	Map<OutputConfiguration, Iterable<IMarker>> generatorMarkers = getGeneratorMarkers(project,
			outputConfigurations.values());
	BuildInstruction buildInstruction = new BuildInstruction(project, outputConfigurations,
			getDerivedResourceMarkers(), access,
			generatorMarkers, storage2UriMapper, compositeGenerator, injector);
	return buildInstruction;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:37,代码来源:N4JSBuilderParticipant.java


示例18: refreshOutputFolders

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * @see #refreshOutputFolders(org.eclipse.xtext.builder.IXtextBuilderParticipant.IBuildContext, Map,
 *      IProgressMonitor)
 */
protected void refreshOutputFolders(IProject project, Map<String, OutputConfiguration> outputConfigurations,
		IProgressMonitor monitor) throws CoreException {
	SubMonitor subMonitor = SubMonitor.convert(monitor, outputConfigurations.size());
	for (OutputConfiguration config : outputConfigurations.values()) {
		SubMonitor child = subMonitor.newChild(1);
		IContainer container = getContainer(project, config.getOutputDirectory());
		if (null != container) {
			container.refreshLocal(IResource.DEPTH_INFINITE, child);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:N4JSBuilderParticipant.java


示例19: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * @see #getOutputConfigurations(org.eclipse.xtext.builder.IXtextBuilderParticipant.IBuildContext)
 */
protected Map<String, OutputConfiguration> getOutputConfigurations(IProject project) {
	Set<OutputConfiguration> configurations = getOutputConfigurationProvider().getOutputConfigurations(project);
	return uniqueIndex(getNonNullOutputConfigurations(configurations), new Function<OutputConfiguration, String>() {
		@Override
		public String apply(OutputConfiguration from) {
			return from.getName();
		}
	});
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:13,代码来源:N4JSBuilderParticipant.java


示例20: getNonNullOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private/* @Nonnull */
Iterable<OutputConfiguration> getNonNullOutputConfigurations(Set<OutputConfiguration> configurations) {
	if (configurations == null) {
		return new HashSet<>();
	} else {
		return configurations;
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:N4JSBuilderParticipant.java


示例21: getAllFolders

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
protected List<String> getAllFolders() {
	Set<OutputConfiguration> outputConfigurations = outputConfigurationProvider.getOutputConfigurations();
	String outputFolder = "src-gen";
	for (OutputConfiguration outputConfiguration : outputConfigurations) {
		if (IFileSystemAccess.DEFAULT_OUTPUT.equals(outputConfiguration.getName())) {
			outputFolder = outputConfiguration.getOutputDirectory();
			break;
		}
	}
	return ImmutableList.of(getModelFolderName(), outputFolder);
}
 
开发者ID:vicegd,项目名称:org.xtext.dsl.restaurante,代码行数:13,代码来源:RestauranteProjectCreator.java


示例22: configureFileSystemAccess

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
private void configureFileSystemAccess(final File baseDir, AbstractFileSystemAccess2 fsa) {
	Set<OutputConfiguration> confsForFsa = Sets.newHashSet();
	Set<OutputConfiguration> pomOutputConfigs = getConfiguredOutputConfigs();
	if (pomOutputConfigs != null && !pomOutputConfigs.isEmpty()) {
		for (OutputConfiguration pomConfig : pomOutputConfigs) {
			if (getOutputConfigurationProvider().getOutputConfigurations().contains(pomConfig)) {
				confsForFsa.add(pomConfig);
			} else {
				LOG.warn("Output '" + pomConfig.getName() 
							+ "' is not configured in OutputConfigurationProvider. Used provider "
							+ getOutputConfigurationProvider().getClass().getName());
			}
		}
	}
	confsForFsa.addAll(getOutputConfigurationProvider().getOutputConfigurations());
	Map<String, OutputConfiguration> asMap = IterableExtensions.toMap(
			Iterables.transform(confsForFsa, new Function<OutputConfiguration, OutputConfiguration>() {

				@Override
				public OutputConfiguration apply(OutputConfiguration output) {
					output.setOutputDirectory(resolveToBaseDir(output.getOutputDirectory(), baseDir));
					for (SourceMapping sourceMapping : output.getSourceMappings()) {
						sourceMapping.setOutputDirectory(resolveToBaseDir(sourceMapping.getOutputDirectory(), baseDir));
					}
					return output;
				}
			}), new Function1<OutputConfiguration, String>() {
				@Override
				public String apply(final OutputConfiguration it) {
					return it.getName();
				}
			});
	fsa.setOutputConfigurations(asMap);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:35,代码来源:LanguageAccess.java


示例23: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
	OutputConfiguration config = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
	config.setOutputDirectory("src-gen");
	if (useOutputPerSource) {
		SourceMapping sourceMapping = new OutputConfiguration.SourceMapping("src2");
		sourceMapping.setOutputDirectory("src2-gen");
		config.getSourceMappings().add(sourceMapping);
		config.setUseOutputPerSourceFolder(true);
	}
	return ImmutableSet.of(config);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:13,代码来源:StandaloneBuilderTest.java


示例24: getFileSystemAccess

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
protected AbstractFileSystemAccess2 getFileSystemAccess(final StorageAwareResource resource) {
  final AbstractFileSystemAccess2 fsa = this.fileSystemAccessProvider.get();
  fsa.setContext(resource);
  final Function1<OutputConfiguration, String> _function = (OutputConfiguration it) -> {
    return it.getName();
  };
  fsa.setOutputConfigurations(IterableExtensions.<String, OutputConfiguration>toMap(this.outputConfigurationProvider.getOutputConfigurations(resource), _function));
  return fsa;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:ResourceStorageFacade.java


示例25: withOutputConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
protected void withOutputConfig(final BuildRequest it, final Procedure1<? super OutputConfiguration> init) {
  final OutputConfiguration config = IterableExtensions.<OutputConfiguration>head(this.configurationProvider.getOutputConfigurations());
  init.apply(config);
  Pair<String, Set<OutputConfiguration>> _mappedTo = Pair.<String, Set<OutputConfiguration>>of(this.languageName, Collections.<OutputConfiguration>unmodifiableSet(CollectionLiterals.<OutputConfiguration>newHashSet(config)));
  final OutputConfigurationAdapter adapter = new OutputConfigurationAdapter(Collections.<String, Set<OutputConfiguration>>unmodifiableMap(CollectionLiterals.<String, Set<OutputConfiguration>>newHashMap(_mappedTo)));
  EList<Adapter> _eAdapters = it.getResourceSet().eAdapters();
  _eAdapters.add(adapter);
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:9,代码来源:AbstractIncrementalBuilderTest.java


示例26: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
  Set<OutputConfiguration> configurations = super.getOutputConfigurations();

  configurations.add(getFormatterConfig());
  configurations.add(getAbstractFormatterConfig());

  return configurations;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:10,代码来源:FormatOutputConfigurationProvider.java


示例27: getFormatterConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Creates output configuration for a Formatter.
 *
 * @return output configuration
 */
private OutputConfiguration getFormatterConfig() {
  OutputConfiguration config = new OutputConfiguration(FormatConstants.FORMATTER);
  config.setDescription("Output configuration for a formatter");
  config.setOverrideExistingResources(false);
  config.setCanClearOutputDirectory(false);
  config.setCleanUpDerivedResources(false);
  config.setOutputDirectory("src");
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:15,代码来源:FormatOutputConfigurationProvider.java


示例28: getAbstractFormatterConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Creates output configuration for a AbstractFormatter.
 *
 * @return output configuration
 */
private OutputConfiguration getAbstractFormatterConfig() {
  OutputConfiguration config = new OutputConfiguration(FormatConstants.ABSTRACT_FORMATTER);
  config.setDescription("Output configuration for a abstract formatter");
  config.setOverrideExistingResources(true);
  config.setOutputDirectory("src-gen");
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:13,代码来源:FormatOutputConfigurationProvider.java


示例29: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
  Set<OutputConfiguration> configurations = super.getOutputConfigurations();

  configurations.add(getStubConfig());
  configurations.add(getDefaultConfig());

  return configurations;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:10,代码来源:ExportOutputConfigurationProvider.java


示例30: getStubConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Creates output configuration for generated stubs.
 *
 * @return output configuration
 */
private OutputConfiguration getStubConfig() {
  OutputConfiguration config = new OutputConfiguration(STUB_OUTPUT);
  config.setDescription("Output configuration for stubs");
  config.setOverrideExistingResources(false);
  config.setCanClearOutputDirectory(false);
  config.setCleanUpDerivedResources(false);
  config.setOutputDirectory("src");
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:15,代码来源:ExportOutputConfigurationProvider.java


示例31: getDefaultConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Creates output configuration for regular generated files.
 *
 * @return output configuration
 */
private OutputConfiguration getDefaultConfig() {
  OutputConfiguration config = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
  config.setDescription("Output configuration for generated classes");
  config.setOverrideExistingResources(true);
  config.setOutputDirectory("src-gen");
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:13,代码来源:ExportOutputConfigurationProvider.java


示例32: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
  Set<OutputConfiguration> configurations = super.getOutputConfigurations();

  configurations.add(getCheckDocumentationConfig());
  configurations.add(getServiceRegistryConfig());

  return configurations;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:10,代码来源:CheckOutputConfigurationProvider.java


示例33: getCheckDocumentationConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Gets the check documentation output configuration.
 *
 * @return the check documentation configuration
 */
private OutputConfiguration getCheckDocumentationConfig() {
  OutputConfiguration config = new OutputConfiguration(CheckGeneratorConstants.CHECK_DOC_OUTPUT);
  config.setDescription("Output configuration for check documentation use");
  config.setOutputDirectory(DOCS_PATH);
  config.setCreateOutputDirectory(true);
  config.setCanClearOutputDirectory(true);
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:14,代码来源:CheckOutputConfigurationProvider.java


示例34: getServiceRegistryConfig

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * Gets the service registry output configuration.
 *
 * @return the service registry configuration
 */
private OutputConfiguration getServiceRegistryConfig() {
  OutputConfiguration config = new OutputConfiguration(CheckGeneratorConstants.CHECK_REGISTRY_OUTPUT);
  config.setDescription("Output configuration for service registry use");
  config.setOutputDirectory("META-INF/services");
  config.setOverrideExistingResources(true);
  config.setCreateOutputDirectory(true);
  config.setCleanUpDerivedResources(false);
  config.setSetDerivedProperty(true);
  return config;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:16,代码来源:CheckOutputConfigurationProvider.java


示例35: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
/**
 * @return a set of {@link OutputConfiguration} available for the generator
 */
public Set<OutputConfiguration> getOutputConfigurations() {
    OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
    defaultOutput.setDescription("Output Folder");
    defaultOutput.setOutputDirectory("./src-gen");
    defaultOutput.setOverrideExistingResources(true);
    defaultOutput.setCreateOutputDirectory(true);
    defaultOutput.setCleanUpDerivedResources(true);
    defaultOutput.setSetDerivedProperty(true);
    return newHashSet(defaultOutput);
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:14,代码来源:MyOutputConfigurationProvider.java


示例36: initLibraryTargetFolder

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
protected void initLibraryTargetFolder(ISCTFileSystemAccess access, GeneratorEntry entry) {
	FeatureParameterValue libraryTargetFolderValue = helper.getLibraryTargetFolderValue(entry);
	if (libraryTargetFolderValue != null) {
		access.setOutputPath(LIBRARY_TARGET_FOLDER_OUTPUT, libraryTargetFolderValue.getStringValue());
		OutputConfiguration output = access.getOutputConfigurations().get(LIBRARY_TARGET_FOLDER_OUTPUT);
		output.setCreateOutputDirectory(true);
		output.setCanClearOutputDirectory(false);
		output.setOverrideExistingResources(false);
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:11,代码来源:DefaultFileSystemAccessFactory.java


示例37: initApiTargetFolder

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
protected void initApiTargetFolder(ISCTFileSystemAccess access, GeneratorEntry entry) {
	FeatureParameterValue apiTargetFolderValue = helper.getApiTargetFolderValue(entry);
	if (apiTargetFolderValue != null) {
		access.setOutputPath(API_TARGET_FOLDER_OUTPUT, apiTargetFolderValue.getStringValue());
		OutputConfiguration output = access.getOutputConfigurations().get(API_TARGET_FOLDER_OUTPUT);
		output.setCreateOutputDirectory(true);
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:9,代码来源:DefaultFileSystemAccessFactory.java


示例38: getURI

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public URI getURI(String path, String outputConfiguration) {
	OutputConfiguration outputConfig = getOutputConfig(outputConfiguration);
	String outputDir = outputConfig.getOutputDirectory();
	if (isRootPath(outputDir) && isRootPath(path)) {
		return URI.createFileURI(getProject().getLocationURI().getPath());
	}
	IFile file = getProject().getFile(outputDir + File.separator + path);
	if (file != null) {
		return URI.createFileURI(file.getLocationURI().getPath());
	}
	return super.getURI(path);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:14,代码来源:SCTEclipseResourceFileSystemAccess.java


示例39: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
public Set<OutputConfiguration> getOutputConfigurations() {
	OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
	defaultOutput.setDescription("Output Folder");
	defaultOutput.setOutputDirectory("./application-gen");
	defaultOutput.setOverrideExistingResources(true);
	defaultOutput.setCreateOutputDirectory(true);
	defaultOutput.setCleanUpDerivedResources(true);
	defaultOutput.setSetDerivedProperty(true);
	defaultOutput.setKeepLocalHistory(true);
	return newHashSet(defaultOutput);
}
 
开发者ID:nohum,项目名称:android-code-generation,代码行数:12,代码来源:CustomOutputConfigProvider.java


示例40: getOutputConfigurations

import org.eclipse.xtext.generator.OutputConfiguration; //导入依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
	Set<OutputConfiguration> outputconfigurations = super
			.getOutputConfigurations();
	OutputConfiguration outputConfiguration = outputconfigurations
			.iterator().next();
	outputConfiguration.setOutputDirectory(XSEMANTICS_GEN);
	return outputconfigurations;
}
 
开发者ID:eclipse,项目名称:xsemantics,代码行数:10,代码来源:XsemanticsOutputConfigurationProvider.java



注:本文中的org.eclipse.xtext.generator.OutputConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。