Package org.aspectj.bridge

Examples of org.aspectj.bridge.IMessage$Kind


   
  }
   
  private void writeResource(String filename, byte[] content, File srcLocation) throws IOException {
    if (state.resources.contains(filename)) {
      IMessage msg = new Message("duplicate resource: '" + filename + "'",
                     IMessage.WARNING,
                     null,
                     new SourceLocation(srcLocation,0));
      handler.handleMessage(msg);
      return;
View Full Code Here


    bcelWeaver.setReweavableMode(buildConfig.isXNotReweavable());

    //check for org.aspectj.runtime.JoinPoint
    ResolvedType joinPoint = bcelWorld.resolve("org.aspectj.lang.JoinPoint");
    if (joinPoint.isMissing()) {
      IMessage message =
        new Message("classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)",
              null,
              true);
        handler.handleMessage(message);
    }
View Full Code Here

              } else {
                writeZipEntry(classFile,filename);
              }
              if (shouldAddAspectName) addAspectName(classname);
            } catch (IOException ex) {
              IMessage message = EclipseAdapterUtils.makeErrorMessage(
                  new String(unitResult.fileName),
                  CANT_WRITE_RESULT,
                  ex);
              handler.handleMessage(message);
            }

          }
        }
       
        if (unitResult.hasProblems() || unitResult.hasTasks()) {
          IProblem[] problems = unitResult.getAllProblems();
          for (int i=0; i < problems.length; i++) {
            IMessage message =
              EclipseAdapterUtils.makeMessage(unitResult.compilationUnit, problems[i]);
            handler.handleMessage(message);
          }
        }
View Full Code Here

   
    protected FuzzyBoolean matchInternal(Shadow shadow) {
      ResolvedType enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType(),true);
      if (enclosingType.isMissing()) {
        //PTWIMPL ?? Add a proper message
        IMessage msg = new Message(
            "Cant find type pertypewithin matching...",
          shadow.getSourceLocation(),true,new ISourceLocation[]{getSourceLocation()});
        shadow.getIWorld().getMessageHandler().handleMessage(msg);
      }
     
View Full Code Here

  private UnwovenClassFile createUnwovenClassFile(AjBuildConfig.BinarySourceFile bsf) {
    UnwovenClassFile ucf = null;
    try {
      ucf = weaver.addClassFile(bsf.binSrc, bsf.fromInPathDirectory, buildConfig.getOutputDir());
    } catch(IOException ex) {
      IMessage msg = new Message("can't read class file " + bsf.binSrc.getPath(),
                     new SourceLocation(bsf.binSrc,0),false);
      buildManager.handler.handleMessage(msg);
    }
    return ucf;
  }
View Full Code Here

    if (resolved) return;
    resolved = true;
    annotationType = annotationType.resolve(world);
    ResolvedType resolvedAnnotationType = (ResolvedType) annotationType;
    if (!resolvedAnnotationType.isAnnotation()) {
      IMessage m = MessageUtil.error(
          WeaverMessages.format(WeaverMessages.REFERENCE_TO_NON_ANNOTATION_TYPE,annotationType.getName()),
          getSourceLocation());
      world.getMessageHandler().handleMessage(m);
      resolved = false;
    }
View Full Code Here

  }

  private void verifyRuntimeRetention(World world, ResolvedType resolvedAnnotationType) {
    if (!resolvedAnnotationType.isAnnotationWithRuntimeRetention()) { // default is class visibility
        // default is class visibility
      IMessage m = MessageUtil.error(
          WeaverMessages.format(WeaverMessages.BINDING_NON_RUNTIME_RETENTION_ANNOTATION,annotationType.getName()),
          getSourceLocation());
      world.getMessageHandler().handleMessage(m);
      resolved = false;       
    }
View Full Code Here

      kind=IMessage.TASKTAG;
    } else {
      if (problem.isError()) { kind = IMessage.ERROR; }
      else                   { kind = IMessage.WARNING; }
    }
        IMessage msg = new Message(problem.getMessage(),
                       extraDetails,
                   kind,
                   sourceLocation,
                   null,
                   seeAlsoLocations,
View Full Code Here

    }              

    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

    }

  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

TOP

Related Classes of org.aspectj.bridge.IMessage$Kind

Copyright © 2018 www.massapicom. 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.