Difference between revisions of "The "Compare with" dialog"

From Eclipsepedia

Jump to: navigation, search
(Layout and navigation within the dialog)
(Layout and navigation within the dialog)
 
(21 intermediate revisions by one user not shown)
Line 15: Line 15:
  
 
=== Must have ===
 
=== Must have ===
*adding files for comparison by drag'n'dropping them from the Package Manager
+
*adding files for comparison by drag'n'dropping them from the Package Explorer
*adding files for comparison by "Open Resource"/"Open Type" dialogs [[Image:Glass.gif]]
+
*adding files for comparison by "Open Resource"/"Open Type" dialogs  
*adding files for comparison by "Open file" dialog (for choosing files located outside the current workspace): [https://bugs.eclipse.org/bugs/show_bug.cgi?id=73923 73923 (ASSIGNED)] [[Image:Glass.gif]]
+
*adding files for comparison by "Open file" dialog (for choosing files located outside the current workspace): [https://bugs.eclipse.org/bugs/show_bug.cgi?id=73923 73923 (ASSIGNED)]  
 
*adding clipboard content for comparison
 
*adding clipboard content for comparison
  
Line 38: Line 38:
  
 
=== Invoking the dialog ===
 
=== Invoking the dialog ===
*from context menu in Package Manager? [[Image:Ok_green.gif]]
+
*from context menu in Package Manager
 
*from context menu in editors
 
*from context menu in editors
 
*by drag&dropping one file to another in Package Manager
 
*by drag&dropping one file to another in Package Manager
'''Tasks:''' ... (related bugs will be listed here)
 
  
 
=== Adding content to the dialog ===  
 
=== Adding content to the dialog ===  
*drag&dropping from Package Manager [[Image:Progress.gif]]
+
*drag&dropping from Package Manager  
*by "Items selection dialog" -- needs further investigation [[Image:Glass.gif]]
+
*by "Items selection dialog"  
*from clipboard
+
*from clipboard (+ clipboard content preview)
 +
*external files and folders
 
'''Tasks:'''
 
'''Tasks:'''
*d'n'd support: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=239959 239959]
+
*d'n'd support: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=239959 bug 239959 (FIXED)]
 +
*history for each "file:" [https://bugs.eclipse.org/bugs/show_bug.cgi?id=240298 bug 240298]
 +
*handling selection of 4 or more resources: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=241077 bug 241077]
 +
*"Open resource" dialog: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=243744 bug 243744]
 +
*clipboard content + preview: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=241088 bug 241088]
 +
*external files and folders: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=73923 bug 73923]
  
 
=== Layout and navigation within the dialog ===
 
=== Layout and navigation within the dialog ===
*extendable ancestor section [[Image:Ok_green.gif]]
+
*extendable ancestor section
 
*displaying basic info about files chosen for comparison (name, modification date, icon)
 
*displaying basic info about files chosen for comparison (name, modification date, icon)
 
*moving files between left, right and ancestor section
 
*moving files between left, right and ancestor section
'''Tasks:''' ...
+
'''Tasks:'''
 +
*resizing of the dialog, when the dialog should and should not be resized? [https://bugs.eclipse.org/bugs/show_bug.cgi?id=241649 bug 241649]
  
 
=== Other tasks ===
 
=== Other tasks ===
...
+
*help and documentation [https://bugs.eclipse.org/bugs/show_bug.cgi?id=241643 bug 241643]
 +
*key binding for the dialog [https://bugs.eclipse.org/bugs/show_bug.cgi?id=241539 bug 241539 (FIXED)]
  
 
== Community proposals ==
 
== Community proposals ==
Line 77: Line 84:
 
== Getting the source ==
 
== Getting the source ==
  
For source code, check the latest patch submitted to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=239959 bug 239959]
+
Part of the project was recently released to HEAD. For further modifications see patches submitted to the following bugs:
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=243744 bug 243744]
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=73923 bug 73923]
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=241088 bug 241088]
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=240298 bug 240298]

