FeaturesPluginsDocs & SupportCommunityPartners

DIFF Use Cases

Author: Josef Pavlicek

$Revision: 1.12 $
$Date: 2006/09/25 14:21:03 $

Content

 

Requirements

Motivation

Motivation of Diff Use Cases is to find main Use Cases and Scenarios which describe the user behavior during his/her work with DIFF viewer tool. Current NetBeans DIFF is not very useful. I believe that this study will useful for redesign NetBeans DIFF in the future.

 

Goals

To find main DIFF Use Cases. To recognize the user behavior and build the best tool for him/her.

 

DIFF Use Cases

Show difference between directories Use Case

The user wants to see differences between two directories (primarily Java projects directories). He/she wants to select which directories he/she wants to diff:

  • Two Local directories
    • Local CVS
    • Local non CVS
  • Remote (CVS) versus local directories
  • Remote versus remote directories

Because the each directories can has null or "N" files and null of "M" subdirectories etc., the user wants to have some possibility to diff:

  • One directory with subdirectories and files

When the user selected the diff action he/she wants to see:

  • deleted directory
  • new directory
  • modified directory
  • delete file
  • new file
  • modified file

 

Show difference between directories Scenario

  • The system shows the user
    • count of differences between the files
    • type of differences (the difference is symbolized by different color)
      • deleted
      • modified
      • new directory
    • directory path

 

Show difference between files Use Case

If the user works with the source file from CVS or from selected base (if the user doesn't have CVS server and uses only the file system) he/she wants to see differences between base files. The user can want to diff

  • Local(base) and Local file (explanation on picture)
  • Remote and Local file
  • Remote and Remote file
  • Local and Local files (without using some CVS server - special case)

If the user chooses some file, he/she wants to see differences between base and local (except Remote versus Remote) file. The user supposes to have some possibility to accept:

  • particular difference (Accept the files differences Use Case)
  • all differences

During his/her work he/she wants to move via differences. The user wants to have a signalization:

  • at what difference he/she is now
  • how much differences are in the file
  • type of difference
    • deleted
    • modified
    • new
      • the user can want to annul this difference

Picture 1: explanation of terms Local versus Remote and other

 

 

Show difference between files Scenario

  • The system shows the user
    • count of differences between the files
      • Local versus Remote
      • Local versus Local
      • Remote versus Remote
    • type of differences (the difference is symbolized by different color)
      • deleted
      • modified
      • new
    • line where is the server file different from local file
    • row number

 

 

Accept the file differences Use Case

The user goes via the differences in the base file. He/she wants to have some possibility to accept this (sometimes ALL) differences.

  • he/she wants to have some possibility to edit his/her local file
    • the user supposes to have the same functionality like has the Editor
  • after that he/she wants to commit file

 

Accept the file differences Scenario

The system shows the user differences between thelocal file and server repository file. The system distinguishes type of differences (by color or by font).

  • The system allows the user to move the part of code from the repository file into the local file. The system distinguishes two types of inserts:
    • move and INSERT code by drag and drop from repository file
    • move and INSERT code by click on the particular button
  • The system allows the user accept and insert all differences from repository file into to local file
  • The system allows the user remove the inserted code in his/her local file

 

Show in-line DIFF Use Case

The user works with the editor and he/she wants to see differences in his/her file compared to base file. He/she supposes to have some functionality which allows him/her:

  • accept differences from base file
  • return his/her changes from particular state to last state
  • to see original code which he/she changed
  • commit his/her changes

 

Show in-line DIFF scenario

If the user wants to use in-line diff, the system shows the user difference compared to base file in the Editor. The system shows:

  • differences compared to base
  • annotation of differences
    • allows to replace the user code by origin code
    • allows to undo action if the user wants to return at origin code
  • shows count of differences
  • allows the user commit the file

 

Problem solving Use Case

If more of users work on the one file together, sometimes can happen that the committed local file is in the conflict with the file on the server. The user needs to have some possibility how to solve this conflict (Picture 2):

  • accept the changes in the base file
  • accept the changes in the repository
  • or replace the server file by his/her local file

After this action the user wants to commit his/her file.

 

Problem solving scenario

The system shows the user the differences between local base, remote and local files. The system allows the user read and accept differences. It means, the system allows the user:

  • accept Local(base) differences
  • accept Remote(base) differences
  • accept Local differences
  • After that the system offers the user save the file

Picture 2: Conflict explanation

 

 

 

 

Code error and differences highlighting Use Case

If the user uses the DIFF viewer, he/she needs to have the same comfort like when he/she uses normal code Editor and CVS diff together.

Code navigation and error highlighting scenario

The system provides the user EDITOR functionality:

  • Edit code
  • Error highlighting
  • Code completion
  • find/ replace function
  • show line rows
  • Error stripes

and CVS functionality like:

  • Show annotation (for detail click here)
  • Differences navigator bar on the error strips bar
    • shows the user, where is the difference (distinguished it by color) according to the server file, like the error strip shows errors

 

 

Show DIFF for More files Use Case

If the user does a lot of small changes in more files, he/she needs to see more files with differences in the one window. The user wants to go via differences in the files and wants to have some possibility:

  • accept each differences
  • accept all differences in the one file
  • to edit the code in the local files
  • commit particular file
  • commit all files together

Show diff for more files Scenario

The system allows the user diff more files in the one window. The system allows the user jump between files in the one window. The system allows:

  • accept the differences from Local/ Remote (base) files to Local files
  • accept all differences in oneLocal/ Remote (base) file to Local file
  • to edit the code in the local file
    • show error stripes
    • code highlighting
    • errors highlight
    • context help
    • differences navigator
  • commit particular local file
  • commit all local files

 

Go to DIFFSpecification web page!

Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by