Question

I have a simple RCP application, where I have some nodes and connections between them. Now I want to make a shortcut Ctrl + A to select all of them and it seems to work, however I can't drag and drop them. When I select them manually with shift + LMB it behaves as it should. What could be the problem and how can I fix it? And another question. When I select nodes manually and click elsewhere they deselect, but when I select them with my Ctrl + A that's not the case. Any help greatly appreciated.

    IEditorPart editor = PlatformUI.getWorkbench()
            .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

        Class multiPageEditorClass;
        try {
            multiPageEditorClass = editor
                    .getClass()
                    .getClassLoader()
                    .loadClass(
                            "org.jboss.tools.flow.jpdl4.multipage.editors.MultiPageEditor");

            if (multiPageEditorClass.isInstance(editor)) {
                Method getActiveInneEditorMethod = multiPageEditorClass
                        .getMethod("getActiveInnerEditor", new Class[0]);
                Object innerEditor = getActiveInneEditorMethod.invoke(
                        multiPageEditorClass.cast(editor));
                if (innerEditor instanceof JpdlEditor) {
                    EditPart contents = ((JpdlEditor) innerEditor).getGraphicalViewer().getContents();
                    List<EditPart> list = contents.getChildren();
                    for (EditPart editPart : list) {
                        editPart.setSelected(1);
                    }
                }

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top