當前位置: 首頁>>代碼示例>>Java>>正文


Java IResourceDelta.DESCRIPTION屬性代碼示例

本文整理匯總了Java中org.eclipse.core.resources.IResourceDelta.DESCRIPTION屬性的典型用法代碼示例。如果您正苦於以下問題:Java IResourceDelta.DESCRIPTION屬性的具體用法?Java IResourceDelta.DESCRIPTION怎麽用?Java IResourceDelta.DESCRIPTION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.core.resources.IResourceDelta的用法示例。


在下文中一共展示了IResourceDelta.DESCRIPTION屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: processChangedDelta

/**
 * Process {@link IResourceDelta} with {@link IResourceDelta#CHANGED changed}
 * {@link IResourceDelta#getKind() kind}.
 * 
 * @param delta
 *            the {@link IResourceDelta} with {@link IResourceDelta#CHANGED changed}
 *            {@link IResourceDelta#getKind() kind}
 */
private void processChangedDelta(IResourceDelta delta) {
	if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
		if (delta.getResource().isAccessible()) {
			register((IFile)delta.getResource());
		} else {
			unregister((IFile)delta.getResource());
		}
	} else if ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
		// nothing to do here
	} else if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) {
		if (resourceToBase.get(delta.getResource()) == null) {
			register((IFile)delta.getResource());
		}
	}
}
 
開發者ID:ModelWriter,項目名稱:Source,代碼行數:23,代碼來源:WorkspaceMappingBaseListener.java

示例2: isRelevantResourceChange

/**
 * Given a resource delta, indicate whether or the delta contains a type of
 * resource change that GWT generally cares about.
 */
public static boolean isRelevantResourceChange(IResourceDelta delta) {

  if (delta == null) {
    return false;
  }

  int relevantChanges = IResourceDelta.CONTENT | IResourceDelta.DESCRIPTION
      | IRESOURCEDELTA_LOCAL_CHANGED | IResourceDelta.OPEN
      | IResourceDelta.REPLACED | IResourceDelta.TYPE;
  // Either added or removed (through != CHANGED), or changed in some
  // relevant way (through (.. & relevantChanges) != 0)
  if (delta.getKind() != IResourceDelta.CHANGED
      || (delta.getFlags() & relevantChanges) != 0) {
    return true;
  }

  return false;
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:22,代碼來源:ResourceUtils.java

示例3: processChangedDelta

/**
 * Process {@link IResourceDelta} with {@link IResourceDelta#CHANGED changed}
 * {@link IResourceDelta#getKind() kind}.
 * 
 * @param delta
 *            the {@link IResourceDelta} with {@link IResourceDelta#CHANGED changed}
 *            {@link IResourceDelta#getKind() kind}
 * @param base
 *            the current {@link IBase}
 */
private void processChangedDelta(IResourceDelta delta, IBase base) {
	if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
		if (delta.getResource().isAccessible()) {
			updateLocation(base, delta.getResource());
		} else {
			// we can't track changes but the location is still valid for the moment
		}
	} else if ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
		// nothing to do here
	} else if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) {
		updateLocation(base, delta.getResource());
	}
}
 
開發者ID:ModelWriter,項目名稱:Source,代碼行數:23,代碼來源:ResourceLocationListener.java

示例4: isAffectingContainerState

/**
 * @since 2.3
 */
protected boolean isAffectingContainerState(IResourceDelta delta) {
	if (delta.getKind() == IResourceDelta.ADDED || delta.getKind() == IResourceDelta.REMOVED) {
		if (delta.getResource() instanceof IStorage) {
			if (getUri((IStorage) delta.getResource()) != null) {
				return true;
			}
		}
	} else if (delta.getKind() == IResourceDelta.CHANGED && delta.getResource() instanceof IProject) {
		if ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
			return true;
		}
	}
	return false;
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:17,代碼來源:AbstractAllContainersState.java

示例5: isAffectingContainerState

@Override
protected boolean isAffectingContainerState(IResourceDelta delta) {
	if (delta.getKind() == IResourceDelta.ADDED || delta.getKind() == IResourceDelta.REMOVED) {
		String fileExtension = delta.getFullPath().getFileExtension();
		if (null != fileExtension && fileExtensionTypeHelper.isTypable(fileExtension)) {
			return true;
		}
		if (IN4JSProject.N4MF_MANIFEST.equals(delta.getFullPath().lastSegment())) {
			clearManifestCache();
			return true;
		}
		if (IN4JSArchive.NFAR_FILE_EXTENSION.equals(fileExtension)) {
			clearManifestCache(delta);
			return true;
		}
		if (delta.getResource() instanceof IProject) {
			clearManifestCache();
			return true;
		}
		if (delta.getResource() instanceof IFolder) {
			if (isSourceContainerModification(delta)) {
				tryValidateManifest(delta);
				tryValidateManifestInEditor(delta);
				clearManifestCache(delta);
				return true;
			}
		}
		return false;
	} else if (delta.getKind() == IResourceDelta.CHANGED && delta.getResource() instanceof IProject) {
		if ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
			return true;
		}
		if ((delta.getFlags() & IResourceDelta.OPEN) != 0) {
			clearManifestCache();
			return true;
		}
		return false;
	}
	if (n4mfFileHasBeenChanged(delta) || nfarHasBeenChanged(delta)) {
		clearManifestCache(delta);
		return true;
	}
	return false;

}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:45,代碼來源:N4JSAllContainersState.java

