当前位置: 首页>>代码示例>>Java>>正文


Java XLineBreakpoint.getSourcePosition方法代码示例

本文整理汇总了Java中com.intellij.xdebugger.breakpoints.XLineBreakpoint.getSourcePosition方法的典型用法代码示例。如果您正苦于以下问题:Java XLineBreakpoint.getSourcePosition方法的具体用法?Java XLineBreakpoint.getSourcePosition怎么用?Java XLineBreakpoint.getSourcePosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.xdebugger.breakpoints.XLineBreakpoint的用法示例。


在下文中一共展示了XLineBreakpoint.getSourcePosition方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEditorsProvider

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public XDebuggerEditorsProvider getEditorsProvider(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, @NotNull Project project)
{
    final XSourcePosition position = breakpoint.getSourcePosition();
    if (position == null)
    {
        return null;
    }

    final PsiFile file = PsiManager.getInstance(project).findFile(position.getFile());
    if (file == null)
    {
        return null;
    }

    return new MuleDebuggerEditorsProvider();
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:18,代码来源:MuleBreakpointType.java

示例2: getEditorsProvider

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public XDebuggerEditorsProvider getEditorsProvider(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, @NotNull Project project)
{
    final XSourcePosition position = breakpoint.getSourcePosition();
    if (position == null)
    {
        return null;
    }

    final PsiFile file = PsiManager.getInstance(project).findFile(position.getFile());
    if (file == null)
    {
        return null;
    }

    return new WeaveDebuggerEditorsProvider();
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:18,代码来源:WeaveBreakpointType.java

示例3: getEditorsProvider

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public XDebuggerEditorsProvider getEditorsProvider(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, @NotNull Project project) {
  final XSourcePosition position = breakpoint.getSourcePosition();
  if (position == null) {
    return null;
  }

  final PsiFile file = PsiManager.getInstance(project).findFile(position.getFile());
  if (file == null) {
    return null;
  }

  final XsltChecker.LanguageLevel level = XsltSupport.getXsltLanguageLevel(file);
  if (level == XsltChecker.LanguageLevel.V1) {
    return myMyEditorsProvider1;
  } else if (level == XsltChecker.LanguageLevel.V2) {
    return myMyEditorsProvider2;
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:XsltBreakpointType.java

示例4: handleMessage

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
private void registerBreakpoint
  (@NotNull final XLineBreakpoint<XBreakpointProperties> breakpoint) {
  final XSourcePosition position = breakpoint.getSourcePosition();
  if (position == null) {
    return;
  }

  String path = getRelativePath(mProject, position.getFile());

  DebugProcess.this.enqueueCommand
    (debugger.Command.AddFileLineBreakpoint
      (path, position.getLine() + 1), new MessageListener() {
      public void handleMessage(int messageId,
                                debugger.Message message) {
        if (messageId == JavaProtocol.IdFileLineBreakpointNumber) {
          mMap.put(breakpoint, (Integer)(message.params.__a[0]));
        }
        else {
          getSession().updateBreakpointPresentation
            (breakpoint,
             AllIcons.Debugger.Db_invalid_breakpoint, null);
          DebugProcess.this.warn("Cannot set breakpoint");
        }
      }
    });
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:27,代码来源:HaxeDebugRunner.java

示例5: registerBreakpoint

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
public void registerBreakpoint(@NotNull final XLineBreakpoint<XBreakpointProperties> breakpoint) {
  final XSourcePosition position = breakpoint.getSourcePosition();
  if (position != null) {
    myDebugProcess.addBreakpoint(myDebugProcess.getPositionConverter().convertToPython(position), breakpoint);
    myBreakPointPositions.put(breakpoint, position);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AbstractLineBreakpointHandler.java

示例6: unregisterBreakpoint

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public void unregisterBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, final boolean temporary) {
  final XSourcePosition sourcePosition = breakpoint.getSourcePosition();
  if (sourcePosition == null || !sourcePosition.getFile().exists() || !sourcePosition.getFile().isValid()) {
    // ???
    return;
  }

  final VirtualFile file = sourcePosition.getFile();
  final Project project = myXsltDebugProcess.getSession().getProject();
  final String fileURL = getFileURL(file);
  final int lineNumber = getActualLineNumber(breakpoint, project);

  try {
    final BreakpointManager manager = myXsltDebugProcess.getBreakpointManager();
    if (temporary) {
      final Breakpoint bp = manager.getBreakpoint(fileURL, lineNumber);
      if (bp != null) {
        bp.setEnabled(false);
      }
    } else {
      manager.removeBreakpoint(fileURL, lineNumber);
    }
  } catch (DebuggerStoppedException ignore) {
  } catch (VMPausedException e) {
    myXsltDebugProcess.getSession().reportMessage("Target VM is not responding. Breakpoint can not be removed", MessageType.ERROR);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:XsltBreakpointHandler.java

示例7: getFileTypeLanguage

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@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;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:12,代码来源:BreakpointConfigurationPanel.java

示例8: registerBreakpoint

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public void registerBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint) {
    final XSourcePosition sourcePosition = breakpoint.getSourcePosition();
    if (isSourcePositionInvalid(sourcePosition)) return;

    final int lineNumber = getActualLineNumber(breakpoint.getLine());
    if (handleInvalidLine(breakpoint, lineNumber)) return;
    debugProcess.setBreakpoint(getFileUrl(sourcePosition), lineNumber, breakpoint.getConditionExpression());
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:10,代码来源:XQueryBreakpointHandler.java

示例9: unregisterBreakpoint

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public void unregisterBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, boolean temporary) {
    final XSourcePosition sourcePosition = breakpoint.getSourcePosition();
    if (isSourcePositionInvalid(sourcePosition)) return;

    final int lineNumber = getActualLineNumber(breakpoint.getLine());
    if (handleInvalidLine(breakpoint, lineNumber)) return;
    debugProcess.removeBreakpoint(getFileUrl(sourcePosition), lineNumber);
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:10,代码来源:XQueryBreakpointHandler.java

示例10: getEditorsProvider

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public XDebuggerEditorsProvider getEditorsProvider(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, @NotNull Project project) {
    final XSourcePosition position = breakpoint.getSourcePosition();
    if (position == null) {
        return null;
    }
    final PsiFile file = PsiManager.getInstance(project).findFile(position.getFile());
    if (file == null) {
        return null;
    }
    return new XQueryEditorsProvider();
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:13,代码来源:XQueryBreakpointType.java

示例11: getEditorsProvider

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@Override
public XDebuggerEditorsProvider getEditorsProvider(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, @NotNull Project project)
{
	final XSourcePosition position = breakpoint.getSourcePosition();
	if(position == null)
	{
		return null;
	}

	final PsiFile file = PsiManager.getInstance(project).findFile(position.getFile());
	if(file == null)
	{
		return null;
	}

	final XsltChecker.LanguageLevel level = XsltSupport.getXsltLanguageLevel(file);
	if(level == XsltChecker.LanguageLevel.V1)
	{
		return myMyEditorsProvider1;
	}
	else if(level == XsltChecker.LanguageLevel.V2)
	{
		return myMyEditorsProvider2;
	}

	return null;
}
 
开发者ID:consulo,项目名称:consulo-xslt,代码行数:28,代码来源:XsltBreakpointType.java

示例12: toMuleBreakpoint

import com.intellij.xdebugger.breakpoints.XLineBreakpoint; //导入方法依赖的package包/类
@NotNull
public static Breakpoint toMuleBreakpoint(Project project, XLineBreakpoint<XBreakpointProperties> lineBreakpoint, @Nullable Map<String, String> modulesToAppsMap) {
    final XSourcePosition sourcePosition = lineBreakpoint.getSourcePosition();
    final XExpression conditionExpression = lineBreakpoint.getConditionExpression();
    return toMuleBreakpoint(project, sourcePosition, conditionExpression, modulesToAppsMap);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:7,代码来源:MuleConfigUtils.java


注:本文中的com.intellij.xdebugger.breakpoints.XLineBreakpoint.getSourcePosition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。