Saving files before refreshing line endings

This commit is contained in:
honfika@gmail.com
2016-09-06 09:38:28 +02:00
parent 6b20921800
commit 6c8233492b
6 changed files with 2702 additions and 2643 deletions

View File

@@ -3298,10 +3298,10 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
setSourceWorker = null;
}
if (!Main.isInited() || !Main.isWorking() || Main.isDebugging()) {
ABCPanel abcPanel = getABCPanel();
CancellableWorker worker = new CancellableWorker() {
@Override
protected Void doInBackground() throws Exception {
ABCPanel abcPanel = getABCPanel();
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.clear();
abcPanel.setAbc(scriptLeaf.abc);
abcPanel.decompiledTextArea.setScript(scriptLeaf, true);
@@ -3321,7 +3321,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
try {
get();
} catch (CancellationException ex) {
getABCPanel().decompiledTextArea.setText("// " + AppStrings.translate("work.canceled"));
abcPanel.decompiledTextArea.setText("// " + AppStrings.translate("work.canceled"));
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error", ex);
getABCPanel().decompiledTextArea.setText("// " + AppStrings.translate("decompilationError") + ": " + ex);