spelling: caret

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref
2024-10-22 08:41:10 -04:00
committed by Jindra Petřík
parent 34ae22d837
commit 0374bcda8d
5 changed files with 34 additions and 34 deletions

View File

@@ -1669,7 +1669,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
decLabel.setIcon(val ? View.getIcon("editing16") : null);
detailPanel.setVisible(!val);
decompiledTextArea.ignoreCarret = val;
decompiledTextArea.ignoreCaret = val;
if (val) {
decompiledTextArea.requestFocusInWindow();
}

View File

@@ -89,7 +89,7 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
private final DecompiledEditorPane decompiledEditor;
private boolean ignoreCarret = false;
private boolean ignoreCaret = false;
private String name;
@@ -188,8 +188,8 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
hilighOffset(oldOffset);
}
public void setIgnoreCarret(boolean ignoreCarret) {
this.ignoreCarret = ignoreCarret;
public void setIgnoreCaret(boolean ignoreCaret) {
this.ignoreCaret = ignoreCaret;
}
public ASMSourceEditorPane(DecompiledEditorPane decompiledEditor) {
@@ -213,12 +213,12 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
}
}
if (h2 != null) {
ignoreCarret = true;
ignoreCaret = true;
if (h2.startPos <= getDocument().getLength()) {
setCaretPosition(h2.startPos);
}
getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
}
}
@@ -228,12 +228,12 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
}
Highlighting h2 = Highlighting.searchOffset(highlightedText.getInstructionHighlights(), offset);
if (h2 != null) {
ignoreCarret = true;
ignoreCaret = true;
if (h2.startPos <= getDocument().getLength()) {
setCaretPosition(h2.startPos);
}
getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
}
}
@@ -723,7 +723,7 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
public void caretUpdate(CaretEvent e) {
updateDocs();
if (ignoreCarret) {
if (ignoreCaret) {
return;
}
if (isEditable()) {

View File

@@ -81,7 +81,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
public int lastTraitIndex = GraphTextWriter.TRAIT_UNKNOWN;
public boolean ignoreCarret = false;
public boolean ignoreCaret = false;
private boolean reset = false;
@@ -185,12 +185,12 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
for (Highlighting h : allh) {
if (h.getProperties().subtype.equals(type) && (h.getProperties().index == index)) {
ignoreCarret = true;
ignoreCaret = true;
if (h.startPos <= getDocument().getLength()) {
setCaretPosition(h.startPos);
}
getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
break;
}
}
@@ -202,12 +202,12 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
Highlighting h2 = Highlighting.searchOffset(highlightedText.getInstructionHighlights(), offset, currentMethodHighlight.startPos, currentMethodHighlight.startPos + currentMethodHighlight.len);
if (h2 != null) {
ignoreCarret = true;
ignoreCaret = true;
if (h2.startPos <= getDocument().getLength()) {
setCaretPosition(h2.startPos);
}
getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
}
}
@@ -620,13 +620,13 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
if (abc == null) {
return;
}
if (ignoreCarret) {
if (ignoreCaret) {
return;
}
getCaret().setVisible(true);
int pos = getCaretPosition();
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setIgnoreCarret(true);
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setIgnoreCaret(true);
lastTraitIndex = GraphTextWriter.TRAIT_UNKNOWN;
try {
classIndex = -1;
@@ -729,7 +729,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
setNoTrait();
} finally {
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setIgnoreCarret(false);
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.setIgnoreCaret(false);
}
}
@@ -779,12 +779,12 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
if (tm != null) {
int pos = 0;
if (tm.len > 1) {
ignoreCarret = true;
ignoreCaret = true;
int startPos = tm.startPos + tm.len - 1;
if (startPos <= getDocument().getLength()) {
setCaretPosition(startPos);
}
ignoreCarret = false;
ignoreCaret = false;
}
pos = tm.startPos;
@@ -838,12 +838,12 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
int pos = 0;
if (th != null) {
if (th.len > 1) {
ignoreCarret = true;
ignoreCaret = true;
int startPos = th.startPos + th.len - 1;
if (startPos <= getDocument().getLength()) {
setCaretPosition(startPos);
}
ignoreCarret = false;
ignoreCaret = false;
}
pos = th.startPos;
} else if (tc != null) {

View File

@@ -101,8 +101,8 @@ public class MethodCodePanel extends JPanel {
return sourceTextArea.getName();
}
public void setIgnoreCarret(boolean ignoreCarret) {
sourceTextArea.setIgnoreCarret(ignoreCarret);
public void setIgnoreCaret(boolean ignoreCaret) {
sourceTextArea.setIgnoreCaret(ignoreCaret);
}
public void hilighOffset(long offset) {

View File

@@ -160,7 +160,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
public JLabel decLabel = new HeaderLabel(AppStrings.translate("panel.decompiled"));
private boolean ignoreCarret = false;
private boolean ignoreCaret = false;
private boolean editMode = false;
@@ -337,7 +337,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
private void setDecompiledText(final String scriptName, final String breakPointScriptName, final String text) {
View.checkAccess();
ignoreCarret = true;
ignoreCaret = true;
decompiledEditor.setScriptName(scriptName, breakPointScriptName);
decompiledEditor.setText(text);
BrokenScriptDetector det = new BrokenScriptDetector();
@@ -347,17 +347,17 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
brokenHintPanel.setVisible(false);
}
ignoreCarret = false;
ignoreCaret = false;
}
private void setEditorText(final String scriptName, final String breakPointScriptName, final String text, final String contentType) {
View.checkAccess();
ignoreCarret = true;
ignoreCaret = true;
editor.setScriptName("#PCODE " + scriptName, "#PCODE " + breakPointScriptName);
editor.changeContentType(contentType);
editor.setText(text);
ignoreCarret = false;
ignoreCaret = false;
}
private void setText(final HighlightedText text, final String contentType, final String scriptName, final String breakPointScriptName) {
@@ -999,7 +999,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
editor.addCaretListener(new CaretListener() {
@Override
public void caretUpdate(CaretEvent e) {
if (ignoreCarret) {
if (ignoreCaret) {
return;
}
if (editMode || editDecompiledMode) {
@@ -1017,12 +1017,12 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
Long ofs = lastH == null ? 0 : lastH.getProperties().offset;
Highlighting h2 = Highlighting.searchOffset(lastDecompiled.getInstructionHighlights(), ofs);
if (h2 != null) {
ignoreCarret = true;
ignoreCaret = true;
if (h2.startPos <= decompiledEditor.getDocument().getLength()) {
decompiledEditor.setCaretPosition(h2.startPos);
}
decompiledEditor.getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
}
}
@@ -1031,7 +1031,7 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
decompiledEditor.addCaretListener(new CaretListener() {
@Override
public void caretUpdate(CaretEvent e) {
if (ignoreCarret) {
if (ignoreCaret) {
return;
}
if (editMode || editDecompiledMode) {
@@ -1043,12 +1043,12 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
if (h != null) {
Highlighting h2 = Highlighting.searchOffset(disassembledText.getInstructionHighlights(), h.getProperties().offset);
if (h2 != null) {
ignoreCarret = true;
ignoreCaret = true;
if (h2.startPos > 0 && h2.startPos < editor.getText().length()) {
editor.setCaretPosition(h2.startPos);
}
editor.getCaret().setVisible(true);
ignoreCarret = false;
ignoreCaret = false;
}
}
}