Java Doc for IEditorRegistry.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.IEditorRegistry

All known Subclasses:   org.eclipse.ui.internal.registry.EditorRegistry,
IEditorRegistry
public interface IEditorRegistry (Code)
Registry of editors known to the workbench.

An editor can be created in one of two ways:

  • An editor can be defined by an extension to the workbench.
  • The user manually associates an editor with a given resource extension type. This will override any default workbench or platform association.

The registry does not keep track of editors that are "implicitly" determined. For example a bitmap (.bmp) file will typically not have a registered editor. Instead, when no registered editor is found, the underlying OS is consulted.

This interface is not intended to be implemented by clients.


See Also:   org.eclipse.ui.IWorkbench.getEditorRegistry


Field Summary
final public static  intPROP_CONTENTS
     The property identifier for the contents of this registry.
final public static  StringSYSTEM_EXTERNAL_EDITOR_ID
     The identifier for the system external editor descriptor.
final public static  StringSYSTEM_INPLACE_EDITOR_ID
     The identifier for the system in-place editor descriptor.


Method Summary
public  voidaddPropertyListener(IPropertyListener listener)
     Adds a listener for changes to properties of this registry.
public  IEditorDescriptorfindEditor(String editorId)
     Finds and returns the descriptor of the editor with the given editor id.
public  IEditorDescriptorgetDefaultEditor()
     Returns the default editor.
public  IEditorDescriptorgetDefaultEditor(String fileName)
     Returns the default editor for a given file name.
public  IEditorDescriptorgetDefaultEditor(String fileName, IContentType contentType)
     Returns the default editor for a given file name and with the given content type.
public  IEditorDescriptor[]getEditors(String fileName)
     Returns the list of file editors registered to work against the file with the given file name.
public  IEditorDescriptor[]getEditors(String fileName, IContentType contentType)
     Returns the list of file editors registered to work against the file with the given file name and with the given content type.
public  IFileEditorMapping[]getFileEditorMappings()
     Returns a list of mappings from file type to editor.
public  ImageDescriptorgetImageDescriptor(String filename)
     Returns the image descriptor associated with a given file.
public  ImageDescriptorgetImageDescriptor(String filename, IContentType contentType)
     Returns the image descriptor associated with a given file.
public  ImageDescriptorgetSystemExternalEditorImageDescriptor(String filename)
     Returns the image descriptor associated with the system editor that would be used to edit this file externally.
public  booleanisSystemExternalEditorAvailable(String filename)
     Returns whether the system has an editor that could handle a file with the given name.
public  booleanisSystemInPlaceEditorAvailable(String filename)
     Returns whether there is an in-place editor that could handle a file with the given name.
public  voidremovePropertyListener(IPropertyListener listener)
     Removes the given property listener from this registry.
public  voidsetDefaultEditor(String fileNameOrExtension, String editorId)
     Sets the default editor id for the files that match that specified file name or extension.

Field Detail
PROP_CONTENTS
final public static int PROP_CONTENTS(Code)
The property identifier for the contents of this registry.



SYSTEM_EXTERNAL_EDITOR_ID
final public static String SYSTEM_EXTERNAL_EDITOR_ID(Code)
The identifier for the system external editor descriptor. This descriptor is always present in the registry on all platforms. This editor requires an input which implements org.eclipse.ui.IPathEditorInput IPathEditorInput . Use IEditorRegistry.findEditor findEditor to access the editor descriptor for this identifier.
since:
   3.0



SYSTEM_INPLACE_EDITOR_ID
final public static String SYSTEM_INPLACE_EDITOR_ID(Code)
The identifier for the system in-place editor descriptor. This descriptor is only present in the registry on platforms that support in-place editing (for example Win32). This editor requires an input which implements org.eclipse.ui.IInPlaceEditorInput IInPlaceEditorInput . Use IEditorRegistry.findEditor findEditor to access the editor descriptor for this identifier.
since:
   3.0





Method Detail
addPropertyListener
public void addPropertyListener(IPropertyListener listener)(Code)
Adds a listener for changes to properties of this registry. Has no effect if an identical listener is already registered.

The properties ids are as follows:

  • PROP_CONTENTS: Triggered when the file editor mappings in the editor registry change.


Parameters:
  listener - a property listener



findEditor
public IEditorDescriptor findEditor(String editorId)(Code)
Finds and returns the descriptor of the editor with the given editor id.
Parameters:
  editorId - the editor id the editor descriptor with the given id, or null if notfound



