MultiPageEditors: About common edit domain and common palette root [message #222876] |
Thu, 14 September 2006 07:30 |
Eclipse User |
|
|
|
Originally posted by: prashanto.chatterjee.softwareag.com
Hi,
You have another guy here who is completely baffled with the behaviour of
a multipage-editor. I feel its simply not suited for this purpose.
I have a workflow model. I have a multipage-editor with a layout tab, a
tree-editor tab and a source tab. After a lot of head-banging and thanks
to a sample example by some IBM guys, I could accomplish a multi-page
editor that registers different global actions for the different editors
and is also able to reflect the changed model when I switch between tabs.
However, the sample application talked of different edit domains and a
delegating command stack because it had different models for different
editors.
However, in my case, I have the same model for both the layout and tree
tabs and the source tab shows the serialized XML of the in-memory model. I
could make the multi-page editor provide a shared edit-domain,
palette-root, key-handler etc. Evrything seems to be working fine except
that click-n-drop from the palette onto the first editor-tab does not
work. However, it works for the second editor tab. Is it beacuse when I
configure my second editor tab, my composite for the palette changes to
the second-editor's composite?
I am lost. Any help in this regard would be deeply appreciated.
Thanks in advance,
Prashanto
|
|
|
|
|
Re: MultiPageEditors: About common edit domain and common palette root [message #223567 is a reply to message #223019] |
Fri, 29 September 2006 06:18 |
Eclipse User |
|
|
|
Originally posted by: prashanto.chatterjee.softwareag.com
Hi Jin,
Thanks for responding and I am sorry I couldn't respond sooner as I started
working on an altogether different aspect.
The fact is that the control never goes to getCreateCommand(CreateRequest
request) inside the corresponding edit-part.
I presume that it is because all my mouse events (click etc) are now
registered with the second editor in my multi-page editor. That is the
reason why click-n-drop works in the second page and not on the first page.
After looking into the code, I found that all mouse events from the palette
are registered with the editor-control when we create a GraphicalEditor with
a palette. That also means, I presume, that when I share a common palette
between two editor pages in a mutipage editor scenario, the one that is
added last registers itself as a listener to all mouse events on the palette
(Please correct me if I am wrong).
I am lost with no solution in sight. Can someone direct me as to which is
the correct way of handling such a scenrio (i.e shared palette and shared
edit-domain in a mulitpage editor)?
Regards,
Prashanto
"Jin" <jin.phd@gmail.com> wrote in message
news:eelif6$9d8$1@utils.eclipse.org...
> Prashanto Chatterjee:
>
> sharing a edit-domain in multipage-editor is a very possible things.
> Palette is just a DragSource or Tool. But what's your detail method of
> sharing? Maybe you can check your command for CreatRequest to see what
> happened.
>
> Jin
>
|
|
|
Powered by
FUDForum. Page generated in 0.05075 seconds