private void init() {
   String qualifier = HTMLCorePlugin.getDefault().getBundle().getSymbolicName();
   fTagCase =
       Platform.getPreferencesService()
           .getInt(qualifier, HTMLCorePreferenceNames.TAG_NAME_CASE, 0, null);
   fAttrCase =
       Platform.getPreferencesService()
           .getInt(qualifier, HTMLCorePreferenceNames.ATTR_NAME_CASE, 0, null);
 }
  public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
    Vector vector = new Vector();

    // prefix[0] is either '\t' or ' ' x tabWidth, depending on preference
    Preferences preferences = HTMLCorePlugin.getDefault().getPluginPreferences();
    int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
    String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
    boolean useSpaces = HTMLCorePreferenceNames.SPACE.equals(indentCharPref);

    for (int i = 0; i <= indentationWidth; i++) {
      StringBuffer prefix = new StringBuffer();
      boolean appendTab = false;

      if (useSpaces) {
        for (int j = 0; j + i < indentationWidth; j++) prefix.append(' ');

        if (i != 0) appendTab = true;
      } else {
        for (int j = 0; j < i; j++) prefix.append(' ');

        if (i != indentationWidth) appendTab = true;
      }

      if (appendTab) {
        prefix.append('\t');
        vector.add(prefix.toString());
        // remove the tab so that indentation - tab is also an indent
        // prefix
        prefix.deleteCharAt(prefix.length() - 1);
      }
      vector.add(prefix.toString());
    }

    vector.add(""); // $NON-NLS-1$

    return (String[]) vector.toArray(new String[vector.size()]);
  }
 private void doSavePreferenceStore() {
   HTMLUIPlugin.getDefault().savePluginPreferences(); // UI
   HTMLCorePlugin.getDefault().savePluginPreferences(); // model
 }
 protected Preferences getModelPreferences() {
   return HTMLCorePlugin.getDefault().getPluginPreferences();
 }
 protected void doSavePreferenceStore() {
   HTMLCorePlugin.getDefault().savePluginPreferences(); // model
 }