[571610] 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: 571610
Cherry-picked-from: 571543
Change-Id: Iddfc76b5d19b98e78479c61fa9fa7ff9c2ca664d
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
2 files changed
tree: 1302689013a976987f4164a2c6d4faddae0a3291
  1. packaging/
  2. plugins/
  3. releng/
  4. .gitattributes
  5. .gitignore
  6. build.sh
  7. CONTRIBUTING
  8. Jenkinsfile
  9. LICENSE
  10. NOTICE
  11. pom.xml
  12. 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.