Package org.eclipse.php.formatter.ui.preferences.ProfileManager

Examples of org.eclipse.php.formatter.ui.preferences.ProfileManager.Profile


      final Element rootElement = document.createElement(XML_NODE_ROOT);

      document.appendChild(rootElement);

      for (final Iterator iter = profiles.iterator(); iter.hasNext();) {
        final Profile profile = (Profile) iter.next();
        if (profile.isProfileToSave()) {
          final Element profileElement = createProfileElement(
              profile, document);
          rootElement.appendChild(profileElement);
        }
      }
View Full Code Here


  @Override
  public boolean performOk() {
    if (this.fComposite.isEnabled()) {
      final int index = fProfileCombo.getSelectionIndex();
      Profile selectedProfile = fProfileManager.getSortedProfiles().get(
          index);
      fProfileManager.setSelected(selectedProfile);
    }
    return super.performOk();
  }
View Full Code Here

      updateSelection();
    }

    public void widgetSelected(SelectionEvent e) {
      final int index = fProfileCombo.getSelectionIndex();
      Profile selectedProfile = fSortedProfiles.get(index);
      fProfileManager.setSelected(selectedProfile);
    }
View Full Code Here

      fLoadButton.addSelectionListener(this);
      update(fProfileManager, null);
    }

    public void update(Observable o, Object arg) {
      Profile selected = ((ProfileManager) o).getSelected();
      final boolean notBuiltIn = !selected.isBuiltInProfile();
      fEditButton
          .setText(notBuiltIn ? FormatterMessages.CodingStyleConfigurationBlock_edit_button_desc
              : FormatterMessages.CodingStyleConfigurationBlock_show_button_desc);
      fDeleteButton.setEnabled(notBuiltIn);
      fSaveButton.setEnabled(notBuiltIn);
View Full Code Here

          fProfileManager, true);
      modifyDialog.open();
    }

    private void saveButtonPressed() {
      Profile selected = fProfileManager.getSelected();

      final FileDialog dialog = new FileDialog(fComposite.getShell(),
          SWT.SAVE);
      dialog.setText(FormatterMessages.CodingStyleConfigurationBlock_save_profile_dialog_title);
      dialog.setFilterExtensions(new String[] { "*.xml" }); //$NON-NLS-1$
      // set default file name to profile name
      dialog.setFileName(selected.getName() + ".xml");

      final String lastPath = FormatterUIPlugin.getDefault()
          .getDialogSettings().get(DIALOGSTORE_LASTSAVEPATH);
      if (lastPath != null) {
        dialog.setFilterPath(lastPath);
View Full Code Here

TOP

Related Classes of org.eclipse.php.formatter.ui.preferences.ProfileManager.Profile

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.