The default File Open location from oxygen editor
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
The default File Open location from oxygen editor
Post by vishwavaranasi »
Hello Team , when we do the File -> Open from oxygen , we wanted to open our local storage location by default , how to achieve this using plugin API?
image.png
You do not have the required permissions to view the files attached to this post.
Thanks,
vishwa
vishwa
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: The default File Open location from oxygen editor
Hi,
Assuming you have a Workspace Access plugin type, on the "applicationStarted" callback you can customize the top level menu:
You can try to add your own Swing action to the File menu which shows a swing JFileChooser and after the user chooses a file you use our pluginWorkspaceAccess.open(url) API to open the file in Oxygen.
Regards,
Radu
Assuming you have a Workspace Access plugin type, on the "applicationStarted" callback you can customize the top level menu:
Code: Select all
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
pluginWorkspaceAccess.addMenuBarCustomizer(new MenuBarCustomizer() {
@Override
public void customizeMainMenu(JMenuBar mainMenu) {
//Maybe remove the File->Open action here and replace it with your own
}
});
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
Re: The default File Open location from oxygen editor
Post by vishwavaranasi »
Thanks Radu , may be my question was wrong.
we are not customizing the File -> Open
but whenever we want to do the File -> Open , the open should show by default our own defined local windows path , is that possible?
we are not customizing the File -> Open
but whenever we want to do the File -> Open , the open should show by default our own defined local windows path , is that possible?
Thanks,
vishwa
vishwa
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
Re: The default File Open location from oxygen editor
Post by vishwavaranasi »
here is the case
as soon i open my Oxygen Editor , which is completely blank
now when i do File -> Open , the should open my default location
as soon i open my Oxygen Editor , which is completely blank
image.png
and my previous day working files are saved some default location on my windows machinenow when i do File -> Open , the should open my default location
You do not have the required permissions to view the files attached to this post.
Thanks,
vishwa
vishwa
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: The default File Open location from oxygen editor
Hi,
Just to see if I understand, you start Oxygen, use File->"Open" which shows the file chooser. And you want the file chooser to be set to a certain folder which you control, right?
I'm afraid we do not have official API for this.
When your plugin's "applicationStarted" callback is received you could try to do this:
If that does not work, you could try to create your own "Custom File Open" action, add it to the toolbar or to the main menu, show a Swing JFileChooser and precisely control the operation in your code.
Regards,
Radu
Just to see if I understand, you start Oxygen, use File->"Open" which shows the file chooser. And you want the file chooser to be set to a certain folder which you control, right?
I'm afraid we do not have official API for this.
When your plugin's "applicationStarted" callback is received you could try to do this:
Code: Select all
ro.sync.ui.FileChooserSingleton.getFileChooserInstance().setCurrentDirectory(new File("/..."))
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