[571400] Refresh instance role edit part in ui thread

Before commit c5831f39cd7dc4a3705827e1849ea4d55a9ee2e2 ([567517] Refresh
each InstanceRoleEditPart only once), the InstanceRole edit parts where
refreshed for each bounds changes detected by Execution edit parts.

ExecutionEditPart.handleNotificationEvent calls were triggered by the
DiagramEventBroker in a non aggregate way, causing a huge amount of
refresh on diagrams with a lot of InstanceRole and Execution elements.

Now this code has been moved to an aggregate post commit listener
installed by the SequenceDiagramEditPart which dramatically reduces the
number of InstanceRole edit part refresh by triggering a single refresh
by impacted InstanceRole.

But the default DiagramEventBroker in Sirius is a
org.eclipse.gmf.runtime.diagram.ui.DiagramEventBrokerThreadSafe which
specifically handles notifications that occurs from a worker thread /
non-ui thread. The new ZOrderAndInstanceRolePartRefresher mimics the
DiagramEventBrokerThreadSafe when the current diagram event broker is
the default one.

When it is not the case, the InstanceRole edit parts to refresh are
computed and refreshed in an asynchronous way.

Bug: 571400
Cherry-picked-from: 571543
Change-Id: Ibd6966b62cefc8793de2c288f7a1fc07791bdd0c
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
1 file changed
tree: c713f759b79a2f880674318d52dbb26b3270f5cc
  1. packaging/
  2. plugins/
  3. releng/
  4. .gitattributes
  5. .gitignore
  6. .travis.yml
  7. build.sh
  8. CONTRIBUTING.md
  9. pom.xml
  10. README.md
README.md

Eclipse Sirius

Build Status

Sirius enables the specification of a modeling workbench in terms of graphical, table or tree editors with validation rules and actions using declarative descriptions.

For more details see the project page and the main wiki page.

Building

The build uses Tycho. To launch a complete build, issue

mvn clean package

from the top-level directory. The resulting update-site (p2 repository) can be found in packaging/org.eclipse.sirius.update/target/repository.

By default the build uses a Neon-based target platform. You can specify a different platform like this:

mvn clean package -Dplatform-version-name=name

where name can be any of the following values:

  • mars (Eclipse 4.5)
  • neon (Eclipse 4.6, the default and reference target platform)
  • canary (uses nightly builds of all our dependencies, only used for testing)

The corresponding target platform definitions can be found in releng/org.eclipse.sirius.targets.