diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index eb832b56f55..67db9454d9f 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,12 @@ +2005-03-08 Mikhail Khodjaiants + Removed deprecated "WorkbenchHelp" references. + * CBreakpointPropertiesRulerAction.java + * EnableDisableBreakpointRulerAction.java + * ToggleBreakpointRulerAction.java + * ToggleDetailPaneAction.java + * CDebugPreferencePage.java + * SourcePreferencePage.java + 2005-02-25 Mikhail Khodjaiants "Resume At Line" is disabled if the Disassembly view is opened during an active debug session. * ResumeAtLineActionDelegate.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java index 97156797440..93c6fbfc382 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java @@ -20,7 +20,6 @@ import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.dialogs.PropertyDialogAction; -import org.eclipse.ui.help.WorkbenchHelp; /** * Opens a custom properties dialog to configure the attibutes of a C/C++ breakpoint @@ -35,7 +34,7 @@ public class CBreakpointPropertiesRulerAction extends AbstractBreakpointRulerAct setInfo( info ); setTargetPart( part ); setText( ActionMessages.getString( "CBreakpointPropertiesRulerAction.Breakpoint_Properties" ) ); //$NON-NLS-1$ - WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.BREAKPOINT_PROPERTIES_ACTION ); + part.getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp( this, ICDebugHelpContextIds.BREAKPOINT_PROPERTIES_ACTION ); setId( IInternalCDebugUIConstants.ACTION_BREAKPOINT_PROPERTIES ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java index cd782e43413..1580a131248 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java @@ -17,7 +17,6 @@ import org.eclipse.debug.core.DebugPlugin; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.text.source.IVerticalRulerInfo; import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.help.WorkbenchHelp; public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerAction { @@ -28,7 +27,7 @@ public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerA setInfo( info ); setTargetPart( part ); setText( ActionMessages.getString( "EnableDisableBreakpointRulerAction.Enable_Breakpoint_1" ) ); //$NON-NLS-1$ - WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.ENABLE_DISABLE_BREAKPOINT_ACTION ); + part.getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp( this, ICDebugHelpContextIds.ENABLE_DISABLE_BREAKPOINT_ACTION ); setId( IInternalCDebugUIConstants.ACTION_ENABLE_DISABLE_BREAKPOINT ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointRulerAction.java index b11c3cc4019..4ab913cc79c 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointRulerAction.java @@ -24,7 +24,6 @@ import org.eclipse.jface.text.TextSelection; import org.eclipse.jface.text.source.IVerticalRulerInfo; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditor; @@ -53,7 +52,7 @@ public class ToggleBreakpointRulerAction extends Action { fRuler = ruler; setTargetPart( part ); fBreakpointAdapter = new ToggleBreakpointAdapter(); - WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.TOGGLE_BREAKPOINT_ACTION ); + part.getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp( this, ICDebugHelpContextIds.TOGGLE_BREAKPOINT_ACTION ); setId( IInternalCDebugUIConstants.ACTION_TOGGLE_BREAKPOINT ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleDetailPaneAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleDetailPaneAction.java index c495e74d8d7..cea2e99d566 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleDetailPaneAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleDetailPaneAction.java @@ -15,7 +15,6 @@ import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds; import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants; import org.eclipse.cdt.debug.internal.ui.views.modules.ModulesView; import org.eclipse.jface.action.Action; -import org.eclipse.ui.help.WorkbenchHelp; /** * Action that controls the appearance of the details pane in debug views @@ -60,7 +59,7 @@ public class ToggleDetailPaneAction extends Action { setDisabledImageDescriptor( CDebugImages.DESC_LCL_DETAIL_PANE_HIDE_DISABLED ); setHoverImageDescriptor( CDebugImages.DESC_LCL_DETAIL_PANE_HIDE ); } - WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.SHOW_DETAIL_PANE_ACTION ); + view.getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp( this, ICDebugHelpContextIds.SHOW_DETAIL_PANE_ACTION ); } private ModulesView getModulesView() { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java index 6f5682f72b8..e8a220bd7c6 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java @@ -47,13 +47,14 @@ import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.help.WorkbenchHelp; /** * Preference page for debug preferences that apply specifically to C/C++ Debugging. */ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { + private IWorkbench fWorkbench; + // View setting widgets private Button fPathsButton; @@ -112,7 +113,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite) */ protected Control createContents( Composite parent ) { - WorkbenchHelp.setHelp( getControl(), ICDebugHelpContextIds.C_DEBUG_PREFERENCE_PAGE ); + getWorkbench().getHelpSystem().setHelp( getControl(), ICDebugHelpContextIds.C_DEBUG_PREFERENCE_PAGE ); //The main composite Composite composite = new Composite( parent, SWT.NULL ); GridLayout layout = new GridLayout(); @@ -166,6 +167,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr * @see org.eclipse.ui.IWorkbenchPreferencePage#init(IWorkbench) */ public void init( IWorkbench workbench ) { + fWorkbench = workbench; } protected PropertyChangeListener getPropertyChangeListener() { @@ -374,4 +376,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr private ColorFieldEditor getDisassemblySourceColor() { return fDisassemblySourceColor; } + + private IWorkbench getWorkbench() { + return fWorkbench; + } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java index f3026a2f5d7..dea132b4d96 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java @@ -37,13 +37,14 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.help.WorkbenchHelp; /** * The "Source Code Locations" preference page. */ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, Observer { + private IWorkbench fWorkbench; + private SourceListDialogField fSourceListField; private SelectionButtonDialogField fSearchForDuplicateFiles; @@ -62,7 +63,7 @@ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPr * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ protected Control createContents( Composite parent ) { - WorkbenchHelp.setHelp( getControl(), ICDebugHelpContextIds.SOURCE_PREFERENCE_PAGE ); + getWorkbench().getHelpSystem().setHelp( getControl(), ICDebugHelpContextIds.SOURCE_PREFERENCE_PAGE ); fSourceListField = createSourceListField(); fSearchForDuplicateFiles = createSearchForDuplicateFilesButton(); Composite control = new Composite( parent, SWT.NONE ); @@ -211,4 +212,8 @@ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPr CDebugCorePlugin.getDefault().saveCommonSourceLocations( getSourceLocations() ); CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_SEARCH_DUPLICATE_FILES, searchForDuplicateFiles() ); } + + private IWorkbench getWorkbench() { + return fWorkbench; + } }