AnsweredAssumed Answered

Validator - How to get the diagram

Question asked by larsh on Jul 19, 2012
Hi everybody,

I'm trying to implement my own validator. Unfortunately I have problems to get the diagram object.

I want to validate the modell by pressing a button in the toolbar. For this I implemented a ValidateProcess. In this class I tried to get the current diagram. I have tried it with the following code:

ValidatorProcess.java

[…]
public void run(IAction action) throws NullPointerException {
   Diagramm diagram = getDiagramTypeProvider().getDiagram();
   BPMN20OwnProcessValidator bpmnVal = new BPMN20OwnProcessValidator();
   bpmnVal.validateDiagram(diagram, new NullProgressMonitor());
[…]

But I always get a null object (at getDiagramTypeProvider()). Does anybody know, how I can get the right diagram object?

Thanks for your help!
Lars

Outcomes