osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
39 stars 8 forks source link

Missing error/warning markers in AADL navigator view #2609

Closed lwrage closed 3 years ago

lwrage commented 3 years ago

Summary The AADL Navigator no longer shows error markers on elements in expanded AADL model files.

This used to work in previous versions.

Steps To Reproduce

  1. Paste model below into AADL editor and save it as P.aadl.
  2. Expand P.aadl file in AADL navigator
  3. The file contains error markers on flow implementations for fl
  4. No error markers on flows in the AADL navigator
package P
public

    thread T
        features
            i: in data port;
            o: out data port;
        flows
            fl: flow path i -> o;
    end T;

    thread implementation T.i
        calls
            seq: {
                cl: subprogram SP;
            };
        connections
            pc1: parameter i -> cl.pi;
            pc2: parameter cl.po -> o;
        flows
            -- cannot specify flow through called subprogram
            -- both of the following are not allowed
            fl: flow path i -> pc1 -> cl -> pc2 -> o;
            fl: flow path i -> pc1 -> cl.fp -> pc2 -> o;
    end T.i;

    subprogram SP
        features
            pi: in parameter;
            po: out parameter;
        flows
            fp: flow path pi -> po;
    end SP;
end P;

Screenshots OSATE 2.9.0: image

OSATE 2.9.1: image

Desktop (please complete the following information):

lwrage commented 3 years ago

This is caused by the fix to #2430.

AaronGreenhouse commented 3 years ago

Problem wasn't the imaging caching. I thought maybe I wasn't including the decorations correctly, but I was. The problem was that the original EObject represented by the wrapper was coming from a different ResourceSetImpl than the was being used when looking at the markers of any children. That meant the EcoreUtil.isAncestor() predicate was always returning false. I changed the factory to be able to share the resource set used by the caller in AadlElementContentProvider.getChildren().