Home > coding, dev-tools, intellij, version control > Diff zipped files in Intellij using “Archive” file type

Diff zipped files in Intellij using “Archive” file type

Some file types are really just zipped (or maybe gzipped) folders containing xml and/or other plaintext based files.

For example

  • *.epub e-books
  • OpenDocument files
  • Java source jar files
  • JEE web application archives (*.war)
  • Pentaho report files (*.prpt)

If you happen to have such files in a software project, and don’t want to treat them like opaque binary blobs, you need a tool that helps you to transparently unzip, act on and rezip them. Also you probably want to be able to diff them without resorting to commercial tools like BeyondCompare.

IntelliJ CE (Community Edition) supports archive diffs as part of its regular Comparing Files functionality. All you need to do is make sure the file extension of the file types you want to be treated as archives are accordingly registered in Settings – Editor – File Types.

The screenshot below shows *.war and *.jar registered as Archive file name patterns (by default) and *.prpt (Pentaho report files) as an example of a manually added pattern:

intellij_register-pentaho-prpt-as-archive-file-type

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: