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:
@@ -89,6 +89,7 @@ public final class VcsConfiguration implements PersistentStateComponent<Element>
|
||||
public boolean INCLUDE_TEXT_INTO_SHELF = false;
|
||||
public boolean CREATE_PATCH_EXPAND_DETAILS_DEFAULT = true;
|
||||
public Boolean SHOW_PATCH_IN_EXPLORER = null;
|
||||
public boolean SHOW_FILE_HISTORY_DETAILS = true;
|
||||
|
||||
public enum StandardOption {
|
||||
ADD(VcsBundle.message("vcs.command.name.add")),
|
||||
|
||||
@@ -169,6 +169,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
return DateFormatUtil.formatPrettyDateTime(Clock.getTime());
|
||||
}
|
||||
};
|
||||
private final Splitter myDetailsSplitter = new Splitter(false, 0.5f);
|
||||
|
||||
public void scheduleRefresh() {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@@ -671,8 +672,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
}
|
||||
});
|
||||
|
||||
final Splitter detailsSplitter = new Splitter(false, 0.5f);
|
||||
JPanel commentGroup = new JPanel(new BorderLayout(4, 4));
|
||||
JPanel commentGroup = new JPanel(new BorderLayout());
|
||||
final JLabel commentLabel = new JLabel(COMMIT_MESSAGE_TITLE + ":") {
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
@@ -684,16 +684,26 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
pane.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.LEFT | (myAdditionalDetails == null ? 0 : SideBorder.BOTTOM)));
|
||||
|
||||
commentGroup.add(pane, BorderLayout.CENTER);
|
||||
detailsSplitter.setFirstComponent(commentGroup);
|
||||
detailsSplitter.setSecondComponent(myAdditionalDetails);
|
||||
|
||||
myDualView.setViewBorder(IdeBorderFactory.createBorder(SideBorder.LEFT | SideBorder.BOTTOM));
|
||||
myDetailsSplitter.setFirstComponent(commentGroup);
|
||||
myDetailsSplitter.setSecondComponent(myAdditionalDetails);
|
||||
|
||||
mySplitter.setFirstComponent(myDualView);
|
||||
mySplitter.setSecondComponent(detailsSplitter);
|
||||
setupDetails();
|
||||
return mySplitter;
|
||||
}
|
||||
|
||||
private void setupDetails() {
|
||||
boolean showDetails = getConfiguration().SHOW_FILE_HISTORY_DETAILS;
|
||||
if (showDetails) {
|
||||
myDualView.setViewBorder(IdeBorderFactory.createBorder(SideBorder.LEFT | SideBorder.BOTTOM));
|
||||
}
|
||||
else {
|
||||
myDualView.setViewBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
|
||||
}
|
||||
|
||||
mySplitter.setSecondComponent(showDetails ? myDetailsSplitter : null);
|
||||
}
|
||||
|
||||
private void chooseView() {
|
||||
if (showTree()) {
|
||||
myDualView.switchToTheTreeMode();
|
||||
@@ -773,6 +783,18 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton {
|
||||
}
|
||||
}
|
||||
result.add(new RefreshFileHistoryAction());
|
||||
result.add(new ToggleAction("Show Details", "Display details panel", IconLoader.getIcon("/actions/showSource.png")) {
|
||||
@Override
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
return getConfiguration().SHOW_FILE_HISTORY_DETAILS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(AnActionEvent e, boolean state) {
|
||||
getConfiguration().SHOW_FILE_HISTORY_DETAILS = state;
|
||||
setupDetails();
|
||||
}
|
||||
});
|
||||
|
||||
if (!popup && supportsTree()) {
|
||||
result.add(new MyShowAsTreeAction());
|
||||
|
||||
@@ -129,7 +129,6 @@ public class GitLogUI implements Disposable {
|
||||
private MyRefreshAction myRefreshAction;
|
||||
private MyStructureFilter myStructureFilter;
|
||||
private StructureFilterAction myStructureFilterAction;
|
||||
private ToggleAction myShowDetailsAction;
|
||||
private AnAction myCopyHashAction;
|
||||
// todo group somewhere??
|
||||
private Consumer<CommitI> myDetailsLoaderImpl;
|
||||
@@ -865,19 +864,20 @@ public class GitLogUI implements Disposable {
|
||||
myRootsAction = new MyRootsAction(rootsGetter, myJBTable);
|
||||
group.add(myRootsAction);
|
||||
group.add(myMyShowTreeAction);
|
||||
myShowDetailsAction = new ToggleAction("Show Details", "Display details panel", IconLoader.getIcon("/actions/showSource.png")) {
|
||||
@Override
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
return GitLogSettings.getInstance(myProject).isShowDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(AnActionEvent e, boolean state) {
|
||||
setupDetailsSplitter(state);
|
||||
GitLogSettings.getInstance(myProject).setShowDetails(state);
|
||||
}
|
||||
};
|
||||
group.add(myShowDetailsAction);
|
||||
group.add(new ToggleAction("Show Details", "Display details panel", IconLoader.getIcon("/actions/showSource.png")) {
|
||||
@Override
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
return GitLogSettings.getInstance(myProject).isShowDetails();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(AnActionEvent e, boolean state) {
|
||||
setupDetailsSplitter(state);
|
||||
GitLogSettings.getInstance(myProject).setShowDetails(state);
|
||||
}
|
||||
});
|
||||
|
||||
myMyGotoCommitAction = new MyGotoCommitAction();
|
||||
group.add(myMyGotoCommitAction);
|
||||
group.add(myRefreshAction);
|
||||
|
||||
Reference in New Issue
Block a user