mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] remove isShowTagNames and isCompactReferencesView from log ui
These methods are used only in table initialization, and initial values can be set externally when creating ui. So no need to have these methods in AbstractVcsLogUi.
This commit is contained in:
@@ -120,10 +120,6 @@ public abstract class AbstractVcsLogUi implements VcsLogUi, Disposable {
|
||||
|
||||
public abstract boolean isShowRootNames();
|
||||
|
||||
public abstract boolean isCompactReferencesView();
|
||||
|
||||
public abstract boolean isShowTagNames();
|
||||
|
||||
@Override
|
||||
public boolean areGraphActionsEnabled() {
|
||||
return getTable().getRowCount() > 0;
|
||||
|
||||
@@ -97,14 +97,6 @@ public class VcsLogUiImpl extends AbstractVcsLogUi {
|
||||
return myUiProperties.exists(property) && myUiProperties.get(property);
|
||||
}
|
||||
|
||||
public boolean isCompactReferencesView() {
|
||||
return myUiProperties.get(MainVcsLogUiProperties.COMPACT_REFERENCES_VIEW);
|
||||
}
|
||||
|
||||
public boolean isShowTagNames() {
|
||||
return myUiProperties.get(MainVcsLogUiProperties.SHOW_TAG_NAMES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultipleRoots() {
|
||||
return myColorManager.isMultipleRoots(); // somewhy color manager knows about this
|
||||
|
||||
@@ -81,6 +81,8 @@ public class MainFrame extends JPanel implements DataProvider, Disposable {
|
||||
|
||||
// initialize components
|
||||
myGraphTable = new VcsLogGraphTable(ui, logData, initialDataPack);
|
||||
myGraphTable.setCompactReferencesView(myUiProperties.get(MainVcsLogUiProperties.COMPACT_REFERENCES_VIEW));
|
||||
myGraphTable.setShowTagNames(myUiProperties.get(MainVcsLogUiProperties.SHOW_TAG_NAMES));
|
||||
PopupHandler.installPopupHandler(myGraphTable, VcsLogActionPlaces.POPUP_ACTION_GROUP, VcsLogActionPlaces.VCS_LOG_TABLE_PLACE);
|
||||
myDetailsPanel = new DetailsPanel(logData, ui.getColorManager(), this);
|
||||
|
||||
|
||||
@@ -81,6 +81,9 @@ public class FileHistoryPanel extends JPanel implements DataProvider, Disposable
|
||||
return true;
|
||||
}
|
||||
};
|
||||
myGraphTable.setCompactReferencesView(true);
|
||||
myGraphTable.setShowTagNames(false);
|
||||
|
||||
myDetailsPanel = new DetailsPanel(logData, myUi.getColorManager(), this);
|
||||
myDetailsPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
|
||||
|
||||
|
||||
@@ -86,16 +86,6 @@ public class FileHistoryUi extends AbstractVcsLogUi {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompactReferencesView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShowTagNames() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultipleRoots() {
|
||||
return false;
|
||||
|
||||
@@ -103,7 +103,9 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
|
||||
|
||||
@NotNull private final Collection<VcsLogHighlighter> myHighlighters = ContainerUtil.newArrayList();
|
||||
|
||||
public VcsLogGraphTable(@NotNull AbstractVcsLogUi ui, @NotNull VcsLogData logData, @NotNull VisiblePack initialDataPack) {
|
||||
public VcsLogGraphTable(@NotNull AbstractVcsLogUi ui,
|
||||
@NotNull VcsLogData logData,
|
||||
@NotNull VisiblePack initialDataPack) {
|
||||
super(new GraphTableModel(initialDataPack, logData, ui));
|
||||
getEmptyText().setText("Changes Log");
|
||||
|
||||
@@ -115,8 +117,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
|
||||
return VcsLogGraphTable.this.getRowHeight();
|
||||
}
|
||||
};
|
||||
myGraphCommitCellRenderer =
|
||||
new GraphCommitCellRenderer(logData, graphCellPainter, this, ui.isCompactReferencesView(), ui.isShowTagNames());
|
||||
myGraphCommitCellRenderer = new GraphCommitCellRenderer(logData, graphCellPainter, this, true, false);
|
||||
myStringCellRenderer = new StringCellRenderer();
|
||||
|
||||
myLogData.getProgress().addProgressIndicatorListener(new MyProgressListener(), ui);
|
||||
|
||||
Reference in New Issue
Block a user