Examples of AspectSurrogate


Examples of ch.ethz.prose.query.AspectSurrogate

    int j=0;
    int basicIndex = table.size();
    List errorList = new Vector();
    List alreadyContained = exMngr.allAspects();
    for (int i=0; i < pasteList.size(); i++) {
      AspectSurrogate aspectSur = (AspectSurrogate)pasteList.get(i);
      if (alreadyContained.contains(aspectSur))
        continue;

      Aspect realAsp = null;
      try {
        String[] execArgs = CommandlineProseClient.insertScriptCommandline(parentModel.getClasspath(),
            aspectSur.getAspectClassName(),
            aspectSur.getAssociatedObject(),
            address,
            parentModel.getActiveTransactionID(),
            isReal);

        for (int k = 0; k < execArgs.length; k++)
View Full Code Here

Examples of ch.ethz.prose.query.AspectSurrogate

      throw new TableSelectionException("Cutting is allowed only on 'Aspects'.");

    // find out what aspects to cut
    HashSet myRememberList = new HashSet();
    for (int i=0; i < selectedCells.length; i++) {
      AspectSurrogate aspect = (AspectSurrogate)((Vector)data.get(selectedCells[i])).get(JWorksheetProseClientPane.ASPECT_COL_INDEX);
      if (aspect == null)
        throw new TableSelectionException("Empty cells in selection!");
      myRememberList.add(aspect);
    }

    // cut the aspects
    Iterator toCut = myRememberList.iterator();
    WithdrawAspectsException maE = new WithdrawAspectsException();
    while (toCut.hasNext()) {
      try {
        if (parentModel.getActiveTransactionID() == null)
          exMngr.withdraw((AspectSurrogate)toCut.next());
        else
          exMngr.withdraw((AspectSurrogate)toCut.next(),parentModel.getActiveTransactionID());
      }
      catch (Exception e) {
        maE.add(e);
      }
    }

    // update the table
    for (int i=0; i < table.size(); i++) {
      AspectSurrogate aspect = (AspectSurrogate)((Vector)data.get(i)).get(JWorksheetProseClientPane.ASPECT_COL_INDEX);
      if (myRememberList.contains(aspect)) {
        data.remove(i);
        table.remove(i);
        i--;
      }
View Full Code Here

Examples of ch.ethz.prose.query.AspectSurrogate

     * withdrawn.
     */
    public void testWithdrawAspectNotification() {
        ProseRunNode run = new ProseRunNode("test", "dummyhost", -1, null);
        AspectManagerNode aspectManager = new AspectManagerNode(run, true);
        AspectSurrogate surrogate = new AspectSurrogate("Aspect", null);
        AspectNode aspect = new AspectNode(aspectManager, surrogate);
        ProsePlugin.getDefault().fireAspectWithdrawn(aspect);
        assertEquals(aspect, listener.aspect);
    }
View Full Code Here

Examples of ch.ethz.prose.query.AspectSurrogate

  public void insertAspect() throws IllegalUserInputException,PasteAspectsException,java.rmi.RemoteException,TableSelectionException {
    if (getAspectClassName() == null || getAspectClassName().trim().equals(""))
      throw new IllegalUserInputException("Aspect class name not specified");
    List aspectList = new Vector();
    aspectList.add(new AspectSurrogate(getAspectClassName(),Aspect.generateUniqueAssociation()));

    addVMToActiveTransaction(getActualTableModel());
    getActualTableModel().pasteAspects(aspectList);
  }
View Full Code Here

Examples of ch.ethz.prose.query.AspectSurrogate

    public IRunNode[] getChildren() {
        try {
            List aspects = getAspectManager().allAspects();
            AspectNode[] result = new AspectNode[aspects.size()];
            for (int i = 0; i < result.length; i++) {
                AspectSurrogate aspect = (AspectSurrogate) aspects.get(i);
                result[i] = new AspectNode(this, aspect);
            }
            return result;
        } catch (UnreachableException e) {
            return null;
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.