Use Diff Outside IDEA

How would I go about utilising the Diff/Merge window in my own Swing application?

I tried looking at DiffApplication, but then realised that it implements ApplicationStarter and can't be run on its own.
It also has the problem that in order to get the VirtualFile it requires an application instance.

  private static class LocalFileSystemHolder {
    private static final LocalFileSystem ourInstance = ApplicationManager.getApplication().getComponent(LocalFileSystem.class);
  }


The openapi jar isn't small either.
It would be good if just the necessary files required for Diff/Merge could be separated out into a separate jar so that more applications could benefit from the component.

1 comment
Comment actions Permalink

Hello opticyclic,

At the moment we don't have any plans to decouple the diff tool from the
rest of the IntelliJ Platform core (component model, virtual file system,
document/editor infrastructure, action system etc.) The code is open-source,
so if some other applications would benefit from it, they're welcome to spend
that effort themselves.

How would I go about utilising the Diff/Merge window in my own Swing
application?

I tried looking at DiffApplication, but then realised that it
implements ApplicationStarter and can't be run on its own.
It also has the problem that in order to get the VirtualFile it
requires an application instance.

 LocalFileSystemHolder {
> private static final LocalFileSystem ourInstance =
> ApplicationManager.getApplication().getComponent(LocalFileSystem.class
> );
> }
> ]]>

The openapi jar isn't small either.
It would be good if just the necessary files required for Diff/Merge
could be separated out into a separate jar so that more applications
could benefit from the component.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.