Пример #1
0
  /**
   * The <code>WorkbenchPart</code> implementation of this <code>IWorkbenchPart</code> method
   * disposes the title image loaded by <code>setInitializationData</code>. Subclasses may extend.
   */
  public void dispose() {
    if (imageDescriptor != null) {
      JFaceResources.getResources().destroyImage(imageDescriptor);
    }

    // Clear out the property change listeners as we
    // should not be notifying anyone after the part
    // has been disposed.
    clearListeners();
    partChangeListeners.clear();
  }
Пример #2
0
 protected void firePartPropertyChanged(String key, String oldValue, String newValue) {
   final PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
   Object[] l = partChangeListeners.getListeners();
   for (int i = 0; i < l.length; i++) {
     try {
       ((IPropertyChangeListener) l[i]).propertyChange(event);
     } catch (RuntimeException e) {
       WorkbenchPlugin.log(e);
     }
   }
 }
Пример #3
0
 /* (non-Javadoc)
  * @see org.eclipse.ui.IWorkbenchPart3#removePartPropertyListener(org.eclipse.jface.util.IPropertyChangeListener)
  */
 public void removePartPropertyListener(IPropertyChangeListener listener) {
   partChangeListeners.remove(listener);
 }
Пример #4
0
 /* (non-Javadoc)
  * @see org.eclipse.ui.IWorkbenchPart3#addPartPropertyListener(org.eclipse.jface.util.IPropertyChangeListener)
  */
 public void addPartPropertyListener(IPropertyChangeListener listener) {
   partChangeListeners.add(listener);
 }