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


Java IResourceStatus.OUT_OF_SYNC_LOCAL属性代码示例

本文整理汇总了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;
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:Resources.java

示例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);
		}
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:23,代码来源:TeamAction.java

示例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;
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:27,代码来源:Resources.java

示例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;
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:27,代码来源:Resources.java


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