Clover coverage report - net.sourceforge.astyleclipse Coverage Report
Coverage timestamp: 星期六 九月 23 2006 23:19:47 CST
file stats: LOC: 62   Methods: 3
NCLOC: 27   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AstylePreferencePage.java - 0% 0% 0%
coverage
 1    package net.sourceforge.astyleclipse.preferences;
 2   
 3    import org.eclipse.jface.preference.*;
 4    import org.eclipse.ui.IWorkbenchPreferencePage;
 5    import org.eclipse.ui.IWorkbench;
 6    import net.sourceforge.astyleclipse.Activator;
 7   
 8    /**
 9    * This class represents a preference page that
 10    * is contributed to the Preferences dialog. By
 11    * subclassing <samp>FieldEditorPreferencePage</samp>, we
 12    * can use the field support built into JFace that allows
 13    * us to create a page that is small and knows how to
 14    * save, restore and apply itself.
 15    * <p>
 16    * This page is used to modify preferences only. They
 17    * are stored in the preference store that belongs to
 18    * the main plug-in class. That way, preferences can
 19    * be accessed directly via the preference store.
 20    */
 21   
 22    public class AstylePreferencePage
 23    extends FieldEditorPreferencePage
 24    implements IWorkbenchPreferencePage {
 25   
 26  0 public AstylePreferencePage() {
 27  0 super(GRID);
 28  0 setPreferenceStore(Activator.getDefault().getPreferenceStore());
 29  0 setDescription("Setting for code formatting (engine is astyle 1.14.1 )");
 30    }
 31   
 32    /**
 33    * Creates the field editors. Field editors are abstractions of
 34    * the common GUI blocks needed to manipulate various types
 35    * of preferences. Each field editor knows how to save and
 36    * restore itself.
 37    */
 38  0 public void createFieldEditors() {
 39   
 40  0 addField(new RadioGroupFieldEditor(
 41    PreferenceConstants.STYLE_CHOICE,
 42    "-style",
 43    1,
 44    new String[][] {
 45    { "&ansi : ANSI style ", "ansi" },
 46    { "&gnu : GNU style", "gnu" },
 47    // FIXME, how to use & here Kernighan & Ritchie
 48    { "&kr : Kernighan,Ritchie style", "kr" },
 49    { "&linux : Linux style", "linux" },
 50    // { "&java : Java style", "java" },
 51    }, getFieldEditorParent()));
 52    // addField(
 53    // new StringFieldEditor(PreferenceConstants.OTHER_OPTIONS, "A &text preference:", getFieldEditorParent()));
 54    }
 55   
 56    /* (non-Javadoc)
 57    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
 58    */
 59  0 public void init(IWorkbench workbench) {
 60    }
 61   
 62    }