Examples of CancelIndicator


Examples of org.eclipse.xtext.util.CancelIndicator

*/
public class ProtobufResourceValidator extends ResourceValidatorImpl {
  private static final Logger log = Logger.getLogger(ProtobufResourceValidator.class);

  @Override public List<Issue> validate(Resource resource, CheckMode mode, CancelIndicator indicator) {
    CancelIndicator monitor = indicator == null ? CancelIndicator.NullImpl : indicator;
    resolveProxies(resource, monitor);
    if (monitor.isCanceled()) {
      return null;
    }
    List<Issue> result = newArrayListWithExpectedSize(resource.getErrors().size() + resource.getWarnings().size());
    try {
      IAcceptor<Issue> acceptor = createAcceptor(result);
View Full Code Here

Examples of org.eclipse.xtext.util.CancelIndicator

      worked(ticker, 1);
      File f = new File("/unnamed.pp");
      r = ppRunner.loadResource(code, URI.createFileURI(f.getPath()));
      // no need to remember "/" as the root
      IResourceValidator rv = ppRunner.getPPResourceValidator();
      final CancelIndicator cancelMonitor = new CancelIndicator() {
        public boolean isCanceled() {
          return ticker.isCanceled();
        }
      };
View Full Code Here

Examples of org.eclipse.xtext.util.CancelIndicator

        ppRunner.resolveCrossReferences(r.getValue(), profileThis, ticker);
      long afterTime = System.currentTimeMillis();
      if(afterTime - beforeTime > maxLinkTime) {
        maxLinkTime = afterTime - beforeTime;
      }
      final CancelIndicator cancelMonitor = new CancelIndicator() {
        public boolean isCanceled() {
          return ticker.isCanceled();
        }
      };
View Full Code Here

Examples of org.eclipse.xtext.util.CancelIndicator

    worked(ticker, 1);
    try {
      FileInputStream input = new FileInputStream(f);
      Resource r = dr.loadResource(input, URI.createFileURI(f.getPath()));
      IResourceValidator rv = dr.getPPResourceValidator();
      final CancelIndicator cancelMonitor = new CancelIndicator() {
        public boolean isCanceled() {
          return ticker.isCanceled();
        }
      };
View Full Code Here

Examples of org.eclipse.xtext.util.CancelIndicator

  public void resolveCrossReferences(Resource resource, boolean profileThis, final IProgressMonitor monitor) {
    if(resource instanceof LazyLinkingResource) {
      // The default linking
      long before = System.currentTimeMillis();
      final CancelIndicator cancelMonitor = new CancelIndicator() {
        public boolean isCanceled() {
          return monitor.isCanceled();
        }
      };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.