Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » To compare not IFile objects. How to?
To compare not IFile objects. How to? [message #96364] Tue, 16 September 2003 14:21 Go to next message
Eclipse UserFriend
Originally posted by: mewmar.ukr.net

I need to open the compare editor on not IFile objects. This Means I want
to write some static method, which will take 2 MY OBJECTS as parameter.
Then using my objects this method will create 2 files in local filesystem
(located anywhere inside file system) and then compare these files.
I've written such method, but I have taken SRC of "compare to each other"
menu. But this SRC was located in internzl package. I know I must not do
this. But using this SRC I was able to write method, which compares 2
IFiles. But IFiles can be getted only when I create IProject on folder
that contains every IFile.

So, troubles are:
-using internal package;
-can be troubles with creating IProjects on folders.

Are there any right way to write such static method?
Re: To compare not IFile objects. How to? [message #99803 is a reply to message #96364] Mon, 29 September 2003 17:08 Go to previous message
Eclipse UserFriend
Originally posted by: Andre_Weinand.oti.com

On 16.9.2003 20:21 Uhr, in article bk7kae$3k9$1@eclipse.org, "mew"
<mewmar@ukr.net> wrote:

> I need to open the compare editor on not IFile objects. This Means I want
> to write some static method, which will take 2 MY OBJECTS as parameter.
> Then using my objects this method will create 2 files in local filesystem
> (located anywhere inside file system) and then compare these files.
> I've written such method, but I have taken SRC of "compare to each other"
> menu. But this SRC was located in internzl package. I know I must not do
> this. But using this SRC I was able to write method, which compares 2
> IFiles. But IFiles can be getted only when I create IProject on folder
> that contains every IFile.
>
> So, troubles are:
> -using internal package;
> -can be troubles with creating IProjects on folders.
>
> Are there any right way to write such static method?
>

Just implement a subclass of org.eclipse.compare.CompareEditorInput similar
to the internal class org.eclipse.compare.internal.ResourceCompareInput.
Then start the comparison and open a CompareEditor on the result by passing
your subclass of CompareEditorInput to CompareUI.openCompareEditor(...)

--andre
Previous Topic:I have a situation with Eclipse 2.1.1 where I am using a 3rd party library, SAP JCO 2.x, and one o
Next Topic:Getting the Methods from an Interface
Goto Forum:
  


Current Time: Mon May 05 14:35:53 EDT 2025

Powered by FUDForum. Page generated in 0.03973 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top