diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences')
13 files changed, 429 insertions, 429 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/BooleanFieldEditor2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/BooleanFieldEditor2.java index 3e95df02c..db5d9c1de 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/BooleanFieldEditor2.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/BooleanFieldEditor2.java @@ -4,13 +4,13 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.debug.internal.ui.preferences; - + import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; @@ -20,7 +20,7 @@ import org.eclipse.swt.widgets.Composite; * button. */ public class BooleanFieldEditor2 extends BooleanFieldEditor { - + private Button fChangeControl; /** @@ -41,7 +41,7 @@ public class BooleanFieldEditor2 extends BooleanFieldEditor { public Button getChangeControl(Composite parent) { if (fChangeControl == null) { fChangeControl = super.getChangeControl(parent); - } + } return fChangeControl; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java index be18c62d0..9c67df184 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java @@ -35,18 +35,18 @@ import com.ibm.icu.text.MessageFormat; * A page to set the preferences for the console */ public class ConsolePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - + /** * This class exists to provide visibility to the * <code>refreshValidState</code> method and to perform more intelligent * clearing of the error message. */ - protected class ConsoleIntegerFieldEditor extends IntegerFieldEditor { - + protected class ConsoleIntegerFieldEditor extends IntegerFieldEditor { + public ConsoleIntegerFieldEditor(String name, String labelText, Composite parent) { super(name, labelText, parent); } - + /** * @see org.eclipse.jface.preference.FieldEditor#refreshValidState() */ @@ -54,7 +54,7 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements protected void refreshValidState() { super.refreshValidState(); } - + /** * Clears the error message from the message line if the error * message is the error message from this field editor. @@ -66,21 +66,21 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements } } } - + private BooleanFieldEditor2 fWrapEditor = null; private ConsoleIntegerFieldEditor fWidthEditor = null; - + private BooleanFieldEditor2 fUseBufferSize = null; private ConsoleIntegerFieldEditor fBufferSizeEditor = null; - + private ConsoleIntegerFieldEditor fTabSizeEditor = null; - + /** * Create the console page. */ public ConsolePreferencePage() { super(GRID); - setDescription(DebugPreferencesMessages.ConsolePreferencePage_Console_settings); + setDescription(DebugPreferencesMessages.ConsolePreferencePage_Console_settings); setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore()); } @@ -94,21 +94,21 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements getControl(), IDebugHelpContextIds.CONSOLE_PREFERENCE_PAGE ); } - + /** * Create all field editors for this page */ @Override public void createFieldEditors() { - - fWrapEditor = new BooleanFieldEditor2(IDebugPreferenceConstants.CONSOLE_WRAP, DebugPreferencesMessages.ConsolePreferencePage_Wrap_text_1, SWT.NONE, getFieldEditorParent()); + + fWrapEditor = new BooleanFieldEditor2(IDebugPreferenceConstants.CONSOLE_WRAP, DebugPreferencesMessages.ConsolePreferencePage_Wrap_text_1, SWT.NONE, getFieldEditorParent()); addField(fWrapEditor); - - fWidthEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_WIDTH, DebugPreferencesMessages.ConsolePreferencePage_Console_width, getFieldEditorParent()); + + fWidthEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_WIDTH, DebugPreferencesMessages.ConsolePreferencePage_Console_width, getFieldEditorParent()); addField(fWidthEditor); fWidthEditor.setValidRange(80, 1000); - fWidthEditor.setErrorMessage(DebugPreferencesMessages.ConsolePreferencePage_console_width); - + fWidthEditor.setErrorMessage(DebugPreferencesMessages.ConsolePreferencePage_console_width); + fWrapEditor.getChangeControl(getFieldEditorParent()).addSelectionListener( new SelectionAdapter() { @Override @@ -117,15 +117,15 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements } } ); - - fUseBufferSize = new BooleanFieldEditor2(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, DebugPreferencesMessages.ConsolePreferencePage_Limit_console_output_1, SWT.NONE, getFieldEditorParent()); + + fUseBufferSize = new BooleanFieldEditor2(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, DebugPreferencesMessages.ConsolePreferencePage_Limit_console_output_1, SWT.NONE, getFieldEditorParent()); addField(fUseBufferSize); - - fBufferSizeEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK, DebugPreferencesMessages.ConsolePreferencePage_Console_buffer_size__characters___2, getFieldEditorParent()); + + fBufferSizeEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK, DebugPreferencesMessages.ConsolePreferencePage_Console_buffer_size__characters___2, getFieldEditorParent()); addField(fBufferSizeEditor); fBufferSizeEditor.setValidRange(1000, Integer.MAX_VALUE - 100000); fBufferSizeEditor.setErrorMessage(MessageFormat.format(DebugPreferencesMessages.ConsolePreferencePage_The_console_buffer_size_must_be_at_least_1000_characters__1, Integer.valueOf(Integer.MAX_VALUE - 100000))); - + fUseBufferSize.getChangeControl(getFieldEditorParent()).addSelectionListener( new SelectionAdapter() { @Override @@ -134,33 +134,33 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements } } ); - - fTabSizeEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH, DebugPreferencesMessages.ConsolePreferencePage_12, getFieldEditorParent()); + + fTabSizeEditor = new ConsoleIntegerFieldEditor(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH, DebugPreferencesMessages.ConsolePreferencePage_12, getFieldEditorParent()); addField(fTabSizeEditor); fTabSizeEditor.setValidRange(1,100); - fTabSizeEditor.setErrorMessage(DebugPreferencesMessages.ConsolePreferencePage_13); - - addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_output_3, SWT.NONE, getFieldEditorParent())); - addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_error_3, SWT.NONE, getFieldEditorParent())); + fTabSizeEditor.setErrorMessage(DebugPreferencesMessages.ConsolePreferencePage_13); - ColorFieldEditor sysout= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_SYS_OUT_COLOR, DebugPreferencesMessages.ConsolePreferencePage_Standard_Out__2, getFieldEditorParent()); - ColorFieldEditor syserr= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_SYS_ERR_COLOR, DebugPreferencesMessages.ConsolePreferencePage_Standard_Error__3, getFieldEditorParent()); + addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_output_3, SWT.NONE, getFieldEditorParent())); + addField(new BooleanFieldEditor(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, DebugPreferencesMessages.ConsolePreferencePage_Show__Console_View_when_there_is_program_error_3, SWT.NONE, getFieldEditorParent())); + + ColorFieldEditor sysout= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_SYS_OUT_COLOR, DebugPreferencesMessages.ConsolePreferencePage_Standard_Out__2, getFieldEditorParent()); + ColorFieldEditor syserr= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_SYS_ERR_COLOR, DebugPreferencesMessages.ConsolePreferencePage_Standard_Error__3, getFieldEditorParent()); ColorFieldEditor sysin= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_SYS_IN_COLOR, DebugPreferencesMessages.ConsolePreferencePage_Standard_In__4, getFieldEditorParent()); ColorFieldEditor background= new ColorFieldEditor(IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR, DebugPreferencesMessages.ConsolePreferencePage_11, getFieldEditorParent()); - + addField(sysout); addField(syserr); addField(sysin); addField(background); } - + /** * @see IWorkbenchPreferencePage#init(IWorkbench) */ @Override public void init(IWorkbench workbench) { } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.IPreferencePage#performOk() */ @@ -184,14 +184,14 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements updateWidthEditor(); updateBufferSizeEditor(); } - + /** * Update enablement of width editor based on enablement of 'fixed width' editor. */ protected void updateWidthEditor() { Button b = fWrapEditor.getChangeControl(getFieldEditorParent()); fWidthEditor.getTextControl(getFieldEditorParent()).setEnabled(b.getSelection()); - fWidthEditor.getLabelControl(getFieldEditorParent()).setEnabled(b.getSelection()); + fWidthEditor.getLabelControl(getFieldEditorParent()).setEnabled(b.getSelection()); } /** @@ -203,7 +203,7 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements fBufferSizeEditor.getTextControl(getFieldEditorParent()).setEnabled(b.getSelection()); fBufferSizeEditor.getLabelControl(getFieldEditorParent()).setEnabled(b.getSelection()); } - + /** * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @@ -213,14 +213,14 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements updateWidthEditor(); updateBufferSizeEditor(); } - + protected boolean canClearErrorMessage() { if (fWidthEditor.isValid() && fBufferSizeEditor.isValid()) { return true; } return false; } - + /** * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ @@ -234,7 +234,7 @@ public class ConsolePreferencePage extends FieldEditorPreferencePage implements if (newValue) { if (fWidthEditor != null && event.getSource() != fWidthEditor) { fWidthEditor.refreshValidState(); - } + } if (fBufferSizeEditor != null && event.getSource() != fBufferSizeEditor) { fBufferSizeEditor.refreshValidState(); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java index a4289d414..7e09d68e5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -29,13 +29,13 @@ import org.eclipse.ui.PlatformUI; * The page for setting debugger preferences. Built on the 'field editor' infrastructure. */ public class DebugPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IDebugPreferenceConstants { - + public DebugPreferencePage() { super(GRID); IPreferenceStore store= DebugUIPlugin.getDefault().getPreferenceStore(); setPreferenceStore(store); - setDescription(DebugPreferencesMessages.DebugPreferencePage_1); + setDescription(DebugPreferencesMessages.DebugPreferencePage_1); } /* (non-Javadoc) @@ -46,35 +46,35 @@ public class DebugPreferencePage extends FieldEditorPreferencePage implements IW super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IDebugHelpContextIds.DEBUG_PREFERENCE_PAGE); } - + /** * @see FieldEditorPreferencePage#createFieldEditors */ @Override protected void createFieldEditors() { - addField(new BooleanFieldEditor(IDebugUIConstants.PREF_REUSE_EDITOR, DebugPreferencesMessages.DebugPreferencePage_2, SWT.NONE, getFieldEditorParent())); - + addField(new BooleanFieldEditor(IDebugUIConstants.PREF_REUSE_EDITOR, DebugPreferencesMessages.DebugPreferencePage_2, SWT.NONE, getFieldEditorParent())); + SWTFactory.createHorizontalSpacer(getFieldEditorParent(), 2); - - addField(new BooleanFieldEditor(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH, DebugPreferencesMessages.DebugPreferencePage_3, SWT.NONE, getFieldEditorParent())); - addField(new BooleanFieldEditor(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, DebugPreferencesMessages.DebugPreferencePage_26, SWT.NONE, getFieldEditorParent())); + + addField(new BooleanFieldEditor(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH, DebugPreferencesMessages.DebugPreferencePage_3, SWT.NONE, getFieldEditorParent())); + addField(new BooleanFieldEditor(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, DebugPreferencesMessages.DebugPreferencePage_26, SWT.NONE, getFieldEditorParent())); SWTFactory.createHorizontalSpacer(getFieldEditorParent(), 2); - + addField(new BooleanFieldEditor(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, DebugPreferencesMessages.DebugPreferencePage_25, SWT.NONE, getFieldEditorParent())); addField(new BooleanFieldEditor(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS, DebugPreferencesMessages.DebugPreferencePage_29, SWT.NONE, getFieldEditorParent())); addField(new BooleanFieldEditor(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER, DebugPreferencesMessages.DebugPreferencePage_30, SWT.NONE, getFieldEditorParent())); addField(new BooleanFieldEditor(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_EXPRESSIONS, DebugPreferencesMessages.DebugPreferencePage_5, SWT.NONE, getFieldEditorParent())); addField(new BooleanFieldEditor(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_TRIGGER_BREAKPOINTS, DebugPreferencesMessages.DebugPreferencePage_31, SWT.NONE, getFieldEditorParent())); - + SWTFactory.createHorizontalSpacer(getFieldEditorParent(), 2); - ColorFieldEditor mem= new ColorFieldEditor(IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR, DebugPreferencesMessages.DebugPreferencePage_4, getFieldEditorParent()); + ColorFieldEditor mem= new ColorFieldEditor(IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR, DebugPreferencesMessages.DebugPreferencePage_4, getFieldEditorParent()); addField(mem); mem = new ColorFieldEditor(IDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND, DebugPreferencesMessages.DebugPreferencePage_28, getFieldEditorParent()); addField(mem); - mem= new ColorFieldEditor(IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR, DebugPreferencesMessages.DebugPreferencePage_0, getFieldEditorParent()); + mem= new ColorFieldEditor(IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR, DebugPreferencesMessages.DebugPreferencePage_0, getFieldEditorParent()); addField(mem); - mem= new ColorFieldEditor(IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR, DebugPreferencesMessages.DebugPreferencePage_27, getFieldEditorParent()); + mem= new ColorFieldEditor(IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR, DebugPreferencesMessages.DebugPreferencePage_27, getFieldEditorParent()); addField(mem); } @@ -83,5 +83,5 @@ public class DebugPreferencePage extends FieldEditorPreferencePage implements IW */ @Override public void init(IWorkbench workbench) {} - + } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java index 97e7cacec..80e32a20b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM - Initial API and implementation *******************************************************************************/ @@ -122,16 +122,16 @@ public class DebugPreferencesMessages extends NLS { public static String LaunchPerspectivePreferencePage_0; public static String LaunchPerspectivePreferencePage_1; - + public static String PerspectivePreferencePage_0; public static String PerspectivePreferencePage_1; public static String PerspectivePreferencePage_2; public static String PerspectivePreferencePage_4; public static String PerspectivePreferencePage_5; - + public static String LaunchConfigurationsPreferencePage_1; public static String LaunchConfigurationsPreferencePage_0; - + public static String ProcessPropertyPage_Command_Line__1; public static String SimpleVariablePreferencePage_3; @@ -160,7 +160,7 @@ public class DebugPreferencesMessages extends NLS { public static String StringVariablePreferencePage_25; public static String StringVariablePreferencePage_26; public static String StringVariablePreferencePage_27; - + public static String ViewManagementPreferencePage_0; public static String ViewManagementPreferencePage_1; public static String ViewManagementPreferencePage_2; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java index c6061e58c..7188985c2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java @@ -15,12 +15,12 @@ package org.eclipse.debug.internal.ui.preferences; import org.eclipse.debug.ui.IDebugUIConstants; - + /** * Constants defining the keys to be used for accessing preferences * inside the debug ui plugin's preference bundle. * - * In descriptions (of the keys) below describe the preference + * In descriptions (of the keys) below describe the preference * stored at the given key. The type indicates type of the stored preferences * * The preference store is loaded by the plugin (DebugUIPlugin). @@ -36,57 +36,57 @@ public interface IDebugPreferenceConstants { public static final String CONSOLE_SYS_OUT_COLOR= "org.eclipse.debug.ui.outColor"; //$NON-NLS-1$ public static final String CONSOLE_SYS_IN_COLOR= "org.eclipse.debug.ui.inColor"; //$NON-NLS-1$ public static final String CONSOLE_BAKGROUND_COLOR= "org.eclipse.debug.ui.consoleBackground"; //$NON-NLS-1$ - + /** * @deprecated use IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR instead */ @Deprecated public static final String MEMORY_VIEW_UNBUFFERED_LINE_COLOR = IDebugUIConstants.PLUGIN_ID + ".MemoryViewLineColor"; //$NON-NLS-1$ - + /** * @deprecated use IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR instead */ @Deprecated public static final String MEMORY_VIEW_BUFFERED_LINE_COLOR = IDebugUIConstants.PLUGIN_ID + ".MemoryViewBufferedLineColor"; //$NON-NLS-1$ - + /** * (boolean) Whether or not the text in the console will wrap */ public static final String CONSOLE_WRAP= "Console.wrap"; //$NON-NLS-1$ - + /** - * (int) The maximum console character width, if wrapping. - */ + * (int) The maximum console character width, if wrapping. + */ public static final String CONSOLE_WIDTH = "Console.width"; //$NON-NLS-1$ - + /** - * (boolean) Whether or not the console view is shown + * (boolean) Whether or not the console view is shown * when there is program output. */ public static final String CONSOLE_OPEN_ON_OUT= "DEBUG.consoleOpenOnOut"; //$NON-NLS-1$ /** - * (boolean) Whether or not the console view is shown + * (boolean) Whether or not the console view is shown * when there is program error. */ public static final String CONSOLE_OPEN_ON_ERR= "DEBUG.consoleOpenOnErr"; //$NON-NLS-1$ - + /** * Console buffer high and low water marks */ public static final String CONSOLE_LIMIT_CONSOLE_OUTPUT = "Console.limitConsoleOutput"; //$NON-NLS-1$ - public static final String CONSOLE_LOW_WATER_MARK = "Console.lowWaterMark"; //$NON-NLS-1$ + public static final String CONSOLE_LOW_WATER_MARK = "Console.lowWaterMark"; //$NON-NLS-1$ public static final String CONSOLE_HIGH_WATER_MARK = "Console.highWaterMark"; //$NON-NLS-1$ - + /** * Integer preference specifying the number of spaces composing a * tab in the console. - * + * * @since 3.0 */ public static final String CONSOLE_TAB_WIDTH= "Console.console_tab_width"; //$NON-NLS-1$ - - - + + + /** * The orientation of the detail view in the VariablesView */ @@ -99,16 +99,16 @@ public interface IDebugPreferenceConstants { public static final String VARIABLES_DETAIL_PANE_UNDERNEATH = "Variables.detail.orientation.underneath"; //$NON-NLS-1$ public static final String VARIABLES_DETAIL_PANE_HIDDEN = "Variables.detail.orientation.hidden"; //$NON-NLS-1$ public static final String VARIABLES_DETAIL_PANE_AUTO = "Variables.detail.orientation.auto"; //$NON-NLS-1$ - + /** * Memento for the last selected launch config in the * launch config dialog. - * + * * @deprecated no longer supported */ @Deprecated public static final String PREF_LAST_LAUNCH_CONFIGURATION_SELECTION = IDebugUIConstants.PLUGIN_ID + ".lastLaunchConfigSelection"; //$NON-NLS-1$ - + /** * The maximum size of the launch history list */ @@ -122,36 +122,36 @@ public interface IDebugPreferenceConstants { * @since 2.1 */ public static final String PREF_DETAIL_PANE_WORD_WRAP = IDebugUIConstants.PLUGIN_ID + ".detail_pane_word_wrap"; //$NON-NLS-1$ - + /** * Column size preference for the Memory View - * + * * @since 3.0 */ public static final String PREF_COLUMN_SIZE = "org.eclipse.debug.ui.memory.columnSize"; //$NON-NLS-1$ - + /** * Default column size for the Memory View - * + * * @since 3.0 */ public static final int PREF_COLUMN_SIZE_DEFAULT = 4; - - + + /** * Row size preference for Memory View - * + * * @since 3.2 */ public static final String PREF_ROW_SIZE = "org.eclipse.debug.ui.memory.rowSize"; //$NON-NLS-1$ - + /** * Default row size for the Memory View - * + * * @since 3.2 */ public static final int PREF_ROW_SIZE_DEFAULT = 16; - + /** * Stores the boolean preference of whether to prompt when removing all breakpoints. * @since 3.3 @@ -161,64 +161,64 @@ public interface IDebugPreferenceConstants { /** * Stores the boolean preference of whether to prompt when removing all * breakpoints. - * + * * @since 3.11 */ public static final String PREF_PROMPT_REMOVE_ALL_TRIGGER_BREAKPOINTS = IDebugUIConstants.PLUGIN_ID + ".remove_all_trigger_breakpoints_prompt"; //$NON-NLS-1$ - + /** - * stores the boolean preference of whether or not to prompt when removing all of the breakpoints + * stores the boolean preference of whether or not to prompt when removing all of the breakpoints * from a breakpoints container. - * @since 3.3 + * @since 3.3 */ public static final String PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER = IDebugUIConstants.PLUGIN_ID + ".remove_breakpoints_from_container_prompt"; //$NON-NLS-1$ - + /** * Stores the boolean preference of whether to prompt when removing all expressions. * @since 3.5 */ public static final String PREF_PROMPT_REMOVE_ALL_EXPRESSIONS = IDebugUIConstants.PLUGIN_ID + ".remove_all_expressions_prompt"; //$NON-NLS-1$ - + /** * Default padded string for renderings - * + * * @since 3.1 */ public static final String PREF_PADDED_STR_DEFAULT = "??"; //$NON-NLS-1$ - + /** * Default ASCII code page if ASCII code page preference is not set. * @since 3.1 */ public static final String DEFAULT_ASCII_CP = "CP1252"; //$NON-NLS-1$ - - + + /** * Default EBCDIC code page if EBCDIC code page preference is not set. * @since 3.1 */ public static final String DEFAULT_EBCDIC_CP = "CP037"; //$NON-NLS-1$ - + /** * Preference to determine if table rendering should dynamically load * memory as the user scrolls - * + * * @since 3.1 */ public static final String PREF_DYNAMIC_LOAD_MEM = "org.eclpise.debug.ui.memory.dynamicLoad"; //$NON-NLS-1$ - - + + /** * Size of buffer in a table rendering when dynamic loading mode is off. - * + * * @since 3.1 */ public static final String PREF_TABLE_RENDERING_PAGE_SIZE = "org.eclispe.debug.ui.memory.pageSize"; //$NON-NLS-1$ - + /** * Default page size when dynamic loading mode is off. This preference is stored * in number of lines. - * + * * @since 3.1 */ public static final int DEFAULT_PAGE_SIZE = 20; @@ -227,89 +227,89 @@ public interface IDebugPreferenceConstants { * Possible values: * - RESET_AL - reset all renderings regardless if they are visible or not * - RESET_VISIBLE - reset visible renderings - * + * * @since 3.2 */ public static final String PREF_RESET_MEMORY_BLOCK = IDebugUIConstants.PLUGIN_ID + ".reset_memory_block"; //$NON-NLS-1$ - + /** * Constant to indicate that the memory view will reset all memory renderings when the reset * memory monitor action is invoked. - * + * * @since 3.2 */ public static final String RESET_ALL = IDebugUIConstants.PLUGIN_ID + "resetMemoryBlock.all"; //$NON-NLS-1$ - - + + /** * Constant to indicate that the memory view will reset visible memory renderings when * the reset memory monitor action is invoked - * + * * @since 3.2 */ public static final String RESET_VISIBLE = IDebugUIConstants.PLUGIN_ID + "resetMemoryBlock.visible"; //$NON-NLS-1$ - + /** * Preference identifier for the row size in a table rendering. - * This preference is expected to be saved by an </code>IPersistableDebugElement</code>. + * This preference is expected to be saved by an </code>IPersistableDebugElement</code>. * Memory Blocks can optionally provide and save this preference to customize * the initial format of a table rendering. - * + * * The value of this property is an Integer. The value can be one of the - * following values: 1, 2, 4, 8, 16. This value must be greater than + * following values: 1, 2, 4, 8, 16. This value must be greater than * <code>PREF_COL_SIZE_BY_MODEL</code> and must also be divisible by <code>PREF_COL_SIZE_BY_MODEL</code>. - * + * * @since 3.2 */ public static final String PREF_ROW_SIZE_BY_MODEL = "org.eclipse.debug.ui.AbstractTableRendering.rowSize"; //$NON-NLS-1$ /** * Preference identifier for the column size in a table rendering. - * This preference is expected to be saved by an <code>IPersistableDebugElement</code>. + * This preference is expected to be saved by an <code>IPersistableDebugElement</code>. * Memory Blocks can optionally provide and save this preference to customize * the initial format of a table rendering. - * + * * The value of this property is an Integer. The value can be one of the * following values: 1, 2, 4, 8, 16. This value must be smaller than * <code>PREF_ROW_SIZE_BY_MODEL</code>. <code>PREF_ROW_SIZE_BY_MODEL</code> must be divisible by <code>PREF_COL_SIZE_BY_MODEL</code>. - * + * * @since 3.2 */ public static final String PREF_COL_SIZE_BY_MODEL = "org.eclipse.debug.ui.AbstractTableRendering.colSize"; //$NON-NLS-1$ - + /** * Number of lines to preload before the visible region in the table rendering - * + * * @since 3.3 */ public static final String PREF_TABLE_RENDERING_PRE_BUFFER_SIZE = "org.eclispe.debug.ui.memory.preBufferSize"; //$NON-NLS-1$ - + /** * Number of lines to preload after the visible region in the table rendering - * + * * @since 3.3 */ public static final String PREF_TABLE_RENDERING_POST_BUFFER_SIZE = "org.eclispe.debug.ui.memory.postBufferSize"; //$NON-NLS-1$ /** * The layout mode in Debug view. - * + * * @since 3.5 */ public static final String DEBUG_VIEW_MODE = "org.eclispe.debug.ui.Debug_view.mode"; //$NON-NLS-1$ public static final String DEBUG_VIEW_MODE_AUTO = "Debug_view.mode.auto"; //$NON-NLS-1$ public static final String DEBUG_VIEW_MODE_COMPACT = "Debug_view.mode.compact"; //$NON-NLS-1$ public static final String DEBUG_VIEW_MODE_FULL = "Debug_view.mode.full"; //$NON-NLS-1$ - + /** - * Preference whether to auto-expand in the breadcrumb drop-down viewers. - * + * Preference whether to auto-expand in the breadcrumb drop-down viewers. + * * @since 3.5 */ public static final String DEBUG_VIEW_BREADCRUMB_AUTO_EXPAND_DROP_DOWN = "org.eclispe.debug.ui.Debug_view.Breadcrumb.dropDownAutoexpand"; //$NON-NLS-1$ - + /** * Perspectives in which the debug toolbar is hidden. - * + * * @since 3.8 */ public static final String DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES = "org.eclispe.debug.ui.Debug_view.debug_toolbar_hidden_perspectives"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java index 701022843..3cd8291c2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java @@ -64,9 +64,9 @@ import org.eclipse.ui.model.WorkbenchViewerComparator; /** * Provides the Launch Configuration preference page to the Run/Debug preferences - * + * * This page allows users to set filtering options as well as perform migration tasks. - * This class is not intended to be sub-classed + * This class is not intended to be sub-classed * @since 3.2 */ public class LaunchConfigurationsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { @@ -76,9 +76,9 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement * @since 3.2 */ class LaunchConfigurationMigrationSelectionDialog extends AbstractDebugCheckboxSelectionDialog { - + private Object fInput; - + public LaunchConfigurationMigrationSelectionDialog(Shell parentShell, Object input) { super(parentShell); fInput = input; @@ -116,15 +116,15 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement protected String getViewerLabel() { return DebugPreferencesMessages.LaunchingPreferencePage_0; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider() */ @Override protected IContentProvider getContentProvider() { - return new WorkbenchContentProvider(); + return new WorkbenchContentProvider(); } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider() */ @@ -133,7 +133,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement return DebugUITools.newDebugModelPresentation(); } } - + /** * Content provider for the launch configuration type table */ @@ -150,32 +150,32 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } - + /** * to monitor the progress of the migration process */ private ProgressMonitorPart fMonitor; - + /** * the migrate now button */ private Button fMigrateNow; - + /** * a list of the field editors */ private List<FieldEditor> fFieldEditors; - + /** * Boolean editor for debug core plug-in preference */ private Button fDeleteConfigs; - + /** * The table for the launch configuration types */ private Table fTable; - + /** * Constructor */ @@ -184,7 +184,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore()); setTitle(DebugPreferencesMessages.LaunchConfigurationsPreferencePage_1); } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite) */ @@ -211,10 +211,10 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement edit = new BooleanFieldEditor(IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS, DebugPreferencesMessages.LaunchConfigurationsPreferencePage_3, SWT.NONE, spacer); fFieldEditors.add(edit); fDeleteConfigs = SWTFactory.createCheckButton(comp, DebugPreferencesMessages.LaunchConfigurationsPreferencePage_2, null, false, 3); - + //add table options createTypeFiltering(group); - + //migration group = SWTFactory.createGroup(comp, DebugPreferencesMessages.LaunchingPreferencePage_35, 1, 1, GridData.FILL_HORIZONTAL); Label label = new Label(group, SWT.LEFT | SWT.WRAP); @@ -233,15 +233,15 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement @Override public void widgetSelected(SelectionEvent e) { handleMigrateNowSelected(); - } + } }); - + //init field editors initFieldEditors(); fTable.setEnabled(getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES)); return comp; } - + /** * @param parent the parent to add this composite to * @return the new composite with the type selection table in it @@ -265,7 +265,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement else { fTable.setEnabled(false); } - } + } }); fFieldEditors.add(editor); fTable = new Table(comp, SWT.CHECK | SWT.BORDER); @@ -282,7 +282,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement fTable.setFont(parent.getFont()); return comp; } - + /** * returns the launch configuration types * @return the launch configuration types @@ -290,7 +290,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement private ILaunchConfigurationType[] getLaunchConfigurationTypes() { return DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); } - + /** * handles the Migrate button being clicked * @@ -300,7 +300,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement try { ILaunchManager lmanager = DebugPlugin.getDefault().getLaunchManager(); ILaunchConfiguration[] configurations = lmanager.getMigrationCandidates(); - //separate the private from the public + //separate the private from the public List<ILaunchConfiguration> pub = new ArrayList<ILaunchConfiguration>(); for(int i = 0; i < configurations.length; i++) { if(DebugUITools.isPrivate(configurations[i])) { @@ -334,7 +334,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement } catch (CoreException e) {DebugUIPlugin.log(e);} } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ @@ -368,7 +368,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement } } } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @@ -383,9 +383,9 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement fTable.setEnabled(((BooleanFieldEditor2)editor).getBooleanValue()); } } - + } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performOk() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java index 4c6f21563..dc38f56b3 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java @@ -69,7 +69,7 @@ import org.eclipse.ui.model.WorkbenchViewerComparator; /** * The preference page for selecting and changing launch perspectives - * + * * @since 3.3 */ public class LaunchPerspectivePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IActivityManagerListener { @@ -82,14 +82,14 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I private ILaunchDelegate fDelegate = null; private Set<String> fModes = null; private String fPid = null; - + public PerspectiveChange(ILaunchConfigurationType type, ILaunchDelegate delegate, Set<String> modes, String perspectiveid) { fType = type; fDelegate = delegate; fModes = modes; fPid = perspectiveid; } - + public ILaunchConfigurationType getType() {return fType;} public ILaunchDelegate getDelegate() {return fDelegate;} public String getPerspectiveId() {return fPid;} @@ -113,7 +113,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I return (fDelegate != null ? fDelegate.hashCode() : 0) + fType.hashCode() + fModes.hashCode(); } } - + /** * Implementation to expose use of getFilteredChildren method */ @@ -124,7 +124,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I @Override public Object[] getFilteredChildren(Object o) {return super.getFilteredChildren(o);} } - + /** * Provides content for the configuration tree viewer */ @@ -146,29 +146,29 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I @Override public Object getParent(Object element) {return null;} } - + /** * Panel container that is reused to present series of combo boxes to users for perspective selections */ class PerspectivesPanel { - + private Composite fMainComposite = null; private Label fMessage = null; - + public PerspectivesPanel(Composite parent, String heading) { createPanel(parent, heading); } - + protected void createPanel(Composite parent, String heading) { fMainComposite = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH); SWTFactory.createWrapLabel(fMainComposite, heading, 2); fMessage = SWTFactory.createWrapLabel(fMainComposite, IInternalDebugCoreConstants.EMPTY_STRING, 2, 250); } - + public void setMessage(String msg) { fMessage.setText((msg == null ? IInternalDebugCoreConstants.EMPTY_STRING : msg)); } - + public void refreshPanel(IStructuredSelection selection) { //get rid of any existing children, but leave the first two (the label for the control, and the message area) Control[] children = fMainComposite.getChildren(); @@ -189,7 +189,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I fMainComposite.layout(); } } - + /** * Widgets */ @@ -198,7 +198,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I private Tree fTree = null; private PerspectivesTreeViewer fTreeViewer = null; private PerspectivesPanel fPerspectivesPanel = null; - + /** * Caches */ @@ -206,7 +206,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I private static Map<String, String> fgPerspectiveIdMap = null; private static HashSet<PerspectiveChange> fgChangeSet = null; private static HashSet<Object> fgCurrentWorkingContext = null; - + /** * A default selection listener to be reused by all combo boxes presenting perspective data */ @@ -246,12 +246,12 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } } }; - + /** * Constructor */ public LaunchPerspectivePreferencePage() {} - + /** * @see org.eclipse.jface.dialogs.DialogPage#dispose() */ @@ -278,23 +278,23 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I super.createControl(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IDebugHelpContextIds.PERSPECTIVE_PREFERENCE_PAGE); } - + /** * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { - + SWTFactory.createWrapLabel(parent, DebugPreferencesMessages.PerspectivePreferencePage_0, 2, 300); - + SWTFactory.createVerticalSpacer(parent, 1); - + fSwitchLaunch = new RadioGroupFieldEditor( IInternalDebugUIConstants.PREF_SWITCH_TO_PERSPECTIVE, DebugPreferencesMessages.LaunchingPreferencePage_11, 3, new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_12, MessageDialogWithToggle.ALWAYS }, { DebugPreferencesMessages.LaunchingPreferencePage_13, MessageDialogWithToggle.NEVER }, - { DebugPreferencesMessages.LaunchingPreferencePage_14, MessageDialogWithToggle.PROMPT } }, + { DebugPreferencesMessages.LaunchingPreferencePage_14, MessageDialogWithToggle.PROMPT } }, SWTFactory.createComposite(parent, 1, 2, GridData.FILL_HORIZONTAL), true); fSwitchLaunch.setPreferenceName(IInternalDebugUIConstants.PREF_SWITCH_TO_PERSPECTIVE); @@ -304,12 +304,12 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I DebugPreferencesMessages.DebugPreferencePage_21, 3, new String[][] {{ DebugPreferencesMessages.DebugPreferencePage_22, MessageDialogWithToggle.ALWAYS }, { DebugPreferencesMessages.DebugPreferencePage_23, MessageDialogWithToggle.NEVER }, - { DebugPreferencesMessages.DebugPreferencePage_24, MessageDialogWithToggle.PROMPT } }, + { DebugPreferencesMessages.DebugPreferencePage_24, MessageDialogWithToggle.PROMPT } }, SWTFactory.createComposite(parent, 1, 2, GridData.FILL_HORIZONTAL), true); fSwitchSuspend.setPreferenceName(IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND); fSwitchSuspend.setPreferenceStore(getPreferenceStore()); - + SWTFactory.createVerticalSpacer(parent, 1); SWTFactory.createWrapLabel(parent, DebugPreferencesMessages.PerspectivePreferencePage_5, 2, 300); Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0); @@ -320,7 +320,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I Dialog.applyDialogFont(parent); return parent; } - + /** * Creates the <code>Tree</code> and <code>TreeViewer</code> widgets * @param parent the parent to add these components to @@ -357,7 +357,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I fTreeViewer.addFilter(new LaunchCategoryFilter(IInternalDebugUIConstants.ID_EXTERNAL_TOOL_BUILDER_LAUNCH_CATEGORY)); fTreeViewer.setInput(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()); } - + /** * Creates a set of combo boxes on a per-selection basis that display a listing of available perspectives to switch to * @param parent the parent to add the created combo boxes to @@ -393,11 +393,11 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } } } - + /** * Returns the text item to select for the current combo context given the current working set context - * @param modes the set of modes - * @return the text to select in the current combo / current working set context, or "None" + * @param modes the set of modes + * @return the text to select in the current combo / current working set context, or "None" */ private String getComboSelection(Set<String> modes) { String text = DebugPreferencesMessages.PerspectivePreferencePage_4; @@ -441,12 +441,12 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } } } - + return text; } - + /** - * Traverses the current change set to find a matching change. Matching in this context considers only the + * Traverses the current change set to find a matching change. Matching in this context considers only the * type, delegate and mode set, we do not compare perspective ids, as they can change many times. * @param type the type * @param delegate the delegate, possibly <code>null</code> @@ -462,11 +462,11 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } return null; } - + /** * Collects a list of mode sets that are common to the current selection * context. It is possible that there are no mode sets in common. - * + * * @param selection the current selection context * @return a list of mode sets or an empty list, never <code>null</code> */ @@ -503,9 +503,9 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } return common; } - + /** - * Returns if the specified mode set is common to the listing of delegates, at the same time adding any not common + * Returns if the specified mode set is common to the listing of delegates, at the same time adding any not common * mode sets to a listing used to prune the search as we go along * @param modeset the set to test for commonality * @param delegates the listing to test against @@ -527,7 +527,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I } return false; } - + /** * Restores the widget state from the preference store, called after all of the widgets have been created and triggers * a selection changed event from the tree viewer @@ -542,7 +542,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I fSwitchLaunch.load(); fSwitchSuspend.load(); } - + /** * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @@ -551,7 +551,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I fgChangeSet.clear(); fSwitchLaunch.loadDefault(); fSwitchSuspend.loadDefault(); - + PerspectiveManager pm = DebugUIPlugin.getDefault().getPerspectiveManager(); TreeItem[] items = fTree.getItems(); ILaunchConfigurationType type = null; @@ -613,7 +613,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I fTreeViewer.refresh(); } } - + /** * @see org.eclipse.jface.preference.PreferencePage#performOk() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java index cd0e146cd..58f741a21 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java @@ -55,10 +55,10 @@ import org.eclipse.ui.model.WorkbenchViewerComparator; /** * This class provides a preference page for selecting and changing preferred launch delegates for those of them * that have conflicting delegates. - * - * Delegates are considered to be conflicting if they are for the same launch configuration type, and apply to the same + * + * Delegates are considered to be conflicting if they are for the same launch configuration type, and apply to the same * mode sets. - * + * * @since 3.3 */ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { @@ -70,13 +70,13 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc private ILaunchConfigurationType fType = null; private ILaunchDelegate[] fDelegates = null; private Set<String> fModes = null; - + public DuplicateDelegate(ILaunchConfigurationType type, ILaunchDelegate[] delegates, Set<String> modes) { fModes = modes; fType = type; fDelegates = delegates; } - + public ILaunchConfigurationType getType() { return fType; } @@ -88,7 +88,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc return fModes; } } - + /** * label provider to extend the default one, provides labels to both the tree and table of this page */ @@ -108,7 +108,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc return element.toString(); } } - + /** * This class is used to provide content to the tree */ @@ -139,14 +139,14 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc @Override public Object getParent(Object element) {return null;} } - + private TreeViewer fTreeViewer = null; private CheckboxTableViewer fTableViewer = null; private Map<ILaunchConfigurationType, Set<DuplicateDelegate>> fDuplicates = null; private Map<DuplicateDelegate, ILaunchDelegate> fDupeSelections = null; private boolean fDirty = false; private Text fDescription = null; - + /** * Constructor */ @@ -170,13 +170,13 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc protected Control createContents(Composite parent) { Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH); SWTFactory.createWrapLabel(comp, DebugPreferencesMessages.LaunchDelegatesPreferencePage_1, 2, 300); - + boolean enabled = fDuplicates.size() > 0; if(!enabled) { SWTFactory.createVerticalSpacer(comp, 1); SWTFactory.createWrapLabel(comp, DebugPreferencesMessages.LaunchersPreferencePage_0, 2, 300); } - + SWTFactory.createVerticalSpacer(comp, 1); //tree Composite comp1 = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_VERTICAL); @@ -213,7 +213,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc } } }); - + //table Composite comp2 = SWTFactory.createComposite(comp, comp.getFont(), 1, 1, GridData.FILL_BOTH); SWTFactory.createLabel(comp2, DebugPreferencesMessages.LaunchDelegatesPreferencePage_3, 1); @@ -245,7 +245,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc Object element = event.getElement(); boolean checked = event.getChecked(); //always set checked, this way users cannot 'undo' a change to selecting a preferred delegate - //The story for this is that on startup if there are dupes, the user is prompted to pick a delegate, after that they cannot + //The story for this is that on startup if there are dupes, the user is prompted to pick a delegate, after that they cannot //return to a state of not being able to launch something, but can pick a different delegate fTableViewer.setCheckedElements(new Object[] {element}); //set the selection to be the checked element @@ -282,7 +282,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc delegate = fDupeSelections.get(dd); try { dd.getType().setPreferredDelegate(dd.getModeSet(), delegate); - } + } catch (CoreException e) {DebugUIPlugin.log(e);} } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchingPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchingPreferencePage.java index e70888856..c1af36702 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchingPreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchingPreferencePage.java @@ -39,17 +39,17 @@ import com.ibm.icu.text.MessageFormat; /** * A preference page for configuring launching preferences. - * + * * @since 3.0.0 */ public class LaunchingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - + private Button fUseContextLaunching; private Button fUseOldLaunching; private Button fLaunchLastIfNotLaunchable; private Button fCheckParent; private Button fTerminatAndRelaunch; - + /** * The default constructor */ @@ -57,7 +57,7 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement super(); setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore()); } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite) */ @@ -74,43 +74,43 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement protected Control createContents(Composite parent) { Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_HORIZONTAL); //save dirty editors - FieldEditor edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, DebugPreferencesMessages.LaunchingPreferencePage_2, 3, - new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_3, MessageDialogWithToggle.ALWAYS}, + FieldEditor edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, DebugPreferencesMessages.LaunchingPreferencePage_2, 3, + new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_3, MessageDialogWithToggle.ALWAYS}, {DebugPreferencesMessages.LaunchingPreferencePage_4, MessageDialogWithToggle.NEVER}, - {DebugPreferencesMessages.LaunchingPreferencePage_5, MessageDialogWithToggle.PROMPT}}, + {DebugPreferencesMessages.LaunchingPreferencePage_5, MessageDialogWithToggle.PROMPT}}, comp, - true); + true); addField(edit); - + //wait for build - edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD, + edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD, DebugPreferencesMessages.LaunchingPreferencePage_6, 3, - new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_7, MessageDialogWithToggle.ALWAYS}, - {DebugPreferencesMessages.LaunchingPreferencePage_8, MessageDialogWithToggle.NEVER}, - {DebugPreferencesMessages.LaunchingPreferencePage_9, MessageDialogWithToggle.PROMPT}}, + new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_7, MessageDialogWithToggle.ALWAYS}, + {DebugPreferencesMessages.LaunchingPreferencePage_8, MessageDialogWithToggle.NEVER}, + {DebugPreferencesMessages.LaunchingPreferencePage_9, MessageDialogWithToggle.PROMPT}}, comp, true); addField(edit); - + //re-launch in debug mode edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE, - DebugPreferencesMessages.LaunchingPreferencePage_15, 3, - new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_16, MessageDialogWithToggle.ALWAYS}, - {DebugPreferencesMessages.LaunchingPreferencePage_17, MessageDialogWithToggle.NEVER}, - {DebugPreferencesMessages.LaunchingPreferencePage_18, MessageDialogWithToggle.PROMPT}}, + DebugPreferencesMessages.LaunchingPreferencePage_15, 3, + new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_16, MessageDialogWithToggle.ALWAYS}, + {DebugPreferencesMessages.LaunchingPreferencePage_17, MessageDialogWithToggle.NEVER}, + {DebugPreferencesMessages.LaunchingPreferencePage_18, MessageDialogWithToggle.PROMPT}}, comp, true); addField(edit); - + //continue with compile errors edit = new RadioGroupFieldEditor(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, - DebugPreferencesMessages.LaunchingPreferencePage_21, 2, - new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_22, MessageDialogWithToggle.ALWAYS}, - {DebugPreferencesMessages.LaunchingPreferencePage_23, MessageDialogWithToggle.PROMPT}}, + DebugPreferencesMessages.LaunchingPreferencePage_21, 2, + new String[][] {{DebugPreferencesMessages.LaunchingPreferencePage_22, MessageDialogWithToggle.ALWAYS}, + {DebugPreferencesMessages.LaunchingPreferencePage_23, MessageDialogWithToggle.PROMPT}}, comp, true); addField(edit); - + //filtering options Group group = SWTFactory.createGroup(comp, DebugPreferencesMessages.LaunchingPreferencePage_36, 1, 1, GridData.FILL_HORIZONTAL); Composite spacer = SWTFactory.createComposite(group, 1, 1, GridData.FILL_HORIZONTAL); @@ -120,11 +120,11 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement edit = new BooleanFieldEditor(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES, DebugPreferencesMessages.LaunchingPreferencePage_10, SWT.NONE, spacer); edit.fillIntoGrid(spacer, 2); addField(edit); - + edit = new BooleanFieldEditor(IInternalDebugUIConstants.PREF_REMOVE_FROM_LAUNCH_HISTORY, DebugPreferencesMessages.LaunchingPreferencePage_confirm_0, spacer); edit.fillIntoGrid(spacer, 2); addField(edit); - + //history list size preference IntegerFieldEditor editor = new IntegerFieldEditor(IDebugUIConstants.PREF_MAX_HISTORY_SIZE, DebugPreferencesMessages.DebugPreferencePage_10, spacer); editor.fillIntoGrid(spacer, 2); @@ -135,7 +135,7 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement editor.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); editor.setValidRange(1, historyMax); editor.setEmptyStringAllowed(false); - + //CONTEXTLAUNCHING createContextLaunchingControls(comp); initialize(); @@ -144,10 +144,10 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement } /** - * Creates the context launching portion of the page, which includes two radio buttons and + * Creates the context launching portion of the page, which includes two radio buttons and * a nested check box * @param parent the parent to add this control to - * + * * @since 3.3.0 * CONTEXTLAUNCHING */ @@ -172,7 +172,7 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement layout.marginHeight = 0; fCheckParent = SWTFactory.createRadioButton(space, DebugPreferencesMessages.LaunchingPreferencePage_39); fLaunchLastIfNotLaunchable = SWTFactory.createRadioButton(space, DebugPreferencesMessages.LaunchingPreferencePage_41); - + fTerminatAndRelaunch = SWTFactory.createCheckButton(group, DebugPreferencesMessages.LaunchingPreferencePage_42, null, false, 1); // initialize the buttons @@ -188,13 +188,13 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement value = getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_TERMINATE_AND_RELAUNCH_LAUNCH_ACTION); fTerminatAndRelaunch.setSelection(value); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ @Override public void init(IWorkbench workbench) {} - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @@ -212,7 +212,7 @@ public class LaunchingPreferencePage extends FieldEditorPreferencePage implement fTerminatAndRelaunch.setSelection(value); super.performDefaults(); } - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#performOk() */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java index ba3450901..048427de9 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java @@ -40,7 +40,7 @@ import com.ibm.icu.text.DateFormat; public class ProcessPropertyPage extends PropertyPage { private static Font fHeadingFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); - + /** * Constructor for ProcessPropertyPage */ @@ -55,9 +55,9 @@ public class ProcessPropertyPage extends PropertyPage { protected Control createContents(Composite ancestor) { noDefaultAndApplyButton(); Composite parent = SWTFactory.createComposite(ancestor, ancestor.getFont(), 1, 1, GridData.FILL_BOTH); - + IProcess proc = getProcess(); - + //create the process time section SWTFactory.createLabel(parent, DebugPreferencesMessages.ProcessPropertyPage_0, fHeadingFont, 1); Text text = SWTFactory.createText(parent, SWT.READ_ONLY, 1); @@ -66,9 +66,9 @@ public class ProcessPropertyPage extends PropertyPage { text.setText(getTimeText(proc)); text.setBackground(parent.getBackground()); SWTFactory.createVerticalSpacer(parent, 2); - + //create the path name section - SWTFactory.createLabel(parent, DebugPreferencesMessages.ProcessPropertyPage_1, fHeadingFont, 1); + SWTFactory.createLabel(parent, DebugPreferencesMessages.ProcessPropertyPage_1, fHeadingFont, 1); text = SWTFactory.createText(parent, SWT.WRAP | SWT.READ_ONLY, 1); ((GridData)text.getLayoutData()).horizontalIndent = 10; text.setText(getPathText(proc)); @@ -82,12 +82,12 @@ public class ProcessPropertyPage extends PropertyPage { text.setText(getWorkingDirectory(proc)); text.setBackground(parent.getBackground()); SWTFactory.createVerticalSpacer(parent, 2); - + //create command line section SWTFactory.createLabel(parent, DebugPreferencesMessages.ProcessPropertyPage_Command_Line__1, fHeadingFont, 1); - StyledText styledText = SWTFactory.createStyledText(parent, - SWT.WRAP | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL, - 1, + StyledText styledText = SWTFactory.createStyledText(parent, + SWT.WRAP | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL, + 1, convertWidthInCharsToPixels(13), convertHeightInCharsToPixels(10), GridData.FILL_BOTH); @@ -102,13 +102,13 @@ public class ProcessPropertyPage extends PropertyPage { // render as one argument per line, but don't copy line delimiters to clipboard: final int[] segments = new int[count - 1]; commandLineText = DebugPlugin.renderArguments(arguments, segments); - + styledText.addBidiSegmentListener(new BidiSegmentListener() { @Override public void lineGetSegments(BidiSegmentEvent event) { int offset = event.lineOffset; int end = offset + event.lineText.length(); - + // extract segments for the current line: int iStart = Arrays.binarySearch(segments, offset); if (iStart < 0) { @@ -138,27 +138,27 @@ public class ProcessPropertyPage extends PropertyPage { if(commandLineText != null) { styledText.setText(commandLineText); } - + //create environment section SWTFactory.createLabel(parent, DebugPreferencesMessages.ProcessPropertyPage_7, fHeadingFont, 1); - text = SWTFactory.createText(parent, - SWT.H_SCROLL | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL, - 1, + text = SWTFactory.createText(parent, + SWT.H_SCROLL | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL, + 1, convertWidthInCharsToPixels(13), convertHeightInCharsToPixels(8), GridData.FILL_BOTH); text.setBackground(parent.getBackground()); ((GridData)text.getLayoutData()).horizontalIndent = 10; text.setText(getEnvironment(proc)); - + setTitle(DebugPreferencesMessages.ProcessPropertyPage_2); return parent; } - + /** * Gets the process from the selected element * @return the process or null if the element is not a process - * + * * @since 3.2 */ private IProcess getProcess() { @@ -172,12 +172,12 @@ public class ProcessPropertyPage extends PropertyPage { } return proc; } - + /** * returns the path text * @param proc the process to extract the path text from * @return the path text or a message indicating no path text available - * + * * @see DebugPlugin#ATTR_PATH * @since 3.2 */ @@ -197,14 +197,14 @@ public class ProcessPropertyPage extends PropertyPage { } return text; } - + /** * gets the pattern of text from the process label specified by RegEx * @param proc the process to compile the RegEx against * @param deftext the default text to return if the process is null * @param regex the RegEx to match in the process label * @return the RegEx matched text or the default supplied text if the process is null - * + * * @see DebugPlugin#ATTR_RUN_AT_TIME * @since 3.2 */ @@ -238,12 +238,12 @@ public class ProcessPropertyPage extends PropertyPage { } return text; } - + /** * Initializes the text to be displayed in the environment text widget * @param proc * @return the environment path or a default string never <code>null</code> - * + * * @see DebugPlugin#ATTR_ENVIRONMENT * @since 3.8 */ @@ -257,13 +257,13 @@ public class ProcessPropertyPage extends PropertyPage { } return env; } - + /** * Initializes the text to be displayed in the working directory text widget - * + * * @param proc * @return the text to display or a default {@link String} never <code>null</code> - * + * * @see DebugPlugin#ATTR_WORKING_DIRECTORY * @since 3.8 */ @@ -277,7 +277,7 @@ public class ProcessPropertyPage extends PropertyPage { } return wd; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) */ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java index 02e030911..1293d661b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java @@ -64,13 +64,13 @@ import com.ibm.icu.text.MessageFormat; /** * Displays default launch configuration settings for a selected resource - associated launch configurations. - * + * * @see PropertyPage * @see ILaunchConfiguration * @see LaunchConfigurationsDialog - * + * * CONTEXTLAUNCHING - * + * * @since 3.3.0 */ public class RunDebugPropertiesPage extends PropertyPage { @@ -78,29 +78,29 @@ public class RunDebugPropertiesPage extends PropertyPage { * Set of configurations to be deleted */ private Set<ILaunchConfigurationWorkingCopy> fDeletedConfigurations = new HashSet<ILaunchConfigurationWorkingCopy>(); - + /** * Set of original default candidates for the resource */ private Set<ILaunchConfiguration> fOriginalCandidates; - + /** * Holds configurations that need to be saved when the page closes */ private Set<ILaunchConfigurationWorkingCopy> fChangedConfigurations = new HashSet<ILaunchConfigurationWorkingCopy>(); - + /** * List of the applicable launch config types for the backing resource */ private List<ILaunchConfigurationType> fTypeCandidates = null; - + //widgets private TableViewer fViewer; private Button fNewButton = null; private Button fEditButton = null; private Button fDuplicateButton = null; private Button fDeleteButton = null; - + /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @@ -109,12 +109,12 @@ public class RunDebugPropertiesPage extends PropertyPage { PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IDebugHelpContextIds.RUN_DEBUG_RESOURCE_PROPERTY_PAGE); collectConfigCandidates(getResource()); Composite topComposite = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH); - + SWTFactory.createWrapLabel(topComposite, DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_0, 2, 300); SWTFactory.createVerticalSpacer(topComposite, 2); SWTFactory.createWrapLabel(topComposite, MessageFormat.format(DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_1, new Object[] { getResource().getName() }), 2, 300); fViewer = createViewer(topComposite); - + Composite buttonComp = SWTFactory.createComposite(topComposite, 1, 1, GridData.FILL_VERTICAL); GridLayout layout = (GridLayout) buttonComp.getLayout(); layout.marginHeight = 0; @@ -129,7 +129,7 @@ public class RunDebugPropertiesPage extends PropertyPage { handleNew(); } }); - + fDuplicateButton = SWTFactory.createPushButton(buttonComp, DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_4, null); fDuplicateButton.setToolTipText(DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_5); fDuplicateButton.setEnabled(false); @@ -163,7 +163,7 @@ public class RunDebugPropertiesPage extends PropertyPage { handleDelete(); } }); - + fViewer.setSelection(new StructuredSelection()); applyDialogFont(topComposite); return topComposite; @@ -171,7 +171,7 @@ public class RunDebugPropertiesPage extends PropertyPage { /** * Creates and returns the viewer that will display the possible default configurations. - * + * * @param parent parent composite to create the viewer in * @return viewer viewer that will display possible default configurations */ @@ -229,13 +229,13 @@ public class RunDebugPropertiesPage extends PropertyPage { /** * Returns the viewer displaying possible default configurations. - * + * * @return viewer */ protected TableViewer getViewer() { return fViewer; } - + /** * Returns the launch manager * @return the launch manager @@ -243,10 +243,10 @@ public class RunDebugPropertiesPage extends PropertyPage { protected LaunchManager getLaunchManager() { return (LaunchManager) DebugPlugin.getDefault().getLaunchManager(); } - + /** * Collects the applicable launch configuration types for the backing resource. - * Default implementation uses the launch shortcut evaluation expressions and leverages the + * Default implementation uses the launch shortcut evaluation expressions and leverages the * mapping of launch shortcut to config type id to derive the applicable types. * @return the listing of applicable launch configuration types for the backing resource */ @@ -257,7 +257,7 @@ public class RunDebugPropertiesPage extends PropertyPage { for(int i = 0; i < types.length; i++) { fTypeCandidates.add(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(types[i])); } - + Collections.sort(fTypeCandidates, new Comparator<ILaunchConfigurationType>() { @Override public int compare(ILaunchConfigurationType o1, ILaunchConfigurationType o2) { @@ -269,11 +269,11 @@ public class RunDebugPropertiesPage extends PropertyPage { } return fTypeCandidates.toArray(new ILaunchConfigurationType[fTypeCandidates.size()]); } - + /** * Returns a set of potential default configurations candidates for the given * resource. The configurations are working copies. - * + * * @param resource resource * @return list of default candidates */ @@ -290,12 +290,12 @@ public class RunDebugPropertiesPage extends PropertyPage { } return fOriginalCandidates; } - - - + + + /** * Returns the resource this property page is open on. - * + * * @return resource */ protected IResource getResource() { @@ -314,9 +314,9 @@ public class RunDebugPropertiesPage extends PropertyPage { */ @Override public boolean performOk() { - //delete + //delete for (ILaunchConfigurationWorkingCopy currentConfig : fDeletedConfigurations) { - try{ + try{ if (currentConfig.getOriginal() != null){ currentConfig.getOriginal().delete(); } @@ -332,7 +332,7 @@ public class RunDebugPropertiesPage extends PropertyPage { DebugPlugin.logMessage("Problem saving changes to configuration " + currentConfig.getName(), e); //$NON-NLS-1$ } } - + return super.performOk(); } @@ -351,7 +351,7 @@ public class RunDebugPropertiesPage extends PropertyPage { fViewer.refresh(true, true); super.performDefaults(); } - + /** * Returns the names of the launch configurations passed in as original input to the tree viewer * @return the names of the original launch configurations @@ -361,16 +361,16 @@ public class RunDebugPropertiesPage extends PropertyPage { for(ILaunchConfiguration config : fOriginalCandidates) { names.add(config.getName()); } - + for(ILaunchConfigurationWorkingCopy config : fChangedConfigurations) { names.add(config.getName()); } return names; } - + /** * Returns selected configurations. - * + * * @return selected configurations */ private ILaunchConfigurationWorkingCopy[] getSelectedConfigurations() { @@ -419,8 +419,8 @@ public class RunDebugPropertiesPage extends PropertyPage { * Edit the selection */ private void handleEdit() { - ILaunchConfigurationWorkingCopy config = getSelectedConfigurations()[0]; - int ret = edit(config, false); + ILaunchConfigurationWorkingCopy config = getSelectedConfigurations()[0]; + int ret = edit(config, false); if(ret == IDialogConstants.OK_ID) { fChangedConfigurations.add(config); fViewer.refresh(config, true, true); @@ -433,7 +433,7 @@ public class RunDebugPropertiesPage extends PropertyPage { /** * Edits the given configuration as a nested working copy. * Returns the code from the dialog used to edit the configuration. - * + * * @param configuration the configuration working copy to editor * @param setDefaults whether to set default values in the config * @return dialog return code - OK or CANCEL @@ -473,9 +473,9 @@ public class RunDebugPropertiesPage extends PropertyPage { * Create a new configuration */ private void handleNew() { - + final ILaunchConfigurationType[] typeCandidates = collectTypeCandidates(); - + SelectionDialog dialog = new AbstractDebugListSelectionDialog(getShell()){ /* (non-Javadoc) @@ -493,7 +493,7 @@ public class RunDebugPropertiesPage extends PropertyPage { protected Object getViewerInput() { return typeCandidates; } - + /* (non-Javadoc) * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId() */ @@ -509,7 +509,7 @@ public class RunDebugPropertiesPage extends PropertyPage { protected String getViewerLabel() { return DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_12; } - + }; dialog.setTitle(DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_11); @@ -518,7 +518,7 @@ public class RunDebugPropertiesPage extends PropertyPage { if (result.length == 1) { ILaunchConfigurationType type = (ILaunchConfigurationType) result[0]; try { - ILaunchConfigurationWorkingCopy wc = type.newInstance(null, + ILaunchConfigurationWorkingCopy wc = type.newInstance(null, ((LaunchManager)DebugPlugin.getDefault().getLaunchManager()). generateUniqueLaunchConfigurationNameFrom("New_configuration", getConfigurationNames())); //$NON-NLS-1$ int ret = edit(wc, true); @@ -535,5 +535,5 @@ public class RunDebugPropertiesPage extends PropertyPage { } } } - } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java index b12cfba2b..4669c79e6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java @@ -68,33 +68,33 @@ import com.ibm.icu.text.MessageFormat; /** * Preference page for creating and configuring simple * launch variables. - * + * * @see org.eclipse.debug.core.variables.IValueVariable * @see org.eclipse.debug.core.variables.ISimpleVariableRegistry */ public class StringVariablePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - + private TableViewer variableTable; protected Button envAddButton; protected Button envEditButton; protected Button envRemoveButton; - + protected SimpleVariableContentProvider variableContentProvider= new SimpleVariableContentProvider(); - - protected static final String NAME_LABEL= DebugPreferencesMessages.SimpleVariablePreferencePage_10; - protected static final String VALUE_LABEL = DebugPreferencesMessages.SimpleVariablePreferencePage_11; - protected static final String DESCRIPTION_LABEL = DebugPreferencesMessages.SimpleVariablePreferencePage_12; - + + protected static final String NAME_LABEL= DebugPreferencesMessages.SimpleVariablePreferencePage_10; + protected static final String VALUE_LABEL = DebugPreferencesMessages.SimpleVariablePreferencePage_11; + protected static final String DESCRIPTION_LABEL = DebugPreferencesMessages.SimpleVariablePreferencePage_12; + protected static final String STRING_VARIABLE_PREFERENCE_KEY = "StringVariablePreferencePage"; //$NON-NLS-1$ - + protected static String[] variableTableColumnProperties= { "variable", //$NON-NLS-1$ "value", //$NON-NLS-1$ "description" //$NON-NLS-1$ }; protected String[] variableTableColumnHeaders= { - DebugPreferencesMessages.SimpleVariablePreferencePage_3, - DebugPreferencesMessages.SimpleVariablePreferencePage_4, + DebugPreferencesMessages.SimpleVariablePreferencePage_3, + DebugPreferencesMessages.SimpleVariablePreferencePage_4, DebugPreferencesMessages.SimpleVariablePreferencePage_5, DebugPreferencesMessages.StringVariablePreferencePage_27 }; @@ -104,9 +104,9 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor new ColumnWeightData(25), new ColumnWeightData(20) }; - + public StringVariablePreferencePage() { - setDescription(DebugPreferencesMessages.SimpleVariablePreferencePage_6); + setDescription(DebugPreferencesMessages.SimpleVariablePreferencePage_6); } /** @@ -130,13 +130,13 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor layout.numColumns= 2; composite.setLayout(layout); composite.setFont(font); - + createTable(composite); createButtons(composite); - + return composite; } - + /** * Creates and configures the table containing launch configuration variables * and their associated value. @@ -178,14 +178,14 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } } }); - + variableTable.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { handleTableSelectionChanged(event); } }); - + variableTable.addDoubleClickListener(new IDoubleClickListener() { @Override public void doubleClick(DoubleClickEvent event) { @@ -202,22 +202,22 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } } }); - + for (int i = 0; i < variableTableColumnHeaders.length; i++) { TableColumn tc = new TableColumn(table, SWT.NONE, i); tc.setResizable(variableTableColumnLayouts[i].resizable); tc.setText(variableTableColumnHeaders[i]); } - + // Try restoring column widths from preferences, if widths aren't stored, init columns to default if (!restoreColumnWidths()){ restoreDefaultColumnWidths(); } - + variableTable.setInput(getVariableManager()); variableTable.setLabelProvider(new SimpleVariableLabelProvider()); } - + /** * Creates the new/edit/remove buttons for the variable table * @param parent the composite in which the buttons should be created @@ -233,9 +233,9 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor buttonComposite.setLayout(glayout); buttonComposite.setLayoutData(gdata); buttonComposite.setFont(parent.getFont()); - + // Create buttons - envAddButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_7, null); + envAddButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_7, null); envAddButton.addSelectionListener(new SelectionAdapter() { @Override @@ -243,7 +243,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor handleAddButtonPressed(); } }); - envEditButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_8, null); + envEditButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_8, null); envEditButton.addSelectionListener(new SelectionAdapter() { @Override @@ -252,7 +252,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } }); envEditButton.setEnabled(false); - envRemoveButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_9, null); + envRemoveButton = SWTFactory.createPushButton(buttonComposite, DebugPreferencesMessages.SimpleVariablePreferencePage_9, null); envRemoveButton.addSelectionListener(new SelectionAdapter() { @Override @@ -262,19 +262,19 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor }); envRemoveButton.setEnabled(false); } - + private void handleAddButtonPressed() { boolean done = false; String name = null; String description = null; String value = null; while (!done){ - - MultipleInputDialog dialog= new MultipleInputDialog(getShell(), DebugPreferencesMessages.SimpleVariablePreferencePage_13); + + MultipleInputDialog dialog= new MultipleInputDialog(getShell(), DebugPreferencesMessages.SimpleVariablePreferencePage_13); dialog.addTextField(NAME_LABEL, name, false); dialog.addBrowseField(VALUE_LABEL, value, true); dialog.addTextField(DESCRIPTION_LABEL, description, true); - + if (dialog.open() != Window.OK) { done = true; } @@ -292,9 +292,9 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor * whether the operation completed successfully (either the variable was added * successfully, or the user cancelled the operation). Returns false if the name * is null or the user chooses not to overwrite an existing variable. - * + * * @param name name of the variable, cannot be <code>null</code> or empty. - * @param description description of the variable or <code>null</code> + * @param description description of the variable or <code>null</code> * @param value value of the variable or <code>null</code> * @return whether the operation completed successfully */ @@ -319,7 +319,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0); - int overWrite= dialog.open(); + int overWrite= dialog.open(); if (overWrite == 0) { currentVariable.setValue(value); currentVariable.setDescription(description); @@ -339,7 +339,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor variableTable.refresh(); return true; } - + private void handleEditButtonPressed() { IStructuredSelection selection= (IStructuredSelection) variableTable.getSelection(); VariableWrapper variable= (VariableWrapper) selection.getFirstElement(); @@ -352,7 +352,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor MultipleInputDialog dialog = new MultipleInputDialog(getShell(), MessageFormat.format(DebugPreferencesMessages.SimpleVariablePreferencePage_14, new Object[] { name })); dialog.addBrowseField(VALUE_LABEL, value, true); dialog.addTextField(DESCRIPTION_LABEL, description, true); - + if (dialog.open() == Window.OK) { value= dialog.getStringValue(VALUE_LABEL); description= dialog.getStringValue(DESCRIPTION_LABEL); @@ -365,7 +365,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor variableTable.update(variable, null); } } - + /** * Remove the selection variables. */ @@ -389,10 +389,10 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor VariableWrapper[] variables= variablesToRemove.toArray(new VariableWrapper[0]); for (int i = 0; i < variables.length; i++) { variables[i].setRemoved(true); - } + } variableTable.refresh(); } - + /** * Responds to a selection changed event in the variable table * @param event the selection change event @@ -423,7 +423,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor variableTable.refresh(); super.performDefaults(); } - + /** * Sets the saved state for reversion. */ @@ -442,7 +442,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor private IStringVariableManager getVariableManager() { return VariablesPlugin.getDefault().getStringVariableManager(); } - + public void saveColumnWidths() { StringBuffer widthPreference = new StringBuffer(); for (int i = 0; i < variableTable.getTable().getColumnCount(); i++) { @@ -453,7 +453,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor DebugUIPlugin.getDefault().getPreferenceStore().setValue(STRING_VARIABLE_PREFERENCE_KEY, widthPreference.toString()); } } - + private boolean restoreColumnWidths() { String[] columnWidthStrings = DebugUIPlugin.getDefault().getPreferenceStore().getString(STRING_VARIABLE_PREFERENCE_KEY).split(","); //$NON-NLS-1$ int columnCount = variableTable.getTable().getColumnCount(); @@ -470,7 +470,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } return true; } - + private void restoreDefaultColumnWidths(){ TableLayout layout = new TableLayout(); for (int i = 0; i < variableTableColumnLayouts.length; i++) { @@ -478,31 +478,31 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } variableTable.getTable().setLayout(layout); } - + private class SimpleVariableContentProvider implements IStructuredContentProvider { /** * The content provider stores variable wrappers for use during editing. */ private List<VariableWrapper> fWorkingSet = new ArrayList<VariableWrapper>(); - + @Override public Object[] getElements(Object inputElement) { return fWorkingSet.toArray(); } - + /** * Adds the given variable to the 'wrappers' - * + * * @param variable variable to add */ public void addVariable(VariableWrapper variable) { fWorkingSet.add(variable); - } + } @Override public void dispose() { } - + @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if (newInput == null || !(newInput instanceof IStringVariableManager)){ @@ -547,11 +547,11 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor try { manager.addVariables(add.toArray(new IValueVariable[add.size()])); } catch (CoreException e) { - DebugUIPlugin.errorDialog(getShell(), DebugPreferencesMessages.StringVariablePreferencePage_24, DebugPreferencesMessages.StringVariablePreferencePage_25, e.getStatus()); // + DebugUIPlugin.errorDialog(getShell(), DebugPreferencesMessages.StringVariablePreferencePage_24, DebugPreferencesMessages.StringVariablePreferencePage_25, e.getStatus()); // } } } - + /** * Re-initializes to the variables currently stored in the manager. */ @@ -561,108 +561,108 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor IValueVariable[] variables = manager.getValueVariables(); for (int i = 0; i < variables.length; i++) { fWorkingSet.add(new VariableWrapper(variables[i])); - } + } } - + /** * Returns the 'working set' of variables - * + * * @return the working set of variables (not yet saved) */ public List<VariableWrapper> getWorkingSetVariables() { return fWorkingSet; } - + } - + class VariableWrapper { - + protected IValueVariable fVariable; protected String fNewName = null; protected String fNewDesc = null; protected String fNewValue = null; boolean fRemoved = false; boolean fAdded = false; - + public VariableWrapper(IValueVariable variable) { fVariable = variable; } - + public VariableWrapper(String name, String desc, String value) { fNewName = name; fNewDesc = desc; fNewValue = value; fAdded = true; } - + public boolean isAdded() { return fAdded; } - + public String getName() { if (fNewName == null) { return fVariable.getName(); } return fNewName; } - + public void setName(String name) { fNewName = name; } - + public String getDescription() { if (fNewDesc == null) { return fVariable.getDescription(); } return fNewDesc; } - + public String getValue() { if (fNewValue == null) { return fVariable.getValue(); } return fNewValue; } - + public void setValue(String value) { fNewValue = value; } - + public void setDescription(String desc) { fNewDesc = desc; } - + public boolean isChanged() { return !fAdded && !fRemoved && (fNewValue != null || fNewDesc != null); } - + public boolean isReadOnly() { if (fVariable == null) { return false; } return fVariable.isReadOnly(); } - + public boolean isContributed() { if (fVariable == null) { return false; } return fVariable.isContributed(); } - + public IValueVariable getUnderlyingVariable() { return fVariable; } - + public boolean isRemoved() { return fRemoved; } - + public void setRemoved(boolean removed) { fRemoved = removed; } } - + private class SimpleVariableLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider { @Override public Image getColumnImage(Object element, int columnIndex) { @@ -681,7 +681,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor } return name.toString(); case 1: - String value= variable.getValue(); + String value= variable.getValue(); if (value == null) { value= IInternalDebugCoreConstants.EMPTY_STRING; } @@ -697,15 +697,15 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor if (variable.isContributed()) { String pluginId = getVariableManager().getContributingPluginId(variable.getUnderlyingVariable()); if (pluginId != null) { - contribution = pluginId; + contribution = pluginId; } else { - contribution = DebugPreferencesMessages.SimpleLaunchVariablePreferencePage_23; + contribution = DebugPreferencesMessages.SimpleLaunchVariablePreferencePage_23; } } return contribution; default: break; - + } } return null; @@ -715,7 +715,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor if (element instanceof VariableWrapper) { if (((VariableWrapper) element).isReadOnly()) { Display display= Display.getCurrent(); - return display.getSystemColor(SWT.COLOR_INFO_FOREGROUND); + return display.getSystemColor(SWT.COLOR_INFO_FOREGROUND); } } return null; @@ -725,7 +725,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor if (element instanceof VariableWrapper) { if (((VariableWrapper) element).isReadOnly()) { Display display= Display.getCurrent(); - return display.getSystemColor(SWT.COLOR_INFO_BACKGROUND); + return display.getSystemColor(SWT.COLOR_INFO_BACKGROUND); } } return null; @@ -741,6 +741,6 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor public boolean select(Viewer viewer, Object parentElement, Object element) { return !((VariableWrapper)element).isRemoved(); } - + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java index 2e2803cd4..5d90deeec 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation * Christian Georgi - Bug 388321 Perspectives are not sorted in debug's view management preference page @@ -60,7 +60,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor private boolean fResetPressed= false; private PerspectiveLabelProvider fLabelProvider= null; private SelectionListener fSelectionListener= new SelectionAdapter() { - + @Override public void widgetSelected(SelectionEvent e) { Object source = e.getSource(); @@ -70,13 +70,13 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor handleTrackViewsToggled(); } } - + }; - + public ViewManagementPreferencePage() { super(); - setTitle(DebugPreferencesMessages.ViewManagementPreferencePage_1); - setDescription(DebugPreferencesMessages.ViewManagementPreferencePage_0); + setTitle(DebugPreferencesMessages.ViewManagementPreferencePage_1); + setDescription(DebugPreferencesMessages.ViewManagementPreferencePage_0); setPreferenceStore(DebugUITools.getPreferenceStore()); } @@ -98,13 +98,13 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); composite.setFont(parent.getFont()); - + createPerspectiveViewer(composite); - + createViewTrackingOptions(composite); - + Dialog.applyDialogFont(composite); - + return composite; } @@ -114,25 +114,25 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor private void createViewTrackingOptions(Composite composite) { fTrackViewsButton= new Button(composite, SWT.CHECK); fTrackViewsButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - fTrackViewsButton.setText(DebugPreferencesMessages.ViewManagementPreferencePage_3); + fTrackViewsButton.setText(DebugPreferencesMessages.ViewManagementPreferencePage_3); fTrackViewsButton.setSelection(DebugUITools.getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_TRACK_VIEWS)); fTrackViewsButton.addSelectionListener(fSelectionListener); - + Label label= new Label(composite, SWT.WRAP); - label.setText(DebugPreferencesMessages.ViewManagementPreferencePage_4); + label.setText(DebugPreferencesMessages.ViewManagementPreferencePage_4); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - fResetViewsButton= SWTFactory.createPushButton(composite, DebugPreferencesMessages.ViewManagementPreferencePage_5, null); + + fResetViewsButton= SWTFactory.createPushButton(composite, DebugPreferencesMessages.ViewManagementPreferencePage_5, null); ((GridData) fResetViewsButton.getLayoutData()).horizontalAlignment= GridData.BEGINNING; fResetViewsButton.addSelectionListener(fSelectionListener); updateResetButton(); } - + private void handleResetPressed() { fResetPressed= true; fResetViewsButton.setEnabled(false); } - + protected void handleTrackViewsToggled() { if (fTrackViewsButton.getSelection()) { // When toggled on, possibly re-enable the reset button @@ -148,13 +148,13 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor */ private void createPerspectiveViewer(Composite parent) { Label label= new Label(parent, SWT.WRAP); - label.setText(DebugPreferencesMessages.ViewManagementPreferencePage_2); + label.setText(DebugPreferencesMessages.ViewManagementPreferencePage_2); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - + Table table= new Table(parent, SWT.CHECK | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION); table.setLayout(new GridLayout()); table.setLayoutData(new GridData(GridData.FILL_BOTH)); - + fPerspectiveViewer= new CheckboxTableViewer(table); PerspectiveProvider provider= new PerspectiveProvider(); fPerspectiveViewer.setContentProvider(provider); @@ -162,7 +162,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor fPerspectiveViewer.setLabelProvider(fLabelProvider); fPerspectiveViewer.setComparator(new PerspectiveComparator()); fPerspectiveViewer.setInput(this); - + Set<String> perspectives; String preference = DebugUIPlugin.getDefault().getPreferenceStore().getString( IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES); @@ -173,7 +173,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor } checkPerspectives(perspectives); } - + private void checkPerspectives(Set<String> perspectives) { fPerspectiveViewer.setAllChecked(false); IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry(); @@ -196,21 +196,21 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor perspectives.add( ((IPerspectiveDescriptor)descriptors[i]).getId() ); } if (perspectives.equals(ViewContextService.getDefaultEnabledPerspectives())) { - getPreferenceStore().setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, + getPreferenceStore().setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES_DEFAULT); } else { StringBuffer buffer= new StringBuffer(); for (Iterator<String> itr = perspectives.iterator(); itr.hasNext();) { - buffer.append(itr.next()).append(','); - } + buffer.append(itr.next()).append(','); + } getPreferenceStore().setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, buffer.toString()); } - + boolean trackViews = fTrackViewsButton.getSelection(); getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_TRACK_VIEWS, trackViews); if (fResetPressed || !trackViews) { // Reset if the user has pressed reset or chosen to no longer track views - getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS, IInternalDebugCoreConstants.EMPTY_STRING); + getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS, IInternalDebugCoreConstants.EMPTY_STRING); } return super.performOk(); } @@ -233,7 +233,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor @Override public void init(IWorkbench workbench) { } - + /** * Updates enablement of the reset button. * Enable if either persisted view collection is not empty. @@ -247,7 +247,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor } private static class PerspectiveProvider implements IStructuredContentProvider { - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ @@ -255,23 +255,23 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor public Object[] getElements(Object inputElement) { return PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives(); } - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.IContentProvider#dispose() */ @Override public void dispose() { } - + } - + private static class PerspectiveComparator extends ViewerComparator { @Override @@ -282,7 +282,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor return super.compare(viewer, e1, e2); } } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.IDialogPage#dispose() */ |