Package net.sf.rej.gui.editor.row

Examples of net.sf.rej.gui.editor.row.FieldDefRow


        FieldAnnotationDefRow fadr = new FieldAnnotationDefRow(
            annotation);
        this.rows.add(fadr);
      }

      FieldDefRow fdr = new FieldDefRow(cf, field);
      this.rows.add(fdr);
      this.classDef.addField(fdr);
    }

    if (fields.size() > 0) {
View Full Code Here


      break;
    }
    case Link.ANCHOR_FIELD_DEF: {
      List fields = this.classDef.getFields();
      for (int i = 0; i < fields.size(); i++) {
        FieldDefRow fdr = (FieldDefRow) fields.get(i);
        if (fdr.getField().getSignatureLine().equals(
            link.getField().getSignatureLine())) {
          int index = this.rows.indexOf(fdr);
          this.list.setSelectedIndex(index);
          this.list.ensureIndexIsVisible(index);
          break switchLabel;
View Full Code Here

            desc, af, maxStack, maxLocals,
            methodEditor.getExceptions());
      }

    } else if (o instanceof FieldDefRow) {
      FieldDefRow fdr = (FieldDefRow) o;
      Field field = fdr.getField();
      int flags = field.getAccessFlags();
      this.fieldEditor.invoke(field.getName(), field.getDescriptor(),
          flags);

      if (!this.fieldEditor.wasCancelled()) {
        AccessFlags af = this.fieldEditor.getAccessFlags();
        String name = this.fieldEditor.getFieldName();
        Descriptor desc = this.fieldEditor.getType();

        EditorFacade.getInstance().modifyField(
            fdr.getClassFile().getPool(), fdr.getField(), name,
            desc, af);
      }
    } else if (o instanceof ClassDefRow) {
      ClassDefRow cdr = (ClassDefRow) o;
      ClassFile cf = cdr.getClassFile();
View Full Code Here

          transferrable.setExceptions(exceptionNames);
          transferables.add(transferrable);
        }

      } else if (obj instanceof FieldDefRow) {
        FieldDefRow fdr = (FieldDefRow) obj;
        Field field = fdr.getField();
        // TODO: Attributes are not being copied

        TransferrableField transferrable = new TransferrableField();
        transferrable.setFieldName(field.getName());
        transferrable.setDescriptor(field.getDescriptor());
View Full Code Here

            annotation);
        this.rows.add(fadr);
      }
       */

      FieldDefRow fdr = null;
      Field field = fieldsA.get(fieldSignature);
      if (field == null) {
        field = fieldsB.get(fieldSignature);
        fdr = new FieldDefRow(cfB, field);
        this.rowsB.add(fdr);
      } else {
        fdr = new FieldDefRow(cfA, field);
        if (!fieldsB.keySet().contains(fieldSignature)) {
          this.rowsA.add(fdr);
        }
      }
     
View Full Code Here

  public void sync(EditorRow er) {
    if (er == null) {
      this.hexEditor.getHexEditor().getSelectionModel().clearSelection();
    } else {
      if (er instanceof FieldDefRow) {
        FieldDefRow fdr = (FieldDefRow) er;
        Range offset = this.offsets.get(fdr.getField());
        this.hexEditor.getHexEditor().getSelectionModel().setSelectedInverval(offset.getOffset(), offset.getOffset() + offset.getSize());
      } else if (er instanceof MethodDefRow) {
        MethodDefRow mdr = (MethodDefRow) er;
        Range offset = this.offsets.get(mdr.getMethod());
        this.hexEditor.getHexEditor().getSelectionModel().setSelectedInverval(offset.getOffset(), offset.getOffset() + offset.getSize());         
View Full Code Here

        MethodDefRow mdr = (MethodDefRow) obj;
        RemoveMethodAction rma = new RemoveMethodAction(mdr
            .getClassFile(), mdr.getMethod());
        ga.add(rma);
      } else if (obj instanceof FieldDefRow) {
        FieldDefRow fdr = (FieldDefRow) obj;
        RemoveFieldAction rfa = new RemoveFieldAction(fdr
            .getClassFile(), fdr.getField());
        ga.add(rfa);
      } else {
        throw new AssertionError("Object of invalid type in list: " + obj.getClass());
      }
View Full Code Here

                }

                sd.drawDefault("{");
            }
        } else if (er instanceof FieldDefRow) {
            FieldDefRow fdr = (FieldDefRow)er;
            Field f = fdr.getField();
        FieldSignature fieldSig = null;
            boolean displayGenerics = SystemFacade.getInstance().getPreferences().isSettingTrue(Settings.DISPLAY_GENERICS);
            if (displayGenerics) {
              SignatureAttribute signature = f.getAttributes().getSignatureAttribute();
              if (signature != null) {
View Full Code Here

        wrapper.setDisplay(pdr.getPackage());
      } else if (er instanceof ClassDefRow) {
        ClassDefRow cdr = (ClassDefRow)er;
        wrapper.setDisplay(cdr.getClassFile().getShortClassName());
      } else if (er instanceof FieldDefRow) {
        FieldDefRow fdr = (FieldDefRow)er;
        wrapper.setDisplay(fdr.getField().getName());
      } else if (er instanceof MethodDefRow) {
        MethodDefRow mdr = (MethodDefRow)er;
        wrapper.setDisplay(mdr.getMethod().getName());
      } else {
            throw new AssertionError("Invalid object type: " + er.getClass());
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.row.FieldDefRow

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.