protected void setDefaultsOptions(boolean isFreeFormat) { BaseDocument bd = getDocument(); FortranCodeStyle codeStyle = FortranCodeStyle.get(bd); codeStyle.setAutoFormatDetection(false); codeStyle.setFreeFormatFortran(isFreeFormat); codeStyle.setupLexerAttributes(bd); }
/** Perform reformatting of the whole document's text. */ protected void reformat() { FortranReformatter f = new FortranReformatter(getDocument(), FortranCodeStyle.get(getDocument())); try { f.reformat(); } catch (BadLocationException e) { e.printStackTrace(getLog()); fail(e.getMessage()); } }