当前位置: 首页>>代码示例>>Java>>正文


Java SVNUIPlugin.openError方法代码示例

本文整理汇总了Java中org.tigris.subversion.subclipse.ui.SVNUIPlugin.openError方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUIPlugin.openError方法的具体用法?Java SVNUIPlugin.openError怎么用?Java SVNUIPlugin.openError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tigris.subversion.subclipse.ui.SVNUIPlugin的用法示例。


在下文中一共展示了SVNUIPlugin.openError方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: refreshViewer

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
  * this is called whenever a new repository location is added for example
  * or when user wants to refresh
  */
 protected void refreshViewer(Object object, boolean refreshRepositoriesFolders) {
     if (treeViewer == null) return;
     if (refreshRepositoriesFolders) {
     	IRunnableWithProgress runnable = new IRunnableWithProgress() {
	public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
             	SVNProviderPlugin.getPlugin().getRepositories().refreshRepositoriesFolders(monitor);
	}
     	};
         try {
	new ProgressMonitorDialog(getShell()).run(true, false, runnable);
} catch (Exception e) {
          SVNUIPlugin.openError(getShell(), null, null, e, SVNUIPlugin.LOG_TEAM_EXCEPTIONS);
}
     }
     if (object == null) treeViewer.refresh();
     else {
     	if (object instanceof ISVNRemoteFolder) {
     		ISVNRemoteFolder parent = ((ISVNRemoteFolder)object).getParent();
     		if (parent == null) {
     			treeViewer.refresh();
     			return;
     		}
     	}
     	treeViewer.refresh(object); 
     }
 }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:31,代码来源:RepositoriesView.java

