Java Code Examples for org.eclipse.team.core.TeamException#printStackTrace()

The following examples show how to use org.eclipse.team.core.TeamException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SVNUtil.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
public static void addSVNToView(String url) {
//		添加svn信息到svn视图
		Properties properties = new Properties();
		properties.setProperty("url", url);
		final ISVNRepositoryLocation[] root = new ISVNRepositoryLocation[1];
		SVNProviderPlugin provider = SVNProviderPlugin.getPlugin();
		if(provider == null) {
		}
		try {
			 if(!provider.getRepositories().exactMatchExists(url)) {
				 root[0] = provider.getRepositories().createRepository(properties);
				 provider.getRepositories().addOrUpdateRepository(root[0]);
			 }
		} catch (TeamException e) {
			SVNProviderPlugin.log(new Status(IStatus.OK, SVNProviderPlugin.ID, 0, e.getMessage(), null));
			e.printStackTrace();
		}
	}
 
Example 2
Source File: SyncSVNPathActionDelegate.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
private void updateSVNPath(String url) {
	Properties properties = new Properties();
	properties.setProperty("url", url);
	final ISVNRepositoryLocation[] root = new ISVNRepositoryLocation[1];
	SVNProviderPlugin provider = SVNProviderPlugin.getPlugin();
	try {
		root[0] = provider.getRepositories().createRepository(properties);
		// Validate the connection info.  This process also determines the rootURL
		provider.getRepositories().addOrUpdateRepository(root[0]);
	} catch (TeamException e) {
		e.printStackTrace();
	}
}