typeCls = JavaExceptionBreakpointType.class;
}
if (typeCls != null) {
- XBreakpointType<XBreakpoint<?>, ?> type = XDebuggerUtil.getInstance().findBreakpointType(typeCls);
+ XBreakpointType type = XDebuggerUtil.getInstance().findBreakpointType(typeCls);
((XBreakpointManagerImpl)getXBreakpointManager()).getBreakpointDefaults(type).setSuspendPolicy(Breakpoint.transformSuspendPolicy(defaults.getSuspendPolicy()));
}
}
@NotNull
public ExceptionBreakpoint addExceptionBreakpoint(@NotNull final String exceptionClassName, final String packageName) {
ApplicationManager.getApplication().assertIsDispatchThread();
- final JavaExceptionBreakpointType type = (JavaExceptionBreakpointType)XDebuggerUtil.getInstance().findBreakpointType(JavaExceptionBreakpointType.class);
+ final JavaExceptionBreakpointType type = XDebuggerUtil.getInstance().findBreakpointType(JavaExceptionBreakpointType.class);
return ApplicationManager.getApplication().runWriteAction(new Computable<ExceptionBreakpoint>() {
@Override
public ExceptionBreakpoint compute() {
final Element breakpointElement = group.getChild("breakpoint");
if (breakpointElement != null) {
XBreakpointManager manager = XDebuggerManager.getInstance(myProject).getBreakpointManager();
- JavaExceptionBreakpointType type = (JavaExceptionBreakpointType)XDebuggerUtil.getInstance().findBreakpointType(JavaExceptionBreakpointType.class);
+ JavaExceptionBreakpointType type = XDebuggerUtil.getInstance().findBreakpointType(JavaExceptionBreakpointType.class);
XBreakpoint<JavaExceptionBreakpointProperties> xBreakpoint = manager.getDefaultBreakpoint(type);
Breakpoint breakpoint = getJavaBreakpoint(xBreakpoint);
if (breakpoint != null) {
/*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public abstract void removeBreakpoint(Project project, XBreakpoint<?> breakpoint);
- public abstract <B extends XBreakpoint<?>> XBreakpointType<B, ?> findBreakpointType(@NotNull Class<? extends XBreakpointType<B, ?>> typeClass);
+ public abstract <T extends XBreakpointType> T findBreakpointType(@NotNull Class<T> typeClass);
/**
* Create {@link XSourcePosition} instance by line number
/*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
@Override
- public <B extends XBreakpoint<?>> XBreakpointType<B, ?> findBreakpointType(@NotNull Class<? extends XBreakpointType<B, ?>> typeClass) {
+ public <T extends XBreakpointType> T findBreakpointType(@NotNull Class<T> typeClass) {
if (myBreakpointTypeByClass == null) {
myBreakpointTypeByClass = new THashMap<Class<? extends XBreakpointType>, XBreakpointType<?, ?>>();
for (XBreakpointType<?, ?> breakpointType : XBreakpointUtil.getBreakpointTypes()) {
}
XBreakpointType<?, ?> type = myBreakpointTypeByClass.get(typeClass);
//noinspection unchecked
- return (XBreakpointType<B, ?>)type;
+ return (T)type;
}
@Override