Search in sources :

Example 1 with WorkspaceDuplicateProvider

use of org.gephi.project.spi.WorkspaceDuplicateProvider in project gephi by gephi.

the class ProjectControllerImpl method duplicateWorkspace.

@Override
public Workspace duplicateWorkspace(Workspace workspace) {
    if (projects.hasCurrentProject()) {
        Workspace duplicate = newWorkspace(projects.getCurrentProject());
        for (WorkspaceDuplicateProvider dp : Lookup.getDefault().lookupAll(WorkspaceDuplicateProvider.class)) {
            dp.duplicate(workspace, duplicate);
        }
        openWorkspace(duplicate);
        return duplicate;
    }
    return null;
}
Also used : WorkspaceDuplicateProvider(org.gephi.project.spi.WorkspaceDuplicateProvider) Workspace(org.gephi.project.api.Workspace)

Aggregations

Workspace (org.gephi.project.api.Workspace)1 WorkspaceDuplicateProvider (org.gephi.project.spi.WorkspaceDuplicateProvider)1