Examples of WorkingCopyOwner


Examples of org.aspectj.org.eclipse.jdt.core.WorkingCopyOwner

      case K_COMPILATION_UNIT :
        CompilationUnitDeclaration compilationUnitDeclaration = null;
        try {
          NodeSearcher searcher = null;
          org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = null;
          WorkingCopyOwner wcOwner = this.workingCopyOwner;
          if (this.typeRoot instanceof ICompilationUnit) {
              /*
               * this.compilationUnitSource is an instance of org.aspectj.org.eclipse.jdt.internal.core.CompilationUnit that implements
               * both org.aspectj.org.eclipse.jdt.core.ICompilationUnit and org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit
               */
 
View Full Code Here

Examples of org.eclipse.dltk.core.WorkingCopyOwner

  }

  public ISourceModule getWorkingCopy(String path, String source,
      boolean computeProblems) throws ModelException {
    if (this.wcOwner == null)
      this.wcOwner = new WorkingCopyOwner() {
      };
    return getWorkingCopy(path, source, this.wcOwner, computeProblems);
  }
View Full Code Here

Examples of org.eclipse.dltk.core.WorkingCopyOwner

    // configure nature
    IProjectDescription desc = project.getDescription();
    desc.setNatureIds(new String[] { PHPNature.ID });
    project.setDescription(desc, null);

    WorkingCopyOwner.setPrimaryBufferProvider(new WorkingCopyOwner() {
      public IBuffer createBuffer(ISourceModule workingCopy) {
        ISourceModule original = workingCopy.getPrimary();
        IResource resource = original.getResource();
        if (resource != null) {
          if (resource instanceof IFile) {
View Full Code Here

Examples of org.eclipse.dltk.core.WorkingCopyOwner

        public void endReporting() {/*not interested*/}
        public boolean isActive() {
          return true;
        }
      };
      WorkingCopyOwner workingCopyOwner= new WorkingCopyOwner() {
        public IProblemRequestor getProblemRequestor(ISourceModule workingCopy) {
          return problemRequestor;
        }
      };
      ISourceModule wc= input.getWorkingCopy(workingCopyOwner, null, new NullProgressMonitor());
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

public class ChangeText {

    public void inCompilationUnit(ICompilationUnit compilationUnit, int position, int length, String newText) throws JavaModelException {
        try {
            WorkingCopyOwner owner = DefaultWorkingCopyOwner.PRIMARY;
            ICompilationUnit workingCopy = compilationUnit.getWorkingCopy(owner, null);
            IBuffer buffer = workingCopy.getBuffer();
            buffer.replace(position, length, newText);
            workingCopy.reconcile(ICompilationUnit.NO_AST, true, owner, null);
            compilationUnit.commitWorkingCopy(true, null);
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

      case K_COMPILATION_UNIT :
        CompilationUnitDeclaration compilationUnitDeclaration = null;
        try {
          NodeSearcher searcher = null;
          org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = null;
          WorkingCopyOwner wcOwner = this.workingCopyOwner;
          if (this.typeRoot instanceof ICompilationUnit) {
              /*
               * this.compilationUnitSource is an instance of org.eclipse.jdt.internal.core.CompilationUnit that implements
               * both org.eclipse.jdt.core.ICompilationUnit and org.eclipse.jdt.internal.compiler.env.ICompilationUnit
               */
 
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

    }

    public WorkingCopyOwner getWorkingCopyOwner() {

        if (fWorkingCopyOwner == null) {
            fWorkingCopyOwner = new WorkingCopyOwner() {
              /* (non-Javadoc)
               * @see org.eclipse.jdt.core.WorkingCopyOwner#getProblemRequestor(org.eclipse.jdt.core.ICompilationUnit)
               */
              public IProblemRequestor getProblemRequestor(ICompilationUnit workingCopy) {
                return CompilationUnitHelper.this.getProblemRequestor();
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

      case K_COMPILATION_UNIT :
        CompilationUnitDeclaration compilationUnitDeclaration = null;
        try {
          NodeSearcher searcher = null;
          org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = null;
          WorkingCopyOwner wcOwner = this.workingCopyOwner;
          if (this.typeRoot instanceof ICompilationUnit) {
              /*
               * this.compilationUnitSource is an instance of org.eclipse.jdt.internal.core.CompilationUnit that implements
               * both org.eclipse.jdt.core.ICompilationUnit and org.eclipse.jdt.internal.compiler.env.ICompilationUnit
               */
 
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

        final List<Tuple<IJavaElement, CompletionProposal>> ret = new ArrayList<Tuple<IJavaElement, CompletionProposal>>();

        IClasspathEntry entries[] = getClasspathEntries();
        //Using old version for compatibility with eclipse 3.2
        ICompilationUnit unit = new WorkingCopyOwner() {
        }.newWorkingCopy(name, entries, null, new NullProgressMonitor());
        unit.getBuffer().setContents(contents);
        CompletionProposalCollector collector = createCollector(filterCompletionName, ret, unit);

        unit.codeComplete(completionOffset, collector); //fill the completions while searching it
View Full Code Here

Examples of org.eclipse.jdt.core.WorkingCopyOwner

      case K_COMPILATION_UNIT :
        CompilationUnitDeclaration compilationUnitDeclaration = null;
        try {
          NodeSearcher searcher = null;
          org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = null;
          WorkingCopyOwner wcOwner = this.workingCopyOwner;
          if (this.typeRoot instanceof ICompilationUnit) {
              /*
               * this.compilationUnitSource is an instance of org.eclipse.jdt.internal.core.CompilationUnit that implements
               * both org.eclipse.jdt.core.ICompilationUnit and org.eclipse.jdt.internal.compiler.env.ICompilationUnit
               */
 
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.