Examples of DAForJavaGraphEditor


Examples of org.evolizer.daforjava.plugin.DAForJavaGraphEditor

        Assert.assertNotNull("thebigvoid.Galaxy was not found in the project", galaxy);
        ISelection selection = new StructuredSelection(galaxy);

        final DAForJavaEditorInput editorInput = new DAForJavaEditorInput(selection);

        DAForJavaGraphEditor part = null;
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
            part = (DAForJavaGraphEditor) page.openEditor(editorInput, DAForJavaGraphEditor.DAFORJAVA_GRAPH_EDITOR);
        } catch (PartInitException pie) {
            pie.printStackTrace();
        } catch (ClassCastException ce) {
            ce.printStackTrace();
        }
        Assert.assertNotNull("Could not open graph editor and panel", part);
        Assert.assertNotNull("Panel is not openend", part.getPanel());
        Assert.assertNotNull("Graph is null", part.getPanel().getGraph());

        fGraphPanel = part.getPanel();

        checkClassPlanet();
    }
View Full Code Here

Examples of org.evolizer.daforjava.plugin.DAForJavaGraphEditor

    /**
     * Update view.
     */
    public void updateView() {
        DAForJavaGraphEditor graphEditor = fPVControllerView.getGraphEditor();
        ViewConfigModel viewConfigModel = graphEditor.getPanel().getViewConfigModel();
        PolymetricViewProfile profile = viewConfigModel.getProfile();

        if (profile.getName() != null && profile.getName().length() > 0) {
            fPVControllerView.select(fProfileCombo, profile.getName());
        } else {
            sLogger.warn("Profile name of editor " + graphEditor.getPartName() + " is null!");
        }
    }
View Full Code Here

Examples of org.evolizer.daforjava.plugin.DAForJavaGraphEditor

                IWorkbenchPage page = PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow().getActivePage();

                IEditorPart editor = page.getActiveEditor();
                if (editor instanceof DAForJavaGraphEditor) {
                    DAForJavaGraphEditor graphEditor = (DAForJavaGraphEditor) editor;
                    fMonitor.worked(10);
                    // AbstractSelectionHandler selectionHandler = new JavaElementSelectionHandler(graphEditor.getPanel().getGraphLoader().getSnapshotAnalyzer());
                    // List<AbstractFamixEntity> entities = selectionHandler.getSelectedEntities(fSelection);
                    AbstractSelectionHandler selectionHandler = SelectionHandlerFactory.getInstance().getSelectionHandler(fSelection);
                    List<AbstractFamixEntity> entities = selectionHandler.getSelectedEntities(graphEditor.getPanel().getGraphLoader().getSnapshotAnalyzer());
                    AbstractGraphEditCommand command = new AddEntitiesCommand(entities, graphEditor.getPanel().getGraphLoader(), graphEditor.getPanel().getEdgeGrouper());
                    graphEditor.getPanel().getCommandController().executeCommand(command);

                    fMonitor.worked(25);
                } else {
                    System.err.println("Editor is not a graph editor - select an active graph editor first");
                }
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.