• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IMemoryBlock类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getHoverText

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public String getHoverText(Annotation annotation, ITextViewer textViewer, IRegion hoverRegion) {
	if (!BfDebugModelPresentation.INSTRUCTION_POINTER_ANNOTATION_TYPE.equals(annotation.getType())) {
		return null;
	}
	IAdaptable adaptable = DebugUITools.getDebugContext();
	if (adaptable instanceof BfStackFrame) {
		BfStackFrame stackFrame = (BfStackFrame) adaptable;
		try {
			int instructionPointer = stackFrame.getCharStart();
			String text = "Instruction Pointer: [<b>" + instructionPointer + "</b>]";
			int memoryPointer = stackFrame.getMemoryPointer();
			IMemoryBlock memoryBlock = stackFrame.getDebugTarget().getMemoryBlock(memoryPointer, 1);
			byte value = memoryBlock.getBytes()[0];
			text = text + "<br>Memory Value: [<b>0x" + Integer.toHexString(memoryPointer).toUpperCase() + "</b>]=<b>0x" + Integer.toHexString((value & 0xFF)) + "</b>";
			return text;
		} 
		catch (DebugException ex) {
			DbgActivator.getDefault().logError("Memory Block could not be evaluated", ex);
		}
	}
	return null;
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:24,代码来源:InstructionPointerAnnotationHover.java


示例2: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length)
		throws DebugException {
	if (this.process.getProcessListener().getSuspendedState() != null) {
		return new BfMemoryBlock(this, this.process.getProcessListener().getSuspendedState(), startAddress, length);
	}
	else {
		return null;
	}
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:11,代码来源:BfDebugTarget.java


示例3: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(final long startAddress, final long length)
    throws DebugException
{
  // synthetic targets do not support memory block retrieval
  return null;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:8,代码来源:OfflineDebugTarget.java


示例4: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
	return null;
}
 
开发者ID:tracymiranda,项目名称:dsp4e,代码行数:5,代码来源:DSPDebugTarget.java


示例5: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
  return null;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:5,代码来源:LocalAppEngineServerLaunchConfigurationDelegate.java


示例6: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
	return null;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:4,代码来源:SCTDebugTarget.java


示例7: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
  notSupported("MontoDebugTarget does not support memory block retrieval", null);
  return null;
}
 
开发者ID:monto-editor,项目名称:monto-eclipse,代码行数:6,代码来源:MontoDebugTarget.java


示例8: memoryBlocksRemoved

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public void memoryBlocksRemoved(IMemoryBlock[] memory) {
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:4,代码来源:BfUIListenerContributor.java


示例9: memoryBlocksAdded

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public void memoryBlocksAdded(final IMemoryBlock[] memory) {
	
	WorkbenchJob job = new WorkbenchJob("Update Memory View") {
		private static final long RESCHEDULE_TIME = 200;
		private static final int MAX_ATTEMPTS = 5;
		private volatile int attempts = 0;
		
		@Override
		public IStatus runInUIThread(IProgressMonitor monitor) {
			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
			if (page == null) {
				return Status.OK_STATUS;
			}
			try {
				IMemoryRenderingSite memoryView = null;
				for (IViewReference ref : page.getViewReferences()) {
					if (ref.getId().equals(IDebugUIConstants.ID_MEMORY_VIEW)) {
						memoryView = (IMemoryRenderingSite) ref.getView(true);
						break;
					}
				}
				if (memoryView == null) {
					if (attempts < MAX_ATTEMPTS) { //Memory view may still not been opened, try 5 times
						attempts++;
						this.schedule(RESCHEDULE_TIME);
					}
					else {
						attempts = 0;
					}
					return Status.OK_STATUS;
				}
				
				for (IMemoryBlock mb : memory) {
					if (mb instanceof BfMemoryBlock && !((BfMemoryBlock) mb).isUserCreated()) {
						IMemoryRenderingType renderingType = DebugUITools.getMemoryRenderingManager().getPrimaryRenderingType(mb);
						IMemoryRendering rendering = renderingType.createRendering();
						IMemoryRenderingContainer container = memoryView.getContainer(IDebugUIConstants.PLUGIN_ID + ".MemoryView.RenderingViewPane.1");
						rendering.init(container, mb);
						container.addMemoryRendering(rendering);
					}
				}
			}
			catch (CoreException e) {
				DbgActivator.getDefault().logError("Updating Memory View failed", e);
			}
			this.attempts = 0;
			return Status.OK_STATUS;
		}
	};
	job.setUser(false);
	job.schedule();
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:54,代码来源:BfUIListenerContributor.java


示例10: fireSuspendEvent

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
	public void fireSuspendEvent(int detail) {
		this.stackFrame = new BfStackFrame(getDebugTarget(), this, "Brainfuck Stack Frame");
		if (detail == DebugEvent.STEP_END) {
			this.isStepping = false;
			this.fireChangeEvent(DebugEvent.CONTENT | DebugEvent.STATE);
		}
		else if (detail == DebugEvent.BREAKPOINT) {
			try {
			IBreakpointManager bpManager = DebugPlugin.getDefault().getBreakpointManager();
				int location = this.getDebugTarget().getProcess().getProcessListener().getInstructionPointer();
				List<IBreakpoint> breakpoints = new ArrayList<>();
				for (IBreakpoint bp : bpManager.getBreakpoints(getModelIdentifier())) {
					if (bp instanceof  BfBreakpoint && ((BfBreakpoint) bp).getCharStart() == location) {
						breakpoints.add(bp);
					}
				}
				this.suspendedBreakpoints = breakpoints.toArray(new IBreakpoint[breakpoints.size()]);
//				this.fireChangeEvent(DebugEvent.CONTENT | DebugEvent.STATE);
			}
			catch (CoreException ex) {
				DbgActivator.getDefault().logError("Breakpoints cannot be found", ex);
			}
		}
		try {
			IMemoryBlockManager mbManager = DebugPlugin.getDefault().getMemoryBlockManager();
			List<IMemoryBlock> memoryBlocks = Arrays.asList(mbManager.getMemoryBlocks(getDebugTarget()));
			boolean found = false;
			int length = this.getDebugTarget().getProcess().getProcessListener().getSuspendedState().getDataSize();
			for (IMemoryBlock block : memoryBlocks) {
				if (block.getStartAddress() == 0 && block.getLength() == length) {
					found = true;
					break;
				}
			}
			if (!found) {
				BfMemoryBlock mb = (BfMemoryBlock) this.getDebugTarget().getMemoryBlock(0, length);
				mb.setUserCreated(false);
				mb.fireCreationEvent();		
				mbManager.addMemoryBlocks(new IMemoryBlock[]{mb});
			}
		} 
		catch (DebugException e) {
			DbgActivator.getDefault().logError("Memory block could not be created", e);
		} 
		super.fireSuspendEvent(detail);
	}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:48,代码来源:BfThread.java


示例11: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
public IMemoryBlock getMemoryBlock( long startAddress, long length )
		throws DebugException
{
	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:6,代码来源:ScriptDebugTarget.java


示例12: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
    return null;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:5,代码来源:AbstractDebugTarget.java


示例13: getMemoryBlock

import org.eclipse.debug.core.model.IMemoryBlock; //导入依赖的package包/类
/**
 * {@inheritDoc} Unused method.
 *
 * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
 */
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
	return null;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:9,代码来源:DSLDebugTargetAdapter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BivariateFunction类代码示例发布时间:2022-05-22
下一篇:
Java KeyUtil类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap