From e165cbc18b6af2e108c338bb9ce7687d6a2ef8df Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Wed, 16 Sep 2009 16:45:02 +0400 Subject: [PATCH] commit message history action moved --- .../intellij/openapi/vcs/ui/CommitMessage.java | 17 ++++++++++++++++- .../vcs/changes/ui/CommitChangeListDialog.java | 1 + .../changes/ui/MultipleChangeListBrowser.java | 2 -- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/ui/CommitMessage.java b/platform/vcs-api/src/com/intellij/openapi/vcs/ui/CommitMessage.java index 61d38538cd90..2f764d84c752 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/ui/CommitMessage.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/ui/CommitMessage.java @@ -18,6 +18,8 @@ package com.intellij.openapi.vcs.ui; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.ActionGroup; import com.intellij.openapi.actionSystem.ActionManager; +import com.intellij.openapi.actionSystem.ActionPlaces; +import com.intellij.openapi.actionSystem.ActionToolbar; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.vcs.VcsBundle; import com.intellij.ui.SeparatorFactory; @@ -36,8 +38,21 @@ public class CommitMessage extends JPanel implements Disposable { final JScrollPane scrollPane = new JScrollPane(myCommentArea); scrollPane.setPreferredSize(myCommentArea.getPreferredSize()); add(scrollPane, BorderLayout.CENTER); + + JPanel labelPanel = new JPanel(new BorderLayout()); + labelPanel.setBorder(BorderFactory.createEmptyBorder()); JComponent separator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myCommentArea); - add(separator, BorderLayout.NORTH); + JPanel separatorPanel = new JPanel(new BorderLayout()); + separatorPanel.add(separator, BorderLayout.SOUTH); + separatorPanel.add(Box.createVerticalGlue(), BorderLayout.NORTH); + labelPanel.add(separatorPanel, BorderLayout.CENTER); + ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, getToolbarActions(), true); + toolbar.setReservePlaceAutoPopupIcon(false); + toolbar.getComponent().setBorder(BorderFactory.createEmptyBorder()); + labelPanel.add(toolbar.getComponent(), BorderLayout.EAST); + add(labelPanel, BorderLayout.NORTH); + + setBorder(BorderFactory.createEmptyBorder()); final TextComponentUndoProvider textComponentUndoProvider = new TextComponentUndoProvider(myCommentArea); Disposer.register(this, textComponentUndoProvider); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java index 22a875fd6f41..a75359684b50 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java @@ -721,6 +721,7 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj mySplitter.setFirstComponent(myBrowser); mySplitter.setSecondComponent(myCommitMessageArea); mySplitter.setProportion(calcSplitterProportion()); + mySplitter.setDividerWidth(3); rootPane.add(mySplitter, BorderLayout.CENTER); JComponent browserHeader = myBrowser.getHeaderPanel(); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java index eb2db11229f4..55a95b19e4e1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java @@ -22,7 +22,6 @@ import com.intellij.openapi.vcs.VcsBundle; import com.intellij.openapi.vcs.changes.*; import com.intellij.openapi.vcs.changes.actions.MoveChangesToAnotherListAction; import com.intellij.openapi.vcs.changes.actions.RollbackDialogAction; -import com.intellij.openapi.vcs.ui.CommitMessage; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.EventDispatcher; @@ -326,7 +325,6 @@ public class MultipleChangeListBrowser extends ChangesBrowser { myBrowser.addToolbarAction(editSourceAction); myBrowser.addToolbarAction(ActionManager.getInstance().getAction("Vcs.CheckinProjectToolbar")); - myBrowser.addToolbarActions(CommitMessage.getToolbarActions()); final List actions = AdditionalLocalChangeActionsInstaller.calculateActions(myProject, myBrowser.getAllChanges()); if (actions != null) {