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


Java IMarkerDelta类代码示例

本文整理汇总了Java中org.eclipse.core.resources.IMarkerDelta的典型用法代码示例。如果您正苦于以下问题:Java IMarkerDelta类的具体用法?Java IMarkerDelta怎么用?Java IMarkerDelta使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IMarkerDelta类属于org.eclipse.core.resources包,在下文中一共展示了IMarkerDelta类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: breakpointChanged

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint,
 *      org.eclipse.core.resources.IMarkerDelta)
 */
public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
	if (supportsBreakpoint(breakpoint)) {
		try {
			final URI uri = ((DSLBreakpoint)breakpoint).getURI();
			final IMarker marker = breakpoint.getMarker();
			for (Entry<String, Object> entry : delta.getAttributes().entrySet()) {
				final Object markerValue = marker.getAttribute(entry.getKey());
				final Object deltaValue = entry.getValue();
				if ((markerValue != null && !markerValue.equals(deltaValue)) || (deltaValue != null
						&& !deltaValue.equals(markerValue))) {
					if (delta.getKind() == IResourceDelta.ADDED) {
						factory.getDebugger().handleEvent(new ChangeBreakPointRequest(uri, entry.getKey(),
								(Serializable)deltaValue));
					} else {
						factory.getDebugger().handleEvent(new ChangeBreakPointRequest(uri, entry.getKey(),
								(Serializable)markerValue));
					}
				}
			}
		} catch (CoreException e) {
			Activator.getDefault().error(e);
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:31,代码来源:DSLDebugTargetAdapter.java

示例2: isProblemDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
private boolean isProblemDelta(IResourceDelta delta) {
	if ((delta.getFlags() & IResourceDelta.MARKERS) == 0) {
		return false;
	}
	for (IMarkerDelta markerDelta : delta.getMarkerDeltas()) {
		if (markerDelta.isSubtypeOf(IMarker.PROBLEM)) {

			// Detect added/removed problem markers
			int kind = markerDelta.getKind();
			if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED) {
				return true;
			}

			// Detect changes in problem marker severity
			int oldSeverity = markerDelta.getAttribute(IMarker.SEVERITY, -1);
			int newSeverity = markerDelta.getMarker().getAttribute(IMarker.SEVERITY, -1);
			if (newSeverity != oldSeverity) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:24,代码来源:ProblemManager.java

示例3: dispatchMarkerDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
protected void dispatchMarkerDelta(final IMarkerDelta iMarkerDelta, final String elementID) {
	switch (iMarkerDelta.getKind()) {
		case IResourceDelta.ADDED :
			addSCTIssue(iMarkerDelta, elementID);
			break;
		case IResourceDelta.REMOVED :
			removeSCTIssue(iMarkerDelta, elementID);
			break;
		case IResourceDelta.CHANGED :
			removeSCTIssue(iMarkerDelta, elementID);
			addSCTIssue(iMarkerDelta, elementID);
			break;
		default :
			break;
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:17,代码来源:DefaultResourceChangeToIssueProcessor.java

示例4: breakpointRemoved

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
@Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
	if (this.isTerminated()) {
		return;
	}
	try {
		if (breakpoint instanceof BfWatchpoint) {
			BfWatchpoint wp = (BfWatchpoint) breakpoint;
			this.process.getInterpreter().removeWatchpoint(wp);
		}
		BfBreakpoint bp = this.getValidBreakpoint(breakpoint);
		if (bp == null) {
			return;
		}
		int location = bp.getCharStart();
		this.process.getInterpreter().removeBreakpoint(location);
		this.removeInstalledBreakpoint(bp);
	}
	catch (CoreException ex) {
		DbgActivator.getDefault().logError("Breakpoint could not be added", ex);
	}
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:23,代码来源:BfDebugTarget.java

示例5: findMarkerDeltas

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
/**
 * @see com.aptana.ide.core.resources.IUniformResourceChangeEvent#findMarkerDeltas(java.lang.String, boolean)
 */
public IMarkerDelta[] findMarkerDeltas(String type, boolean includeSubtypes) {
	ArrayList<IMarkerDelta> matching = new ArrayList<IMarkerDelta>();
	IMarkerDelta[] deltas = getMarkerDeltas();
	for( int i = 0; i < deltas.length; ++i ) {
		IMarkerDelta markerDelta = deltas[i];
		if (type == null || (includeSubtypes ? markerDelta.isSubtypeOf(type) : markerDelta.getType().equals(type)))
		{
			matching.add(markerDelta);
		}
	}
	if ( matching.size() == 0 )
	{
		return NO_MARKER_DELTAS;
	}
	return matching.toArray(new IMarkerDelta[matching.size()]);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:20,代码来源:UniformResourceChangeEvent.java

示例6: isErrorDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
private boolean isErrorDelta(IResourceDelta delta)
{
	if ((delta.getFlags() & IResourceDelta.MARKERS) != 0)
	{
		IMarkerDelta[] markerDeltas = delta.getMarkerDeltas();
		for (int i = 0; i < markerDeltas.length; i++)
		{
			if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM))
			{
				int kind = markerDeltas[i].getKind();
				if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED)
				{
					return true;
				}
				int severity = markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
				int newSeverity = markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
				if (newSeverity != severity)
				{
					return true;
				}
			}
		}
	}
	return false;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:26,代码来源:ProblemMarkerManager.java

示例7: visit

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
/**
 * Update the BibtextEntryView when markers change.
 */
public boolean visit(IResourceDelta delta) throws CoreException {
	if(delta == null) {
		return false;
	}

	IMarkerDelta[] markerDeltas = delta.getMarkerDeltas();

	if(markerDeltas.length > 0){
		Display.getDefault().asyncExec(new Runnable() {
			public void run() {
				refreshAction.run();
			}
		});
	}
	return true;
}
 
开发者ID:sebastiangoetz,项目名称:slr-toolkit,代码行数:20,代码来源:BibtexEntryView.java

示例8: checkDeltas

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
private void checkDeltas(IMarkerDelta[] markerDeltas) throws CoreException {
	for (int i= 0; i < markerDeltas.length; i++) {
		if (isAffected(markerDeltas[i])) {
			IMarker marker= markerDeltas[i].getMarker();
			switch (markerDeltas[i].getKind()) {
				case IResourceDelta.ADDED :
					addMarkerAnnotation(marker);
					fChangesApplied= true;
					break;
				case IResourceDelta.REMOVED :
					removeMarkerAnnotation(marker);
					fChangesApplied= true;
					break;
				case IResourceDelta.CHANGED:
					modifyMarkerAnnotation(marker);
					fChangesApplied= true;
					break;
			}
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:ClassFileMarkerAnnotationModel.java

示例9: resourceChanged

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
public void resourceChanged(IResourceChangeEvent e) {
	if (isRunningInReconcilerThread())
		return;

	IResourceDelta delta= e.getDelta();
	IResource resource= getResource();
	if (delta != null && resource != null) {
		IResourceDelta child= delta.findMember(resource.getFullPath());
		if (child != null) {
			IMarkerDelta[] deltas= child.getMarkerDeltas();
			int i= deltas.length;
			while (--i >= 0) {
				if (deltas[i].isSubtypeOf(IMarker.PROBLEM)) {
					forceReconciling();
					return;
				}
			}
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:JavaReconciler.java

示例10: isErrorDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
private boolean isErrorDelta(IResourceDelta delta) {
	if ((delta.getFlags() & IResourceDelta.MARKERS) != 0) {
		IMarkerDelta[] markerDeltas= delta.getMarkerDeltas();
		for (int i= 0; i < markerDeltas.length; i++) {
			if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM)) {
				int kind= markerDeltas[i].getKind();
				if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED)
					return true;
				int severity= markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
				int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
				if (newSeverity != severity)
					return true;
			}
		}
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:ProblemMarkerManager.java

示例11: breakpointChanged

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
public void breakpointChanged( IBreakpoint breakpoint, IMarkerDelta delta )
{
	if ( !supportsBreakpoint( breakpoint ) )
	{
		return;
	}
	try
	{
		if ( breakpoint.isEnabled( ) )
		{
			breakpointAdded( breakpoint );
		}
		else
		{
			breakpointRemoved( breakpoint, null );
		}
	}
	catch ( CoreException e )
	{

	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:ScriptDebugTarget.java

示例12: breakpointRemoved

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
public void breakpointRemoved( IBreakpoint breakpoint, IMarkerDelta delta )
{
	if ( !supportsBreakpoint( breakpoint ) )
	{
		return;
	}

	JsLineBreakPoint point = new JsLineBreakPoint( ( (ScriptLineBreakpoint) breakpoint ).getSubName( ),
			( (ScriptLineBreakpoint) breakpoint ).getScriptLineNumber( ) );
	if ( breakPoints.contains( point ) )
	{
		breakPoints.remove( point );
		try
		{
			reportVM.removeBreakPoint( point );
		}
		catch ( VMException e )
		{
			logger.warning( e.getMessage( ) );
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:ScriptDebugTarget.java

示例13: isErrorDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
private boolean isErrorDelta(IResourceDelta delta) {
    if ((delta.getFlags() & IResourceDelta.MARKERS) != 0) {
        IMarkerDelta[] markerDeltas = delta.getMarkerDeltas();
        for (int i = 0; i < markerDeltas.length; i++) {
            IMarkerDelta iMarkerDelta = markerDeltas[i];
            if (iMarkerDelta.isSubtypeOf(IMarker.PROBLEM)) {
                int kind = iMarkerDelta.getKind();
                if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED) {
                    return true;
                }
                int severity = iMarkerDelta.getAttribute(IMarker.SEVERITY, -1);
                int newSeverity = iMarkerDelta.getMarker().getAttribute(IMarker.SEVERITY, -1);
                if (newSeverity != severity) {
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:21,代码来源:ProblemMarkerManager.java

示例14: isErrorDelta

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
protected boolean isErrorDelta(IResourceDelta delta) {
	if ((delta.getFlags() & IResourceDelta.MARKERS) != 0) {
		IMarkerDelta[] markerDeltas= delta.getMarkerDeltas();
		for (int i= 0; i < markerDeltas.length; i++) {
			if (markerDeltas[i].isSubtypeOf(IMarker.PROBLEM)) {
				int kind= markerDeltas[i].getKind();
				if (kind == IResourceDelta.ADDED || kind == IResourceDelta.REMOVED)
					return true;
				int severity= markerDeltas[i].getAttribute(IMarker.SEVERITY, -1);
				int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
				if (newSeverity != severity)
					return true;
			}
		}
	}
	return false;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:18,代码来源:ProblemMarkerManager.java

示例15: breakpointRemoved

import org.eclipse.core.resources.IMarkerDelta; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint,
 *      org.eclipse.core.resources.IMarkerDelta)
 */
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
	if (supportsBreakpoint(breakpoint)) {
		try {
			if (breakpoint.isEnabled()) {
				// TODO EMF representation of breakpoints ?
				final URI uri = ((DSLBreakpoint)breakpoint).getURI();
				factory.getDebugger().handleEvent(new RemoveBreakpointRequest(uri));
			}
		} catch (CoreException e) {
			Activator.getDefault().error(e);
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:20,代码来源:DSLDebugTargetAdapter.java


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