mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 00:03:52 +00:00
goto last method after saving p-code when outside trait method
Fixed: AS3 p-code/AS hilighting after p-code save
This commit is contained in:
@@ -77,7 +77,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
|
||||
private ScriptPack script;
|
||||
|
||||
public int lastTraitIndex = 0;
|
||||
public int lastTraitIndex = GraphTextWriter.TRAIT_UNKNOWN;
|
||||
|
||||
public boolean ignoreCarret = false;
|
||||
|
||||
@@ -526,6 +526,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
getCaret().setVisible(true);
|
||||
int pos = getCaretPosition();
|
||||
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setIgnoreCarret(true);
|
||||
lastTraitIndex = GraphTextWriter.TRAIT_UNKNOWN;
|
||||
try {
|
||||
classIndex = -1;
|
||||
Highlighting cm = Highlighting.searchPos(highlightedText.getClassHighlights(), pos);
|
||||
@@ -609,6 +610,20 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
gotoTrait(lastTraitIndex);
|
||||
}
|
||||
|
||||
public void gotoLastMethod() {
|
||||
if (currentMethodHighlight != null) {
|
||||
final int fpos = currentMethodHighlight.startPos;
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (fpos <= getDocument().getLength()) {
|
||||
setCaretPosition(fpos);
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
public void gotoTrait(int traitId) {
|
||||
boolean isScriptInit = traitId == GraphTextWriter.TRAIT_SCRIPT_INITIALIZER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user