本文整理汇总了Java中org.eclipse.jdt.core.IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED属性的典型用法代码示例。如果您正苦于以下问题:Java IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED属性的具体用法?Java IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED怎么用?Java IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.IJavaElementDelta
的用法示例。
在下文中一共展示了IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isClasspathChangeFlag
/**
* Do the flags indicate a classpath change?
* @param flags the flags to inspect
* @return true if the flag flags a classpath change
*/
private boolean isClasspathChangeFlag(int flags) {
if ((flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0)
return true;
if ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0)
return true;
if ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0)
return true;
if ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0)
return true;
return false;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:SWTTemplateCompletionProposalComputer.java
示例2: isClasspathChangeFlag
/**
* Do the flags indicate a classpath change?
*
* @param flags the flags to inspect
* @return true if the flag flags a classpath change
*/
private boolean isClasspathChangeFlag(int flags) {
if ((flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) {
return true;
}
if ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0) {
return true;
}
return false;
}
示例3: contentChanged
private void contentChanged(Openable element) {
boolean isPrimary = false;
boolean isPrimaryWorkingCopy = false;
if (element.getElementType() == IJavaElement.COMPILATION_UNIT) {
CompilationUnit cu = (CompilationUnit) element;
isPrimary = cu.isPrimary();
isPrimaryWorkingCopy = isPrimary && cu.isWorkingCopy();
}
if (isPrimaryWorkingCopy) {
// filter out changes to primary compilation unit in working copy mode
// just report a change to the resource (see
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=59500)
currentDelta().changed(element, IJavaElementDelta.F_PRIMARY_RESOURCE);
} else {
close(element);
int flags = IJavaElementDelta.F_CONTENT;
if (element instanceof JarPackageFragmentRoot) {
flags |= IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED;
// need also to reset project cache otherwise it will be out-of-date
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=162621
this.projectCachesToReset.add(element.getJavaProject());
}
if (isPrimary) {
flags |= IJavaElementDelta.F_PRIMARY_RESOURCE;
}
currentDelta().changed(element, flags);
}
}
示例4: processDelta
/**
* Computes whether the history needs a consistency check or not.
*
* @param delta the Java element delta
*
* @return <code>true</code> if consistency must be checked
* <code>false</code> otherwise.
*/
private boolean processDelta(IJavaElementDelta delta) {
IJavaElement elem= delta.getElement();
boolean isChanged= delta.getKind() == IJavaElementDelta.CHANGED;
boolean isRemoved= delta.getKind() == IJavaElementDelta.REMOVED;
switch (elem.getElementType()) {
case IJavaElement.JAVA_PROJECT:
if (isRemoved || (isChanged &&
(delta.getFlags() & IJavaElementDelta.F_CLOSED) != 0)) {
return true;
}
return processChildrenDelta(delta);
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (isRemoved || (isChanged && (
(delta.getFlags() & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0 ||
(delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0))) {
return true;
}
return processChildrenDelta(delta);
case IJavaElement.TYPE:
if (isChanged && (delta.getFlags() & IJavaElementDelta.F_MODIFIERS) != 0) {
return true;
}
if (isRemoved) {
return true;
}
return processChildrenDelta(delta);
case IJavaElement.JAVA_MODEL:
case IJavaElement.PACKAGE_FRAGMENT:
case IJavaElement.CLASS_FILE:
if (isRemoved) {
return true;
}
return processChildrenDelta(delta);
case IJavaElement.COMPILATION_UNIT:
// Not the primary compilation unit. Ignore it
if (!JavaModelUtil.isPrimary((ICompilationUnit) elem)) {
return false;
}
if (isRemoved || (isChanged && isUnknownStructuralChange(delta.getFlags()))) {
return true;
}
return processChildrenDelta(delta);
default:
// fields, methods, imports ect
return false;
}
}
示例5: check
/**
* Recursively check whether the class file has been deleted.
*
* @param input the package fragment root
* @param delta the Java element delta
* @return <code>true</code> if delta processing can be stopped
*/
protected boolean check(IPackageFragmentRoot input, IJavaElementDelta delta) {
IJavaElement element= delta.getElement();
if ((delta.getKind() & IJavaElementDelta.REMOVED) != 0 || (delta.getFlags() & IJavaElementDelta.F_CLOSED) != 0) {
// http://dev.eclipse.org/bugs/show_bug.cgi?id=19023
if (element.equals(input.getJavaProject()) || element.equals(input)) {
handleDeleted(fInput);
return true;
}
}
if (((delta.getFlags() & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0) && input.equals(element)) {
handleDeleted(fInput);
return true;
}
if (((delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) && input.equals(element)) {
handleDeleted(fInput);
return true;
}
IJavaElementDelta[] subdeltas= delta.getAffectedChildren();
for (int i= 0; i < subdeltas.length; i++) {
if (check(input, subdeltas[i]))
return true;
}
if ((delta.getFlags() & IJavaElementDelta.F_SOURCEDETACHED) != 0 ||
(delta.getFlags() & IJavaElementDelta.F_SOURCEATTACHED) != 0)
{
IClassFile file= fInput != null ? fInput.getClassFile() : null;
IJavaProject project= input != null ? input.getJavaProject() : null;
boolean isOnClasspath= false;
if (file != null && project != null)
isOnClasspath= project.isOnClasspath(file);
if (isOnClasspath) {
fireInputChanged(fInput);
return false;
} else {
handleDeleted(fInput);
return true;
}
}
return false;
}
示例6: processDelta
@Override
protected void processDelta(IJavaElementDelta delta, List<IJavaElement> result) {
IJavaElement elem= delta.getElement();
boolean isChanged= delta.getKind() == IJavaElementDelta.CHANGED;
boolean isRemoved= delta.getKind() == IJavaElementDelta.REMOVED;
int flags= delta.getFlags();
switch (elem.getElementType()) {
case IJavaElement.JAVA_PROJECT:
if (isRemoved || (isChanged &&
(flags & IJavaElementDelta.F_CLOSED) != 0)) {
return;
}
processChildrenDelta(delta, result);
return;
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
if (isRemoved || (isChanged && (
(flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0 ||
(flags & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0))) {
return;
}
processChildrenDelta(delta, result);
return;
case IJavaElement.PACKAGE_FRAGMENT:
if (isRemoved)
return;
processChildrenDelta(delta, result);
return;
case IJavaElement.TYPE:
case IJavaElement.CLASS_FILE:
return;
case IJavaElement.JAVA_MODEL:
processChildrenDelta(delta, result);
return;
case IJavaElement.COMPILATION_UNIT:
// Not the primary compilation unit. Ignore it
if (!JavaModelUtil.isPrimary((ICompilationUnit) elem)) {
return;
}
if (isChanged && ((flags & IJavaElementDelta.F_CONTENT) != 0 || (flags & IJavaElementDelta.F_FINE_GRAINED) != 0)) {
if (delta.getAffectedChildren().length == 0)
return;
result.add(elem);
}
return;
default:
// fields, methods, imports ect
return;
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:53,代码来源:InterfaceIndicatorLabelDecorator.java