| Customized tabbed property view section and editPart issue [message #184524] |
Mon, 28 April 2008 09:10  |
Eclipse User |
|
|
|
Hi,
I have one domain element E that contains an enumeration which specifies
its type : E1, E2 or E3. I have added a constraint in my gmfmap to
distinguish which element would be created (multiple toolbar item for
one domain element). GMF has generated 3 different editparts: edt1,
edt2, edt3. So, the mapping object => EditPart is defined by the value
of type of the E element.
I have customized my own tabbed property. These E elements have
different displayed sections. There is a section where user can change
the type of the selected element.
When selection change, I would like to change dynamically the display of
the sections by changing the instance of the editPart. Is it possible ?
How can I do that ?
If I close my diagram and reopen it, the correct editPart is created.
But I would like to do it without closing the diagram.
Thanks for your help.
Regards,
Philippe
|
|
|
|
|
|
|
|
| Re: Customized tabbed property view section and editPart issue [message #184730 is a reply to message #184705] |
Tue, 29 April 2008 11:28  |
Eclipse User |
|
|
|
In fact, id I do a "REQ_DIRECT_EDIT" request, the property tab is well
updated. But I don't want to set my element in the direct edit mode,
just select it.
Philippe BLANC a écrit :
> Hi Alex,
>
> I tried two different methods :
>
> //////////
> EditPartViewer v = newEdt.getRoot().getViewer();
> v.setSelection(new StructuredSelection(newEdt));
>
> /////////
> final EditPartViewer viewer = newEdt.getViewer();
> final EditPart elementPart = newEdt;
>
> if (elementPart != null) {
> Display.getCurrent().asyncExec(new Runnable() {
>
> public void run() {
> viewer.setSelection(new
> StructuredSelection(elementPart));
> Request der = new
> Request(RequestConstants.REQ_SELECTION);
> elementPart.performRequest(der);
> }
> });
> }
>
>
> Both give the same result : my element is well selected (it is dark
> colored), but my property tab is not updated.
>
> Any ideas ?
>
> Thanks.
>
> Philippe BLANC
|
|
|
Powered by
FUDForum. Page generated in 0.07608 seconds