Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [bpel-dev] inconsistency ino.e.bpel.ui.editparts.ActivityEditPart.addAllAdapters

Hi Simon,

Yes, add/remove/undo/redo seems to be working fine after the patch is applied.
I've filed #199829(https://bugs.eclipse.org/bugs/show_bug.cgi?id=199829) and proposed a patch.

Thanks,
	Vitaly.


>-----Original Message-----
>From: bpel-dev-bounces@xxxxxxxxxxx [mailto:bpel-dev-bounces@xxxxxxxxxxx] On
>Behalf Of Simon D Moser
>Sent: Monday, August 13, 2007 11:12 PM
>To: BPEL Designer project developer discussions.
>Cc: BPEL Designer project developer discussions.; bpel-dev-bounces@xxxxxxxxxxx
>Subject: Re: [bpel-dev] inconsistency
>ino.e.bpel.ui.editparts.ActivityEditPart.addAllAdapters
>
>Hey Vitaly,
>
>I am OK with rewriting. The only think I'd suggest is testing well with
>add/remove/undo/redo and see if anything goes wrong.
>
>Cheers
>Simon
>
>Simon Moser, M.Eng.
>
>
>
> Websphere Integration       Mail:           IBM Deutschland Entwicklung
> Developer Development       smoser@xxxxxx.  GmbH
> Team Lead BPEL Editor       com             Vorsitzender des
> Dept. 4722, Bldg.           Phone:          Aufsichtsrats: Martin Jetter
> 71032-01, Room 086          +49-7031-16-43  Geschäftsführung: Herbert
> Websphere Solutions and     04              Kircher
> Services                    Fax:            Sitz der Gesellschaft:
> IBM Deutschland             +49-7031-16-48  Böblingen
> Entwicklung GmbH            90              Registergericht: Amtsgericht
> Schönaicherstr. 220, D -                    Stuttgart, HRB 243294
> 71032 Boeblingen
>
>
>
>
>
>
>
>
>
>
>             "Tishkov, Vitaly
>             V"
>             <vitaly.v.tishkov                                          To
>             @intel.com>               "BPEL Designer project developer
>             Sent by:                  discussions."
>             bpel-dev-bounces@         <bpel-dev@xxxxxxxxxxx>
>             eclipse.org                                                cc
>
>                                                                   Subject
>             08/13/2007 03:00          [bpel-dev] inconsistency in
>             PM                        o.e.bpel.ui.editparts.ActivityEditP
>                                       art.addAllAdapters
>
>             Please respond to
>              "BPEL Designer
>             project developer
>               discussions."
>             <bpel-dev@eclipse
>                   .org>
>
>
>
>
>
>
>Hi there,
>
>During my work on synchronizing src and design tabs for Flow I've found a
>little inconsistency in
>o.e.bpel.ui.editparts.ActivityEditPart.addAllAdapters():
>
>      protected void addAllAdapters() {
>            super.addAllAdapters();
>            Sources sources = getActivity().getSources();
>            if (sources != null) {
>                  adapter.addToObject(sources);
>                  for (Iterator it = sources.getChildren().iterator();
>it.hasNext(); ) {
>                        Source source = (Source)it.next();
>                        // also include the link, if there is one (since we
>indirectly
>                        // control the activation of the LinkEditPart)
>                        if (source.getLink() != null) adapter
>.addToObject(source.getLink());
>
>                        // Okay--the real problem here, is that the
>Activity might be
>                        // referred to by a Source object, but the Activity
>is not going
>                        // to find out about the creation of a new Sources
>that references
>                        // it.  Therefore, our model listeners don't know
>what to do!
>
>                        // TODO: temporarily hacked around in
>FlowEditPart.FlowContentAdapter.
>
>                        // TODO: also include any parent flows, and the
>Links object of
>                        // any parent flows that have one.  !
>                        // TODO: in future, use a global listener to handle
>refreshing the
>                        // correct source editpart.
>                  }
>            }
>            Targets targets = getActivity().getTargets();
>            if (targets != null) {
>                  adapter.addToObject(targets);
>                  for (Iterator it = targets.getChildren().iterator();
>it.hasNext(); ) {
>                        adapter.addToObject((Target)it.next());
>                  }
>            }
>      }
>
>
>Please note that if you remove all the comments then the method will look
>this way:
>
>      protected void addAllAdapters() {
>            super.addAllAdapters();
>            Sources sources = getActivity().getSources();
>            if (sources != null) {
>                  adapter.addToObject(sources);
>                  for (Iterator it = sources.getChildren().iterator();
>it.hasNext(); ) {
>                        Source source = (Source)it.next();
>                        if (source.getLink() != null) adapter
>.addToObject(source.getLink());
>
>                  }
>            }
>            Targets targets = getActivity().getTargets();
>            if (targets != null) {
>                  adapter.addToObject(targets);
>                  for (Iterator it = targets.getChildren().iterator();
>it.hasNext(); ) {
>                        adapter.addToObject((Target)it.next());
>                  }
>            }
>      }
>
>This inconsistent behavior leads to different sets of eAdapters created for
>SourceImpl and TargetImpl (try to set breakpoints at the end of
>SourceImpl.setActivity() and TargetImpl.setActivity() to ensure that.
>The different sets of eAdapters is an obstacle for restoring links in the
>design tab when editing the source tab.
>
>The question:
>is there any reason not to make the 'sources' part of the method be similar
>to the 'target' part, i.e. the method will look this way:
>
>      protected void addAllAdapters() {
>            super.addAllAdapters();
>            Sources sources = getActivity().getSources();
>            if (sources != null) {
>                  adapter.addToObject(sources);
>                  for (Iterator it = sources.getChildren().iterator();
>it.hasNext(); ) {
>                        adapter.addToObject((Source)it.next());
>
>                  }
>            }
>            Targets targets = getActivity().getTargets();
>            if (targets != null) {
>                  adapter.addToObject(targets);
>                  for (Iterator it = targets.getChildren().iterator();
>it.hasNext(); ) {
>                        adapter.addToObject((Target)it.next());
>                  }
>            }
>      }
>
>If it's OK to rewrite the 'source' part of the method then I'll file a bug
>and submit a patch.
>
>Thanks,
>            Vitaly._______________________________________________
>bpel-dev mailing list
>bpel-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/bpel-dev


Back to the top