Home » Eclipse Projects » Eclipse Platform » What on earth is causing "Type Foo is not accessible due to restriction on required project bar
|
Re: What on earth is causing "Type Foo is not accessible due to restriction on required project [message #306601 is a reply to message #306599] |
Wed, 02 August 2006 16:22 |
Eclipse User |
|
|
|
Originally posted by: eclipse.bettsockentraeger.de
You are trying to import a package that is not intended to be used by
your plugin.
In the export package tab you can restrict the visibility of a package
to certain plugins. The TypeFoo is probably only visible to certain
plugins and is not intended to be accessed publicly.
Regards
Stefan
Paul Keyser wrote:
> R3.1.2, WinXP
>
> Normally when I add a new package to a plugin, I need also to add it to
> the MANIFEST.MF (runtime tab), and immediately all is fine. Just now
> however, adding an otherwise totally ordinary package caused the error
> "Type Foo is not accessible due to restriction on required project
> bar.bar.bar" on every class that imports a class Foo in the new package.
> What hidden Eclipse setting is causing this? (I've tried rebuild all and
> suchlike.)
>
> thanks,
> Paul
|
|
| |
Re: What on earth is causing "Type Foo is not accessible due to restriction on required project [message #306620 is a reply to message #306611] |
Wed, 02 August 2006 20:56 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Paul Keyser" <rolarenfan@earthlink.net> wrote in message
news:eaqmnu$975$1@utils.eclipse.org...
> Thanks for quick ereply -- with a sensible interpretation, that doesn't
> work here.
>
> The new package was created by me; I did not add any restriction.
>
> The new package contains only classes that I moved from its parent, where
> they were being succesfully and correctly exported.
>
> So somehow Eclipse its own self got the idea to prevent exporting those
> classes -- why?
Paul, can you be more specific about the details of your case? E.g., post
the contents of your manifest.mf? For instance, it's unclear from your
initial posting what "bar.bar.bar" is - I don't know whether that's actually
a package in your project or not, I don't know whether that's the package
that Foo is contained in, I don't know the name of the project. I think
more detail will help people give you a better answer.
|
|
|
Re: What on earth is causing "Type Foo is not accessible due to restriction on required project [message #306623 is a reply to message #306620] |
Wed, 02 August 2006 23:27 |
Paul E. Keyser Messages: 878 Registered: July 2009 |
Senior Member |
|
|
Walter Harley wrote:
>
> Paul, can you be more specific about the details of your case? E.g., post
> the contents of your manifest.mf? For instance, it's unclear from your
> initial posting what "bar.bar.bar" is - I don't know whether that's actually
> a package in your project or not, I don't know whether that's the package
> that Foo is contained in, I don't know the name of the project. I think
> more detail will help people give you a better answer.
>
Well, I have quite a few plugins, somewhat complexly-related. But the basic situation involves the
main plugin, com.mun.ist.main, and a plugin on which main depends, com.mun.ist.service. The
MANIFEST.MF of main includes:
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.expressions,
org.eclipse.ui,
org.eclipse.ui.forms,
com.mun.ist.service,
...
And the MANIFEST.MF of service includes:
Export-Package: .,
com.mun.ist.first.third.party.jar.code,
com.mun.ist.service,
com.mun.ist.service.fails,
com.mun.ist.service.works,
com.mun.ist.some.other.third.party.jar.code,
...
When I added com.mun.ist.service.works (the package) I made sure to add that package to
service/MANIFEST.MF, and all was fine. Time passed, bits changed; I needed to add
com.mun.ist.service.fails, and did so, and added it to service/MANIFEST.MF (after, of course, adding
a few new classes).
I then took some other classes, call them Foo and Bar, both of which were imported by the plugin
"main", and *MOVED* them from com.mun.ist.service down into com.mun.ist.service.fails (using the
refactoring tool); the imports were correctly adjusted in those classes of "main" that imported Foo
and/or Bar.
But I also got the error I mentioned. Now, truly weirdly, when I redo the operation (after having
shut down and restarted Eclipse), all happens as I expected it would ... and no error.
Go figure, eh?
Paul
|
|
|
Re: What on earth is causing "Type Foo is not accessible due to restriction on required project [message #306624 is a reply to message #306623] |
Thu, 03 August 2006 00:55 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Paul Keyser" <rolarenfan@earthlink.net> wrote in message
news:earcdc$ard$1@utils.eclipse.org...
>
> But I also got the error I mentioned. Now, truly weirdly, when I redo the
> operation (after having shut down and restarted Eclipse), all happens as I
> expected it would ... and no error.
It seems that Eclipse caches some information about classloading from
plug-ins; I have never looked into the details, but I have found that at
times classes that "I know are there" in a deployed instance (including even
a debug runtime instance) don't get successfully resolved until I start
Eclipse with -clean. I wish I could be more specific about exactly what is
cached when and how to clear it, but I don't know the answers.
When in doubt reboot...
|
|
|
Goto Forum:
Current Time: Wed Jan 15 07:08:09 GMT 2025
Powered by FUDForum. Page generated in 0.09759 seconds
|