本文整理汇总了Java中org.eclipse.jdt.core.IJavaElementDelta.F_AST_AFFECTED属性的典型用法代码示例。如果您正苦于以下问题:Java IJavaElementDelta.F_AST_AFFECTED属性的具体用法?Java IJavaElementDelta.F_AST_AFFECTED怎么用?Java IJavaElementDelta.F_AST_AFFECTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.core.IJavaElementDelta
的用法示例。
在下文中一共展示了IJavaElementDelta.F_AST_AFFECTED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addReconcileDelta
protected void addReconcileDelta(ICompilationUnit workingCopy, IJavaElementDelta delta) {
HashMap reconcileDeltas =
JavaModelManager.getJavaModelManager().getDeltaProcessor().reconcileDeltas;
org.eclipse.jdt.internal.core.JavaElementDelta previousDelta =
(org.eclipse.jdt.internal.core.JavaElementDelta) reconcileDeltas.get(workingCopy);
if (previousDelta != null) {
IJavaElementDelta[] children = delta.getAffectedChildren();
for (int i = 0, length = children.length; i < length; i++) {
org.eclipse.jdt.internal.core.JavaElementDelta child =
(org.eclipse.jdt.internal.core.JavaElementDelta) children[i];
previousDelta.insertDeltaTree(child.getElement(), child);
}
// note that the last delta's AST always takes precedence over the existing delta's AST
// since it is the result of the last reconcile operation
if ((delta.getFlags() & IJavaElementDelta.F_AST_AFFECTED) != 0) {
previousDelta.changedAST(delta.getCompilationUnitAST());
}
} else {
reconcileDeltas.put(workingCopy, delta);
}
}
示例2: elementChanged
public void elementChanged(ElementChangedEvent event) {
if (isRunningInReconcilerThread())
return;
if (event.getDelta().getFlags() == IJavaElementDelta.F_AST_AFFECTED || canIgnore(event.getDelta().getAffectedChildren()))
return;
setJavaModelChanged(true);
if (isEditorActive())
JavaReconciler.this.forceReconciling();
}
示例3: isAstAffected
private boolean isAstAffected(IJavaElementDelta delta)
{
return (delta.getFlags() & IJavaElementDelta.F_AST_AFFECTED) == IJavaElementDelta.F_AST_AFFECTED;
}
示例4: isContentChange
/**
* Test whether the given delta represents a significant change.
*
* @param cuDelta the Java element delta
* @return <code>true</code> if the delta represents a content change
* @since 3.5
*/
private boolean isContentChange(IJavaElementDelta cuDelta) {
int flags= cuDelta.getFlags();
return flags != IJavaElementDelta.F_AST_AFFECTED && (cuDelta.getKind() == IJavaElementDelta.CHANGED || (flags & IJavaElementDelta.F_CONTENT) != 0);
}