|
|
Re: subeditor invocation during simulation run (=triggered by the simulation environment) sometimes [message #231516 is a reply to message #231509] |
Tue, 26 May 2009 17:55 |
Ralf Buschermoehle Messages: 81 Registered: July 2009 |
Member |
|
|
Hi again,
even more strange the relationships persists even between several
run-time instances of eclipse.
1st run-time environment start & manually opened subeditor 1,2,3 -->
simulation can open subeditors 1,2,3
2nd run-time environment start (without any opend subeditors) -->
simulation can open subeditors 1,2,3
Did I miss something in the code to "register" the editors appropriately?
Greetings,
Ralf
Ralf Buschermoehle wrote:
> Hi,
>
> There seems to be a relationship between manually opened subeditors and
> the subeditors, that can be opened during a simulation run.
>
> Greetings,
>
> Ralf
>
> Ralf Buschermoehle wrote:
>> Hello,
>>
>> I color some editor elements during a simulation run. Normally this
>> works fine - but when I introduced subeditor(s) I can't sometimes grep
>> them (to color their elements appropriately).
>>
>> Manually (= when I open a (sub-) editor via double click) everything
>> works fine.
>>
>> During a simulation run _sometimes_ the diagramFacet.getDiagramLink is
>> null? Even more strange, sometimes I can execute 10/20 runs without a
>> problem - the next time not a single run works.
>>
>> I used the code generation of gmf2.2m5 and 2.2m7 to create the
>> (connected) editors.
>>
>> Any Help would be appreciated, thanks,
>>
>> Ralf
>>
>> P.S.
>>
>> I try to get the subeditor via ...
>>
>> private static
>> org.eclipse.epf.xml.uma.deliveryProcess.diagram.part.MyDiagr amEditor
>> getMyEditor(EditPart targetEditPart) {
>>
>> if(targetEditPart != null) {
>>
>> if (false == targetEditPart.getModel()instanceof View) {
>> logger.error("Bad instance: "+targetEditPart.getModel()); }
>>
>> View view = (View) targetEditPart.getModel();
>> Style link =
>> view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLink Style());
>>
>> if (false == link instanceof HintedDiagramLinkStyle) {
>> logger.error("Bad instance: "+link);
>> }
>>
>> HintedDiagramLinkStyle diagramFacet = (HintedDiagramLinkStyle) link;
>> Diagram umaDeliveryProcessDiagramLink = diagramFacet.getDiagramLink();
>>
>> if (umaDeliveryProcessDiagramLink == null) {
>> logger.debug("diagram link missing");
>> }
>> ....
|
|
|
Re: subeditor invocation during simulation run (=triggered by the simulation environment) sometimes [message #231577 is a reply to message #231516] |
Wed, 27 May 2009 13:32 |
Ralf Buschermoehle Messages: 81 Registered: July 2009 |
Member |
|
|
Ok, problem solved ...
I did not create a new editor when necessary - right now this is done on
base of the generated OpenPolicy Code (by bending the accessors - which
is a little annoying then the diagram code need to be regenerated - in
particular when Open Diagram Behavior changes). This works ... and if no
one tells me there is a better/more secure/more colorful way it will
survive in our code I guess.
Thanks anyway (to all readers),
Ralf
Ralf Buschermoehle wrote:
> Hi again,
>
> even more strange the relationships persists even between several
> run-time instances of eclipse.
>
> 1st run-time environment start & manually opened subeditor 1,2,3 -->
> simulation can open subeditors 1,2,3
>
> 2nd run-time environment start (without any opend subeditors) -->
> simulation can open subeditors 1,2,3
>
> Did I miss something in the code to "register" the editors appropriately?
>
> Greetings,
>
> Ralf
>
> Ralf Buschermoehle wrote:
>> Hi,
>>
>> There seems to be a relationship between manually opened subeditors
>> and the subeditors, that can be opened during a simulation run.
>>
>> Greetings,
>>
>> Ralf
>>
>> Ralf Buschermoehle wrote:
>>> Hello,
>>>
>>> I color some editor elements during a simulation run. Normally this
>>> works fine - but when I introduced subeditor(s) I can't sometimes
>>> grep them (to color their elements appropriately).
>>>
>>> Manually (= when I open a (sub-) editor via double click) everything
>>> works fine.
>>>
>>> During a simulation run _sometimes_ the diagramFacet.getDiagramLink
>>> is null? Even more strange, sometimes I can execute 10/20 runs
>>> without a problem - the next time not a single run works.
>>>
>>> I used the code generation of gmf2.2m5 and 2.2m7 to create the
>>> (connected) editors.
>>>
>>> Any Help would be appreciated, thanks,
>>>
>>> Ralf
>>>
>>> P.S.
>>>
>>> I try to get the subeditor via ...
>>>
>>> private static
>>> org.eclipse.epf.xml.uma.deliveryProcess.diagram.part.MyDiagr amEditor
>>> getMyEditor(EditPart targetEditPart) {
>>>
>>> if(targetEditPart != null) {
>>>
>>> if (false == targetEditPart.getModel()instanceof View) {
>>> logger.error("Bad instance: "+targetEditPart.getModel()); }
>>>
>>> View view = (View) targetEditPart.getModel();
>>> Style link =
>>> view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLink Style());
>>>
>>> if (false == link instanceof HintedDiagramLinkStyle) {
>>> logger.error("Bad instance: "+link);
>>> }
>>>
>>> HintedDiagramLinkStyle diagramFacet = (HintedDiagramLinkStyle) link;
>>> Diagram umaDeliveryProcessDiagramLink = diagramFacet.getDiagramLink();
>>>
>>> if (umaDeliveryProcessDiagramLink == null) {
>>> logger.debug("diagram link missing");
>>> }
>>> ....
|
|
|
Powered by
FUDForum. Page generated in 0.03301 seconds