mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Implementing the preference page for the 'Shared Libraries' view.
This commit is contained in:
parent
a278a4d72d
commit
c979cb7ae2
7 changed files with 115 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2003-02-07 Mikhail Khodjaiants
|
||||||
|
Implementing the preference page for the 'Shared Libraries' view.
|
||||||
|
* ICDebugHelpContextIds.java
|
||||||
|
* ICDebugPreferenceConstants.java
|
||||||
|
* SharedLibrariesViewPreferencePage.java: new
|
||||||
|
* CDebugUIPlugin.java
|
||||||
|
* plugin.xml
|
||||||
|
* plugin.properties
|
||||||
|
|
||||||
2003-02-07 Mikhail Khodjaiants
|
2003-02-07 Mikhail Khodjaiants
|
||||||
The viewer type of the 'Shared Libraries' view changed to 'TableTreeViewer'.
|
The viewer type of the 'Shared Libraries' view changed to 'TableTreeViewer'.
|
||||||
* CDTDebugModelPresentation.java
|
* CDTDebugModelPresentation.java
|
||||||
|
|
|
@ -15,6 +15,7 @@ CDebuggerPage.name=C Debugger UI Page
|
||||||
MemoryPreferencePage.name=Memory View
|
MemoryPreferencePage.name=Memory View
|
||||||
RegistersPreferencePage.name=Registers View
|
RegistersPreferencePage.name=Registers View
|
||||||
CDebugPreferencePage.name=Debug
|
CDebugPreferencePage.name=Debug
|
||||||
|
SharedLibrariesPreferencePage.name=Shared Libraries View
|
||||||
|
|
||||||
RunMenu.label=&Run
|
RunMenu.label=&Run
|
||||||
DebugActionSet.label=C/C++ Debug
|
DebugActionSet.label=C/C++ Debug
|
||||||
|
|
|
@ -94,6 +94,12 @@
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.preferencePages">
|
point="org.eclipse.ui.preferencePages">
|
||||||
|
<page
|
||||||
|
name="%SharedLibrariesPreferencePage.name"
|
||||||
|
category="org.eclipse.debug.ui.DebugPreferencePage"
|
||||||
|
class="org.eclipse.cdt.debug.internal.ui.preferences.SharedLibrariesViewPreferencePage"
|
||||||
|
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPreferencePage">
|
||||||
|
</page>
|
||||||
<page
|
<page
|
||||||
name="%MemoryPreferencePage.name"
|
name="%MemoryPreferencePage.name"
|
||||||
category="org.eclipse.debug.ui.DebugPreferencePage"
|
category="org.eclipse.debug.ui.DebugPreferencePage"
|
||||||
|
@ -256,8 +262,8 @@
|
||||||
tooltip="Resume Ignoring Signal">
|
tooltip="Resume Ignoring Signal">
|
||||||
<enablement>
|
<enablement>
|
||||||
<pluginState
|
<pluginState
|
||||||
id="org.eclipse.cdt.debug.ui"
|
value="activated"
|
||||||
value="activated">
|
id="org.eclipse.cdt.debug.ui">
|
||||||
</pluginState>
|
</pluginState>
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -38,6 +38,7 @@ public interface ICDebugHelpContextIds
|
||||||
public static final String SIGNALS_VIEW = PREFIX + "signals_view_context"; //$NON-NLS-1$
|
public static final String SIGNALS_VIEW = PREFIX + "signals_view_context"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Preference pages
|
// Preference pages
|
||||||
|
public static final String SHARED_LIBRARIES_PREFERENCE_PAGE = PREFIX + "shared_libraries_preference_page_context"; //$NON-NLS-1$
|
||||||
public static final String MEMORY_PREFERENCE_PAGE = PREFIX + "memory_preference_page_context"; //$NON-NLS-1$
|
public static final String MEMORY_PREFERENCE_PAGE = PREFIX + "memory_preference_page_context"; //$NON-NLS-1$
|
||||||
public static final String REGISTERS_PREFERENCE_PAGE = PREFIX + "registers_preference_page_context"; //$NON-NLS-1$
|
public static final String REGISTERS_PREFERENCE_PAGE = PREFIX + "registers_preference_page_context"; //$NON-NLS-1$
|
||||||
public static final String C_DEBUG_PREFERENCE_PAGE = PREFIX + "c_debug_preference_page_context"; //$NON-NLS-1$
|
public static final String C_DEBUG_PREFERENCE_PAGE = PREFIX + "c_debug_preference_page_context"; //$NON-NLS-1$
|
||||||
|
|
|
@ -110,4 +110,11 @@ public interface ICDebugPreferenceConstants
|
||||||
* When <code>true</code> the 'Auto-Refresh' option will be checked.
|
* When <code>true</code> the 'Auto-Refresh' option will be checked.
|
||||||
*/
|
*/
|
||||||
public static final String PREF_MEMORY_AUTO_REFRESH = ICDebugUIConstants.PLUGIN_ID + "Memory.auto_refresh"; //$NON-NLS-1$
|
public static final String PREF_MEMORY_AUTO_REFRESH = ICDebugUIConstants.PLUGIN_ID + "Memory.auto_refresh"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Boolean preference controlling whether the shared libraries view will be
|
||||||
|
* refreshed every time when the execution of program stops. When
|
||||||
|
* <code>true</code> the 'Auto-Refresh' option will be checked.
|
||||||
|
*/
|
||||||
|
public static final String PREF_SHARED_LIBRARIES_AUTO_REFRESH = ICDebugUIConstants.PLUGIN_ID + "SharedLibraries.auto_refresh"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.debug.internal.ui.preferences;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
|
||||||
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||||
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
import org.eclipse.ui.help.WorkbenchHelp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter type comment.
|
||||||
|
*
|
||||||
|
* @since: Feb 7, 2003
|
||||||
|
*/
|
||||||
|
public class SharedLibrariesViewPreferencePage extends FieldEditorPreferencePage
|
||||||
|
implements IWorkbenchPreferencePage
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for SharedLibrariesViewPreferencePage.
|
||||||
|
* @param style
|
||||||
|
*/
|
||||||
|
public SharedLibrariesViewPreferencePage()
|
||||||
|
{
|
||||||
|
super( GRID );
|
||||||
|
setDescription( "Shared Libraries View Settings." );
|
||||||
|
setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
||||||
|
*/
|
||||||
|
protected void createFieldEditors()
|
||||||
|
{
|
||||||
|
addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, "Auto-Refresh by default", getFieldEditorParent() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||||
|
*/
|
||||||
|
public void init( IWorkbench workbench )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
|
||||||
|
*/
|
||||||
|
public void createControl(Composite parent)
|
||||||
|
{
|
||||||
|
super.createControl( parent );
|
||||||
|
WorkbenchHelp.setHelp( parent, ICDebugHelpContextIds.SHARED_LIBRARIES_PREFERENCE_PAGE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void initDefaults( IPreferenceStore store )
|
||||||
|
{
|
||||||
|
store.setDefault( ICDebugPreferenceConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void createSpacer( Composite composite, int columnSpan )
|
||||||
|
{
|
||||||
|
Label label = new Label( composite, SWT.NONE );
|
||||||
|
GridData gd = new GridData();
|
||||||
|
gd.horizontalSpan = columnSpan;
|
||||||
|
label.setLayoutData( gd );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
|
||||||
|
*/
|
||||||
|
public boolean performOk()
|
||||||
|
{
|
||||||
|
boolean ok = super.performOk();
|
||||||
|
CDebugUIPlugin.getDefault().savePluginPreferences();
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.debug.internal.ui.editors.DisassemblyEditorInput;
|
||||||
import org.eclipse.cdt.debug.internal.ui.preferences.CDebugPreferencePage;
|
import org.eclipse.cdt.debug.internal.ui.preferences.CDebugPreferencePage;
|
||||||
import org.eclipse.cdt.debug.internal.ui.preferences.MemoryViewPreferencePage;
|
import org.eclipse.cdt.debug.internal.ui.preferences.MemoryViewPreferencePage;
|
||||||
import org.eclipse.cdt.debug.internal.ui.preferences.RegistersViewPreferencePage;
|
import org.eclipse.cdt.debug.internal.ui.preferences.RegistersViewPreferencePage;
|
||||||
|
import org.eclipse.cdt.debug.internal.ui.preferences.SharedLibrariesViewPreferencePage;
|
||||||
import org.eclipse.core.resources.IStorage;
|
import org.eclipse.core.resources.IStorage;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
|
@ -166,6 +167,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin
|
||||||
{
|
{
|
||||||
MemoryViewPreferencePage.initDefaults( pstore );
|
MemoryViewPreferencePage.initDefaults( pstore );
|
||||||
RegistersViewPreferencePage.initDefaults( pstore );
|
RegistersViewPreferencePage.initDefaults( pstore );
|
||||||
|
SharedLibrariesViewPreferencePage.initDefaults( pstore );
|
||||||
CDebugPreferencePage.initDefaults( pstore );
|
CDebugPreferencePage.initDefaults( pstore );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue