com.intellij.xdebugger.breakpoints.XLineBreakpoint.getSourcePosition()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中com.intellij.xdebugger.breakpoints.XLineBreakpoint.getSourcePosition()方法的一些代码示例,展示了XLineBreakpoint.getSourcePosition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XLineBreakpoint.getSourcePosition()方法的具体详情如下:
包路径:com.intellij.xdebugger.breakpoints.XLineBreakpoint
类名称:XLineBreakpoint
方法名:getSourcePosition

XLineBreakpoint.getSourcePosition介绍

暂无

代码示例

代码示例来源:origin: ballerina-platform/ballerina-lang

@Override
public void unregisterBreakpoint(@NotNull XLineBreakpoint<BallerinaBreakpointProperties> breakpoint,
                 boolean temporary) {
  XSourcePosition breakpointPosition = breakpoint.getSourcePosition();
  if (breakpointPosition == null) {
    return;
  }
  breakpoints.remove(breakpoint);
  sendBreakpoints();
}

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
 public void unregisterBreakpoint(@NotNull XLineBreakpoint<DlvBreakpointProperties> breakpoint, boolean temporary) {
  XSourcePosition breakpointPosition = breakpoint.getSourcePosition();
  if (breakpointPosition == null) return;
  Integer id = breakpoint.getUserData(ID);
  if (id == null) return; // obsolete
  breakpoint.putUserData(ID, null);
  breakpoints.remove(id);
  send(new DlvRequest.ClearBreakpoint(id));
 }
}

代码示例来源:origin: ballerina-platform/ballerina-lang

@Override
public void registerBreakpoint(@NotNull XLineBreakpoint<BallerinaBreakpointProperties> breakpoint) {
  XSourcePosition breakpointPosition = breakpoint.getSourcePosition();
  if (breakpointPosition == null) {
    return;
  }
  breakpoints.add(breakpoint);
  sendBreakpoints();
  getSession().updateBreakpointPresentation(breakpoint, AllIcons.Debugger.Db_verified_breakpoint, null);
}

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
public void registerBreakpoint(@NotNull XLineBreakpoint<DlvBreakpointProperties> breakpoint) {
 XSourcePosition breakpointPosition = breakpoint.getSourcePosition();
 if (breakpointPosition == null) return;
 VirtualFile file = breakpointPosition.getFile();
 int line = breakpointPosition.getLine();
 send(new DlvRequest.CreateBreakpoint(file.getPath(), line + 1))
  .done(b -> {
   breakpoint.putUserData(ID, b.id);
   breakpoints.put(b.id, breakpoint);
   getSession().updateBreakpointPresentation(breakpoint, AllIcons.Debugger.Db_verified_breakpoint, null);
  })
  .rejected(t -> {
   String message = t == null ? null : t.getMessage();
   getSession().updateBreakpointPresentation(breakpoint, AllIcons.Debugger.Db_invalid_breakpoint, message);
  });
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

@Nullable
private static Language getFileTypeLanguage(
  XLineBreakpoint<CloudLineBreakpointProperties> breakpoint) {
 if (breakpoint.getSourcePosition() != null) {
  FileType fileType = breakpoint.getSourcePosition().getFile().getFileType();
  if (fileType instanceof LanguageFileType) {
   return ((LanguageFileType) fileType).getLanguage();
  }
 }
 return null;
}

代码示例来源:origin: intellij-dlanguage/intellij-dlanguage

} else {
  XSourcePosition sourcePosition = breakpoint.getSourcePosition();
  if (sourcePosition == null) {
    return;

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

debuggerEditorsProvider,
this,
breakpoint.getSourcePosition(),
"GoogleCloudTools.BreakpointWatchContextMenu",
null);

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

public void registerBreakpoint(
  @NotNull final XLineBreakpoint<CloudLineBreakpointProperties> ideBreakpoint) {
 if (ideBreakpoint.getSourcePosition() == null
   || !ideBreakpoint.isEnabled()
   || !(ideBreakpoint.getType() instanceof CloudLineBreakpointType)) {
 PsiFile psiFile = psiManager.findFile(ideBreakpoint.getSourcePosition().getFile());
 location.setLine(ideBreakpoint.getSourcePosition().getLine() + 1);

相关文章