Do a contextual InputURLChooser actions list
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Do a contextual InputURLChooser actions list
Post by sebastienlavandier »
Hi,
I develop a CMS Oxygen Plugin to work with Dita documents.
I added some actions in existing browse actions list.
But in some case, I don't want to show all action list.
For example, on Dita maps manager open action, I just want to show one of them (browseGuideAction).
Or, when I when to add a topic reference, I just want to show an other (browseFunctionAction).
This list is used everywhere in browse action, but I hope I can customize it.
How I can do that ?
Thanks in advance for your help
Sébastien.L
I develop a CMS Oxygen Plugin to work with Dita documents.
I added some actions in existing browse actions list.
Code: Select all
public class CustomInputURLChooser implements InputURLChooserCustomizer {
@Override
public void customizeBrowseActions(List<Action> existingBrowseActions, InputURLChooser chooser) {
// Add the browse CMS functions action on the first position.
final BrowseFunctionAction browseFunctionAction = new BrowseFunctionAction(chooser);
existingBrowseActions.add(0, browseFunctionAction);
// Add the browse CMS guides action on the second position.
final BrowseGuideAction browseGuideAction = new BrowseGuideAction(chooser);
existingBrowseActions.add(1, browseGuideAction);
// Add the browse CMS images action on the third position.
final BrowseImageAction browseImageAction = new BrowseImageAction(chooser);
existingBrowseActions.add(2, browseImageAction);
}
}
For example, on Dita maps manager open action, I just want to show one of them (browseGuideAction).
Or, when I when to add a topic reference, I just want to show an other (browseFunctionAction).
This list is used everywhere in browse action, but I hope I can customize it.
How I can do that ?
Thanks in advance for your help
Sébastien.L
Re: Do a contextual InputURLChooser actions list
Hi Sébastien,
The InputURLChooser object you receive has a method getContextDescription() which should return some platform-indepentent description of the context in which you provide the action. You should try to do a system.err.println with this information in both contexts, see what it returns, maybe it's enough to differentiate between contexts.
Regards,
Radu
The InputURLChooser object you receive has a method getContextDescription() which should return some platform-indepentent description of the context in which you provide the action. You should try to do a system.err.println with this information in both contexts, see what it returns, maybe it's enough to differentiate between contexts.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: Do a contextual InputURLChooser actions list
Post by sebastienlavandier »
Hi Radu,
Thank you for your answer.
But this mehod (getContextDescription()) is only set for "DITA_Maps_Manager/Open".
The others are null.
So, this solves only one of my problems...
Do you have an other idea ?
Thanks in advance for your help.
Sébastien.L
Thank you for your answer.
But this mehod (getContextDescription()) is only set for "DITA_Maps_Manager/Open".
The others are null.
So, this solves only one of my problems...
Do you have an other idea ?
Thanks in advance for your help.
Sébastien.L
Re: Do a contextual InputURLChooser actions list
Hi Sébastien,
Could you tell me all the places, dialogs from which you want a non-null context to be returned on the "getContextDescription()" method?
I could try to possibly fix this in time for Oxygen 18.0 (in a couple of months).
I don't have another idea other than maybe trying to find the active visible window/dialog using Swing mechanisms and obtaining its title but this would be ugly.
Regards,
Radu
Could you tell me all the places, dialogs from which you want a non-null context to be returned on the "getContextDescription()" method?
I could try to possibly fix this in time for Oxygen 18.0 (in a couple of months).
I don't have another idea other than maybe trying to find the active visible window/dialog using Swing mechanisms and obtaining its title but this would be ugly.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service