/** * Returns all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless * whether or not they are checked or not on the Target Platform preference page. * <p> * If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart * is skipped and not included. * </p> * <p> * Equivalent to <code>getAllModels(true)</code> * </p> * * @return all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless * whether or not they are checked on the Target Platform preference page. */ public IPluginModelBase[] getAllModels() { return getAllModels(true); }
/** * Returns all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless * whether or not they are checked or not on the Target Platform preference page. * <p> * If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart * is skipped and not included. * </p> * <p> * Equivalent to <code>getAllModels(true)</code> * </p> * * @return all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless * whether or not they are checked on the Target Platform preference page. */ public IPluginModelBase[] getAllModels() { return getAllModels(true); }
@Override public Object[] getChildren(Object o) { return PDECore.getDefault().getModelManager().getAllModels(); }
/** * Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins * and (possibly) fragments, regardless whether or not they are * checked on the Target Platform preference page. * <p> * If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart * is skipped and not included. * </p> * <p> * The returned result includes fragments only if <code>includeFragments</code> * is set to true * </p> * @param includeFragments a boolean indicating if fragments are desired in the returned * result * @return ll plug-ins and (possibly) fragments in the workspace as well as all plug-ins * and (possibly) fragments, regardless whether or not they are * checked on the Target Platform preference page. */ public static IPluginModelBase[] getAllModels(boolean includeFragments) { return PDECore.getDefault().getModelManager().getAllModels(includeFragments); }
/** * Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins * and (possibly) fragments, regardless whether or not they are * checked on the Target Platform preference page. * <p> * If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart * is skipped and not included. * </p> * <p> * The returned result includes fragments only if <code>includeFragments</code> * is set to true * </p> * @param includeFragments a boolean indicating if fragments are desired in the returned * result * @return ll plug-ins and (possibly) fragments in the workspace as well as all plug-ins * and (possibly) fragments, regardless whether or not they are * checked on the Target Platform preference page. */ public static IPluginModelBase[] getAllModels(boolean includeFragments) { return PDECore.getDefault().getModelManager().getAllModels(includeFragments); }
@Override public Object[] getChildren(Object parentElement) { if (parentElement instanceof IDeferredWorkbenchAdapter) { if (PDECore.getDefault().getModelManager().isInitialized()) return PDECore.getDefault().getModelManager().getAllModels(); Object[] children = fManager.getChildren(parentElement); return children; } if (parentElement instanceof IPluginModelBase) { IPluginModelBase model = (IPluginModelBase) parentElement; File file = new File(model.getInstallLocation()); if (!file.isFile()) { FileAdapter adapter = new ModelFileAdapter(model, file, PDECore.getDefault().getSearchablePluginsManager()); return adapter.getChildren(); } } if (parentElement instanceof FileAdapter) { return ((FileAdapter) parentElement).getChildren(); } if (parentElement instanceof IPackageFragmentRoot || parentElement instanceof IPackageFragment || parentElement instanceof ICompilationUnit || parentElement instanceof IStorage) return fJavaProvider.getChildren(parentElement); return new Object[0]; }