Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] PDEState and state caching

Hi Philippe,

What you want then is a stateless state :), ie. one that does not use
caching.

For that, you should use MinimalState.

Take a look a the implementation of the 'Validate Plug-in Set' button on
the Plug-ins tab of the Eclipse/Equinox launch configuration.
Sounds like you need an identical or trimmed-down function for your
purposes, since you only care about unsatisfied constraints.

org.eclipse.pde.internal.ui.launcher.PluginValidationOperation should be a
good starting point.

Wassim.




                                                                           
             Philippe                                                      
             Ombredanne                                                    
             <pombredanne@gmai                                          To 
             l.com>                    "'Eclipse PDE general developers    
             Sent by:                  list.'" <pde-dev@xxxxxxxxxxx>       
             pde-dev-bounces@e                                          cc 
             clipse.org                fg@xxxxxxxx                         
                                                                   Subject 
                                       [pde-dev] PDEState and state        
             08/31/2006 03:04          caching                             
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
               "Eclipse PDE                                                
                  general                                                  
             developers list."                                             
             <pde-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




Hi:
I have a question on PDESate
I am building a set of ant tasks that re-use PDEState to validate the
state of an arbitrary set of bundles and plugins, all external.

I get a PDESate to obtain a State with :
PDEState pdeState = new PDEState(new URL[0], urls, true, new
NullProgressMonitor());
State osgiState = pdeState.getState();
IPluginModelBase[] targetModels = pdeState.getTargetModels();

and then I iterate over that to get errors:
BundleDescription bd = targetModels[i].getBundleDescription();
ResolverError[] re = osgiState.getResolverErrors(bd);
and do some simple analysis of that.

It works great but the second time I run it on a set of bundles that
cannot be resolved, its runs without detecting errors.
It sounds that PDEState does some smart caching...based on time stamps
How to disable that?
Is that with System.setProperty("pde.nocache","true") ? But it seems to
apply only to 'workspace' plugins, while I am feeding only target
stuffs.
I tried to create the PDEstate with resolve true or false. no changes.
Or some other trick?
Would just cleaning the directory be enough?

I would like to avoid hacking the PDESate code, which is so cooool!
Cordially

--
Cheers
Philippe

philippe ombredanne | 1 650 799 0949 | pombredanne at nexb.com
nexB - Open by Design (tm) - http://www.nexb.com
http://easyeclipse.org  -  irc://irc.freenode.net/easyeclipse




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




Back to the top