Search in sources :

Example 1 with JobViewInput

use of com.microsoft.azuretools.azureexplorer.editors.JobViewInput in project azure-tools-for-java by Microsoft.

the class HDInsightHelperImpl method openJobViewEditor.

public void openJobViewEditor(Object projectObject, String uuid) {
    try {
        loadHDInsightPlugin();
    } catch (BundleException bundleException) {
        Activator.getDefault().log("Error loading plugin " + HDINSIHGT_BUNDLE_ID, bundleException);
    }
    IClusterDetail clusterDetail = JobViewManager.getCluster(uuid);
    IWorkbench workbench = PlatformUI.getWorkbench();
    IEditorDescriptor editorDescriptor = workbench.getEditorRegistry().findEditor("com.microsoft.azure.hdinsight.jobview");
    try {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IEditorPart newEditor = page.openEditor(new JobViewInput(clusterDetail, uuid), editorDescriptor.getId());
    } catch (PartInitException e2) {
        Activator.getDefault().log("Error opening " + clusterDetail.getName(), e2);
    }
}
Also used : IWorkbench(org.eclipse.ui.IWorkbench) IEditorDescriptor(org.eclipse.ui.IEditorDescriptor) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) BundleException(org.osgi.framework.BundleException) IEditorPart(org.eclipse.ui.IEditorPart) PartInitException(org.eclipse.ui.PartInitException) IClusterDetail(com.microsoft.azure.hdinsight.sdk.cluster.IClusterDetail) JobViewInput(com.microsoft.azuretools.azureexplorer.editors.JobViewInput)

Aggregations

IClusterDetail (com.microsoft.azure.hdinsight.sdk.cluster.IClusterDetail)1 JobViewInput (com.microsoft.azuretools.azureexplorer.editors.JobViewInput)1 IEditorDescriptor (org.eclipse.ui.IEditorDescriptor)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbench (org.eclipse.ui.IWorkbench)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 PartInitException (org.eclipse.ui.PartInitException)1 BundleException (org.osgi.framework.BundleException)1