mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
Replaced deprecated methods and constants. Cleanup.
This commit is contained in:
parent
aea694040c
commit
6892af49a8
13 changed files with 37 additions and 26 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-11 Mikhail Khodjaiants
|
||||
Replaced deprecated methods and constants.
|
||||
* ListDialogField.java
|
||||
* SelectionButtonDialogField.java
|
||||
* StringButtonDialogField.java
|
||||
|
||||
2004-11-11 Mikhail Khodjaiants
|
||||
Fix for bug 75627: Incorrect limit to port numbers.
|
||||
* TCPSettingsBlock.java
|
||||
|
|
|
@ -281,7 +281,6 @@ public class ListDialogField extends DialogField {
|
|||
gd.horizontalAlignment= GridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= true;
|
||||
gd.verticalAlignment= GridData.BEGINNING;
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
|
||||
button.setLayoutData(gd);
|
||||
|
|
|
@ -80,7 +80,6 @@ public class SelectionButtonDialogField extends DialogField {
|
|||
gd.horizontalSpan= nColumns;
|
||||
gd.horizontalAlignment= GridData.FILL;
|
||||
if (fButtonStyle == SWT.PUSH) {
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ public class StringButtonDialogField extends StringDialogField {
|
|||
gd.horizontalAlignment= GridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= false;
|
||||
gd.horizontalSpan= span;
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
return gd;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
2005-01-11 Mikhail Khodjaiants
|
||||
Replaced deprecated methods and constants. Cleanup.
|
||||
* SWTUtil.java
|
||||
* EnableVariablesActionDelegate.java
|
||||
* RemoveGlobalsActionDelegate.java
|
||||
* ListDialogField.java
|
||||
* SelectionButtonDialogField.java
|
||||
* StringButtonDialogField.java
|
||||
* CDebugPreferencePage.java
|
||||
* CBreakpointPropertyPage.java
|
||||
|
||||
2005-01-11 Mikhail Khodjaiants
|
||||
Use the asynchronous implementation for resume, suspend, step etc provided by eclipse 3.1.
|
||||
* plugin.xml
|
||||
|
|
|
@ -70,10 +70,10 @@ public class SWTUtil {
|
|||
/**
|
||||
* Returns a height hint for a button control.
|
||||
*/
|
||||
public static int getButtonHeigthHint( Button button ) {
|
||||
PixelConverter converter = new PixelConverter( button );
|
||||
return converter.convertVerticalDLUsToPixels( IDialogConstants.BUTTON_HEIGHT );
|
||||
}
|
||||
// public static int getButtonHeigthHint( Button button ) {
|
||||
// PixelConverter converter = new PixelConverter( button );
|
||||
// return converter.convertVerticalDLUsToPixels( IDialogConstants.BUTTON_HEIGHT );
|
||||
// }
|
||||
|
||||
/**
|
||||
* Sets width and height hint for the button control. <b>Note:</b> This
|
||||
|
@ -85,8 +85,8 @@ public class SWTUtil {
|
|||
Assert.isNotNull( button );
|
||||
Object gd = button.getLayoutData();
|
||||
if ( gd instanceof GridData ) {
|
||||
((GridData)gd).heightHint = getButtonHeigthHint( button );
|
||||
((GridData)gd).widthHint = getButtonWidthHint( button );
|
||||
((GridData)gd).horizontalAlignment = GridData.FILL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,13 +78,13 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate {
|
|||
final int size = selection.size();
|
||||
if ( size == 0 )
|
||||
return;
|
||||
final Iterator enum = selection.iterator();
|
||||
final Iterator it = selection.iterator();
|
||||
final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.getString( "EnableVariablesActionDelegate.0" ), null ); //$NON-NLS-1$
|
||||
BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
|
||||
|
||||
public void run() {
|
||||
while( enum.hasNext() ) {
|
||||
IEnableDisableTarget target = getEnableDisableTarget( enum.next() );
|
||||
while( it.hasNext() ) {
|
||||
IEnableDisableTarget target = getEnableDisableTarget( it.next() );
|
||||
if ( target != null ) {
|
||||
try {
|
||||
if ( size > 1 ) {
|
||||
|
@ -119,11 +119,11 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate {
|
|||
Object o = sel.getFirstElement();
|
||||
if ( getEnableDisableTarget( o ) == null )
|
||||
return;
|
||||
Iterator enum = sel.iterator();
|
||||
Iterator it = sel.iterator();
|
||||
boolean allEnabled = true;
|
||||
boolean allDisabled = true;
|
||||
while( enum.hasNext() ) {
|
||||
IEnableDisableTarget target = getEnableDisableTarget( enum.next() );
|
||||
while( it.hasNext() ) {
|
||||
IEnableDisableTarget target = getEnableDisableTarget( it.next() );
|
||||
if ( target != null && !target.canEnableDisable() )
|
||||
continue;
|
||||
if ( target.isEnabled() )
|
||||
|
|
|
@ -53,10 +53,10 @@ public class RemoveGlobalsActionDelegate extends ActionDelegate implements IView
|
|||
if ( !(selection instanceof IStructuredSelection) )
|
||||
return;
|
||||
IStructuredSelection ss = (IStructuredSelection)selection;
|
||||
final Iterator enum = ss.iterator();
|
||||
final Iterator it = ss.iterator();
|
||||
ArrayList list = new ArrayList( ss.size() );
|
||||
while( enum.hasNext() ) {
|
||||
Object obj = enum.next();
|
||||
while( it.hasNext() ) {
|
||||
Object obj = it.next();
|
||||
if ( obj instanceof ICGlobalVariable )
|
||||
list.add( obj );
|
||||
}
|
||||
|
|
|
@ -281,7 +281,6 @@ public class ListDialogField extends DialogField {
|
|||
gd.horizontalAlignment= GridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= true;
|
||||
gd.verticalAlignment= GridData.BEGINNING;
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
|
||||
button.setLayoutData(gd);
|
||||
|
|
|
@ -80,7 +80,6 @@ public class SelectionButtonDialogField extends DialogField {
|
|||
gd.horizontalSpan= nColumns;
|
||||
gd.horizontalAlignment= GridData.FILL;
|
||||
if (fButtonStyle == SWT.PUSH) {
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ public class StringButtonDialogField extends StringDialogField {
|
|||
gd.horizontalAlignment= GridData.FILL;
|
||||
gd.grabExcessHorizontalSpace= false;
|
||||
gd.horizontalSpan= span;
|
||||
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
|
||||
gd.widthHint = SWTUtil.getButtonWidthHint(button);
|
||||
return gd;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
GridData data = (GridData)fMaxNumberOfInstructionsText.getTextControl( parent ).getLayoutData();
|
||||
data.horizontalAlignment = GridData.BEGINNING;
|
||||
data.widthHint = convertWidthInCharsToPixels( NUMBER_OF_DIGITS + 1 );
|
||||
fMaxNumberOfInstructionsText.setPreferencePage( this );
|
||||
fMaxNumberOfInstructionsText.setPage( this );
|
||||
fMaxNumberOfInstructionsText.setValidateStrategy( StringFieldEditor.VALIDATE_ON_KEY_STROKE );
|
||||
fMaxNumberOfInstructionsText.setValidRange( ICDebugConstants.MIN_NUMBER_OF_INSTRUCTIONS, ICDebugConstants.MAX_NUMBER_OF_INSTRUCTIONS );
|
||||
String minValue = Integer.toString( ICDebugConstants.MIN_NUMBER_OF_INSTRUCTIONS );
|
||||
|
@ -237,7 +237,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
|||
|
||||
private void createDisassemblyColorsField( Composite parent ) {
|
||||
fDisassemblySourceColor = new ColorFieldEditor( IInternalCDebugUIConstants.DISASSEMBLY_SOURCE_LINE_COLOR, PreferenceMessages.getString( "CDebugPreferencePage.Color_of_disassembly_source_lines_1" ), parent ); //$NON-NLS-1$
|
||||
fDisassemblySourceColor.setPreferencePage( this );
|
||||
fDisassemblySourceColor.setPage( this );
|
||||
fDisassemblySourceColor.setPreferenceStore( getPreferenceStore() );
|
||||
fDisassemblySourceColor.load();
|
||||
}
|
||||
|
|
|
@ -88,8 +88,8 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
|
|||
* Clears the error message from the message line if the error message is the error message from this field editor.
|
||||
*/
|
||||
protected void clearErrorMessage() {
|
||||
if ( getPreferencePage() != null ) {
|
||||
String message = getPreferencePage().getErrorMessage();
|
||||
if ( getPage() != null ) {
|
||||
String message = getPage().getErrorMessage();
|
||||
if ( message != null ) {
|
||||
if ( getErrorMessage().equals( message ) ) {
|
||||
super.clearErrorMessage();
|
||||
|
@ -138,8 +138,8 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
|
|||
* Clears the error message from the message line if the error message is the error message from this field editor.
|
||||
*/
|
||||
protected void clearErrorMessage() {
|
||||
if ( getPreferencePage() != null ) {
|
||||
String message = getPreferencePage().getErrorMessage();
|
||||
if ( getPage() != null ) {
|
||||
String message = getPage().getErrorMessage();
|
||||
if ( message != null ) {
|
||||
if ( getErrorMessage().equals( message ) ) {
|
||||
super.clearErrorMessage();
|
||||
|
|
Loading…
Add table
Reference in a new issue