Package net.ssehub.easy.dslCore.ui
Class EditorEmbedderFactory
- java.lang.Object
-
- net.ssehub.easy.dslCore.ui.EditorEmbedderFactory
-
public class EditorEmbedderFactory extends java.lang.ObjectA factory for creating embedded editors. The purpose of this class is to decouple actual editor implementations from the EASy-Producer UI, so that editors can be installed optionally.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEditorEmbedderFactory.IEditorCreatorCreates a specific embedded editor.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,EditorEmbedderFactory.IEditorCreator>CREATORS
-
Constructor Summary
Constructors Constructor Description EditorEmbedderFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IEmbeddedEditorembedEditor(java.net.URI resourceURI, org.eclipse.swt.widgets.Composite composite)Embeds an editor for the given resource URI intocomposite.static voidregister(java.lang.String extension, EditorEmbedderFactory.IEditorCreator creator)Registers an editor creator.static voidunregister(java.lang.String extension)Unregisters an editor creator.
-
-
-
Field Detail
-
CREATORS
private static final java.util.Map<java.lang.String,EditorEmbedderFactory.IEditorCreator> CREATORS
-
-
Method Detail
-
register
public static void register(java.lang.String extension, EditorEmbedderFactory.IEditorCreator creator)Registers an editor creator.- Parameters:
extension- the file extension to react oncreator- the editor creator to register
-
unregister
public static void unregister(java.lang.String extension)
Unregisters an editor creator.- Parameters:
extension- the file extension to unregister the creator for
-
embedEditor
public static IEmbeddedEditor embedEditor(java.net.URI resourceURI, org.eclipse.swt.widgets.Composite composite)
Embeds an editor for the given resource URI intocomposite.- Parameters:
resourceURI- the URI to be handledcomposite- the parent composite to embed the editor into- Returns:
- the embedded editor (or null if embedding failed for some reason)
-
-