Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Invalid access restriction error?
Invalid access restriction error? [message #55883] Thu, 16 April 2009 14:50 Go to next message
Philip K. Warren is currently offline Philip K. WarrenFriend
Messages: 2
Registered: July 2009
Junior Member
We have an 'Access restriction' error we are getting from PDE which seems
invalid but I wanted to ask here before opening a bug. This is the
scenario:

1) plugin.x has two classes, pluginx.B and pluginx.internal.A. plugin.x is
exporting the package pluginx to the runtime, but it is not exporting the
internal package. This is what pluginx/internal/A.java looks like:

package pluginx.internal;

public class A {
public A() {
}

public void init() {
}
}

This is what pluginx/B.java looks like:

package pluginx;

import pluginx.internal.A;

public class B extends A {
public B() {
super();
}
}

2) Another plug-in, plugin.y has one class defined - pluginy.C. It imports
the 'pluginx' package from plugin.x, and looks like:

package pluginy;

import pluginx.B;

public class C extends B {
public C() {
super();
}

public void init() {
super.init();
}
}

When compiling this in the PDE tool, I get this error message:

Access restriction: The method init() from the type A is not accessible
due to restriction on required project
plugin.x C.java plugin.y/src/pluginy line 11 Java Problem

This is occurring because class 'B' is not overriding the 'init()' method
in class 'A', but I was expecting this to work without errors.

Should I open a bug?
Re: Invalid access restriction error? [message #57609 is a reply to message #55883] Wed, 22 April 2009 01:53 Go to previous message
Eclipse UserFriend
Originally posted by: n.n.nnn

On Thu, 16 Apr 2009 14:50:54 +0000, Philip K. Warren wrote:

> We have an 'Access restriction' error we are getting from PDE which
> seems invalid but I wanted to ask here before opening a bug. This is the
> scenario:
> When compiling this in the PDE tool, I get this error message:
>
> Access restriction: The method init() from the type A is not accessible
> due to restriction on required project plugin.x C.java
> plugin.y/src/pluginy line 11 Java Problem
>
> This is occurring because class 'B' is not overriding the 'init()'
> method in class 'A', but I was expecting this to work without errors.
>
> Should I open a bug?

Hi Phil,

Isn't PDE just reporting what the Java compiler tells it?
Re: Invalid access restriction error? [message #596066 is a reply to message #55883] Wed, 22 April 2009 01:53 Go to previous message
Dilton McGowan II is currently offline Dilton McGowan IIFriend
Messages: 110
Registered: July 2009
Senior Member
On Thu, 16 Apr 2009 14:50:54 +0000, Philip K. Warren wrote:

> We have an 'Access restriction' error we are getting from PDE which
> seems invalid but I wanted to ask here before opening a bug. This is the
> scenario:
> When compiling this in the PDE tool, I get this error message:
>
> Access restriction: The method init() from the type A is not accessible
> due to restriction on required project plugin.x C.java
> plugin.y/src/pluginy line 11 Java Problem
>
> This is occurring because class 'B' is not overriding the 'init()'
> method in class 'A', but I was expecting this to work without errors.
>
> Should I open a bug?

Hi Phil,

Isn't PDE just reporting what the Java compiler tells it?
Previous Topic:Headless RCP Product Export
Next Topic:Build updatesite doesn't create web/* and index.html
Goto Forum:
  


Current Time: Thu Apr 25 11:11:09 GMT 2024

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

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

Back to the top