Package org.aspectj.bridge

Examples of org.aspectj.bridge.SourceLocation


        sourceFileName = s.substring(i + 1);
      } else {
        sourceFileName = s;
      }
    }
    ISourceLocation sLoc = new SourceLocation(getBinaryFile(), sl.getLine(), sl.getEndLine(),
        ((sl.getColumn() == 0) ? ISourceLocation.NO_COLUMN : sl.getColumn()), sl.getContext(), sourceFileName);
    return sLoc;
  }
View Full Code Here


      }
    }
    // bug 128618 - want to do a similar thing as in bug 62073 above, however
    // we're not an EclipseSourceLocation we're a SourceLocation.
    if (sLoc instanceof SourceLocation) {
      SourceLocation sl = (SourceLocation) sLoc;
      if (currentlyWeaving != null && sl.getSourceFile() != null) {
        if (!String.valueOf(currentlyWeaving.getFileName()).equals(sl.getSourceFile().getAbsolutePath())) {
          return sink.handleMessage(message);
          // throw new RuntimeException("Primary source location must match the file we are currently processing!");
        }
      }
    }
View Full Code Here

          inJar.close();
        }
        inJar.close();
      }
    } catch (FileNotFoundException ex) {
      IMessage message = new Message("Could not find input jar file " + inFile.getPath() + ", ignoring", new SourceLocation(
          inFile, 0), false);
      world.getMessageHandler().handleMessage(message);
    } catch (IOException ex) {
      IMessage message = new Message("Could not read input jar file " + inFile.getPath() + "(" + ex.getMessage() + ")",
          new SourceLocation(inFile, 0), true);
      world.getMessageHandler().handleMessage(message);
    } finally {
      if (inJar != null) {
        try {
          inJar.close();
        } catch (IOException ex) {
          IMessage message = new Message("Could not close input jar file " + inFile.getPath() + "(" + ex.getMessage()
              + ")", new SourceLocation(inFile, 0), true);
          world.getMessageHandler().handleMessage(message);
        }
      }
    }
View Full Code Here

                alreadyWarnedLocations.add(loc);
              }

              if (!(ba.getSignature() instanceof BcelMethod)
                  || !Utility.isSuppressing(ba.getSignature(), "adviceDidNotMatch")) {
                world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(), new SourceLocation(
                    element.getSourceLocation().getSourceFile(), element.getSourceLocation().getLine()));
              }
            }
          }
        }
View Full Code Here

    if (i > lastSlash && i != -1 && j != -1) {
      // we are a binary aspect in the default package
      lastSlash = i;
    }
    String fileName = sourceFilePath.substring(lastSlash + 1);
    IProgramElement fileNode = new ProgramElement(asm, fileName, IProgramElement.Kind.FILE_JAVA, new SourceLocation(new File(
        sourceFilePath), 1, 1), 0, null, null);
    // fileNode.setSourceLocation();
    fileNode.addChild(IHierarchy.NO_STRUCTURE);
    return fileNode;
  }
View Full Code Here

        sourceFileName = s.substring(i + 1);
      } else {
        sourceFileName = s;
      }
    }
    ISourceLocation sLoc = new SourceLocation(getBinaryFile(aspect), sl.getLine(), sl.getEndLine(),
        ((sl.getColumn() == 0) ? ISourceLocation.NO_COLUMN : sl.getColumn()), sl.getContext(), sourceFileName);
    return sLoc;
  }
View Full Code Here

        ((sl.getColumn() == 0) ? ISourceLocation.NO_COLUMN : sl.getColumn()), sl.getContext(), sourceFileName);
    return sLoc;
  }

  private static ISourceLocation createSourceLocation(String sourcefilename, ResolvedType aspect, ISourceLocation sl) {
    ISourceLocation sLoc = new SourceLocation(getBinaryFile(aspect), sl.getLine(), sl.getEndLine(),
        ((sl.getColumn() == 0) ? ISourceLocation.NO_COLUMN : sl.getColumn()), sl.getContext(), sourcefilename);
    return sLoc;
  }
View Full Code Here

    ISourceLocation sl = shadow.getSourceLocation();

    // XXX why not use shadow file? new SourceLocation(sl.getSourceFile(),
    // sl.getLine()),
    SourceLocation peLoc = new SourceLocation(enclosingNode.getSourceLocation().getSourceFile(), sl.getLine());
    peLoc.setOffset(sl.getOffset());
    IProgramElement peNode = new ProgramElement(asm, shadow.toString(), IProgramElement.Kind.CODE, peLoc, 0, null, null);

    // check to see if the enclosing shadow already has children with the
    // same name. If so we want to add a counter to the byteCodeName
    // otherwise
View Full Code Here

    compilerConfig.configurationRead();

    ISourceLocation location = null;
    if (config.getConfigFile() != null) {
      location = new SourceLocation(config.getConfigFile(), 0);
    }

    String message = parser.getOtherMessages(true);
    if (null != message) {
      IMessage m = new Message(message, IMessage.ERROR, null, location);
View Full Code Here

//      if (pe.getFile() != null) filePath = pe.getFile().getAbsolutePath();
            IMessage message = new Message(
                pe.getMessage(),
                IMessage.ERROR,
                pe,
                new SourceLocation(pe.getFile(), pe.getLine(), 1));
            Ajde.getDefault().getMessageHandler().handleMessage(message);
      }
     
      List relativePaths = relativizeFilePaths(configFiles, rootPath);
        BuildConfigNode root = new BuildConfigNode(configFileName, BuildConfigNode.Kind.FILE_LST, rootPath);         
View Full Code Here

TOP

Related Classes of org.aspectj.bridge.SourceLocation

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.