Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JDT init hook
JDT init hook [message #198535] Tue, 15 March 2005 01:00 Go to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

I'm working on a plugin that adds Java annotation processing to the JDT. I
need a way to initialize my plugin and register some listeners. Ideally I
would do this at the same time that the JDT is loaded, since this
functionality is only useful in the context of Java but it is potentially
needed any time a Java file is compiled.

Is there a particular extension point that I should extend, to hook JDT
initialization? So far I haven't found anything that looks right.

Walter Harley
BEA Systems, Inc.
Re: JDT init hook [message #198607 is a reply to message #198535] Tue, 15 March 2005 16:54 Go to previous messageGo to next message
Tobias Widmer is currently offline Tobias WidmerFriend
Messages: 97
Registered: July 2009
Member
Use the methods BundleActivator#start / stop of your plugin class. If you
have set a dependency on a JDT plugin, your initialization code is
guaranteed to be executed after the JDT plugin has been initialized.

Cheers

Tobias

"Walter Harley" <wharley@bea.com> wrote in message
news:d15c3v$pet$1@www.eclipse.org...
> I'm working on a plugin that adds Java annotation processing to the JDT.
> I need a way to initialize my plugin and register some listeners. Ideally
> I would do this at the same time that the JDT is loaded, since this
> functionality is only useful in the context of Java but it is potentially
> needed any time a Java file is compiled.
>
> Is there a particular extension point that I should extend, to hook JDT
> initialization? So far I haven't found anything that looks right.
>
> Walter Harley
> BEA Systems, Inc.
>
Re: JDT init hook [message #198695 is a reply to message #198607] Tue, 15 March 2005 21:53 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Tobias Widmer" <tobias_widmer@ch.ibm.com> wrote in message
news:d173vj$fnv$1@www.eclipse.org...
> Use the methods BundleActivator#start / stop of your plugin class. If you
> have set a dependency on a JDT plugin, your initialization code is
> guaranteed to be executed after the JDT plugin has been initialized.

Thanks, Tobias.

However, maybe I'm confused? I thought that BundleActivator#start would get
called when the plugin is loaded; but that it does not itself *cause* the
plugin to be loaded. In other words, if plugin B depends on plugin A,
plugin B is still not going to get loaded until plugin A actually makes a
call to it for some reason.

Am I wrong about that? Does merely declaring a dependency cause my plugin
to be loaded whenever the plugin it depends on is loaded?

If I'm not wrong, then my question remains: what should I extend, in order
to get my plugin to be loaded when the JDT is initialized?
Previous Topic:Getting a dom ast node from ITypeBinding.
Next Topic:Implementing extended java languages by "subclassing jdt" ?
Goto Forum:
  


Current Time: Fri Nov 08 23:17:02 GMT 2024

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

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

Back to the top