Page 1 of 1
[project] AuthorAccess functions
Posted: Tue Jun 30, 2009 3:58 pm
by Tanking
Hello,
I have been playing around with the newest release of oXygen (10.3), and was hoping for a couple of functions to handle the project file through user action.
For example: add a file to project, add current file, refresh project view....
Also, the project view now refreshes on user click if the underlying xpr file as been modified, which is great. But re-opening the files opened on last oxygen close and not the currently edited tends to loose our users. An option to not impact the opened document on project refresh would be nice.
Thanks in advance
Re: [project] AuthorAccess functions
Posted: Wed Jul 01, 2009 12:01 pm
by sorin_ristache
Hello,
Tanking wrote:I have been playing around with the newest release of oXygen (10.3), and was hoping for a couple of functions to handle the project file through user action.
For example: add a file to project, add current file, refresh project view....
I am sorry, I don't remember receiving a request for adding these functions to the Author API (the AuthorAccess gateway) or telling other users that we would add them. Am I missing something?
Tanking wrote:Also, the project view now refreshes on user click if the underlying xpr file as been modified, which is great. But re-opening the files opened on last oxygen close and not the currently edited tends to loose our users. An option to not impact the opened document on project refresh would be nice.
The refresh in fact reloads the project which means reads the file from disk and reopen the files that were opened when the project was closed last time. But I agree that it is inconvenient to close the current files. We will consider that as a fix for a future version.
Thank you for pointing it out,
Sorin
Re: [project] AuthorAccess functions
Posted: Thu Jul 02, 2009 5:25 pm
by Tanking
sorin wrote:Hello,
I am sorry, I don't remember receiving a request for adding these functions to the Author API (the AuthorAccess gateway) or telling other users that we would add them. Am I missing something?
Sorry, that sentence did not end up reflecting my thoughts (happens when you are not using your native language I guess). Let me rephrase: " Looking at the new 3.2 version and all it's new function on files (open, refresh), I wish (would find usefull if) we could manipulate the project file through functions of the AuthorAccess."
sorin wrote:The refresh in fact reloads the project which means reads the file from disk and reopen the files that were opened when the project was closed last time. But I agree that it is inconvenient to close the current files. We will consider that as a fix for a future version.
Thank you for pointing it out,
Sorin
Perfect, thanks a lot.
Re: [project] AuthorAccess functions
Posted: Thu Jul 02, 2009 5:42 pm
by sorin_ristache
Tanking wrote:Looking at the new 3.2 version and all it's new function on files (open, refresh), I wish (would find usefull if) we could manipulate the project file through functions of the AuthorAccess.
Can you give more details about how you would like such calls of the Author API? For example the project view is refreshed automatically after it is modified by an external application when the user clicks in the Project view. Do you want to modify the project file from an Author extebsion and refresh the Project view to reflect your changes?
Do you want to add some files to the current project from an Author extension action? I think that would be an unexpected (unusual) effect for an author who edits the document content in Author mode and runs such an Author extension action from a toolbar or a menu.
Regards,
Sorin
Re: [project] AuthorAccess functions
Posted: Thu Jul 02, 2009 8:38 pm
by Tanking
hello Sorin,
To give an idea of the workflow we are implementing, see our users as editing the content of manuals (for example: how to repair a microwave manual) using the author view (the manual files being referenced in a project file). This allows user to have a rich WYSIWYG interface (even richer now that we can emulate javascript like action with the mouselistener, instead of fake links + cheating the linkresolver with a copy of the AutorAccess hidden somewhere)
Now, they want to add a "page" to the current "chapter". We are using for such action an Author Extension function that will:
- generate the new page (from a template with initialization of a couple of attributes)
- Add a XInclude in the chapter page currently edited, linking to the new page.
- Add en entry in the OASIS catalog (used for by the XInclude). We use an OASIS catalog for versioning purposes (be able to change the page without modifying the chapter).
- open the new page in oXygen (10.3 functionality

thanks!)
- Add the new page to the project file/reload the project file to display new page in project view.
So indeed we would like to add/replace/remove file entries from the project file in a author extensions and be able to refresh the projectview / reload the project.
For the moment we are modifying the project file through the Author Extension "as an external program would" and forcing users to click on the project view to reload the project (reopening old pages).
As a side not if may bounce on another problem we have, all this workflow requires non static catalogs or refreshable catalogs through a Author function. Which is no possible in 10.3 since refresh (f5) doesn't reload the catalog (It did in previous versions).
Thanks a lot, and have a nice day!
Re: [project] AuthorAccess functions
Posted: Fri Jul 03, 2009 5:09 pm
by sorin_ristache
Tanking wrote:Now, they want to add a "page" to the current "chapter". We are using for such action an Author Extension function that will:
- generate the new page (from a template with initialization of a couple of attributes)
...
- Add the new page to the project file/reload the project file to display new page in project view.
So indeed we would like to add/replace/remove file entries from the project file in a author extensions and be able to refresh the projectview / reload the project.
Thank you for the details. We will consider adding API calls for project modification in a future version.
Tanking wrote:As a side not if may bounce on another problem we have, all this workflow requires non static catalogs or refreshable catalogs through a Author function. Which is no possible in 10.3 since refresh (f5) doesn't reload the catalog (It did in previous versions).
We will add an Author API call for reloading the XML catalogs. You can get the old behavior with refreshable catalogs by replacing your file lib/oxygen.jar with
this file (for Oxygen XML Author use
this file).
Regards,
Sorin
Re: [project] AuthorAccess functions
Posted: Fri Jul 03, 2009 5:57 pm
by Tanking
Perfect!
Thank you so much for your time and great responses.
Have a nice day!
Re: [project] AuthorAccess functions
Posted: Wed Oct 21, 2009 12:28 pm
by sorin_ristache
Hello,
Tanking wrote:sorin wrote:The refresh in fact reloads the project which means reads the file from disk and reopen the files that were opened when the project was closed last time. But I agree that it is inconvenient to close the current files. We will consider that as a fix for a future version.
Thank you for pointing it out,
Sorin
Perfect, thanks a lot.
We fixed the Project view refresh problem. In the next version of Oxygen the current files will not be closed.
Regards,
Sorin
Re: [project] AuthorAccess functions
Posted: Thu Jan 21, 2010 5:25 pm
by Radu
Hi,
Starting with Oxygen 11.2 there will be a method available in the
AuthorWorkspaceAccess:
Code: Select all
/**
* In a new file appeared as a child of a folder in the project,
* use this method to refresh the parent folder.
* @param url The new resource
*/
void refreshInProject(URL url);
So if you create a new file on disk and it belongs to a folder structure which is already linked in the Oxygen Project (Standalone or Eclipse) this method should refresh the parent folder.
Just call refreshInProject(newFile.toURL()) for this.
Would you consider that this fixes your issue?
Regards,
Radu