本文整理汇总了Java中org.eclipse.jdt.debug.core.IJavaLineBreakpoint类的典型用法代码示例。如果您正苦于以下问题:Java IJavaLineBreakpoint类的具体用法?Java IJavaLineBreakpoint怎么用?Java IJavaLineBreakpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJavaLineBreakpoint类属于org.eclipse.jdt.debug.core包,在下文中一共展示了IJavaLineBreakpoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createJavaBreakpoints
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
private void createJavaBreakpoints(JimpleBreakpoint jimpleBreakpoint) throws CoreException {
IMarker m = jimpleBreakpoint.getMarker();
List<BreakpointLocation> breakpointLocations = breakpointLocator.findFlowFunctions();
for (BreakpointLocation breakpointLocation : breakpointLocations) {
IJavaLineBreakpoint javaBreakpoint = (IJavaLineBreakpoint) createMethodEntryBreapoint(breakpointLocation);
IJavaLineBreakpoint javaLineBreakpoint = javaBreakpoint;
javaLineBreakpoint.setConditionEnabled(true);
String requiredFqn = m.getAttribute("Jimple.unit.fqn", "");
String escapedRequiredFqn = requiredFqn.replaceAll("\"", "\\\\\"");
// FIXME find out the name of the unit
javaLineBreakpoint.setCondition("new String(d.getTag(\"Fully Qualified Name\").getValue()).equals(\""+escapedRequiredFqn+"\")");
javaLineBreakpoint.setConditionSuspendOnTrue(true);
IMarker javaBreakpointMarker = javaBreakpoint.getMarker();
javaBreakpointMarker.setAttribute("Jimple.breakpoint.type", "unit");
javaBreakpointMarker.setAttribute("Jimple." + IMarker.LINE_NUMBER, m.getAttribute(IMarker.LINE_NUMBER, -1));
javaBreakpointMarker.setAttribute("Jimple.unit.charStart", m.getAttribute("Jimple.unit.charStart", -1));
javaBreakpointMarker.setAttribute("Jimple.unit.charEnd", m.getAttribute("Jimple.unit.charEnd", -1));
javaBreakpointMarker.setAttribute("Jimple.unit.fqn", requiredFqn);
javaBreakpointMarker.setAttribute("Jimple.project", m.getAttribute("Jimple.project", ""));
javaBreakpointMarker.setAttribute("Jimple.file", m.getAttribute("Jimple.file", ""));
jimpleBreakpoint.addJavaBreakpoint(javaBreakpoint);
javaBreakpoint.addBreakpointListener(JAVA_BREAKPOINT_LISTENER);
}
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:25,代码来源:JimpleBreakpointManager.java
示例2: breakpointHit
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
public int breakpointHit(IJavaThread thread, IJavaBreakpoint breakpoint) {
PandionJView pjView = PandionJView.getInstance();
if(pjView == null)
return IJavaBreakpointListener.DONT_SUSPEND;
if(breakpoint instanceof IJavaLineBreakpoint) {
if(!thread.isPerformingEvaluation()) {
pjView.handleLinebreakPoint(thread);
return IJavaBreakpointListener.SUSPEND;
}
}
else if (breakpoint instanceof IJavaExceptionBreakpoint) {
pjView.handleExceptionBreakpoint(thread, ((IJavaExceptionBreakpoint) breakpoint).getExceptionTypeName());
return IJavaBreakpointListener.SUSPEND;
}
return IJavaBreakpointListener.DONT_SUSPEND;
}
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:18,代码来源:PandionJBreakpointListener.java
示例3: classify
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
/**
* Classifies the breakpoint type of the given breakpoint by analyzing its
* class name.
*
* WARNING: Do not change the ordering of the if-statements if you don't
* have to!
*/
public static BreakpointType classify(IBreakpoint breakpoint) {
if (breakpoint instanceof IJavaWatchpoint) {
return BreakpointType.FIELD;
} else if (breakpoint instanceof IJavaMethodBreakpoint) {
return BreakpointType.METHOD;
} else if (breakpoint instanceof IJavaClassPrepareBreakpoint) {
return BreakpointType.CLASS;
} else if (breakpoint instanceof IJavaLineBreakpoint) {
return BreakpointType.LINE;
} else if (breakpoint instanceof IJavaExceptionBreakpoint) {
return BreakpointType.EXCEPTION;
} else {
return BreakpointType.UNDEFINED;
}
}
开发者ID:TestRoots,项目名称:watchdog,代码行数:23,代码来源:BreakpointClassifier.java
示例4: updateBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
private void updateBreakpoint(Breakpoint teavmBreakpoint) {
IJavaLineBreakpoint breakpoint = breakpointBackMap.get(teavmBreakpoint);
if (breakpoint != null) {
try {
if (!teavmBreakpoint.isValid() || !teavmDebugger.isAttached()) {
breakpoint.getMarker().setAttribute(JAVA_BREAKPOINT_INSTALL_COUNT, 0);
} else {
breakpoint.getMarker().setAttribute(JAVA_BREAKPOINT_INSTALL_COUNT, 1);
}
DebugPlugin.getDefault().getBreakpointManager().fireBreakpointChanged(breakpoint);
} catch (CoreException e) {
throw new RuntimeException(e);
}
fireEvent(new DebugEvent(breakpoint, DebugEvent.CHANGE));
}
}
开发者ID:konsoletyper,项目名称:teavm,代码行数:17,代码来源:TeaVMDebugTarget.java
示例5: run
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void run() {
IBreakpoint breakpoint = getBreakpoint();
if (fBreakpoint != null) {
AbstractBreakpoint watchPoint = wpMgr.getBreakpoint(breakpoint);
if (watchPoint != null) {
watchPoint.setTrackingActive(!watchPoint.isTrackingActive());
}
else if (fBreakpoint instanceof IJavaWatchpoint){
wpMgr.createWatchpoint((IJavaWatchpoint)fBreakpoint, true);
}
else if (fBreakpoint instanceof IJavaLineBreakpoint){
wpMgr.createBreakpoint((IJavaLineBreakpoint)fBreakpoint, true);
}
}
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:17,代码来源:ToggleTrackingActionDelegate.java
示例6: testCreateJavaLineBreakpointConditionEnabled
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Test
public void testCreateJavaLineBreakpointConditionEnabled() throws CoreException {
IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
when(bp.isConditionEnabled()).thenReturn(true);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertTrue(result.isConditionEnabled());
}
开发者ID:TestRoots,项目名称:watchdog,代码行数:8,代码来源:BreakpointCreatorTest.java
示例7: testCreateJavaLineBreakpointConditionDisabled
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Test
public void testCreateJavaLineBreakpointConditionDisabled() throws CoreException {
IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
when(bp.isConditionEnabled()).thenReturn(false);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertFalse(result.isConditionEnabled());
}
开发者ID:TestRoots,项目名称:watchdog,代码行数:8,代码来源:BreakpointCreatorTest.java
示例8: testCreateJavaLineBreakpointNoCondition
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Test
public void testCreateJavaLineBreakpointNoCondition() throws CoreException {
IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
when(bp.getCondition()).thenReturn(null);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertNull(result.getCondition());
}
开发者ID:TestRoots,项目名称:watchdog,代码行数:8,代码来源:BreakpointCreatorTest.java
示例9: testCreateJavaLineBreakpointCondition
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Test
public void testCreateJavaLineBreakpointCondition() throws CoreException {
IJavaLineBreakpoint bp = mock(IJavaLineBreakpoint.class);
when(bp.getCondition()).thenReturn("cond");
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertEquals("cond", result.getCondition());
}
开发者ID:TestRoots,项目名称:watchdog,代码行数:8,代码来源:BreakpointCreatorTest.java
示例10: breakpointAdded
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointAdded(IBreakpoint breakpoint) {
try {
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint)breakpoint;
String fileName = lineBreakpoint.getTypeName().replace('.', '/') + ".java";
Breakpoint teavmBreakpoint = teavmDebugger.createBreakpoint(fileName, lineBreakpoint.getLineNumber());
breakpointMap.put(lineBreakpoint, teavmBreakpoint);
breakpointBackMap.put(teavmBreakpoint, lineBreakpoint);
} catch (CoreException e) {
throw new RuntimeException(e);
}
}
开发者ID:konsoletyper,项目名称:teavm,代码行数:13,代码来源:TeaVMDebugTarget.java
示例11: breakpointHasRuntimeException
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, DebugException exception) {
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:4,代码来源:JavaBreakpointListener.java
示例12: breakpointHasCompilationErrors
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors) {
}
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:4,代码来源:JavaBreakpointListener.java
示例13: supportsBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public boolean supportsBreakpoint(IBreakpoint breakpoint) {
return breakpoint instanceof IJavaLineBreakpoint;
}
开发者ID:konsoletyper,项目名称:teavm,代码行数:5,代码来源:TeaVMDebugTarget.java
示例14: Breakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
/**
*
* @param javaBreakpoint the underlying {@link IJavaWatchpoint} for this watchpoint
* @param target the {@link IJavaDebugTarget} this watchpoint has been installed in
*/
public Breakpoint(final IJavaLineBreakpoint javaBreakpoint, boolean trackingActive) {
super(trackingActive);
this.javaBreakpoint = javaBreakpoint;
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:11,代码来源:Breakpoint.java
示例15: getBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
public IJavaLineBreakpoint getBreakpoint() {
return javaBreakpoint;
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:4,代码来源:Breakpoint.java
示例16: breakpointHasRuntimeException
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint,
DebugException exception) {
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:5,代码来源:JavaBreakpointListener.java
示例17: breakpointHasCompilationErrors
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint,
Message[] errors) {
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:5,代码来源:JavaBreakpointListener.java
示例18: createBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
/**
* Creates a new {@link Watchpoint} that decorates the given
* {@link IJavaWatchpoint}, and stores it in the {@link BreakpointsManager}
*
* @param point
* the
* @param trackingActive
* set true if the created watchpoint should be tracked for value
* changes of its field (in all instances in all targets)
* @return the created {@link Watchpoint}
*/
public Breakpoint createBreakpoint(IJavaLineBreakpoint watchpoint,
boolean trackingActive) {
Breakpoint watchpnt = new Breakpoint(watchpoint, trackingActive);
breakpoints.put(watchpoint, watchpnt);
return watchpnt;
}
开发者ID:bilalsal,项目名称:EclipseTracer,代码行数:18,代码来源:BreakpointsManager.java
示例19: breakpointHasRuntimeException
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
public void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, DebugException exception) { }
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:2,代码来源:PandionJBreakpointListener.java
示例20: breakpointHasCompilationErrors
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
public void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors) { }
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:2,代码来源:PandionJBreakpointListener.java
注:本文中的org.eclipse.jdt.debug.core.IJavaLineBreakpoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论