| Summary: | Plugin Registry for Standalone Orion Installation | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Pradyut Sarma <pradyutksarma> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | Silenio_Quarti, simon_kaegi |
| Version: | 0.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Hi Pradyut, We very purposely decoupled the editor from the plugin registry as we have some consumers who use one and not the other. For an integration of the two the idea is to inject relevant service instances into the editor as opposed to injecting the service registry itself. This typically is fine for a loaded page where the editor has a static set of capabilities discovered and defined at construction time. At the moment we do not react to the installation of a plugin and subsequent registration of new services until the next time the editor is re-initialized. Is the use-case you're trying to explore? Hi Simon,
Thanks for the help.
(In reply to your point below)
> For an integration of the two
> the idea is to inject relevant service instances into the editor as opposed
> to injecting the service registry itself.
I understand that the service registry in itself should not be injected into the editor. Relevant services should.
As I have already mentioned in the earlier post, that snippet was just to give you an idea of how and why I am proceeding ;-)
I also understand that I can use the registry to load something only during editor/application init. Once done,
subsequents plugins cannot be installed on the fly. For the time being, that will work for me as the application will load with a pre-defined set of plugins/properties, similar to the way Orion currently loads. I am going to use the plugin registry component NOT ONLY with the editor but probably will extend the use to more areas within the application.
One of the use cases that I am toying around with is to load application services based on predefined user preferences/rights.
Thanks and Regards,
Pradyut.
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html |
Build Identifier: Orion Build 0.5 Hi, The orion client installation also comes with the Plugin/Service registry which allows/helps plugins to be loaded to the tool/editor instance within iframes and communicate with the parent. This registry is not available for standalone editor instances like the embeddededitor example, but only if I use the entire client. But this registry could possibly be a very helpful component. For example, if I have the registry available with me, I can make use of the registry to use other orion plugins. For example, I could make use of the JSBeautifier orion plugin to also work with my standalone editor. Also, the availability of the registry helps me to develop our tool/application as plugins. It also helps me in building my own custom extension points/extensions (similar to the eclipse IDE). As a prototype, what I did was, I copied the following javascript files, bootstrap.js, Deferred.js, es5shim.js, plugin.js, pluginregistry.js, preferences.js, serviceregistry.js and xhr.js to the orion folder within the standalone embeddededitor folder. For the time being, I modified the code within embeddededitor.js to instantiate the requisite js objects (within define) and also pass the pluginregistry instance while creating the editor object as follows, var editor = new mEditor.Editor({ textViewFactory: textViewFactory, undoStackFactory: new mEditorFeatures.UndoFactory(), annotationFactory: annotationFactory, lineNumberRulerFactory: new mEditorFeatures.LineNumberRulerFactory(), foldingRulerFactory: new mEditorFeatures.FoldingRulerFactory(), contentAssistFactory: contentAssistFactory, keyBindingFactory: keyBindingFactory, statusReporter: statusReporter, domNode: editorDomNode, serviceRegistry: serviceRegistry, pluginRegistry: new mPluginRegistry.PluginRegistry(serviceRegistry) }); Obviously, this is not the best way to do it. I don't want the registry to be coupled with the editor, but just to explain what I am trying to do !! From within the editor, I could install any plugin by calling pluginRegistry.installPlugin (url) and use the serviceregistry to execute the installed plugins. What do you guys think? Thanks and Regards, Pradyut. Reproducible: Always Steps to Reproduce: Check "Details" Area.