1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix warnings

This commit is contained in:
John Cortell 2008-07-15 19:18:16 +00:00
parent 521dfafba6
commit f4e51c6139

View file

@ -110,7 +110,7 @@ public class AddGlobalsActionDelegate extends ActionDelegate implements IViewAct
*/ */
public void run( IAction action ) { public void run( IAction action ) {
final IStructuredSelection selection = getSelection(); final IStructuredSelection selection = getSelection();
if ( selection != null && selection.size() != 1 ) if ( selection == null || selection.size() != 1 )
return; return;
BusyIndicator.showWhile( Display.getCurrent(), new Runnable() { BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
@ -285,8 +285,8 @@ public class AddGlobalsActionDelegate extends ActionDelegate implements IViewAct
dlg.setTitle(ActionMessages.getString("AddGlobalsActionDelegate.title")); dlg.setTitle(ActionMessages.getString("AddGlobalsActionDelegate.title"));
dlg.setInitialSelections( gvm.getDescriptors() ); dlg.setInitialSelections( gvm.getDescriptors() );
if ( dlg.open() == Window.OK ) { if ( dlg.open() == Window.OK ) {
List list = Arrays.asList( dlg.getResult() ); List<Object> list = Arrays.asList( dlg.getResult() );
IGlobalVariableDescriptor[] selections = (IGlobalVariableDescriptor[])list.toArray( new IGlobalVariableDescriptor[list.size()] ); IGlobalVariableDescriptor[] selections = list.toArray( new IGlobalVariableDescriptor[list.size()] );
gvm.addGlobals( selections ); gvm.addGlobals( selections );
} }
} }