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 #472310] Mon, 11 February 2008 07:54 Go to next message
Eclipse User
Originally posted by: john.ormerod.erebor.co.uk

Hello
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
confusing.

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 (
http://www.ibm.com/developerworks/library/os-eclipse-pde/ind ex.html#download
). I thought I was be well away... experience should have told me
otherwise.

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
dependencies
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
john.ormerod@erebor.co.uk
Re: Plig-in Development (3.2.2): I get error message sayingr 'CoreException cannot be resolved' yet [message #472311 is a reply to message #472310] Mon, 11 February 2008 11:40 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2108
Registered: July 2009
Senior Member
Redirecting this to eclipse.platform.

John Ormerod wrote:
> Hello
> 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
> confusing.
>
> 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 (
> http://www.ibm.com/developerworks/library/os-eclipse-pde/ind ex.html#download
> ). I thought I was be well away... experience should have told me
> otherwise.
>
> 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
> dependencies
> 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
>
Re: Plig-in Development (3.2.2): I get error message sayingr 'CoreException cannot be resolved' yet [message #609883 is a reply to message #472310] Mon, 11 February 2008 11:40 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2108
Registered: July 2009
Senior Member
Redirecting this to eclipse.platform.

John Ormerod wrote:
> Hello
> 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
> confusing.
>
> 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 (
> http://www.ibm.com/developerworks/library/os-eclipse-pde/ind ex.html#download
> ). I thought I was be well away... experience should have told me
> otherwise.
>
> 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
> dependencies
> 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
>
icon3.gif  Re: Plig-in Development (3.2.2): I get error message sayingr 'CoreException cannot be resolved' yet [message #645719 is a reply to message #472310] Mon, 20 December 2010 03:08 Go to previous message
Hendy Irawan is currently offline Hendy Irawan
Messages: 58
Registered: July 2009
Location: Bandung, Indonesia
Member

Yesterday I got hit by this problem, and fortunately I managed to resolve it:

http://eclipsedriven.blogspot.com/2010/12/fixing-error-type- orgeclipsecoreruntime.html

Good luck!

(I realize this is an ancient thread but in case someone came across Googling, I figured they might need some help too.)

[Updated on: Mon, 20 December 2010 03:14]

Report message to a moderator

Previous Topic:Product Name on window/tab
Next Topic:contentProvider and JQuery in welcome page
Goto Forum:
  


Current Time: Sat Apr 19 05:54:36 EDT 2014

Powered by FUDForum. Page generated in 0.01981 seconds