Examples of GrammarsNode


Examples of com.google.code.apis.rest.client.Wadl.GrammarsNode

 
  public static void listGrammars(final ApplicationNode application, final TreeItem applicationTreeItem) {
    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(applicationTreeItem, WadlXml.grammarsNode);
   
    if ((application.getGrammars() != null) && (application.getGrammars().getAllIncludes().size() > 0)) {
      GrammarsNode grammars = application.getGrammars();
      GrammarsItem grammarsItem = new GrammarsItem(grammars, applicationTreeItem);
      TreeItem grammarsTreeItem = new TreeItem(grammarsItem);
      grammarsTreeItem.setUserObject(WadlXml.grammarsNode);
      applicationTreeItem.addItem(grammarsTreeItem);
      final VerticalPanel includePanel = new VerticalPanel();     
     
      // include items     
      grammarsTreeItem.addItem(includePanel);
      IncludeItem.listIncludes(grammars, includePanel);   
      grammarsTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);
        
      // close grammars item      
      TreeItem grammarsCloseItem = new TreeItem(new GenericClosingItem(WadlXml.grammarsNode));
      grammarsCloseItem.setUserObject(WadlXml.grammarsNode);
      applicationTreeItem.addItem(grammarsCloseItem);
    }   
    else {
      if (!WadlTreeRoot.containsButton(buttonTreeItems, ApplicationItem.button + WadlXml.grammarsNode)) {     
        // add grammars button     
        HorizontalPanel addGrammarsPanel = new HorizontalPanel();
             
        Button addGrammarsButton = new Button(GuiFactory.strings.addGrammars());
        addGrammarsButton.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {         
            application.addGrammars(new GrammarsNode(application));
            application.getGrammars().addInclude(GuiFactory.strings.newInclude());
            listGrammars(application, applicationTreeItem);                   
          }
        });
        addGrammarsPanel.add(addGrammarsButton);
View Full Code Here

Examples of com.google.code.apis.rest.client.Wadl.GrammarsNode

        public void onClick(Widget sender) {                   
          Iterator addSchemaIterator = reallyAddSchemaLocations.iterator();
          while (addSchemaIterator.hasNext()) {
            String include = (String) addSchemaIterator.next();
            if (Analyzer.application.getGrammars() == null) {
              Analyzer.application.addGrammars(new GrammarsNode(Analyzer.application));
            }
            Analyzer.application.grammars.addInclude(include);
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
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.