示例6: visit

@Override
public boolean visit(IResourceDelta delta) throws CoreException
{
	if( delta != null )
	{

		final IResource resource = delta.getResource();
		if( !resource.isDerived() )
		{
			switch( resource.getType() )
			{

			case IResource.ROOT:
				return true;
			case IResource.PROJECT: {
				IProject project = (IProject) resource;
				int kind = delta.getKind();
				int flags = delta.getFlags();
				if( isInterestingProject(project)
					&& (kind == IResourceDelta.ADDED || (flags & IResourceDelta.OPEN) != 0 || (kind == IResourceDelta.CHANGED
						&& (flags & IResourceDelta.DESCRIPTION) != 0 && !isProjectKnown(project))) )
				{
					createModel(project, true);
					return false;
				}
				else if( kind == IResourceDelta.REMOVED )
				{
					removeModel(project);
					return false;
				}
				return true;
			}
			case IResource.FOLDER:
				return isInterestingFolder((IFolder) resource);
			case IResource.FILE:
				// do not process
				if( isContentChange(delta) )
				{
					handleFileDelta(delta);
					return false;
				}
			}
		}
	}
	return false;
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:46,代碼來源:WorkspaceModelManager.java

示例7: getFlagTxt

/**
 * Adds debug messages.
 * 
 * @param flag
 * @return debug message
 */
private String getFlagTxt(int flag) {
	String flags = "F_";
	if ((flag & IResourceDelta.ADDED) != 0) {
		flags += "ADDED ";
	}
	if ((flag & IResourceDelta.ADDED_PHANTOM) != 0) {
		flags += "ADDED_PHANTOM ";
	}
	if ((flag & IResourceDelta.ALL_WITH_PHANTOMS) != 0) {
		flags += "ALL_WITH_PHANTOMS ";
	}
	if ((flag & IResourceDelta.CHANGED) != 0) {
		flags += "CHANGED ";
	}
	if ((flag & IResourceDelta.CONTENT) != 0) {
		flags += "CONTENT ";
	}
	if ((flag & IResourceDelta.COPIED_FROM) != 0) {
		flags += "COPIED_FROM ";
	}
	if ((flag & IResourceDelta.DERIVED_CHANGED) != 0) {
		flags += "DERIVED_CHANGED ";
	}
	if ((flag & IResourceDelta.DESCRIPTION) != 0) {
		flags += "DESCRIPTION ";
	}
	if ((flag & IResourceDelta.ENCODING) != 0) {
		flags += "ENCODING ";
	}
	if ((flag & IResourceDelta.LOCAL_CHANGED) != 0) {
		flags += "LOCAL_CHANGED ";
	}
	if ((flag & IResourceDelta.MARKERS) != 0) {
		flags += "MARKERS ";
	}
	if ((flag & IResourceDelta.MOVED_FROM) != 0) {
		flags += "MOVED_FROM ";
	}
	if ((flag & IResourceDelta.MOVED_TO) != 0) {
		flags += "MOVED_TO ";
	}
	if ((flag & IResourceDelta.NO_CHANGE) != 0) {
		flags += "NO_CHANGE ";
	}
	if ((flag & IResourceDelta.OPEN) != 0) {
		flags += "OPEN ";
	}
	if ((flag & IResourceDelta.REMOVED) != 0) {
		flags += "REMOVED ";
	}
	if ((flag & IResourceDelta.REMOVED_PHANTOM) != 0) {
		flags += "REMOVED_PHANTOM ";
	}
	if ((flag & IResourceDelta.REPLACED) != 0) {
		flags += "REPLACED ";
	}
	if ((flag & IResourceDelta.SYNC) != 0) {
		flags += "SYNC ";
	}
	if ((flag & IResourceDelta.TYPE) != 0) {
		flags += "TYPE ";
	}
	return flags;
}
 
開發者ID:1Tristan,項目名稱:VariantSync,代碼行數:70,代碼來源:ChangeHandler.java


注:本文中的org.eclipse.core.resources.IResourceDelta.DESCRIPTION屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。