not totally successful attempt to fix git log action after default project refactoring

This commit is contained in:
irengrig
2011-08-26 13:26:55 +04:00
parent 38362f810d
commit 63484f6c0c
4 changed files with 13 additions and 5 deletions
@@ -57,6 +57,10 @@ public class ChangesBrowserNodeRenderer extends ColoredTreeCellRenderer {
protected void appendFileName(final VirtualFile vFile, final String fileName, final Color color) {
if (myProject.isDefault()) {
append(fileName, new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, color));
return;
}
final ChangesFileNameDecorator decorator = ChangesFileNameDecorator.getInstance(myProject);
if (decorator != null) {
decorator.appendFileName(this, vFile, fileName, color, myHighlightProblems);
@@ -74,6 +74,7 @@ public class GitExecutableValidator extends ExecutableValidator {
@Override
protected void saveCurrentExecutable(String executable) {
myVcs.getAppSettings().setPathToGit(executable);
myVcs.checkVersion();
}
/**
@@ -707,6 +707,7 @@ public class GitHistoryUtils {
* @return the name of file in the last commit or argument
*/
public static FilePath getLastCommitName(final Project project, FilePath path) {
if (project.isDefault()) return path;
final ChangeListManager changeManager = ChangeListManager.getInstance(project);
final Change change = changeManager.getChange(path);
if (change != null && change.getType() == Change.Type.MOVED) {
@@ -908,13 +908,15 @@ public class GitLogUI implements Disposable {
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
setBackground(getLogicBackground(selected, row));
//setBackground(getLogicBackground(selected, row));
if (BigTableTableModel.LOADING == value) {
return;
}
final String text = value.toString();
myUsualAttributesForRun = isCurrentUser(row, text) ?
SimpleTextAttributes.merge(myUsualAttributes, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) : myUsualAttributes;
SimpleTextAttributes.merge(myUsualAttributes, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES) :
new SimpleTextAttributes(myUsualAttributes.getBgColor(), myUsualAttributes.getFgColor(),
myUsualAttributes.getWaveColor(), myUsualAttributes.getStyle());
if (myWorker.isEmpty()) {
append(text, myUsualAttributesForRun);
return;
@@ -942,7 +944,7 @@ public class GitLogUI implements Disposable {
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
setBackground(getLogicBackground(selected, row));
//setBackground(getLogicBackground(selected, row));
if (BigTableTableModel.LOADING == value) {
if (myShowLoading) {
append("Loading...");
@@ -1021,7 +1023,7 @@ public class GitLogUI implements Disposable {
private void addOneIcon(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column, Icon icon) {
myCurrentWidth = icon.getIconWidth();
myPanel.removeAll();
myPanel.setBackground(getLogicBackground(isSelected, row));
//myPanel.setBackground(getLogicBackground(isSelected, row));
myPanel.add(new JLabel(icon));
myInner.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
myPanel.add(myInner);
@@ -1043,7 +1045,7 @@ public class GitLogUI implements Disposable {
}
@Override
protected void customizeCellRenderer(JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) {
setBackground(getLogicBackground(selected, row));
//setBackground(getLogicBackground(selected, row));
if (value instanceof GitCommit) {
final GitCommit gitCommit = (GitCommit)value;
myIssueLinkRenderer.appendTextWithLinks(gitCommit.getDescription(), SimpleTextAttributes.REGULAR_ATTRIBUTES, myConsumer);