Package net.sourceforge.veditor.parser

Examples of net.sourceforge.veditor.parser.OutlineDatabase$ScanProjectJob


  }
   
  public static OutlineElement searchComponent(HdlDocument doc,
       String componentName) {
   
    OutlineDatabase database = doc.getOutlineDatabase();
   
    if (database != null) {
      OutlineElement[] elements = database.findTopLevelElements("");
      for (int i = 0; i < elements.length; i++) {
        if(elements[i] instanceof PackageDeclElement ){
          OutlineElement[] subPackageElements=elements[i].getChildren();
          for(int j=0; j< subPackageElements.length; j++){
            if (subPackageElements[j] instanceof ComponentDeclElement
View Full Code Here


      }
     
      if(!atLeftOfComponentInstantion) { 
        for(OutlineElement element:definitions) {
          String commentString;
          OutlineDatabase cc=doc.getOutlineDatabase();
          OutlineContainer pp=cc.getOutlineContainer(element.getFile());
          results+=pp.getCommentsNear(element);
          if(doc instanceof VhdlDocument){
            commentString="--";
          }
          else{
View Full Code Here

   * Scans the outline and builds a hierarchy tree
   * @param doc Document used to start deriving the hierarchy
   * @return true if the scan is successful, false otherwise
   */
  public boolean scanOutline(HdlDocument doc){
    OutlineDatabase database;       
    Vector<ArchitectureElement> archList;
    OutlineElement[] topLevelElements;
    Set<String> entityNameList;
    Vector<String> topLevelEntities=new Vector<String>();
    String entityName;
   
   
    m_TopLevelEntities.clear();
    m_EntityArchList.clear();
    m_ElementDeclList.clear();
    try {
      database = (OutlineDatabase)
        doc.getProject().getSessionProperty(VerilogPlugin.getOutlineDatabaseId());
    } catch (CoreException e) {
      e.printStackTrace();
      return false;
    }
    ////////////////////////////////////////////
    //scan for architectures   
    topLevelElements = database.findTopLevelElements("");
    for (int i=0;i<topLevelElements.length;i++){
      //architectures
      if (topLevelElements[i] instanceof ArchitectureElement) {
        ArchitectureElement arch = (ArchitectureElement) topLevelElements[i];
        String archEntityName=arch.GetEntityName().toUpperCase();
View Full Code Here

  /**
   * utility function for getting OutlineDatabase
   */
  private OutlineDatabase getOutlineDatabase() {
    IProject project = m_Editor.getHdlDocument().getProject();
    OutlineDatabase database = null;
    try {
      database = (OutlineDatabase) project
          .getSessionProperty(VerilogPlugin.getOutlineDatabaseId());
    } catch (CoreException e) {
      return null;
View Full Code Here

        if (elements.size() == 1) {
          Object element = elements.getFirstElement();

          if (element instanceof VerilogInstanceElement) {
            VerilogInstanceElement instance = (VerilogInstanceElement) element;
            OutlineDatabase database = getOutlineDatabase();
            if (database != null) {
              OutlineElement module = database.findDefinition(instance);
              if (module != null)
                m_Editor.showElement(module);
            }

          } else if (element instanceof OutlineElement) {
View Full Code Here

      super();
      setText("Rescan All");
    }
    public void run()
    {
      OutlineDatabase database = getOutlineDatabase();
      if(database != null)
        database.scanProject();
    }
View Full Code Here

    // if project == null, the context scanning is running
    // no update outline and error markers

    if (project != null) {
      // in outline scanning
      OutlineDatabase database;
      database = OutlineDatabase.getProjectsDatabase(project);
      if (database != null) {
        m_OutlineContainer = database.getOutlineContainer(file);
      }
    }
   
    taskTokenPattern=new Pattern[taskCommentTokens.length];
        for(int i=0; i< taskCommentTokens.length;i++){
View Full Code Here

      return null;
    }
  }

  private void checkVariables(VariableStore store) {
    OutlineDatabase database = OutlineDatabase.getProjectsDatabase(m_Project);
   
    for (VariableStore.Symbol sym : store.collection()) {
      updateConnection(database, sym);

      boolean notUsed = false;
View Full Code Here

      }
    }
  }

  private void checkInstance()  {
    OutlineDatabase database = OutlineDatabase.getProjectsDatabase(m_Project);

    InstanceStore store = instanceStore;
    for(InstanceStore.Instance inst : store.collection()) {
      String moduleName = inst.getName();
      OutlineElement module = database.findTopLevelElement(moduleName);
      if (module == null) {
        if (preferences.unresolvedModule) {
          int line = inst.getLine();
          warning(line, CANNOT_RESOLVED_MODULE, moduleName);
        }
View Full Code Here

    {
      if (isMatch(replace, rwords[i]))
        matchList.add(getSimpleProposal(rwords[i], offset, length));
    }

    OutlineDatabase database = doc.getOutlineDatabase();
    OutlineElement[] topLevelElements=database.findTopLevelElements(replace);
    for(OutlineElement element: topLevelElements){
      if (element instanceof VerilogModuleElement) {       
        matchList.add(new VerilogInstanceCompletionProposal(doc,element, offset, length));
      }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.veditor.parser.OutlineDatabase$ScanProjectJob

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.