use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class XBreakpointUtil method collectPanelProviders.
public static List<BreakpointPanelProvider> collectPanelProviders() {
List<BreakpointPanelProvider> panelProviders = new ArrayList<>();
for (DebuggerSupport debuggerSupport : DebuggerSupport.getDebuggerSupports()) {
panelProviders.add(debuggerSupport.getBreakpointPanelProvider());
}
panelProviders.sort((o1, o2) -> o2.getPriority() - o1.getPriority());
return panelProviders;
}
use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class XBreakpointUtil method getDebuggerSupport.
@Nullable
public static DebuggerSupport getDebuggerSupport(Project project, BreakpointItem breakpointItem) {
DebuggerSupport[] debuggerSupports = DebuggerSupport.getDebuggerSupports();
List<BreakpointItem> items = new ArrayList<>();
for (DebuggerSupport support : debuggerSupports) {
support.getBreakpointPanelProvider().provideBreakpointItems(project, items);
if (items.contains(breakpointItem)) {
return support;
}
items.clear();
}
return null;
}
use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class ValueLookupManager method mouseMoved.
@Override
public void mouseMoved(EditorMouseEvent e) {
if (e.isConsumed()) {
return;
}
Editor editor = e.getEditor();
if (editor.getProject() != null && editor.getProject() != myProject) {
return;
}
ValueHintType type = AbstractValueHint.getHintType(e);
if (e.getArea() != EditorMouseEventArea.EDITING_AREA || DISABLE_VALUE_LOOKUP.get(editor) == Boolean.TRUE || type == null) {
myAlarm.cancelAllRequests();
return;
}
Point point = e.getMouseEvent().getPoint();
if (myRequest != null && !myRequest.isKeepHint(editor, point)) {
hideHint();
}
for (DebuggerSupport support : mySupports) {
QuickEvaluateHandler handler = support.getQuickEvaluateHandler();
if (handler.isEnabled(myProject)) {
requestHint(handler, editor, point, type);
break;
}
}
}
use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class XBreakpointUtil method findSelectedBreakpoint.
@NotNull
public static Pair<GutterIconRenderer, Object> findSelectedBreakpoint(@NotNull final Project project, @NotNull final Editor editor) {
int offset = editor.getCaretModel().getOffset();
Document editorDocument = editor.getDocument();
DebuggerSupport[] debuggerSupports = DebuggerSupport.getDebuggerSupports();
for (DebuggerSupport debuggerSupport : debuggerSupports) {
final BreakpointPanelProvider<?> provider = debuggerSupport.getBreakpointPanelProvider();
final int textLength = editor.getDocument().getTextLength();
if (offset > textLength) {
offset = textLength;
}
Object breakpoint = provider.findBreakpoint(project, editorDocument, offset);
if (breakpoint != null) {
final GutterIconRenderer iconRenderer = provider.getBreakpointGutterIconRenderer(breakpoint);
return Pair.create(iconRenderer, breakpoint);
}
}
return Pair.create(null, null);
}
use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class MarkObjectAction method update.
@Override
public void update(AnActionEvent event) {
Project project = event.getData(CommonDataKeys.PROJECT);
boolean enabled = false;
Presentation presentation = event.getPresentation();
boolean hidden = true;
if (project != null) {
for (DebuggerSupport support : DebuggerSupport.getDebuggerSupports()) {
MarkObjectActionHandler handler = support.getMarkObjectHandler();
hidden &= handler.isHidden(project, event);
if (handler.isEnabled(project, event)) {
enabled = true;
String text;
if (handler.isMarked(project, event)) {
text = ActionsBundle.message("action.Debugger.MarkObject.unmark.text");
} else {
text = ActionsBundle.message("action.Debugger.MarkObject.text");
}
presentation.setText(text);
break;
}
}
}
presentation.setVisible(!hidden && (!ActionPlaces.isPopupPlace(event.getPlace()) || enabled));
presentation.setEnabled(enabled);
}
Aggregations