Snippets code from my daily experience

January 4, 2010

VisualDiffer 1.2 beta 1

I spent the Christmas holidays working on VisualDiffer, the Komodo visual folders/files comparison extension.

Now I want to migrate VisualDiffer from extension to standalone application using XULRunner because the folders comparison feature is mature and using it from an extension can be a bit complicated.

The migration requires some intermediate steps

  • Remove dependencies from Komodo code (especially the unified diff algorithm)
  • Remove dependencies from unified diff algorithm!!
  • Complete the file comparison feature allowing in-place editing using Bespin.
    Bespin can greatly simplify syntax highlight for different languages, search in file and so on
    Honestly I’m considering also to stay with Scintilla (actually used by Komodo) but I love Bespin
  • Use a cool graphic layout, especially toolbar icons
    I’m not a GIMP guru so if somebody would to help me he/she would be welcomed :)
  • Allow user defined fonts and colors (low priority task)

I hope to release the VisualDiffer V1.2 for Komodo in a couple of weeks but also not Komodo aficionados can take a look to it installing the beta version on Firefox 3.5.x (also 3.6b5) and SeaMonkey 2.x.

Under Firefox and SeaMonkey the “files differ” feature isn’t implemented (Komodo dependencies) but you can test the folders differ feature that is totally based on standard Gecko interfaces, you can find the VisualDiffer item under the Tools menu.

Obviously VisualDiffer on Firefox is a nonsense because it isn’t a browser oriented extension I distribute this version with Firefox support with the hope a larger community can try it and give me feedback before I jump on the XULRunner world.

The V1.2 beta 1 can be downloaded from here.

VisualDiffer is inspired by the fantastic Beyond Compare but this isn’t a mystery ;)

About these ads

2 Comments

  1. I just tried it and it looks like a good start. I do have a few suggestions, and did run into a few issues:

    I tried it under Firefox 3.5.7 on Vista x64 and it froze every time I tried to resize or move one of the windows. Alt-tabbing away kicked it enough to unfreeze it, but I still couldn’t resize. I don’t see the same issue using KomodoEdit.

    The file compare looks like it’s giving tabs a 0-pixel width. Since it’s a KomodoEdit extension you should just read the editor font from it, rather than having a separate setting. Barring that, I’d suggest a fixed-width font instead of a variable width one as the default. You might look into making it easier to compare the file in the editor too. Perhaps pre-fill it as one of the paths in the initial dialog? Maybe even a “Compare Editor To…” menu item that would just show a “File Open” dialog and then launch the comparison.

    The folder compare is using ‘.’ instead of ‘,’ as the thousands separator in the file sizes (in the USA), though the dates are formatted correctly (mm/dd/yyyy).

    I’d recommend rethinking the red/blue coloring. They work ok in a two-way environment, but you should save red for conflicts in case you ever add a 3-way comparison, and using the same colors for different concepts in the two viewers can be confusing. Trust me, it’s much harder to change the coloring once you have lots of users. ;)

    Comment by Craig Peterson — January 7, 2010 @ 9:24 pm

    • > I tried it under Firefox 3.5.7 on Vista x64 and it froze every time I tried to resize or move one of the windows. Alt-tabbing away kicked it enough to unfreeze it, but I still couldn’t resize. I don’t see the same issue using KomodoEdit.

      Very strange, I’ll file a bug and then investigate deeply

      > The file compare looks like it’s giving tabs a 0-pixel width. Since it’s a KomodoEdit extension you should just read the editor font from it,rather than having a separate setting. Barring that, I’d suggest a fixed-width font instead of a variable width one as the default.

      Sure you are right I can use the same KE font (I will add it on final 1.2) but I want a smart way to detect the correct default font when I move to xulrunner, for example on OSX the Monaco font seems a better solution

      > You might look into making it easier to compare the file in the editor too. Perhaps pre-fill it as one of the paths in the initial dialog?
      Again you are right, I love this feature in beyond compare.

      > Maybe even a “Compare Editor To…” menu item that would just show a “File Open” dialog and then launch the comparison.
      Again you are right

      > The folder compare is using ‘.’ instead of ‘,’ as the thousands separator in the file sizes (in the USA)
      XUL doesn’t allow to detect this type of locale information or at least I didn’t found it, I think the best approach is to use an hashtab using the current locale info from user agent (a bit ugly)

      > though the dates are formatted correctly (mm/dd/yyyy).
      indeed XUL has a specific API

      > I’d recommend rethinking the red/blue coloring. They work ok in a two-way environment, but you should save red for conflicts in case you ever add a 3-way comparison, and using the same colors for different concepts in the two viewers can be confusing. Trust me, it’s much harder to change the coloring once you have lots of users. ;)

      I don’t like the current VisualDiffer color scheme, too

      Until now I concentrated my focus on complete features (comparisons, tree alignment) so many other feature are missing or require a radical change.
      Thanks for your accurate feedback

      Comment by dafi — January 8, 2010 @ 8:27 am


RSS feed for comments on this post.

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: