List of usage examples for com.intellij.openapi.fileEditor FileEditorProvider getEditorTypeId
@NotNull @NonNls String getEditorTypeId();
From source file:com.android.tools.idea.ddms.screenshot.ScreenshotViewer.java
License:Apache License
private FileEditorProvider getImageFileEditorProvider() { FileEditorProvider[] providers = FileEditorProviderManager.getInstance().getProviders(myProject, myBackingVirtualFile);// w w w .j a v a 2 s . co m assert providers.length > 0; // Note: In case there are multiple providers for image files, we'd prefer to get the bundled // image editor, but we don't have access to any of its implementation details so we rely // on the editor type id being "images" as defined by ImageFileEditorProvider#EDITOR_TYPE_ID. for (FileEditorProvider p : providers) { if (p.getEditorTypeId().equals("images")) { return p; } } return providers[0]; }