Package org.cfeclipse.snippet.snipex

Examples of org.cfeclipse.snippet.snipex.Library


            SnipEx sx = (SnipEx)element;
            //text.setText(sx.toString());
            preview.setText(sx.getSource().toString());
           
          } else if(element instanceof Library) {
            Library lib = (Library)element;
            //text.setText(lib.getName());
            preview.setText(lib.getDescription());
           
          } else if(element instanceof Snippet) {
            Snippet snip = (Snippet)element;
            text.setText(snip.getDescription());
            preview.setText(snip.getStartText()+snip.getEndText());
View Full Code Here


          System.out.println("Found " + files.length + " file snippets in " + parentElement.toString());
          return files;
        }
      }
    } else if (parentElement instanceof Library || parentElement instanceof SnipEx) {
      Library lib = (Library) parentElement;
      System.out.println("Found a library containing "+ lib.getSnippets().toArray().length + " snippets");
      return SnipTreeView.appendArrays(lib.getLibraries().toArray(), lib.getSnippets().toArray());
    }

    System.out.println("Found 0 snippets in " + parentElement.toString());
    return EMPTY_ARRAY;
  }
View Full Code Here

    if(parentElement == "root" && snipexServer != null){
      return new Object[]{snipexServer};
     
    }
    else if(parentElement instanceof Library || parentElement instanceof SnipEx) {
      Library lib = (Library)parentElement;
      return lib.getLibraries().toArray();
    }
   
   
   
    return new Object[0];
View Full Code Here

  public String getCategoryID(){
    ITreeSelection selection = (ITreeSelection)categoryTree.getSelection();
    Object firstElement = selection.getFirstElement();
   
    if (firstElement instanceof Library) {
      Library lib = (Library) firstElement;
      return lib.getID();
     
    }
    else if (firstElement instanceof SnipEx) {
      SnipEx snipEx = (SnipEx) firstElement;
      return snipEx.getID();
View Full Code Here

TOP

Related Classes of org.cfeclipse.snippet.snipex.Library

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.