folder naming and ids for frameworks as addons

emylonas
Posts: 10

folder naming and ids for frameworks as addons

Sat Mar 11, 2017 1:24 am

I have a custom framework for authoring - I'm trying to figure out the best practices and also the rules for naming folders and updates for frameworks that I am deploying as addons. If I have a framework called IIP2017 are the following statements true?
  • The name that appears in the Document Type Association list is IIP2017, because that's in the name field in the framework file.
  • The folder that contains all the framework files may also be called IIP2017, but that's not significant
  • The framework ID in the update site file can also be IIP2017, but that also appears to only be significant for identifying newer versions of the same framework in the update site file.
If this is correct, then what are the best approaches to creating updated versions of the framework as an addon?
  • Presumably the zip file should have a new name so it can co-exist with older versions
  • Should the unzipped folder that contains all the framework files continue to be IIP2017? If it is changes, filepaths that don't rely on oxygen variables could potentially break.
Also, other than looking at the "manage addons" dialog box, how can I tell what version of the addon I am using? Is this something that should just be written into the templates?

Many thanks
Radu
Posts: 5094

Re: folder naming and ids for frameworks as addons

Mon Mar 13, 2017 10:00 am

Hello Elli,

Please see some answers below:

The name that appears in the Document Type Association list is IIP2017, because that's in the name field in the framework file.


Right.

The folder that contains all the framework files may also be called IIP2017, but that's not significant


Yes, the folder name and the framework name are independent of each other.

The framework ID in the update site file can also be IIP2017, but that also appears to only be significant for identifying newer versions of the same framework in the update site file.


Once you give Oxygen the path to the add-on descriptor file and install the addon, Oxygen will download the ZIP and unpack it.
If you are using Windows the unpacked framework folder can be found on your hard drive in:

%APPDATA%\com.oxygenxml\extensions\vOxygen.Version\frameworks

In the "frameworks" folder there will be another folder composed from the URL which points to the add-on, and inside that folder you will have your framework folder.

If you install a newer version of Oxygen, when it first runs it checks for previous installed add-ons and it will ask you if you want to use the add-ons also with this newer version, then copy the unpacked add-ons to the appropriate folder.

I think the framework ID matters most if you want to install let's say a framework with an ID and Oxygen already finds a framework with the same ID installed (even if it was installed from another update site).

Presumably the zip file should have a new name so it can co-exist with older versions


You cannot have two add-ons with the same ID installed at the same time in an Oxygen version. It also does not make sense to allow for this.
About a month ago I wrote on the Oxygen XML Blog a quick add-ons getting started tutorial:

http://blog.oxygenxml.com/2017/01/your-first-oxygen-add-on.html

Should the unzipped folder that contains all the framework files continue to be IIP2017? If it is changes, filepaths that don't rely on oxygen variables could potentially break.


Inside the ZIP should be the framework folder. All file paths MUST rely on the ${framework} and ${frameworkDir} editor variables which resolve relative to where the framework folder resides.

If for example by mistake you use the ${frameworks} or ${frameworksDir} editor variables, they will expand to the OXYGEN_INSTALL_DIR\frameworks folder and as the add-on framework folder is not there, nothing will get properly resolved.

Also, other than looking at the "manage addons" dialog box, how can I tell what version of the addon I am using? Is this something that should just be written into the templates?


The Manage add-ons table should have a "Version" column. It's the version you specified in the add-ons XML descriptor.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
emylonas
Posts: 10

Re: folder naming and ids for frameworks as addons

Tue Mar 14, 2017 9:43 pm

HI Radu,

this was extremely helpful, including the blog post.

I will add one important piece of information that I found in the add-ons video - to update a framework and make a version 2, for example -
  • a new extension element is added to the same update site file
  • the id stays the same
  • the zip/jar file has a new name
  • the name, version number and elements should change (and probably also description)

I will go on that information unless you tell me I'm wrong!

Many thanks!

Return to “TEI”

Who is online

Users browsing this forum: No registered users and 0 guests