Configure editor not to open in existing project context

Oxygen general issues.
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Configure editor not to open in existing project context

Post by Fredrik_Lönn »

When I open a file from the file explorer, using the context menu or double-clicking, I don't want it to be opened in the latest used project context. Is it possible somehow to configure Oxygen XML Editor NOT to open in a project view or to open in a new project?

Best Regards,
Fredrik
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Configure editor not to open in existing project context

Post by adrian »

Hi,
Is it possible somehow to configure Oxygen XML Editor NOT to open in a project view or to open in a new project?
In short, no, currently (as of v20) that's not possible. Oxygen needs a project environment and that's the project you used in the last session. So, if you want it to open the files in another project, you must first change the project.

You can create a new project (menu > Project > New Project), save it somewhere and use that as the "scratch buffer" (dummy) project.
Just switch to that dummy project before you quit the session, or if you already quit, first double click on that dummy project file (.xpr) in File Explorer and then double click on the files.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Re: Configure editor not to open in existing project context

Post by Fredrik_Lönn »

Hi,

Thank you for a prompt response. The delay of my reaction goes to show that this is not the biggest of my issues at this time ;)

I have adopted a similar, but slightly more reactive strategy of trying to remember to create or switch to a dummy project when I open XML Editor. It is a bit of an annoyance when I forget and especially when I start changing project configuration...

Would it not be possible for XML Editor to open in a new empty and unsaved project at start? Kind of like many other editors.

Best Regards,
Fredrik
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Configure editor not to open in existing project context

Post by adrian »

Would it not be possible for XML Editor to open in a new empty and unsaved project at start? Kind of like many other editors.
I've logged a feature request to accommodate this in a future version.
Meanwhile, if you don't want any files to be opened from the previous session (except the project, for which there is no other option), you could go to Options > Preferences, Global (initial page) and clear the box Open last edited files from project. This means when you start Oxygen or switch the project, Oxygen will only open the project, but none of the files from that project session.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Configure editor not to open in existing project context

Post by adrian »

Would it not be possible for XML Editor to open in a new empty and unsaved project at start?
Actually there is a workaround (read "hack") that can be used. You can:
1. Create/save a new dummy project in Oxygen.
2. Quit Oxygen.
3. Delete the project .xpr file from the file system.
4. Start Oxygen. It will try to open the .xpr file, but that is now missing, so it will flag it as such and start with defaults (as if you created a new project).
5. When you eventually quit Oxygen, it will ask if you want to save the project. You can pick No and next time you start Oxygen you will be back at step 4.

You can leave the project in this "limbo mode" (missing) and it will always be a "new project" when you start Oxygen as long as as you don't save it or switch projects. If you open/switch to an existing project, it will remember this last project, so you'll have to go back to step 1 to regain this behavior.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply