Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » subeditor invocation during simulation run (=triggered by the simulation environment) sometimes fail
subeditor invocation during simulation run (=triggered by the simulation environment) sometimes fail [message #231485] Tue, 26 May 2009 16:26 Go to next message
Ralf Buschermoehle is currently offline Ralf BuschermoehleFriend
Messages: 81
Registered: July 2009
Member
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 #231509 is a reply to message #231485] Tue, 26 May 2009 17:41 Go to previous messageGo to next message
Ralf Buschermoehle is currently offline Ralf BuschermoehleFriend
Messages: 81
Registered: July 2009
Member
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 #231516 is a reply to message #231509] Tue, 26 May 2009 17:55 Go to previous messageGo to next message
Ralf Buschermoehle is currently offline Ralf BuschermoehleFriend
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 Go to previous message
Ralf Buschermoehle is currently offline Ralf BuschermoehleFriend
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");
>>> }
>>> ....
Previous Topic:Repaint issue with "Affixed Parent Side"-Node
Next Topic:Dynamic tools
Goto Forum:
  


Current Time: Thu Apr 25 12:44:51 GMT 2024

Powered by FUDForum. Page generated in 0.03301 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top