本文整理汇总了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);
}
}
示例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();
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}