Examples of GSSQuery


Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  /* (non-Javadoc)
   * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    final GSSQuery query = (GSSQuery) UiUtil.getSelectedEObject()
    LoadConstraintsWizard wizard = new LoadConstraintsWizard(query);
    WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
    dialog.create();
    dialog.open();
    return null;
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  /* (non-Javadoc)
   * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    final GSSQuery query = (GSSQuery) UiUtil.getSelectedEObject()
    SaveConstraintsWizard wizard = new SaveConstraintsWizard(query);
    WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
    dialog.create();
    dialog.open();
    return null;
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  /* (non-Javadoc)
   * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
   */
  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    final GSSQuery query = (GSSQuery) UiUtil.getSelectedEObject()
   
    Toolbox container = (Toolbox) query.eContainer().eContainer();
    AccessLayer accessLayer = new AccessLayer(false);
    ProjectSpace projectSpace = WorkspaceManager.getProjectSpace(query);
    accessLayer.registerProjectSpace(projectSpace);

    AssignedConstraintsSet assignedConstraintsSet = query.getAssignedConstraintsSet();
   
    new GSSQueryProcessor(query, accessLayer, container.getGssCatalogue(), assignedConstraintsSet, false).runAsJob();
    return null;
  }
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  /*  if (modelElement instanceof QueryResultSet){
      builder =  new QueryResultGraphBuilder(managedFormComposite, SWT.NONE, getSite(), (QueryResultSet)modelElement, accessLayer);
    } else
  */ 
    if (modelElement instanceof SelectedGoalsSet){
      GSSQuery query =  (GSSQuery) modelElement.eContainer();
      GSSQueryContainment queryContainment  =  (GSSQueryContainment) query.eContainer();
      Toolbox toolbox  =  (Toolbox) queryContainment.eContainer();
      GSS gss  =  toolbox.getGssCatalogue();
      builder = new GoalSelectorGraphBuilder(managedFormComposite, SWT.NONE, getSite(), gss, (SelectedGoalsSet)modelElement, accessLayer);
    } else
   
    if (modelElement instanceof SelectedPrinciplesSet){
      GSSQuery query =  (GSSQuery) modelElement.eContainer();
      GSSQueryContainment queryContainment  =  (GSSQueryContainment) query.eContainer();
      Toolbox toolbox  =  (Toolbox) queryContainment.eContainer();
      GSS gss  =  toolbox.getGssCatalogue();
      builder = new PrincipleSelectorGraphBuilder(managedFormComposite, SWT.NONE, getSite(), gss,query, (SelectedPrinciplesSet)modelElement, accessLayer);

    }
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

   * @generated NOT
   */
  @Override
  public String getText(Object object) {
    QueryResultSet resultSet = (QueryResultSet) object;
    GSSQuery query = (GSSQuery) resultSet.eContainer();
    boolean obsolete = false;
    if (query != null){
     
      obsolete = obsolete || query.isChanged();
     
      AssignedConstraintsSet assignedConstraintsSet = query.getAssignedConstraintsSet();
      SelectedGoalsSet selectedGoalsSet = query.getSelectedGoalsSet();
      SelectedPrinciplesSet selectedPrinciplesSet = query.getSelectedPrinciplesSet();

     
      if (assignedConstraintsSet!= null)
        obsolete = obsolete || assignedConstraintsSet.isChanged();
     
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

   *
   * @see org.eclipse.jface.wizard.Wizard#performFinish()
   */
  @Override
  public boolean performFinish() {
    GSSQuery query = QueryFactory.eINSTANCE.createGSSQuery();
    query.setAssignedConstraintsSet(QueryFactory.eINSTANCE
        .createAssignedConstraintsSet());
    query.setSelectedGoalsSet(QueryFactory.eINSTANCE
        .createSelectedGoalsSet());
    query.setSelectedPrinciplesSet(QueryFactory.eINSTANCE
        .createSelectedPrinciplesSet());
    query.setSelectedGoalsPriorities(QueryFactory.eINSTANCE
        .createSelectedGoalsPriorities());
    query.setUsername(newGSSQueryWizardPageOne.getUsername());
    query.setUuid(newGSSQueryWizardPageOne.getId());
    query.setName(newGSSQueryWizardPageOne.getQueryName());
    query.setDescription(newGSSQueryWizardPageOne.getQueryDescription());
    query.setIncludeAll(newGSSQueryWizardPageOne.includeAll());
    query.setIncludeRefactorings(newGSSQueryWizardPageOne.includeRefactorings());
    query.setIncludePattern(newGSSQueryWizardPageOne.includePattern());
    query.setIncludePrinciples(newGSSQueryWizardPageOne.includePrinciples());
    query.setIncludeFlaws(newGSSQueryWizardPageOne.includeFlaws());
    if (newGSSQueryWizardPageTwo.isLoadConstraints()) {
      for (Constraint constraint : newGSSQueryWizardPageTwo
          .getSelectedConstraints()) {
        query.getAssignedConstraintsSet().getAssignedConstraints()
            .add(ModelUtil.clone(constraint));
      }
    }
    new AddGSSQuery(parentPackage, query).run();
    ModelOpenHelper.openModel(query);
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  @Test
  public void test() {
    String username = System.getProperty("user.name");
    GSSQueryContainment gssQueryContainment = QueryFactory.eINSTANCE
        .createGSSQueryContainment();
    GSSQuery query = QueryFactory.eINSTANCE.createGSSQuery();
    query.setUsername(username);
    query.setUuid("id");
    query.setTimestamp("now");
    new AddGSSQuery(gssQueryContainment, query).runWithoutUnicaseCommand();

    assertEquals(1, gssQueryContainment.getGssQueries().size());
    GSSQuery query_ = (GSSQuery) gssQueryContainment.getGssQueries().get(0);
    assertEquals(query, query_);
    assertEquals(username, query_.getUsername());
    assertEquals("id", query_.getUuid());
    assertEquals("now", query_.getTimestamp());

  }
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.GSSQuery

  @Override
  protected void createFormContent(IManagedForm managedForm) {
    super.createFormContent(managedForm);
    managedFormComposite = managedForm.getForm().getBody();
    managedFormComposite.setLayout(new FillLayout()); // set any Layout
    GSSQuery query =  (GSSQuery) modelElement.eContainer();
  //  GSSQueryContainment queryContainment  =  (GSSQueryContainment) query.eContainer();
  //  Toolbox toolbox = (Toolbox) queryContainment.eContainer();

    SelectedGoalsSet selectedGoalsSet = query.getSelectedGoalsSet();
   
    builder = new SelectedGoalsGraphBuilder(managedFormComposite, SWT.NONE, getSite(), (SelectedGoalsSet)selectedGoalsSet, accessLayer);
    builder.build();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.