Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] State vs ActiveModels

PluginModelManager#getState() returns the current state containing all
workspace bundles and all target bundles that are explicitly checked on the
target platform preference page.

PluginRegistry#getActiveModels() returns information about the same
plug-ins as PluginModelManager#getState but has a lot more stuff (ie.
extensions, notification mechanism) as well as a reference to the bundle
description.
Also refer to the javadoc for this method for more details.


You can get model changes, not state deltas, about a workspace bundle or
target bundle or both by attaching a listener to one of three model
managers.

1. ExternalModelManager - for target plug-ins
2. WorkspacePluginModelManager - for workspace plug-ins
3. PluginModelManager - for both.  This manager, in fact, is a listener to
both #1 and #2 and gives you a cumulative notification.
PluginModelManager can be accessed via
PDECore.getDefault().getModelManager()

ExternalModelManger and WorkspacePluginModelManager can be accessed via a
getter method on PluginModelManager.

Wassim.





                                                                           
             Pascal                                                        
             Rapicault/Ottawa/                                             
             IBM@IBMCA                                                  To 
             Sent by:                  pde-dev@xxxxxxxxxxx                 
             pde-dev-bounces@e                                          cc 
             clipse.org                                                    
                                                                   Subject 
                                       [pde-dev] State vs ActiveModels     
             05/08/2007 09:20                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
               "Eclipse PDE                                                
                  general                                                  
             developers list."                                             
             <pde-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           





Hi,

I would like to understand the relationship (if there is) between
PluginModelManager.getState() and  PluginModelManager.getActiveModels(). It
seems that the State contains a bundledescription for each bundles that are
in the target platform and for each bundle in the workspace, whereas the
active models contains the bundles within the target and the bundles in the
workspace. Correct?

Now a question about delta, is there a listener to know about changes in
the manifest of an active model (in terms of PluginModel object rather than
State).

Thx

PaScaL

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




Back to the top