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