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


Java InputOutput类代码示例

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


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

示例1: _privk3_fire

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
protected static void _privk3_fire(final TransitionAspectTransitionAspectProperties _self_, final Transition _self) {
  String _name = _self.getName();
  String _plus = ("Firing " + _name);
  String _plus_1 = (_plus + " and entering ");
  String _name_1 = _self.getTarget().getName();
  String _plus_2 = (_plus_1 + _name_1);
  InputOutput.<String>println(_plus_2);
  final StateMachine fsm = _self.getSource().getOwningFSM();
  StateMachineAspect.currentState(fsm, _self.getTarget());
  String _producedString = StateMachineAspect.producedString(fsm);
  String _output = _self.getOutput();
  String _plus_3 = (_producedString + _output);
  StateMachineAspect.producedString(fsm, _plus_3);
  String _consummedString = StateMachineAspect.consummedString(fsm);
  String _input = _self.getInput();
  String _plus_4 = (_consummedString + _input);
  StateMachineAspect.consummedString(fsm, _plus_4);
  StateMachineAspect.unprocessedString(fsm, StateMachineAspect.unprocessedString(fsm).substring(_self.getInput().length()));
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:20,代码来源:TransitionAspect.java

示例2: _privk3_main

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
protected static void _privk3_main(final StateMachineAspectStateMachineAspectProperties _self_, final StateMachine _self) {
  try {
    while ((!StateMachineAspect.unprocessedString(_self).isEmpty())) {
      StateAspect.step(StateMachineAspect.currentState(_self), StateMachineAspect.unprocessedString(_self));
    }
  } catch (final Throwable _t) {
    if (_t instanceof Exception) {
      final Exception nt = (Exception)_t;
      String _message = nt.getMessage();
      String _plus = ("Stopped due to " + _message);
      InputOutput.<String>println(_plus);
    } else {
      throw Exceptions.sneakyThrow(_t);
    }
  }
  String _unprocessedString = StateMachineAspect.unprocessedString(_self);
  String _plus_1 = ("unprocessed string: " + _unprocessedString);
  InputOutput.<String>println(_plus_1);
  String _consummedString = StateMachineAspect.consummedString(_self);
  String _plus_2 = ("processed string: " + _consummedString);
  InputOutput.<String>println(_plus_2);
  String _producedString = StateMachineAspect.producedString(_self);
  String _plus_3 = ("produced string: " + _producedString);
  InputOutput.<String>println(_plus_3);
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:26,代码来源:StateMachineAspect.java

示例3: drawSafe

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
private String drawSafe(final GraphvizDotBuilder builder, final Object graph) {
  String _xtrycatchfinallyexpression = null;
  try {
    _xtrycatchfinallyexpression = builder.draw(graph);
  } catch (final Throwable _t) {
    if (_t instanceof Exception) {
      final Exception e = (Exception)_t;
      InputOutput.<String>println("Error rendering");
      e.printStackTrace();
      return Throwables.getStackTraceAsString(e);
    } else {
      throw Exceptions.sneakyThrow(_t);
    }
  }
  return _xtrycatchfinallyexpression;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:17,代码来源:DebugGraphGenerator.java

示例4: main

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
/**
 * Use this main method to update the expectations to whatever the wizard currently generates
 */
public static void main(final String[] args) {
  final CliProjectsCreator creator = CliWizardIntegrationTest.newProjectCreator();
  final Consumer<WizardConfiguration> _function = (WizardConfiguration config) -> {
    try {
      String _baseName = config.getBaseName();
      final File targetLocation = new File("testdata/wizard-expectations", _baseName);
      targetLocation.mkdirs();
      Files.sweepFolder(targetLocation);
      config.setRootLocation(targetLocation.getPath());
      creator.createProjects(config);
      String _baseName_1 = config.getBaseName();
      String _plus = ("Updating expectations for " + _baseName_1);
      InputOutput.<String>println(_plus);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  };
  CliWizardIntegrationTest.projectConfigs.forEach(_function);
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:23,代码来源:CliWizardIntegrationTest.java

示例5: main

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
public static void main(final String[] args) {
  try {
    final IKAnalyzer ikAnalyzer = new IKAnalyzer(true);
    final String text = "lucene分析器使用分词器和过滤器构成一个“管道”,文本在流经这个管道后成为可以进入索引的最小单位,因此,一个标准的分析器有两个部分组成,一个是分词器tokenizer,它用于将文本按照规则切分为一个个可以进入索引的最小单位。另外一个是TokenFilter,它主要作用是对切出来的词进行进一步的处理(如去掉敏感词、英文大小写转换、单复数处理)等。lucene中的Tokenstram方法首先创建一个tokenizer对象处理Reader对象中的流式文本,然后利用TokenFilter对输出流进行过滤处理";
    final TokenStream ts = ikAnalyzer.tokenStream("field", text);
    final CharTermAttribute ch = ts.<CharTermAttribute>addAttribute(CharTermAttribute.class);
    ts.reset();
    while (ts.incrementToken()) {
      String _string = ch.toString();
      String _plus = (_string + " | ");
      InputOutput.<String>print(_plus);
    }
    ts.end();
    ts.close();
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:East196,项目名称:maker,代码行数:19,代码来源:IKAnalyzerDemo.java

示例6: build

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
public static void build(final String projectName, final String projectType, final String moduleName) {
  final Project project = Projects.byName(projectName);
  Module _moduleByClass = Modules.moduleByClass(moduleName);
  List<Module> modules = CollectionLiterals.<Module>newArrayList(_moduleByClass);
  final Consumer<Module> _function = (Module it) -> {
    InputOutput.<Module>println(it);
  };
  modules.forEach(_function);
  final List<ModuleGeneratedDoc> generateDocs = GeneratedDocs.byType(projectType);
  GenerateBoxBuilder _generateBoxBuilder = new GenerateBoxBuilder();
  GenerateBoxBuilder _generateDocs = _generateBoxBuilder.generateDocs(generateDocs);
  GenerateBoxBuilder _modules = _generateDocs.modules(modules);
  GenerateBoxBuilder _project = _modules.project(project);
  GenerateBox _build = _project.build();
  _build.doGenerate();
}
 
开发者ID:East196,项目名称:maker,代码行数:17,代码来源:ProjectBuilder.java

示例7: parseSimpleAGCLLibrary

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Test
public void parseSimpleAGCLLibrary() {
  try {
    InputOutput.<String>println("AGCLAnnexLibrary");
    final String libText = "\n            library \n                viewpoint v1*;\n                viewpoint v2\n        ";
    final AGCLGrammarRoot libAST = this.parser.parse(libText);
    AGCLAnnexLibrary _lib = libAST.getLib();
    final EList<AGCLViewpoint> viewpoints = _lib.getViewpoints();
    InputOutput.<AGCLGrammarRoot>println(libAST);
    InputOutput.<EList<AGCLViewpoint>>println(viewpoints);
    AGCLViewpoint _get = viewpoints.get(0);
    String _name = _get.getName();
    InputOutput.<String>println(_name);
    AGCLViewpoint _get_1 = viewpoints.get(1);
    String _name_1 = _get_1.getName();
    InputOutput.<String>println(_name_1);
    AGCLViewpoint _get_2 = viewpoints.get(0);
    String _name_2 = _get_2.getName();
    Assert.assertEquals("v1", _name_2);
    AGCLViewpoint _get_3 = viewpoints.get(1);
    String _name_3 = _get_3.getName();
    Assert.assertEquals("v2", _name_3);
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:eposse,项目名称:osate2-agcl,代码行数:27,代码来源:HelloUnitTesting.java

示例8: transformGuarantee

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Test
public void transformGuarantee() {
  try {
    InputOutput.<String>println("* transformGuarantee");
    final String subclauseSource = "\n\t\t\tsubclause \n\t\t\t\tcontract v\n\t\t\t\t\tassumption in a:x & out b:y;\n\t\t\t\t\tguarantee in c:u & out d:v;\n\t\t\t\tend v;\n\t\t";
    final AGCLGrammarRoot subclauseAST = this.agclParser.parse(subclauseSource);
    final String serializedSubclauseAST = this.serializer.serialize(subclauseAST);
    InputOutput.<String>println((("  serialized annex AST: \"" + serializedSubclauseAST) + "\""));
    AGCLAnnexSubclause _subclause = subclauseAST.getSubclause();
    EList<AGCLContract> _contracts = _subclause.getContracts();
    AGCLContract _get = _contracts.get(0);
    AGCLAssumption _assumption = _get.getAssumption();
    final PSLSpec assumptionSpec = _assumption.getSpec();
    AGCLAnnexSubclause _subclause_1 = subclauseAST.getSubclause();
    EList<AGCLContract> _contracts_1 = _subclause_1.getContracts();
    AGCLContract _get_1 = _contracts_1.get(0);
    AGCLGuarantee _guarantee = _get_1.getGuarantee();
    final PSLSpec guaranteeSpec = _guarantee.getSpec();
    final String serializedAssumption = this.serializer.serialize(assumptionSpec);
    final String serializedGuarantee = this.serializer.serialize(guaranteeSpec);
    InputOutput.<String>println((("  serialized assumption: \"" + serializedAssumption) + "\""));
    InputOutput.<String>println((("  serialized guarantee: \"" + serializedGuarantee) + "\""));
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:eposse,项目名称:osate2-agcl,代码行数:27,代码来源:AGCLPSLTransformTests.java

示例9: generateGenModelCode

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
/**
 * generate the source code using the ant generated task
 * @param f : the ant file to be called
 */
public void generateGenModelCode(final File f, final IProgressMonitor monitor) {
  final AntRunner runner = new AntRunner();
  runner.setBuildFileLocation(f.getAbsolutePath());
  if (this.debug) {
    runner.addBuildLogger("org.apache.tools.ant.DefaultLogger");
    runner.setArguments("-verbose -debug");
  }
  try {
    if (this.debug) {
      String _absolutePath = f.getAbsolutePath();
      String _plus = ("  --> Generate the EMF Code using the ant file : " + _absolutePath);
      InputOutput.<String>println(_plus);
    }
    runner.run(monitor);
    this.refreshWorkspace();
  } catch (final Throwable _t) {
    if (_t instanceof CoreException) {
      final CoreException e = (CoreException)_t;
      e.printStackTrace();
    } else {
      throw Exceptions.sneakyThrow(_t);
    }
  }
}
 
开发者ID:opcoach,项目名称:genModelAddon,代码行数:29,代码来源:GenerateDevStructure.java

示例10: testQuickRandomReachedVertex

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Test
public void testQuickRandomReachedVertex() {
  try {
    final Model result = this.parseHelper.parse(("\n" + "Simple.json=quick_random(reached_vertex(v_VerifyAppRunning));I;"));
    Assert.assertNotNull(result);
    InputOutput.<EList<Resource.Diagnostic>>print(result.eResource().getErrors());
    Assert.assertTrue(result.eResource().getErrors().isEmpty());
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesParsingTest.java

示例11: completeIntegerStopCondition_Pathtype

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Override
public void completeIntegerStopCondition_Pathtype(final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
  System.out.println("---> completeIntegerStopCondition_Pathtype");
  EList<EStructuralFeature> _eAllStructuralFeatures = model.eClass().getEAllStructuralFeatures();
  _eAllStructuralFeatures.forEach(new Consumer<EStructuralFeature>() {
    @Override
    public void accept(final EStructuralFeature t) {
      InputOutput.<String>println(t.getName());
    }
  });
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesProposalProvider.java

示例12: completePercentageCondition_Pathtype

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Override
public void completePercentageCondition_Pathtype(final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
  System.out.println("---> completePercentageCondition_Pathtype");
  EList<EStructuralFeature> _eAllStructuralFeatures = model.eClass().getEAllStructuralFeatures();
  _eAllStructuralFeatures.forEach(new Consumer<EStructuralFeature>() {
    @Override
    public void accept(final EStructuralFeature t) {
      InputOutput.<String>println(t.getName());
    }
  });
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesProposalProvider.java

示例13: completeStringCondition_Pathtype

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Override
public void completeStringCondition_Pathtype(final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
  System.out.println("---> completeStringCondition_Pathtype");
  EList<EStructuralFeature> _eAllStructuralFeatures = model.eClass().getEAllStructuralFeatures();
  _eAllStructuralFeatures.forEach(new Consumer<EStructuralFeature>() {
    @Override
    public void accept(final EStructuralFeature t) {
      InputOutput.<String>println(t.getName());
    }
  });
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesProposalProvider.java

示例14: complete_Model

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Override
public void complete_Model(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
  System.out.println("---> complete_Model");
  EList<EStructuralFeature> _eAllStructuralFeatures = model.eClass().getEAllStructuralFeatures();
  _eAllStructuralFeatures.forEach(new Consumer<EStructuralFeature>() {
    @Override
    public void accept(final EStructuralFeature t) {
      InputOutput.<String>println(t.getName());
    }
  });
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesProposalProvider.java

示例15: complete_NEWLINE

import org.eclipse.xtext.xbase.lib.InputOutput; //导入依赖的package包/类
@Override
public void complete_NEWLINE(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) {
  System.out.println("---> complete_NEWLINE");
  EList<EStructuralFeature> _eAllStructuralFeatures = model.eClass().getEAllStructuralFeatures();
  _eAllStructuralFeatures.forEach(new Consumer<EStructuralFeature>() {
    @Override
    public void accept(final EStructuralFeature t) {
      InputOutput.<String>println(t.getName());
    }
  });
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:DSLPoliciesProposalProvider.java


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