示例2: performOk

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public boolean performOk() {
	int numTemplates = viewer.getList().getItemCount();
	String[] templates = new String[numTemplates];
	for (int i = 0; i < numTemplates; i++) {
		templates[i] = (String) viewer.getElementAt(i);
	}
	try {
		SVNUIPlugin.getPlugin().getRepositoryManager().getCommentsManager().replaceAndSaveCommentTemplates(templates);
	} catch (TeamException e) {
		SVNUIPlugin.openError(getShell(), null, null, e, SVNUIPlugin.LOG_OTHER_EXCEPTIONS);
	}
	
	SVNUIPlugin.getPlugin().getPreferenceStore().setValue(ISVNUIConstants.PREF_COMMENTS_TO_SAVE, getCommentsToSave());
	
	return super.performOk();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:17,代码来源:CommentTemplatesPreferencePage.java

示例3: doesSVNDirectoryExist

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
    * check if there is a valid svn directory
    */
private boolean doesSVNDirectoryExist() {
	// Determine if there is an existing .svn/ directory from which configuration
	// information can be retrieved.
       boolean isSVNFolder = false;
	try {
	  projectStatus = SVNWorkspaceRoot.peekResourceStatusFor(project);;
	  isSVNFolder = (projectStatus != null) && projectStatus.hasRemote();
         
	} catch (final SVNException e) {
		Shell shell = null;
		// If this is called before the pages have been added, getContainer will return null
		if (getContainer() != null) {
			shell = getContainer().getShell();
		}
           SVNUIPlugin.openError(shell, null, null, e);
	}
       return isSVNFolder; 
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:22,代码来源:SharingWizard.java

示例4: removeUnversioned

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public void removeUnversioned() {
	try 
	{
		Iterator iter = unversionedResourceList.iterator();
		while(iter.hasNext()) resourceList.remove(iter.next());
		
		resources = new IResource[resourceList.size()];
		resourceList.toArray(resources);
		compressedFolders = null;
		rootFolders = null;
		folders = null;
		refresh();
		includeUnversioned = false;
	}
	catch (Exception e) {
		SVNUIPlugin.openError(getShell(), null, null, e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:ResourceSelectionTree.java

示例5: addUnversioned

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public void addUnversioned() {
	try 
	{
		Iterator iter = unversionedResourceList.iterator();
		while(iter.hasNext()) resourceList.add(iter.next());
		
		resources = new IResource[resourceList.size()];
		resourceList.toArray(resources);
		Arrays.sort(resources, comparator);
		compressedFolders = null;
		rootFolders = null;
		folders = null;
		refresh();
		checkUnversioned(tree.getItems(), true);
		includeUnversioned = true;
	}
	catch (Exception e) {
		SVNUIPlugin.openError(getShell(), null, null, e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:21,代码来源:ResourceSelectionTree.java

示例6: setIncludeBugsAndTags

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
private void setIncludeBugsAndTags(IResource res) {
	try {
		projectProperties = ProjectProperties.getProjectProperties(resource);
		includeBugs = projectProperties != null;
		includeTags = tagsPropertySet(res);
	} catch (SVNException e) {
		SVNUIPlugin.openError(getShell(), null, null, e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:10,代码来源:HistoryDialog.java

示例7: refreshRepositoriesFolders

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
private void refreshRepositoriesFolders() {
  	IRunnableWithProgress runnable = new IRunnableWithProgress() {
	public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
          	SVNProviderPlugin.getPlugin().getRepositories().refreshRepositoriesFolders(monitor);
  			needsRefresh = false;
	}
  	};
      try {
	new ProgressMonitorDialog(getShell()).run(true, false, runnable);
} catch (Exception e) {
          SVNUIPlugin.openError(getShell(), null, null, e, SVNUIPlugin.LOG_TEAM_EXCEPTIONS);
}    	
  }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:14,代码来源:ChooseUrlDialog.java

示例8: setProject

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
    * set the project that will be shared 
    */
public void setProject(IProject project) {
	try {
		if (status == null) {
			// This should never happen
			SVNUIPlugin.openError(null, Policy.bind("ConfigurationWizardAutoconnectPage.noSyncInfo"), Policy.bind("ConfigurationWizardAutoconnectPage.noSVNDirectory"), null); //$NON-NLS-1$ //$NON-NLS-2$
			return;
		}
		location = SVNRepositoryLocation.fromString(status.getUrlString());
	} catch (TeamException e) {
		SVNUIPlugin.openError(null, null, null, e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:16,代码来源:ConfigurationWizardAutoconnectPage.java

示例9: handle

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Handles exceptions that occur in SVN model elements.
 */
protected void handle(Throwable t) {
	SVNUIPlugin.openError(null, null, null, t, SVNUIPlugin.LOG_NONTEAM_EXCEPTIONS);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:7,代码来源:SVNModelElement.java

示例10: handle

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Method that implements generic handling of an exception. 
 * 
 * Thsi method will also use any accumulated status when determining what
 * information (if any) to show the user.
 * 
 * @param exception the exception that occured (or null if none occured)
 * @param status any status accumulated by the action before the end of 
 * the action or the exception occured.
 */
protected void handle(Exception exception) {
	if (exception instanceof SVNException) {
		if (((SVNException)exception).operationInterrupted()) {
			return;
		}
	}
	// Get the non-OK statii
	List problems = new ArrayList();
	IStatus[] status = getAccumulatedStatus();
	if (status != null) {
		for (int i = 0; i < status.length; i++) {
			IStatus iStatus = status[i];
			if ( ! iStatus.isOK() || iStatus.getCode() == SVNStatus.SERVER_ERROR) {
				problems.add(iStatus);
			}
		}
	}
	// Handle the case where there are no problem statii
	if (problems.size() == 0) {
		if (exception == null) return;
		handle(exception, getErrorTitle(), null);
		return;
	}

	// For now, display both the exception and the problem status
	// Later, we can determine how to display both together
	if (exception != null) {
		handle(exception, getErrorTitle(), null);
	}
	
	String message = null;
	IStatus statusToDisplay = getStatusToDisplay((IStatus[]) problems.toArray(new IStatus[problems.size()]));
	if (statusToDisplay.isOK()) return;
	if (statusToDisplay.isMultiStatus() && statusToDisplay.getChildren().length == 1) {
		message = statusToDisplay.getMessage();
		statusToDisplay = statusToDisplay.getChildren()[0];
	}
	String title;
	if (statusToDisplay.getSeverity() == IStatus.ERROR) {
		title = getErrorTitle();
	} else {
		title = getWarningTitle();
	}
	SVNUIPlugin.openError(getShell(), title, message, new SVNException(statusToDisplay));
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:56,代码来源:SVNAction.java

示例11: handle

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
protected void handle(Exception exception, String title, String message) {
	SVNUIPlugin.openError(getShell(), title, message, exception, SVNUIPlugin.LOG_NONTEAM_EXCEPTIONS);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:4,代码来源:SetCommitPropertiesDialog.java

示例12: handle

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Shows the given errors to the user.
 */
protected void handle(Throwable e) {
    SVNUIPlugin.openError(getShell(), null, null, e);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:7,代码来源:SVNRepositoryPropertiesPage.java


注:本文中的org.tigris.subversion.subclipse.ui.SVNUIPlugin.openError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。