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


Java JavaFileAccess.writeTo方法代码示例

本文整理汇总了Java中org.eclipse.xtext.xtext.generator.model.JavaFileAccess.writeTo方法的典型用法代码示例。如果您正苦于以下问题:Java JavaFileAccess.writeTo方法的具体用法?Java JavaFileAccess.writeTo怎么用?Java JavaFileAccess.writeTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtext.xtext.generator.model.JavaFileAccess的用法示例。


在下文中一共展示了JavaFileAccess.writeTo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateProjectInfo

import org.eclipse.xtext.xtext.generator.model.JavaFileAccess; //导入方法依赖的package包/类
public void generateProjectInfo() {
  final TypeReference projectInfoClass = TypeReference.typeRef(this.getProjectInfoClassName());
  final JavaFileAccess file = this.fileAccessFactory.createJavaFile(projectInfoClass);
  StringConcatenationClient _client = new StringConcatenationClient() {
    @Override
    protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
      _builder.append("public class ");
      String _simpleName = projectInfoClass.getSimpleName();
      _builder.append(_simpleName);
      _builder.append(" extends ");
      TypeReference _typeRef = TypeReference.typeRef("org.eclipse.xtext.ui.wizard.DefaultProjectInfo");
      _builder.append(_typeRef);
      _builder.append(" {");
      _builder.newLineIfNotEmpty();
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
    }
  };
  file.setContent(_client);
  file.writeTo(this.getProjectConfig().getEclipsePlugin().getSrc());
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:23,代码来源:SimpleProjectWizardFragment2.java

示例2: generateWizardNewProjectCreationPage

import org.eclipse.xtext.xtext.generator.model.JavaFileAccess; //导入方法依赖的package包/类
public void generateWizardNewProjectCreationPage() {
  final TypeReference mainPageClass = TypeReference.typeRef(this.getProjectWizardCreationPageClassName());
  final JavaFileAccess file = this.fileAccessFactory.createJavaFile(mainPageClass);
  StringConcatenationClient _client = new StringConcatenationClient() {
    @Override
    protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
      _builder.append("public class ");
      String _simpleName = mainPageClass.getSimpleName();
      _builder.append(_simpleName);
      _builder.append(" extends ");
      TypeReference _typeRef = TypeReference.typeRef("org.eclipse.ui.dialogs.WizardNewProjectCreationPage");
      _builder.append(_typeRef);
      _builder.append(" {");
      _builder.newLineIfNotEmpty();
      _builder.newLine();
      _builder.append("\t");
      _builder.append("public ");
      String _simpleName_1 = mainPageClass.getSimpleName();
      _builder.append(_simpleName_1, "\t");
      _builder.append("(String pageName) {");
      _builder.newLineIfNotEmpty();
      _builder.append("\t\t");
      _builder.append("super(pageName);");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("}");
      _builder.newLine();
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
    }
  };
  file.setContent(_client);
  file.writeTo(this.getProjectConfig().getEclipsePlugin().getSrc());
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:36,代码来源:SimpleProjectWizardFragment2.java

示例3: generateIAutomatedIssueResolutionProvider

import org.eclipse.xtext.xtext.generator.model.JavaFileAccess; //导入方法依赖的package包/类
private void generateIAutomatedIssueResolutionProvider() {
    JavaFileAccess jva = fileAccessFactory.createJavaFile(typeRef(getAutomatedIssueResolutionProviderName()));
    AutomatedIssueResolutionProviderGenerator generator = new AutomatedIssueResolutionProviderGenerator(naming,
            grammar);
    generator.create(jva, getAutomatedIssueResolutionProviderSimpleName());
    jva.writeTo(getProjectConfig().getRuntime().getSrc());
    getProjectConfig().getRuntime().getManifest().getExportedPackages().add(getIssuesPackageName());
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:9,代码来源:AutomatedIssueResolutionFragment2.java

示例4: generateAutomatedIssueResolutionFactoryBase

import org.eclipse.xtext.xtext.generator.model.JavaFileAccess; //导入方法依赖的package包/类
private void generateAutomatedIssueResolutionFactoryBase() {
    TypeReference tr = typeRef(getAutomatedIssueResolutionFactoryBaseName());
    JavaFileAccess jva = fileAccessFactory.createJavaFile(tr);
    AutomatedIssueResolutionFactoryBaseGenerator generator = new AutomatedIssueResolutionFactoryBaseGenerator(
            naming, grammar);
    generator.create(jva, tr.getSimpleName());
    jva.writeTo(getProjectConfig().getRuntime().getSrc());
    getProjectConfig().getRuntime().getManifest().getExportedPackages().add(getIssuesPackageName());
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:10,代码来源:AutomatedIssueResolutionFragment2.java

示例5: generateDerivedStateElementComparator

import org.eclipse.xtext.xtext.generator.model.JavaFileAccess; //导入方法依赖的package包/类
private void generateDerivedStateElementComparator() {
    TypeReference tr = getDerivedStateElementComparatorName();
    JavaFileAccess jva = fileAccessFactory.createJavaFile(tr);
    DerivedStateElementComparatorGenerator generator = new DerivedStateElementComparatorGenerator();
    generator.create(jva, tr.getSimpleName());
    jva.writeTo(getProjectConfig().getRuntime().getSrc());
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:8,代码来源:DerivedStateCalculationFragment2.java


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