Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-08 Thread Eliot Kimber
Radu,

Thanks—just what I needed. I’ll explore those options.

Cheers,

E.

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> | 
Twitter<https://twitter.com/servicenow> | 
YouTube<https://www.youtube.com/user/servicenowinc> | 
Facebook<https://www.facebook.com/servicenow>

From: oXygen-user  on behalf of Oxygen XML 
Editor Support (Radu Coravu) 
Date: Wednesday, December 8, 2021 at 9:28 AM
To: oxygen-user@oxygenxml.com 
Subject: Re: [oXygen-user] Possible to Put Code Templates in a Framework?
[External Email]


Hi Eliot,

So we have the API:
PluginWorkspaceProvider.getPluginWorkspace().importGlobalOptions(optionsFile);
You could call it twice, once with the location of the plugin's options.xml and 
once maybe with another location of an options.xml containing code templates.

Maybe load a project specific XML options file every time a new project is 
opened:
@Override
public void applicationStarted(StandalonePluginWorkspace 
pluginWorkspaceAccess) {
  pluginWorkspaceAccess.getProjectManager().addProjectChangeListener(new 
ProjectChangeListener() {

@Override
public void projectChanged(URL oldProjectURL, URL newProjectURL) {
  File projectSpecificOptions = new File(new URL(newProjectURL, 
"options/options.xml").toURI());
  if(projectSpecificOptions != null) {
pluginWorkspaceAccess.importGlobalOptions(projectSpecificOptions);
  }
}
  });
}


Regards,

Radu

Radu Coravu

Oxygen XML Editor
On 12/8/21 17:08, Eliot Kimber wrote:
I may have a ready solution in that we have a add-on that serves to set options 
and that add-on is of course run on start up. Rather than having the code 
templates baked into the add-on’s options.xml I think it should be possible to 
import code templates from another location—I’ll dig into the API docs but if 
somebody has the necessary invocation at hand that would be helpful.

Thanks,

Eliot

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://urldefense.com/v3/__https:/www.linkedin.com/company/servicenow__;!!N4vogdjhuJM!QzOtPq8eKHjvxQ4-exZKr3LdXYcXPNOTKZqqoW2468Heweg8qERAuy1EbVJuJDBouKqXRw$>
 | 
Twitter<https://urldefense.com/v3/__https:/twitter.com/servicenow__;!!N4vogdjhuJM!QzOtPq8eKHjvxQ4-exZKr3LdXYcXPNOTKZqqoW2468Heweg8qERAuy1EbVJuJDA5n8RIgg$>
 | 
YouTube<https://urldefense.com/v3/__https:/www.youtube.com/user/servicenowinc__;!!N4vogdjhuJM!QzOtPq8eKHjvxQ4-exZKr3LdXYcXPNOTKZqqoW2468Heweg8qERAuy1EbVJuJDBbIjOPzQ$>
 | 
Facebook<https://urldefense.com/v3/__https:/www.facebook.com/servicenow__;!!N4vogdjhuJM!QzOtPq8eKHjvxQ4-exZKr3LdXYcXPNOTKZqqoW2468Heweg8qERAuy1EbVJuJDAZAZNMQw$>

From: oXygen-user 
<mailto:oxygen-user-boun...@oxygenxml.com> 
on behalf of Oxygen XML Editor Support (Radu Coravu) 
<mailto:supp...@oxygenxml.com>
Date: Tuesday, December 7, 2021 at 11:32 PM
To: oxygen-user@oxygenxml.com<mailto:oxygen-user@oxygenxml.com> 
<mailto:oxygen-user@oxygenxml.com>
Subject: Re: [oXygen-user] Possible to Put Code Templates in a Framework?
[External Email]


Hi Eliot,

For now you cannot save code templates at framework level. We have an internal 
issue registered for this and I added your contact details to it, adding the 
issue ID below for future reference:

EXM-36264 Code templates at framework level

In the meantime maybe you can create custom Author actions but they will work 
only in the Author visual editing mode.

Or maybe you can store the code templates at project level and have a 
project.xpr saved in the Git project that everybody needs to open in Oxygen 
before editing.

Regards,

Radu

Radu Coravu

