/** * Add a workspace bundle to the state * * @param model the workspace model */ private synchronized void addWorkspaceBundleToState(IPluginModelBase model) { addWorkspaceBundleToState(fEntries, model); }
addWorkspaceBundleToState(model); } else if (model.isEnabled() && !entry.hasWorkspaceModels()) {
/** * Adds a model to the master table and state * * @param id the key * @param model the model being added */ private void handleAdd(String id, IPluginModelBase model, PluginModelDelta delta) { LocalModelEntry entry = getEntryTable().get(id); // add model to the corresponding ModelEntry. Create a new entry if necessary if (entry == null) { entry = new LocalModelEntry(id); getEntryTable().put(id, entry); delta.addEntry(entry, PluginModelDelta.ADDED); } else { delta.addEntry(entry, PluginModelDelta.CHANGED); } entry.addModel(model); // if the model added is a workspace model, add it to the state and // remove all its external counterparts if (model.getUnderlyingResource() != null) { addWorkspaceBundleToState(model); } else if (model.isEnabled() && !entry.hasWorkspaceModels()) { // if a target model has went from an unchecked state to a checked state // on the target platform preference page, re-add its bundle description // to the state BundleDescription desc = model.getBundleDescription(); if (desc.getContainingState().equals(fState)) fState.addBundleDescription(desc); } }
addWorkspaceBundleToState(entries, models[i]);
IPluginModelBase[] models = fWorkspaceManager.getPluginModels(); for (int i = 0; i < models.length; i++) { addWorkspaceBundleToState(models[i]);