Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problem with CreationToolEntry in a multipage editor... (Child creation using palette)
Problem with CreationToolEntry in a multipage editor... (Child creation using palette) [message #242438] Thu, 17 April 2008 10:41 Go to next message
Eclipse User
Originally posted by: ecng.oows.de

Hello,

i´m currently developing a multipage editor that is capable to display different aspects of my emf
model in
different GEF-Views (each GEF View was realized as a page (instance of
GraphicalEditorWithFlyoutPalette.class) .

The graphical elements of each GEF View could be allready drawn and being moved on the screen !!
(XYLayout => SetConstraintCommand).
The SelectionToolEntry and the MarqueToolEntry are in my PaletteRoot and are functioning allready
very well.

My Problem:
I need many further CreationToolEntries in my Palette for the creation of new model elements. Some
are allready (visually) present,
but the problem is, that no request are invoked on the edit parts of my GraphicalViewer if my mouse
is beeing moved on my diagram.

I allready added some debug notices on the underlying EditParts (=> understandsRequests,
performRequest, getCommand(), ...)
and some other installed EditPolicies of the EditParts but the problem seems to be,
that the CreationToolEntry never invokes any of this methods.

Does anyone know why or give me some hints to solve my problem ?

Thanks for any suggestions.

CY
Christian
Re: Problem with CreationToolEntry in a multipage editor... (Child creation using palette) [message #242475 is a reply to message #242438] Sat, 19 April 2008 20:13 Go to previous messageGo to next message
Eclipse User
Originally posted by: ecng.oows.de

Hello,

i just solved the problem by overwriting the following method:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
protected PaletteViewerProvider createPaletteViewerProvider() {
final DefaultEditDomain ep = getEditDomain();
final PaletteRoot pr = getPaletteRoot();

return new PaletteViewerProvider(getEditDomain()) {
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
viewer.setPaletteRoot(pr);
viewer.setEditDomain(ep);
viewer.addDragSourceListener(new TemplateTransferDragSourceListener(
viewer));
}
};
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I suppose, that the line ...
viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer));
was the reason, while no request were generated while moving the mouse over my graphical editor.

CY
Christian

christian wrote:
> Hello,
>
> i´m currently developing a multipage editor that is capable to display
> different aspects of my emf model in
> different GEF-Views (each GEF View was realized as a page (instance of
> GraphicalEditorWithFlyoutPalette.class) .
>
> The graphical elements of each GEF View could be allready drawn and
> being moved on the screen !! (XYLayout => SetConstraintCommand).
> The SelectionToolEntry and the MarqueToolEntry are in my PaletteRoot and
> are functioning allready very well.
>
> My Problem:
> I need many further CreationToolEntries in my Palette for the creation
> of new model elements. Some are allready (visually) present,
> but the problem is, that no request are invoked on the edit parts of my
> GraphicalViewer if my mouse is beeing moved on my diagram.
>
> I allready added some debug notices on the underlying EditParts (=>
> understandsRequests, performRequest, getCommand(), ...)
> and some other installed EditPolicies of the EditParts but the problem
> seems to be,
> that the CreationToolEntry never invokes any of this methods.
>
> Does anyone know why or give me some hints to solve my problem ?
>
> Thanks for any suggestions.
>
> CY
> Christian
Re: Problem with CreationToolEntry in a multipage editor... (Child creation usin [message #242480 is a reply to message #242438] Sun, 20 April 2008 17:30 Go to previous message
Eclipse User
Originally posted by: achilles_ida.yahoo.de

christian wrote:

> Hello,

> iŽm currently developing a multipage editor that is capable to display
different aspects of my emf
> model in
> different GEF-Views (each GEF View was realized as a page (instance of
> GraphicalEditorWithFlyoutPalette.class) .

> The graphical elements of each GEF View could be allready drawn and being
moved on the screen !!
> (XYLayout => SetConstraintCommand).
> The SelectionToolEntry and the MarqueToolEntry are in my PaletteRoot and are
functioning allready
> very well.

> My Problem:
> I need many further CreationToolEntries in my Palette for the creation of
new model elements. Some
> are allready (visually) present,
> but the problem is, that no request are invoked on the edit parts of my
GraphicalViewer if my mouse
> is beeing moved on my diagram.

> I allready added some debug notices on the underlying EditParts (=>
understandsRequests,
> performRequest, getCommand(), ...)
> and some other installed EditPolicies of the EditParts but the problem seems
to be,
> that the CreationToolEntry never invokes any of this methods.

> Does anyone know why or give me some hints to solve my problem ?

> Thanks for any suggestions.

> CY
> Christian


Hi,

first sorry, I'm not here answering your question, but rather asking you
one ...
can you tell me please how you implemented the multipage editor ?
I mean this part:

a multipage editor that is capable to display different aspects of my emf
model in different GEF-Views (each GEF View was realized as a page
(instance of GraphicalEditorWithFlyoutPalette.class) .

cuz i've been trying to do so for weeks ! the problem is that all my GEF
editors act like one
and any changes to one of them affect the others as well ...

Thanks in advance ...
Iskandar
Previous Topic:How to make free hand writing?
Next Topic:problems with zoom
Goto Forum:
  


Current Time: Thu Aug 21 20:13:12 EDT 2014

Powered by FUDForum. Page generated in 0.01575 seconds