Package net.sf.rej.gui

Examples of net.sf.rej.gui.Undoable.execute()


    }

    public void execute() {
        for (int i = 0; i < this.actions.size(); i++) {
            Undoable action = this.actions.get(i);
            action.execute();
        }
    }

    public void undo() {
        for (int i = this.actions.size() - 1; i >= 0; i--) {
View Full Code Here


    if (attr instanceof LineNumberTableAttribute) {
      LineNumberTableAttribute lnAttr = (LineNumberTableAttribute) attr;
      Attributes attrs = ic.getCodeAttribute().getAttributes();
      Undoable u = new RemoveAttributeAction(attrs, lnAttr);
      if (batchMode) {
        u.execute();
      } else {
        SystemFacade.getInstance().performAction(u, ic.getFilename());
      }
    }
  }
View Full Code Here

    if (attr instanceof LocalVariableTableAttribute) {
      LocalVariableTableAttribute lvAttr = (LocalVariableTableAttribute) attr;
      Attributes attrs = ic.getCodeAttribute().getAttributes();
      Undoable u = new RemoveAttributeAction(attrs, lvAttr);
      if (this.batchMode) {
        u.execute();
      } else {
        SystemFacade.getInstance().performAction(u, ic.getFilename());
      }
    }
  }
View Full Code Here

    String className = ic.getCf().getFullClassName();
    String newFieldName = this.advisor.newFieldNameFor(className, field.getName(), field.getDescriptor());
    if (newFieldName != null) {
      Undoable u = new RenameFieldAction(ic.getCf().getPool(), field, newFieldName);
      if (this.batchMode) {
        u.execute();
      } else {
        SystemFacade.getInstance().performAction(u, ic.getFilename());         
      }
    }
  }
View Full Code Here

    String className = ic.getCf().getFullClassName();
    String newMethodName = this.advisor.newMethodNameFor(className, method.getName(), method.getDescriptor());
    if (newMethodName != null) {
      Undoable u = new RenameMethodAction(ic.getCf().getPool(), method, newMethodName);
      if (this.batchMode) {
        u.execute();
      } else {
        SystemFacade.getInstance().performAction(u, ic.getFilename());         
      }
    }
  }
View Full Code Here

   
    if (match) {
      desc.setParamList(newParams);
      Undoable u = new ModifyDescriptor(ic.getCf().getPool(), desc, descEnabled);
      if (this.batchMode) {
        u.execute();
      } else {
        SystemFacade.getInstance().performAction(u, ic.getFilename());
      }
    }
  }
View Full Code Here

      String newClassName = this.advisor.newClassNameFor(jt.getType());
      if(newClassName != null) {
        this.oldClassNames.put(newClassName, jt.getType());
        Undoable u = new ModifyClassInfoAction(ic.getCf().getPool(), ci, newClassName + jt.getDimensions());
        if (this.batchMode) {
          u.execute();
        } else {
          SystemFacade.getInstance().performAction(u, ic.getFilename());
        }
      }
    } if(cpi.getType() == ConstantPoolInfo.NAME_AND_TYPE) {
View Full Code Here

     
      if (match) {
        desc.setParamList(newParams);
        Undoable u = new ModifyNameAndTypeInfoAction(ic.getCf().getPool(), nati, desc);
        if (this.batchMode) {
          u.execute();
        } else {
          SystemFacade.getInstance().performAction(u, ic.getFilename());
        }
      }
    } if(cpi.getType() == ConstantPoolInfo.FIELD_REF) {
View Full Code Here

      if (newFieldName != null) {
        NameAndTypeInfo nati = ri.getNameAndTypeInfo();
       
        Undoable u = new ModifyNameAndTypeInfoAction(ic.getCf().getPool(), nati, newFieldName);
        if (this.batchMode) {
          u.execute();
        } else {
          SystemFacade.getInstance().performAction(u, ic.getFilename());         
        }
      }
    } else if(cpi.getType() == ConstantPoolInfo.METHOD_REF || cpi.getType() == ConstantPoolInfo.INTERFACE_METHOD_REF) {
View Full Code Here

      String newMethodName = this.advisor.newMethodNameFor(className, ri.getTargetName(), ri.getDescriptor());
      if (newMethodName != null) {
        NameAndTypeInfo nati = ri.getNameAndTypeInfo();
        Undoable u = new ModifyNameAndTypeInfoAction(ic.getCf().getPool(), nati, newMethodName);
        if (this.batchMode) {
          u.execute();
        } else {
          SystemFacade.getInstance().performAction(u, ic.getFilename());         
        }
      }
    }
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.