STM32CubeIDE deleted all my projects inside workspace - stm32cubeide

Info:
STM32CubeIDE 1.4.0
OS: Windows
Description:
I have chosen working directory/workspace. E.g., C:\course_1\cubdeide_ws
STM32CubeIDE was closed
I have then renamed my course folder. E.g., C:\course_2\cubdeide_ws
I then opened STM32CubeIDE to do project (STM32-Projects)
I had encountered the following problem:
All projects inside folder/workspace C:\course_2\cubdeide_ws (renamed one) was deleted
I should only have C:\course_2\cubdeide_ws directory in my PC, but I also had C:\course_1\cubdeide_ws
In folder C:\course_2, I had my files from before, but there are no any projects inside C:\course_2\cubdeide_ws folder
In folder C:\course_1 I have a folder with path C:\course_1\cubdeide_ws, but even there, there is none of my projects
Problems:
All my STM32-Projects are gone/deleted (it's not even in Recycle Bin)
Why is STM32CubeIDE creating new folder (same as chosen workspace before)? Before renaming any folder in my PC, do I have to check whether the path is included as workspace by STM32CubeIDE?
I just renamed my folder.Why do STM32CubeIDE deletes projects and also created new folder as per the workspace selected before?

Related

How to undo an Eclipse workspace

Is it possible to undo an Eclipse workspace without deleting the whole directory? By this I mean to keep the projects in the same directory but the directory should no longer be a workspace.
There is no Eclipse option to do this but you can do a reasonable job by deleting various directories and files in the workspace:
The .metadata directory holds most of the Eclipse data. Deleting this will stop Eclipse recognising the workspace.
In each project deleting the .project file will stop Eclipse recognising the project as a project.
You could also delete the .classpath file and any .settings directory in each project. Some types of project may have additional files that can be deleted.
If you want to keep the projects as eclipse projects then just deleting the .metadata folder is enough (for some eclipse packages, one or more of the projects may also be eclipse generated and could be deleted, so any projects not recognized can be deleted). Now, eclipse needs to run with a workspace so when you start eclipse with a fresh workspace, you can import the projects from the old workspace folder but don't select the import option which gets the projects copied into the new workspace.
In this way, your new workspace will just have metadata for the workspace but the projects themselves will stay in the first directory.
(Strictly speaking, you don't need to delete anything from the old workspace directory. Instead, simply don't select it as a workspace when starting eclipse. However, deleting the .metadata folder would get rid of unnecessary data.)
Note that if you delete the .metadata folder and then later want to use the directory again, as an eclipse workspace, you can just select it when starting eclipse. However, in this case, the projects will not be automatically recognized as being in the workspace (even though they are in the directory), since that information was in the .metadata folder. To get them recognized again, as projects, you will need to import them, though you won't need to set the copy option in the import wizard.

RTC not saving workspace

So I connected to my workspace and loaded my source code in RTC. I then Imported my local workspace (the source code that I downloaded through RTC) into IntelliJ. I was having issues with IntelliJ loading duplicate modules.
I deleted my .idea folder and my .iml files. I also deleted me .jazz5 folder.
Since I deleted the .jazz5 folder is that why my workspace was not loaded the next time I opened RTC?
I am using Eclipse with the RTC plugin not RTC.
Since I deleted the .jazz5 folder is that why my workspace was not loaded the next time I opened RTC?
Yes: you need to "Load" again your repo workspace in that same path, in order for RTC to recreate the .jazz5 folder: it designate the local workspace or sandbox.

Can I use the same workspace for eclipse-java and eclipse-cpp?

I downloaded eclipse-jee-juno-SR1-win32-x86_64 and created the workspace folder in mu user directory. Seems to work fine.
Then I downloaded eclipse-cpp-juno-SR2-win32-x86_64, but I cannot find an acceptable folder for the workspace.
How can I keep eclipse for java and for c++ in the same user directory?

Eclipse does not show projects in workspace

I have opened Eclipse workspace that I transfered from another computer but it does not show any projects in package explorer (there should be a lot of them). Still project's folders are in workspace folder.
The new machine where I transfered the workspace runs Windows 7 that has the read-only folders issue (more here). That is all the folders that are created on that OS are read-only and that the read-only atribute cannot be removed in any way.
Eclipse originally refused to open the workspace at all saying that .metadata folder of the workspace is read only. After turning user control to the lowest level it opens the workspace but it acts as if it did not contain any projects. I think this is because Eclipse refuses to work with read-only folders and project folders are also read-only.
Did somebody have same problem? How did you solve it? Any suggestions are wellcome.
It is not enough to move your projects in the workspace path folder, you also need to import them. And because of they are in your path folder, you can't import them again because it will say you still have them in your workspace. Move them to another folder (for example in desktop), be sure your workspace folder is empty, and then try to import them from your temporary folder in desktop.

"Sources directory is already netbeans project" error when opening a project from existing sources

I've installed NetBeans 6.9.1 and installed few updates for it.
Then I've created a new project from existing sources. After a few changes I've closed it. And now I am having an error, when trying to open a new project from existing sources (the same files):
Sources directory is already netbeans project (maybe only in memory).
After Googling it, I noticed it happened not only with me. But I didn't find the correct solution. I've tried to restart the IDE, I've tried to restart the PC, I've tried to reinstall NetBeans. Nothing helped.
Thank you!
I was having the same problem:
Sources directory is already NetBeans project (maybe only in memory).
Netbeans creates a folder in your project named "nbproject". Once you delete that, restart the IDE and you're good to go.
When you create a NetBeans project from existing sources, NetBeans uses the same directory to add its own files: a netbeans folder with .proj files.
Solution: delete the netbeans folder and restart the IDE. Opening a new project should now work.
Go to the folder containing your project
Delete the folder named nbproject
Restart Netbeans
Try creating your project again from the original folder
This means the project folder is already a netbeans project. So instead of adding it as a new project open it as
This happens(i believe) because netbeans tries to version control the files created or edited.
Under the project folder netbeans create a netbeans directory just delete it . This has been tested in Ubuntu. Then you can import your project if php then php using existing sources.
Click File >> Recent Projects > and you should be able to use edit it again. Hope it helps :)
On Windows at least none of these answers work (for me anyway!). I have found the only way is to copy an existing netbeans project folder in to your new project and manually edit the xml project name.
I also opened the private/private.xml and removed the open files xml just incase these caused problems.
Once I'd done this the project works as normal.
I checked the "Put NetBeans metadata in separate directory" tick and it works fine.
This is in 2. Name and Location after you choose PHP from existing source
In my case my project root directory consists ".project". This contain the XML reference of the project name.
By removing this, i am able to create a project.
Usually this happened when we copy source code of a already created project and copied in different folder and try to create a project from it. as netBeans create its folder nbproject in our project folder this folder also get copied with our source code and it give error "Sources directory is already NetBeans project (maybe only in memory)" remove this folder from you newly copied folder and voila you can create a new project.
If this is your own source code and you already have a Netbeans project folder with your source files you should just start with:
File | Open Project...
not
File | New Project ...
because the project is not new.
If it helps anyone else, I had the same problem and the solution was to reinstall NetBeans.
I had tried all sorts of fixes: Deleting the NetBeansProjects folders, checking/unchecking "Put Netbeans metadata in a separate directory", killing/restarting NetBeans, restarting the system, etc. Nothing cleared the message...except the reinstall.
The advice here about removing the nbproject directory is not quite the whole story.
What Netbeans seems to do (and we are guessing at reverse engineering here) is to look for an xml file which has opening and closing project tags in it. This it concludes is evidence of an already existing project. Now if your files have an nbproject directory there, that will contain a project.xml file which contains the said tags. So removing that will do what you want.
But, my files don't have a nbproject directory but still NetBeans tells me there is an existing project maybe in memory. The reason is: my files include a file called pom.xml and that contains the said project tags in the xml (it was created by an entirely different system). Once that xml file is removed, then NetBeans will create an html project for me importing my code.
In sum: look through any xml files in you existing code, and be wary of project tags.
This happened to me when I tried to import an Eclipse project in a brand new NetBeans 7.2.1 install on Ubuntu 12.04LTS.
I mistakenly selected the import projects from workspace (the first option in the import wizard's opening pane) on the first attempt, and it opened the project in the original Eclipse workspace path (which was on a usb stick).
From this, I then realized that I actually need the second option - import project ignoring project dependencies, which lets you specifically choose source and destination folders. After closing the project, I tried to import again with the proper option, but it didn't work.
From then on nothing I did helped - restart the IDE, move the source folder, nothing. There was no nbproject folder in the project or /var/cache in the user folder to delete (in-fact there was no nbproject folder in the whole file-system).
Since restart didn't work, I'm guessing that there is a garbage project entry somewhere which Nb reads (See Martin Frické answer above).
After googling along the lines of 'netbeans clear memory project cache' with no success, I opted to reinstall NetBeans -
sudo /usr/local/netbeans-7.2.1/uninstall
sudo ./netbeans-7.2.1-ml-javase-linux.sh
which solved it.
If you are on a Mac, press command shift G and in the box type /users and then go, next click on your user name and navigate to netbeansprojects and open it. Then delete the ones in there that are causing problems. You can then create your project.
Note: I had moved my wordpress folder to my desktop trying to figure this out, so I dropped it back into the origional location and it works fine. So if you did this, just replace the wordpress folder after deleting the problem projects from the netbeansprojects folder and its contents back to the original installation folder.
Hope this helps...:)
This is what I did to solve this error:
1) I copied a folder named "folder1" (and I called the new folder "folder2"). "folder1" was a Netbeans project so it had a folder called "nbproject" inside it.
2) When I tried to create a project out of the "folder2", Netbeans threw an error "Sources directory is already netbeans project (maybe only in memory)."
3) Inside Netbeans delete the project of "folder1". Then, delete the two folders named "nbproject" (one is inside "folder1" and the other is inside "folder2").
4) Inside Netbeans, create two new projects: one for "folder1" and another for "folder2". The error should not appear anymore.
copy an existing netbeans project folder in to your new project and manually edit the xml project name.
reinstall netbeans
copy/move all files/folders (except nbproject/ folder) to a new folder for your project, with a new name.
Try to create a new empty project; then you can copy the public_html to the new project folder and it will appear .
I faced the same issue:
Sources directory is already NetBeans project (maybe only in memory).
The solution is:
Netbeans creates a folder in your project named "nbproject". Once you
delete that, restart the IDE and you're good to go.