source not found even after editing the source lookup path - eclipse

source not foud , i have tried this :
1/edit source lookup path
2/click on the add button
3/choose java project
4/choose my project
when i click on "ok" it takes me back to "source not found"
any help please

Set the source projects before debugging, from the "Debug as..." window, at "sources" tab.

Related

Folder "libs" (with "s") is not displayed in the treeview

Probably due to a setting (which one?) : my "libs" folder isn't displayed in VS Code.
Renaming the folder like "lib" (so without the "s" or everything else is ok).
I've already reload the editor with extensions disabled and it doesn't help.
Can you please help me: which setting should I update to get my /public/lib folder ?
Thanks
There's a setting "files.exclude" that could be the reason:
Press F1
Type settings
Select "Open Workspace Settings"
Check settings on the right side. If "files.exclude" contains your "libs" folder, remove it.
See also:
How can I exclude a directory from Visual Studio Code "Explore" tab?
http://donovanbrown.com/post/Hide-folders-in-Visual-Studio-Code-Explorer

Eclipse does not remember external source attachments

Using Eclipse 4.3.1 (Kepler) on Ubuntu, I find that each time I exit and reenter Eclipse, I have to respecify my external source attachments. What is the key to making Eclipse remember them?
Open the Source Attachment Configuration dialog by clicking on the "Change Attached Source" button in the Class File Editor; or open the similar Java Source Attachment dialog by right-clicking on the containing jar in Package Explorer and selecting "Properties".
I've tried both.
In the dialog, click on the "External File" button and navigate to a jar containing sources, or click on the "External Folder" button and navigate to a directory containing .java files in subdirectories corresponding to the package hierarchy.
All these ways work until I quit Eclipse and come back in.
I have never used these parts of Eclipse; I'm using Maven to manage my dependencies and Maven will automatically attach sources - so take my answer with a grain of salt :-)
I'm not sure why Eclipse doesn't remember those settings. My current feeling is that those settings are temporary.
If you edit the source attachments in the project's properties (look for "Java Build Path"; there is a tab "Libraries"), then the changes should be saved in the file .classpath. Have a look in there.
Lastly, you can try to create a "User Library" (search for this term in the preferences dialog). Here, you can define a bundle of JARs which make up some library. After adding the code JAR, you get options to specify the source JAR.

Open Resource window in eclipse shows pyc files

In eclipse the Open Resource window (Hot keyed to Cmd+Shift+R) to open a file by typing its name seems to show *.pyc files despite the Navigator view correctly hiding them.
Is there anyway to set this up to ignore PYC files?
I have looked at the following links and it appears that pydev may require a src folder underneath the main eclipse folder. I do not have that structure however the full project has been marked as a 'source' folder in Pydev - PYTHONPATH under project properties.
http://sourceforge.net/projects/pydev/forums/forum/293649/topic/2183420
http://pydev.org/manual_101_project_conf2.html
I found the solution!
CMD+i on the project folder (or "right click" -> properties), then:
under "resources" -> "resources filters":
click "add"
choose "exclude all"
select "files and folders"
check "all children (recursive)"
type *.pyc in the text field at the bottom
ok
ok
\o/

Is there an equivalent of "Add existing file" (to project) in Eclipse?

I am trying to map my Visual Studio experience onto Eclipse. Right now, I wish to add a file existing somewhere on the file system into a project in Eclipse. I expect it to be copied to the project source folder.
Currently, I see only one way - switch to the windows explorer (total commander, in my case) and copy the file myself, after which to refresh the project.
Can I do the same without leaving the Eclipse IDE?
Thanks.
I had the same problem, but found yet another solution.
Let me state my problem so that we're sure we're talking about the same thing.
I had a file in a directory where a bunch of code files were and some of the files in that directory were shown as "in my project" and some of the files were missing. I wanted the missing files to appear in my project.
I simply selected the folder in my project and pressed 'F5' or right-clicked and selected 'refresh' and the files appeared in my project. It looks like that is the intended way of doing this.
File->Import->General->File System should do it.
There you can select the file(s) from some file system folder to your project (into folder).
Even easier. Just drag and drop the file from explorer into the correct package in Eclipse. It will ask you if you want to copy or link the file(s).
I am a newbie to Eclipse Luna (the 64 bit latest version on Windows 7) but this worked for me:
Copy the preexisting source files you which add to your project.
In Project Explorer, right click your project and select New > File
In the "New File" dialog box, your project's name / folder should be displayed as the parent folder for your new (existing) source file.
Click on the "Advanced" button at the bottom of the "New File" dialog box.
Check the "Link to file in the file system" checkbox.
Click the "Browse" and browse to your preexisting source.
Click the "Finish" button at the bottom of the dialog box.
In my case, I had to:
right-click the project's name
choose "Close Project"
right-click the (now closed) project's name again
choose "Open Project"
Refreshing didn't work for me. :(
Hopefully this helps someone else...
Just found the quickest way to add files:
Copy-paste your file into your project disk directory using your file browser.
In Eclipse project browser select your project.
Click [right mouse button]->Refresh (or press F5 on Windows machine).
Voila
(worked on Neon-4.6.2)
I just got this to work. YMMV
I don't suppose it has to be there, but I put my file, xyz.cpp, into my project's source directory. My project has a source subdir named src, as in ProjName/src.
Right Click on project name (my project was open and the only one open).
NEW->FILE. Put in the filename, xyz.cpp. Click OK or press enter.
The file will open in the editor and complain that it is empty. Close it WITHOUT SAVING.
Reopen the file. It now has its contents.
It turns out that just simply dragging the files into the src folder would work!
Right-click on the file after you have copied it into the project directory. Select Properties... in the left hand pane select C/C++ Build. There will be a checkbox "Exclude resource from build" uncheck that check box.

upload only current file with netbeans

I'm using netbeans 6.9.1 to work on a php project, how do I manually upload a file without having to 'run' the project?
Under the options->keymap, I mapped Ctrl-L to upload, which is easy enough.
The only other place to upload is to right-click the file in the project browser and 'upload', unlike aptana there's no button for it, which is what got me stumped.
If you have the project's "Run Configuration" properly configured as a "Remote Web Site (FTP, SFTP)", then simply right-click on the file in the "Projects" pane and click on "Upload" in the file's context menu.
If you want to upload automatically on save instead of on run,
Right-click on the project node in the "Projects" pane (it's the top-most node in the tree)
Click on "Properties" in the project's context menu.
Click on "Run Configuration" in "Categories"
Change "Upload Files" to "On Save"
Click "OK"
If you sometimes want to upload on run, sometimes on save, sometimes only manually, sometimes to one server, sometimes to another server, or any combination of the run configuration options, then you can click on the "New..." button to create and save one or more run configurations. You can then choose which one is active on the run configurations project properties page, or set it through "Set Configuration..." on the project's context menu.