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


Java IAcceleoGenerationStrategy类代码示例

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


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

示例1: createWriterFor

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
@Override
public AbstractAcceleoWriter createWriterFor(File file, AbstractAcceleoWriter previous, boolean appendMode,
		boolean hasJMergeTags, String charset) throws IOException {
	final AbstractAcceleoWriter writer;
	if (!file.getParentFile().exists())
		if (!file.getParentFile().mkdirs())
			throw new AcceleoEvaluationException(AcceleoEngineMessages.getString(
					"AcceleoEvaluationContext.FolderCreationError", file.getParentFile())); //$NON-NLS-1$

	if (file.isDirectory())
		throw new AcceleoEvaluationException(AcceleoEngineMessages.getString(
				"AcceleoEvaluationContext.FileNameIsDirectory", file)); //$NON-NLS-1$

	boolean fileExisted = file.exists();

	if (!hasJMergeTags || appendMode) {
		if (charset != null) {
			if (Charset.isSupported(charset)) {
				writer = new XAAcceleoWriter(file, appendMode, charset);
				((XAAcceleoWriter) writer).setPostProcessors(this.postProcessors).setVetoStrategy(vetoStrategy);
			} else {
				final String message = AcceleoEngineMessages.getString(
						"AcceleoGenerationStrategy.UnsupportedCharset", charset); //$NON-NLS-1$
				AcceleoEnginePlugin.log(message, false);
				writer = new XAAcceleoWriter(file, appendMode, CharsetHelper.getCharset(file));
				((XAAcceleoWriter) writer).setPostProcessors(this.postProcessors).setVetoStrategy(vetoStrategy);
			}
		} else {
			writer = new XAAcceleoWriter(file, appendMode, CharsetHelper.getCharset(file));
			((XAAcceleoWriter) writer).setPostProcessors(this.postProcessors).setVetoStrategy(vetoStrategy);
		}
		if (appendMode && fileExisted)
			writer.append(IAcceleoGenerationStrategy.LINE_SEPARATOR);
	} else {
		writer = new XAAcceleoWriter(file.getPath(), CharsetHelper.getCharset(file));
		((XAAcceleoWriter) writer).setPostProcessors(this.postProcessors).setVetoStrategy(vetoStrategy);
	}
	return writer;
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:40,代码来源:XAGenerationStrategy.java

示例2: getGenerationStrategy

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
@Override
public IAcceleoGenerationStrategy getGenerationStrategy() {
	return new XAGenerationStrategy(this.postProcessors, this.vetoStrategy);
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:5,代码来源:JavaGenerator.java

示例3: getGenerationStrategy

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
/**
 * If you need to change the way files are generated, this is your entry
 * point.
 * <p>
 * The default is
 * {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy};
 * it generates files on the fly. If you only need to preview the results,
 * return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}.
 * Both of these aren't aware of the running Eclipse and can be used
 * standalone.
 * </p>
 * <p>
 * If you need the file generation to be aware of the workspace (A typical
 * example is when you wanna override files that are under clear case or any
 * other VCS that could forbid the overriding), then return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}
 * . <b>Note</b>, however, that this <b>cannot</b> be used standalone.
 * </p>
 * <p>
 * All three of these default strategies support merging through JMerge.
 * </p>
 * 
 * @return The generation strategy that is to be used for generations
 *         launched through this launcher.
 * @generated
 */
@Override
public IAcceleoGenerationStrategy getGenerationStrategy ()
{
    return super.getGenerationStrategy();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:33,代码来源:GenerateData.java

示例4: getGenerationStrategy

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
/**
 * If you need to change the way files are generated, this is your entry
 * point.
 * <p>
 * The default is
 * {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy};
 * it generates files on the fly. If you only need to preview the results,
 * return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}.
 * Both of these aren't aware of the running Eclipse and can be used
 * standalone.
 * </p>
 * <p>
 * If you need the file generation to be aware of the workspace (A typical
 * example is when you wanna override files that are under clear case or any
 * other VCS that could forbid the overriding), then return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}
 * . <b>Note</b>, however, that this <b>cannot</b> be used standalone.
 * </p>
 * <p>
 * All three of these default strategies support merging through JMerge.
 * </p>
 * 
 * @return The generation strategy that is to be used for generations
 *         launched through this launcher.
 * @generated NOT
 */
@Override
public IAcceleoGenerationStrategy getGenerationStrategy ()
{
    return new WorkspaceAwareStrategy ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:33,代码来源:Generate.java

示例5: getGenerationStrategy

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
/**
 * If you need to change the way files are generated, this is your entry point.
 * <p>
 * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates
 * files on the fly. If you only need to preview the results, return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of
 * the running Eclipse and can be used standalone.
 * </p>
 * <p>
 * If you need the file generation to be aware of the workspace (A typical example is when you wanna
 * override files that are under clear case or any other VCS that could forbid the overriding), then
 * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}.
 * <b>Note</b>, however, that this <b>cannot</b> be used standalone.
 * </p>
 * <p>
 * All three of these default strategies support merging through JMerge.
 * </p>
 * 
 * @return The generation strategy that is to be used for generations launched through this launcher.
 * @generated
 */
@Override
public IAcceleoGenerationStrategy getGenerationStrategy() {
    return super.getGenerationStrategy();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:Generate.java

示例6: getGenerationStrategy

import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; //导入依赖的package包/类
/**
 * If you need to change the way files are generated, this is your entry
 * point.
 * <p>
 * The default is
 * {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy};
 * it generates files on the fly. If you only need to preview the results,
 * return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}.
 * Both of these aren't aware of the running Eclipse and can be used
 * standalone.
 * </p>
 * <p>
 * If you need the file generation to be aware of the workspace (A typical
 * example is when you wanna override files that are under clear case or any
 * other VCS that could forbid the overriding), then return a new
 * {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}
 * . <b>Note</b>, however, that this <b>cannot</b> be used standalone.
 * </p>
 * <p>
 * All three of these default strategies support merging through JMerge.
 * </p>
 * 
 * @return The generation strategy that is to be used for generations
 *         launched through this launcher.
 * @generated
 */
@Override
public IAcceleoGenerationStrategy getGenerationStrategy() {
       return super.getGenerationStrategy();
   }
 
开发者ID:UrsZeidler,项目名称:uml2solidity,代码行数:32,代码来源:GenerateContracts.java


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