public void dispose() {
   for (SapphireActionPresentation presentation : this.presentations) {
     try {
       presentation.dispose();
     } catch (Exception e) {
       SapphireUiFrameworkPlugin.log(e);
     }
   }
 }
    @Override
    public Object[] getElements(final Object element) {
      final List<IResource> elements = new ArrayList<IResource>();

      if (this.roots.size() == 1) {
        final IContainer root = this.roots.get(0);

        try {
          for (IResource child : root.members()) {
            if (child.isAccessible()) {
              elements.add(child);
            }
          }
        } catch (CoreException e) {
          SapphireUiFrameworkPlugin.log(e);
        }
      } else {
        elements.addAll(this.roots);
      }

      return elements.toArray(new IResource[elements.size()]);
    }