Fixed deprecation warnings on Locale constructor and editor viewToModel/modelToView

This commit is contained in:
Jindra Petřík
2023-11-05 21:11:10 +01:00
parent 8b3b740b44
commit 47a5d6f8dc
4 changed files with 152 additions and 30 deletions
@@ -274,7 +274,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
public int getMultinameUnderMouseCursor(Point pt, Reference<ABC> abcUsed) {
return getMultinameAtPos(viewToModel(pt), abcUsed);
return getMultinameAtPos(View.textComponentViewToModel(this, pt), abcUsed);
}
public int getMultinameUnderCaret(Reference<ABC> abcUsed) {
@@ -1039,7 +1039,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL
}
final Point point = new Point(e.getX(), e.getY());
final int pos = abcPanel.decompiledTextArea.viewToModel(point);
final int pos = View.textComponentViewToModel(abcPanel.decompiledTextArea,point);
final String identifier = abcPanel.getMainPanel().getActionPanel().getStringUnderPosition(pos, abcPanel.decompiledTextArea);
if (identifier != null && !identifier.isEmpty()) {