Examples of IJavaScriptUnit


Examples of org.eclipse.wst.jsdt.core.IJavaScriptUnit

      ProjectUtils.getFile(projectName, file);

    // validate the src file.
    }else{
      // JavaScriptUtils refreshes the file when getting it.
      IJavaScriptUnit src = JavaScriptUtils.getJavaScriptUnit(projectName, file);

      IJavaScriptUnit workingCopy = src.getWorkingCopy(null);

      ProblemRequestor requestor = new ProblemRequestor();
      try{
        workingCopy.discardWorkingCopy();
        workingCopy.becomeWorkingCopy(requestor, null);
      }finally{
        workingCopy.discardWorkingCopy();
      }
      List<IProblem> problems = requestor.getProblems();

      ArrayList<Error> errors = new ArrayList<Error>();
      String filename = src.getResource().getLocation().toOSString();
View Full Code Here

Examples of org.eclipse.wst.jsdt.core.IJavaScriptUnit

  {
    String project = commandLine.getValue(Options.PROJECT_OPTION);
    String file = commandLine.getValue(Options.FILE_OPTION);
    int offset = getOffset(commandLine);

    IJavaScriptUnit src = JavaScriptUtils.getJavaScriptUnit(project, file);

    CompletionRequestor collector = new CompletionRequestor();
    src.codeComplete(offset, collector);

    return collector.getResults();
  }
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.