mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-59487
This commit is contained in:
@@ -589,7 +589,7 @@ public class BreakpointManager implements JDOMExternalizable {
|
||||
|
||||
}
|
||||
}
|
||||
catch (InvalidDataException e) {
|
||||
catch (InvalidDataException ignored) {
|
||||
}
|
||||
|
||||
final Element rulesGroup = parentNode.getChild(RULES_GROUP_NAME);
|
||||
@@ -827,7 +827,7 @@ public class BreakpointManager implements JDOMExternalizable {
|
||||
//interaction with RequestManagerImpl
|
||||
public void disableBreakpoints(final DebugProcessImpl debugProcess) {
|
||||
final List<Breakpoint> breakpoints = getBreakpoints();
|
||||
if (breakpoints.size() > 0) {
|
||||
if (!breakpoints.isEmpty()) {
|
||||
final RequestManagerImpl requestManager = debugProcess.getRequestsManager();
|
||||
for (Breakpoint breakpoint : breakpoints) {
|
||||
breakpoint.markVerified(requestManager.isVerified(breakpoint));
|
||||
@@ -843,7 +843,7 @@ public class BreakpointManager implements JDOMExternalizable {
|
||||
|
||||
public void enableBreakpoints(final DebugProcessImpl debugProcess) {
|
||||
final List<Breakpoint> breakpoints = getBreakpoints();
|
||||
if (breakpoints.size() > 0) {
|
||||
if (!breakpoints.isEmpty()) {
|
||||
for (Breakpoint breakpoint : breakpoints) {
|
||||
breakpoint.markVerified(false); // clean cached state
|
||||
breakpoint.createRequest(debugProcess);
|
||||
|
||||
+12
-3
@@ -415,7 +415,8 @@ public abstract class BreakpointWithHighlighter extends Breakpoint {
|
||||
}
|
||||
|
||||
private void setupGutterRenderer() {
|
||||
getHighlighter().setGutterIconRenderer(new MyGutterIconRenderer());
|
||||
MyGutterIconRenderer renderer = new MyGutterIconRenderer(getIcon(), getDescription());
|
||||
getHighlighter().setGutterIconRenderer(renderer);
|
||||
}
|
||||
|
||||
public abstract Key<? extends BreakpointWithHighlighter> getCategory();
|
||||
@@ -623,13 +624,21 @@ public abstract class BreakpointWithHighlighter extends Breakpoint {
|
||||
}
|
||||
|
||||
private class MyGutterIconRenderer extends GutterIconRenderer {
|
||||
private final Icon myIcon;
|
||||
private final String myDescription;
|
||||
|
||||
public MyGutterIconRenderer(Icon icon, String description) {
|
||||
myIcon = icon;
|
||||
myDescription = description;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Icon getIcon() {
|
||||
return BreakpointWithHighlighter.this.getIcon();
|
||||
return myIcon;
|
||||
}
|
||||
|
||||
public String getTooltipText() {
|
||||
return getDescription();
|
||||
return myDescription;
|
||||
}
|
||||
|
||||
public AnAction getClickAction() {
|
||||
|
||||
+2
-1
@@ -539,7 +539,8 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
private void paintIconRow(int line, ArrayList<GutterIconRenderer> row, final Graphics g) {
|
||||
processIconsRow(line, row, new LineGutterIconRendererProcessor() {
|
||||
public void process(int x, int y, GutterIconRenderer renderer) {
|
||||
renderer.getIcon().paintIcon(EditorGutterComponentImpl.this, g, x, y);
|
||||
Icon icon = renderer.getIcon();
|
||||
icon.paintIcon(EditorGutterComponentImpl.this, g, x, y);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user