Better push highlighting

This commit is contained in:
Jindra Petk
2013-06-23 13:15:00 +02:00
parent 5295582a48
commit 2c94e938cc
2 changed files with 4 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.action.treemodel.DirectValueTreeItem;
import com.jpexs.decompiler.flash.graph.GraphSourceItem;
import com.jpexs.decompiler.flash.graph.GraphTargetItem;
import com.jpexs.decompiler.flash.helpers.Helper;
import com.jpexs.decompiler.flash.helpers.Highlighting;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -261,8 +262,8 @@ public class ActionPush extends Action {
if (pos > 0) {
ret += " ";
}
ret += Highlighting.hilighOffset(toString(i), getAddress()+pos+1);
pos++;
ret += toString(i);
}
return ret;
}

View File

@@ -28,7 +28,7 @@ public abstract class GraphTargetItem {
public static final int PRECEDENCE_COMMA = 15;
public static final int NOPRECEDENCE = 16;
public GraphSourceItem src;
public int pos = 0;
public int pos = -1;
public int precedence;
public List<GraphSourceItemPos> moreSrc = new ArrayList<>();
public GraphPart firstPart;
@@ -61,7 +61,7 @@ public abstract class GraphTargetItem {
if (src == null) {
return str;
}
return Highlighting.hilighOffset(str, src.getOffset());
return Highlighting.hilighOffset(str, src.getOffset()+pos+1);
}
public String toStringSemicoloned(List<Object> localData) {