Showing only one editor [message #23969] |
Wed, 30 April 2003 10:50  |
Eclipse User |
|
|
|
Originally posted by: kgc.rsssolutions.com
I can open several editors with only one in focus for a particulat
TreeObject.
How to I ensure only one is opened?
Kevin
|
|
|
|
|
|
|
|
Re: Showing only one editor [message #26821 is a reply to message #26535] |
Thu, 01 May 2003 16:31  |
Eclipse User |
|
|
|
Originally posted by: simon.ibm.oti.lab
Not that I'm aware of. You may want to post a new message for this
question...maybe someone else on the forum would have an answer for you.
Simon :-)
"Kevin Crocker" <kgc@rsssolutions.com> wrote in message
news:b8rqhs$cen$1@rogue.oti.com...
> Worked great.
>
> Hey Simon, Do you know if any training course occuring in Canada or if
> there are consultants that would come to a corporate office to do in-house
> training.
>
> "Simon Arsenault" <simon@ibm.oti.lab> wrote in message
> news:b8p4me$gir$1@rogue.oti.com...
> > I'm assuming you have your own implementation of IEditorInput? If so,
then
> > you only need to add the equals method on it. Here is what we do in the
> > FileEditorInput class:
> >
> > /**
> > * The <code>FileEditorInput</code> implementation of this
> > <code>Object</code>
> > * method bases the equality of two <code>FileEditorInput</code> objects
> on
> > the
> > * equality of their underlying <code>IFile</code> resources.
> > */
> > public boolean equals(Object obj) {
> > if (this == obj)
> > return true;
> > if (!(obj instanceof FileEditorInput))
> > return false;
> > FileEditorInput other = (FileEditorInput)obj;
> > return file.equals(other.file);
> > }
> >
> > Simon :-)
> >
> > "Kevin Crocker" <kgc@rsssolutions.com> wrote in message
> > news:b8p15v$ddd$1@rogue.oti.com...
> > > Do you mean the exists method? How would I implement that?
> > >
> > >
> > > "Kevin Crocker" <kgc@rsssolutions.com> wrote in message
> > > news:b8ov9r$bnc$1@rogue.oti.com...
> > > > Ok, I think I am doing it all wrong.
> > > >
> > > > I have objects in a tree which I populate an EditorInput object
with.
> > And
> > > > with this new EditorInput I am using the IWorkbenchPage.openEditor
but
> > ,of
> > > > course, it is a new object even when I select the same object from
the
> > > tree.
> > > >
> > > > Are there any good examples of using editors?
> > > >
> > > > "Simon Arsenault" <simon@ibm.oti.lab> wrote in message
> > > > news:b8opt8$74r$1@rogue.oti.com...
> > > > > How are you opening the editor? That is, what API are you using?
> What
> > is
> > > > the
> > > > > editor input?
> > > > >
> > > > > If you are using the IWorkbenchPage.openEditor api, then it will
> look
> > > for
> > > > an
> > > > > exising open editor whose input equals the passed in editor input.
> If
> > > > found,
> > > > > the editor is brought to the top and no new editor is open. So
your
> > > editor
> > > > > input should implement the equals method.
> > > > >
> > > > > Simon :-)
> > > > >
> > > > > "Kevin Crocker" <kgc@rsssolutions.com> wrote in message
> > > > > news:b8onse$51f$1@rogue.oti.com...
> > > > > > I can open several editors with only one in focus for a
particulat
> > > > > > TreeObject.
> > > > > >
> > > > > > How to I ensure only one is opened?
> > > > > >
> > > > > > Kevin
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04864 seconds