Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Model


  public static void main(String[] args) {
    readCmdArgs(args);

    // read Model
    Model model = (Model) load(inFile).get(0);
    out("ModelName: " + model.getName()); //$NON-NLS-1$

    // select one activity
    Activity activity = selectActivity(model);

    ActivityTestCaseGraphResourceFactoryImpl resFactory = new ActivityTestCaseGraphResourceFactoryImpl();
View Full Code Here


   */
  public static void main(String[] args) throws Exception {
    readCmdArgs(args);

    // read Model
    Model model = (Model) load(inFile).get(0);
    out("ModelName: " + model.getName()); //$NON-NLS-1$

    // select one activity
    Activity activity = selectActivity(model);
    System.out.println("you selected: " + activity.getLabel()); //$NON-NLS-1$

View Full Code Here

   */
  public static void main(String[] args) throws Exception {
    readCmdArgs(args);

    // read Model
    Model model = (Model) load(inFile).get(0);
    out("ModelName: " + model.getName()); //$NON-NLS-1$

    // select one activity
    Activity activity = selectActivity(model);
    System.out.println("you selected: " + activity.getLabel()); //$NON-NLS-1$

View Full Code Here

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    readCmdArgs(args);
    Model model = (Model) load(inFile).get(0);
    Class umlClass = (Class) model.getOwnedMembers().get(0).getOwnedElements().get(0);
    Property umlProperty = (Property) umlClass.getOwnedAttributes().get(0);
   
    //initialize OCL stuff
    OCL ocl = OCL.newInstance();
    Helper helper = ocl.createOCLHelper();
    out(OCL.initialize(OCLParser.RESOURCE_SET));
    helper.setAttributeContext(umlClass, umlProperty);
    helper.setContext((Classifier) model.getOwnedMembers().get(0).getOwnedElements().get(0));
    out("The following elements are contained in the class:");
    out(model.getOwnedMembers().get(0).getOwnedElements().get(0).toString());
    out(helper.getEnvironment().getVariables().size()+"");
    out("Variables within the context:");
    for (Variable<Classifier, ?> v : helper.getEnvironment().getVariables()){
      out(v.toString());
      //out(v.getRepresentedParameter());
View Full Code Here

  }

  protected void createModel(IProgressMonitor monitor) {
    monitor.beginTask("labels.buildingModelResources", 10);
    // Getting the model element
    Model m = model.getUMLElement();
    if((m!=null)&&(m.getName()!=null)) {
      //Setting up the model location
      URI location = buildEMFModelURI(uri, m);
      // Saving the model resource
      resultingEmfResource =
        new ResourceSetImpl().createResource(location);
View Full Code Here

   *
   * @param Model umlModel - Komplettes UML-Modell
   * @return List<Class> classes - Typisierte Liste mit allen UML-Klassen
   */
  public static List<Class> getAllClasses(Model umlModel) {
    Model dm = umlModel.getModel();
    List<Class> classes = new ArrayList<Class>();
    EList<NamedElement> elms = dm.getMembers();
    for (NamedElement namedElement : elms) {
      EList<Element> elements = namedElement.allOwnedElements();
      for (Element element : elements) {
        if (element instanceof Class) {
          Class impl = (Class) element;
View Full Code Here

  protected void doModification(WorkflowContext ctx, ProgressMonitor monitor,
      Issues issues, Object model) {

    try {
      Model dm = (Model) model;

      EList<NamedElement> elms = dm.getMembers();
      for (NamedElement namedElement : elms) {
        EList<Element> elements = namedElement.allOwnedElements();
        for (Element element : elements) {
          if (element instanceof Class) {
            Class impl = (Class) element;
View Full Code Here

      Issues issues, Object model) {

    try {
      System.out.println("analyzing model");
     
      Model dm = (Model) model;
      EList<NamedElement> elms = dm.getMembers();
      for (NamedElement namedElement : elms) {
        System.out.println("\t" + namedElement);

        EList<Element> elements = namedElement.allOwnedElements();
        for (Element element : elements) {
View Full Code Here

  protected void doModification(WorkflowContext ctx, ProgressMonitor monitor,
      Issues issues, Object model) {
   
    try {
      Model dm = (Model) model;
      EList<NamedElement> elms = dm.getMembers();

      for (NamedElement namedElement : elms) {
        // System.out.println(namedElement);
        EList<Element> elements = namedElement.allOwnedElements();
        for (Element element : elements) {
View Full Code Here

   
    // create the decorator for the UML model
    List<EObject> contents = modelResource.getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
        Model model = (Model)obj;
        try {
          modelDec = (ModelDecorator) decFactory.getDecorator(model);
          break;
        } catch (ClassNotFoundException e) {
          throw new TranslationException(this, "Initialization failed", e);
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Model

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.