Configurable date format used consistently throughout EGit

Part 1: UI and use it in history view.

* New DateFormatPreferencePage.
* New UI preferences.
* New PreferenceBasedDateFormatter.
* Changed uses of GitDateFormatter and DateFormat to use the new
  PreferenceBasedDateFormatter.

Some implementation notes:
* The default format is the custom format (already existing DATE_FORMAT
  preference. Reasons: this is a reasonable (local) format, and if
  the user had configured something there, it will still be used. Keep
  surprises for the user at a minimum.
* PreferenceBasedDateFormatter is a subtype of GitDateFormatter to keep
  changes at a minimum. It also helps in the views where the user can
  explicitly force RELATIVE dates.
* The old date format (under "Label Decorations/Other/DateFormat")
  preference UI has been removed.
* Where we use label providers, make those listen to preference changes
  related to their labels (dates, showing e-mails), not the viewers.
  The label providers fire an event when their state changes, users
  can just listen on those events. Limits the proliferation of checking
  specific preferences, and simplifies some code.
* Otherwise, views or viewers refresh on date format preference
  changes.
* This commit also fixes
   - bug 339797 (custom format for date column in history view),
   - bug 477151 (preference page silently ignores incorrect date
     formats)

Bug: 339797
Bug: 477151
Bug: 477248
Change-Id: Icede623ca753c1c830920f5ef2e6b629d4ceafb4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
18 files changed
tree: 7172fe9a260b9c0b4613c534a3de17e4d260ddda
  1. org.eclipse.egit/
  2. org.eclipse.egit-feature/
  3. org.eclipse.egit.core/
  4. org.eclipse.egit.core.test/
  5. org.eclipse.egit.doc/
  6. org.eclipse.egit.gitflow/
  7. org.eclipse.egit.gitflow-feature/
  8. org.eclipse.egit.gitflow.test/
  9. org.eclipse.egit.gitflow.ui/
  10. org.eclipse.egit.mylyn-feature/
  11. org.eclipse.egit.mylyn.ui/
  12. org.eclipse.egit.mylyn.ui.test/
  13. org.eclipse.egit.repository/
  14. org.eclipse.egit.source-feature/
  15. org.eclipse.egit.target/
  16. org.eclipse.egit.ui/
  17. org.eclipse.egit.ui.importer/
  18. org.eclipse.egit.ui.importer.tests/
  19. org.eclipse.egit.ui.test/
  20. tools/
  21. .gitattributes
  22. .gitignore
  23. CONTRIBUTING.md
  24. egit.psf
  25. EGIT_INSTALL
  26. LICENSE
  27. pom.xml
  28. README.md
README.md

Eclipse Git Plugin

EGit is an Eclipse plugin for working with Git repositories. It is based on the JGit library, which is a Git implementation in pure Java.

This package is licensed under the EPL. Please refer to the LICENSE file for the complete license.

This package is composed of the following major components:

  • org.eclipse.egit.core

    An Eclipse plugin providing an interface to org.eclipse.jgit and support routines to allow processing against the Eclipse workspace and resource APIs, rather than the standard Java file APIs. It also supplies the team provider implementation.

  • org.eclipse.egit.ui

    An Eclipse plugin providing the user interface on top of org.eclipse.egit.core.

  • org.eclipse.egit.core.test

    Unit tests for org.eclipse.egit.core.

  • org.eclipse.egit.ui.test

    UI tests for org.eclipse.egit.ui.

  • org.eclipse.egit

    A plugin for packaging

  • org.eclipse.egit-feature

    Also packaging. This project is for building an Eclipse “feature” out of the plugins above.

  • org.eclipse.egit.repository

    This package is for producing a p2 repository, i.e. a web site you can point your eclipse at and just upgrade.

There are other components which provide integration with other plugins.

Warnings/Caveats

  • Symbolic links are supported on Java 7 and higher and require that the optional JGit Java 7 feature is installed. For remaining issues with symbolic link support see https://bugs.eclipse.org/bugs/show_bug.cgi?id=429304.

  • CRLF conversion works for some things, but is in general still being worked on.

Compatibility

  • In general, EGit supports at least the latest two Eclipse releases. For details, please see https://wiki.eclipse.org/EGit/FAQ

  • Newer version of EGit may implement new functionality, remove existing functions and change others without other notice than what is written in the commit log and source files themselves.

Package Features

The following list is not complete, but it gives an overview of the features:

  • org.eclipse.egit.core

    • Supplies an Eclipse team provider.

    • Connect/disconnect the provider to a project.

    • Search for the repositories associated with a project by autodetecting the Git repository directories.

    • Store which repositories are tied to which containers in the Eclipse workspace.

    • Tracks moves/renames/deletes and reflects them in the cache tree.

    • Resolves through linked containers.

  • org.eclipse.egit.ui

    • Connect team provider wizard panels.

    • Connect to Git team provider by making a new repository.

    • Connect to Git team provider by searching local filesystem for existing repository directories.

    • Team actions: track (add), untrack (remove), disconnect, show history, compare version.

    • Resource decorator shows file/directory state in the package explorer and other views.

    • Creating new commits or amending commits.

    • View for staging changes (whole files and partial staging), showing their differences and committing them.

    • Graphical history viewer with the ability to compare versions using eclipse built-in compare editor.

    • Clone, push, pull, fetch

    • Merge, rebase, cherry-pick

Missing Features

  • gitattributes support

    In particular CRLF conversion is not yet fully implemented.

Support

Post question or comments to the egit-dev@eclipse.org mailing list. You need to be subscribed to post, see here:

https://dev.eclipse.org/mailman/listinfo/egit-dev

Contributing

See the EGit Contributor Guide:

http://wiki.eclipse.org/EGit/Contributor_Guide

About Git

More information about Git, its repository format, and the canonical C based implementation can be obtained from the Git websites:

http://git-scm.com/