コード例 #1
0
ファイル: DecoratorDefinition.java プロジェクト: oaperez/rap
 /**
  * Add a listener for the decorator.If there is an exception then inform the user and disable the
  * receiver. This method should not be called unless a check for isEnabled() has been done first.
  */
 void addListener(ILabelProviderListener listener) {
   try {
     // Internal decorator might be null so be prepared
     IBaseLabelProvider currentDecorator = internalGetLabelProvider();
     if (currentDecorator != null) {
       currentDecorator.addListener(listener);
     }
   } catch (CoreException exception) {
     handleCoreException(exception);
   }
 }
コード例 #2
0
ファイル: DecoratorDefinition.java プロジェクト: oaperez/rap
 /**
  * Return whether or not the decorator registered for element has a label property called property
  * name. If there is an exception disable the receiver and return false. This method should not be
  * called unless a check for isEnabled() has been done first.
  */
 boolean isLabelProperty(Object element, String property) {
   try { // Internal decorator might be null so be prepared
     IBaseLabelProvider currentDecorator = internalGetLabelProvider();
     if (currentDecorator != null) {
       return currentDecorator.isLabelProperty(element, property);
     }
   } catch (CoreException exception) {
     handleCoreException(exception);
     return false;
   }
   return false;
 }
コード例 #3
0
ファイル: DecoratorDefinition.java プロジェクト: oaperez/rap
 /**
  * Dispose the decorator instance and remove listeners as appropirate.
  *
  * @param disposedDecorator
  */
 protected void disposeCachedDecorator(IBaseLabelProvider disposedDecorator) {
   disposedDecorator.removeListener(WorkbenchPlugin.getDefault().getDecoratorManager());
   disposedDecorator.dispose();
 }