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) |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
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]]. | ||
− | The <code>LanguageScriptProvider</code> is an UNO component that provides the environment to execute a macro for a specific language. For example when {{ | + | The <code>LanguageScriptProvider</code> is an UNO component that provides the environment to execute a macro for a specific language. For example when {{AOo}} encounters a Scripting Framework URI (see [[Documentation/DevGuide/Scripting/Scripting Framework URI Specification|Scripting Framework URI Specification]]) the <code>ScriptingFramework</code> finds the appropriate <code>LanguageScriptProvider</code> to execute the script. A <code>LanguageScriptProvider</code> has the following responsibilities: |
* It must support the <idl>com.sun.star.script.provider.LanguageScriptProvider</idl> service. | * It must support the <idl>com.sun.star.script.provider.LanguageScriptProvider</idl> service. | ||
Line 16: | Line 17: | ||
* The name of the any <code>LanguageScriptProvider</code> service must be of the form "<code>com.sun.star.script.provider.ScriptProviderFor[Language]</code>", where Language is the language name as it appears in a script URI. | * The name of the any <code>LanguageScriptProvider</code> service must be of the form "<code>com.sun.star.script.provider.ScriptProviderFor[Language]</code>", where Language is the language name as it appears in a script URI. | ||
− | {{ | + | {{Note|The name of the <tt>LanguageScriptProvider</tt> MUST be as above otherwise it will not operate correctly.}} |
{{PDL1}} | {{PDL1}} | ||
[[Category:Documentation/Developer's Guide/Scripting]] | [[Category:Documentation/Developer's Guide/Scripting]] |
Latest revision as of 18:27, 21 December 2020
- 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 Apache OpenOffice 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). |