/* * (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performOk() */ public boolean performOk() { if (fConfigurationBlock != null) { if (!fConfigurationBlock.performOk()) { return false; } PHPVersionProvider.getInstance() .notifyChange( (IProject) getElement().getAdapter(IProject.class), PHPVersion.byAlias(fConfigurationBlock.getPHPVersionValue())); } return super.performOk(); }
/* * (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @Override protected void performDefaults() { super.performDefaults(); if (fConfigurationBlock != null) { fConfigurationBlock.performDefaults(); } }
/* * (non-Javadoc) * @see com.aptana.editor.php.ui.preferences.PropertyAndPreferencePage#enableProjectSpecificSettings(boolean) */ @Override protected void enableProjectSpecificSettings(boolean useProjectSpecificSettings) { if (fConfigurationBlock != null) { fConfigurationBlock.useProjectSpecificSettings(useProjectSpecificSettings); } super.enableProjectSpecificSettings(useProjectSpecificSettings); }
public void widgetDefaultSelected(SelectionEvent e) { String prefID = PHPInterpreterPreferencePage.PREF_ID; Map data = null; PreferencesUtil.createPreferenceDialogOn(getShell(), prefID, new String[] {prefID}, data) .open(); if (!fCustomValues.isSelected()) { fConfigurationBlock.performRevert(); } }
public VersionGroup(Composite composite) { final int numColumns = 3; final Group group = new Group(composite, SWT.NONE); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setLayout(initGridLayout(new GridLayout(numColumns, false), true)); group.setText(PHPUIMessages.VersionGroup_OptionBlock_Title); // $NON-NLS-1$ fDefaultValues = new SelectionButtonDialogField(SWT.RADIO); fDefaultValues.setDialogFieldListener(this); fDefaultValues.setLabelText( PHPUIMessages.VersionGroup_OptionBlock_fDefaultValues); // $NON-NLS-1$ fCustomValues = new SelectionButtonDialogField(SWT.RADIO); fCustomValues.setDialogFieldListener(this); fCustomValues.setLabelText( PHPUIMessages.VersionGroup_OptionBlock_fCustomValues); // $NON-NLS-1$ fDefaultValues.setSelection(true); fCustomValues.setSelection(false); fDefaultValues.doFillIntoGrid(group, numColumns); fCustomValues.doFillIntoGrid(group, 2); fConfigurationBlock = createConfigurationBlock( new IStatusChangeListener() { public void statusChanged(IStatus status) {} }, (IProject) null, null); fConfigurationBlock.createContents(group); fConfigurationBlock.setEnabled(false); // fPreferenceLink = new Link(fGroup, SWT.NONE); // fPreferenceLink.setText(PHPUIMessages.getString("ToggleLinkingAction_link_description")); // //fPreferenceLink.setLayoutData(new GridData(GridData.END, // GridData.END, false, false)); // fPreferenceLink.setLayoutData(new GridData(SWT.END, // SWT.BEGINNING, true, false)); // fPreferenceLink.addSelectionListener(this); // fPreferenceLink.setEnabled(true); }
@Override protected Control createPreferenceContent(Composite composite) { return fConfigurationBlock.createContents(composite); }
/* * (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performApply() */ @Override public void performApply() { if (fConfigurationBlock != null) { fConfigurationBlock.performApply(); } }
@Override protected boolean hasProjectSpecificOptions(IProject project) { return fConfigurationBlock.hasProjectSpecificOptions(project); }