Package org.eclipse.uml2

Examples of org.eclipse.uml2.Comment


      parentProfile = Activator.getSysMLProfile();
    } else if (profileQualifiedName.startsWith("Standard")) {
      parentProfile = Activator.getStandardProfile();
    }

    Package profilePackage = parentProfile;

    final String[] profiles = profileQualifiedName.split(":{2}");
    // search the profile in the package hierarchy
    for (int index = 1; index < profiles.length - 1; index++) {
      profilePackage = profilePackage.getNestedPackage(profiles[index]);
    }

    Profile profile = (Profile)profilePackage;

    if (profileQualifiedName.startsWith("SysML")) {
      profile = (Profile)profilePackage.getNestedPackage(profiles[profiles.length - 1]);
    }

    if (profile == null) {
      final String message = "Can't apply the profile " + profileQualifiedName + " on "
          + p.getQualifiedName();
View Full Code Here


   */
  private static Boolean isProfileApplied(Package currentPackage, String profileQualifiedName) {
    final EList<Profile> allProfiles = currentPackage.getAllAppliedProfiles();
    final Iterator<Profile> it = allProfiles.iterator();
    while (it.hasNext()) {
      Profile cur = it.next();
      if (profileQualifiedName.equalsIgnoreCase(cur.getQualifiedName()))
        return true;
    }
    return false;
  }
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Property(Property newBase_Property) {
    Property oldBase_Property = base_Property;
    base_Property = newBase_Property;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
  }
View Full Code Here

    public void testRTOutputDocumentFull() {
      Document doc = new Document();
      DocType dt = new DocType("root");
      dt.setInternalSubset(" ");
      doc.addContent(dt);
      doc.addContent(new Comment("This is a document"));
      doc.addContent(new ProcessingInstruction("jdomtest", ""));
      Element e = new Element("root");
      e.addContent(new EntityRef("ref"));
      doc.addContent(e);
      roundTripDocument(doc);
View Full Code Here

   
  @Test
  public void testRTOutputList() {
    List<Content> list = new ArrayList<Content>();
    list.add(new ProcessingInstruction("jdomtest", ""));
    list.add(new Comment("comment"));
    list.add(new Element("root"));
    roundTripFragment(list);
  }
View Full Code Here

  @Ignore
  // TODO
  public void testOutputFragmentList() {
    List<Content> list = new ArrayList<Content>();
    list.add(new ProcessingInstruction("jdomtest", ""));
    list.add(new Comment("comment"));
    list.add(new CDATA("foo"));
    list.add(new Element("root"));
    list.add(new Text("bar"));
    roundTripFragment(list);
  }
View Full Code Here

  @Test
  @Ignore
  // TODO
  public void testOutputFragmentContent() {
    roundTripFragment(new ProcessingInstruction("jdomtest", ""));
    roundTripFragment(new Comment("comment"));
    roundTripFragment(new CDATA("foo"));
    roundTripFragment(new Element("root"));
    roundTripFragment(new Text("bar"));
  }
View Full Code Here

    // this is to test issue #72
    // Compact format only prints first child.
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Text(" "));
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new Element("child"));
    root.addContent(new Text(" "));
    root.addContent(new ProcessingInstruction("pitarget"));
    root.addContent(new Text(" "));
View Full Code Here

  }

  @Test
  public void testOutputDocumentFull() {
    DocType dt = new DocType("root");
    Comment comment = new Comment("comment");
    ProcessingInstruction pi = new ProcessingInstruction("jdomtest", "");
    Element root = new Element("root");
    Document doc = new Document();
    doc.addContent(dt);
    doc.addContent(comment);
View Full Code Here

  @Test
  public void testOutputEscapedMixedMultiText() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" xx "));
    root.addContent(new Text("<emb>"));
    root.addContent(new Text(" xx "));
    FormatSetup fs = new FormatSetup() {
      @Override
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.Comment

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.