| Changing function prototype generates "cannot resolve" error. [message #911944] |
Wed, 12 September 2012 12:16  |
Mason Wardle Messages: 5 Registered: September 2012 |
Junior Member |
|
|
I have two projects in Eclipse. One of them is a plugin that contains a class that is essentially a plotter and that extends org.eclipse.ui.part.ViewPart.
I am instantiating this plotter class from the other non-plugin project. I have something in the project that makes it so a class from the "other" project cannot call member functions from the plotter class that expect at least one String passed to them.
For example, the following code snippet:
Plotter myPlotter = new Plotter();
myPlotter.plot();
works correctly. The plot does exactly what I expect. If, however, I modify plot to expect a String (say, for a label), or even create a new function that prints a String:
Plotter myPlotter = new Plotter();
String theString = "I'm the String";
myPlotter.plot(theString);
myPlotter.printMe(theString);
Eclipse gives me the red underlines under printMe and plot. When I hover over printMe, I get the error:
The type org.eclipse.ui.part.ViewPart cannot be resolved. It is indirectly referenced from required .class files
I think it's a compiler mismatch. When I first starting running this instance of eclipse (3.6.x), I was using Java 1.6. I got some code from a colleague that required me to go to 1.7 for the "other project". I've since made both projects use 1.7.
I think the issue lies somewhere in my project set up, but I can't shake anything loose.
Under Project: Java Compiler, I set both projects so they don't use project-specific settings. That didn't work. When I enable project-specific settings, one of my projects has Use compliance from execution environment on Java Build Path grayed out and unchecked, but the other project has it checked and not grayed out.
On the Java Build Path, I have the same JRE System Library (jdk1.7.0_03) for both projects.
Any ideas? Am I barking up the wrong tree and it's a totally different issue?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01598 seconds