Oxygen XML Editor
On 12/8/21 00:38, Eliot Kimber wrote:
We maintain a set of code templates that currently get bake into options.xml 
that is then distributed via an add-on that sets global options (and nothing 
else).

We maintain our frameworks in git and all authors clone that repo and pull 
regularly to keep it up to date, making deployment and update easier for 
writers (avoids having to update add-ons and then restart Oxygen).

Reviewing the docs I see that code templates are stored in either the global 
options or in project options but I didn’t see anything about putting them in 
frameworks.

Is there a way to have code templates in frameworks so that we can deploy new 
ones without having to update our add-on?

Thanks,

E.

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://urldefense.com/v3/__https:/www.linkedin.com/company/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6

Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-08 Thread Oxygen XML Editor Support (Radu Coravu)

Hi Eliot,

So we have the API:


PluginWorkspaceProvider.getPluginWorkspace().importGlobalOptions(optionsFile);
You could call it twice, once with the location of the plugin's 
options.xml and once maybe with another location of an options.xml 
containing code templates.


Maybe load a project specific XML options file every time a new project 
is opened:



    @Override
    public void applicationStarted(StandalonePluginWorkspace 
pluginWorkspaceAccess) {
pluginWorkspaceAccess.getProjectManager().addProjectChangeListener(new 
ProjectChangeListener() {


    @Override
    public void projectChanged(URL oldProjectURL, URL newProjectURL) {
  File projectSpecificOptions = new File(new 
URL(newProjectURL, "options/options.xml").toURI());

  if(projectSpecificOptions != null) {
pluginWorkspaceAccess.importGlobalOptions(projectSpecificOptions);
  }
    }
  });
    }


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 12/8/21 17:08, Eliot Kimber wrote:


I may have a ready solution in that we have a add-on that serves to 
set options and that add-on is of course run on start up. Rather than 
having the code templates baked into the add-on’s options.xml I think 
it should be possible to import code templates from another 
location—I’ll dig into the API docs but if somebody has the necessary 
invocation at hand that would be helpful.


Thanks,

Eliot

_

*Eliot Kimber*

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com <https://www.servicenow.com>

LinkedIn <https://www.linkedin.com/company/servicenow> | Twitter 
<https://twitter.com/servicenow> | YouTube 
<https://www.youtube.com/user/servicenowinc> | Facebook 
<https://www.facebook.com/servicenow>


*From: *oXygen-user  on behalf of 
Oxygen XML Editor Support (Radu Coravu) 

*Date: *Tuesday, December 7, 2021 at 11:32 PM
*To: *oxygen-user@oxygenxml.com 
*Subject: *Re: [oXygen-user] Possible to Put Code Templates in a 
Framework?


*[External Email]*

**

Hi Eliot,

For now you cannot save code templates at framework level. We have an 
internal issue registered for this and I added your contact details to 
it, adding the issue ID below for future reference:


    EXM-36264 Code templates at framework level

In the meantime maybe you can create custom Author actions but they 
will work only in the Author visual editing mode.


Or maybe you can store the code templates at project level and have a 
project.xpr saved in the Git project that everybody needs to open in 
Oxygen before editing.


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 12/8/21 00:38, Eliot Kimber wrote:

We maintain a set of code templates that currently get bake into
options.xml that is then distributed via an add-on that sets
global options (and nothing else).

We maintain our frameworks in git and all authors clone that repo
and pull regularly to keep it up to date, making deployment and
update easier for writers (avoids having to update add-ons and
then restart Oxygen).

Reviewing the docs I see that code templates are stored in either
the global options or in project options but I didn’t see anything
about putting them in frameworks.

Is there a way to have code templates in frameworks so that we can
deploy new ones without having to update our add-on?

Thanks,

E.

_

*Eliot Kimber*

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com <https://www.servicenow.com>

LinkedIn

<https://urldefense.com/v3/__https:/www.linkedin.com/company/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPvkQonkug$>
 |
Twitter

<https://urldefense.com/v3/__https:/twitter.com/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPtaz6Gvxg$>
 |
YouTube

<https://urldefense.com/v3/__https:/www.youtube.com/user/servicenowinc__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPvTtDoB5A$>
 |
Facebook

<https://urldefense.com/v3/__https:/www.facebook.com/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPs8BMYr3Q$>



