本文整理汇总了Java中com.intellij.xdebugger.breakpoints.XBreakpointProperties类的典型用法代码示例。如果您正苦于以下问题:Java XBreakpointProperties类的具体用法?Java XBreakpointProperties怎么用?Java XBreakpointProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XBreakpointProperties类属于com.intellij.xdebugger.breakpoints包,在下文中一共展示了XBreakpointProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEditorsProvider
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的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.XBreakpointProperties; //导入依赖的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: testXDebugger
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public void testXDebugger() throws Exception {
final WorkingContextManager manager = getContextManager();
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getProject()).getBreakpointManager();
final XsltBreakpointType type = XBreakpointType.EXTENSION_POINT_NAME.findExtension(XsltBreakpointType.class);
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
XLineBreakpointImpl<XBreakpointProperties> breakpoint =
(XLineBreakpointImpl<XBreakpointProperties>)breakpointManager.addLineBreakpoint(type, "foo", 0, null);
final String name = "foo";
manager.saveContext(name, null);
breakpointManager.removeBreakpoint(breakpoint);
}
});
manager.loadContext("foo");
Collection<? extends XLineBreakpoint<XBreakpointProperties>> breakpoints = breakpointManager.getBreakpoints(type);
assertEquals(1, breakpoints.size());
manager.clearContext();
}
示例4: getEditorsProvider
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的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;
}
示例5: TheRDebugProcess
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public TheRDebugProcess(@NotNull final XDebugSession session,
@NotNull final TheRXProcessHandler processHandler,
@NotNull final ExecutionConsole executionConsole,
@NotNull final TheRDebugger debugger,
@NotNull final TheROutputReceiver outputReceiver,
@NotNull final TheRResolvingSession resolvingSession,
@NotNull final ExecutorService executor) {
super(session);
myProcessHandler = processHandler;
myExecutionConsole = executionConsole;
myDebugger = debugger;
myOutputReceiver = outputReceiver;
myStack = new TheRXStack(myDebugger.getStack(), resolvingSession, executor);
myExecutor = executor;
myBreakpoints = new HashMap<XSourcePositionWrapper, XLineBreakpoint<XBreakpointProperties>>();
myTempBreakpoints = new HashSet<XSourcePositionWrapper>();
myEditorsProvider = new TheREditorsProvider();
myBreakpointHandlers = new XBreakpointHandler[]{new TheRXLineBreakpointHandler()};
myProcessHandler.addListener(this);
}
示例6: perform
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public void perform(@NotNull final Project project, final AnActionEvent event) {
XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(project, event.getDataContext());
if (position == null) return;
ExpandRegionAction.expandRegionAtCaret(project, event.getData(PlatformDataKeys.EDITOR));
int line = position.getLine();
VirtualFile file = position.getFile();
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
for (XLineBreakpointType<?> type : XDebuggerUtil.getInstance().getLineBreakpointTypes()) {
final XLineBreakpoint<? extends XBreakpointProperties> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
if (breakpoint != null && myTemporary && !breakpoint.isTemporary()) {
breakpoint.setTemporary(true);
} else if (type.canPutAt(file, line, project) || breakpoint != null) {
XDebuggerUtil.getInstance().toggleLineBreakpoint(project, type, file, line, myTemporary);
return;
}
}
}
示例7: testXDebugger
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public void testXDebugger() throws Exception {
final WorkingContextManager manager = getContextManager();
final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getProject()).getBreakpointManager();
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
XLineBreakpointImpl<XBreakpointProperties> breakpoint =
(XLineBreakpointImpl<XBreakpointProperties>)breakpointManager.addLineBreakpoint(new XsltBreakpointType(), "foo", 0, null);
final String name = "foo";
manager.saveContext(name, null);
breakpointManager.removeBreakpoint(breakpoint);
}
});
manager.loadContext("foo");
XBreakpoint<?>[] breakpoints = breakpointManager.getAllBreakpoints();
assertEquals(1, breakpoints.length);
manager.clearContext();
}
示例8: DebugProcess
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public DebugProcess(@NotNull XDebugSession session,
Project project, Module module,
int port) throws IOException {
super(session);
mClassesWithStatics = new Vector<String>();
mProject = project;
mModule = module;
mDeferredQueue =
new LinkedList<Pair<debugger.Command, MessageListener>>();
mListenerQueue = new LinkedList<MessageListener>();
mServerSocket = new java.net.ServerSocket(port);
mBreakpointHandlers = this.createBreakpointHandlers();
mMap =
new HashMap<XLineBreakpoint<XBreakpointProperties>, Integer>();
mWriteQueue = QueueProcessor.createRunnableQueueProcessor(QueueProcessor.ThreadToUse.POOLED);
}
示例9: handleMessage
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的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");
}
}
});
}
示例10: stop
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
@Override
public void stop()
{
myVm.detach();
myBreakpoints.clear();
ApplicationManager.getApplication().runReadAction(new Runnable()
{
@Override
public void run()
{
Collection<? extends XLineBreakpoint<XBreakpointProperties>> breakpoints = myXBreakpointManager.getBreakpoints(JavaScriptLineBreakpointType
.class);
for(XLineBreakpoint<XBreakpointProperties> breakpoint : breakpoints)
{
myXBreakpointManager.updateBreakpointPresentation(breakpoint, null, null);
}
}
});
}
示例11: registerBreakpoint
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
@Override
public void registerBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> xBreakpoint)
{
//TODO Here get map from the debuggerManager and pass to the toMuleBreakpoint
final Breakpoint breakpoint = MuleConfigUtils.toMuleBreakpoint(debuggerManager.getProject(), xBreakpoint, modulesToAppsMap);
System.out.println("breakpoint added = " + breakpoint.getApplicationName() + " , path " + breakpoint.getPath());
debuggerManager.addBreakpoint(breakpoint);
}
示例12: unregisterBreakpoint
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
@Override
public void unregisterBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> xBreakpoint, boolean temporary)
{
final Breakpoint breakpoint = MuleConfigUtils.toMuleBreakpoint(debuggerManager.getProject(), xBreakpoint, modulesToAppsMap);
System.out.println("breakpoint removed = " + breakpoint.getApplicationName() + " , path " + breakpoint.getPath());
debuggerManager.removeBreakpoint(breakpoint);
}
示例13: getDisplayText
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
@Override
public String getDisplayText(XLineBreakpoint<XBreakpointProperties> breakpoint) {
XSourcePosition sourcePosition = breakpoint.getSourcePosition();
assert sourcePosition != null;
return "Line " + String.valueOf(sourcePosition.getLine()) +
" in file " + LuaFileUtil.getPathToDisplay(sourcePosition.getFile());
}
示例14: reregisterBreakpoints
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的package包/类
public void reregisterBreakpoints() {
List<XLineBreakpoint<XBreakpointProperties>> breakpoints = Lists.newArrayList(myBreakPointPositions.keySet());
for (XLineBreakpoint<XBreakpointProperties> breakpoint : breakpoints) {
unregisterBreakpoint(breakpoint, false);
registerBreakpoint(breakpoint);
}
}
示例15: registerBreakpoint
import com.intellij.xdebugger.breakpoints.XBreakpointProperties; //导入依赖的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);
}
}