|
|
|
Re: Navigate between different diagrams [message #66757 is a reply to message #65400] |
Sat, 21 October 2006 13:08 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jan.herriger.gmx.de
Hello,
I did, what is mentioned in
http://wiki.eclipse.org/index.php/GMF_New_and_Noteworthy
(Basic support for diagram partitioning)
The OpenDiagramEditPolicy is generated and i'm able to call the
getOpenCommand() method:
protected Command getOpenCommand(Request request) {
EditPart targetEditPart = getTargetEditPart(request);
if (false == targetEditPart.getModel() instanceof View) {
return null;
}
EAnnotation ann = ((View) targetEditPart.getModel())
.getEAnnotation("uri://eclipse.org/gmf/openDiagramPolicy");
if (ann == null) {
return null;
}
return new ICommandProxy(new OpenDiagramCommand(ann));
}
There is no Annotation in my model, so nothing happens here. I tried to
add an Annotation to my model, but my EMF Book doesn't seem to provide
me with the infomation I need. So i got stuck right here.
Could you provide me with some hints or even some source files?
Best regards
Jan
Jacques LESCOT schrieb:
> Hi,
>
> My problem consist of navigating between different diagrams of different
> types. I have a metamodel that I can edit through two diagram types
> (System Diagram and Automaton Diagram).
> Here is an overview of a way to associate those diagrams with objects of
> my model.
> ...
>
> Regards,
>
|
|
|
|
Re: Navigate between different diagrams [message #69080 is a reply to message #67567] |
Wed, 25 October 2006 11:20 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jan.herriger.gmx.de
Hi Jacques,
it works now. Actually I don't know what the problem was ;-)
The next tasks are to synchronize all opened editors instantly and to
avoid multiple opened windows of the same diagram instance.
Best regards
Jan
Jacques LESCOT schrieb:
> Hi Jan,
>
> The Annotation is created in the xxx.xx_diagram file. In the
> XXXViewFactory class of the model object that you have associated with a
> diagram, the Annotation should be created.
>
> protected void decorateView(...)
> {
> ...
> EAnnotation diagramFacet = EcoreFactory.eINSTANCE.createEAnnotation();
> diagramFacet.setSource("uri://eclipse.org/gmf/openDiagramPolicy");
> view.getEAnnotations().add(diagramFacet);
> ...
> }
>
> Is it the case ?
>
> --
> Jacques
>
>
> Jan Herriger a écrit :
>> Hello,
>>
>> I did, what is mentioned in
>> http://wiki.eclipse.org/index.php/GMF_New_and_Noteworthy
>> (Basic support for diagram partitioning)
>>
>> The OpenDiagramEditPolicy is generated and i'm able to call the
>> getOpenCommand() method:
>>
>> protected Command getOpenCommand(Request request) {
>> EditPart targetEditPart = getTargetEditPart(request);
>> if (false == targetEditPart.getModel() instanceof View) {
>> return null;
>> }
>> EAnnotation ann = ((View) targetEditPart.getModel())
>> .getEAnnotation("uri://eclipse.org/gmf/openDiagramPolicy");
>> if (ann == null) {
>> return null;
>> }
>> return new ICommandProxy(new OpenDiagramCommand(ann));
>> }
>>
>> There is no Annotation in my model, so nothing happens here. I tried
>> to add an Annotation to my model, but my EMF Book doesn't seem to
>> provide me with the infomation I need. So i got stuck right here.
>>
>> Could you provide me with some hints or even some source files?
>>
>> Best regards
>> Jan
>>
>> Jacques LESCOT schrieb:
>>> Hi,
>>>
>>> My problem consist of navigating between different diagrams of
>>> different types. I have a metamodel that I can edit through two
>>> diagram types (System Diagram and Automaton Diagram).
>>> Here is an overview of a way to associate those diagrams with objects
>>> of my model.
>>> ...
>>>
>>> Regards,
|
|
|
Re: Navigate between different diagrams [message #69554 is a reply to message #69080] |
Wed, 25 October 2006 20:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jan.herriger.gmx.de
Hello again,
is there a way to announce model changes to other opened diagrams
(without reopening)? I know, this topic has been discussed a lot, but
the only solution I found was to modify the generated code... but what
code? I had some Ideas im mind, but actually they didn't help on.
Best regards
Jan
|
|
|
Powered by
FUDForum. Page generated in 0.03654 seconds