Examples of ISourceLocation


Examples of org.aspectj.bridge.ISourceLocation

        }
      }
    }

    public void showError(String message) {
      ISourceLocation location = null;
      if (buildConfig.getConfigFile() != null) {
        location = new SourceLocation(buildConfig.getConfigFile(), 0);
      }
      IMessage errorMessage = new Message(CONFIG_MSG + message, IMessage.ERROR, null, location);
      handler.handleMessage(errorMessage);
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

      handler.handleMessage(errorMessage);
      // MessageUtil.error(handler, CONFIG_MSG + message);
    }

    protected void showWarning(String message) {
      ISourceLocation location = null;
      if (buildConfig.getConfigFile() != null) {
        location = new SourceLocation(buildConfig.getConfigFile(), 0);
      }
      IMessage errorMessage = new Message(CONFIG_MSG + message, IMessage.WARNING, null, location);
      handler.handleMessage(errorMessage);
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

      // -- remove duplicates before adding (XXX use them instead?)
      if (addToNode != null && addToNode.getChildren() != null) {
        for (ListIterator itt = addToNode.getChildren().listIterator(); itt.hasNext();) {
          IProgramElement child = (IProgramElement) itt.next();
          ISourceLocation childLoc = child.getSourceLocation();
          if (null == childLoc) {
            // XXX ok, packages have null source locations
            // signal others?
          } else if (childLoc.getSourceFile().equals(file)) {
            itt.remove();
          }
        }
      }
      // -- add and traverse
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

  private void checkWeaveAccess(UnresolvedType typeX, ASTNode location) {
    World world = inAspect.factory.getWorld();
    Lint.Kind check = world.getLint().typeNotExposedToWeaver;
    if (check.isEnabled()) {
      if (!world.resolve(typeX).isExposedToWeaver()) {
        ISourceLocation loc = null;
        if (location != null) {
          loc = new EclipseSourceLocation(inAspect.compilationResult, location.sourceStart, location.sourceEnd);
        }
        check.signal(typeX.getName() + " (needed for privileged access)", loc);
      }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

   *
   * @param world
   * @param progressListener
   */
  public static IMessage makeMessage(ICompilationUnit unit, IProblem problem, World world, IProgressListener progressListener) {
    ISourceLocation sourceLocation = makeSourceLocation(unit, problem, progressListener);
    IProblem[] seeAlso = problem.seeAlso();
    // If the user has turned off classfile line number gen, then we may not be able to tell them
    // about all secondary locations (pr209372)
    int validPlaces = 0;
    for (int ii = 0; ii < seeAlso.length; ii++) {
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

    }
    return msg;
  }

  public static IMessage makeErrorMessage(ICompilationUnit unit, String text, Exception ex) {
    ISourceLocation loc = new SourceLocation(new File(new String(unit.getFileName())), 0, 0, 0, "");
    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }

  public static IMessage makeErrorMessage(String srcFile, String text, Exception ex) {
    ISourceLocation loc = new SourceLocation(new File(srcFile), 0, 0, 0, "");
    IMessage msg = new Message(text, IMessage.ERROR, ex, loc);
    return msg;
  }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

  private Expression fixReceiver(Expression expression, BlockScope scope) {
    if (depthCounter!=0) return expression; // Don't mess with super calls down in nested local type declarations (pr90143)
    if (expression instanceof SuperReference) {
      SuperReference superRef = (SuperReference) expression;
      if (superType == null) {
        ISourceLocation location =
          new EclipseSourceLocation(scope.problemReporter().referenceContext.compilationResult(),
                    expression.sourceStart, expression.sourceEnd);
       
        world.showMessage(IMessage.ERROR, "multiple supertypes for this interface", location, null);
        dec.ignoreFurtherInvestigation = true;
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

   */
  private void raiseNoFieldInitializersWarning() {
    if (suppressingNoExplicitConstructorCall())
      return;
    EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(scope);
    ISourceLocation location = new EclipseSourceLocation(scope.problemReporter().referenceContext.compilationResult(),
        sourceStart(), sourceEnd());
    world.getWorld().getLint().noExplicitConstructorCall.signal(null, location);
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.ISourceLocation

      content.append(resultMessage(result));
    }
    catch (ParseError pe) {
      content.append(parseErrorMessage(command.getValue(), "stdin", pe));
      content.append('\n');
      ISourceLocation sourceLocation = values.sourceLocation(values.sourceLocation(pe.getLocation()), pe.getOffset(), pe.getLength(), pe.getBeginLine(), pe.getEndLine(), pe.getBeginColumn(), pe.getEndColumn());
      throw new Throw(values.constructor(ShellParseError, values.string(content.toString()), sourceLocation), ctx.getCurrentAST(), ctx.getStackTrace());
    }
    catch (QuitException q){
      //
    }
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.