~alex-idereal/bzr-eclipse/1.2.0-patches

« back to all changes in this revision

Viewing changes to org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/OpenBazaarRevisionAction.java

  • Committer: Piotr Piastucki
  • Date: 2013-04-16 08:22:48 UTC
  • mfrom: (265.1.2 bzr-eclipse-pp)
  • Revision ID: piotr_piastucki-20130416082248-f5drtepmpz3nzdco
MergeĀ lp:~piastucki/bzr-eclipse/synchronize-action

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import java.io.IOException;
10
10
import java.io.InputStream;
11
11
import java.lang.reflect.InvocationTargetException;
12
 
import java.text.DateFormat;
13
 
import java.util.Date;
14
12
 
15
13
import org.eclipse.core.resources.IFile;
16
14
import org.eclipse.core.resources.IFileState;
48
46
                private IStorage storage;
49
47
 
50
48
                public BazaarRevisionEditorInput(IFileRevision revision) {
51
 
// System.out.println("OpenBazaarRevisionAction::BazaarRevisionEditorInput::BazaarRevisionEditorInput()");
52
 
 
53
49
                        this.fileRevision = revision;
54
50
                        try {
55
51
                                this.storage = revision.getStorage(new NullProgressMonitor());
68
64
                }
69
65
 
70
66
                public String getLabel(Object o) {
71
 
                        System.out.println("OpenBazaarRevisionAction::BazaarRevisionEditorInput::getLabel()");
72
67
                        return getName();
73
68
/*                      if (storage != null) {
74
69
                                return storage.getName();
97
92
                }
98
93
 
99
94
                public String getName() {
100
 
                        String ret = "";//$NON-NLS-1$
101
 
                        if (fileRevision != null) {
102
 
                                ret = fileRevision.getName() + ":" + fileRevision.getContentIdentifier(); //$NON-NLS-1$
103
 
                        } else if (storage != null) {
104
 
                                ret = storage.getName() + ":" + DateFormat.getInstance().format(new Date(((IFileState) storage).getModificationTime())); //$NON-NLS-1$
105
 
                        }
106
 
                        return ret;
 
95
                        return fileRevision.getName() + " " + fileRevision.getContentIdentifier(); //$NON-NLS-1$
107
96
                }
108
97
 
109
98
                public IPersistableElement getPersistable() {
111
100
                }
112
101
 
113
102
                public String getToolTipText() {
114
 
                        if (fileRevision != null) {
115
 
                                try {
116
 
                                        return getStorage().getFullPath().toString();
117
 
                                } catch (CoreException e) {
118
 
                                }
119
 
                        }
120
 
 
121
 
                        if (storage != null) {
122
 
                                return storage.getFullPath().toString();
123
 
                        }
124
 
 
125
 
                        return ""; //$NON-NLS-1$
 
103
                        return getName();
126
104
                }
127
105
 
128
106
        @SuppressWarnings("unchecked")