Examples of ISourceLocation


Examples of org.aspectj.bridge.ISourceLocation

      }

      setDebugOptions();
      buildConfig.getOptions().set(options);
    } catch (InvalidInputException iie) {
      ISourceLocation location = null;
      if (buildConfig.getConfigFile() != null) {
        location = new SourceLocation(buildConfig.getConfigFile(), 0);
      }
      IMessage m = new Message(iie.getMessage(), IMessage.ERROR, null, location);
      handler.handleMessage(m);
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

    this.setFont(StructureTree.DEFAULT_FONT);      
        SwingTreeViewNode viewNode = (SwingTreeViewNode)treeNode;
        IProgramElement node = viewNode.getStructureNode();

        if (viewNode.getKind() == IStructureViewNode.Kind.LINK) {
            ISourceLocation sourceLoc = node.getSourceLocation();
            if ((null != sourceLoc)
                && (null != sourceLoc.getSourceFile().getAbsolutePath())) {
                setTextNonSelectionColor(AjdeWidgetStyles.LINK_NODE_COLOR);
            } else {
                setTextNonSelectionColor(AjdeWidgetStyles.LINK_NODE_NO_SOURCE_COLOR);
            }
           
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

  /**
   * Get a source location for the munger. Until intertype mungers remember where they came from, the source location for the
   * munger itself is null. In these cases use the source location for the aspect containing the ITD.
   */
  private ISourceLocation getMungerLocation(ConcreteTypeMunger munger) {
    ISourceLocation sloc = munger.getSourceLocation();
    if (sloc == null) {
      sloc = munger.getAspectType().getSourceLocation();
    }
    return sloc;
  }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

              if (!isDuplicateOfPreviousITD) {
                // b275032 - this is OK if it is the default ctor and that default ctor was generated
                // at compile time, otherwise we cannot overwrite it
                if (!(typeTransformerSignature.getName().equals("<init>") && existingMember.isDefaultConstructor())) {
                  String aspectName = typeTransformer.getAspectType().getName();
                  ISourceLocation typeTransformerLocation = typeTransformer.getSourceLocation();
                  ISourceLocation existingMemberLocation = existingMember.getSourceLocation();
                  String msg = WeaverMessages.format(WeaverMessages.ITD_MEMBER_CONFLICT, aspectName,
                      existingMember);

                  // this isn't quite right really... as I think the errors should only be recorded against
                  // what is currently being processed or they may get lost or reported twice
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

          }
          pc = pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.Before, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

          }
          pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.After, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

        }
        pc.resolve(binding);
      }
      setIgnoreUnboundBindingNames(pc, bindings);

      ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
          struct.bMethod.getDeclarationOffset());
      struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.AfterReturning, pc, extraArgument, sl.getOffset(),
          sl.getOffset() + 1,// FIXME AVASM
          struct.context));
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

        }
        pc.resolve(binding);
      }
      setIgnoreUnboundBindingNames(pc, bindings);

      ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
          struct.bMethod.getDeclarationOffset());
      struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.AfterThrowing, pc, extraArgument, sl.getOffset(), sl
          .getOffset() + 1, struct.context));
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

          }
          pc.resolve(binding);
        }
        setIgnoreUnboundBindingNames(pc, bindings);

        ISourceLocation sl = struct.context.makeSourceLocation(struct.bMethod.getDeclarationLineNumber(),
            struct.bMethod.getDeclarationOffset());
        struct.ajAttributes.add(new AjAttribute.AdviceAttribute(AdviceKind.Around, pc, extraArgument, sl.getOffset(), sl
            .getOffset() + 1,// FIXME AVASM
            struct.context));
        return true;
      }
    }
View Full Code Here

Examples of org.aspectj.bridge.ISourceLocation

  private static void setDeclareErrorOrWarningLocation(AsmManager model, DeclareErrorOrWarning deow, AjAttributeFieldStruct struct) {
    IHierarchy top = (model == null ? null : model.getHierarchy());
    if (top != null && top.getRoot() != null) {
      IProgramElement ipe = top.findElementForLabel(top.getRoot(), IProgramElement.Kind.FIELD, struct.field.getName());
      if (ipe != null && ipe.getSourceLocation() != null) {
        ISourceLocation sourceLocation = ipe.getSourceLocation();
        int start = sourceLocation.getOffset();
        int end = start + struct.field.getName().length();
        deow.setLocation(struct.context, start, end);
        return;
      }
    }
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.