This commit is contained in:
Nikolay Chashnikov
2009-09-10 14:08:05 +04:00
parent 9a2688cff0
commit be3dcbd215
11 changed files with 26 additions and 21 deletions
@@ -330,7 +330,7 @@ public class ArtifactUtil {
final List<CompositePackagingElement<?>> compositeChildren = new SmartList<CompositePackagingElement<?>>();
final List<FileCopyPackagingElement> fileCopies = new SmartList<FileCopyPackagingElement>();
final List<FileCopyPackagingElement> dirCopies = new SmartList<FileCopyPackagingElement>();
ArtifactUtil.processElements(parent.getChildren(), context, artifactType, new Processor<PackagingElement<?>>() {
processElements(parent.getChildren(), context, artifactType, new Processor<PackagingElement<?>>() {
public boolean process(PackagingElement<?> element) {
if (element instanceof CompositePackagingElement) {
final CompositePackagingElement<?> compositeElement = (CompositePackagingElement<?>)element;
@@ -10,6 +10,8 @@ package com.intellij.codeInspection;
import com.intellij.openapi.application.ApplicationStarter;
import java.util.Arrays;
public class InspectionMain implements ApplicationStarter {
private InspectionApplication myApplication;
@@ -20,7 +22,7 @@ public class InspectionMain implements ApplicationStarter {
@SuppressWarnings({"HardCodedStringLiteral"})
public void premain(String[] args) {
if (args.length < 4) {
System.err.println("invalid args:" + args);
System.err.println("invalid args:" + Arrays.toString(args));
printHelp();
}
@@ -16,7 +16,7 @@ import javax.swing.*;
*/
public class DefaultDebugExecutor extends Executor {
@NonNls public static final String EXECUTOR_ID = ToolWindowId.DEBUG;
private static final Icon TOOLWINDOW_ICON = IconLoader.getIcon("/general/toolWindowDebugger.png");
private static final Icon TOOL_WINDOW_ICON = IconLoader.getIcon("/general/toolWindowDebugger.png");
private static final Icon ICON = IconLoader.getIcon("/actions/startDebugger.png");
private static final Icon DISABLED_ICON = IconLoader.getIcon("/process/disabledDebug.png");
private final String myStartActionText = XDebuggerBundle.message("debugger.runner.start.action.text");
@@ -27,7 +27,7 @@ public class DefaultDebugExecutor extends Executor {
}
public Icon getToolWindowIcon() {
return TOOLWINDOW_ICON;
return TOOL_WINDOW_ICON;
}
@NotNull
@@ -44,9 +44,9 @@ import java.util.Comparator;
*/
public abstract class XBreakpointType<B extends XBreakpoint<P>, P extends XBreakpointProperties> {
public static final ExtensionPointName<XBreakpointType> EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.xdebugger.breakpointType");
private @NonNls @NotNull String myId;
private @Nls @NotNull String myTitle;
private boolean mySuspendThreadSupported;
private final @NonNls @NotNull String myId;
private final @Nls @NotNull String myTitle;
private final boolean mySuspendThreadSupported;
/**
* @param id an unique id of breakpoint type
@@ -75,7 +75,7 @@ public abstract class XDebuggerEvaluator {
void errorOccurred(@NotNull String errorMessage);
/**
* @deprecated use {@link XDebuggerEvaluator.XEvaluationCallback#errorOccurred(String)}
* @deprecated use {@link XEvaluationCallback#errorOccurred(String)}
*/
@Deprecated
void errorOccured(@NotNull String errorMessage);
@@ -13,8 +13,8 @@ import java.util.List;
*/
public abstract class XExecutionStack {
public static final XExecutionStack[] EMPTY_ARRAY = new XExecutionStack[0];
private String myDisplayName;
private Icon myIcon;
private final String myDisplayName;
private final Icon myIcon;
protected XExecutionStack(final String displayName) {
this(displayName, DebuggerIcons.SUSPENDED_THREAD_ICON);
@@ -29,7 +29,7 @@ public abstract class XValueModifier {
void errorOccurred(@NotNull String errorMessage);
/**
* @deprecated use {@link XValueModifier.XModificationCallback#errorOccurred(String)}
* @deprecated use {@link XModificationCallback#errorOccurred(String)}
*/
@Deprecated
void errorOccured(@NotNull String errorMessage);
@@ -31,8 +31,8 @@ import javax.swing.*;
* To change this template use File | Settings | File Templates.
*/
public class PsiBackedSmartStepIntoVariant<T extends PsiNamedElement & NavigationItem> extends XSmartStepIntoVariant {
public final T myElement;
private ItemPresentation myPresentation;
private final T myElement;
private final ItemPresentation myPresentation;
public PsiBackedSmartStepIntoVariant(@NotNull T element) {
myElement = element;
@@ -49,4 +49,8 @@ public class PsiBackedSmartStepIntoVariant<T extends PsiNamedElement & Navigatio
public Icon getIcon() {
return myPresentation.getIcon(false);
}
public T getElement() {
return myElement;
}
}
@@ -165,12 +165,12 @@ public class XDebugSessionImpl implements XDebugSession {
}
private void disableSlaveBreakpoints(final XDependentBreakpointManager dependentBreakpointManager) {
Set<XBreakpointBase> slaveBreakpoints = dependentBreakpointManager.getAllSlaveBreakpoints();
Set<XBreakpoint<?>> slaveBreakpoints = dependentBreakpointManager.getAllSlaveBreakpoints();
Set<XBreakpointType<?,?>> breakpointTypes = new HashSet<XBreakpointType<?,?>>();
for (XBreakpointHandler<?> handler : myDebugProcess.getBreakpointHandlers()) {
breakpointTypes.add(getBreakpointTypeClass(handler));
}
for (XBreakpointBase slaveBreakpoint : slaveBreakpoints) {
for (XBreakpoint<?> slaveBreakpoint : slaveBreakpoints) {
if (breakpointTypes.contains(slaveBreakpoint.getType())) {
myDisabledSlaveBreakpoints.add(slaveBreakpoint);
}
@@ -227,6 +227,7 @@ public class XDebugSessionImpl implements XDebugSession {
private <B extends XBreakpoint<?>> void processBreakpoint(final XBreakpoint<?> breakpoint, final XBreakpointHandler<B> handler, boolean register) {
XBreakpointType<?, ?> type = breakpoint.getType();
if (handler.getBreakpointTypeClass().equals(type.getClass())) {
//noinspection unchecked
B b = (B)breakpoint;
handleBreakpoint(handler, b, register, false);
}
@@ -14,7 +14,7 @@ import java.util.*;
* @author nik
*/
public class XDependentBreakpointManager {
private final Map<XBreakpointBase, XDependentBreakpointInfo> mySlave2Info = new HashMap<XBreakpointBase, XDependentBreakpointInfo>();
private final Map<XBreakpoint<?>, XDependentBreakpointInfo> mySlave2Info = new HashMap<XBreakpoint<?>, XDependentBreakpointInfo>();
private final MultiValuesMap<XBreakpointBase, XDependentBreakpointInfo> myMaster2Info = new MultiValuesMap<XBreakpointBase, XDependentBreakpointInfo>();
private final XBreakpointManagerImpl myBreakpointManager;
private final EventDispatcher<XDependentBreakpointListener> myDispatcher;
@@ -157,7 +157,7 @@ public class XDependentBreakpointManager {
return myMaster2Info.containsKey((XBreakpointBase)breakpoint) || mySlave2Info.containsKey(breakpoint);
}
public Set<XBreakpointBase> getAllSlaveBreakpoints() {
public Set<XBreakpoint<?>> getAllSlaveBreakpoints() {
return mySlave2Info.keySet();
}
@@ -148,10 +148,8 @@ public class XBreakpointsTree<B extends XBreakpoint<?>> extends CheckboxTree {
}
private static class BreakpointsTreeCellRenderer extends CheckboxTreeCellRenderer {
public void customizeCellRenderer(final JTree tree,
final Object value,
final boolean selected,
final boolean expanded, final boolean leaf, final int row, final boolean hasFocus) {
@Override
public void customizeRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
if (value instanceof BreakpointNode) {
BreakpointNode node = (BreakpointNode)value;
XBreakpoint breakpoint = node.getBreakpoint();