mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Cleanup.
This commit is contained in:
parent
f7359eac05
commit
ca76e63e63
22 changed files with 52 additions and 39 deletions
|
@ -1,3 +1,27 @@
|
|||
2003-11-26 Mikhail Khodjaiants
|
||||
Cleanup.
|
||||
* CDTDebugModelPresentation.java
|
||||
* AddExpressionActionDelegate.java
|
||||
* AddGlobalsActionDelegate.java
|
||||
* AddWatchpointActionDelegate.java
|
||||
* AddWatchpointDialog.java
|
||||
* AutoRefreshAction.java
|
||||
* CBreakpointPreferencePage.java
|
||||
* ExpressionDialog.java
|
||||
* ManageBreakpointRulerAction.java
|
||||
* MemoryFormatAction.java
|
||||
* MemoryNumberOfColumnAction.java
|
||||
* MemorySizeAction.java
|
||||
* RunToLineRulerAction.java
|
||||
* ShowRegisterTypesAction.java
|
||||
* ComboDialogField.java
|
||||
* DisassemblyMarkerAnnotationModel.java
|
||||
* MemoryViewer.java
|
||||
* AddProjectSourceLocationBlock.java
|
||||
* CDebugUIPlugin.java
|
||||
* SourceLookupBlock.java
|
||||
* SourcePropertyPage.java
|
||||
|
||||
2003-11-21 Mikhail Khodjaiants
|
||||
Use "symbol not available" for empty function names when generating a stack frame label.
|
||||
* CDTDebugModelPresentation.java
|
||||
|
|
|
@ -689,7 +689,6 @@ public class CDTDebugModelPresentation extends LabelProvider
|
|||
{
|
||||
descriptor = DebugUITools.getImageDescriptor( IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED );
|
||||
}
|
||||
;
|
||||
return fImageCache.getImageFor( new OverlayImageDescriptor( fDebugImageRegistry.get( descriptor ), computeBreakpointOverlays( breakpoint ) ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ import org.eclipse.debug.core.model.IExpression;
|
|||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.text.ITextSelection;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
|
@ -50,7 +50,7 @@ public class AddExpressionActionDelegate extends AbstractEditorActionDelegate
|
|||
{
|
||||
String text = getSelectedText();
|
||||
ExpressionDialog dlg = new ExpressionDialog( getShell(), text );
|
||||
if ( dlg.open() != Dialog.OK )
|
||||
if ( dlg.open() != Window.OK )
|
||||
return;
|
||||
createExpression( dlg.getExpression() );
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ import org.eclipse.debug.core.model.IExpression;
|
|||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.custom.BusyIndicator;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.IPartListener;
|
||||
|
@ -320,14 +320,14 @@ public class AddGlobalsActionDelegate extends ActionDelegate
|
|||
IExecFileInfo info = (IExecFileInfo)((IDebugElement)element).getDebugTarget().getAdapter( IExecFileInfo.class );
|
||||
if ( info != null )
|
||||
{
|
||||
IGlobalVariable[] globalVars = (IGlobalVariable[])info.getGlobals();
|
||||
IGlobalVariable[] globalVars = info.getGlobals();
|
||||
fGlobals = new Global[globalVars.length];
|
||||
for ( int i = 0; i < globalVars.length; ++i )
|
||||
{
|
||||
fGlobals[i] = new Global( globalVars[i].getName(), globalVars[i].getPath() );
|
||||
}
|
||||
ListSelectionDialog dlg = createDialog();
|
||||
if ( dlg.open() == Dialog.OK )
|
||||
if ( dlg.open() == Window.OK )
|
||||
{
|
||||
MultiStatus ms = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null );
|
||||
Object[] selections = dlg.getResult();
|
||||
|
|
|
@ -11,11 +11,11 @@ import org.eclipse.core.resources.IFile;
|
|||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.ITextSelection;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.ISelectionProvider;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IFileEditorInput;
|
||||
|
@ -77,7 +77,7 @@ public class AddWatchpointActionDelegate extends ActionDelegate
|
|||
true,
|
||||
false,
|
||||
expression );
|
||||
if ( dlg.open() != Dialog.OK )
|
||||
if ( dlg.open() != Window.OK )
|
||||
return;
|
||||
if ( getTextEditor() != null )
|
||||
{
|
||||
|
|
|
@ -32,7 +32,6 @@ import org.eclipse.swt.widgets.Text;
|
|||
public class AddWatchpointDialog extends Dialog
|
||||
{
|
||||
private Button fBtnOk = null;
|
||||
private Button fBtnCancel = null;
|
||||
private Text fTextExpression;
|
||||
private Button fChkBtnWrite;
|
||||
private Button fChkBtnRead;
|
||||
|
@ -82,7 +81,7 @@ public class AddWatchpointDialog extends Dialog
|
|||
protected void createButtonsForButtonBar( Composite parent )
|
||||
{
|
||||
fBtnOk = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
|
||||
fBtnCancel = createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
|
||||
createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
|
||||
}
|
||||
|
||||
private void createDataWidgets( Composite parent )
|
||||
|
|
|
@ -8,6 +8,7 @@ package org.eclipse.cdt.debug.internal.ui.actions;
|
|||
import org.eclipse.cdt.debug.core.ICUpdateManager;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.ui.texteditor.IUpdate;
|
||||
|
||||
|
@ -25,7 +26,7 @@ public class AutoRefreshAction extends Action implements IUpdate
|
|||
*/
|
||||
public AutoRefreshAction( Viewer viewer, String text )
|
||||
{
|
||||
super( text, Action.AS_CHECK_BOX );
|
||||
super( text, IAction.AS_CHECK_BOX );
|
||||
fViewer = viewer;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,6 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage
|
|||
}
|
||||
}
|
||||
|
||||
private Text fConditionTextControl;
|
||||
private BreakpointStringFieldEditor fCondition;
|
||||
|
||||
private Text fIgnoreCountTextControl;
|
||||
|
@ -389,7 +388,6 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage
|
|||
protected void createConditionEditor( Composite parent )
|
||||
{
|
||||
fCondition = new BreakpointStringFieldEditor( CBreakpointPreferenceStore.CONDITION, "&Condition", parent );
|
||||
fConditionTextControl = fCondition.getTextControl(parent);
|
||||
fCondition.setEmptyStringAllowed( true );
|
||||
fCondition.setErrorMessage( "Invalid_condition" );
|
||||
addField( fCondition );
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.swt.widgets.Text;
|
|||
public class ExpressionDialog extends Dialog
|
||||
{
|
||||
private Button fBtnOk = null;
|
||||
private Button fBtnCancel = null;
|
||||
private Text fTextExpression;
|
||||
|
||||
private String fExpression = "";
|
||||
|
@ -74,7 +73,7 @@ public class ExpressionDialog extends Dialog
|
|||
protected void createButtonsForButtonBar( Composite parent )
|
||||
{
|
||||
fBtnOk = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
|
||||
fBtnCancel = createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
|
||||
createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
|
||||
}
|
||||
|
||||
private void createDataWidgets( Composite parent )
|
||||
|
|
|
@ -46,7 +46,6 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate
|
|||
{
|
||||
private IVerticalRulerInfo fRuler;
|
||||
private ITextEditor fTextEditor;
|
||||
private String fMarkerType;
|
||||
private List fMarkers;
|
||||
|
||||
private String fAddLabel;
|
||||
|
@ -62,7 +61,6 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate
|
|||
{
|
||||
fRuler = ruler;
|
||||
fTextEditor = editor;
|
||||
fMarkerType = IBreakpoint.BREAKPOINT_MARKER;
|
||||
fAddLabel = "Add Breakpoint";
|
||||
fRemoveLabel = "Remove Breakpoint";
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer;
|
|||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.ui.texteditor.IUpdate;
|
||||
|
||||
/**
|
||||
|
@ -31,7 +32,7 @@ public class MemoryFormatAction extends Action implements IUpdate
|
|||
MemoryViewer viewer,
|
||||
int format )
|
||||
{
|
||||
super( getLabel( format ), Action.AS_CHECK_BOX );
|
||||
super( getLabel( format ), IAction.AS_CHECK_BOX );
|
||||
fGroup = group;
|
||||
fMemoryViewer = viewer;
|
||||
fFormat = format;
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer;
|
|||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.ui.texteditor.IUpdate;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +30,7 @@ public class MemoryNumberOfColumnAction extends Action implements IUpdate
|
|||
MemoryViewer viewer,
|
||||
int numberOfColumns )
|
||||
{
|
||||
super( getLabel( numberOfColumns ), Action.AS_CHECK_BOX );
|
||||
super( getLabel( numberOfColumns ), IAction.AS_CHECK_BOX );
|
||||
fGroup = group;
|
||||
fMemoryViewer = viewer;
|
||||
fNumberOfColumns = numberOfColumns;
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer;
|
|||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.ui.texteditor.IUpdate;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +31,7 @@ public class MemorySizeAction extends Action implements IUpdate
|
|||
MemoryViewer viewer,
|
||||
int id )
|
||||
{
|
||||
super( getLabel( id ), Action.AS_CHECK_BOX );
|
||||
super( getLabel( id ), IAction.AS_CHECK_BOX );
|
||||
fGroup = group;
|
||||
fMemoryViewer = viewer;
|
||||
fId = id;
|
||||
|
|
|
@ -65,7 +65,7 @@ public class RunToLineRulerAction extends Action
|
|||
IDocument doc = provider.getDocument( getTextEditor().getEditorInput() );
|
||||
if ( file != null && lineNumber <= doc.getNumberOfLines() && lineNumber > 0 )
|
||||
{
|
||||
enabled = ( getTarget() != null && ((IRunToLine)getTarget()).canRunToLine( file, lineNumber ) );
|
||||
enabled = ( getTarget() != null && getTarget().canRunToLine( file, lineNumber ) );
|
||||
}
|
||||
setEnabled( enabled );
|
||||
}
|
||||
|
@ -156,14 +156,14 @@ public class RunToLineRulerAction extends Action
|
|||
|
||||
protected void runToLine( IFile file, int lineNumber )
|
||||
{
|
||||
if ( !((IRunToLine)getTarget()).canRunToLine( file, lineNumber ) )
|
||||
if ( !getTarget().canRunToLine( file, lineNumber ) )
|
||||
{
|
||||
getTextEditor().getSite().getShell().getDisplay().beep();
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
((IRunToLine)getTarget()).runToLine( file, lineNumber );
|
||||
getTarget().runToLine( file, lineNumber );
|
||||
}
|
||||
catch( DebugException e )
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
|||
import org.eclipse.debug.ui.IDebugModelPresentation;
|
||||
import org.eclipse.debug.ui.IDebugView;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.StructuredViewer;
|
||||
import org.eclipse.swt.custom.BusyIndicator;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
@ -31,7 +32,7 @@ public class ShowRegisterTypesAction extends Action
|
|||
*/
|
||||
public ShowRegisterTypesAction( IDebugView view )
|
||||
{
|
||||
super( "Show &Type Names", Action.AS_CHECK_BOX );
|
||||
super( "Show &Type Names", IAction.AS_CHECK_BOX );
|
||||
setView( view );
|
||||
setToolTipText( "Show Type Names" );
|
||||
CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_TYPE_NAMES );
|
||||
|
|
|
@ -97,7 +97,8 @@ public class ComboDialogField extends DialogField {
|
|||
doSelectionChanged(e);
|
||||
}
|
||||
|
||||
public void widgetDefaultSelected(SelectionEvent e) { };
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
};
|
||||
|
||||
fComboControl= new Combo(parent, fFlags);
|
||||
|
|
|
@ -63,7 +63,7 @@ public class DisassemblyMarkerAnnotationModel extends AbstractMarkerAnnotationMo
|
|||
doHandleCoreException( x, "Resource Changed" );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal resource delta visitor.
|
||||
|
@ -82,7 +82,7 @@ public class DisassemblyMarkerAnnotationModel extends AbstractMarkerAnnotationMo
|
|||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** The workspace */
|
||||
private IWorkspace fWorkspace;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.internal.ui.views.memory;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICMemoryManager;
|
||||
import org.eclipse.cdt.debug.core.model.IFormattedMemoryBlock;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.jface.text.ITextOperationTarget;
|
||||
|
@ -154,7 +153,7 @@ public class MemoryViewer extends ContentViewer
|
|||
protected void inputChanged( Object input, Object oldInput )
|
||||
{
|
||||
for ( int i = 0; i < fMemoryControlAreas.length; ++i )
|
||||
fMemoryControlAreas[i].setInput( (ICMemoryManager)input );
|
||||
fMemoryControlAreas[i].setInput( input );
|
||||
}
|
||||
|
||||
protected CTabFolder getTabFolder()
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||
|
||||
|
@ -33,7 +32,6 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
|
|||
public class AddProjectSourceLocationBlock
|
||||
{
|
||||
private Composite fControl = null;
|
||||
private Shell fShell = null;
|
||||
private TableViewer fViewer;
|
||||
|
||||
protected IProject[] fProjects = null;
|
||||
|
@ -48,7 +46,6 @@ public class AddProjectSourceLocationBlock
|
|||
|
||||
public void createControl( Composite parent )
|
||||
{
|
||||
fShell = parent.getShell();
|
||||
fControl = new Composite( parent, SWT.NONE );
|
||||
fControl.setLayout( new GridLayout() );
|
||||
fControl.setLayoutData( new GridData( GridData.FILL_BOTH ) );
|
||||
|
|
|
@ -218,7 +218,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin
|
|||
try {
|
||||
tab = (ILaunchConfigurationTab) configElement.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
} catch(CoreException ce) {
|
||||
log(new Status(Status.ERROR, getUniqueIdentifier(), 100, "An error occurred retrieving a C Debugger page", ce));
|
||||
log(new Status(IStatus.ERROR, getUniqueIdentifier(), 100, "An error occurred retrieving a C Debugger page", ce));
|
||||
}
|
||||
}
|
||||
return tab;
|
||||
|
|
|
@ -49,7 +49,6 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -60,7 +59,6 @@ import org.eclipse.swt.widgets.Shell;
|
|||
public class SourceLookupBlock implements Observer
|
||||
{
|
||||
private Composite fControl = null;
|
||||
private Shell fShell = null;
|
||||
private CheckedListDialogField fGeneratedSourceListField;
|
||||
private SourceListDialogField fAddedSourceListField;
|
||||
private SelectionButtonDialogField fSearchForDuplicateFiles;
|
||||
|
@ -80,7 +78,6 @@ public class SourceLookupBlock implements Observer
|
|||
|
||||
public void createControl( Composite parent )
|
||||
{
|
||||
fShell = parent.getShell();
|
||||
fControl = new Composite( parent, SWT.NONE );
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.numColumns = 2;
|
||||
|
|
|
@ -30,8 +30,6 @@ import org.eclipse.ui.dialogs.PropertyPage;
|
|||
public class SourcePropertyPage extends PropertyPage
|
||||
{
|
||||
private SourceLookupBlock fBlock = null;
|
||||
|
||||
private boolean fHasActiveContents = false;
|
||||
|
||||
/**
|
||||
* Constructor for SourcePropertyPage.
|
||||
|
@ -52,7 +50,6 @@ public class SourcePropertyPage extends PropertyPage
|
|||
{
|
||||
return createTerminatedContents( parent );
|
||||
}
|
||||
fHasActiveContents = true;
|
||||
return createActiveContents( parent );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue