Displaying changed AS3 scripts in GUI as bold

This commit is contained in:
Jindra Petřík
2015-04-05 22:24:15 +02:00
parent b6d4bbc381
commit 12bbb13497
10 changed files with 76 additions and 12 deletions

View File

@@ -50,7 +50,14 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
public ABC abc;
public int bodyIndex = -1;
private int scriptIndex = -1;
public int getScriptIndex() {
return scriptIndex;
}
private List<Highlighting> disassembledHilights = new ArrayList<>();
private List<Highlighting> specialHilights = new ArrayList<>();
@@ -164,11 +171,12 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
return super.getName();
}
public void setBodyIndex(int bodyIndex, ABC abc, String name, Trait trait) {
public void setBodyIndex(int bodyIndex, ABC abc, String name, Trait trait, int scriptIndex) {
this.bodyIndex = bodyIndex;
this.abc = abc;
this.name = name;
this.trait = trait;
this.scriptIndex = scriptIndex;
if (bodyIndex == -1) {
return;
}
@@ -225,9 +233,10 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
}
}, abc.bodies.get(bodyIndex), abc.method_info.get(abc.bodies.get(bodyIndex).method_info));
//acode.getBytes(abc.bodies.get(bodyIndex).getCodeBytes());
abc.bodies.get(bodyIndex).setCode(acode);
abc.bodies.get(bodyIndex).setCode(acode);
}
((Tag) abc.parentTag).setModified(true);
abc.script_info.get(scriptIndex).setModified(true);
} catch (IOException ex) {
} catch (InterruptedException ex) {
} catch (AVM2ParseException ex) {