/* (non-Javadoc)
   * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
   */
  public Color getForeground(Object element) {
    if (fMethodsViewer.isShowInheritedMethods() && element instanceof IFunction) {
      IFunction curr = (IFunction) element;
      IMember declaringType = curr.getDeclaringType();

      if (declaringType == null || !declaringType.equals(fMethodsViewer.getInput())) {
        return JFaceResources.getColorRegistry().get(ColoredViewersManager.INHERITED_COLOR_NAME);
      }
    }
    return null;
  }
 public void run(IStructuredSelection selection) {
   try {
     IMember member = getMember(selection);
     if (member == null || !ActionUtil.isEditable(getShell(), member)) return;
     ISourceRange range = member.getNameRange();
     RefactoringExecutionStarter.startChangeTypeRefactoring(
         member.getJavaScriptUnit(), getShell(), range.getOffset(), range.getLength());
   } catch (CoreException e) {
     ExceptionHandler.handle(
         e,
         RefactoringMessages.ChangeTypeAction_dialog_title,
         RefactoringMessages.ChangeTypeAction_exception);
   }
 }