Пример #1
0
 /** Delete a panel from Show Panel sub menu */
 public void deletePanel(Editor panel) {
   if (log.isDebugEnabled()) {
     log.debug("deletePanel");
   }
   if (panelsList.size() == 0) {
     return;
   }
   for (int i = 0; i < panelsList.size(); i++) {
     Object o = panelsList.get(i);
     if (o == panel) {
       // Editors that are their own TargetFrame dispose themselves
       if (!panel.equals(panel.getTargetFrame())) {
         panel.getTargetFrame().dispose();
       }
       panelsList.remove(panel);
       panelsSubMenu.remove(i);
       // If there are no panels on the list,
       // replace the 'No Panels' menu item
       if (panelsList.size() == 0) {
         panelsSubMenu.add(noPanelsItem);
       }
       return;
     }
   }
 }
  @Override
  public void dispose() {
    if (mySelectedEditor != null) {
      for (final Map.Entry<PropertiesFile, Editor> entry : myEditors.entrySet()) {
        if (mySelectedEditor.equals(entry.getValue())) {
          writeEditorPropertyValue(mySelectedEditor, entry.getKey(), null);
        }
      }
    }

    VirtualFileManager.getInstance().removeVirtualFileListener(myVfsListener);
    myDisposed = true;
    Disposer.dispose(myStructureViewComponent);
    releaseAllEditors();
  }
Пример #3
0
 public void editorDataChanged(Editor e) {
   if (e != null && e.equals(getEditor())) fillData();
 }