ISVNRepositoryLocation location = SVNProviderPlugin.getPlugin().getRepository(info.getUrl().toString());
ISVNRepositoryLocation location = SVNProviderPlugin.getPlugin().getRepository(projectStatus.getUrl().toString());
	public boolean performFinish() {		if (!WorkspacePathValidator.validateWorkspacePath()) return true;		final boolean[] result = new boolean[] { true };		try {			final boolean[] doSync = new boolean[] { false };			final boolean[] projectExists = new boolean[] { false };			getContainer().run(true /* fork */, true /* cancel */, new IRunnableWithProgress() {				public void run(IProgressMonitor monitor) throws InvocationTargetException {					try {						monitor.beginTask("", 100); //$NON-NLS-1$						if (autoconnectPage != null && doesSVNDirectoryExist()) {							// Autoconnect to the repository using svn/ directories														LocalResourceStatus info = autoconnectPage.getFolderStatus();							if (info == null) {								// Error!								return;							}														// Get the repository location (the get will add the locatin to the provider)							boolean isPreviouslyKnown = SVNProviderPlugin.getPlugin().getRepositories().isKnownRepository(info.getUrl().toString());								// Validate the connection if the user wants to							boolean validate = autoconnectPage.getValidate();												                            if (validate && !isPreviouslyKnown) {								ISVNRepositoryLocation location = SVNProviderPlugin.getPlugin().getRepository(info.getUrl().toString());                            									// Do the validation								try {									location.validateConnection(new SubProgressMonitor(monitor, 50));								} catch (final TeamException e) {									// Exception validating. We can continue if the user wishes.									final boolean[] keep = new boolean[] { false };									getShell().getDisplay().syncExec(new Runnable() {										public void run() {											keep[0] = MessageDialog.openQuestion(getContainer().getShell(),												Policy.bind("SharingWizard.validationFailedTitle"), //$NON-NLS-1$												Policy.bind("SharingWizard.validationFailedText", new Object[] {e.getStatus().getMessage()})); //$NON-NLS-1$										}									});									if (!keep[0]) {										// Remove the root										try {											if (!isPreviouslyKnown) {												SVNProviderPlugin.getPlugin().getRepositories().disposeRepository(location);											}										} catch (TeamException e1) {											SVNUIPlugin.openError(getContainer().getShell(), Policy.bind("exception"), null, e1, SVNUIPlugin.PERFORM_SYNC_EXEC); //$NON-NLS-1$										}										result[0] = false;										return;									}									// They want to keep the connection anyway. Fall through.								}							}														// Set the sharing							SVNWorkspaceRoot.setSharing(project, new SubProgressMonitor(monitor, 50));						}                         else {							// No svn directory : Share the project							doSync[0] = true;							// Check if the directory exists on the server							ISVNRepositoryLocation location = null;							boolean isKnown = false;							try {								location = getLocation();								isKnown = SVNProviderPlugin.getPlugin().getRepositories().isKnownRepository(location.getLocation());								                                // Purge any svn folders that may exists in subfolders                                SVNWorkspaceRoot.getSVNFolderFor(project).unmanage(null);                                // check if the remote directory already exist								String remoteDirectoryName = getRemoteDirectoryName();								ISVNRemoteFolder folder = location.getRemoteFolder(remoteDirectoryName);								if (folder.exists(new SubProgressMonitor(monitor, 50))) {									projectExists[0] = true;									final boolean[] sync = new boolean[] {true};									if (autoconnectPage == null) {										getShell().getDisplay().syncExec(new Runnable() {											public void run() {												sync[0] = MessageDialog.openQuestion(getShell(), Policy.bind("SharingWizard.couldNotImport"), Policy.bind("SharingWizard.couldNotImportLong", getRemoteDirectoryName())); //$NON-NLS-1$ //$NON-NLS-2$											}										});									}									result[0] = sync[0];									doSync[0] = sync[0];									return;								}							} catch (TeamException e) {								SVNUIPlugin.openError(getShell(), null, null, e, SVNUIPlugin.PERFORM_SYNC_EXEC);//								if (!isKnown && location != null) location.flushUserInfo();								result[0] = false;								doSync[0] = false;								return;							}							                            // Add the location to the provider if it is new							if (!isKnown) {								SVNProviderPlugin.getPlugin().getRepositories().addOrUpdateRepository(location);							}														// Create the remote module for the project							SVNWorkspaceRoot.shareProject(location, project, getRemoteDirectoryName(), new SubProgressMonitor(monitor, 50));														try{								project.refreshLocal(IProject.DEPTH_INFINITE, new SubProgressMonitor(monitor, 50));							}							catch(CoreException ce){								throw new TeamException(ce.getStatus());							}													}					} catch (TeamException e) {						throw new InvocationTargetException(e);					} finally {						monitor.done();					}				}			});			if (doSync[0]) {			    IResource[] resources = { project };			    SVNSynchronizeParticipant participant = (SVNSynchronizeParticipant)SubscriberParticipant.getMatchingParticipant(SVNSynchronizeParticipant.ID, resources);				if (participant == null) {					participant = new SVNSynchronizeParticipant(new ResourceScope(resources));					TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});				}				participant.refresh(resources, Policy.bind("SharingWizard.0"), Policy.bind("SharingWizard.1", participant.getName()), SVNUIPlugin.getActivePage().getActivePart().getSite()); //$NON-NLS-1$ //$NON-NLS-2$			}//			if (doSync[0]) {//				// Sync of the project//				IWorkbenchPage activePage = null; /* not sure how to get the active page *///				SyncView view = SyncView.findViewInActivePage(activePage);//				if (view != null) {//					SVNSyncCompareInput input;//					if (projectExists[0]) {//						try {//							String moduleName = getModuleName();//							SVNTag tag;//							if (autoconnectPage == null) {//								TagSelectionDialog dialog = new TagSelectionDialog(getShell(), //									new ISVNFolder[] {(ISVNFolder)getLocation().getRemoteFolder(moduleName, null)}, //									Policy.bind("SharingWizard.selectTagTitle"),  //$NON-NLS-1$//									Policy.bind("SharingWizard.selectTag"), //$NON-NLS-1$//									TagSelectionDialog.INCLUDE_HEAD_TAG | TagSelectionDialog.INCLUDE_BRANCHES, //									false, /*don't show recurse option*///									IHelpContextIds.SHARE_WITH_EXISTING_TAG_SELETION_DIALOG);//								dialog.setBlockOnOpen(true);//								if (dialog.open() == Dialog.CANCEL) {//									return false;//								}//								tag = dialog.getResult();//							} else {//								tag = autoconnectPage.getSharing().getTag();//							}//							input = new SVNSyncCompareUnsharedInput(project, getLocation(), moduleName, tag);//						} catch (TeamException e) {//							throw new InvocationTargetException(e);//						}//					} else {//						input = new SVNSyncCompareInput(new IResource[] {project});//					}//					view.showSync(input, activePage);//				}//			}		} catch (InterruptedException e) {			return true;		} catch (InvocationTargetException e) {			SVNUIPlugin.openError(getContainer().getShell(), null, null, e);		}		return result[0];	}