Java Code Examples for org.eclipse.jdt.core.IJavaElementDelta#F_PRIMARY_RESOURCE
The following examples show how to use
org.eclipse.jdt.core.IJavaElementDelta#F_PRIMARY_RESOURCE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaStructureDiffViewer.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Check whether the given delta has been sent when saving this reconciler's editor. * * @param cu the compilation unit * @param delta the deltas * @return <code>true</code> if the given delta * @since 3.5 */ private boolean canIgnore(IJavaElement cu, IJavaElementDelta[] delta) { if (delta.length != 1) return false; int flags= delta[0].getFlags(); // become working copy if (flags == IJavaElementDelta.F_PRIMARY_WORKING_COPY) return true; // save if (flags == IJavaElementDelta.F_PRIMARY_RESOURCE && delta[0].getElement().equals(cu)) return true; return canIgnore(cu, delta[0].getAffectedChildren()); }
Example 2
Source File: JavaReconciler.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Check whether the given delta has been * sent when saving this reconciler's editor. * * @param delta the deltas * @return <code>true</code> if the given delta * @since 3.5 */ private boolean canIgnore(IJavaElementDelta[] delta) { if (delta.length != 1) return false; // become working copy if (delta[0].getFlags() == IJavaElementDelta.F_PRIMARY_WORKING_COPY) return true; // save if (delta[0].getFlags() == IJavaElementDelta.F_PRIMARY_RESOURCE && delta[0].getElement().equals(fReconciledElement)) return true; return canIgnore(delta[0].getAffectedChildren()); }