mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
breakpoints ui. cosmetics
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Suspend"/>
|
||||
<text value="&Suspend"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
|
||||
@@ -30,6 +30,8 @@ import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.SideBorder;
|
||||
import com.intellij.ui.components.JBScrollPane;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -148,6 +150,8 @@ public class DetailViewImpl extends JPanel implements DetailView, UserDataHolder
|
||||
validate();
|
||||
getEditor().getScrollingModel().scrollToCaret(ScrollType.CENTER);
|
||||
|
||||
getEditor().setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
|
||||
|
||||
clearHightlighting();
|
||||
if (lineAttributes != null) {
|
||||
myHighlighter = getEditor().getMarkupModel().addLineHighlighter(positionToNavigate.line, HighlighterLayer.SELECTION - 1,
|
||||
|
||||
@@ -22,9 +22,7 @@ import com.intellij.openapi.ui.popup.JBPopupListener;
|
||||
import com.intellij.openapi.ui.popup.LightweightWindowEvent;
|
||||
import com.intellij.openapi.ui.popup.PopupChooserBuilder;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.ui.ColoredListCellRenderer;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.TitledSeparator;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.ui.speedSearch.FilteringListModel;
|
||||
import com.intellij.util.Alarm;
|
||||
@@ -59,6 +57,7 @@ public class MasterDetailPopupBuilder {
|
||||
private JComponent myChooserComponent;
|
||||
private ActionToolbar myActionToolbar;
|
||||
private boolean myAddDetailViewToEast = true;
|
||||
private Dimension myMinSize;
|
||||
|
||||
|
||||
public MasterDetailPopupBuilder setDetailView(DetailView detailView) {
|
||||
@@ -194,14 +193,18 @@ public class MasterDetailPopupBuilder {
|
||||
setItemChoosenCallback(runnable).
|
||||
setCloseOnEnter(myCloseOnEnter).
|
||||
setMayBeParent(true).
|
||||
setMinSize(new Dimension(-1, 700)).
|
||||
setFilteringEnabled(new Function<Object, String>() {
|
||||
public String fun(Object o) {
|
||||
return ((ItemWrapper)o).speedSearchText();
|
||||
}
|
||||
});
|
||||
|
||||
if (myMinSize != null) {
|
||||
builder.setMinSize(myMinSize);
|
||||
}
|
||||
|
||||
myPopup = builder.createPopup();
|
||||
builder.getScrollPane().setBorder(IdeBorderFactory.createBorder(SideBorder.RIGHT));
|
||||
myPopup.addListener(new JBPopupListener() {
|
||||
@Override
|
||||
public void beforeShown(LightweightWindowEvent event) {
|
||||
@@ -263,6 +266,11 @@ public class MasterDetailPopupBuilder {
|
||||
myAddDetailViewToEast = addDetailViewToEast;
|
||||
}
|
||||
|
||||
public MasterDetailPopupBuilder setMinSize(Dimension minSize) {
|
||||
myMinSize = minSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static boolean allowedToRemoveItems(Object[] values) {
|
||||
for (Object value : values) {
|
||||
ItemWrapper item = (ItemWrapper)value;
|
||||
|
||||
@@ -83,6 +83,12 @@ public class PopupChooserBuilder {
|
||||
private boolean myModalContext;
|
||||
private boolean myCloseOnEnter = true;
|
||||
|
||||
public JScrollPane getScrollPane() {
|
||||
return myScrollPane;
|
||||
}
|
||||
|
||||
private JScrollPane myScrollPane;
|
||||
|
||||
public PopupChooserBuilder(@NotNull JList list) {
|
||||
myChooserComponent = list;
|
||||
}
|
||||
@@ -232,29 +238,28 @@ public class PopupChooserBuilder {
|
||||
registerClosePopupKeyboardAction(keystroke, true);
|
||||
}
|
||||
|
||||
final JScrollPane scrollPane;
|
||||
if (myChooserComponent instanceof ListWithFilter) {
|
||||
scrollPane = ((ListWithFilter)myChooserComponent).getScrollPane();
|
||||
myScrollPane = ((ListWithFilter)myChooserComponent).getScrollPane();
|
||||
}
|
||||
else if (myChooserComponent instanceof JTable) {
|
||||
scrollPane = createScrollPane((JTable)myChooserComponent);
|
||||
myScrollPane = createScrollPane((JTable)myChooserComponent);
|
||||
}
|
||||
else if (myChooserComponent instanceof JTree) {
|
||||
scrollPane = createScrollPane((JTree)myChooserComponent);
|
||||
myScrollPane = createScrollPane((JTree)myChooserComponent);
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException("PopupChooserBuilder is intended to be constructed with one of JTable, JTree, JList components");
|
||||
}
|
||||
|
||||
scrollPane.getViewport().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
myScrollPane.getViewport().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
Insets viewportPadding = UIUtil.getListViewportPadding();
|
||||
((JComponent)scrollPane.getViewport().getView()).setBorder(BorderFactory.createEmptyBorder(viewportPadding.top, viewportPadding.left, viewportPadding.bottom, viewportPadding.right));
|
||||
((JComponent)myScrollPane.getViewport().getView()).setBorder(BorderFactory.createEmptyBorder(viewportPadding.top, viewportPadding.left, viewportPadding.bottom, viewportPadding.right));
|
||||
|
||||
if (myChooserComponent instanceof ListWithFilter) {
|
||||
contentPane.add(myChooserComponent, BorderLayout.CENTER);
|
||||
}
|
||||
else {
|
||||
contentPane.add(scrollPane, BorderLayout.CENTER);
|
||||
contentPane.add(myScrollPane, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
if (mySouthComponent != null) {
|
||||
|
||||
+12
-8
@@ -26,7 +26,6 @@ import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.ui.popup.JBPopupListener;
|
||||
import com.intellij.openapi.ui.popup.LightweightWindowEvent;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.popup.util.DetailView;
|
||||
import com.intellij.ui.popup.util.ItemWrapper;
|
||||
import com.intellij.ui.popup.util.MasterDetailPopupBuilder;
|
||||
@@ -193,18 +192,23 @@ public class BreakpointMasterDetailPopupBuilder {
|
||||
}
|
||||
};
|
||||
|
||||
final JBPopup popup = myPopupBuilder.
|
||||
setActionsGroup(actions).
|
||||
setTree(tree).
|
||||
setDelegate(delegate).
|
||||
setCloseOnEnter(false).createMasterDetailPopup();
|
||||
myPopupBuilder.
|
||||
setActionsGroup(actions).
|
||||
setTree(tree).
|
||||
setDelegate(delegate);
|
||||
|
||||
tree.setBorder(IdeBorderFactory.createBorder());
|
||||
if (!myIsViewer) {
|
||||
myPopupBuilder.setMinSize(new Dimension(-1, 700));
|
||||
}
|
||||
|
||||
final JBPopup popup = myPopupBuilder.setCloseOnEnter(false).createMasterDetailPopup();
|
||||
|
||||
myTreeController.setDelegate(new BreakpointItemsTreeController.BreakpointItemsTreeDelegate() {
|
||||
@Override
|
||||
public void execute(BreakpointItem item) {
|
||||
myCallback.breakpointChosen(myProject, item, popup);
|
||||
if (myCallback != null) {
|
||||
myCallback.breakpointChosen(myProject, item, popup);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ error.cannot.create.expression.from.code.fragment=Cannot create expression from
|
||||
error.invalid.local.variable.name=Invalid local variable name ''{0}''
|
||||
error.inconsistent.debug.info=Inconsistent debug information
|
||||
error.invalid.stackframe=Internal exception - invalid stackframe
|
||||
label.breakpoint.properties.panel.group.conditions=Conditions
|
||||
label.breakpoint.properties.panel.group.conditions=Filters
|
||||
label.breakpoint.properties.panel.group.actions=Actions
|
||||
label.breakpoint.properties.panel.group.suspend.policy=Suspend policy
|
||||
active.tooltip.title=Evaluation of {0}
|
||||
|
||||
Reference in New Issue
Block a user