mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
Removed "Refresh" and "Auto-Refresh" actions from the shared libraries view.
This commit is contained in:
parent
a740df2852
commit
396ecd8664
7 changed files with 9 additions and 322 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-11-04 Mikhail Khodjaiants
|
||||
Removed "Refresh" and "Auto-Refresh" actions from the shared libraries view.
|
||||
* AbstractAutoRefreshActionDelegate.java: removed
|
||||
* AbstractRefreshAction.java: removed
|
||||
* AutoRefreshSharedLibrariesActionDelegate.java: removed
|
||||
* RefreshSharedLibrariesAction.java: removed
|
||||
* CDebugPreferencePage.java
|
||||
* plugin.xml
|
||||
|
||||
2004-11-04 Mikhail Khodjaiants
|
||||
Removed "Refresh" and "Auto-Refresh" actions from the registers view.
|
||||
* AutoRefreshRegistersActionDelegate.java: removed
|
||||
|
|
|
@ -440,36 +440,6 @@
|
|||
<viewerContribution
|
||||
targetID="org.eclipse.cdt.debug.ui.SharedLibrariesView"
|
||||
id="org.eclipse.cdt.debug.ui.SharedLibrariesViewPopupActions">
|
||||
<action
|
||||
helpContextId="refresh_shared_libraries_context"
|
||||
label="%RefreshAction.label"
|
||||
tooltip="%RefreshAction.tooltip"
|
||||
icon="icons/full/elcl16/refresh_co.gif"
|
||||
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction"
|
||||
style="push"
|
||||
menubarPath="refreshGroup"
|
||||
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction">
|
||||
<enablement>
|
||||
<pluginState
|
||||
value="activated"
|
||||
id="org.eclipse.cdt.debug.ui"/>
|
||||
</enablement>
|
||||
</action>
|
||||
<action
|
||||
helpContextId="auto_refresh_shared_libraries_context"
|
||||
label="%AutoRefreshAction.label"
|
||||
tooltip="%AutoRefreshAction.tooltip"
|
||||
icon="icons/full/elcl16/auto_refresh_co.gif"
|
||||
class="org.eclipse.cdt.debug.internal.ui.actions.AutoRefreshSharedLibrariesActionDelegate"
|
||||
style="toggle"
|
||||
menubarPath="refreshGroup"
|
||||
id="org.eclipse.cdt.debug.internal.ui.actions.AutoRefreshSharedLibrariesActionDelegate">
|
||||
<enablement>
|
||||
<pluginState
|
||||
value="activated"
|
||||
id="org.eclipse.cdt.debug.ui"/>
|
||||
</enablement>
|
||||
</action>
|
||||
<action
|
||||
helpContextId="load_symbols_for_all_context"
|
||||
label="%LoadSymbolsForAllAction.label"
|
||||
|
@ -897,40 +867,6 @@
|
|||
<viewContribution
|
||||
targetID="org.eclipse.cdt.debug.ui.SharedLibrariesView"
|
||||
id="org.eclipse.debug.ui.sharedLibrariesView.toolbar">
|
||||
<action
|
||||
helpContextId="refresh_shared_libraries_context"
|
||||
disabledIcon="icons/full/dlcl16/refresh_co.gif"
|
||||
hoverIcon="icons/full/clcl16/refresh_co.gif"
|
||||
toolbarPath="refreshGroup"
|
||||
label="%RefreshAction.label"
|
||||
tooltip="%RefreshAction.tooltip"
|
||||
icon="icons/full/elcl16/refresh_co.gif"
|
||||
class="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction"
|
||||
style="push"
|
||||
id="org.eclipse.cdt.debug.internal.ui.actions.RefreshSharedLibrariesAction">
|
||||
<enablement>
|
||||
<pluginState
|
||||
value="activated"
|
||||
id="org.eclipse.cdt.debug.ui"/>
|
||||
</enablement>
|
||||
</action>
|
||||
<action
|
||||
helpContextId="auto_refresh_shared_libraries_context"
|
||||
disabledIcon="icons/full/dlcl16/auto_refresh_co.gif"
|
||||
hoverIcon="icons/full/clcl16/auto_refresh_co.gif"
|
||||
toolbarPath="refreshGroup"
|
||||
label="%AutoRefreshAction.label"
|
||||
tooltip="%AutoRefreshAction.tooltip"
|
||||
icon="icons/full/elcl16/auto_refresh_co.gif"
|
||||
class="org.eclipse.cdt.debug.internal.ui.actions.AutoRefreshSharedLibrariesActionDelegate"
|
||||
style="toggle"
|
||||
id="org.eclipse.cdt.debug.internal.ui.actions.AutoRefreshSharedLibrariesActionDelegate">
|
||||
<enablement>
|
||||
<pluginState
|
||||
value="activated"
|
||||
id="org.eclipse.cdt.debug.ui"/>
|
||||
</enablement>
|
||||
</action>
|
||||
<action
|
||||
helpContextId="load_symbols_for_all_context"
|
||||
disabledIcon="icons/full/dlcl16/load_all_symbols_co.gif"
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2004 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
/**
|
||||
* The superclass for all "Auto-Refresh" action delegates.
|
||||
*/
|
||||
public abstract class AbstractAutoRefreshActionDelegate extends AbstractRefreshActionDelegate implements Observer{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractRefreshActionDelegate#doAction()
|
||||
*/
|
||||
protected void doAction() throws DebugException {
|
||||
IAction action = getAction();
|
||||
if ( action != null ) {
|
||||
IStructuredSelection selection = getSelection();
|
||||
if ( !selection.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( selection.getFirstElement() );
|
||||
if ( um != null )
|
||||
um.setAutoModeEnabled( action.isChecked() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractRefreshActionDelegate#update()
|
||||
*/
|
||||
protected void update() {
|
||||
IAction action = getAction();
|
||||
if ( action != null ) {
|
||||
boolean enabled = false;
|
||||
boolean checked = false;
|
||||
IStructuredSelection selection = getSelection();
|
||||
if ( !selection.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( selection.getFirstElement() );
|
||||
if ( um != null && um.canUpdate() )
|
||||
enabled = true;
|
||||
if ( um != null && um.getAutoModeEnabled() )
|
||||
checked = true;
|
||||
}
|
||||
action.setEnabled( enabled );
|
||||
action.setChecked( checked );
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
|
||||
*/
|
||||
public void selectionChanged( IWorkbenchPart part, ISelection selection ) {
|
||||
IStructuredSelection ss = getSelection();
|
||||
if ( !ss.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( ss.getFirstElement() );
|
||||
if ( um instanceof Observable ) {
|
||||
((Observable)um).deleteObserver( this );
|
||||
}
|
||||
}
|
||||
super.selectionChanged( part, selection );
|
||||
ss = getSelection();
|
||||
if ( !ss.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( ss.getFirstElement() );
|
||||
if ( um instanceof Observable ) {
|
||||
((Observable)um).addObserver( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate2#dispose()
|
||||
*/
|
||||
public void dispose() {
|
||||
IStructuredSelection ss = getSelection();
|
||||
if ( !ss.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( ss.getFirstElement() );
|
||||
if ( um instanceof Observable ) {
|
||||
((Observable)um).deleteObserver( this );
|
||||
}
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.util.Observer#update(java.util.Observable, java.lang.Object)
|
||||
*/
|
||||
public void update( Observable o, Object arg ) {
|
||||
update();
|
||||
}
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2004 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||
import org.eclipse.debug.core.DebugEvent;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
|
||||
/**
|
||||
* The superclass for all "Refresh" action delegates.
|
||||
*/
|
||||
public abstract class AbstractRefreshActionDelegate extends AbstractViewActionDelegate {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractViewActionDelegate#getErrorDialogTitle()
|
||||
*/
|
||||
protected String getErrorDialogTitle() {
|
||||
return ActionMessages.getString( "AbstractRefreshActionDelegate.Error_1" ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractViewActionDelegate#getErrorDialogMessage()
|
||||
*/
|
||||
protected String getErrorDialogMessage() {
|
||||
return ActionMessages.getString( "AbstractRefreshActionDelegate.Error(s)_occurred_refreshing_the_view_1" ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractViewActionDelegate#doAction()
|
||||
*/
|
||||
protected void doAction() throws DebugException {
|
||||
if ( getView() != null ) {
|
||||
ICUpdateManager um = getUpdateManager( getView().getViewer().getInput() );
|
||||
if ( um != null )
|
||||
um.update();
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractViewActionDelegate#update()
|
||||
*/
|
||||
protected void update() {
|
||||
IAction action = getAction();
|
||||
if ( action != null ) {
|
||||
boolean enabled = false;
|
||||
IStructuredSelection selection = getSelection();
|
||||
if ( !selection.isEmpty() ) {
|
||||
ICUpdateManager um = getUpdateManager( selection.getFirstElement() );
|
||||
if ( um != null && um.canUpdate() )
|
||||
enabled = true;
|
||||
}
|
||||
action.setEnabled( enabled );
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractViewActionDelegate#doHandleDebugEvent(org.eclipse.debug.core.DebugEvent)
|
||||
*/
|
||||
protected void doHandleDebugEvent( DebugEvent event ) {
|
||||
switch( event.getKind() ) {
|
||||
case DebugEvent.TERMINATE:
|
||||
update();
|
||||
break;
|
||||
case DebugEvent.RESUME:
|
||||
if ( !event.isEvaluation() || !((event.getDetail() & DebugEvent.EVALUATION_IMPLICIT) != 0) ) {
|
||||
update();
|
||||
}
|
||||
break;
|
||||
case DebugEvent.SUSPEND:
|
||||
update();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract ICUpdateManager getUpdateManager( Object element );
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2004 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||
import org.eclipse.debug.core.model.IDebugElement;
|
||||
|
||||
/**
|
||||
* A delegate for the "Auto-Refresh" action of the Shared Libraries view.
|
||||
*/
|
||||
public class AutoRefreshSharedLibrariesActionDelegate extends AbstractAutoRefreshActionDelegate {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractAutoRefreshActionDelegate#getUpdateManager(java.lang.Object)
|
||||
*/
|
||||
protected ICUpdateManager getUpdateManager( Object element ) {
|
||||
if ( element instanceof IDebugElement ) {
|
||||
return (ICUpdateManager)((IDebugElement)element).getDebugTarget().getAdapter( ICSharedLibraryManager.class );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2004 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
|
||||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||
import org.eclipse.debug.core.model.IDebugElement;
|
||||
|
||||
/**
|
||||
* The delegate for the "Refresh" action of the Shared Libraries view.
|
||||
*/
|
||||
public class RefreshSharedLibrariesAction extends AbstractRefreshActionDelegate {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.internal.ui.actions.RefreshActionDelegate#getUpdateManager(java.lang.Object)
|
||||
*/
|
||||
protected ICUpdateManager getUpdateManager( Object element ) {
|
||||
if ( element instanceof IDebugElement ) {
|
||||
return (ICUpdateManager)((IDebugElement)element).getDebugTarget().getAdapter( ICSharedLibraryManager.class );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -56,8 +56,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
// View setting widgets
|
||||
private Button fPathsButton;
|
||||
|
||||
private Button fRefreshSolibsButton;
|
||||
|
||||
private Combo fVariableFormatCombo;
|
||||
|
||||
private Combo fExpressionFormatCombo;
|
||||
|
@ -154,7 +152,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
private void setValues() {
|
||||
IPreferenceStore store = getPreferenceStore();
|
||||
fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
|
||||
fRefreshSolibsButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
|
||||
getMaxNumberOfInstructionsText().setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() );
|
||||
getDisassemblySourceColor().load();
|
||||
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
|
||||
|
@ -204,7 +201,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
private void createViewSettingPreferences( Composite parent ) {
|
||||
Composite comp = createGroupComposite( parent, 1, PreferenceMessages.getString( "CDebugPreferencePage.4" ) ); //$NON-NLS-1$
|
||||
fPathsButton = createCheckButton( comp, PreferenceMessages.getString( "CDebugPreferencePage.5" ) ); //$NON-NLS-1$
|
||||
fRefreshSolibsButton = createCheckButton( comp, PreferenceMessages.getString( "CDebugPreferencePage.7" ) ); //$NON-NLS-1$
|
||||
Composite formatComposite = ControlFactory.createCompositeEx( comp, 2, 0 );
|
||||
((GridLayout)formatComposite.getLayout()).makeColumnsEqualWidth = true;
|
||||
fVariableFormatCombo = createComboBox( formatComposite, PreferenceMessages.getString( "CDebugPreferencePage.8" ), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$
|
||||
|
@ -336,7 +332,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
private void storeValues() {
|
||||
IPreferenceStore store = getPreferenceStore();
|
||||
store.setValue( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS, fPathsButton.getSelection() );
|
||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, fRefreshSolibsButton.getSelection() );
|
||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, getMaxNumberOfInstructionsText().getIntValue() );
|
||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, getFormatId( fVariableFormatCombo.getSelectionIndex() ) );
|
||||
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.getSelectionIndex() ) );
|
||||
|
@ -357,7 +352,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
private void setDefaultValues() {
|
||||
IPreferenceStore store = getPreferenceStore();
|
||||
fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
|
||||
fRefreshSolibsButton.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) );
|
||||
getMaxNumberOfInstructionsText().setStringValue( new Integer( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS ) ).toString() );
|
||||
getDisassemblySourceColor().loadDefault();
|
||||
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
|
||||
|
|
Loading…
Add table
Reference in a new issue