Package net.sf.rej.gui

Examples of net.sf.rej.gui.Link


  @Override
  public void processClass(IterationContext sc, ClassFile cf) {
    boolean classNamesMatch = cf.getFullClassName().equals(className);
    if (classNamesMatch) {
      Link link = new Link();
      link.setText("Class definition : " + sc.getCf().getFullClassName());
      link.setAnchor(Link.ANCHOR_CLASS_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here


        boolean classNamesMatch = ri.getClassName().equals(className);

        if (classNamesMatch) {
          String instructionLine = instruction.getMnemonic() + " "
              + instruction.getParameters().getString(sc.getDc());
          Link link = new Link();
          link.setText("Field Ref : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
          link.setAnchor(Link.ANCHOR_METHOD_CODE);
          link.setProject(sc.getProject());
          link.setFile(sc.getFilename());
          link.setTab(Tab.EDITOR);
          link.setMethod(sc.getMethod());
          link.setPosition(sc.getDc().getPosition());

          MainWindow.getInstance().getSearchTab().addResult(link);
          this.resultCount++;
        }

      } else if (params.getType(i) == ParameterType.TYPE_CONSTANT_POOL_METHOD_REF) {
        ConstantPoolInfo cpi = sc.getDc().getConstantPool().get(
            params.getInt(i));
        RefInfo ri = (RefInfo) cpi;
        boolean classNamesMatch = ri.getClassName().equals(className);

        if (classNamesMatch) {
          String instructionLine = instruction.getMnemonic() + " "
              + instruction.getParameters().getString(sc.getDc());
          Link link = new Link();
          link.setText("Method Call : " + sc.getCf().getFullClassName() + "."  + sc.getMethod().getName() + " / " + instructionLine);
          link.setAnchor(Link.ANCHOR_METHOD_CODE);
          link.setProject(sc.getProject());
          link.setFile(sc.getFilename());
          link.setTab(Tab.EDITOR);
          link.setMethod(sc.getMethod());
          link.setPosition(sc.getDc().getPosition());
          MainWindow.getInstance().getSearchTab().addResult(link);
          this.resultCount++;
        }

      } else if (params.getType(i) == ParameterType.TYPE_CONSTANT_POOL_CLASS) {
        ConstantPoolInfo cpi = sc.getDc().getConstantPool().get(
            params.getInt(i));
        ClassInfo ci = (ClassInfo) cpi;
        boolean classNamesMatch = ci.getName().equals(className);

        if (classNamesMatch) {
          String instructionLine = instruction.getMnemonic() + " "
              + instruction.getParameters().getString(sc.getDc());
          Link link = new Link();
          link.setText("Instruction : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
          link.setAnchor(Link.ANCHOR_METHOD_CODE);
          link.setProject(sc.getProject());
          link.setFile(sc.getFilename());
          link.setTab(Tab.EDITOR);
          link.setMethod(sc.getMethod());
          link.setPosition(sc.getDc().getPosition());

          MainWindow.getInstance().getSearchTab().addResult(link);
          this.resultCount++;
        }
      }
View Full Code Here

            this.resultPanel.setLayout(new BorderLayout());
            this.resultList.addMouseListener(new MouseAdapter() {
              @Override
              public void mouseClicked(MouseEvent e) {
                    if (e.getClickCount() == 2) {
                        Link link = (Link) resultList.getSelectedValue();
                        if (link != null) {
                            SystemFacade.getInstance().goTo(link);
                        }
                    }
              }
View Full Code Here

  @Override
  public void processClass(IterationContext sc, ClassFile cf) {
    boolean classNamesMatch = cf.getFullClassName().equals(className);
    if (classNamesMatch) {
      Link link = new Link();
      link.setText("Class definition : " + sc.getCf().getFullClassName());
      link.setAnchor(Link.ANCHOR_CLASS_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here

    boolean classNamesMatch = sc.getCf().getFullClassName().equals(
        className);
    boolean methodNamesMatch = field.getName().equals(fieldName);
    boolean descriptorsMatch = field.getDescriptor().equals(desc);
    if (classNamesMatch && methodNamesMatch && descriptorsMatch) {
      Link link = new Link();
      link.setText("Field definition : " + sc.getCf().getFullClassName() + "." + field.getName());
      link.setAnchor(Link.ANCHOR_FIELD_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      link.setField(field);
      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here

    boolean classNamesMatch = sc.getCf().getFullClassName().equals(
        className);
    boolean fieldNamesMatch = field.getName().equals(fieldName);
    boolean descriptorsMatch = field.getDescriptor().equals(desc);
    if (classNamesMatch && fieldNamesMatch && descriptorsMatch) {
      Link link = new Link();
      link.setText("Field definition : " + sc.getCf().getFullClassName() + "." + field.getName());
      link.setAnchor(Link.ANCHOR_FIELD_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      link.setField(field);
      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here

        boolean descriptorsMatch = ri.getDescriptor().equals(desc);

        if (classNamesMatch && fieldNamesMatch && descriptorsMatch) {
          String instructionLine = instruction.getMnemonic() + " "
              + instruction.getParameters().getString(sc.getDc());
          Link link = new Link();
          link.setText("Field Ref : " + sc.getCf().getFullClassName() + "." + sc.getMethod().getName() + " / " + instructionLine);
          link.setAnchor(Link.ANCHOR_METHOD_CODE);
          link.setProject(sc.getProject());
          link.setFile(sc.getFilename());
          link.setTab(Tab.EDITOR);
          link.setMethod(sc.getMethod());
          link.setPosition(sc.getDc().getPosition());

          MainWindow.getInstance().getSearchTab().addResult(link);
          this.resultCount++;
        }
View Full Code Here

    boolean classNamesMatch = sc.getCf().getFullClassName().equals(
        className);
    boolean methodNamesMatch = method.getName().equals(methodName);
    boolean descriptorsMatch = method.getDescriptor().equals(desc);
    if (classNamesMatch && methodNamesMatch && descriptorsMatch) {
      Link link = new Link();
      link.setText("Method definition : " + sc.getCf().getFullClassName() + "." + method.getName());
      link.setAnchor(Link.ANCHOR_METHOD_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      link.setMethod(sc.getMethod());

      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here

        boolean descriptorsMatch = ri.getDescriptor().equals(desc);

        if (classNamesMatch && methodNamesMatch && descriptorsMatch) {
          String instructionLine = instruction.getMnemonic() + " "
              + instruction.getParameters().getString(sc.getDc());
          Link link = new Link();
          link.setText("Method Call : " + sc.getCf().getFullClassName() + "."  + sc.getMethod().getName() + " / " + instructionLine);
          link.setAnchor(Link.ANCHOR_METHOD_CODE);
          link.setProject(sc.getProject());
          link.setFile(sc.getFilename());
          link.setTab(Tab.EDITOR);
          link.setMethod(sc.getMethod());
          link.setPosition(sc.getDc().getPosition());

          MainWindow.getInstance().getSearchTab().addResult(link);
          this.resultCount++;
        }
View Full Code Here

    boolean classNamesMatch = sc.getCf().getFullClassName().equals(
        className);
    boolean methodNamesMatch = method.getName().equals(methodName);
    boolean descriptorsMatch = method.getDescriptor().equals(desc);
    if (classNamesMatch && methodNamesMatch && descriptorsMatch) {
      Link link = new Link();
      link.setText("Method definition : " + sc.getCf().getFullClassName() + "." + method.getName());
      link.setAnchor(Link.ANCHOR_METHOD_DEF);
      link.setProject(sc.getProject());
      link.setFile(sc.getFilename());
      link.setTab(Tab.EDITOR);
      link.setMethod(sc.getMethod());

      MainWindow.getInstance().getSearchTab().addResult(link);
      this.resultCount++;
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.Link

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.