Java Code Examples for com.intellij.util.text.DateFormatUtil#formatPrettyDateTime()
The following examples show how to use
com.intellij.util.text.DateFormatUtil#formatPrettyDateTime() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileDifferenceModel.java From consulo with Apache License 2.0 | 5 votes |
private String formatTitle(Entry e, boolean isAvailable) { String result = DateFormatUtil.formatPrettyDateTime(e.getTimestamp()) + " - " + e.getName(); if (!isAvailable) { result += " - " + LocalHistoryBundle.message("content.not.available"); } return result; }
Example 2
Source File: OutdatedVersionNotifier.java From consulo with Apache License 2.0 | 5 votes |
private void updateLabelText(final Change c) { String comment = myChangeList.getComment(); int pos = comment.indexOf("\n"); if (pos >= 0) { comment = comment.substring(0, pos).trim() + "..."; } final String formattedDate = DateFormatUtil.formatPrettyDateTime(myChangeList.getCommitDate()); final boolean dateIsPretty = ! formattedDate.contains("/"); final String key = c.getType() == Change.Type.DELETED ? "outdated.version.text.deleted" : (dateIsPretty ? "outdated.version.pretty.date.text" : "outdated.version.text"); myLabel.setText(VcsBundle.message(key, myChangeList.getCommitterName(), formattedDate, comment)); }
Example 3
Source File: DvcsUtil.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull public static String getDateString(@Nonnull TimedVcsCommit commit) { return DateFormatUtil.formatPrettyDateTime(commit.getTimestamp()) + " "; }
Example 4
Source File: ChangeListColumn.java From consulo with Apache License 2.0 | 4 votes |
public Object getValue(final CommittedChangeList changeList) { return DateFormatUtil.formatPrettyDateTime(changeList.getCommitDate()); }
Example 5
Source File: UpdateInfo.java From consulo with Apache License 2.0 | 4 votes |
public UpdateInfo(Project project, UpdatedFiles updatedFiles, ActionInfo actionInfo) { myProject = project; myActionInfo = actionInfo; myUpdatedFiles = updatedFiles; myDate = DateFormatUtil.formatPrettyDateTime(Clock.getTime()); }
Example 6
Source File: CompareWithSelectedRevisionAction.java From consulo with Apache License 2.0 | 4 votes |
public String valueOf(final TreeNodeAdapter object) { return DateFormatUtil.formatPrettyDateTime(object.getRevision().getRevisionDate()); }
Example 7
Source File: CompareWithSelectedRevisionAction.java From consulo with Apache License 2.0 | 4 votes |
public String valueOf(final VcsFileRevision vcsFileRevision) { final Date date = vcsFileRevision.getRevisionDate(); return date == null ? "" : DateFormatUtil.formatPrettyDateTime(date); }
Example 8
Source File: CommittedChangeListRenderer.java From consulo with Apache License 2.0 | 4 votes |
public static String getDateOfChangeList(final Date date) { return DateFormatUtil.formatPrettyDateTime(date); }
Example 9
Source File: FileHistoryPanelImpl.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull static String toString(VcsFileRevision object) { Date date = object.getRevisionDate(); if (date == null) return ""; return DateFormatUtil.formatPrettyDateTime(date); }
Example 10
Source File: FileHistoryPanelImpl.java From consulo with Apache License 2.0 | 4 votes |
@Override public String getPreferredStringValue() { return DateFormatUtil.formatPrettyDateTime(Clock.getTime() + 1000); }