___

oXygen-user mailing list

oXygen-user@oxygenxml.com

https://www.oxygenxml.com/mailman/listinfo/oxygen-user  
<https://urldefense.com/v3/__https:/www.oxygenxml.com/mailman/listinfo/oxygen-user__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPv87ymuCw$>


___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-08 Thread Eliot Kimber
I may have a ready solution in that we have a add-on that serves to set options 
and that add-on is of course run on start up. Rather than having the code 
templates baked into the add-on’s options.xml I think it should be possible to 
import code templates from another location—I’ll dig into the API docs but if 
somebody has the necessary invocation at hand that would be helpful.

Thanks,

Eliot

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> | 
Twitter<https://twitter.com/servicenow> | 
YouTube<https://www.youtube.com/user/servicenowinc> | 
Facebook<https://www.facebook.com/servicenow>

From: oXygen-user  on behalf of Oxygen XML 
Editor Support (Radu Coravu) 
Date: Tuesday, December 7, 2021 at 11:32 PM
To: oxygen-user@oxygenxml.com 
Subject: Re: [oXygen-user] Possible to Put Code Templates in a Framework?
[External Email]


Hi Eliot,

For now you cannot save code templates at framework level. We have an internal 
issue registered for this and I added your contact details to it, adding the 
issue ID below for future reference:

EXM-36264 Code templates at framework level

In the meantime maybe you can create custom Author actions but they will work 
only in the Author visual editing mode.

Or maybe you can store the code templates at project level and have a 
project.xpr saved in the Git project that everybody needs to open in Oxygen 
before editing.

Regards,

Radu

Radu Coravu

Oxygen XML Editor
On 12/8/21 00:38, Eliot Kimber wrote:
We maintain a set of code templates that currently get bake into options.xml 
that is then distributed via an add-on that sets global options (and nothing 
else).

We maintain our frameworks in git and all authors clone that repo and pull 
regularly to keep it up to date, making deployment and update easier for 
writers (avoids having to update add-ons and then restart Oxygen).

Reviewing the docs I see that code templates are stored in either the global 
options or in project options but I didn’t see anything about putting them in 
frameworks.

Is there a way to have code templates in frameworks so that we can deploy new 
ones without having to update our add-on?

Thanks,

E.

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://urldefense.com/v3/__https:/www.linkedin.com/company/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPvkQonkug$>
 | 
Twitter<https://urldefense.com/v3/__https:/twitter.com/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPtaz6Gvxg$>
 | 
YouTube<https://urldefense.com/v3/__https:/www.youtube.com/user/servicenowinc__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPvTtDoB5A$>
 | 
Facebook<https://urldefense.com/v3/__https:/www.facebook.com/servicenow__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPs8BMYr3Q$>



___

oXygen-user mailing list

oXygen-user@oxygenxml.com<mailto:oXygen-user@oxygenxml.com>

https://www.oxygenxml.com/mailman/listinfo/oxygen-user<https://urldefense.com/v3/__https:/www.oxygenxml.com/mailman/listinfo/oxygen-user__;!!N4vogdjhuJM!TwGoo-UgX_UOAI6BVcwwLYM9_MsaRyuT6Qx1ohw4LJLspJ8XuQM4EvFhB2SQwPv87ymuCw$>


___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-07 Thread Oxygen XML Editor Support (Radu Coravu)

Hi Danny,

With the framework extension script (which is our new way of extending a 
framework configuration) you can refer to an XML file containing 
serialized Author actions, but not code templates.


https://www.oxygenxml.com/doc/versions/23.1/ug-editor/topics/framework-customization-script-usecases.html#framework-customization-script-usecases__section_qzt_5ry_jnb

Author actions can only be used in the Author visual editing mode while 
code templates are defined only globally or at project level and can be 
used also in the Text editing mode.


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 12/8/21 07:09, dvint wrote:
Yes you can. I built a framework script to mange this. Oxygen support 
help me set this up, but I believe they exported the templates and 
that created an xml that was referenced by the framework script.


I can get you samples in the morning if they don't respond tonight.



Sent from my Verizon, Samsung Galaxy smartphone


 Original message 
