本文整理汇总了Java中org.eclipse.jdt.debug.core.IJavaLineBreakpoint类的典型用法代码示例。如果您正苦于以下问题:Java IJavaLineBreakpoint类的具体用法?Java IJavaLineBreakpoint怎么用?Java IJavaLineBreakpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJavaLineBreakpoint类属于org.eclipse.jdt.debug.core包,在下文中一共展示了IJavaLineBreakpoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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;
}
示例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;
}
}
示例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));
}
}
示例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);
}
}
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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);
}
}
示例11: breakpointHasRuntimeException
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasRuntimeException(IJavaLineBreakpoint breakpoint, DebugException exception) {
}
示例12: breakpointHasCompilationErrors
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public void breakpointHasCompilationErrors(IJavaLineBreakpoint breakpoint, Message[] errors) {
}
示例13: supportsBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
@Override
public boolean supportsBreakpoint(IBreakpoint breakpoint) {
return breakpoint instanceof IJavaLineBreakpoint;
}
示例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;
}
示例15: getBreakpoint
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; //导入依赖的package包/类
public IJavaLineBreakpoint getBreakpoint() {
return javaBreakpoint;
}