Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 402188 - [CDO] Validation of models in CDO repositories
Summary: [CDO] Validation of models in CDO repositories
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: M6   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 290952
  Show dependency tree
 
Reported: 2013-03-01 15:57 EST by Christian Damus CLA
Modified: 2013-03-06 11:21 EST (History)
0 users

See Also:
give.a.damus: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2013-03-01 15:57:41 EST
Bug 398688 introduced a model of problems that is suitable for recording issues found by validation of objects in a CDO repository.

The UI requires extensibility support for plugging in tracking and presentation of problems on CDO models.  This will be based on the problems model, providing the same functionality as the current IMarker-based implementation.
Comment 1 Christian Damus CLA 2013-03-01 15:58:29 EST
I can work on this.
Comment 2 Christian Damus CLA 2013-03-01 22:44:27 EST
r10321 or the cdo_kepler branch has a refactoring of the validation and decoration services to replace dependencies on IMarker with a non-workspace abstraction.  New extension points plug in:

  - marker monitors to the MarkersMonitorService to track IPapyrusMarkers
    as they come and go on EMF Resources in a ResourceSet
    - a workspace resource implementation listens for IMarker changes
    - a CDO resource implementation listens for changes in the
      ProblemsManager on an EProblems model
  - marker providers find/create/delete IPapyrusMarkers on EMF Resources
    - a workspace resource implementations manipulates IMarkers on IFiles
    - a CDO resource implementation uses the ProblemsManager to manage
      an EProblems model

The ModelExplorerView's label provider was relying on fake EMF Notifications bearing an array of IMarkerDeltas to refresh the problem decorations following model validation.  This doesn't work for CDO resources, of course, so the label provider is updated to listen for notifications from the DecorationService that it uses to compute label decorations.  The ResourceUpdateService no longer needs to post the fake Notification, so now it doesn't.

In this revision, validation of models in CDO repositories works as in workspace models as far as label decorations in the diagrams and the explorer are concerned.  However, because there are no workspace markers involved, the Problems view does not show the problems.  This will follow in a later revision that will introduce a new Model Validation view to show a unified view of IMarker- and EProblem-based IPapyrusMarkers.
Comment 3 Christian Damus CLA 2013-03-02 23:04:40 EST
r10327 on the cdo_kepler branch implements a Model Validation view in a new plug-in org.eclipse.papyrus.views.validation.

This is not a CDO-specific component.  It is a new page-book view that, like the Model Explorer view, tracks the active model editor to show its validation problems.  Problems from both workspace resources and CDO resources are presented in the Model Validation view.  For each marker, it shows:

  - severity
  - description/message
  - problem element
  - owner path of the problem element (qualified name of the owner)
  - problem type

Double-clicking a problem reveals the problem element in the Model Explorer.  Problems can be deleted via the view (multiple selection supported).  Sorting by any column is supported; repeated selections of a column toggle sort direction.
Comment 4 Christian Damus CLA 2013-03-06 11:21:42 EST
r10380

This enhancement has been merged to the trunk.