Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Plig-in Development (3.2.2): I get error message sayingr 'CoreException cannot be resolved' yet it
Plig-in Development (3.2.2): I get error message sayingr 'CoreException cannot be resolved' yet it [message #609880] Mon, 11 February 2008 12:54
John Ormerod is currently offline John OrmerodFriend
Messages: 39
Registered: January 2010
I hope that I am asking this on the correct forum (so many, so little
time...). If not, grateful for guidance as to where best to ask.

I'm afraid what follows gets a bit involved. I have edited it 4 or 5
times in an attempt to be a clear as I can. Apologies if it is still

Plug-in 'org.eclipse.core.runtime' has 'org.eclipse.equinox.common' in
its list of Required Plug-ins. Both have the 'org.eclipse.core.runtime'
package defined as 'visible to downstream plug-ins. My plug-in has
'org.eclipse.core.runtime' in its Required Plug-ins, BUT my import
statements for CoreException and IProgressMonitor say that they cannot
be resolved. Both of these are in fact in the 'equinox.common' plug-in,
but I can't work out why they can't be resolved. Can anyone help?

What is strange, is that the 'cannot be resolved' messages are visible
in a tool-tip for the 'x' in the 'break-point' column against the
'import' statements, but are not shown in the Problems view. Also
strange is that I can see in Resources, that the class files have been
created - I would have expected these errors to prevent this.

Seems like something strange is going on.

Here is the context in which I am using them.

I decided to investigate the Eclipse facilities for doing code
generation from a template. I found a tutorial on IBM's DevWorld from
last year that creates a new template for use when you create a View ( ex.html#download
). I thought I was be well away... experience should have told me

Whether using the code I created from following the tutorial, or from
importing all the sample code, I still get the same two error messages
in Problems for the SimpleViewTemplateWizard:
1. The type org.eclipse.core.runtime.CoreException cannot be resolved.
It is indirectly referenced from required .class files
2. same, but for IProgressMonitor.

These error messages are associated to statements in a strange way as
well. The 'cannot be resolved' message are displayed in the Problems
view for the SimpleViewTemplateWizard class, but the 'x' is against the
package declaration. The cause of the errors is the method:

public ITemplateSection[] createTemplateSections() {
return new ITemplateSection[] {new SimpleViewTemplateSection()};

It is the SimpleViewTemplateSection class (instantiated in the above
method) that has the offending import statements for CoreException and
IProgressMonitor, that can't be resolved. I would expect these to show
in the Problems view, but they do not.

I did manage to get rid of these errors, by doing something like:
1. remove org.eclipse.core.runtime plug-in from the dependencies
2. add the org.eclipse.equinox.common plug-in to dependencies
3. this resolved the above import errors, but created loads more
4. add the org.eclipse.core.runtime plug-in back
5. I removed the (now redundant) org.eclipse.equinox.common from
6. then I did a Clean of my plug-in project and all the errors went away.

I first got these when using 'raw' 3.2.0. So, I went to the update site
and got the latest updates and I am now at 3.2.2. This did not fix anything.

I hope this provides enough info.

Regards, John

John Ormerod
Previous Topic:ANN: "Creating Online Help for Eclipse: A Case Study" talk, Feb 13 at Berkeley STC meeting
Next Topic:IExpansionListener not called
Goto Forum:

Current Time: Fri May 25 20:09:27 GMT 2018

Powered by FUDForum. Page generated in 0.01622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top