Latest revision as of 14:36, 28 March 2009

Contents

[edit] Abstract

The goal of this project is to provide a more flexible and user-friendly way to compare files inside the Eclipse environment. Currently, the Eclipse's "Compare With" feature has a few problems:

  • There is no easy way to compare files located outside the workspace with ones located inside (see bug 73923 for details).
  • To compare two or three files in the current workspace the user has to select them (using a ctrl-click) and choose the "Compare With"->"Each Other" option from a pop-up menu.

Both these issues can be solved by providing an UI element (possibly a dialog or a view) to which user can add two or three files and than invoke a compare editor from it.

This project is part of 2008 Google Summer of Code.

Participants:

  • Student: Aleksandra Woźniak
  • Mentor: Tomasz Zarna

[edit] Features (by priority)

[edit] Must have

  • adding files for comparison by drag'n'dropping them from the Package Explorer
  • adding files for comparison by "Open Resource"/"Open Type" dialogs
  • adding files for comparison by "Open file" dialog (for choosing files located outside the current workspace): 73923 (ASSIGNED)
  • adding clipboard content for comparison

[edit] Should have

  • invoking folder compares from the dialog
  • clipboard content preview
  • basic info about files selected for comparison, eg. filename, modification date, icon
  • moving files/content between left, right and ancestor (either d'n'd or buttons)
  • extension mechanism to support other "Items selection dialogs" like "Open Type"
  • compare two opened files: 39125 (ASSIGNED)

[edit] Nice to have

  • invoking a compare editor by drag'n'dropping one file to another in the Package Manager
  • ancestor is an optional part of comparison so this section of the dialog could be expandable (should be hidden when no needed, and expanded/shown when the user would like to use ancestor in the comparison)
  • don't make the dialog too busy, limit number of widgets to minimum

[edit] Features (related are grouped together)

"One bug to block them all": 224562 (ASSIGNED)

[edit] Invoking the dialog

  • from context menu in Package Manager
  • from context menu in editors
  • by drag&dropping one file to another in Package Manager

[edit] Adding content to the dialog

  • drag&dropping from Package Manager
  • by "Items selection dialog"
  • from clipboard (+ clipboard content preview)
  • external files and folders

Tasks:

[edit] Layout and navigation within the dialog

  • extendable ancestor section
  • displaying basic info about files chosen for comparison (name, modification date, icon)
  • moving files between left, right and ancestor section

Tasks:

  • resizing of the dialog, when the dialog should and should not be resized? bug 241649

[edit] Other tasks

[edit] Community proposals

Feel free to add your comments and ideas.

  • Please also have a look at the "AnyEdit tools" plugin: http://andrei.gmxhome.de/anyedit/index.html
    It also adds several enhancement to the selection of to be compared artifacts (like clipboard, opened editor...), so maybe you can benefit from the ideas or work over there.
  • (copied from 73923)
    • I'd really like to drag and drop files from Konqueror or another filesystem-browser.
    • The dialog could be invoked via a rightclick on the editor tab (but as of bug #216710 the normal rightclickmenue will do)
    • I second the request, to paste clipboard contents in a temp-file as another source. It should be possible, to first pass one portion of text, select the next text and create a second temp file before invoking the compare. Therefore the dialog should not be modal (but may or may not hover in front?).
    • It might be worthwhile to rearrange the order of the files. If several files are dragged, it would be nice to sort them for last modification. But a manual reorder without the tedious copying of filenames around should be possible.
    • Last, if there is too much time :-) I envision a feature like the formula-editor in spreadsheet-applications offer. A button to click, that reduces the whole dialog to a single line of textinput, that stays in front, to monitor, where the user clicked / which editor-.tab got the focus last / which entry of the package explorer was clicked.
  • it would be great if it was possible to compare not only whole files, but also separate methods (or internal classes)

[edit] Getting the source

Part of the project was recently released to HEAD. For further modifications see patches submitted to the following bugs: