public void setDecompiledEditMode(boolean val) {
    if (val) {
      lastDecompiled = decompiledTextArea.getText();
    } else {
      decompiledTextArea.setText(lastDecompiled);
    }

    decompiledTextArea.setEditable(val);
    saveDecompiledButton.setVisible(val);
    saveDecompiledButton.setEnabled(false);
    editDecompiledButton.setVisible(!val);
    experimentalLabel.setVisible(!val);
    cancelDecompiledButton.setVisible(val);
    decompiledTextArea.getCaret().setVisible(true);
    decLabel.setIcon(val ? View.getIcon("editing16") : null);
    detailPanel.setVisible(!val);

    decompiledTextArea.ignoreCarret = val;
    decompiledTextArea.requestFocusInWindow();
  }
 @Override
 public boolean isEditing() {
   return detailPanel.isEditing() || isModified();
 }