Examples of ISourceModule


Examples of org.eclipse.dltk.core.ISourceModule

      return;
    }
    if (context.getBuildType() != IBuildContext.RECONCILE_BUILD) {
      ModelManager.getModelManager().getIndexManager().waitUntilReady();
    }
    ISourceModule workingCopy = context.getSourceModule();
    //if (context.getBuildType() == IBuildContext.RECONCILE_BUILD) {
      //try {
        //workingCopy = context.getSourceModule().getWorkingCopy(null);
      //} catch (ModelException e) {
      //  Logger.logException(e);
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

    if (textEditor instanceof PHPStructuredEditor) {
      IModelElement editorElement = ((PHPStructuredEditor) textEditor)
          .getModelElement();
      if (editorElement != null) {
       
        ISourceModule sourceModule = ((ModelElement) editorElement)
            .getSourceModule();
               
        try {

          if (sourceModule.getTypes().length != 1) {
            return;
          }
          ModuleDeclaration module = SourceParserUtil.getModuleDeclaration(sourceModule);
          ImplementationValidator validator = new ImplementationValidator(sourceModule);
          String code = "";
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

      return null;
    }
  }

  private static IModelElement getSourceElement(IModelElement element, int offset, int length) throws CoreException {
    ISourceModule sourceModule = (ISourceModule) element.getAncestor(IModelElement.SOURCE_MODULE);
    if (sourceModule == null) return null;

    return getSourceElement(sourceModule, offset, length);
  }
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

  }
 
 
  private void generate(final List<GetterSetterEntry> entries, final int modifier, final boolean generateComments, final boolean fluent) throws Exception {

    ISourceModule source = type.getSourceModule();     
    String name = type.getElementName().replace("$", "");     
    StringBuffer buffer = new StringBuffer(name);     
    buffer.replace(0, 1, Character.toString(Character.toUpperCase(name.charAt(0))));     
    name = buffer.toString();     
         
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

//        "Element is not a type");
//    }
//  }
 
  protected QuerySpecification createQuery(DefUnit defunit) throws ModelException {
    ISourceModule sourceModule = EditorUtility.getEditorInputModelElement(deeEditor, false);
    IType type = (IType) DeeModelEngine.findCorrespondingModelElement(defunit, sourceModule);
    if (type == null) {
      return super.createQuery(defunit);
    }
    DLTKSearchScopeFactory factory = DLTKSearchScopeFactory.getInstance();
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

    String moduleFQName = defunit.getModuleFullyQualifiedName();
    if(moduleFQName == null) {
      isInsideInterpreterEnvironment = false;
    } else {
      ModuleFullName nameDescriptor = new ModuleFullName(moduleFQName);
      ISourceModule element = SourceModuleFinder.findModuleUnit(scriptProject,
        nameDescriptor.getPackages(), nameDescriptor.getModuleSimpleName());
      // review this
      isInsideInterpreterEnvironment = element == null? false : factory.isInsideInterpreter(element);
    }
    return isInsideInterpreterEnvironment;
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

  public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
    ITextEditor editor = tryCast(getEditor(), ITextEditor.class);
    if(editor == null) {
      return null;
    }
    ISourceModule sourceModule = EditorUtility.getEditorInputModelElement(editor, false);
    if(sourceModule == null) {
      return null;
    }
   
    int offset = hoverRegion.getOffset();
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

  public static ISourceModule getSourceModule(String filepath) {
    return DLTKCore.createSourceModuleFrom(getFile(filepath));
  }
 
  public static ISourceModule getSourceModule(String srcFolder, String filepath) {
    ISourceModule sourceModule = DLTKCore.createSourceModuleFrom(getFile(srcFolder + "/" + filepath));
    assertTrue(sourceModule.exists());
    return sourceModule;
  }
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

  public static class ElementsAndDefUnitVisitor {
   
    public void visitElementsAndNodes(IModelElement element, int depth) throws CoreException,
    InvalidPathExceptionX {
      if(element instanceof ISourceModule) {
        final ISourceModule sourceModule = (ISourceModule) element;
        Path filePath = DLTKUtils.getFilePath(sourceModule);
        ParsedModule parseModule = DToolClient.getDefaultModuleCache().getParsedModuleOrNull(filePath);
        if(parseModule == null)
          return;
       
View Full Code Here

Examples of org.eclipse.dltk.core.ISourceModule

    assertTrue(file.exists());
    return file;
  }
 
  public ISourceModule getSourceModule(String pathString) {
    ISourceModule sourceModule = DLTKCore.createSourceModuleFrom(getFile(pathString));
    assertTrue(sourceModule != null);
    return sourceModule;
  }
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.