Delete a project

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Fran Pena
Posts: 6
Joined: Fri Dec 16, 2011 2:04 pm

Delete a project

Post by Fran Pena »

Hi,

is it possible to delete a project from the Project View?

Thank you in advance,
Fran
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Delete a project

Post by adrian »

Hello,

No, that's not possible. Oxygen needs a project to be opened in the Project view, so you cannot close or delete the project that is in use.

Note that the Oxygen project is actually just a file(.xpr), so you can simply delete that .xpr file from the file system.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
jzimmerman
Posts: 1
Joined: Thu Feb 09, 2012 12:35 am

Re: Delete a project

Post by jzimmerman »

I deleted the file in my documents folder, but it still appears in the project left-bar with an error icon. Is there any way to remove it from the project listing on the left?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Delete a project

Post by adrian »

@jzimmerman:
If the file you are referring to is linked in a project in Oxygen, you will also have to remove it from the project. Right click(Ctrl+Click on the Mac) on the file from the Project view and from the popup menu choose Remove from Project(Delete).
If I misunderstood, please provide a screenshot with the situation you have encountered. You can send the screenshot to support @ oxygenxml . com

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
WaiverWireAddict
Posts: 2
Joined: Thu May 26, 2022 4:23 pm

Re: Delete a project

Post by WaiverWireAddict »

I am posting this in case anyone else does arrives at this post from google search.

When you create a new project - it does not save the project file. There will be a red exclamation mark icon on the project file name in the project viewer, but this will go away when you save the project.

I found this confusing as when I created a new project, I was presented with a dialog, and chose a folder and filename -- but after the dialog closes, the project is not yet saved, and you see the red exclamation mark. It is made more confusing because the file appears to be outside the project scope, and so appears to not be related to your project and so I also wanted to delete this file, and right clicked only to find no such option.

In my case, I had created a project, saved it, only to discover that a project was not contained within its own folder, its just a single .xpr file. So I deleted my first project, and created a folder, and then created a new project this time selecting my new folder. So I believed that the "error" indicator was that Oxygen was still trying to refer to the ".xpr" file that I had deleted which had existed one level up in the folder hierarchy-which was consistent with Oxygen showing the project file outside of the folder that I had chosen.

When I finally saved the file, and the "error" went away, I discovered that it appears that the project file itself should not be in the same folder as other files that may be in the project, as if it is, when one tries "Validate All Files in Project" one gets an error from Oxygen saying in effect that it doesn't know how to validate an ".xpr" file.

I wanted to have my project (.xpr) file and all the files it was working with contained in one folder, so I could treat that folder as a unit. I think this is a desirable project structure. So I expected Oxygen to exclude its own project file from its "Validate All" execution to support this style of project organization. I won't debate project organization styles here, but I am documenting what my expectation was, and my resulting confusion.

Anyway, I hope this saves someone the frustration I experienced trying to delete the "error" project file like the OP.
WaiverWireAddict
Posts: 2
Joined: Thu May 26, 2022 4:23 pm

Re: Delete a project

Post by WaiverWireAddict »

I am posting this in case anyone else does arrives at this post from google search.

When you create a new project - it does not save the project file. There will be a red exclamation mark icon on the project file name in the project viewer, but this will go away when you save the project.

I found this confusing as when I created a new project, I was presented with a dialog, and chose a folder and filename -- but after the dialog closes, the project is not yet saved, and you see the red exclamation mark. It is made more confusing because the file appears to be outside the project scope, and so appears to not be related to your project and so I also wanted to delete this file, and right clicked only to find no such option.

In my case, I had created a project, saved it, only to discover that a project was not contained within its own folder, its just a single .xpr file. So I deleted my first project, and created a folder, and then created a new project this time selecting my new folder. So I believed that the "error" indicator was that Oxygen was still trying to refer to the ".xpr" file that I had deleted which had existed one level up in the folder hierarchy-which was consistent with Oxygen showing the project file outside of the folder that I had chosen.

When I finally saved the file, and the "error" went away, I discovered that it appears that the project file itself should not be in the same folder as other files that may be in the project, as if it is, when one tries "Validate All Files in Project" one gets an error from Oxygen saying in effect that it doesn't know how to validate an ".xpr" file.

I wanted to have my project (.xpr) file and all the files it was working with contained in one folder, so I could treat that folder as a unit. I think this is a desirable project structure. So I expected Oxygen to exclude its own project file from its "Validate All" execution to support this style of project organization. I won't debate project organization styles here, but I am documenting what my expectation was, and my resulting confusion.

Anyway, I hope this saves someone the frustration I experienced trying to delete the "error" project file like the OP.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Delete a project

Post by chrispitude »

Hi WaiverWireAddict,

I've had this happen to me too, but only intermittently.

Usually, when I create a new project and choose the destination .xpr location, the file is created immediately and there's no red indicator. But occasionally, I get the red indicator and the file is not created until I save it. (And I remember being confused that it brought up another dialog asking me where to save it, which was strange since I chose the desired destination .xpr location with the previous dialog.)

I don't know why this difference behavior sometimes happens.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Delete a project

Post by adrian »

Hello,

What version of Oxygen are you using?
WaiverWireAddict wrote: Thu May 26, 2022 5:04 pmWhen you create a new project - it does not save the project file. There will be a red exclamation mark icon on the project file name in the project viewer, but this will go away when you save the project.
Actually that's a red flag that something isn't right. The project file is saved immediately when you create it and automatically after changes are made to the project, its options or transformation scenarios at project level.
However, if you have the red exclamation mark icon, that indicates the file is missing. So the question is where did you save the project file? Is it maybe on a slow remote network share/drive, perhaps across a VPN? Or did you delete the project file or moved it to another location from outside of Oxygen?

Deleting the project file from within Oxygen is not an option as Oxygen is project dependent.
When I finally saved the file, and the "error" went away, I discovered that it appears that the project file itself should not be in the same folder as other files that may be in the project, as if it is, when one tries "Validate All Files in Project" one gets an error from Oxygen saying in effect that it doesn't know how to validate an ".xpr" file.
If you try to validate an .xpr file from the Project view the answer will be something like this:
warning: Cannot check myProject.xpr. Unknown extension.
That's of no consequence. You can filter .xpr files (or the root project file itself) from the project, if you don't need them. menu > Project > Filters. Add the name of your .xpr file to the field "Matching files will be hidden".
I wanted to have my project (.xpr) file and all the files it was working with contained in one folder, so I could treat that folder as a unit. I think this is a desirable project structure. So I expected Oxygen to exclude its own project file from its "Validate All" execution to support this style of project organization. I won't debate project organization styles here, but I am documenting what my expectation was, and my resulting confusion.
Actually Oxygen's projects were designed to link files first and folders second.
So the idea is that you have a folder with a project with many files, but only link in your Oxygen project file (.xpr) the files and inner folders that are relevant to the XML aspect of your project. Linking the folder that holds the project file itself is a possibility, but Oxygen does not hide it for you.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Delete a project

Post by chrispitude »

Coincidentally enough, this happened to me yesterday!

I attempted to create a new .xpr file in a new testcase directory. The first two times, I got the "unsaved" red error marker. The third time, Oxygen created the file as expected.

I do use Windows Subsystem for Linux (WSL) in Windows 10, and I often have a linux terminal window open as I switch between Windows and linux to do work. Maybe there was some sort of transient filesystem lock issue. Next time this happens, I will do more experiments to see if I can create same-named files in Windows (outside of Oxygen) or if that is blocked too.
Last edited by chrispitude on Fri May 27, 2022 7:44 pm, edited 1 time in total.
Post Reply