本文整理汇总了Java中org.eclipse.xtext.generator.OutputConfiguration.setOutputDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java OutputConfiguration.setOutputDirectory方法的具体用法?Java OutputConfiguration.setOutputDirectory怎么用?Java OutputConfiguration.setOutputDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.generator.OutputConfiguration
的用法示例。
在下文中一共展示了OutputConfiguration.setOutputDirectory方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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);
}
}
示例4: 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);
}
示例5: 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;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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;
}
示例11: 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);
}
示例12: 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);
}
示例13: 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;
}
示例14: getOutputConfigurations
import org.eclipse.xtext.generator.OutputConfiguration; //导入方法依赖的package包/类
@Override
public Set<OutputConfiguration> getOutputConfigurations() {
Set<OutputConfiguration> _outputConfigurations = super.getOutputConfigurations();
final Procedure1<Set<OutputConfiguration>> _function = new Procedure1<Set<OutputConfiguration>>() {
@Override
public void apply(final Set<OutputConfiguration> it) {
OutputConfiguration _head = IterableExtensions.<OutputConfiguration>head(it);
_head.setOutputDirectory(EntitiesOutputConfigurationProvider.this.ENTITIES_GEN);
}
};
return ObjectExtensions.<Set<OutputConfiguration>>operator_doubleArrow(_outputConfigurations, _function);
}
开发者ID:LorenzoBettini,项目名称:packtpub-xtext-book-examples,代码行数:13,代码来源:EntitiesOutputConfigurationProvider.java