Esempio n. 1
0
  @Override
  public void resolveRenaming(String oldId, String newId) {
    super.resolveRenaming(oldId, newId);

    targetString.set(Function.repairTarget(oldId, newId, targetString.get()));
    if (targetString.get() != null) {
      resetTargets();
    }
  }
Esempio n. 2
0
  @Override
  public void resolveCopying() {
    super.resolveCopying();

    if (isCopied()) {

      String newTargetString = Global.idChangeDB().repairTargetString(targetString.get());

      targetString.set(newTargetString);
      if (targetString.get() != null) {
        resetTargets();
      }
    }
  }
Esempio n. 3
0
  public void setTargetAndPort(int fromPort, Inputable t, int p) {

    String[] ts;
    if (targetString.get() != null) {
      ts = targetString.get().split(" ");
    } else {
      ts = new String[0];
    }

    if (ts.length <= fromPort) {
      String[] ts2 = new String[fromPort + 1];
      System.arraycopy(ts, 0, ts2, 0, ts.length);
      for (int i = ts.length; i < ts2.length; i++) {
        ts2[i] = "null";
      }
      ts = ts2;
    }

    if (t != null) {
      ts[fromPort] = t.id() + ":" + p;
    } else {
      ts[fromPort] = "null";
    }

    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < ts.length; i++) {
      sb.append(ts[i]);
      if (i != ts.length - 1) {
        sb.append(" ");
      }
    }

    // Log.it("NOVý targetString : >"+ sb +"<" );
    targetString.set(sb.toString());
    resetTargets();
  }