Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ILightweightLabelDecorator


   * @param decoration
   */
  public void decorate(Object element, IDecoration decoration) {
    try {
      // Internal decorator might be null so be prepared
      ILightweightLabelDecorator currentDecorator = internalGetDecorator();
      if(currentDecorator == null) {
        return;
      }
     
      if (isAdaptable()) {
        String[] classes = getObjectClasses();
        for (int i = 0; i < classes.length; i++) {
          String className = classes[i];
          Object adapted = LegacyResourceSupport.getAdapter(element,
              className);
          if (adapted != null) {
            currentDecorator.decorate(adapted, decoration);
          }         
        }       
      }
      else{
        if (currentDecorator != null && element != null) {
          currentDecorator.decorate(element, decoration);
        }
      }
    } catch (CoreException exception) {
      handleCoreException(exception);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ILightweightLabelDecorator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.