@Override public int hangingIndentSize() { return CodeStylePreferences.get((Document) null).getPreferences().getInt("continuationIndentSize", 4); }
public static CodeStyle get(Document doc) { return new CodeStyle(CodeStylePreferences.get(doc).getPreferences()); }
/** * Gets <code>CodeStyle</code> for the given file. If you have a document * instance you should use the {@link #getDefault(javax.swing.text.Document)} * method. * * @param file The file to get the <code>CodeStyle</code> for. * @return The current code style that would be used by a document if the * <code>file</code> were opened in the editor. * * @since 0.39 */ public synchronized static CodeStyle getDefault(FileObject file) { Preferences prefs = CodeStylePreferences.get(file, JavacParser.MIME_TYPE).getPreferences(); return FmtOptions.codeStyleProducer.create(prefs); }
public static CodeStyle get(Document doc) { return new CodeStyle(CodeStylePreferences.get(doc).getPreferences()); }
/** * Gets <code>CodeStyle</code> for the given document. This is the preferred * method of getting <code>CodeStyle</code>. If you don't have a document * you can use {@link #getDefault(org.openide.filesystems.FileObject)} method instead. * * @param doc The document to get the <code>CodeStyle</code> for. * @return The current code style used by a document. This is the code style that * will be used when formatting the document or generating new code. * * @since 0.39 */ public synchronized static CodeStyle getDefault(Document doc) { Preferences prefs = CodeStylePreferences.get(doc, JavacParser.MIME_TYPE).getPreferences(); return FmtOptions.codeStyleProducer.create(prefs); }
public static FortranCodeStyle get(Document doc) { return new FortranCodeStyle(CodeStylePreferences.get(doc).getPreferences(), CndLexerUtilities.detectFortranFormat(doc)); }
Preferences preferences = CodeStylePreferences.get(document).getPreferences();