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


Java XBreakpointUtil类代码示例

本文整理汇总了Java中com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil的典型用法代码示例。如果您正苦于以下问题:Java XBreakpointUtil类的具体用法?Java XBreakpointUtil怎么用?Java XBreakpointUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XBreakpointUtil类属于com.intellij.xdebugger.impl.breakpoints包,在下文中一共展示了XBreakpointUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addBreakpoint

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public static <T extends XBreakpointType> XBreakpoint addBreakpoint(@NotNull final Project project,
                                                                    @NotNull final Class<T> exceptionType,
                                                                    @NotNull final XBreakpointProperties properties) {
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  XBreakpointType[] types = XBreakpointUtil.getBreakpointTypes();
  final Ref<XBreakpoint> breakpoint = Ref.create(null);
  for (XBreakpointType type : types) {
    if (exceptionType.isInstance(type)) {
      final T breakpointType = exceptionType.cast(type);
      new WriteAction() {
        @Override
        protected void run(@NotNull Result result) throws Throwable {
          breakpoint.set(breakpointManager.addBreakpoint(breakpointType, properties));
        }
      }.execute();
      break;
    }
  }
  return breakpoint.get();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:XDebuggerTestUtil.java

示例2: loadProperties

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public void loadProperties() {
  for (XBreakpointPropertiesSubPanel<B> panel : mySubPanels) {
    panel.loadProperties();
  }
  
  if (myConditionComboBox != null) {
    String condition = myBreakpoint.getCondition();
    myConditionComboBox.setText(condition != null ? condition : "");
  }

  for (XBreakpointCustomPropertiesPanel<B> customPanel : myCustomPanels) {
    customPanel.loadFrom(myBreakpoint);
  }
  myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
  myEnabledCheckbox.setText(XBreakpointUtil.getShortText(myBreakpoint) + " enabled");
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:XLightBreakpointPropertiesPanel.java

示例3: addBreakpoint

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public static <T extends XBreakpointType> XBreakpoint addBreakpoint(@NotNull final Project project,
                                                                    @NotNull final Class<T> exceptionType,
                                                                    @NotNull final XBreakpointProperties properties) {
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  XBreakpointType[] types = XBreakpointUtil.getBreakpointTypes();
  final Ref<XBreakpoint> breakpoint = Ref.create(null);
  for (XBreakpointType type : types) {
    if (exceptionType.isInstance(type)) {
      final T breakpointType = exceptionType.cast(type);
      new WriteAction() {
        @Override
        protected void run(Result result) throws Throwable {
          breakpoint.set(breakpointManager.addBreakpoint(breakpointType, properties));
        }
      }.execute();
      break;
    }
  }
  return breakpoint.get();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:XDebuggerTestUtil.java

示例4: addBreakpoint

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public static <T extends XBreakpointType> XBreakpoint addBreakpoint(@Nonnull final Project project,
                                                                    @Nonnull final Class<T> exceptionType,
                                                                    @Nonnull final XBreakpointProperties properties) {
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  XBreakpointType[] types = XBreakpointUtil.getBreakpointTypes();
  final Ref<XBreakpoint> breakpoint = Ref.create(null);
  for (XBreakpointType type : types) {
    if (exceptionType.isInstance(type)) {
      final T breakpointType = exceptionType.cast(type);
      new WriteAction() {
        @Override
        protected void run(Result result) throws Throwable {
          breakpoint.set(breakpointManager.addBreakpoint(breakpointType, properties));
        }
      }.execute();
      break;
    }
  }
  return breakpoint.get();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:XDebuggerTestUtil.java

示例5: getLineBreakpointTypes

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
@Override
public XLineBreakpointType<?>[] getLineBreakpointTypes() {
  if (myLineBreakpointTypes == null) {
    XBreakpointType[] types = XBreakpointUtil.getBreakpointTypes();
    List<XLineBreakpointType<?>> lineBreakpointTypes = new ArrayList<XLineBreakpointType<?>>();
    for (XBreakpointType type : types) {
      if (type instanceof XLineBreakpointType<?>) {
        lineBreakpointTypes.add((XLineBreakpointType<?>)type);
      }
    }
    myLineBreakpointTypes = lineBreakpointTypes.toArray(new XLineBreakpointType<?>[lineBreakpointTypes.size()]);
  }
  return myLineBreakpointTypes;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:XDebuggerUtilImpl.java

示例6: findBreakpointType

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
@Override
public <B extends XBreakpoint<?>> XBreakpointType<B, ?> findBreakpointType(@NotNull Class<? extends XBreakpointType<B, ?>> typeClass) {
  if (myBreakpointTypeByClass == null) {
    myBreakpointTypeByClass = new THashMap<Class<? extends XBreakpointType>, XBreakpointType<?, ?>>();
    for (XBreakpointType<?, ?> breakpointType : XBreakpointUtil.getBreakpointTypes()) {
      myBreakpointTypeByClass.put(breakpointType.getClass(), breakpointType);
    }
  }
  XBreakpointType<?, ?> type = myBreakpointTypeByClass.get(typeClass);
  //noinspection unchecked
  return (XBreakpointType<B, ?>)type;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebuggerUtilImpl.java

示例7: perform

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
@Override
public void perform(@NotNull Project project, AnActionEvent event) {
  DataContext dataContext = event.getDataContext();
  Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
  if (editor == null) return;

  final Pair<GutterIconRenderer,Object> pair = XBreakpointUtil.findSelectedBreakpoint(project, editor);

  Object breakpoint = pair.second;
  GutterIconRenderer breakpointGutterRenderer = pair.first;

  if (breakpointGutterRenderer == null) return;
  editBreakpoint(project, editor, breakpoint, breakpointGutterRenderer);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:EditBreakpointActionHandler.java

示例8: isEnabled

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
@Override
public boolean isEnabled(@NotNull Project project, AnActionEvent event) {
  DataContext dataContext = event.getDataContext();
  Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
  if (editor == null) return false;
  final Pair<GutterIconRenderer,Object> pair = XBreakpointUtil.findSelectedBreakpoint(project, editor);
  return pair.first != null && pair.second instanceof XLineBreakpointImpl;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XDebuggerEditBreakpointActionHandler.java

示例9: actionPerformed

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  DataContext dataContext = e.getDataContext();
  Project project = CommonDataKeys.PROJECT.getData(dataContext);
  if (project == null) return;

  if (myInitialBreakpoint == null) {
    Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
    if (editor != null) {
      myInitialBreakpoint = XBreakpointUtil.findSelectedBreakpoint(project, editor).second;
    }
  }

  BreakpointsDialogFactory.getInstance(project).showDialog(myInitialBreakpoint);
  myInitialBreakpoint = null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ViewBreakpointsAction.java

示例10: perform

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public void perform(@NotNull final Project project, final AnActionEvent event) {
  Editor editor = event.getData(CommonDataKeys.EDITOR);
  // do not toggle more than once on the same line
  Set<Integer> processedLines = new HashSet<Integer>();
  for (XSourcePosition position : XDebuggerUtilImpl.getAllCaretsPositions(project, event.getDataContext())) {
    if (processedLines.add(position.getLine())) {
      XBreakpointUtil.toggleLineBreakpoint(project, position, editor, myTemporary, true);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:XToggleLineBreakpointActionHandler.java

示例11: loadProperties

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public void loadProperties() {
  for (XBreakpointPropertiesSubPanel<B> panel : mySubPanels) {
    panel.loadProperties();
  }

  if (myConditionComboBox != null) {
    XExpression condition = myBreakpoint.getConditionExpressionInt();
    myConditionComboBox.setExpression(condition);
    boolean hideCheckbox = !myShowAllOptions && condition == null;
    myConditionEnabledCheckbox.setSelected(hideCheckbox || (myBreakpoint.isConditionEnabled() && condition != null));
    myConditionEnabledPanel.removeAll();
    if (hideCheckbox) {
      JBLabel label = new JBLabel(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
      label.setBorder(JBUI.Borders.empty(0, 4));
      myConditionEnabledPanel.add(label);
    }
    else {
      myConditionEnabledPanel.add(myConditionEnabledCheckbox);
    }

    onCheckboxChanged();
  }
  
  for (XBreakpointCustomPropertiesPanel<B> customPanel : myCustomPanels) {
    customPanel.loadFrom(myBreakpoint);
  }
  myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
  myBreakpointNameLabel.setText(XBreakpointUtil.getShortText(myBreakpoint));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:XLightBreakpointPropertiesPanel.java

示例12: showDialog

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public void showDialog(@Nullable Object initialBreakpoint) {
  if (myDialogShowing != null) {
    return;
  }

  final BreakpointsDialog dialog = new BreakpointsDialog(myProject, initialBreakpoint != null ? initialBreakpoint : myBreakpoint, XBreakpointUtil.collectPanelProviders()) {
    @Override
    protected void dispose() {
      myBreakpoint = null;
      for (BreakpointPanelProvider provider : XBreakpointUtil.collectPanelProviders()) {
        provider.onDialogClosed(myProject);
      }
      myDialogShowing = null;

      super.dispose();
    }
  };

  if (myBalloonToHide != null) {
    if (!myBalloonToHide.isDisposed()) {
      myBalloonToHide.hide();
    }
    myBalloonToHide = null;
  }
  myDialogShowing = dialog;

  dialog.show();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:BreakpointsDialogFactory.java

示例13: isEnabled

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
@Override
public boolean isEnabled(@NotNull Project project, AnActionEvent event) {
  DataContext dataContext = event.getDataContext();
  Editor editor = PlatformDataKeys.EDITOR.getData(dataContext);
  if (editor == null) {
    return false;
  }
  final Pair<GutterIconRenderer,Object> pair = XBreakpointUtil.findSelectedBreakpoint(project, editor);
  return pair.first != null && pair.second instanceof BreakpointWithHighlighter;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:JavaEditBreakpointActionHandler.java

示例14: getLineBreakpointTypes

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public XLineBreakpointType<?>[] getLineBreakpointTypes() {
  if (myLineBreakpointTypes == null) {
    XBreakpointType[] types = XBreakpointUtil.getBreakpointTypes();
    List<XLineBreakpointType<?>> lineBreakpointTypes = new ArrayList<XLineBreakpointType<?>>();
    for (XBreakpointType type : types) {
      if (type instanceof XLineBreakpointType<?>) {
        lineBreakpointTypes.add((XLineBreakpointType<?>)type);
      }
    }
    myLineBreakpointTypes = lineBreakpointTypes.toArray(new XLineBreakpointType<?>[lineBreakpointTypes.size()]);
  }
  return myLineBreakpointTypes;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:XDebuggerUtilImpl.java

示例15: findBreakpointType

import com.intellij.xdebugger.impl.breakpoints.XBreakpointUtil; //导入依赖的package包/类
public <B extends XBreakpoint<?>> XBreakpointType<B, ?> findBreakpointType(@NotNull Class<? extends XBreakpointType<B, ?>> typeClass) {
  if (myBreakpointTypeByClass == null) {
    myBreakpointTypeByClass = new HashMap<Class<? extends XBreakpointType>, XBreakpointType<?,?>>();
    for (XBreakpointType<?, ?> breakpointType : XBreakpointUtil.getBreakpointTypes()) {
      myBreakpointTypeByClass.put(breakpointType.getClass(), breakpointType);
    }
  }
  XBreakpointType<?, ?> type = myBreakpointTypeByClass.get(typeClass);
  //noinspection unchecked
  return (XBreakpointType<B, ?>)type;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:XDebuggerUtilImpl.java


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