Tagged: source not found
- This topic has 11 replies, 3 voices, and was last updated 6 years, 4 months ago by Scott Esker.
-
AuthorPosts
-
Scott EskerParticipantI have MyEclipse set to download any sources and javadocs when using Maven. I am able to search for any type (command-shift-T). It finds what I am looking for, but I can a “The class file is not on the classpath. Who cares? If I downloaded the sources, I should need anything else. The default Eclipse behavior is to give me a button at attach source, all I get is a blank screen, and a button with an X. It is so annoying. I inevitably have someone behind me asking something about a class I can search and find, but cannot display the source. Maybe wrong forum, or has been answered before..
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorScott,
Sorry that you are seeing this issue. Thank you for the screenshot.
I could not replicate the problem at my end. I do see the ‘Attach Source’ button for the class files in Dark theme.Can you please share with us the .log file located at workspace dir/.metadata/.log to help us investigate further?
Apologies for inconvenience caused.
–Swapna
Genuitec Support
Brian FernandesModeratorScott,
I just managed to reproduce this dialog – we assumed at first we had a dark theme bug where a button was being hidden, but that’s not the case.
What you’re seeing is default Eclipse behavior typically for
.class
files that exist in non Java projects – this is just the case I managed to reproduce with. Is this your case as well? Where do these .class files exist, physically in your workspace or file system?
Scott EskerParticipantIn my filesystem. I keep source and workspaces apart.
Thanks
Scott EskerParticipantI guess the problem is that I have a default Eclipse installation, and I don’t ever see that behavior.
Brian FernandesModeratorScott,
I can assure you that MyEclipse does not change the way this works – in fact, I replicated the dialog in a basic Eclipse install before replying here earlier.
What is possible, is that the workspace you’re using with MyEclipse has a slightly different configuration, or more likely, a different set of projects, which is resulting in the error you see.
Can you tell me how, exactly, you are opening these files in MyEclipse? Are you doing so from the Open Type dialog or in some other way? How is the IDE finding the file – do they exist in a project that’s in the workspace or … even a screenshot of a project with a class exhibiting this behavior would help us better understand your set up.
Scott EskerParticipantI pull in existing Maven Projects for all the projects I am using. I then select working sets, diving multi maven projects into individual java projects, and the parent poms into resources and select my working set. I have Maven preferences to download source and docs. This is the same behavior that I use in vanilla Eclipse. When I search for a class, it either comes up straight away (in classpath) or slight delay because it is a Maven dependency and the then displays. Or I get the “look up source” button.
So I am not sure exactly how to answer this, other than the behavior is not the same in ME.
When I get a chance I will try to get you a screen shot, and some more information. This is the worst and biggest problem I am having, as it is a constant problem, happening many times a day. If I don’t have a project opened in ME, but I have the jar and downloaded source, it should show me the code screen and not the image that I sent previously.
Thanks
Scott EskerParticipantOk, I really don’t understand what I am doing wrong, but it is so bad, either my understand of Eclipse after all this time, and what I am seeing now in ME.
1. Screen one shows a multi project explorer view, all maven projects.
2. I search for the class I am looking for, and get the interface and class itself found.
3. I select the implementation, and I get the bad broken screen.I included pictures of my IDE, along with some arrows and text. I would love to know what I have done because this is almost a complete show stopper for me.
Attachments:
You must be logged in to view attached files.
Brian FernandesModeratorScott,
Thank you for the screenshots – I still have questions but these certainly help put things in better context. The case you describe seems to be an even more straightforward failure, as the source is right there in your project?
1) In screen #2, you mention “search for the class” – can you clarify what you’re doing to search here? Are you using the reference search (
Ctrl + Shift + G
), seeing results in the Search view and double clicking from there?I ask very specifically here, because in screen #1, I’m seeing the CodeMix command palette being used to search for that same interface. I tried this myself and did not have a problem, but given how odd this problem is, it may be causing the issue in your case. If you are using the CodeMix search, can you try using the regular Eclipse reference search instead? (
Ctrl + Shift + G
and double click the result from the search view?)2) Sanity check: I can see the
MLBOrderRequestService.java
file is right there in the very same project. If you simply double click the file directly, I’m assuming it opens – and the failure is only if you get to the class by searching. Does it open if you use the Open Type dialog (Ctrl + Shift + T
) too?If we can’t figure this out here, I’ll be happy to schedule a video meeting on Monday and look at the problem together, these actions should not be failing.
Scott EskerParticipantI’m taking a day off today, but I will be working tomorrow and will try to answer those specifically. I didn’t realize I was using the CM search, which might explain there is a very different search behavior going on.
I will try the same thing with the vanilla search and see what happens. I have to admit that I am not quite used to the CM behaviors vs the vanilla. I do know that I specifically don’t use CM for opening java files because I don’t get the same color codings of classes/methods/attribute etc. I am also using Sonar Lint because its a savior for doing stupid things, and I find it is a brilliant additional weapon to bring to working through out the day.
Maybe I have a weird configuration of something that I have done.. There are other exceptions I am getting, and sometimes get a view that is more like a stack trace — I’ll try to capture those as well. Our code is extremely complex with byte code weaving and hijacking of Spring, but that should effect just editing code.
I appreciate your time, and will get more information to you tomorrow.
Brian FernandesModeratorScott,
Just checking in – were you able to get any further with your investigation? Did you get the desired behavior by using the vanilla search instead?
Scott EskerParticipantI am NOT seeing the same behavior using Eclipse Ctrl Shift G. It works as expected, It will pull up source with the maven artifacts. Ctrl Shift T, however, does not work. So it must be a CodeMix issue?
-
AuthorPosts