本文整理汇总了Java中org.eclipse.core.resources.IResourceStatus.OUT_OF_SYNC_LOCAL属性的典型用法代码示例。如果您正苦于以下问题:Java IResourceStatus.OUT_OF_SYNC_LOCAL属性的具体用法?Java IResourceStatus.OUT_OF_SYNC_LOCAL怎么用?Java IResourceStatus.OUT_OF_SYNC_LOCAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.core.resources.IResourceStatus
的用法示例。
在下文中一共展示了IResourceStatus.OUT_OF_SYNC_LOCAL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addOutOfSync
private static IStatus addOutOfSync(IStatus status, IResource resource) {
IStatus entry= new Status(
IStatus.ERROR,
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
Messages.format(CorextMessages.Resources_outOfSync, BasicElementLabels.getPathLabel(resource.getFullPath(), false)),
null);
if (status == null) {
return entry;
} else if (status.isMultiStatus()) {
((MultiStatus)status).add(entry);
return status;
} else {
MultiStatus result= new MultiStatus(
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
CorextMessages.Resources_outOfSyncResources, null);
result.add(status);
result.add(entry);
return result;
}
}
示例2: setActionEnablement
/**
* Method invoked from <code>selectionChanged(IAction, ISelection)</code>
* to set the enablement status of the action. The instance variable
* <code>selection</code> will contain the latest selection so the methods
* <code>getSelectedResources()</code> and <code>getSelectedProjects()</code>
* will provide the proper objects.
*
* This method can be overridden by subclasses but should not be invoked by them.
*/
protected void setActionEnablement(IAction action) {
try {
action.setEnabled(isEnabled());
} catch (TeamException e) {
if (e.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
// Enable the action to allow the user to discover the problem
action.setEnabled(true);
} else {
action.setEnabled(false);
// We should not open a dialog when determining menu enablements so log it instead
SVNUIPlugin.log(e);
}
}
}
示例3: addOutOfSync
private static IStatus addOutOfSync(IStatus status, IResource resource) {
IStatus entry =
new Status(
IStatus.ERROR,
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
Messages.format(
CorextMessages.Resources_outOfSync,
BasicElementLabels.getPathLabel(resource.getFullPath(), false)),
null);
if (status == null) {
return entry;
} else if (status.isMultiStatus()) {
((MultiStatus) status).add(entry);
return status;
} else {
MultiStatus result =
new MultiStatus(
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
CorextMessages.Resources_outOfSyncResources,
null);
result.add(status);
result.add(entry);
return result;
}
}
示例4: addOutOfSync
private static IStatus addOutOfSync(IStatus status, IResource resource) {
IStatus entry =
new Status(
IStatus.ERROR,
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
Messages.format(
RefactoringCoreMessages.Resources_outOfSync,
BasicElementLabels.getPathLabel(resource.getFullPath(), false)),
null);
if (status == null) {
return entry;
} else if (status.isMultiStatus()) {
((MultiStatus) status).add(entry);
return status;
} else {
MultiStatus result =
new MultiStatus(
ResourcesPlugin.PI_RESOURCES,
IResourceStatus.OUT_OF_SYNC_LOCAL,
RefactoringCoreMessages.Resources_outOfSyncResources,
null);
result.add(status);
result.add(entry);
return result;
}
}