Examples of Toolbox


Examples of org.apache.velocity.tools.Toolbox

        return super.getToolboxes();
    }

    protected void addToolboxesUnderKey(String toolboxKey)
    {
        Toolbox reqTools = (Toolbox)getRequest().getAttribute(toolboxKey);
        if (reqTools != null)
        {
            addToolbox(reqTools);
        }

        if (getSession() != null)
        {
            Toolbox sessTools = (Toolbox)getSession().getAttribute(toolboxKey);
            if (sessTools != null)
            {
                addToolbox(sessTools);
            }
        }

        Toolbox appTools = (Toolbox)getServletContext().getAttribute(toolboxKey);
        if (appTools != null)
        {
            addToolbox(appTools);
        }
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

    }

    public static Object findTool(String key, String toolboxKey,
                                  ServletContext application)
    {
        Toolbox toolbox = (Toolbox)application.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            return toolbox.get(key);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

                                  HttpServletRequest request,
                                  ServletContext application)
    {
        String path = getPath(request);

        Toolbox toolbox = (Toolbox)request.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            Object tool = toolbox.get(key, path);
            if (tool != null)
            {
                return tool;
            }
        }

        HttpSession session = request.getSession(false);
        if (session != null)
        {
            toolbox = (Toolbox)session.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                Object tool = toolbox.get(key, path);
                if (tool != null)
                {
                    return tool;
                }
            }

            if (application == null)
            {
                application = session.getServletContext();
            }
        }

        if (application != null)
        {
            toolbox = (Toolbox)application.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                return toolbox.get(key, path);
            }
        }

        return null;
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        return super.getToolboxes();
    }

    protected void addToolboxesUnderKey(String toolboxKey)
    {
        Toolbox reqTools = (Toolbox)getRequest().getAttribute(toolboxKey);
        if (reqTools != null)
        {
            addToolbox(reqTools);
        }

        if (getSession() != null)
        {
            Toolbox sessTools = (Toolbox)getSession().getAttribute(toolboxKey);
            if (sessTools != null)
            {
                addToolbox(sessTools);
            }
        }

        Toolbox appTools = (Toolbox)getServletContext().getAttribute(toolboxKey);
        if (appTools != null)
        {
            addToolbox(appTools);
        }
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

    }

    public static Object findTool(String key, String toolboxKey,
                                  ServletContext application)
    {
        Toolbox toolbox = (Toolbox)application.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            return toolbox.get(key);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

                                  HttpServletRequest request,
                                  ServletContext application)
    {
        String path = getPath(request);

        Toolbox toolbox = (Toolbox)request.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            Object tool = toolbox.get(key, path);
            if (tool != null)
            {
                return tool;
            }
        }

        HttpSession session = request.getSession(false);
        if (session != null)
        {
            toolbox = (Toolbox)session.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                Object tool = toolbox.get(key, path);
                if (tool != null)
                {
                    return tool;
                }
            }

            if (application == null)
            {
                application = session.getServletContext();
            }
        }

        if (application != null)
        {
            toolbox = (Toolbox)application.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                return toolbox.get(key, path);
            }
        }

        return null;
    }
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Packages.Toolbox

   */
  @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.Packages.Toolbox

    } 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);

    }
    if (builder != null)
      builder.build();
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Packages.Toolbox

    sourceTable.removeAll();
    constraintsTable.removeAll();
    sourceMap.clear();
    constraintMap.clear();
    descriptionText.setText("");
    Toolbox toolbox = (Toolbox) parentPackage.eContainer();
    if (fromTemplateButton.getSelection()) {
      for (PredefinedConstraintSet template : toolbox
          .getPredefinedContraintsSetCatalogue().getCatalogueItems()) {
        TableItem item = new TableItem(sourceTable, SWT.NONE);
        String name = template.getName();
        item.setText(name != null ? name : "");
        String description = template.getDescription();
        descriptionText.setText(description != null ? description : "");
        sourceMap.put(item, template);
      }
    } else if (fromQueryButton.getSelection()) {
      for (GSSQuery query : toolbox.getQueryContainment().getGssQueries()) {
        TableItem item = new TableItem(sourceTable, SWT.NONE);
        String name = query.getName();
        item.setText(name != null ? name : "");
        String description = query.getDescription();
        descriptionText.setText(description != null ? description : "");
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Packages.Toolbox

   * @see org.eclipse.jface.wizard.Wizard#performFinish()
   */
  @Override
  public boolean performFinish() {

    Toolbox toolbox = ((Toolbox) parentPackage.eContainer());

    new CreatePredefinedConstraintSetCommand(
        toolbox.getPredefinedContraintsSetCatalogue(),
        saveConstraintsToPredefinedConstraintSetWizardPage
            .getSelectedConstraints(),
        saveConstraintsToPredefinedConstraintSetWizardPage
            .getPredefinedSetName(),
        saveConstraintsToPredefinedConstraintSetWizardPage
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.