Package net.sourceforge.syncyoursecrets.gui.rcp.model

Examples of net.sourceforge.syncyoursecrets.gui.rcp.model.IPWEditor


  private void reuseEditor(IWorkbenchPage page, TableViewer viewer,
      IEditorInput input, String editorId) throws PartInitException {
    logger.debug("entering reuseEditor for EditorId " + editorId);
    IEditorReference[] editorReferences = page.getEditorReferences();

    IPWEditor editor = null;
    for (IEditorReference ref : editorReferences) {
      if (ref.getEditor(true) instanceof IPWEditor) {
        IPWEditor pwEditor = (IPWEditor) ref.getEditor(true);
        logger.debug("Editor present: " + pwEditor.getId());
        if (editorId.equals(pwEditor.getId())) {
          editor = pwEditor;
        } else {
          // this is not the editor we are looking for
          logger.debug("Closing editor " + pwEditor.getId());
          page.closeEditor(pwEditor, false);
        }
      }
    }
    if (editor != null) {
View Full Code Here

TOP

Related Classes of net.sourceforge.syncyoursecrets.gui.rcp.model.IPWEditor

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.