Can ComparePlugin be used in SWT stand-a-lone application [message #467678] |
Fri, 03 February 2006 09:25  |
Eclipse User |
|
|
|
Originally posted by: dj.eclub2.procard.dk
I'm building a stand-a-lone client base on SWT and JFACE. In this client
I want to compare two text files. Can the eclipse Compare plugin be used
for this or can it only be used with Eclipse?
Based on other posts I have added code like below, but I keep gettomg
java.lang.ExceptionInInitializerError's errors no matter what I try.
CompareConfiguration cc = new CompareConfiguration();
CompareEditorInput input = new CompareEditorInput(cc) {
protected Object prepareInput(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
return new DiffNode(new ByteInput("left",
"these\nare\nthe\ncontents"), new ByteInput(
"right", "theasdse\nare\nthe\ncontednts"));
}
};
CompareUI.openCompareEditor(input);
--
Best regards
Dennis Jensen, eXerp
|
|
|
|
Re: Can ComparePlugin be used in SWT stand-a-lone application [message #467755 is a reply to message #467690] |
Mon, 06 February 2006 03:46  |
Eclipse User |
|
|
|
With deserialization I can see that the class' in eg. CompareUI indeed
uses the workbench class', so I guess the answer is NO, compare plugin
can not be used outside eclipse in SWT/JFACE application.
Paul Webster wrote:
> It really depends on the plugin ... like JFace is a plugin, but can
> easily be used as a jar in SWT applications.
>
> If the compare plugin is trying to open an editor it probably depends on
> org.eclipse.ui.workbench, which mean it won't run outside of eclipse/rcp.
>
> Later,
> PW
>
|
|
|
Powered by
FUDForum. Page generated in 0.04581 seconds