Examples of EditResult


Examples of org.evolizer.daforjava.commands.EditResult

    /**
     * {@inheritDoc}
     */
    public void execute() {
        setEditResult(new EditResult());
        if (!fSelectedNodes.isEmpty()) {
            fireGraphPreEvent();

            for (NodeCursor nc = getGraphLoader().getGraph().nodes(); nc.ok(); nc.next()) {
                getEdgeGrouper().reinsertLowLevelEdges(nc.node());
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

    /**
     * {@inheritDoc}
     */
    public void execute() {
        setEditResult(new EditResult());

        if (!fEntities.isEmpty()) {
            DependencyGraph graph = getGraphLoader().getGraph();
            fireGraphPreEvent();

View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

    /**
     * {@inheritDoc}
     */
    public void execute() {
        setEditResult(new EditResult());
        if (!fSelectedNodes.isEmpty()) {
            fireGraphPreEvent();

            for (NodeCursor nc = getGraphLoader().getGraph().nodes(); nc.ok(); nc.next()) {
                getEdgeGrouper().reinsertLowLevelEdges(nc.node());
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

     */
    @Override
    public void initSelection() {
        Set<Node> nodesToSelect = new HashSet<Node>();

        EditResult editResult = getCommand().getEditResult();
        DependencyGraph graph = getCommand().getGraphLoader().getGraph();

        if (!editResult.isEmpty()) {
            for (AbstractFamixEntity entity : editResult.getEntities()) {
                Node node = graph.getNode(entity);
                if (node != null) {
                    nodesToSelect.add(node);
                }
            }
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

    /**
     * {@inheritDoc}
     */
    public void execute() {
        setEditResult(new EditResult());
        if (!fSelectedEdges.isEmpty()) {
            fireGraphPreEvent();
           
            Set<AbstractFamixEntity> entitiesToRemove = getEntitiesToRemove();
            Set<FamixAssociation> associationsToRemove = getAssociationsToRemove();
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

    /**
     * {@inheritDoc}
     */
    public void execute() {
        setEditResult(new EditResult());
        List<AbstractFamixEntity> entities = getGraphLoader().getGraph().getFamixEntities(fSelectedNodes);
        if (!entities.isEmpty()) {
            fireGraphPreEvent();

            initExecutionSelectionStrategy();
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

     *
     * @param entities The list of parent entities to remove from the graph.
     * @return Removed entities and associations.
     */
    public EditResult removeEntitiesAndAssociations(List<AbstractFamixEntity> entities) {
        EditResult editResult;

        List<AbstractFamixEntity> involvedEntites = new ArrayList<AbstractFamixEntity>();
        for (AbstractFamixEntity entity : entities) {
            involvedEntites.addAll(getSnapshotAnalyzer().getDescendants(entity));
        }

        List<FamixAssociation> associations = getSnapshotAnalyzer().queryAssociationsBetweenEntities(involvedEntites, null);
        List<FamixAssociation> associationsToOtherEntities = getAssociationsToOtherGraphEntities(involvedEntites, null);
        associations.addAll(associationsToOtherEntities);

        editResult = removeAssociations(associations);

        List<AbstractFamixEntity> removedEntities = new ArrayList<AbstractFamixEntity>();
        for (AbstractFamixEntity entity : involvedEntites) {
            if (fGraph.removeFamixEntity(entity)) {
                removedEntities.add(entity);
            }
        }

        return new EditResult(removedEntities, editResult.getAssociations());
    }
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

            if (fGraph.removeAssociation(association)) {
                removedAssociations.add(association);
            }
        }

        return new EditResult(new ArrayList<AbstractFamixEntity>(), removedAssociations);
    }
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

     */
    public EditResult addEntitiesAndAssociations(List<AbstractFamixEntity> entities, List<FamixAssociation> associations) {
        List<AbstractFamixEntity> addedEntities = addEntitiesAndParents(entities, false);
        List<FamixAssociation> addedAssociations = addAssociations(associations);

        return new EditResult(addedEntities, addedAssociations);
    }
View Full Code Here

Examples of org.evolizer.daforjava.commands.EditResult

        List<? extends FamixAssociation> associations = getSnapshotAnalyzer().queryAssociationsOfEntities(involvedEntites, associationType, direction);
        List<AbstractFamixEntity> newEntities = getListOfNotContainedEntities(associations);
        List<AbstractFamixEntity> addedEntities = addEntitiesAndParents(newEntities, false);
        List<FamixAssociation> addedAssociations = addAssociations(associations);

        return new EditResult(addedEntities, addedAssociations);
    }
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.