本文整理汇总了Java中org.eclipse.jdt.core.ElementChangedEvent.getDelta方法的典型用法代码示例。如果您正苦于以下问题:Java ElementChangedEvent.getDelta方法的具体用法?Java ElementChangedEvent.getDelta怎么用?Java ElementChangedEvent.getDelta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.ElementChangedEvent
的用法示例。
在下文中一共展示了ElementChangedEvent.getDelta方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ignoreClasspathChanges
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
private boolean ignoreClasspathChanges(ElementChangedEvent event) {
if (event.getDelta() == null && event.getDelta().getChangedChildren() == null)
return true;
for (IJavaElementDelta delta : event.getDelta().getChangedChildren()) {
if (delta.getResourceDeltas() == null)
return false;
for (IResourceDelta rd : delta.getResourceDeltas()) {
if (rd.getFullPath() == null)
continue;
String path = rd.getFullPath().getFileExtension();
if (path != null && !(path.equalsIgnoreCase(FileExtension.JRXML) || path.equalsIgnoreCase(FileExtension.JASPER)))
return false;
}
}
return true;
}
示例2: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
public void elementChanged(ElementChangedEvent event) {
if (event.getDelta() != null) {
if (isAffectingPackageFragmentRoots(event.getDelta())) {
initialize();
}
}
}
示例3: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
public void elementChanged(ElementChangedEvent event) {
// long t0= System.currentTimeMillis();
IJavaElementDelta delta = event.getDelta();
Set<IAdaptable> removedElements = new HashSet<IAdaptable>();
Set<IAdaptable> potentiallyRemovedElements = new HashSet<IAdaptable>();
collectRemoved(potentiallyRemovedElements, removedElements, delta);
if (removedElements.size() > 0) handleRemoved(removedElements);
if (potentiallyRemovedElements.size() > 0) handleRemoved(potentiallyRemovedElements);
// System.out.println(this+"handled delta in: "+(System.currentTimeMillis()-t0));
}
示例4: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
public void elementChanged(ElementChangedEvent event) {
//long t0= System.currentTimeMillis();
IJavaElementDelta delta= event.getDelta();
Set<IAdaptable> removedElements= new HashSet<IAdaptable>();
Set<IAdaptable> potentiallyRemovedElements= new HashSet<IAdaptable>();
collectRemoved(potentiallyRemovedElements, removedElements, delta);
if (removedElements.size() > 0)
handleRemoved(removedElements);
if (potentiallyRemovedElements.size() > 0)
handleRemoved(potentiallyRemovedElements);
//System.out.println(this+"handled delta in: "+(System.currentTimeMillis()-t0));
}
示例5: findAffectedElement
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
/**
* Tells which elements of the comparison are affected by the change.
*
* @param event element changed event
* @return array of typed elements affected by the event. May return an empty array.
* @since 3.5
*/
private ITypedElement[] findAffectedElement(ElementChangedEvent event) {
Object input= getInput();
if (!(input instanceof ICompareInput))
return new ITypedElement[0];
Set<ITypedElement> affectedElements= new HashSet<ITypedElement>();
ICompareInput ci= (ICompareInput)input;
IJavaElementDelta delta= event.getDelta();
addAffectedElement(ci.getAncestor(), delta, affectedElements);
addAffectedElement(ci.getLeft(), delta, affectedElements);
addAffectedElement(ci.getRight(), delta, affectedElements);
return affectedElements.toArray(new ITypedElement[affectedElements.size()]);
}
示例6: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
/*******************************************************
*
* @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
*******************************************************/
@Override
public void elementChanged(ElementChangedEvent event)
{
IJavaElementDelta delta = event.getDelta();
// Test what element has changed and the type of change.F
testDelta(delta);
}
示例7: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
/**
* Handles change to code in an open code editor
*/
@Override
public void elementChanged(ElementChangedEvent event)
{
if (event.getDelta() != null)
{
traverseDeltaTree(event.getDelta());
}
}
示例8: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
@Override
public void elementChanged(ElementChangedEvent event) {
if (event.getDelta() != null) {
String eventType = eventTypeToString(event.getType());
System.out.println("== DeltaTree " + eventType + " ==");
printDeltaTree(event.getDelta(), 0);
System.out.println();
}
}
示例9: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
@Override
public void elementChanged(ElementChangedEvent event) {
IJavaElementDelta delta = event.getDelta();
try {
processDelta(delta);
} catch (JavaModelException | IOException e) {
}
}
开发者ID:ChangeOrientedProgrammingEnvironment,项目名称:eclipseRecorder,代码行数:9,代码来源:JavaElementChangedListener.java
示例10: elementChanged
import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
public void elementChanged(ElementChangedEvent ev) {
IJavaElementDelta[] copy= new IJavaElementDelta[this.deltas.length + 1];
System.arraycopy(this.deltas, 0, copy, 0, this.deltas.length);
copy[this.deltas.length]= ev.getDelta();
this.deltas= copy;
new Throwable("Caller of IElementChangedListener#elementChanged").printStackTrace(new PrintStream(this.stackTraces));
}