Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] mechanics of contributing QvtOperationalResourceImpl.save()

Hi Uwe,

On Sun, Mar 6, 2016 at 6:19 PM, Uwe Ritzmann <eclipse@xxxxxxxxxxxxxxx> wrote:
Hi

1.) EMFCompare is not used for pretty printing. It is used for comparing the AST from an original transformation file
against the AST from the unparsed copy of that file.

Exactly for that purpose QVTo has 'org.eclipse.m2m.tests.qvt.oml.api.framework.comparator' package that implements algorithm for calculating Selkow's distance of two
trees (plug-in "org.eclipse.m2m.tests.qvt.oml").

Sample invocaction can be found in ModelTestData.java:

    public static TreeEdit compare(EObject left, EObject right) {
        TreeEdit edit = new TreeComparator().compare(
                new EmfObjectComparatorTreeNode(null, left), 
                new EmfObjectComparatorTreeNode(null, right));
        return edit;
    }

 

As I am producing qvtox-Versions of both ASTs anyway, I could use org.eclipse.compare functionality to compare these.

Would that be acceptable?

 

Back to the top