getDefaultEditor
public IEditorDescriptor getDefaultEditor()(Code)
Returns the default editor. The default editor always exist. the descriptor of the default editor



getDefaultEditor
public IEditorDescriptor getDefaultEditor(String fileName)(Code)
Returns the default editor for a given file name. This method assumes an unknown content type for the given file.

The default editor is determined by taking the file extension for the file and obtaining the default editor for that extension.


Parameters:
  fileName - the file name in the system the descriptor of the default editor, or null ifnot found



getDefaultEditor
public IEditorDescriptor getDefaultEditor(String fileName, IContentType contentType)(Code)
Returns the default editor for a given file name and with the given content type.

The default editor is determined by taking the file extension for the file and obtaining the default editor for that extension.


Parameters:
  fileName - the file name in the system
Parameters:
  contentType - the content type or null for the unknown content type the descriptor of the default editor, or null if notfound
since:
   3.1



getEditors
public IEditorDescriptor[] getEditors(String fileName)(Code)
Returns the list of file editors registered to work against the file with the given file name. This method assumes an unknown content type for the given file.

Note: Use getDefaultEditor(String) if you only the need the default editor rather than all candidate editors.


Parameters:
  fileName - the file name in the system a list of editor descriptors



getEditors
public IEditorDescriptor[] getEditors(String fileName, IContentType contentType)(Code)
Returns the list of file editors registered to work against the file with the given file name and with the given content type.

Note: Use getDefaultEditor(String) if you only the need the default editor rather than all candidate editors.


Parameters:
  fileName - the file name in the system
Parameters:
  contentType - the content type or null for the unknowncontent type a list of editor descriptors
since:
   3.1



getFileEditorMappings
public IFileEditorMapping[] getFileEditorMappings()(Code)
Returns a list of mappings from file type to editor. The resulting list is sorted in ascending order by file extension.

Each mapping defines an extension and the set of editors that are available for that type. The set of editors includes those registered via plug-ins and those explicitly associated with a type by the user in the workbench preference pages.

a list of mappings sorted alphabetically by extension



getImageDescriptor
public ImageDescriptor getImageDescriptor(String filename)(Code)
Returns the image descriptor associated with a given file. This image is usually displayed next to the given file. This method assumes an unknown content type for the given file.

The image is determined by taking the file extension of the file and obtaining the image for the default editor associated with that extension. A default image is returned if no default editor is available.


Parameters:
  filename - the file name in the system the descriptor of the image to display next to the file



getImageDescriptor
public ImageDescriptor getImageDescriptor(String filename, IContentType contentType)(Code)
Returns the image descriptor associated with a given file. This image is usually displayed next to the given file.

The image is determined by taking the file extension of the file and obtaining the image for the default editor associated with that extension. A default image is returned if no default editor is available.


Parameters:
  filename - the file name in the system
Parameters:
  contentType - the content type of the file or null for theunknown content type the descriptor of the image to display next to the file
since:
   3.1



getSystemExternalEditorImageDescriptor
public ImageDescriptor getSystemExternalEditorImageDescriptor(String filename)(Code)
Returns the image descriptor associated with the system editor that would be used to edit this file externally.
Parameters:
  filename - the file name the descriptor of the external editor image, or nullif none
since:
   3.0



isSystemExternalEditorAvailable
public boolean isSystemExternalEditorAvailable(String filename)(Code)
Returns whether the system has an editor that could handle a file with the given name.
Parameters:
  filename - the file name true if an external editor available, andfalse otherwise
since:
   3.0



isSystemInPlaceEditorAvailable
public boolean isSystemInPlaceEditorAvailable(String filename)(Code)
Returns whether there is an in-place editor that could handle a file with the given name.
Parameters:
  filename - the file name true if an in-place editor is available, andfalse otherwise
since:
   3.0



removePropertyListener
public void removePropertyListener(IPropertyListener listener)(Code)
Removes the given property listener from this registry. Has no affect if an identical listener is not registered.
Parameters:
  listener - a property listener



setDefaultEditor
public void setDefaultEditor(String fileNameOrExtension, String editorId)(Code)
Sets the default editor id for the files that match that specified file name or extension. The specified editor must be defined as an editor for that file name or extension.
Parameters:
  fileNameOrExtension - the file name or extension pattern (e.g. "*.xml");
Parameters:
  editorId - the editor id or null for no default



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.