Package net.sf.rej.java.constantpool

Examples of net.sf.rej.java.constantpool.StringInfo


        sd.drawString("\"");
        sd.drawString(ui.getValue());
        sd.drawString("\"");
        break;
      case ConstantPoolInfo.STRING:
        StringInfo si = (StringInfo) constant;
        sd.drawString("\"");
        sd.drawString(si.getString());
        sd.drawString("\"");
        break;
      }

    }
View Full Code Here


  public void execute() {
    if (this.utf8 == null) {
      // the first time this is executed, create the items
      this.utf8 = new UTF8Info(this.str, this.cp);
      int utf8Index = this.cp.forceAdd(this.utf8);
      this.stringInfo = new StringInfo(utf8Index, this.cp);
      this.cp.forceAdd(this.stringInfo);
    } else {
      /* if an actions(undo, redo) is performed, do not recreate
         the items, because in that case if a next redo in the
         redo stack refers to one of these objects, it won't
View Full Code Here

    case ConstantPoolInfo.LONG:
      LongInfo li = (LongInfo) cpi;
      bie.invoke("Edit Long Info", String.valueOf(li.getLongValue()));
      break;
    case ConstantPoolInfo.STRING:
      StringInfo si = (StringInfo) cpi;
      bie.invoke("Edit String Info", si.getStringValue());
      break;

    }

  }
View Full Code Here

      }
      EditorFacade.getInstance().modifyLongInfo(info, l);
      break;
    }
    case ConstantPoolInfo.STRING: {
      StringInfo info = (StringInfo) cpi;
      int answer = JOptionPane.showOptionDialog(this,
          "Modify underlying UTF-8 info or create a new one.",
          "Modify String Info item",
          JOptionPane.YES_NO_CANCEL_OPTION,
          JOptionPane.QUESTION_MESSAGE, null, new String[] {
              "Modify", "Create new", "Cancel" }, "Modify");
      if (answer == JOptionPane.YES_OPTION) {
        // Modify UTF-8 Info
        UTF8Info ui = info.getUTF8Info();
        EditorFacade.getInstance().modifyUTF8Info(ui, newValue);
        break;

      } else if (answer == JOptionPane.NO_OPTION) {
        // Create a new UTF-8 Info
View Full Code Here

                int index = destinationPool.optionalAdd(liCopy);
                copyParams.addValue(index);
                break;                     
              }
              case ConstantPoolInfo.STRING: {
                StringInfo si = (StringInfo)cpi;
                int index = destinationPool.optionalAddString(si.getString());
                copyParams.addValue(index);
                break;                                       
               
              }
              }
View Full Code Here

TOP

Related Classes of net.sf.rej.java.constantpool.StringInfo

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.