Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Stardust/Enhancing and Embedding Stardust/Browser Modeler/Javascript Extension Points"
Line 3: | Line 3: | ||
E.g. by defining | E.g. by defining | ||
− | <source> | + | <source lang="javascript"> |
propertiesPage : [{ | propertiesPage : [{ | ||
panelId: "activityPropertiesPanel", | panelId: "activityPropertiesPanel", | ||
Line 14: | Line 14: | ||
you add an additional Properties Page to the Properties Pages for Activities whose code is tobe found in the file '''activityControllingPropertiesPage.html''' and whose JavaScript Controller is created by invoking '''m_activityControllingPropertiesPage.create()''', whereby '''m_activityControllingPropertiesPage''' is a JavaScript modulein the file ''''''m_activityControllingPropertiesPage.js'''. | you add an additional Properties Page to the Properties Pages for Activities whose code is tobe found in the file '''activityControllingPropertiesPage.html''' and whose JavaScript Controller is created by invoking '''m_activityControllingPropertiesPage.create()''', whereby '''m_activityControllingPropertiesPage''' is a JavaScript modulein the file ''''''m_activityControllingPropertiesPage.js'''. | ||
+ | |||
+ | The Extension Point mechanism described here is very close to the Plug-In mechanism of Orion. It is intended to extend Lightdust's Extension Points towards the Orion Model. | ||
= Prerequisites = | = Prerequisites = |
Revision as of 07:49, 17 November 2012
Extension Points and Extensions - analogous to the concepts in Eclipse - allow you to plug-in JavaScript logic and HTML UI into various parts of the Browser Modeler (Lightdust).
E.g. by defining
propertiesPage : [{ panelId: "activityPropertiesPanel", pageId: "controllingPropertiesPage", pageHtmlUrl: "activityControllingPropertiesPage.html", provider: m_activityControllingPropertiesPage, visibility: "always" }]
you add an additional Properties Page to the Properties Pages for Activities whose code is tobe found in the file activityControllingPropertiesPage.html and whose JavaScript Controller is created by invoking m_activityControllingPropertiesPage.create(), whereby m_activityControllingPropertiesPage is a JavaScript modulein the file 'm_activityControllingPropertiesPage.js.
The Extension Point mechanism described here is very close to the Plug-In mechanism of Orion. It is intended to extend Lightdust's Extension Points towards the Orion Model.
Contents
Prerequisites
In Order to understand the concepts in this document you need to familiarize yourself with
- JavaScript programming in general
- jQuery
- jQuery UI
- require for JavaScript
- the JavaScript Metamodel for Lightdust
Properties Page Extension Point
Toolbar Extension Points
Application Type Extension Point
Data Type Extension Point
Define a New Extension Point
You may define your own extension points and evaluate those in the JavaScript code.
Extension Point Registration
Extension Registration
Extensions need to be registered in JavaScript files underneath the /modelerExtensions/<Extension Point Id> folder.