mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-07 21:55:08 +00:00
Added: Disable AS1/2/3 direct editation when editing P-code
This commit is contained in:
@@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS1/2/3 - underline errors in the code (also in edit mode)
|
||||
- AS1/2/3 - highlight variables and errors on panel next to vertical scrollbar
|
||||
- AS1/2 direct editation - hide P-code panel when editing
|
||||
- Disable AS1/2/3 direct editation when editing P-code
|
||||
|
||||
### Changed
|
||||
- AS1/2 - Single DoAction tag inside frame is now displayed directly as frame node
|
||||
|
||||
@@ -216,6 +216,12 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
public ScriptPack getPack() {
|
||||
return decompiledTextArea.getScriptLeaf();
|
||||
}
|
||||
|
||||
public void setDecompiledEditEnabled(boolean value) {
|
||||
decompiledTextArea.setEnabled(value);
|
||||
editDecompiledButton.setEnabled(value);
|
||||
toolbarPanel.setEnabled(value);
|
||||
}
|
||||
|
||||
public List<ABCSearchResult> search(final Openable openable, final String txt, boolean ignoreCase, boolean regexp, boolean pcode, CancellableWorker<Void> worker, List<ScriptPack> scope) {
|
||||
if (txt != null && !txt.isEmpty()) {
|
||||
|
||||
@@ -620,6 +620,9 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
|
||||
|
||||
@Override
|
||||
public void caretUpdate(final CaretEvent e) {
|
||||
if (!isEnabled()) {
|
||||
return;
|
||||
}
|
||||
ABC abc = getABC();
|
||||
if (abc == null) {
|
||||
return;
|
||||
|
||||
@@ -207,6 +207,7 @@ public class DetailPanel extends JPanel implements TagEditorPanel {
|
||||
editButton.setVisible(!val);
|
||||
cancelButton.setVisible(val);
|
||||
selectedLabel.setIcon(val ? View.getIcon("editing16") : null);
|
||||
abcPanel.setDecompiledEditEnabled(!val);
|
||||
}
|
||||
|
||||
public void showCard(final String name, final Trait trait, int traitIndex, ABC abc) {
|
||||
|
||||
@@ -1192,7 +1192,9 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
|
||||
saveButton.setVisible(val);
|
||||
saveButton.setEnabled(false);
|
||||
editButton.setVisible(!val);
|
||||
cancelButton.setVisible(val);
|
||||
cancelButton.setVisible(val);
|
||||
|
||||
editDecompiledButton.setEnabled(!val);
|
||||
}
|
||||
|
||||
editor.getCaret().setVisible(true);
|
||||
|
||||
@@ -553,5 +553,5 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan
|
||||
fgp.paint(g, lineStart.getVal(), lineEnd.getVal(), null, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user