Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Activity


    for (EObject e : model.allOwnedElements()) {
      if (e instanceof Package) {
        System.out.println("Package: " + ((Package) e).getName());
      }
      if (e instanceof Activity) {
        Activity a = (Activity) e;
        activitys.add(a);
        System.out.println((i++) + "\t" + a.getName());
      }
    }
    System.out.println("Please select an Activity!");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    Activity ret = null;
    for (int i1 = 3; i1 > 0; i1--) {
      try {
        ret = activitys.get(Integer.parseInt(br.readLine()));
        break;
      } catch (NumberFormatException e1) {
View Full Code Here


    // 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$

    out("The following Members were found within the selected Activity");
    for (NamedElement e : activity.getMembers()) {
      out(e.toString());
      if (e instanceof Constraint) {
        out("\t" //$NON-NLS-1$
            + ((Constraint) e).getConstrainedElements());
        for (Element constrainee : ((Constraint) e)
View Full Code Here

    for (EObject e : model.allOwnedElements()) {
      if (e instanceof Package) {
        System.out.println("Package: " + ((Package) e).getName()); //$NON-NLS-1$
      }
      if (e instanceof Activity) {
        Activity a = (Activity) e;
        activitys.add(a);
        System.out.println((i++) + "\t" + a.getName()); //$NON-NLS-1$
      }
    }
    System.out.println(Messages.getString("Message.SELECT_ACTIVITY")); //$NON-NLS-1$
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    Activity ret = null;
    for (int i1 = 3; i1 > 0; i1--) {
      try {
        ret = activitys.get(Integer.parseInt(br.readLine()));
        break;
      } catch (NumberFormatException e1) {
View Full Code Here

    } catch (CoreException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
    // The Input Activity
    Activity activity = prepareTestGeneration();

    // Boost UnitTest
    IFile boostfile = project.getFile("PluginOutput.cpp");

    // Ask user for parameters
    properties.setProperty(PathSearch.PROPERTY_MAX_PATHLENGTH, "40");
    properties.setProperty(PathSearch.PROPERTY_MAX_NO_PATHS, "-1");
    properties.setProperty(SatisfiablePathSearch.PROPERTY_SOLVER, "cplex");
    properties.setProperty(SatisfiablePathSearch.PROPERTY_UNCHECKED_STEPS,
        "2");
    if (!isAMPLinstalled()){
      MessageDialog.openError(null, "Ampl not installed", "Sorry I was not able to start an AMPL process. Please check wheather you have installed AMPL correctly. Download the free Student version of AMPL from \n"
          + "http://www.ampl.com/DOWNLOADS/index.html \n "
          + "unpack it and add the unpacked folder to the PATH variable of your machine. \n\n"
          + "Background Information: \n"
          + "AMPL and the bundled constraint solvers are used to solve the OCL constraints in the model wich results in test data.");
      return null;
    }
    ActivityTestGenUserDialog dialog = new ActivityTestGenUserDialog(null,
        properties);
    // dialog.create();
    if (dialog.open() == Window.OK) {
      properties = dialog.getActivityTestGenProperties();

      Job job = new TestGenerationJob("Generating C++ unit tests from "
          + activity.getName(), activity, boostfile, properties);
      job.setUser(true);
      job.schedule();

    }
    return null;
View Full Code Here

    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
    IWorkbenchPage page = win.getActivePage();
    ISelection sel = page.getSelection();

    Activity oActivity = null;
    if (sel instanceof IStructuredSelection) {
      IStructuredSelection oSelection = (IStructuredSelection) sel;

      // Get Activity selected from UML Treevwiew
      if (oSelection.getFirstElement() instanceof Activity) {
View Full Code Here

    } catch (CoreException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
    // The Input Activity
    Activity activity = prepareTestGeneration();
   
    // The Activity Test Case Graph
    TCGActivity tcgActivity = null;
   
    // Create Experiment Result File
    IFile experimentResults = project
        .getFile("PluginOutputExpreriment.txt");
    IFile boostfile;
    double id = Math.random();
    if (experimentResults.exists()){
      experimentResults = project.getFile("PluginOutputExperiment"+id+".txt");
    }
    String timeMessurement = "#" + "Activity: " + activity.getQualifiedName()+ "\n"
        + PathSearch.PROPERTY_MAX_PATHLENGTH + "\t"
        + PathSearch.PROPERTY_MAX_NO_PATHS + "\t"
        + SatisfiablePathSearch.PROPERTY_SOLVER + "\t"
        + SatisfiablePathSearch.PROPERTY_UNCHECKED_STEPS
        + "\tPathsFound\ttime(ns)\t"
View Full Code Here

    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
    IWorkbenchPage page = win.getActivePage();
    ISelection sel = page.getSelection();

    Activity oActivity = null;
    if (sel instanceof IStructuredSelection) {
      IStructuredSelection oSelection = (IStructuredSelection) sel;

      // Get Activity selected from UML Treevwiew
      if (oSelection.getFirstElement() instanceof Activity) {
View Full Code Here

    IEditorPart editor = page.getActiveEditor();
    // The original UML File
    IFile umlFile = ResourceUtil.getFile(editor.getEditorInput());
    IProject project = umlFile.getProject();
    // The Input Activity
    Activity activity = prepareTestGeneration();
    // TestCaseGraph OutputFile
    IFile actTCGFile = project
        .getFile("PluginOutput.activitytestcasegraph");
    // AMPL Model File
    IFile amplFile = project.getFile("PluginOutput.mod");
View Full Code Here

    IWorkbench wb = PlatformUI.getWorkbench();
    IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
    IWorkbenchPage page = win.getActivePage();
    ISelection sel = page.getSelection();

    Activity oActivity = null;
    if (sel instanceof IStructuredSelection) {
      IStructuredSelection oSelection = (IStructuredSelection) sel;

      // derive state machine from 2 different sources ...
View Full Code Here

  public boolean performFinish() {
    project = atopPage.getProject();
    projectFileName = atopPage.getProjectFileName();
   
    final UmlResource umlResource = atopPage.getUmlResource();
    final Activity activity = atopPage.getActivity();
    final MODEL_TYPE modelType = atopPage.getModelType();
    final String prismModelFileName = atopPage.getPrismModelFileName();
    final String prismPropsFileName = atopPage.getPrismPropsFileName();
    final String prismModelContainerName = atopPage.getPrismModelContainer();
    final String taskName = atopPage.getTaskName();
View Full Code Here

TOP

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

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.