本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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");
}
}
});
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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());
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}