mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git@git.labs.intellij.net:idea/community
This commit is contained in:
@@ -881,26 +881,31 @@ public class AbstractTreeUi {
|
||||
|
||||
//todo: to make real callback
|
||||
public ActionCallback queueUpdate(Object element) {
|
||||
AbstractTreeUpdater updater = getUpdater();
|
||||
if (updater == null) {
|
||||
try {
|
||||
AbstractTreeUpdater updater = getUpdater();
|
||||
if (updater == null) {
|
||||
return new ActionCallback.Rejected();
|
||||
}
|
||||
|
||||
final ActionCallback result = new ActionCallback();
|
||||
DefaultMutableTreeNode node = getNodeForElement(element, false);
|
||||
if (node != null) {
|
||||
addSubtreeToUpdate(node);
|
||||
}
|
||||
else {
|
||||
addSubtreeToUpdate(getRootNode());
|
||||
}
|
||||
|
||||
updater.runAfterUpdate(new Runnable() {
|
||||
public void run() {
|
||||
result.setDone();
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
return new ActionCallback.Rejected();
|
||||
}
|
||||
|
||||
final ActionCallback result = new ActionCallback();
|
||||
DefaultMutableTreeNode node = getNodeForElement(element, false);
|
||||
if (node != null) {
|
||||
addSubtreeToUpdate(node);
|
||||
}
|
||||
else {
|
||||
addSubtreeToUpdate(getRootNode());
|
||||
}
|
||||
|
||||
updater.runAfterUpdate(new Runnable() {
|
||||
public void run() {
|
||||
result.setDone();
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public void doUpdateFromRoot() {
|
||||
|
||||
@@ -57,6 +57,8 @@ public final class ShadowAction implements Disposable {
|
||||
myComponent = component;
|
||||
myActionId = ActionManager.getInstance().getId(myCopyFromAction);
|
||||
|
||||
myAction.getTemplatePresentation().copyFrom(copyFromAction.getTemplatePresentation());
|
||||
|
||||
myKeymapListener = new Keymap.Listener() {
|
||||
public void onShortcutChanged(final String actionId) {
|
||||
if (myActionId == null || actionId.equals(myActionId)) {
|
||||
|
||||
@@ -156,7 +156,8 @@ final class ToolWindowsPane extends JLayeredPane {
|
||||
protected void paintChildren(Graphics g) {
|
||||
super.paintChildren(g);
|
||||
|
||||
if (myTopStripe.isVisible() && myStripesOverlayed && UISettings.getInstance().HIDE_TOOL_STRIPES) {
|
||||
UISettings settings = UISettings.getInstance();
|
||||
if (myTopStripe.isVisible() && myStripesOverlayed && settings.HIDE_TOOL_STRIPES) {
|
||||
Dimension topSize = myTopStripe.getSize();
|
||||
Dimension bottomSize = myBottomStripe.getSize();
|
||||
Dimension leftSize = myLeftStripe.getSize();
|
||||
@@ -168,12 +169,18 @@ final class ToolWindowsPane extends JLayeredPane {
|
||||
size.height - topSize.height - bottomSize.height);
|
||||
|
||||
g.setColor(Color.gray);
|
||||
|
||||
boolean strikeoutTop = settings.SHOW_MAIN_TOOLBAR && !settings.SHOW_NAVIGATION_BAR && topSize.height == 0;
|
||||
|
||||
if (topSize.height> 0) {
|
||||
g.drawLine(rec.x, rec.y, rec.x + rec.width, rec.y);
|
||||
}
|
||||
|
||||
if (leftSize.width > 0) {
|
||||
g.drawLine(rec.x, rec.y, rec.x, rec.y + rec.height);
|
||||
if (strikeoutTop) {
|
||||
g.drawLine(0, rec.y, rec.x, rec.y);
|
||||
}
|
||||
}
|
||||
|
||||
if (bottomSize.height > 0) {
|
||||
@@ -182,6 +189,9 @@ final class ToolWindowsPane extends JLayeredPane {
|
||||
|
||||
if (rightSize.width > 0) {
|
||||
g.drawLine(rec.x + rec.width, rec.y, rec.x + rec.width, rec.y + rec.height);
|
||||
if (strikeoutTop) {
|
||||
g.drawLine(rec.x + rec.width, rec.y, size.width, rec.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user