public ExternalSettingProvider() {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    SdrRoot sdrroot = SdrUiPlugin.getDefault().getTargetSdrRoot();

    // We add two listeners, one to the workspace and one to the SDRROOT.
    // The workspace listener will be ignored if it already exists but we check for the sdrroot
    // eAdapter
    if (sdrroot != null && !sdrroot.eAdapters().contains(sdrrootlistener)) {
      sdrroot.eAdapters().add(sdrrootlistener);
    }

    workspace.addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
  }
 /** {@inheritDoc} */
 @Override
 public List<Category> getCategories() {
   final List<Category> myList = new ArrayList<Category>();
   final SdrRoot targetSdr = SdrUiPlugin.getDefault().getTargetSdrRoot();
   targetSdr.load(null);
   myList.add(
       new ComponentCategory(
           targetSdr.getComponentsContainer().getComponents(),
           "Components",
           ComponentType.RESOURCE));
   myList.add(
       new ComponentCategory(
           targetSdr.getDevicesContainer().getComponents(), "Devices", ComponentType.DEVICE));
   myList.add(
       new ComponentCategory(
           targetSdr.getServicesContainer().getComponents(), "Services", ComponentType.SERVICE));
   myList.add(
       new ComponentCategory(
           targetSdr.getSharedLibrariesContainer().getComponents(),
           "Shared Libraries",
           ComponentType.RESOURCE));
   return myList;
 }