} else commit = confirmCommit(modified);
} else { ProjectProperties projectProperties = ProjectProperties.getProjectProperties(modified[0]); commit = confirmCommit(modified, projectProperties); }
	public void execute(IAction action) throws InvocationTargetException, InterruptedException {		final IResource[] resources = getSelectedResources();		final RepositoryManager manager = SVNUIPlugin.getPlugin().getRepositoryManager();		final IResource[][] resourcesToBeAdded = new IResource[][] { null };		run(new IRunnableWithProgress() {			public void run(IProgressMonitor monitor) throws InvocationTargetException {				try {				    // search for modified or added, non-ignored resources in the selection.				    IResource[] modified = getModifiedResources(resources, monitor);									    // if no changes since last commit, do not show commit dialog.				    if (modified.length == 0) {					    MessageDialog.openInformation(getShell(), Policy.bind("CommitDialog.title"), Policy.bind("CommitDialog.noChanges")); //$NON-NLS-1$					    commit = false;					} else					    commit = confirmCommit(modified);				    // if commit was not canceled, create a list of any				    // unversioned resources that were selected.					if (commit) {					    List toBeAddedList = new ArrayList();					    for (int i = 0; i < resourcesToCommit.length; i++) {					        IResource resource = resourcesToCommit[i];					        ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);					        if (!svnResource.isManaged()) toBeAddedList.add(resource);					    }					    resourcesToBeAdded[0] = new IResource[toBeAddedList.size()];					    toBeAddedList.toArray(resourcesToBeAdded[0]);					   					}				} catch (TeamException e) {					throw new InvocationTargetException(e);				}			}		}, true /* cancelable */, PROGRESS_BUSYCURSOR); //$NON-NLS-1$				if (!commit) {			return; // user canceled		}				new CommitOperation(getTargetPart(), resources, resourcesToBeAdded[0], resourcesToCommit, commitComment).run();		//		run(new WorkspaceModifyOperation() {//			public void execute(IProgressMonitor monitor) throws  InvocationTargetException {//				try {//					// execute the add and commit in a single SVN runnable so sync changes are batched//					SVNProviderPlugin.run(//						new ISVNRunnable() {//							public void run(IProgressMonitor monitor) throws SVNException {//								try {//									int ticks=100;//									monitor.beginTask(null, ticks);//									//									// add unversioned resources.//									if (resourcesToBeAdded[0].length > 0) {//										int addTicks = 20;//										manager.add(resourcesToBeAdded[0], Policy.subMonitorFor(monitor, addTicks));//										ticks-=addTicks;//									}//									//									// commit resources.//									manager.commit(resourcesToCommit, commitComment, Policy.subMonitorFor(monitor,ticks));//									resourcesToCommit = null;//									commitComment = null;//									for (int i = 0; i < resources.length; i++) {//										IResource projectHandle = resources[i].getProject();//										projectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);//									}//								} catch (TeamException e) {//									throw SVNException.wrapException(e);//								} catch (CoreException e) {//									throw SVNException.wrapException(e);//								}//							}//						}, monitor);//				} catch (SVNException e) {//					throw new InvocationTargetException(e);//				} finally {//					monitor.done();//				}//			}//		}, true /* cancelable */, PROGRESS_DIALOG); //$NON-NLS-1$	}