com.intellij.xdebugger.breakpoints.XBreakpointType Java Examples

The following examples show how to use com.intellij.xdebugger.breakpoints.XBreakpointType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XBreakpointsTestCase.java    From consulo with Apache License 2.0 6 votes vote down vote up
protected List<XBreakpoint<?>> getAllBreakpoints() {
  final XBreakpointBase<?,?,?>[] breakpoints = myBreakpointManager.getAllBreakpoints();
  final List<XBreakpoint<?>> result = new ArrayList<XBreakpoint<?>>();
  for (XBreakpointBase<?, ?, ?> breakpoint : breakpoints) {
    final XBreakpointType type = breakpoint.getType();
    if (type instanceof MySimpleBreakpointType || type instanceof MyLineBreakpointType) {
      result.add(breakpoint);
    }
  }
  Collections.sort(result, new Comparator<XBreakpoint<?>>() {
    @Override
    public int compare(XBreakpoint<?> o1, XBreakpoint<?> o2) {
      return StringUtil.compare(((MyBreakpointProperties)o1.getProperties()).myOption,
                                ((MyBreakpointProperties)o2.getProperties()).myOption, true);
    }
  });
  return result;
}
 
Example #2
Source File: XBreakpointBase.java    From consulo with Apache License 2.0 5 votes vote down vote up
public XBreakpointBase(final XBreakpointType<Self, P> type, XBreakpointManagerImpl breakpointManager, final @Nullable P properties, final S state) {
  myState = state;
  myType = type;
  myProperties = properties;
  myBreakpointManager = breakpointManager;
  initExpressions();
}
 
Example #3
Source File: XBreakpointBase.java    From consulo with Apache License 2.0 5 votes vote down vote up
protected XBreakpointBase(final XBreakpointType<Self, P> type, XBreakpointManagerImpl breakpointManager, S breakpointState) {
  myState = breakpointState;
  myType = type;
  myBreakpointManager = breakpointManager;
  myProperties = type.createProperties();
  if (myProperties != null) {
    ComponentSerializationUtil.loadComponentState(myProperties, myState.getPropertiesElement());
  }
  initExpressions();
}
 
Example #4
Source File: XDebuggerTestCase.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected void initApplication() throws Exception {
  super.initApplication();
  final ExtensionPoint<XBreakpointType> point = getBreakpointTypes();
 // point.registerExtension(MY_LINE_BREAKPOINT_TYPE);
 // point.registerExtension(MY_SIMPLE_BREAKPOINT_TYPE);
}
 
Example #5
Source File: HaxeBreakpointType.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
public Class<? extends XBreakpointType<XLineBreakpoint<XBreakpointProperties>, ?>> getBreakpointTypeClass() {
  return HaxeBreakpointType.class;
}
 
Example #6
Source File: XBreakpointBase.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
public XBreakpointType<Self, P> getType() {
  return myType;
}
 
Example #7
Source File: BreakpointsDialog.java    From consulo with Apache License 2.0 4 votes vote down vote up
public AddXBreakpointAction(XBreakpointType<?, ?> type) {
  myType = type;
  getTemplatePresentation().setIcon(type.getEnabledIcon());
  getTemplatePresentation().setText(type.getTitle());
}
 
Example #8
Source File: XBreakpointTypeGroup.java    From consulo with Apache License 2.0 4 votes vote down vote up
public XBreakpointTypeGroup(XBreakpointType type) {
  myBreakpointType = type;
}
 
Example #9
Source File: XBreakpointTypeGroup.java    From consulo with Apache License 2.0 4 votes vote down vote up
public XBreakpointType getBreakpointType() {
  return myBreakpointType;
}
 
Example #10
Source File: XBreakpointTypeGroup.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static int indexOfType(XBreakpointType type) {
  return ContainerUtil.indexOf(XBreakpointUtil.getBreakpointTypes(), type);
}
 
Example #11
Source File: DebuggerConfigurable.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isVisible() {
  return XBreakpointType.EXTENSION_POINT_NAME.hasAnyExtensions();
}
 
Example #12
Source File: XDebuggerTestCase.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static ExtensionPoint<XBreakpointType> getBreakpointTypes() {
  return Application.get().getExtensionPoint(XBreakpointType.EXTENSION_POINT_NAME);
}