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