DiffFile plugin version 1.2 is available at:
Note that significant refactoring was done to create utility classes
that should be directly usable by other plugins. Let me know if there
are other changes you'd like. I'll do them as I have time. (Expect a
week or more between releases unless there's a significant bug or a
change in IDEA that requires a change to the plugin code.)
Changes for v 1.2:
- The file from the editor did not reflect
changes made since the last save. There were two
options for fixing this: save before showing, or use
the editor's contents. This version shows the contents
of the editor.
- A "Swap Files" button has been added
to the viewer dialog. Pressing this button will swap
the contents of the two panes.
- Refactored into several classes. This should make it
easier for other plugins to use the same viewing code.
- DiffPanelWrapper: This is a wrapper for the diffPanel
that adds some desireable features such as using
DiffFileTokens to represent the content, and the
ability to swap the pane contents.
- DiffFileToken: This is a simple helper class for
storing information about a file that is going to
be part of the diff.
- DiffViewerFrame: A JFrame that displays the DiffPanel
for two DiffFileTokens.
- DiffViewerDialog: A DialogWrapper that displays the
DiffPanel for two DiffFileTokens.
NOTE: The JFrame and DialogWrapper? options are both
have "quirks". The use of a JFrame (which is what the
DiffFile? plugin uses) allows the diff to be completely
separate from the editor so that you can switch between
them. However, the DiffPanel?'s copy and search buttons
do not work (at least for IDEA build 639) when it is
placed in a JFrame. A DialogWrapper?, however, is
always on top of the editor window even if non-modal.
Focus can be sent to the editor, but the editor window
can not be brought to the front. I can't see any use
for a non-modal dialog if it is going to always be on
top of the other windows and will be posting this as a