Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.ISourceModule


          assertTrue(folderDelta.getElement() instanceof IScriptFolder);
         
          for (IModelElementDelta moduleDelta : folderDelta.getAffectedChildren()) {
            IModelElement element = moduleDelta.getElement();
            assertTrue(element instanceof ISourceModule);
            ISourceModule sourceModule = (ISourceModule) element;
           
            visitSourceModule(moduleDelta, sourceModule);
          }
        }
      }
View Full Code Here


      new DeeSourceElementProvider(requestor).provide(parsedModule);
    }
  }
 
  public ParsedModule getParsedModuleOrNull_fromBuildStructure(IModuleSource input) {
    ISourceModule sourceModule = tryCast(input, ISourceModule.class);
    if(sourceModule == null) {
      sourceModule = tryCast(input.getModelElement() , ISourceModule.class);
    }
    if(sourceModule != null) {
      return getParsedModuleOrNull_fromWorkingCopy(sourceModule);
View Full Code Here

 
  public CompletionSearchResult runCodeCompletion(IModuleSource moduleSource, int offset, Path compilerPath)
      throws CoreException {
   
    if(moduleSource instanceof ISourceModule) {
      ISourceModule sourceModule = (ISourceModule) moduleSource;
      return runCodeCompletion(sourceModule, offset, compilerPath);
    }
   
    Path filePath = DToolClient_Bad.getFilePath(moduleSource);
    // Update source to engine server.
View Full Code Here

    return new SourceModuleFinder(moduleName, packagesPath).findImportTarget(deeProject);
  }

  protected static ISourceModule getExistingSourceModule(IScriptFolder scriptFolder, String moduleName) {
    for (String validExtension : ModuleNamingRules.VALID_EXTENSIONS) {
      ISourceModule sourceModule = scriptFolder.getSourceModule(moduleName + validExtension);
      if(DLTKModelUtils.exists(sourceModule)) {
        return sourceModule;
      }
    }
    return null;
View Full Code Here

  }
 
  // BM: param i is something like endOffset-1, due to weird API
  @Override
  public IModelElement[] select(IModuleSource sourceUnit, int offset, int i) {
    ISourceModule sourceModule = (ISourceModule) sourceUnit.getModelElement();
    Path filePath = DToolClient_Bad.getFilePathOrNull(sourceModule);
    if(filePath == null) {
      return null;
    }
   
View Full Code Here

    Module module = defUnit.getModuleNode();
    if(module == null) {
      return null;
    }
    try {
      ISourceModule moduleUnit = SourceModuleFinder.findModuleUnit(module, sourceModule.getScriptProject());
      return DeeModelEngine.findCorrespondingModelElement(defUnit, moduleUnit);
    } catch (ModelException e) {
      return null;
    }
  }
View Full Code Here

        if (ComposerPluginConstants.AUTOLOAD_NAMESPACES.equals(context.getSourceModule().getElementName()) == false) {
            return;
        }
       
        try {
            ISourceModule sourceModule = context.getSourceModule();    
            ModuleDeclaration moduleDeclaration = SourceParserUtil.getModuleDeclaration(sourceModule);
            moduleDeclaration.traverse(new AutoloadVisitor(context.getSourceModule()));
        } catch (Exception e) {
            Logger.logException(e);
        }       
View Full Code Here

    }
    // process all modules
    int remainingWork = resourceToModuleInfos.size();
    for (Iterator i = resourceToModuleInfos.entrySet().iterator(); i.hasNext();) {
      final Map.Entry entry = (Map.Entry) i.next();
      final ISourceModule module = (ISourceModule) entry.getKey();
      final ModuleInfo info = (ModuleInfo) entry.getValue();
      monitor.subTask(NLS.bind(Messages.RutaCheckBuilder_processing, module.getElementName(),
              Integer.toString(remainingWork)));
      codeModels.clear();
      --remainingWork;
    }
  }
View Full Code Here

  }

  public void build(IBuildContext context) throws CoreException {
    final ModuleDeclaration ast = (ModuleDeclaration) context
            .get(IBuildContext.ATTR_MODULE_DECLARATION);
    ISourceModule sourceModule = context.getSourceModule();
    generateDescriptorResources(sourceModule, ast);
  }
View Full Code Here

    if (!(mdObj instanceof ModuleDeclaration)) {
      return;
    }
    ModuleDeclaration md = (ModuleDeclaration) mdObj;
    IProblemReporter problemReporter = context.getProblemReporter();
    ISourceModule smod = context.getSourceModule();

    // get Types:
    Set<String> types = null;
    try {
      types = importBasicTypeSystem();
    } catch (InvalidXMLException e1) {
      System.err.println("ERROR: Failed to get BasicTypeSystem!! " + this.toString());
      // problemReporter.reportProblem(problem)
    } catch (IOException e1) {
      System.err.println("ERROR: Failed to get BasicTypeSystem!! " + this.toString());
    }
    if (types == null) {
      types = new HashSet<String>();
    }

    // traverse:
    ISourceLineTracker linetracker = context.getLineTracker();
    String fileName = smod.getElementName();
    try {
      ASTVisitor visitor = new TypeCheckerVisitor(problemReporter, linetracker, fileName, types);
      md.traverse(visitor);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.ISourceModule

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.