I have followed the instructions in the manual at https://start.codenameone.com/ to create a project. I found the following paragraph as important:
"Before opening the project in NetBeans, you need to copy the contents of the tools/netbeans directory into the root project directory. These files are required by NetBeans to build, run, and debug the project correctly. "
But I can't find this folder in netbeans version 12.6
Newer versions of start.codenameone.com generate a netbeans version of the project by default if you pick it from the combobox on the side. So this step isn't needed.
Notice that this refers to the zip you downloaded from the site and expanded. The file listing you show seems to be from the netbeans installation directory.
On the welcome screen of DataSpell I chose to open a project with Get from Version Control to get a project from GitHub, although in the left pane I didn't choose GitHub, so it created an empty .git repository.
After that, I git cloned elsewhere the git repository or tried to clone it correctly from GitHub but in every occasion I get
Error
Cannot attach project Module name 'project name' already exists.
Trying to load module: /path/to/project name.iml
Where does DataSpell save the imported projects, to detach the empty project that I imported initially?
File --> Invalidate caches... --> INVALIDATE AND RESTART worked for me (with no options selected for the final step).
I managed to open the project following the instructions of Open your project from disk section of the DataSpell site.
For avoiding further trouble, I opened the project in a new window. After the configuration in step 2 Reopen projects on startup --> Ask, Dataspell will ask how to open the project.
This has been happening to me more frequently in DataSpell 2022.3 on my M1 Apple machines. To solve the issue, I did the following:
Settings > Project: [Project Name] > Project Structure.
Click + Add Content Root and select the root folder of your project.
Press Apply or OK
You should now see your project folder in the Files section of the Workspace.
In Eclipse, if you want to reorganize your filesystem, you cannot just move your Eclipse project's files on the filesystem. Instead you right-click your project in Package Explorer -> Refactor -> Move, and select the new path (which I learned from this answer).
However upon attempting this move with the Minecraft Forge Eclipse workspace project, I get a "Move Problems" error dialogue with the error message
Could not move /MDKExample
Could not move C:\Users\user\forge-1.8.11.14-mdk
Could not read from source when writing file C:\Users\user\forge-1.8.11.14-mdk\eclipse\.metadata\.lock
The process cannot access the file because another process has locked a portion of the file
After clicking through the dialogue, the source and destination of the moves are both left in an unusable state due to the half-completed move of files. Downloading fresh copy and rebuilding the Eclipse workspace with gradlew setupDecompWorkspace && gradlew eclipse (instructions), the move fails every time. What is the secret to moving a project in Eclipse?
It's a Java project, and I'm using Eclipse Mars.1 (4.5.1) on Windows 10 with Java 8. Creating a blank Java project and adding a few files, Refactor -> Move works fine, so is this problem something particular to this Eclipse Java project?
I create a web based project with eclipse and the application server is Tomcat and everything is OK, but I have a few files in specific folder that I should change the content of these files with another development environment that it's created by myself, after I change the file's the eclipse doesn't refresh the file and therefore I must go to eclipse, select the folder, press f5 to refresh it.
My Question is that, How can I refresh that specific folder without doing these steps, for example does eclipse have specific API for refresh the folder?
You can use IResource.refreshLocal to refresh a folder (or file).
One way to use this:
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IContainer folder = root.getgetContainerForLocation(new Path("folder path"));
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
This must be run in an Eclipse plugin.
Update:
You can tell Eclipse to refresh automatically in Preferences > General > Workspace by checking the 'Refresh using native hooks or polling' option.
There is no way to force a refresh from a program external to Eclipse.
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.