|
From: Christopher W. <caw...@us...> - 2006-02-18 16:53:54
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28822/src/org/rubypeople/rdt/ui Modified Files: PreferenceConstants.java Log Message: overhaul our completion proposal/template code. Now we will apply formatting to templates when inserted! Plus we're closer to the way JDT does things. We still can't use the actual code formatter on the templates (because our old one does a massive replace edit which messes up variables like the cursor placement). The end result is that users should create templates with somewhat proper formatting initially. Index: PreferenceConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PreferenceConstants.java 10 Feb 2006 20:14:52 -0000 1.11 --- PreferenceConstants.java 18 Feb 2006 16:53:51 -0000 1.12 *************** *** 18,23 **** public static final String FORMAT_INDENTATION = "formatIndentation"; //$NON-NLS-1$ public static final String FORMAT_USE_TAB = "formatUseTab"; //$NON-NLS-1$ ! // TODO Finish implementing this option! ! public static final String TEMPLATES_USE_CODEFORMATTER = "templatesUSeCodeFormatter"; private final static String DEFAULT_RDOC_CMD = "rdoc"; //$NON-NLS-1$ --- 18,22 ---- public static final String FORMAT_INDENTATION = "formatIndentation"; //$NON-NLS-1$ public static final String FORMAT_USE_TAB = "formatUseTab"; //$NON-NLS-1$ ! public static final String TEMPLATES_USE_CODEFORMATTER = "templatesUseCodeFormatter"; //$NON-NLS-1$ private final static String DEFAULT_RDOC_CMD = "rdoc"; //$NON-NLS-1$ *************** *** 228,231 **** --- 227,234 ---- store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false); + // FIXME We can't enabling using code formatter yet, because it breaks on formatting templates (when inserting via content assist) + // FIXME Uncomment when we have an AST based formatter which spits out TextEdits (rather than one huge replace) + // store.setDefault(PreferenceConstants.TEMPLATES_USE_CODEFORMATTER, true); + store.setDefault(PreferenceConstants.FORMATTER_PROFILE, ProfileManager.DEFAULT_PROFILE); |