1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +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 ) {
final IStructuredSelection selection = getSelection();
if ( selection != null && selection.size() != 1 )
if ( selection == null || selection.size() != 1 )
return;
BusyIndicator.showWhile( Display.getCurrent(), new Runnable() {
@ -285,8 +285,8 @@ public class AddGlobalsActionDelegate extends ActionDelegate implements IViewAct
dlg.setTitle(ActionMessages.getString("AddGlobalsActionDelegate.title"));
dlg.setInitialSelections( gvm.getDescriptors() );
if ( dlg.open() == Window.OK ) {
List list = Arrays.asList( dlg.getResult() );
IGlobalVariableDescriptor[] selections = (IGlobalVariableDescriptor[])list.toArray( new IGlobalVariableDescriptor[list.size()] );
List<Object> list = Arrays.asList( dlg.getResult() );
IGlobalVariableDescriptor[] selections = list.toArray( new IGlobalVariableDescriptor[list.size()] );
gvm.addGlobals( selections );
}
}