From: Eliot Kimber 
Date: 12/7/21 8:56 PM (GMT-08:00)
To: oxygen-user@oxygenxml.com
Subject: [oXygen-user] Possible to Put Code Templates in a Framework?

We maintain a set of code templates that currently get bake into 
options.xml that is then distributed via an add-on that sets global 
options (and nothing else).


We maintain our frameworks in git and all authors clone that repo and 
pull regularly to keep it up to date, making deployment and update 
easier for writers (avoids having to update add-ons and then restart 
Oxygen).


Reviewing the docs I see that code templates are stored in either the 
global options or in project options but I didn’t see anything about 
putting them in frameworks.


Is there a way to have code templates in frameworks so that we can 
deploy new ones without having to update our add-on?


Thanks,

E.

_

*Eliot Kimber*

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com <https://www.servicenow.com>

LinkedIn <https://www.linkedin.com/company/servicenow> | Twitter 
<https://twitter.com/servicenow> | YouTube 
<https://www.youtube.com/user/servicenowinc> | Facebook 
<https://www.facebook.com/servicenow>



___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-07 Thread Oxygen XML Editor Support (Radu Coravu)

Hi Eliot,

For now you cannot save code templates at framework level. We have an 
internal issue registered for this and I added your contact details to 
it, adding the issue ID below for future reference:


    EXM-36264 Code templates at framework level

In the meantime maybe you can create custom Author actions but they will 
work only in the Author visual editing mode.


Or maybe you can store the code templates at project level and have a 
project.xpr saved in the Git project that everybody needs to open in 
Oxygen before editing.


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 12/8/21 00:38, Eliot Kimber wrote:


We maintain a set of code templates that currently get bake into 
options.xml that is then distributed via an add-on that sets global 
options (and nothing else).


We maintain our frameworks in git and all authors clone that repo and 
pull regularly to keep it up to date, making deployment and update 
easier for writers (avoids having to update add-ons and then restart 
Oxygen).


Reviewing the docs I see that code templates are stored in either the 
global options or in project options but I didn’t see anything about 
putting them in frameworks.


Is there a way to have code templates in frameworks so that we can 
deploy new ones without having to update our add-on?


Thanks,

E.

_

*Eliot Kimber*

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com 

LinkedIn  | Twitter 
 | YouTube 
 | Facebook 




___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-07 Thread dvint
Yes you can. I built a framework script to mange this. Oxygen support help me 
set this up, but I believe they exported the templates and that created an xml 
that was referenced by the framework script. I can get you samples in the 
morning if they don't respond tonight.Sent from my Verizon, Samsung Galaxy 
smartphone
 Original message From: Eliot Kimber 
 Date: 12/7/21  8:56 PM  (GMT-08:00) To: 
oxygen-user@oxygenxml.com Subject: [oXygen-user] Possible to Put Code Templates 
in a Framework? 

We maintain a set of code templates that currently get bake into options.xml 
that is then distributed via an add-on that sets global options (and nothing 
else).
 
We maintain our frameworks in git and all authors clone that repo and pull 
regularly to keep it up to date, making deployment and update easier for 
writers (avoids having to update add-ons and then restart Oxygen).
 
Reviewing the docs I see that code templates are stored in either the global 
options or in project options but I didn’t see anything about putting them in 
frameworks.
 
Is there a way to have code templates in frameworks so that we can deploy new 
ones without having to update our add-on?
 
Thanks,
 
E.
 


_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com


LinkedIn | Twitter | YouTube | Facebook



___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


[oXygen-user] Possible to Put Code Templates in a Framework?

2021-12-07 Thread Eliot Kimber
We maintain a set of code templates that currently get bake into options.xml 
that is then distributed via an add-on that sets global options (and nothing 
else).

We maintain our frameworks in git and all authors clone that repo and pull 
regularly to keep it up to date, making deployment and update easier for 
writers (avoids having to update add-ons and then restart Oxygen).

Reviewing the docs I see that code templates are stored in either the global 
options or in project options but I didn’t see anything about putting them in 
frameworks.

Is there a way to have code templates in frameworks so that we can deploy new 
ones without having to update our add-on?

Thanks,

E.

_
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com
LinkedIn | 
Twitter | 
YouTube | 
Facebook
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user