org.eclipse.xtext.util.Wrapper.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中org.eclipse.xtext.util.Wrapper.<init>()方法的一些代码示例,展示了Wrapper.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.<init>()方法的具体详情如下:
包路径:org.eclipse.xtext.util.Wrapper
类名称:Wrapper
方法名:<init>

Wrapper.<init>介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.xtext/util

public static <T> Wrapper<T> forType(Class<T> type) {
  return new Wrapper<T>();
}

代码示例来源:origin: org.eclipse.xtext/util

public static <T> Wrapper<T> wrap(T value) {
  return new Wrapper<T>(value);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.util

public static <T> Wrapper<T> wrap(T value) {
  return new Wrapper<T>(value);
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.util

public static <T> Wrapper<T> forType(Class<T> type) {
  return new Wrapper<T>();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.web

FormattingResult _xblockexpression = null;
 final Wrapper<String> textWrapper = new Wrapper<String>();
 final Wrapper<TextRegion> regionWrapper = new Wrapper<TextRegion>();
 final CancelableUnitOfWork<FormattingResult, IXtextWebDocument> _function = new CancelableUnitOfWork<FormattingResult, IXtextWebDocument>() {
  @Override

代码示例来源:origin: org.eclipse.xtext/util

public <STATE> String format(Nfa<STATE> nfa) {
  Map<STATE, Integer> names = Maps.newLinkedHashMap();
  List<Node> nodes = Lists.newArrayList();
  nodes.add(createNodes(nfa, nfa.getStart(), names, new Wrapper<Integer>(0)));
  StringBuilder result = new StringBuilder();
  STATE starts = nfa.getStart();

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.util

public <STATE> String format(Nfa<STATE> nfa) {
  Map<STATE, Integer> names = Maps.newLinkedHashMap();
  List<Node> nodes = Lists.newArrayList();
  nodes.add(createNodes(nfa, nfa.getStart(), names, new Wrapper<Integer>(0)));
  StringBuilder result = new StringBuilder();
  STATE starts = nfa.getStart();

代码示例来源:origin: org.eclipse.xtext/junit4

protected int parseXpect(Class<?> testClass, XtextResource res, INode ctx, String text, String method, int offset,
    IParameterAcceptor acceptor, boolean ignore) {
  int newOffset;
  Multimap<String, Object> params = HashMultimap.create();
  Wrapper<Expectation> expectation = new Wrapper<Expectation>(null);
  offset = skipWhitespace(text, offset);
  if ((newOffset = parseXpectParams(testClass, res, ctx, method, text, offset, params)) >= 0)
    offset = newOffset;
  offset = skipWhitespace(text, offset);
  if ((newOffset = parseXpectSLExpectation(ctx, text, offset, expectation)) >= 0)
    offset = newOffset;
  else if ((newOffset = parseXpectMLExpectation(ctx, text, offset, expectation)) >= 0)
    offset = newOffset;
  acceptor.acceptTest(null, method, params, expectation.get(), ignore);
  return offset;
}

代码示例来源:origin: org.eclipse.xtext/ui

public T syncExec() {
    if (Display.getCurrent() == null) {
      final Wrapper<T> resultWrapper = new Wrapper<T>();
      final Wrapper<Exception> exceptionWrapper = new Wrapper<Exception>();
      Display.getDefault().syncExec(new Runnable() {
        public void run() {
          try {
            resultWrapper.set(DisplayRunnableWithResult.this.run());
          } catch (Exception e) {
            exceptionWrapper.set(e);
          }
        }
      });
      if (exceptionWrapper.get() != null)
        throw new WrappedException(exceptionWrapper.get());
      return resultWrapper.get();
    } else {
      try {
        return run();
      } catch (Exception e) {
        throw new WrappedException(e);
      }
    }
  }
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.web

@Override
 public HoverResult exec(final IXtextWebDocument it, final CancelIndicator cancelIndicator) throws Exception {
  HoverResult _xblockexpression = null;
  {
   final ContentAssistContext[] contexts = HoverService.this.contentAssistService.getContexts(it, selection, offset);
   final Wrapper<Object> proposedElement = new Wrapper<Object>();
   HoverService.this.contentAssistService.getProposalProvider().createProposals(((Collection<ContentAssistContext>)Conversions.doWrapArray(contexts)), new IIdeContentProposalAcceptor() {
    @Override
    public void accept(final ContentAssistEntry entry, final int priority) {
     HoverService.this._operationCanceledManager.checkCanceled(cancelIndicator);
     if ((((entry != null) && (entry.getSource() != null)) && Objects.equal(entry.getProposal(), proposal))) {
      proposedElement.set(entry.getSource());
     }
    }
    
    @Override
    public boolean canAcceptMoreProposals() {
     Object _get = proposedElement.get();
     return (_get == null);
    }
   });
   _xblockexpression = HoverService.this.createHover(proposedElement.get(), it.getStateId(), cancelIndicator);
  }
  return _xblockexpression;
 }
};

代码示例来源:origin: org.eclipse.xtext/ui

public void syncExec() {
  if (Display.getCurrent() == null) {
    final Wrapper<Exception> exceptionWrapper = new Wrapper<Exception>();
    Display.getDefault().syncExec(new Runnable() {
      public void run() {
        try {
          DisplayRunnable.this.run();
        } catch (Exception e) {
          exceptionWrapper.set(e);
        }
      }
    });
    if (exceptionWrapper.get() != null)
      throw new WrappedException(exceptionWrapper.get());
  } else {
    try {
      run();
    } catch (Exception e) {
      throw new WrappedException(e);
    }
  }
}

相关文章