Search in sources :

Example 1 with OpenShiftResourceInput

use of org.jboss.tools.openshift.internal.ui.property.OpenShiftResourceInput in project jbosstools-openshift by jbosstools.

the class EditResourceHandler method openInEditor.

private void openInEditor(IWorkbenchWindow window, Connection connection, IResource resource) throws PartInitException {
    IStorageEditorInput input = new OpenShiftResourceInput(connection, resource);
    IWorkbenchPage page = window.getActivePage();
    if (page != null) {
        IEditorRegistry editorRegistry = PlatformUI.getWorkbench().getEditorRegistry();
        String defaultJsonEditorId = getDefaultJSONEditorDescriptorId(editorRegistry);
        page.openEditor(input, defaultJsonEditorId);
    }
}
Also used : IStorageEditorInput(org.eclipse.ui.IStorageEditorInput) OpenShiftResourceInput(org.jboss.tools.openshift.internal.ui.property.OpenShiftResourceInput) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IEditorRegistry(org.eclipse.ui.IEditorRegistry)

Aggregations

IEditorRegistry (org.eclipse.ui.IEditorRegistry)1 IStorageEditorInput (org.eclipse.ui.IStorageEditorInput)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 OpenShiftResourceInput (org.jboss.tools.openshift.internal.ui.property.OpenShiftResourceInput)1