Package org.eclipse.php.ui.folding

Examples of org.eclipse.php.ui.folding.IPHPFoldingPreferenceBlock


  void updateListDependencies() {
    String id = fStore
        .getString(PreferenceConstants.EDITOR_FOLDING_PROVIDER);
    PHPFoldingStructureProviderDescriptor desc = (PHPFoldingStructureProviderDescriptor) fProviderDescriptors
        .get(id);
    IPHPFoldingPreferenceBlock prefs;

    if (desc == null) {
      // safety in case there is no such descriptor
      String message = PHPUIMessages.FoldingConfigurationBlock_error_not_exist;
      PHPUiPlugin.log(new Status(IStatus.WARNING, PHPUiPlugin
          .getPluginId(), IStatus.OK, message, null));
      prefs = new ErrorPreferences(message);
    } else {
      prefs = (IPHPFoldingPreferenceBlock) fProviderPreferences.get(id);
      if (prefs == null) {
        try {
          prefs = desc.createPreferences();
          fProviderPreferences.put(id, prefs);
        } catch (CoreException e) {
          PHPUiPlugin.log(e);
          prefs = new ErrorPreferences(e.getLocalizedMessage());
        }
      }
    }

    Control control = (Control) fProviderControls.get(id);
    if (control == null) {
      control = prefs.createControl(fGroup);
      if (control == null) {
        String message = PHPUIMessages.FoldingConfigurationBlock_info_no_preferences;
        control = new ErrorPreferences(message).createControl(fGroup);
      } else {
        fProviderControls.put(id, control);
      }
    }
    Dialog.applyDialogFont(control);
    fStackLayout.topControl = control;
    control.pack();
    fGroup.layout();
    fGroup.getParent().layout();

    prefs.initialize();
  }
View Full Code Here


  public void performOk() {
    fStore.propagate();
    for (Iterator it = fProviderPreferences.values().iterator(); it
        .hasNext();) {
      IPHPFoldingPreferenceBlock prefs = (IPHPFoldingPreferenceBlock) it
          .next();
      prefs.performOk();
    }
    // TODO - Might need a fix after the WST will support code folding
    // officially.
    boolean foldingEnabled = fStore
        .getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
View Full Code Here

  public void performDefaults() {
    restoreFromPreferences();
    for (Iterator it = fProviderPreferences.values().iterator(); it
        .hasNext();) {
      IPHPFoldingPreferenceBlock prefs = (IPHPFoldingPreferenceBlock) it
          .next();
      prefs.performDefaults();
    }
  }
View Full Code Here

  }

  public void dispose() {
    for (Iterator it = fProviderPreferences.values().iterator(); it
        .hasNext();) {
      IPHPFoldingPreferenceBlock prefs = (IPHPFoldingPreferenceBlock) it
          .next();
      prefs.dispose();
    }
  }
View Full Code Here

   * @throws CoreException
   *             if creation fails
   */
  public IPHPFoldingPreferenceBlock createPreferences() throws CoreException {
    if (fHasPreferences) {
      IPHPFoldingPreferenceBlock prefs = (IPHPFoldingPreferenceBlock) fElement
          .createExecutableExtension(PREFERENCES_CLASS);
      return prefs;
    } else {
      throw new IllegalStateException(
          PHPUIMessages.PHPFoldingStructureProviderDescriptor_0);
View Full Code Here

TOP

Related Classes of org.eclipse.php.ui.folding.IPHPFoldingPreferenceBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.