Examples of CheatSheetView


Examples of org.eclipse.ui.internal.cheatsheets.views.CheatSheetView

      page.addPart(CheatSheetHelpPart.ID, true);
      helpPart.addPage(page);
      helpPart.showPage(CheatSheetHelpPart.ID);
    }
    else {
      CheatSheetView view = ViewUtilities.showCheatSheetView();
      if (view == null) {
        return;
      }
      // Depending on which constructor was used open the cheat sheet view from a
      // URL, an XML string or based on the id
      if(url != null) {
        view.setInput(id, name, url);
      } else if (xml != null) {
        view.setInputFromXml(id, name, xml, basePath);
      } else {
        view.setInput(id);
      }
      IWorkbenchPage page = view.getSite().getWorkbenchWindow().getActivePage();
      page.bringToTop(view);
    }
  }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.views.CheatSheetView

        opened = false;
      }
      if (!opened) {  
        String message = NLS.bind(Messages.ERROR_OPENING_FILE, (new Object[] {selectFileCombo.getText()}));
        status = new Status(IStatus.ERROR, ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID, ParserStatusUtility.PARSER_ERROR, message, null);           
        CheatSheetView view = ViewUtilities.showCheatSheetView();  
        view.getCheatSheetViewer().showError(message);
      }
  }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.views.CheatSheetView

        id = id.substring(0, extensionIndex);
    }
    // Use the id as the name
    URL url = null;
    boolean opened = false
    CheatSheetView view = ViewUtilities.showCheatSheetView();
    if (view == null) {
      return;
    }
    try {
      url = new URL(selectUrlCombo.getText())
      view.getCheatSheetViewer().setInput(id, id, url, new DefaultStateManager(), true);
        opened = true;
      } catch (MalformedURLException e) {
        opened = false;
      }
      if (!opened) {    
        String message = NLS.bind(Messages.ERROR_OPENING_FILE, (new Object[] {selectUrlCombo.getText()}));
        status = new Status(IStatus.ERROR, ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID, ParserStatusUtility.PARSER_ERROR, message, null);      
        view.getCheatSheetViewer().showError(message);
     
  }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.views.CheatSheetView

  private String getActiveCheatSheetID() {
    //get the active cheatsheet view, if opened
    IWorkbenchPage page = getActiveWorkbenchPage();

    if( page != null ) {
      CheatSheetView view = (CheatSheetView) page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
      if (view != null) {
        CheatSheetElement content = view.getContent();
        if (content != null) {
          return content.getID();
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.