mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -733,4 +733,14 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
|
||||
if (file == null) return null;
|
||||
return file.findElementAt(offset);
|
||||
}
|
||||
|
||||
public static String getLocationMethodQName(@NotNull Location location) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
ReferenceType type = location.declaringType();
|
||||
if (type != null) {
|
||||
res.append(type.name()).append('.');
|
||||
}
|
||||
res.append(location.method().name());
|
||||
return res.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ public class ExportDialog extends DialogWrapper {
|
||||
}
|
||||
return DebuggerBundle.message(
|
||||
"export.threads.stackframe.format",
|
||||
location.declaringType().name() + "." + location.method().name(),
|
||||
DebuggerUtilsEx.getLocationMethodQName(location),
|
||||
sourceName,
|
||||
location.lineNumber()
|
||||
);
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -25,6 +25,7 @@ import com.intellij.debugger.DebuggerManagerEx;
|
||||
import com.intellij.debugger.SourcePosition;
|
||||
import com.intellij.debugger.engine.*;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluateException;
|
||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -177,7 +178,7 @@ public class ExceptionBreakpoint extends Breakpoint<JavaExceptionBreakpointPrope
|
||||
}
|
||||
}
|
||||
final Location location = event.location();
|
||||
final String locationQName = location.declaringType().name() + "." + location.method().name();
|
||||
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
|
||||
String locationFileName;
|
||||
try {
|
||||
locationFileName = location.sourceName();
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.intellij.debugger.engine.SuspendContextImpl;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluateException;
|
||||
import com.intellij.debugger.engine.jdi.VirtualMachineProxy;
|
||||
import com.intellij.debugger.engine.requests.RequestManagerImpl;
|
||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||
import com.intellij.debugger.impl.PositionUtil;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -215,7 +216,7 @@ public class FieldBreakpoint extends BreakpointWithHighlighter<JavaFieldBreakpoi
|
||||
@Override
|
||||
public String getEventMessage(final LocatableEvent event) {
|
||||
final Location location = event.location();
|
||||
final String locationQName = location.declaringType().name() + "." + location.method().name();
|
||||
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
|
||||
String locationFileName;
|
||||
try {
|
||||
locationFileName = location.sourceName();
|
||||
|
||||
@@ -419,7 +419,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
|
||||
if (printFullTrace) {
|
||||
builder.append(DebuggerBundle.message(
|
||||
"status.line.breakpoint.reached.full.trace",
|
||||
location.declaringType().name() + "." + location.method().name())
|
||||
DebuggerUtilsEx.getLocationMethodQName(location))
|
||||
);
|
||||
try {
|
||||
final List<StackFrame> frames = event.thread().frames();
|
||||
@@ -432,7 +432,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
|
||||
else {
|
||||
builder.append(DebuggerBundle.message(
|
||||
"status.line.breakpoint.reached",
|
||||
location.declaringType().name() + "." + location.method().name(),
|
||||
DebuggerUtilsEx.getLocationMethodQName(location),
|
||||
sourceName,
|
||||
getLineIndex() + 1
|
||||
));
|
||||
|
||||
@@ -180,7 +180,7 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
|
||||
|
||||
public String getEventMessage(@NotNull LocatableEvent event) {
|
||||
final Location location = event.location();
|
||||
final String locationQName = location.declaringType().name() + "." + location.method().name();
|
||||
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
|
||||
String locationFileName = "";
|
||||
try {
|
||||
locationFileName = location.sourceName();
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ public class WildcardMethodBreakpoint extends Breakpoint<JavaMethodBreakpointPro
|
||||
|
||||
public String getEventMessage(LocatableEvent event) {
|
||||
final Location location = event.location();
|
||||
final String locationQName = location.declaringType().name() + "." + location.method().name();
|
||||
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
|
||||
String locationFileName = "";
|
||||
try {
|
||||
locationFileName = location.sourceName();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -150,7 +150,11 @@ public class StubSerializationHelper {
|
||||
final int id = DataInputOutputUtil.readINT(stream);
|
||||
final ObjectStubSerializer serializer = getClassById(id);
|
||||
if (serializer == null) {
|
||||
throw new SerializerNotFoundException("No serializer registered for stub: ID=" + id + "; parent stub class=" + (parentStub != null? parentStub.getClass().getName() : "null"));
|
||||
String externalId = null;
|
||||
try {
|
||||
externalId = myNameStorage.valueOf(id);
|
||||
} catch (Throwable ignore) {}
|
||||
throw new SerializerNotFoundException("No serializer registered for stub: ID=" + id + ", externalId:" + externalId + "; parent stub class=" + (parentStub != null? parentStub.getClass().getName() : "null"));
|
||||
}
|
||||
|
||||
Stub stub = serializer.deserialize(stream, parentStub);
|
||||
|
||||
@@ -69,7 +69,12 @@ public class GridCellImpl implements GridCell {
|
||||
myPlaceInGrid = placeInGrid;
|
||||
myPlaceholder = placeholder;
|
||||
myTabs = new JBEditorTabs(myContext.getProject(), myContext.getActionManager(), myContext.getFocusManager(), container) {
|
||||
|
||||
{
|
||||
//noinspection UseJBColor
|
||||
myDefaultPainter.setDefaultTabColor(new Color(0xC6CFDF));
|
||||
//noinspection UseJBColor
|
||||
myDarkPainter.setDefaultTabColor(new Color(0x424D5F));
|
||||
}
|
||||
@Override
|
||||
public boolean useSmallLabels() {
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -36,7 +36,7 @@ import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
public class GridImpl extends Wrapper implements Grid, Disposable, DataProvider {
|
||||
private final ThreeComponentsSplitter myTopSplit = new ThreeComponentsSplitter();
|
||||
private final ThreeComponentsSplitter myTopSplit = new ThreeComponentsSplitter(false, true);
|
||||
private final Splitter mySplitter = new Splitter(true);
|
||||
|
||||
private final Map<PlaceInGrid, GridCellImpl> myPlaceInGrid2Cell = new EnumMap<PlaceInGrid, GridCellImpl>(PlaceInGrid.class);
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.intellij.openapi.util.Weighted;
|
||||
import com.intellij.openapi.wm.IdeGlassPane;
|
||||
import com.intellij.openapi.wm.IdeGlassPaneUtil;
|
||||
import com.intellij.ui.ClickListener;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.update.Activatable;
|
||||
@@ -77,8 +79,11 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable {
|
||||
this(false);
|
||||
}
|
||||
|
||||
|
||||
public ThreeComponentsSplitter(boolean vertical) {
|
||||
this(vertical, false);
|
||||
}
|
||||
|
||||
public ThreeComponentsSplitter(boolean vertical, boolean onePixelDividers) {
|
||||
myVerticalSplit = vertical;
|
||||
myShowDividerControls = false;
|
||||
myFirstDivider = new Divider(true);
|
||||
@@ -86,7 +91,12 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable {
|
||||
myLastDivider = new Divider(false);
|
||||
Disposer.register(this, myLastDivider);
|
||||
|
||||
myDividerWidth = 7;
|
||||
myDividerWidth = onePixelDividers ? 1 : 7;
|
||||
if (onePixelDividers) {
|
||||
final JBColor bg = new JBColor(Gray.xCA, Gray.x37);
|
||||
myFirstDivider.setBackground(bg);
|
||||
myLastDivider.setBackground(bg);
|
||||
}
|
||||
setOpaque(false);
|
||||
add(myFirstDivider);
|
||||
add(myLastDivider);
|
||||
|
||||
@@ -27,6 +27,9 @@ class DarculaEditorTabsPainter extends DefaultEditorTabsPainter {
|
||||
|
||||
@Override
|
||||
protected Color getDefaultTabColor() {
|
||||
if (myDefaultTabColor != null) {
|
||||
return myDefaultTabColor;
|
||||
}
|
||||
return new Color(0x515658);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ public class DefaultEditorTabsPainter extends JBEditorTabsPainter {
|
||||
}
|
||||
|
||||
protected Color getDefaultTabColor() {
|
||||
if (myDefaultTabColor != null) {
|
||||
return myDefaultTabColor;
|
||||
}
|
||||
return Color.WHITE;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ import java.util.List;
|
||||
*/
|
||||
public class JBEditorTabs extends JBTabsImpl {
|
||||
public static final String TABS_ALPHABETICAL_KEY = "tabs.alphabetical";
|
||||
private JBEditorTabsPainter myDarkPainter = new DarculaEditorTabsPainter();
|
||||
private JBEditorTabsPainter myDefaultPainter = new DefaultEditorTabsPainter();
|
||||
protected JBEditorTabsPainter myDarkPainter = new DarculaEditorTabsPainter();
|
||||
protected JBEditorTabsPainter myDefaultPainter = new DefaultEditorTabsPainter();
|
||||
|
||||
|
||||
public JBEditorTabs(@Nullable Project project, @NotNull ActionManager actionManager, IdeFocusManager focusManager, @NotNull Disposable parent) {
|
||||
@@ -166,7 +166,7 @@ public class JBEditorTabs extends JBTabsImpl {
|
||||
return hasUnderline() ? super.getActiveTabUnderlineHeight() : 1;
|
||||
}
|
||||
|
||||
JBEditorTabsPainter getPainter() {
|
||||
protected JBEditorTabsPainter getPainter() {
|
||||
return UIUtil.isUnderDarcula() ? myDarkPainter : myDefaultPainter;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ import java.awt.*;
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
abstract class JBEditorTabsPainter {
|
||||
public abstract class JBEditorTabsPainter {
|
||||
protected Color myDefaultTabColor;
|
||||
|
||||
public abstract void doPaintInactive(Graphics2D g2d,
|
||||
Rectangle effectiveBounds,
|
||||
int x,
|
||||
@@ -94,4 +96,8 @@ abstract class JBEditorTabsPainter {
|
||||
public Color getEmptySpaceColor() {
|
||||
return UIUtil.isUnderAquaLookAndFeel() ? Gray.xC8 : UIUtil.getPanelBackground();
|
||||
}
|
||||
|
||||
public void setDefaultTabColor(Color color) {
|
||||
myDefaultTabColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
The sources in this folder are PyCharm version of the debugger PyDev.Debugger.
|
||||
They should be in sync, so after testing all commits should be backported to the original repo.
|
||||
|
||||
How to do it?
|
||||
|
||||
a) You should have PyDev.Debugger repo clone and fetch there IDEA commits related to this folder with changed paths from python/pydev/* to *
|
||||
b) Then cherry-pick all necessary commits resolving merge conflicts
|
||||
|
||||
Steps:
|
||||
|
||||
1) git clone https://github.com/fabioz/PyDev.Debugger.git
|
||||
2) <clone IDEA Community repo>
|
||||
and in this folder:
|
||||
3) git remote rm origin
|
||||
4) git tag -l | xargs git tag -d
|
||||
5) git filter-branch --subdirectory-filter python/helpers/pydev --prune-empty --index-filter 'SHA=$(git write-tree); rm $GIT_INDEX_FILE && git read-tree --prefix= $SHA' -- --all
|
||||
in PyDev.Debugger folder:
|
||||
6) git remote add temp-repo <path/to/idea/foler>
|
||||
7) git fetch temp-repo
|
||||
8) Cherry-pick all the changes
|
||||
Reference in New Issue
Block a user