public AppearancePreferencePage() {
    setPreferenceStore(JavaScriptPlugin.getDefault().getPreferenceStore());
    setDescription(PreferencesMessages.AppearancePreferencePage_description);

    IDialogFieldListener listener =
        new IDialogFieldListener() {
          public void dialogFieldChanged(DialogField field) {
            doDialogFieldChanged(field);
          }
        };

    fShowMethodReturnType = new SelectionButtonDialogField(SWT.CHECK);
    fShowMethodReturnType.setDialogFieldListener(listener);
    //
    //	fShowMethodReturnType.setLabelText(PreferencesMessages.AppearancePreferencePage_methodreturntype_label);
    fShowMethodReturnType.setLabelText(
        PreferencesMessages.AppearancePreferencePage_inferredmethodreturntype_label);

    //		fShowMethodTypeParameters= new SelectionButtonDialogField(SWT.CHECK);
    //		fShowMethodTypeParameters.setDialogFieldListener(listener);
    //
    //	fShowMethodTypeParameters.setLabelText(PreferencesMessages.AppearancePreferencePage_methodtypeparams_label);

    fShowCategory = new SelectionButtonDialogField(SWT.CHECK);
    fShowCategory.setDialogFieldListener(listener);
    fShowCategory.setLabelText(PreferencesMessages.AppearancePreferencePage_showCategory_label);

    fShowMembersInPackageView = new SelectionButtonDialogField(SWT.CHECK);
    fShowMembersInPackageView.setDialogFieldListener(listener);
    fShowMembersInPackageView.setLabelText(
        PreferencesMessages.AppearancePreferencePage_showMembersInPackagesView);

    //		fStackBrowsingViewsVertically= new SelectionButtonDialogField(SWT.CHECK);
    //		fStackBrowsingViewsVertically.setDialogFieldListener(listener);
    //
    //	fStackBrowsingViewsVertically.setLabelText(PreferencesMessages.AppearancePreferencePage_stackViewsVerticallyInTheJavaBrowsingPerspective);

    fFoldPackagesInPackageExplorer = new SelectionButtonDialogField(SWT.CHECK);
    fFoldPackagesInPackageExplorer.setDialogFieldListener(listener);
    //
    //	fFoldPackagesInPackageExplorer.setLabelText(PreferencesMessages.AppearancePreferencePage_foldEmptyPackages);
    fFoldPackagesInPackageExplorer.setLabelText(
        PreferencesMessages.AppearancePreferencePage_foldEmptySourceFolders);

    //		fCompressPackageNames= new SelectionButtonDialogField(SWT.CHECK);
    //		fCompressPackageNames.setDialogFieldListener(listener);
    //
    //	fCompressPackageNames.setLabelText(PreferencesMessages.AppearancePreferencePage_pkgNamePatternEnable_label);

    //		fPackageNamePattern= new StringDialogField();
    //		fPackageNamePattern.setDialogFieldListener(listener);
    //
    //	fPackageNamePattern.setLabelText(PreferencesMessages.AppearancePreferencePage_pkgNamePattern_label);

    fShowColoredLabels = new SelectionButtonDialogField(SWT.CHECK);
    fShowColoredLabels.setDialogFieldListener(listener);
    fShowColoredLabels.setLabelText(
        PreferencesMessages.AppearancePreferencePage_coloredlabels_label);
  }
  public ImportOrganizeConfigurationBlock(
      IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) {
    super(context, project, getAllKeys(), container);

    String[] buttonLabels =
        new String[] {
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_add_button,
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_add_static_button,
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_edit_button,
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_remove_button,
          /* 4 */ null,
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_up_button,
          PreferencesMessages.ImportOrganizeConfigurationBlock_order_down_button,
        };

    ImportOrganizeAdapter adapter = new ImportOrganizeAdapter();

    fOrderListField = new ListDialogField(adapter, buttonLabels, new ImportOrganizeLabelProvider());
    fOrderListField.setDialogFieldListener(adapter);
    fOrderListField.setLabelText(PreferencesMessages.ImportOrganizeConfigurationBlock_order_label);
    fOrderListField.setUpButtonIndex(IDX_UP);
    fOrderListField.setDownButtonIndex(IDX_DOWN);
    fOrderListField.setRemoveButtonIndex(IDX_REMOVE);

    fOrderListField.enableButton(IDX_EDIT, false);

    fImportButton = new SelectionButtonDialogField(SWT.PUSH);
    fImportButton.setDialogFieldListener(adapter);
    fImportButton.setLabelText(
        PreferencesMessages.ImportOrganizeConfigurationBlock_order_load_button);

    fExportButton = new SelectionButtonDialogField(SWT.PUSH);
    fExportButton.setDialogFieldListener(adapter);
    fExportButton.setLabelText(
        PreferencesMessages.ImportOrganizeConfigurationBlock_order_save_button);

    fThresholdField = new StringDialogField();
    fThresholdField.setDialogFieldListener(adapter);
    fThresholdField.setLabelText(
        PreferencesMessages.ImportOrganizeConfigurationBlock_threshold_label);

    fStaticThresholdField = new StringDialogField();
    fStaticThresholdField.setDialogFieldListener(adapter);
    fStaticThresholdField.setLabelText(
        PreferencesMessages.ImportOrganizeConfigurationBlock_staticthreshold_label);

    fIgnoreLowerCaseTypesField = new SelectionButtonDialogField(SWT.CHECK);
    fIgnoreLowerCaseTypesField.setDialogFieldListener(adapter);
    fIgnoreLowerCaseTypesField.setLabelText(
        PreferencesMessages.ImportOrganizeConfigurationBlock_ignoreLowerCase_label);

    updateControls();
  }