mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Fix warnings
This commit is contained in:
parent
521dfafba6
commit
f4e51c6139
1 changed files with 3 additions and 3 deletions
|
@ -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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue