Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] action enablement: selections vs. lazy initialization of plugins

Hi Bartosz,

This is not the right forum to ask user questions.

Please use the newsgroups:
http://www.eclipse.org/newsportal/thread.php?group=eclipse.platform

Wassim.




                                                                       
             "Bartosz                                                  
             Kowalewski"                                               
             <w_p_nr_1@xxxxx>                                           To
             Sent by:                  pde-dev@xxxxxxxxxxx             
             pde-dev-bounces@e                                          cc
             clipse.org                                                
                                                                   Subject
                                       [pde-dev] action enablement:    
             07/31/2006 03:11          selections vs. lazy initialization
             AM                        of    plugins                   
                                                                       
                                                                       
             Please respond to                                         
               "Eclipse PDE                                            
                  general                                              
             developers list."                                         
             <pde-dev@eclipse.                                         
                   org>                                                
                                                                       
                                                                       




Hi,

  Recently I have been developing a tiny plugin aiming in
generating some 'security methods' for already exisiting java
classes (clone(), ...) . The idea is to incorporate the plugin
into the standard Eclipse code generation scenarios - use the
'Source' menu and dynamically enable/disable the action when
various elements are selected. The enable/disable scenarios are
rather complicated and (as far as I am concerned) have to be done
programmatically. I've already coded that part. The problem is
that the programmatically done enablement works only after the
first use of the plugin (when the IAction is passed to the
delegate). I've defined the <enablement> node for the
IJavaElement in the plugin.xml file, but it's not enough. Is
there any means to define the enablement node for java editors,
etc. (to work similarly to the std code generation actions) ? Or
is it possible to force plugin initialization ?

I've already investigated the JDT code generation actions.
Everything's done programmatically: action group generation,
action generation (there aren't any enablement nodes in the
plugin.xml file). The actions implement the IAction interface,
not the delegate. Ok, fine, the problem is that the JDT plugin is
initialized at the the start-up and that solution works ok. In my
case, the delagate is used and initialized lazily.

Are there any solutions (which do not require modification of the
Eclipse core  ;) ) ?

Best regards,
  B. Kowalewski

----------------------------------------------------
Zadbaj o bezpieczne wakacje nad wodÄ…!
Zobacz jak jest Bezpiecznie z NIVEA i WOPR - Kliknij:
http://klik.wp.pl/?adr=www.sport.wp.pl%2Fnivea-wopr.html&sid=828


_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev




Back to the top