Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] new to this

Hi, everybody. I'm new to this plug-in development game and I'm having a
terrible time wrapping my head around some of the concepts. So in the
interest of asking a good question, I'm going to walk through what
understanding I have so that even if I'm totally off base, perhaps
someone can answer the question I MEANT to ask...

As I understand the system:
1. An extension-point will provide a class to be extended or an
interface to be implemented.
2. Therefore there is no way for one plug-in to access an object in
another plugin, just a class.
3. So if I want to extract some instance-data from the
org.eclipse.update.core plugin (such as the locations of local
install-sites), I have to extend the class that discovers that
information thus creating a new and separate instance of it.

With that in mind, I set out to prove to myself that it could be done
that way before digging into real code... Turns out that was a good
thing because I ran into some problems.

com.hp.dummy1 is a "plug-in with a view" straight from the template
com.hp.dummy1.contentProvider is a plug-in that defines an extension
point to the class com.hp.dummy1.contentProvider.Content. The Content
class returns a String[] object suitable for putting items in the
com.hp.dummy1 view (namely new String[] {"one", "two", "three"};)

Since the com.hp.dummy1 class that would use the String[] already
extends ViewPart (and therefore cannot extend another class), I created
another class called CP that extends Content.

Then I replaced the line:
return new String[] { "One", "Two", "Three" };

with:
CP cp = new CP();
return cp.getContent(); //returns { "One", "Two", "Three" };

But when I run the runtime-workbench and show the view, it does not show
up and I get "Unhandled event loop exception" to stderr on the console.

I'm at the end of my meager knowledge can take me and I don't even know
where to start finding out what this problem is. Is there some eclipse
"event loop exception" that plug-ins declaring extension points must
handle? If so, where do I find out about it?



Back to the top