From 37b5f0641626a04653cbf36627c8900ac10ddcee Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 7 Feb 2005 23:59:27 +0000 Subject: [PATCH] Bug 82264: Enhance the Shared Libraries view. Added the definition of detail pane font. --- debug/org.eclipse.cdt.debug.ui/ChangeLog | 8 ++++++++ .../org.eclipse.cdt.debug.ui/plugin.properties | 9 ++++++--- debug/org.eclipse.cdt.debug.ui/plugin.xml | 9 +++++++++ .../ui/IInternalCDebugUIConstants.java | 2 +- .../internal/ui/views/modules/ModulesView.java | 18 ++++++++++++++++++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 2f2447eecbd..32daceb58fb 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,11 @@ +2005-02-07 Mikhail Khodjaiants + Bug 82264: Enhance the Shared Libraries view. + Added the definition of detail pane font. + * IInternalCDebugUIConstants.java + * ModulesView.java + * plugin.xml + * plugin.properties + 2005-02-07 Mikhail Khodjaiants Bug 82264: Enhance the Shared Libraries view. * CDebugUIMessages.properties diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties index 14a69a5755a..be250691dcc 100644 --- a/debug/org.eclipse.cdt.debug.ui/plugin.properties +++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties @@ -103,10 +103,10 @@ DisassemblyCurrentInstructionPointer=Disassembly Current Instruction Pointer DisassemblySecondaryInstructionPointer=Disassembly Secondary Instruction Pointer DebugPresentation.label=C/C++ Debug Appearance -DisassemblySourceLineColor.label=Disassembly Source Line text color +DisassemblySourceLineColor.label=Disassembly Source Line Text Color DisassemblySourceLineColor.description=The color used in the Disassembly view for source lines. -DisassemblyFontDefinition.label=Disassembly View text font -DisassemblyFontDefinition.description=The font used in the Disassembly view. +DisassemblyFontDefinition.label=Disassembly View Text Font +DisassemblyFontDefinition.description=The text font used in the Disassembly view. DebugTextHover.label=Debugger DebugTextHover.description=Shows the value of the expression selected in the debug perspective. @@ -118,5 +118,8 @@ CommonBreakpointPage.label=Common FilteringBreakpointPage.label=Filtering CommonSignalPage.label=Common +ModulesDetailPaneFontDefinition.label=Modules View Detail Pane Text Font +ModulesDetailPaneFontDefinition.description=The text font used in the detail pane of the Modules view. + CollapseAllModulesAction.label=Collapse All CollapseAllModulesAction.tooltip=Collapse All diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml index 16d43b908a3..84b1ba8c178 100644 --- a/debug/org.eclipse.cdt.debug.ui/plugin.xml +++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml @@ -1177,6 +1177,15 @@ %DisassemblyFontDefinition.description + + + %ModulesDetailPaneFontDefinition.description + + diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/IInternalCDebugUIConstants.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/IInternalCDebugUIConstants.java index 743218fb68d..c2b8dbd3c61 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/IInternalCDebugUIConstants.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/IInternalCDebugUIConstants.java @@ -62,7 +62,7 @@ public interface IInternalCDebugUIConstants { * The name of the font to use for detail panes. This font is managed via * the workbench font preference page. */ - public static final String DETAIL_PANE_FONT = PREFIX + "DetailPaneFont"; //$NON-NLS-1$ + public static final String DETAIL_PANE_FONT = PREFIX + "ModulesDetailPaneFont"; //$NON-NLS-1$ /** * Status code indicating an unexpected internal error. diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesView.java index 1ff3496c146..91dbc44aa19 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesView.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesView.java @@ -274,6 +274,10 @@ public class ModulesView extends AbstractDebugEventHandlerView implements IDebug * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ public void propertyChange( PropertyChangeEvent event ) { + String propertyName = event.getProperty(); + if ( propertyName.equals( IInternalCDebugUIConstants.DETAIL_PANE_FONT ) ) { + getDetailViewer().getTextWidget().setFont( JFaceResources.getFont( IInternalCDebugUIConstants.DETAIL_PANE_FONT ) ); + } } /* (non-Javadoc) @@ -798,4 +802,18 @@ public class ModulesView extends AbstractDebugEventHandlerView implements IDebug }; asyncExec( runnable ); } + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPart#dispose() + */ + public void dispose() { + getSite().getPage().removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this ); + CDebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener( this ); + JFaceResources.getFontRegistry().removeListener( this ); + Viewer viewer = getViewer(); + if ( viewer != null ) { + getDetailDocument().removeDocumentListener( getDetailDocumentListener() ); + } + super.dispose(); + } }