Package org.emftrace.metamodel.LinkModel

Examples of org.emftrace.metamodel.LinkModel.LinkType


     
      LinkTypeCatalog linkTypes = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
     
      accessLayer.addElement(project, linkTypes);
     
      LinkType linkType1 = LinkModelFactory.eINSTANCE.createLinkType();
      LinkType linkType2 = LinkModelFactory.eINSTANCE.createLinkType();
      LinkType linkType3 = LinkModelFactory.eINSTANCE.createLinkType();
     
      accessLayer.addElement(project, linkType1);
      accessLayer.addElement(project, linkType2);
      accessLayer.addElement(project, linkType3);
     
      linkType1.setName("refinement");
      linkType2.setName("implements");
      linkType3.setName("requires");
     
      linkTypes.getLinkTypes().add(linkType1);
      linkTypes.getLinkTypes().add(linkType2);
      linkTypes.getLinkTypes().add(linkType3);
     
View Full Code Here


    @Test
    public void testGetAllChildren()
    {       
        LinkTypeCatalog cat = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
        LinkType          t1  = LinkModelFactory.eINSTANCE.createLinkType();
        LinkType          t2  = LinkModelFactory.eINSTANCE.createLinkType();
        project.addModelElement(cat);
        project.addModelElement(t1);
        project.addModelElement(t2);
       
        cat.getLinkTypes().add(t1);
View Full Code Here

    @Test
    public void testGetDirectChildren()
    {       
        LinkTypeCatalog cat = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
        LinkType          t1  = LinkModelFactory.eINSTANCE.createLinkType();
        LinkType          t2  = LinkModelFactory.eINSTANCE.createLinkType();
        LinkType          t3  = LinkModelFactory.eINSTANCE.createLinkType();
        project.addModelElement(cat);
        project.addModelElement(t1);
        project.addModelElement(t2);
        project.addModelElement(t3);
       
View Full Code Here

    public void testGetParent()
    {
        LinkTypeCatalog catalog = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
        accessLayer.addElement(project, catalog);
       
        LinkType type = LinkModelFactory.eINSTANCE.createLinkType();
        accessLayer.addElement(project, type);
       
        assertEquals(project, accessLayer.getParent(type));       
        catalog.getLinkTypes().add(type);       
        assertEquals(catalog, accessLayer.getParent(type));
View Full Code Here

    @Test
    public void testGetElementsProjectEClass()
    {       
        LinkTypeCatalog cat = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
        LinkType          t1  = LinkModelFactory.eINSTANCE.createLinkType();
        LinkType          t2  = LinkModelFactory.eINSTANCE.createLinkType();
        project.addModelElement(cat);
        project.addModelElement(t1);
        project.addModelElement(t2);
       
        cat.getLinkTypes().add(t1);
View Full Code Here

    @Test
    public void testGetElementsProjectString()
    {       
        LinkTypeCatalog cat = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
        LinkType          t1  = LinkModelFactory.eINSTANCE.createLinkType();
        LinkType          t2  = LinkModelFactory.eINSTANCE.createLinkType();
        project.addModelElement(cat);
        project.addModelElement(t1);
        project.addModelElement(t2);
       
        cat.getLinkTypes().add(t1);
View Full Code Here

      ReportContainer container = ReportModelFactory.eINSTANCE.createReportContainer();
      ImpactReport r = ReportModelFactory.eINSTANCE.createImpactReport();
      Actor a1 = URNModelFactory.eINSTANCE.createActor();
      Actor a2 = URNModelFactory.eINSTANCE.createActor();
      AtomicChangeType c = ChangeModelFactory.eINSTANCE.createAtomicChangeType();
      LinkType t = LinkModelFactory.eINSTANCE.createLinkType();
     
      List<EObject> l1 = new ArrayList<EObject>();
      List<EObject> l2 = new ArrayList<EObject>();
      l1.add(a1);
      l2.add(a2);
     
      t.setName("TestRelation");
      c.setType(AtomicType.ADD);
      r.getImpactSources().add(a1);
      r.getAffectedElements().add(a2);
      r.setChangeType(c);
      r.setType(ReportType.IMPACT);
View Full Code Here

        accessLayer.addElement(project, c3);
       
        TraceLink l1 = LinkModelFactory.eINSTANCE.createTraceLink();
        accessLayer.addElement(project, l1);
       
        LinkType t1 = LinkModelFactory.eINSTANCE.createLinkType();
        accessLayer.addElement(project, t1);
       
        t1.setName("Refines");
       
        l1.setType(t1);
        l1.setSource(c1);
        l1.setTarget(c2);
              
View Full Code Here

        accessLayer.addElement(project, l2);
       
        TraceLink l3 = LinkModelFactory.eINSTANCE.createTraceLink();
        accessLayer.addElement(project, l3);
       
        LinkType t1 = LinkModelFactory.eINSTANCE.createLinkType();
        accessLayer.addElement(project, t1);
       
        t1.setName("Refines");
       
        l1.setType(t1);
        l1.setSource(c1);
        l1.setTarget(c2);
       
View Full Code Here

    @Test
    public void testcheckIfLinkExists()
    {
        Concern c1 = URNModelFactory.eINSTANCE.createConcern();
        Concern c2 = URNModelFactory.eINSTANCE.createConcern();
        LinkType t = LinkModelFactory.eINSTANCE.createLinkType();
       
        List<EObject> sources = new ArrayList<EObject>();
        sources.add(c1);
        List<EObject> targets = new ArrayList<EObject>();
        targets.add(c2);
View Full Code Here

TOP

Related Classes of org.emftrace.metamodel.LinkModel.LinkType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.