correct marking error position

This commit is contained in:
Jindra Petřík
2014-10-28 21:15:07 +01:00
parent 181c77c7dd
commit d7bbfe265d
5 changed files with 88 additions and 37 deletions

View File

@@ -714,7 +714,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
String newText = lastDecompiled;
setDecompiledText(newText);
if (lastLine > -1) {
decompiledEditor.gotoLine(lastLine + prefLines + 1);
decompiledEditor.gotoLine(lastLine + prefLines + 1);
}
decompiledEditor.setEditable(false);
saveDecompiledButton.setVisible(false);
@@ -775,8 +775,9 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
editMode = false;
} catch (IOException ex) {
} catch (ActionParseException ex) {
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
editor.gotoLine((int) ex.line);
editor.markError();
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", "" + ex.line), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
}
break;
case ACTION_EDIT_DECOMPILED: