Page 1 of 1

Open a folder, not just a file, in oXygen - without the "overhead" of an .xpr file

Posted: Mon Nov 27, 2017 6:18 pm
by joewiz
I love oXygen's Project pane. Among its various wonderful abilities, the Project pane gives me ready access to all of the files in a directory. I often find myself wanting to open a folder in the Project pane, even one that doesn't have an .xpr file. For example, when I clone a GitHub repository and want to start exploring the folder, I want to do this from within oXygen - the power tool I reach to first for any text editing task. But opening a folder in oXygen's Project pane is cumbersome: I have to create a new .xpr file and choose a location to save it, just to be able to get the folder into the Project pane. What I would like is a way to be able to open a folder in oXygen without the "overhead" of needing to create a new .xpr file.

Some other uses come to mind: GitHub Desktop can be configured to use an external editor, but only editors that support a command line argument for opening a folder are supported. These currently include Atom, Visual Studio Code, and Sublime Text. See the requirements for external editors: https://github.com/desktop/desktop/blob ... gration.md. We use GitHub Desktop in my office, because it is easy for beginners, solid, and free. Being able to configure oXygen as an external editor for GitHub Desktop would add value to oXygen for us.

One final note: I already have a command line alias for opening a file in oXygen in my ~/.bash_profile (on macOS):

Code: Select all

alias oxygen='open -a "Oxygen XML Editor"'
. This allows me to open a file in oXygen via

Code: Select all

oxygen README.md
. If this feature were added, I would love to have a similar command (or perhaps an identical one) for opening a folder in oXygen:

Code: Select all

oxygen repo/src/
.

Thanks for your consideration.

Re: Open a folder, not just a file, in oXygen - without the "overhead" of an .xpr file

Posted: Mon Nov 27, 2017 7:35 pm
by adrian
Hi,

Note that you can't really open a folder, but all the files that are contained in the said folder. Oxygen is project-centric, hence the need to have a project that links to that folder. Either way, you'll still need a project file, even if you ignore it, since Oxygen keeps some settings at project level.
But opening a folder in oXygen's Project pane is cumbersome: I have to create a new .xpr file and choose a location to save it, just to be able to get the folder into the Project pane.
Well, if you create a new project (.xpr) and save it in the folder you want in the Project pane, the new project will automatically link to that project folder. Or you can keep a scratch project (.xpr) file and just link the folder to that project. You don't have to create a project every time.

I've submitted an issue to analyze your feature request on our issue tracking tool. For future reference it is issue EXM-40559.

Regards,
Adrian

Re: Open a folder, not just a file, in oXygen - without the "overhead" of an .xpr file

Posted: Mon Nov 27, 2017 8:25 pm
by joewiz
Hi Adrian,

Thanks for your reply. I definitely understand and appreciate the richness afforded by oXygen's Project-centric system. My request was somewhat open-ended: to find "some way" to achieve the following 2 goals: (1) to allow users to interact with a folder in the same basic way as the Project pane allows, while relieving users of the "overhead" of having to save a new project file to disk in the process, and ideally (2) to empower the user (and external applications like GitHub Desktop) to "open a folder" in oXygen via the command line.

I have, in fact, started using a "scratch project file" (I called mine "dummy.xpr"), and this does relieve me of the burden of creating a new project every time I want to open a folder in oXygen. This does largely take care of #1, which is great, although it does strike me as somewhat inelegant to require that a file be saved to disk for this use. (It didn't occur to me to do this until last week, after using oXygen for nearly 10 years! So it's my failure of imagination, but I suspect I'm not alone.) That said, this technique doesn't address the use cases I described for goal #2: a mechanism to "open a new folder" via the command line (whether the folder is "appended" to an existing project or a new project is created).

To illustrate this idea with a pseudo command, imagine if the "oxygen" command could take a new

Code: Select all

-project
parameter:

Code: Select all

oxygen -project /tmp/scratch.xpr repo/src
This parameter would take the project file and append the file/folder to an existing project, or create a new project if it does not exist. Presumably, the command would also switch the Editor to that project, if it was not already active. In other words, this flag would operate much as right-clicking on the project root and selecting Add Files or Add Folders does currently.

I hope this clarifies the idea. Thanks again!

Joe

Re: Open a folder, not just a file, in oXygen - without the "overhead" of an .xpr file

Posted: Wed Nov 29, 2017 3:02 pm
by adrian
Hi,

Thank you for the clarification. I understand the use case now.
I've changed the issue description and mentioned your comments.
We will notify this thread when it is implemented.

Regards,
Adrian

Re: Open a folder, not just a file, in oXygen - without the "overhead" of an .xpr file

Posted: Fri Dec 01, 2017 8:45 am
by joewiz
Thank you very much, Adrian!