@SuppressWarnings("unchecked")
    public void run(IAction action) {
        if (selectedItems == null) {
            return;
        }
        String msg = null;
        if (selectedItems.size() == 1) {
            msg = MessageFormat.format(Messages.getString("delete.singlefile.confirmation"), //$NON-NLS-1$
                                      new Object[] { ((IFile)selectedItems.getFirstElement()).getName() });
        } else {
            msg = MessageFormat.format(Messages.getString("delete.multifile.confirmation"), //$NON-NLS-1$
                                      new Object[] { String.valueOf(selectedItems.size()) });
        }
        if (!MessageDialog.openConfirm(targetPart.getSite().getShell(),
                                      Messages.getString("delete.confirmation.dialog.caption"), msg)) { //$NON-NLS-1$
            return;
        }
        for (Iterator it = selectedItems.iterator(); it.hasNext();) {
            Object oneItem = it.next();
            if (oneItem instanceof IFile) {
                processDelete((IFile)oneItem);
            }
        }
        DisconnectAction dsAction = new DisconnectAction();
        dsAction.disconnect(selectedItems);
        PlatformUtils.updateDecoration();
        PlatformUtils.refreshRepositoryView();
    }
@SuppressWarnings("unchecked")
    public void run(IAction action) {
        if (selectedItems == null) {
            return;
        }
        String msg = null;
        if (selectedItems.size() == 1) {
            msg = MessageFormat.format(Messages.getString("delete.singlefile.confirmation"), 
                                      new Object[] { ((IFile)selectedItems.getFirstElement()).getName() });
        } else {
            msg = MessageFormat.format(Messages.getString("delete.multifile.confirmation"), 
                                      new Object[] { String.valueOf(selectedItems.size()) });
        }
        if (!MessageDialog.openConfirm(targetPart.getSite().getShell(),
                                      Messages.getString("delete.confirmation.dialog.caption"), msg)) { 
            return;
        }
        for (Iterator it = selectedItems.iterator(); it.hasNext();) {
            Object oneItem = it.next();
            if (oneItem instanceof IFile) {
                processDelete((IFile)oneItem);
            }
        }
        DisconnectAction dsAction = new DisconnectAction();
        dsAction.disconnect(selectedItems);
        PlatformUtils.updateDecoration();
        PlatformUtils.refreshRepositoryView();
    }
@ SuppressWarnings ( "unchecked" ) public void run ( IAction action ) { if ( selectedItems == null ) { return ; } String msg = null ; if ( selectedItems . size ( ) == 1 ) { msg = MessageFormat . format ( Messages . getString ( "delete.singlefile.confirmation" ) , //$NON-NLS-1$ new Object [ ] { ( ( IFile ) selectedItems . getFirstElement ( ) ) . getName ( ) } ) ; } else { msg = MessageFormat . format ( Messages . getString ( "delete.multifile.confirmation" ) , //$NON-NLS-1$ new Object [ ] { String . valueOf ( selectedItems . size ( ) ) } ) ; } if ( ! MessageDialog . openConfirm ( targetPart . getSite ( ) . getShell ( ) , Messages . getString ( "delete.confirmation.dialog.caption" ) , msg ) ) { //$NON-NLS-1$ return ; } for ( Iterator it = selectedItems . iterator ( ) ; it . hasNext ( ) ; ) { Object oneItem = it . next ( ) ; if ( oneItem instanceof IFile ) { processDelete ( ( IFile ) oneItem ) ; } } DisconnectAction dsAction = new DisconnectAction ( ) ; dsAction . disconnect ( selectedItems ) ; PlatformUtils . updateDecoration ( ) ; PlatformUtils . refreshRepositoryView ( ) ; }
/*
(non-Javadoc)
@see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
/ * ( non - Javadoc )