Difference between revisions of "Documentation/DevGuide/Scripting/Writing a LanguageScriptProvider UNO Component From Scratch"
From Apache OpenOffice Wiki
< Documentation | DevGuide
OOoWikiBot (Talk | contribs) m (Robot: Changing Category:Documentation/Developers Guide/Scripting) |
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
||
Line 5: | Line 5: | ||
|NextPage=Documentation/DevGuide/Scripting/Scripting Framework URI Specification | |NextPage=Documentation/DevGuide/Scripting/Scripting Framework URI Specification | ||
}} | }} | ||
− | {{DISPLAYTITLE:Writing a LanguageScriptProvider UNO Component from scratch}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Scripting/{{SUBPAGENAME}}}} |
+ | {{DISPLAYTITLE:Writing a LanguageScriptProvider UNO Component from scratch}} | ||
To provide support for a new scripting language a new <code>LanguageScriptProvider</code> for that language needs to be created. The new <code>LanguageScriptProvider</code>, an UNO component, must be written in a language from which there is an existing UNO bridge. Details about UNO bridges can be found at [[Documentation/DevGuide/AdvUNO/UNO C++ Bridges|UNO C++ Bridges]]. | To provide support for a new scripting language a new <code>LanguageScriptProvider</code> for that language needs to be created. The new <code>LanguageScriptProvider</code>, an UNO component, must be written in a language from which there is an existing UNO bridge. Details about UNO bridges can be found at [[Documentation/DevGuide/AdvUNO/UNO C++ Bridges|UNO C++ Bridges]]. | ||
Revision as of 13:23, 15 May 2009
- Writing Macros
- How the Scripting Framework Works
- Writing a LanguageScriptProvider UNO Component using the Java Helper Classes
- Writing a LanguageScriptProvider UNO Component From Scratch
To provide support for a new scripting language a new LanguageScriptProvider
for that language needs to be created. The new LanguageScriptProvider
, an UNO component, must be written in a language from which there is an existing UNO bridge. Details about UNO bridges can be found at UNO C++ Bridges.
The LanguageScriptProvider
is an UNO component that provides the environment to execute a macro for a specific language. For example when OpenOffice.org encounters a Scripting Framework URI (see Scripting Framework URI Specification) the ScriptingFramework
finds the appropriate LanguageScriptProvider
to execute the script. A LanguageScriptProvider
has the following responsibilities:
- It must support the com.sun.star.script.provider.LanguageScriptProvider service.
- It is responsible for creating the environment necessary to run a script.
- It is responsible for implementing the com.sun.star.script.browse.BrowseNode service to allow macros to be organized and browsed.
- Given a script URI it is responsible for returning a command like object that implements the com.sun.star.script.provider.XScript interface that can execute the macro indicated by the URI.
- The name of the any
LanguageScriptProvider
service must be of the form "com.sun.star.script.provider.ScriptProviderFor[Language]
", where Language is the language name as it appears in a script URI.
Content on this page is licensed under the Public Documentation License (PDL). |