自己定义断点,重启后断点信息不存在
2014-03-06 15:14
197 查看
RCP中添加断点:在断点视图中出现新增加的断点,在Marker视图中出现自己定义的Marker信息,重启RCP后,在断点视图中未出现原先添加的断点信息。解决该方法有两种:第一种解决方法:plugin.xml 中扩展org.eclipse.core.resources.markers扩展点,必须继承父类org.eclipse.debug.core.breakpointMarker
第二种解决方法:
在自己的插件启动类中添加代码:
<!-- 扩展断点类型--> <extension point="org.eclipse.debug.core.breakpoints"> <breakpoint class="org.jtang.synergy.launchConfiguration.breakpoints.FlowBreakPoint" id="org.jtang.synergy.launchConfiguration.breakpoints.FlowBreakPoint" markerType="org.jtang.synergy.designer.flow.marker"> </breakpoint> </extension> <!--注册一个自定义标记,可继承已定义的父类--> <extension id="org.jtang.synergy.designer.flow.marker" name="org.jtang.synergy.designer.flow.marker" point="org.eclipse.core.resources.markers"> <super type="org.eclipse.debug.core.breakpointMarker"><!--标识是断点标识--> </super> <!--表示文件的位置--> <super type="org.eclipse.core.resources.textmarker"> </super> <persistent value="true"><!--persistent代表是否将错误保存,如果false,重启就会消失--> </persistent> </extension>
第二种解决方法:
在自己的插件启动类中添加代码:
public void start(BundleContext context) throws Exception { super.start(context); plugin = this; // org.jtang.synergy.designer.flow.marker 是自己定义Marker的ID IMarker[] markers = ResourcesPlugin.getWorkspace().getRoot().findMarkers("org.jtang.synergy.designer.flow.marker", true, IResource.DEPTH_INFINITE); System.out.println("markers 长度:" + markers.length); for(IMarker marker:markers){ FlowBreakPoint fBreakPoint = new FlowBreakPoint(); fBreakPoint.setMarker(marker); DebugPlugin.getDefault().addDebugEventListener(fBreakPoint); DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(fBreakPoint); } }
相关文章推荐
- strut2 自己定义文件上传错误信息
- 定义自己的个性blog--醒目作者自己的信息
- srping security3.0(一)----登陆不能抛出自己定义的异常,用户不存在异常,用户尝试登陆次数过多,回到登陆之前访问的页面
- <源代码>FTPclient追加方式上传自己定义信息
- 定义自己的Debug信息
- 【Android界面实现】信息更新小红点显示——自己定义控件BadgeView的使用介绍
- 关于eclipse的debug模式,没有从自己定义的断点开始,而从一些java类开始的
- 利用marker定义自己的problem view信息
- 线程中通过信号和槽函数传递信息的时候,由于用到了自己定义的参数结构,所以使用qRegisterMetaType
- 设计网页录入信息与自己定义server数据接收
- 微博关注其实图标可以自己定义:)
- Android自己定义ViewGroup打造各种风格的SlidingMenu
- 有些错误控制台不打印。如何查看不打印的错误信息:断点--》选中报错的代码(某行下一步断点不执行到下一行。说明这行有错)--》右键inspect
- KANKAN AI不良信息过滤技术:用数据证明自己是最好的
- 【项目架构必备】Asp.Net MVC3 定义自己的项目模板
- liferay中如何实现自己定义的方法
- 【安卓】自己定义基于onDraw的随意动画(不不过平移/旋转/缩放/alpha)、!
- Android自己定义控件
- 自定义布局执行流程之 画出自己定义的View
- Android为ViewPager添加切换动画——自己定义ViewPager