当前位置: 首页>>代码示例>>Java>>正文


Java ElementChangedEvent.getDelta方法代码示例

本文整理汇总了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;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:JavaProjectClassLoader.java

示例2: elementChanged

import org.eclipse.jdt.core.ElementChangedEvent; //导入方法依赖的package包/类
public void elementChanged(ElementChangedEvent event) {
	if (event.getDelta() != null) {
		if (isAffectingPackageFragmentRoots(event.getDelta())) {
			initialize();
		}
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:AbstractJavaProjectsState.java

示例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));
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:SearchResultUpdater.java

示例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));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:SearchResultUpdater.java

示例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()]);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:JavaStructureDiffViewer.java

示例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);
}
 
开发者ID:ArchieProject,项目名称:Archie-Smart-IDE,代码行数:13,代码来源:JavaProjectsListener.java

示例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());
	}
}
 
开发者ID:ArchieProject,项目名称:Archie-Smart-IDE,代码行数:12,代码来源:JavaModelModifiedHandler.java

示例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();
	}
}
 
开发者ID:ArchieProject,项目名称:Archie-Smart-IDE,代码行数:10,代码来源:DebugJavaModelModifiedHandler.java

示例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));
}
 
开发者ID:jwloka,项目名称:reflectify,代码行数:9,代码来源:AbstractJavaModelTests.java


注:本文中的org.eclipse.jdt.core.ElementChangedEvent.getDelta方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。