/** @return selected content or <code>null</code> */
  @Nullable
  private static Content getContent(final DataContext context) {
    Content[] contents = ViewContext.CONTENT_KEY.getData(context);
    if (contents != null && contents.length == 1) return contents[0];

    ContentManager contentManager = ContentManagerUtil.getContentManagerFromContext(context, true);
    if (contentManager == null) {
      return null;
    }
    return contentManager.getSelectedContent();
  }
 @Override
 @Nullable
 public Object getData(@NonNls final String dataId) {
   if (ViewContext.CONTEXT_KEY.is(dataId)) {
     return myViewContext;
   } else if (ViewContext.CONTENT_KEY.is(dataId)) {
     List<Content> contents = getContents();
     return contents.toArray(new Content[contents.size()]);
   }
   return null;
 }