Eclipse JavaFX resource folder isn't showing folder/file but instead coming up as folder.file - eclipse

I had a hard time searching for this problem because I can't figure out what search terms to use. I'm using Eclipse for JavaFX and I'm having an issue in this one project where my folders don't look right in package explorer. It's been giving me issues in my code saying it can't find folder/file1 because instead of having a folder that expands to show multiple files, instead I have four folders: folder.file1, folder.file2, folder.file3, etc.
I'm sure that's not very clear (which is why I'm having trouble searching it. So here's a few pictures.
What another project (in the same workspace!) looks like:
^^This is what I want (with subfolders under resources).
What I'm getting instead is:
And here is my folder structure to prove I'm not creating folders named with dots in the middle:
Is there some setting or something I can use to fix this? I had this issue early on with packages under the src folder but I was able to fix that through the build path. I cant figure out how to fix it now that it's not the source path.
Sorry if I'm asking a duplicate question, I just had a really hard time coming up with search terms for my problem.

Related

How can I search for a file in just one specific folder in VSCode when using a workspace with multiple folders?

I'm using the workspace feature of VSCode, with two projects, but it's annoying to search for a file in the front-end project and need to pass by back-end files to find the one I want.
I'm using ctrl + p to search for files.
How can I search for a file in just one folder with multiple projects opened in the workspace?
Yes thats possible: use a relative path: ./mySearchedProjectName in "files to include"-input
from HERE!
UPDATED answer to UPDATED question
The fuzzy file finder (CTRL+P or ⌘+P) somehow supports prefixing the filename with a folder, such as folder/filename to locate a file from a specific folder:
But, in my experience, the search is a bit lacking. For example, I find it usually can only find files this way if that file has been recently opened in your workspace. It also does not support regex.
The best thing that can be done is to enable including recently opened files by adding this to the workspace settings:
"settings": {
"search.quickOpen.includeHistory": true,
AFAIK, there is no other built-in way to filter the results. There are (still) open feature requests for this, like this Allow quick open to filter on folder names by typing folder name after the file. You can thumbs-up them to hopefully get them noticed.
ORIGINAL answer to ORIGINAL question
I don't know what you mean by "projects" since VS Code only has "workspaces" and "folders", such that you add folders to a workspace. I think you're already doing this, where each folder contains a separate set of codes.
With that said, the Search/Find panel has an area to specify files to include, where you can limit your search to a specific folder. For example:
Here I have 3 folders (proj 1-3) added to a workspace. I have 3 sample files with the same text.
When searching, you can set files to include to a specific folder (./proj2), so that the search results will be limited to that folder.
I've found the best solution to this for me (though it's still a sub-optimal one) is simply to run multiple VS Code instances, one for each folder.
It's a pain to start up, but once you get things going (and hopefully you're not restarting often on your dev machine, so this is less of an issue) it works perfectly: you can search for files with only the relevant ones showing up.
Also, if you want to reduce the start-up pain you can make a shortcut/alias/etc. in your operating system that starts both at once.

Eclipse Ctrl+Shift+R not showing all files in the project

When i press Ctrl+Shift+R to open the Open Resource Dialog box, the filter box does not show most of the other resource files for example.. jsp, xml etc. it works fine with all the java files.. This is happening for only this particular java project. i have refreshed the project multiple times but still no-go. I have also rebuilt the index for eclipse under workspace/.metadata/.plugins/org.eclipse.jdt.core by deleting the index files but to no avail.
I am using eclipse Kepler version. Any help would be great..
Thanks All. Yes i had closed and opened the project many times. I have also not set any Resource filter exclusions. What i noticed was that opening any of these files for edit would set off an alert saying file was derived and would i like to edit? But on the properties for these file they were not ticked as derived but rather as Archived. So had to manually hunt for the parent folder which was making these files as derived. Also noticed that the Open Resource Dialog box has option for including Resource files "Show Derived Resources"...
This one helped me solve the problem
Eclipse treating all the files in a project as Derived
This is going to sound ridiculous...but maybe this'll help others too: make sure your file search string is correct! You may need to begin it with a wildcard (*).
I lost about 45 minutes on this as the result of user error.
I was looking for some local files named eRCaGuy_PPM_Writer.h and eRCaGuy_PPM_Writer.cpp (from my repo here). So, I pressed Ctrl + Shift + R and searched for ppm_writer, as shown here:
Nothing! It would not find those files! No matter what I did to the files it couldn't seem to find them. I tried all sorts of things. Then, I realized Eclipse doesn't have a fancy fuzzy search like Sublime Text 3, so I simply added an asterisk (*) to the front of the search, and voila! It works perfectly. Since the "PPM_Writer" part of those two file names is NOT at the beginning, I must start the search with a wildcard (*).
Now it works fine, as you can see here:
I've just added a note about this to my personal Eclipse setup and configuration instructions here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/tree/master/eclipse (for my full documentation, see also the PDF and Google Drive links at the top of that page).

