~piastucki/bzr-eclipse/execute-bit

« back to all changes in this revision

Viewing changes to org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/annotaions/ShowAnnotationOperation.java

  • Committer: Piotr Piastucki
  • Author(s): Alexander Taler
  • Date: 2013-06-09 07:03:10 UTC
  • Revision ID: piotr_piastucki-20130609070310-f8s31gqr0k8r8liw
Show correct date in annotations hover information.

Use the date from the revision instead of the badly parsed date from the annotate output.

Fixes Bug #917595

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
 
89
89
                @Override
90
90
                public Object getHoverInfo() {
91
 
                        String date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(getDate(block.getDate()));
 
91
                        String date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(getDate());
92
92
                        return block.getUser()
93
93
                                        + " " + block.getRevision() + " " + date + "\n\n" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
94
94
                                        (log != null ? log.getMessage() : ""); //$NON-NLS-1$
104
104
                        return block.getRevision();
105
105
                }
106
106
 
107
 
                private Date getDate(String date) {
108
 
                        String year = block.getDate().substring(0, 4);
109
 
                        String month = block.getDate().substring(5, 6);
110
 
                        String day = block.getDate().substring(7, 8);
111
 
                        Calendar cal = Calendar.getInstance();
112
 
                        cal.set(Integer.valueOf(year), Integer.valueOf(month), Integer.valueOf(day));
113
 
                        return cal.getTime();
114
 
                }
115
 
 
116
107
                @Override
117
108
                public Date getDate() {
118
109
//                      return getDate(block.getDate());