Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Navigator-like window
Navigator-like window [message #226634] Mon, 20 November 2006 09:06 Go to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Hi,

I'm wondering is it possible to create a Navigator-like view using GEF?

There is an extension point sample (SampleView) that is based on JFace
TreeViewer. It works good for me, but I would like to use the same tree
viewparts I had created for my model.

Unfortunately, I do not know how to use GEF TreeViewer to make it work the
same way as JFace TreeViewer. I had successfuly created a view, based on GEF
TreeViewer, but I can't add DrillDownAdapter to it. Also it works a little
bit weird, but I suppose I just did not complete this example...

Maybe there is some kind of example how to use GEF for Navigator-like view?

I'm using Eclipse 3.2.1, GEF 3.2.0

Thanks,
Dmitry
Re: Navigator-like window [message #226671 is a reply to message #226634] Mon, 20 November 2006 20:42 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Dmitry

Look at the GEF logic editor example. The outline view's hierarchy mode is
GEF TreeViewer.

Cheers...
Anthony

"Dmitry Smirnov" <divis1969@mail.ru> wrote in message
news:ejrr6e$o6n$1@utils.eclipse.org...
> Hi,
>
> I'm wondering is it possible to create a Navigator-like view using GEF?
>
> There is an extension point sample (SampleView) that is based on JFace
> TreeViewer. It works good for me, but I would like to use the same tree
> viewparts I had created for my model.
>
> Unfortunately, I do not know how to use GEF TreeViewer to make it work the
> same way as JFace TreeViewer. I had successfuly created a view, based on
> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
> little bit weird, but I suppose I just did not complete this example...
>
> Maybe there is some kind of example how to use GEF for Navigator-like
> view?
>
> I'm using Eclipse 3.2.1, GEF 3.2.0
>
> Thanks,
> Dmitry
>
Re: Navigator-like window [message #226800 is a reply to message #226671] Thu, 23 November 2006 13:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Thank you Anthony. I've seen this example.
I just did not realize that ContentOutlinePage can used in any view, not
only in Outline.

So, I've implemented some kind of resource browser based on
ContentOutlinePage, but still has some problems

1. I do not know where to get EditDomain, that is needed for TreeViewer's
setEditDomain. I just set it to null. View seems to work, it shows content
in a tree view. But I still not sure, is it correct ot not. My example is
based on GEF example by Elias Volankis I found in internet. (It was a long
time ago, so I just do not remember where I found it :-) )
2. My view seems to not work correctly. I've noticed that when I running it,
if I switch from my view to Eclipse Navigator or vice versa, tools menu of
the view is not shown correctly. It looks like menu is not switched.
Sometimes, I can see both my tree and Navigator tree together (mine is in
toolmenu area, since my menu is shorter and fits into page tabs row.

I've attached the source (it is corrected a litle bit to remove some
proprietary info).
What could be the problems with it?

Dmitry

"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:ejt41h$rhk$1@utils.eclipse.org...
> Hi Dmitry
>
> Look at the GEF logic editor example. The outline view's hierarchy mode is
> GEF TreeViewer.
>
> Cheers...
> Anthony
>
> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
> news:ejrr6e$o6n$1@utils.eclipse.org...
>> Hi,
>>
>> I'm wondering is it possible to create a Navigator-like view using GEF?
>>
>> There is an extension point sample (SampleView) that is based on JFace
>> TreeViewer. It works good for me, but I would like to use the same tree
>> viewparts I had created for my model.
>>
>> Unfortunately, I do not know how to use GEF TreeViewer to make it work
>> the
>> same way as JFace TreeViewer. I had successfuly created a view, based on
>> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
>> little bit weird, but I suppose I just did not complete this example...
>>
>> Maybe there is some kind of example how to use GEF for Navigator-like
>> view?
>>
>> I'm using Eclipse 3.2.1, GEF 3.2.0
>>
>> Thanks,
>> Dmitry
>>
>
>


Re: Navigator-like window [message #226808 is a reply to message #226671] Thu, 23 November 2006 13:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

Thank you Anthony. I've seen this example.
I just did not realize that ContentOutlinePage can used in any view, not
only in Outline.

So, I've implemented some kind of resource browser based on
ContentOutlinePage, but still has some problems

1. I do not know where to get EditDomain, that is needed for TreeViewer's
setEditDomain. I just set it to null. View seems to work, it shows content
in a tree view. But I still not sure, is it correct ot not. My example is
based on GEF example by Elias Volankis I found in internet. (It was a long
time ago, so I just do not remember where I found it :-) )
2. My view seems to not work correctly. I've noticed that when I running it,
if I switch from my view to Eclipse Navigator or vice versa, tools menu of
the view is not shown correctly. It looks like menu is not switched.
Sometimes, I can see both my tree and Navigator tree together (mine is in
toolmenu area, since my menu is shorter and fits into page tabs row.

I've attached the source (it is corrected a litle bit to remove some
proprietary info).
What could be the problems with it?

Dmitry

"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:ejt41h$rhk$1@utils.eclipse.org...
> Hi Dmitry
>
> Look at the GEF logic editor example. The outline view's hierarchy mode is
> GEF TreeViewer.
>
> Cheers...
> Anthony
>
> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
> news:ejrr6e$o6n$1@utils.eclipse.org...
>> Hi,
>>
>> I'm wondering is it possible to create a Navigator-like view using GEF?
>>
>> There is an extension point sample (SampleView) that is based on JFace
>> TreeViewer. It works good for me, but I would like to use the same tree
>> viewparts I had created for my model.
>>
>> Unfortunately, I do not know how to use GEF TreeViewer to make it work
>> the
>> same way as JFace TreeViewer. I had successfuly created a view, based on
>> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
>> little bit weird, but I suppose I just did not complete this example...
>>
>> Maybe there is some kind of example how to use GEF for Navigator-like
>> view?
>>
>> I'm using Eclipse 3.2.1, GEF 3.2.0
>>
>> Thanks,
>> Dmitry
>>
>
>



Re: Navigator-like window [message #226824 is a reply to message #226808] Thu, 23 November 2006 17:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

I've noticed that setting focus on my view is not working well. Seems like
page tab do not receive focus (but setFocus) is called).

"Dmitry Smirnov" <divis1969@mail.ru> wrote in message
news:ek4615$bkk$2@utils.eclipse.org...
> Thank you Anthony. I've seen this example.
> I just did not realize that ContentOutlinePage can used in any view, not
> only in Outline.
>
> So, I've implemented some kind of resource browser based on
> ContentOutlinePage, but still has some problems
>
> 1. I do not know where to get EditDomain, that is needed for TreeViewer's
> setEditDomain. I just set it to null. View seems to work, it shows content
> in a tree view. But I still not sure, is it correct ot not. My example is
> based on GEF example by Elias Volankis I found in internet. (It was a long
> time ago, so I just do not remember where I found it :-) )
> 2. My view seems to not work correctly. I've noticed that when I running
> it,
> if I switch from my view to Eclipse Navigator or vice versa, tools menu of
> the view is not shown correctly. It looks like menu is not switched.
> Sometimes, I can see both my tree and Navigator tree together (mine is in
> toolmenu area, since my menu is shorter and fits into page tabs row.
>
> I've attached the source (it is corrected a litle bit to remove some
> proprietary info).
> What could be the problems with it?
>
> Dmitry
>
> "Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
> news:ejt41h$rhk$1@utils.eclipse.org...
>> Hi Dmitry
>>
>> Look at the GEF logic editor example. The outline view's hierarchy mode
>> is
>> GEF TreeViewer.
>>
>> Cheers...
>> Anthony
>>
>> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
>> news:ejrr6e$o6n$1@utils.eclipse.org...
>>> Hi,
>>>
>>> I'm wondering is it possible to create a Navigator-like view using GEF?
>>>
>>> There is an extension point sample (SampleView) that is based on JFace
>>> TreeViewer. It works good for me, but I would like to use the same tree
>>> viewparts I had created for my model.
>>>
>>> Unfortunately, I do not know how to use GEF TreeViewer to make it work
>>> the
>>> same way as JFace TreeViewer. I had successfuly created a view, based on
>>> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
>>> little bit weird, but I suppose I just did not complete this example...
>>>
>>> Maybe there is some kind of example how to use GEF for Navigator-like
>>> view?
>>>
>>> I'm using Eclipse 3.2.1, GEF 3.2.0
>>>
>>> Thanks,
>>> Dmitry
>>>
>>
>>
>
>
>
>
Re: Navigator-like window [message #226876 is a reply to message #226808] Fri, 24 November 2006 21:04 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Dmitry,

1. "My example is based on GEF example by Elias Volankis"
The shapes example shows where the editing domain is coming from, your
editor.

2. You mean you have two sets of icons in the view toolbar? Not sure what
the issue is, but you should be able to debug.

Cheers...
Anthony

"Dmitry Smirnov" <divis1969@mail.ru> wrote in message
news:ek4615$bkk$2@utils.eclipse.org...
> Thank you Anthony. I've seen this example.
> I just did not realize that ContentOutlinePage can used in any view, not
> only in Outline.
>
> So, I've implemented some kind of resource browser based on
> ContentOutlinePage, but still has some problems
>
> 1. I do not know where to get EditDomain, that is needed for TreeViewer's
> setEditDomain. I just set it to null. View seems to work, it shows content
> in a tree view. But I still not sure, is it correct ot not. My example is
> based on GEF example by Elias Volankis I found in internet. (It was a long
> time ago, so I just do not remember where I found it :-) )
> 2. My view seems to not work correctly. I've noticed that when I running
> it,
> if I switch from my view to Eclipse Navigator or vice versa, tools menu of
> the view is not shown correctly. It looks like menu is not switched.
> Sometimes, I can see both my tree and Navigator tree together (mine is in
> toolmenu area, since my menu is shorter and fits into page tabs row.
>
> I've attached the source (it is corrected a litle bit to remove some
> proprietary info).
> What could be the problems with it?
>
> Dmitry
>
> "Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
> news:ejt41h$rhk$1@utils.eclipse.org...
>> Hi Dmitry
>>
>> Look at the GEF logic editor example. The outline view's hierarchy mode
>> is
>> GEF TreeViewer.
>>
>> Cheers...
>> Anthony
>>
>> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
>> news:ejrr6e$o6n$1@utils.eclipse.org...
>>> Hi,
>>>
>>> I'm wondering is it possible to create a Navigator-like view using GEF?
>>>
>>> There is an extension point sample (SampleView) that is based on JFace
>>> TreeViewer. It works good for me, but I would like to use the same tree
>>> viewparts I had created for my model.
>>>
>>> Unfortunately, I do not know how to use GEF TreeViewer to make it work
>>> the
>>> same way as JFace TreeViewer. I had successfuly created a view, based on
>>> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
>>> little bit weird, but I suppose I just did not complete this example...
>>>
>>> Maybe there is some kind of example how to use GEF for Navigator-like
>>> view?
>>>
>>> I'm using Eclipse 3.2.1, GEF 3.2.0
>>>
>>> Thanks,
>>> Dmitry
>>>
>>
>>
>
>
>
>
Re: Navigator-like window [message #226972 is a reply to message #226876] Mon, 27 November 2006 16:14 Go to previous message
Eclipse UserFriend
Originally posted by: divis1969.mail.ru

I've found the root cause.
It is the EditDomain which was null. This causes some problem in processing
setFocus event.
Unfortunately, I do not have an EditDomain since an editor (at least the one
provided with example) is not yet created: my view is some kind of resource
(file) browser (like Package Explorer, CDT C++ Projects view, etc), I start
it from Window->ShowView.

But I has found a solution: I've created a dummy DefaultEditDomain with null
as the argument in its ctor. This works.
I suppose I could encounter some problems in future but it works good for
now.

Dmitry

"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:ek7mri$7vp$1@utils.eclipse.org...
> Hi Dmitry,
>
> 1. "My example is based on GEF example by Elias Volankis"
> The shapes example shows where the editing domain is coming from, your
> editor.
>
> 2. You mean you have two sets of icons in the view toolbar? Not sure what
> the issue is, but you should be able to debug.
>
> Cheers...
> Anthony
>
> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
> news:ek4615$bkk$2@utils.eclipse.org...
>> Thank you Anthony. I've seen this example.
>> I just did not realize that ContentOutlinePage can used in any view, not
>> only in Outline.
>>
>> So, I've implemented some kind of resource browser based on
>> ContentOutlinePage, but still has some problems
>>
>> 1. I do not know where to get EditDomain, that is needed for TreeViewer's
>> setEditDomain. I just set it to null. View seems to work, it shows
>> content
>> in a tree view. But I still not sure, is it correct ot not. My example is
>> based on GEF example by Elias Volankis I found in internet. (It was a
>> long
>> time ago, so I just do not remember where I found it :-) )
>> 2. My view seems to not work correctly. I've noticed that when I running
>> it,
>> if I switch from my view to Eclipse Navigator or vice versa, tools menu
>> of
>> the view is not shown correctly. It looks like menu is not switched.
>> Sometimes, I can see both my tree and Navigator tree together (mine is in
>> toolmenu area, since my menu is shorter and fits into page tabs row.
>>
>> I've attached the source (it is corrected a litle bit to remove some
>> proprietary info).
>> What could be the problems with it?
>>
>> Dmitry
>>
>> "Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
>> news:ejt41h$rhk$1@utils.eclipse.org...
>>> Hi Dmitry
>>>
>>> Look at the GEF logic editor example. The outline view's hierarchy mode
>>> is
>>> GEF TreeViewer.
>>>
>>> Cheers...
>>> Anthony
>>>
>>> "Dmitry Smirnov" <divis1969@mail.ru> wrote in message
>>> news:ejrr6e$o6n$1@utils.eclipse.org...
>>>> Hi,
>>>>
>>>> I'm wondering is it possible to create a Navigator-like view using GEF?
>>>>
>>>> There is an extension point sample (SampleView) that is based on JFace
>>>> TreeViewer. It works good for me, but I would like to use the same tree
>>>> viewparts I had created for my model.
>>>>
>>>> Unfortunately, I do not know how to use GEF TreeViewer to make it work
>>>> the
>>>> same way as JFace TreeViewer. I had successfuly created a view, based
>>>> on
>>>> GEF TreeViewer, but I can't add DrillDownAdapter to it. Also it works a
>>>> little bit weird, but I suppose I just did not complete this example...
>>>>
>>>> Maybe there is some kind of example how to use GEF for Navigator-like
>>>> view?
>>>>
>>>> I'm using Eclipse 3.2.1, GEF 3.2.0
>>>>
>>>> Thanks,
>>>> Dmitry
>>>>
>>>
>>>
>>
>>
>>
>>
>
>
Previous Topic:the problem I add a image in editor
Next Topic:Two palettes in the same editor
Goto Forum:
  


Current Time: Sun Oct 17 07:37:11 GMT 2021

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

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

Back to the top