prevent eclipse from cleaning up generated files

so I've seen this
How to prevent Eclipse from cleaning the bin folder for every build?
but I have a different problem. (i.e. if it was just resources, I could use that ability to copy them into place each time).
I'm generating files (ala sqlite databases) and they are getting cleaned up. I could move them around (and probably will eventually), but for now I want them within this structure for developing purposes.
is there no way to prevent eclipse from deleting these files (it doesn't seem to happen all the time, perhaps just on build error?), as I really need them to persist.
This is a solution for a different problem, but I think it would help here ;)
When generating resource files, (including DB files) do not put them into the /bin folder, especially if they are not going to change with every build, put them in a subfolder of your /src folder.
I have done so for webservice stubs, version numbers and other resources and regard it as the best practice.
If, however, you should decide to stick to your practice, take a look at the eclipse-generated build.xml file and modify it, making ant remove only the files you don't want.
I think the answer is in preferences
Java->Compiler-Building->Scrub output folders when cleaning project (i.e. not set, will hopefully find out soon).

How to modify Xcode 4 Project to be Machine independent like Visual Studio or Eclipse behave

I'm very surprised not to be able to open my Xcode project on another mac, I have never that kind of problem with Visual Studio or Eclipse. I have tried this Info.plist file "no such file" error but it's not enough.
I have other errors like MyAppViewController files not found in some folder whereas I checked that the files are actually there.
So how do I modify XCode 4 project so that it can be opened on any mac ?
Update: contrary to what is claimed here Duplicating / importing Xcode projects from one Mac to another copying isn't enough
Update 2: should I be obliged to buy that kind of tools to do so ? http://itunes.apple.com/fr/app/project-duplicator-for-xcode/id467950482?mt=12
Copying the files over is enough, as long as you copy all files over and no files are referenced from your project file using absolute paths.
Note that you don't have to choose to have absolute paths. I'm unsure of the exact details, but I've ended up with absolute paths in projects without doing so explicitly.
For example, here's a project with a missing file:
When I select the missing file, I can see that it's using an absolute path:
At this point, you have two options:
You can click the button in the bottom right of that red box I've drawn to find the file. Make sure you pick the right file; if you pick one with a different name, Xcode will happily replace DetailViewController.m with SomeUnrelatedFile.m and you'll have lost the hint about the original file. After finding it, make sure to pick Location: Relative To Group (usually, that'll be the right choice anyway) to avoid this happening again.
Possibly safer, go back to the original computer. For any file that you know is missing on the destination computer, pick Location: Relative To Group. Then copy everything over again.
I'm not sure if this is what you're after but it might help; I use git on to keep my two laptops in sync with a single project. I don't have any file missing errors and it comes with all those other repository benefits.
You shouldn't need any tools to do this, Xcode projects can be moved, shared between other members of your team and opened on any supported machine.
There must be another problem you have, so you need to post the error.
And when you get it resolved.... using a free remote source control service such as bitbucket, would be good for you to know and get into the practice of using.

Easily Open Existing Non-Eclipse Project in Eclipse?

Alright, this has caused me enough grief. The answer may be dead simple, but I need some help.
I figured it would be simple to open an existing project in Eclipse, but I'm having quite a time actually making this work. I don't want to change where it's located. I don't want to pull a bunch of strings to get Eclipse to point to it. I just want to take the project directory from where it is now and open it in Eclipse.
Is there any way to do this?
Not sure that I entirely follow, but here's my general routine for creating projects in Eclipse.
I go to File > New > Project and
pick out what sort of project I
want, and hit Next.
I enter the name I want to use for
the project, and the path where I
want to store it. I never store
stuff in my workspace folder.
For projects with existing code, I
just put the path to the existing
folder, and Eclipse just imports the
code.
Hoping that answers your question, but if not let me know.