Examples of MetaArtefactOperation


Examples of org.tuba.plugins.meta.MetaArtefactOperation

    if (solution == null)
      return null;

    List<XMLArtefactOperation> operations = new ArrayList<XMLArtefactOperation>();
    while (solution != null) {
      MetaArtefactOperation operation = ((Node) solution.getLastEdge()
          .getTargetNode()).getOperation();
      if (operation == null)
        break;
      operations.add(0, new XMLArtefactOperation(operation.getId()));
      solution = solution.getPrePath();
    }

    return operations;
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

  private void checkOperationOrder(String beginType,
      List<XMLArtefactOperation> operations) throws IntegrationException {
    PluginManager pluginManager = PluginManager.getInstance();
    for (XMLArtefactOperation operation : operations) {
      MetaArtefactOperation operationMetaData = pluginManager
          .getArtefactOperation(operation.getId());
      if (operationMetaData == null) {
        // TODO externalize
        String message = "don't know operation: " + operation.getId(); //$NON-NLS-1$
        showError(message);
        throw new IntegrationException();
      }
      if (!beginType.equals(operationMetaData.getSourceType())) {
        // TODO externalize
        String message = "operation chain contains errors"; //$NON-NLS-1$
        showError(message);
        throw new IntegrationException();
      }
      beginType = operationMetaData.getTargetType();
    }
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

  }

  public MetaArtefactOperation getArtefactOperation(String id) {
    if (operations == null)
      collectOperations();
    MetaArtefactOperation op = operations.get(id);
    if (op == null)
      return null;
    return op.clone();
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

  private void collectOperations() {
    operations = new HashMap<String, MetaArtefactOperation>();
    for (IConfigurationElement element : getPlugins(IArtefactOperation.POINT_ID)) {
      try {
        MetaArtefactOperation operation = new MetaArtefactOperation(
            element);
        operations.put(operation.getId(), operation);
      } catch (ExtensionException e) {
        logger.severe(e.getMessage());
      }
    }
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

  }

  private void init() {
    for (MetaArtefactOperation o : PluginManager.getInstance()
        .getArtefactOperations()) {
      MetaArtefactOperation operation = o.clone();
      String sourceType = operation.getSourceType();
      TreeItem parent = artefactTypes.get(sourceType);
      if (parent == null) {
        parent = new TreeItem(tree, SWT.NULL);
        String name = PluginManager.getInstance()
            .getArtefactRepresentation(sourceType).getName();
        parent.setText(name);
        artefactTypes.put(sourceType, parent);
      }
      TreeItem operationItem = new TreeItem(parent, SWT.NULL);
      operationItem.setText(operation.getName());
      operationMap.put(operationItem, operation);
    }
    createDragSource();
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

      @Override
      public void dragSetData(DragSourceEvent event) {
        List<MetaArtefactOperation> operations = new ArrayList<MetaArtefactOperation>();
        for (TreeItem item : tree.getSelection()) {
          MetaArtefactOperation operation = operationMap.get(item);
          if (operation != null)
            operations.add(operation);

        }
        event.data = Serializer.serialize(operations);
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

    List<MetaArtefactOperation> operations = new ArrayList<MetaArtefactOperation>();
    String[] operationsArray = operationsString.split(SRING_SEPARATOR
        + SRING_SEPARATOR);
    for (String operationID : operationsArray) {
      String decodedOperationID = decode(operationID);
      MetaArtefactOperation operation = PluginManager.getInstance()
          .getArtefactOperation(decodedOperationID);
      operations.add(operation);
    }
    return operations;
  }
View Full Code Here

Examples of org.tuba.plugins.meta.MetaArtefactOperation

    item.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        final int index = table.getSelectionIndex();
        if (index == -1)
          return;
        MetaArtefactOperation operation = operationList.get(index);
        Configurator.getInstance().configurate(operation,
            menu.getShell());
      }
    });
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.