use of org.eclipse.ui.IEditorDescriptor in project InformationSystem by ObeoNetwork.
the class BindingTreeEditor method getEditorDescriptor.
/**
* Retrieves the descriptor for this editor.
*
* @return the editor descriptor
*/
protected final IEditorDescriptor getEditorDescriptor() {
final IEditorRegistry editorRegistry = PlatformUI.getWorkbench().getEditorRegistry();
final IEditorDescriptor editorDesc = editorRegistry.findEditor(getSite().getId());
return editorDesc;
}
use of org.eclipse.ui.IEditorDescriptor in project ecf by eclipse.
the class EditorHelper method getEditorIdForFile.
protected String getEditorIdForFile(IFile file) {
final IWorkbench wb = getWorkbenchWindow().getWorkbench();
final IEditorRegistry er = wb.getEditorRegistry();
final IEditorDescriptor desc = er.getDefaultEditor(file.getName());
if (desc != null)
return desc.getId();
else
return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
use of org.eclipse.ui.IEditorDescriptor in project azure-tools-for-java by Microsoft.
the class HDInsightHelperImpl method openJobViewEditor.
public void openJobViewEditor(Object projectObject, @NotNull String clusterName) {
try {
loadHDInsightPlugin();
} catch (BundleException bundleException) {
Activator.getDefault().log("Error loading plugin " + HDINSIHGT_BUNDLE_ID, bundleException);
}
IClusterDetail clusterDetail = JobViewManager.getCluster(clusterName);
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), editorDescriptor.getId());
} catch (PartInitException e2) {
Activator.getDefault().log("Error opening " + clusterDetail.getName(), e2);
}
}
use of org.eclipse.ui.IEditorDescriptor in project azure-tools-for-java by Microsoft.
the class UIHelperImpl method refreshTable.
@Override
public void refreshTable(Object projectObject, final StorageAccount storageAccount, final Table table) {
IWorkbench workbench = PlatformUI.getWorkbench();
final IEditorDescriptor editorDescriptor = workbench.getEditorRegistry().findEditor("com.microsoft.azuretools.azureexplorer.editors.TableFileEditor");
DefaultLoader.getIdeHelper().invokeLater(new Runnable() {
@Override
public void run() {
// TODO
/*try {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
TableFileEditor newEditor = (TableFileEditor) page.openEditor(new StorageEditorInput(storageAccount, table), editorDescriptor.getId());
newEditor.fillGrid();
} catch (PartInitException e) {
Activator.getDefault().log("Error opening container", e);
}*/
}
});
}
use of org.eclipse.ui.IEditorDescriptor in project azure-tools-for-java by Microsoft.
the class UIHelperImpl method openDeploymentSlotPropertyView.
@Override
public void openDeploymentSlotPropertyView(final DeploymentSlotNode node) {
if (Utils.isEmptyString(node.getId())) {
return;
}
AzureTaskManager.getInstance().runLater(() -> {
IWorkbench workbench = PlatformUI.getWorkbench();
DeploymentSlotPropertyEditorInput input = new DeploymentSlotPropertyEditorInput(node.getId(), node.getSubscriptionId(), node.getWebAppId(), node.getName());
IEditorDescriptor descriptor = workbench.getEditorRegistry().findEditor(DeploymentSlotEditor.ID);
openEditor(EditorType.WEBAPP_EXPLORER, input, descriptor);
});
}
Aggregations