From a23acf3d6e096522c5c65edd87f18b9a350e7b3d Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Fri, 6 Jan 2012 14:11:44 -0800 Subject: [PATCH] Cosmetics. --- .../SaveActionsPreferencePage.java | 13 +++++------ .../SmartTypingPreferencePage.java | 22 ++++--------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SaveActionsPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SaveActionsPreferencePage.java index 3bb657f1709..c26dde76c76 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SaveActionsPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SaveActionsPreferencePage.java @@ -51,9 +51,6 @@ public class SaveActionsPreferencePage extends AbstractPreferencePage { return keys; } - /* - * @see PreferencePage#createControl(Composite) - */ @Override public void createControl(Composite parent) { super.createControl(parent); @@ -61,14 +58,17 @@ public class SaveActionsPreferencePage extends AbstractPreferencePage { ICHelpContextIds.SAVE_ACTIONS_PREFERENCE_PAGE); } - // sets enabled flag for a control and all its sub-tree + /** + * Sets enabled flag for a control and all its sub-tree. + */ protected static void setEnabled(Control control, boolean enable) { control.setEnabled(enable); if (control instanceof Composite) { Composite composite = (Composite) control; Control[] children = composite.getChildren(); - for (Control element : children) + for (Control element : children) { setEnabled(element, enable); + } } } @@ -96,9 +96,6 @@ public class SaveActionsPreferencePage extends AbstractPreferencePage { return composite; } - /* - * @see PreferencePage#createContents(Composite) - */ @Override protected Control createContents(Composite parent) { fOverlayStore.load(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingPreferencePage.java index ad3547c9d59..7cd63a3e92c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/SmartTypingPreferencePage.java @@ -6,57 +6,43 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporatio - initial API and implementation - * Sergey Prigogin, Google + * IBM Corporation - initial API and implementation + * Sergey Prigogin (Google) *******************************************************************************/ - package org.eclipse.cdt.internal.ui.preferences; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; -import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.internal.ui.ICHelpContextIds; + /** * The page for setting the editor options. */ public final class SmartTypingPreferencePage extends AbstractConfigurationBlockPreferencePage { - - /* - * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#getHelpId() - */ @Override protected String getHelpId() { return ICHelpContextIds.C_EDITOR_TYPING_PAGE; } - /* - * @see org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setDescription() - */ @Override protected void setDescription() { String description= PreferencesMessages.CEditorPreferencePage_typing_tabTitle; setDescription(description); } - /* - * @see org.org.eclipse.ui.internal.editors.text.AbstractConfigurationBlockPreferencePage#setPreferenceStore() - */ @Override protected void setPreferenceStore() { setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore()); } - @Override protected Label createDescriptionLabel(Composite parent) { return null; // no description for new look. } - /* - * @see org.eclipse.ui.internal.editors.text.AbstractConfigureationBlockPreferencePage#createConfigurationBlock(org.eclipse.ui.internal.editors.text.OverlayPreferenceStore) - */ @Override protected IPreferenceConfigurationBlock createConfigurationBlock(OverlayPreferenceStore overlayPreferenceStore) { return new SmartTypingConfigurationBlock(overlayPreferenceStore);