Package tk.eclipse.plugin.jspeditor.compiler

Examples of tk.eclipse.plugin.jspeditor.compiler.CompileResult


  public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
    if(file == null){
      return new ICompletionProposal[0];
    }
    try {
      CompileResult result = JSPCompiler.compile(viewer.getDocument().get());
      IJavaProject project = JavaCore.create(file.getProject());
      if(project != null){
        ICompilationUnit unit = HTMLUtil.getTemporaryCompilationUnit(project);
        HTMLUtil.setContentsToCU(unit, result.toString());
       
        CompletionProposalCollector collector = new CompletionProposalCollector(project);
        int headerLength = result.getHeader().length();
        unit.codeComplete(headerLength + offset,
            collector, DefaultWorkingCopyOwner.PRIMARY);
       
        IJavaCompletionProposal[] proposals = collector.getJavaCompletionProposals();
        List<ICompletionProposal> list = new ArrayList<ICompletionProposal>();
View Full Code Here

TOP

Related Classes of tk.eclipse.plugin.jspeditor.compiler.CompileResult

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.