Package net.sf.rej.files

Examples of net.sf.rej.files.ClassLocator


        try {
            ClassFile cf = null;
            if (obj instanceof String) {
                // TODO: let user type his own class name?
            } else if (obj instanceof ClassLocator) {
                ClassLocator cl = (ClassLocator) obj;
                cf = SystemFacade.getInstance().getClassFile(cl);
            }

            // cf will be null if referenced class is not in project classpath
            if (cf != null) {
View Full Code Here


    public void updatePackage() {
        if (this.model.getSize() == 0) {
            this.packageLabel.setText("");
        }
        // TODO: The following line creates exceptions.. probably because of bad design
        ClassLocator cl = (ClassLocator)ClassChooseDialog.this.list.getSelectedValue();
        if(cl != null) {
            this.packageLabel.setText(cl.getPackage());
        } else {
            this.packageLabel.setText("");
        }
    }
View Full Code Here

  }
 
  private void openStackFrame(IStackFrame sf) {
    ClassIndex ci = SystemFacade.getInstance().getClassIndex();
    ClassLocator cl = ci.getLocator(sf.location().declaringType().name());
    if (cl != null) {
      try {
        ClassFile cf = SystemFacade.getInstance().getClassFile(cl);
        IMethod bpMethod = sf.location().method();
        for (net.sf.rej.java.Method method : cf.getMethods()) {
          if (method.getName().equals(bpMethod.name()) && method.getDescriptor().getRawDesc().equals(bpMethod.signature())) {
            Integer pc = null;
            if (sf.location().codeIndex() != -1) {
              pc = (int)sf.location().codeIndex();
            }
           
            Event event = new Event(EventType.CLASS_OPEN);
            event.setClassFile(cf);
            event.setFile(cl.getFile());
            this.dispatcher.notifyObservers(event);
            setExecutionRow(method.getName(), method.getDescriptor(), pc);
            break;
          }
        }
View Full Code Here

      selectClassButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          ClassIndex classIndex = SystemFacade.getInstance().getClassIndex();
          ClassChooseDialog ccd = new ClassChooseDialog(MainWindow.getInstance(), classIndex);
          ccd.invoke();
          ClassLocator locator = ccd.getSelected();
          if (locator != null) {
            DebugTab.this.mainClassField.setText(locator.getFullName());
          }
        }
      });
    }
    return selectClassButton;
View Full Code Here

TOP

Related Classes of net.sf.rej.files.ClassLocator

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.