You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pr107313-SourceLocation.patch 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Index: src/org/aspectj/bridge/Message.java
  2. ===================================================================
  3. RCS file: /home/technology/org.aspectj/modules/bridge/src/org/aspectj/bridge/Message.java,v
  4. retrieving revision 1.12
  5. diff -u -r1.12 Message.java
  6. --- src/org/aspectj/bridge/Message.java 5 May 2005 10:36:02 -0000 1.12
  7. +++ src/org/aspectj/bridge/Message.java 2 Sep 2005 07:39:19 -0000
  8. @@ -110,6 +110,26 @@
  9. this(message, "", kind, sourceLocation, thrown, null );
  10. }
  11. +
  12. + /**
  13. + * Create a copy of the source message, but with the locations updated
  14. + * @param source
  15. + * @param newLocation
  16. + * @param newExtraLocations
  17. + */
  18. + public Message(IMessage source, ISourceLocation newLocation, List newExtraLocations) {
  19. + this.id = source.getID();
  20. + this.kind = source.getKind();
  21. + this.message = source.getMessage();
  22. + this.sourceEnd = source.getSourceEnd();
  23. + this.sourceStart = source.getSourceStart();
  24. + this.thrown = source.getThrown();
  25. + this.details = source.getDetails();
  26. + this.declared =source.getDeclared();
  27. + this.sourceLocation = newLocation;
  28. + this.extraSourceLocations = newExtraLocations;
  29. + }
  30. +
  31. /** @return the kind of this message */
  32. public IMessage.Kind getKind() {
  33. return kind;
  34. Index: src/org/aspectj/bridge/SourceLocation.java
  35. ===================================================================
  36. RCS file: /home/technology/org.aspectj/modules/bridge/src/org/aspectj/bridge/SourceLocation.java,v
  37. retrieving revision 1.9
  38. diff -u -r1.9 SourceLocation.java
  39. --- src/org/aspectj/bridge/SourceLocation.java 5 Jul 2005 11:46:21 -0000 1.9
  40. +++ src/org/aspectj/bridge/SourceLocation.java 2 Sep 2005 07:39:19 -0000
  41. @@ -101,6 +101,16 @@
  42. this.context = context;
  43. }
  44. + // return a clone of the source location, with the source file updated
  45. + public SourceLocation(ISourceLocation source, File newSourceFile) {
  46. + this.sourceFile = newSourceFile;
  47. + this.column = source.getColumn();
  48. + this.context = source.getContext();
  49. + this.endLine = source.getEndLine();
  50. + this.startLine = source.getLine();
  51. + this.offset = source.getOffset();
  52. + }
  53. +
  54. public File getSourceFile() {
  55. return sourceFile;
  56. }