Examples of SimpleSet


Examples of nz.ac.waikato.modeljunit.examples.SimpleSet

      return methods_.get(i).getName();
    }
  }

  public static void main(String[] args) throws Exception {
    FsmModel model = new SimpleSet();
    SimpleMBT tester = new SimpleMBT(model);
    for (int length = 0; length < 100; length++) {
      System.out.println(tester.generate() + ": " + model.getState());
    }
  }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.examples.SimpleSet

        done_ = new HashMap<Object, BitSet>();
        sequence_ = new ArrayList<Transition>();
    }
   
    public static void main(String[] args) {
        QuickTester qt = new QuickTester(new SimpleSet());
        qt.addListener(new VerboseListener());
        qt.generate(20);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

  private SimpleSet thrownExceptions;
  private Stack exceptionsStack;
 
  public ReferenceBinding[] find(TryStatement tryStatement, BlockScope scope) {
    this.thrownExceptions = new SimpleSet();
    this.exceptionsStack = new Stack();
    tryStatement.traverse(this, scope);
    removeCaughtExceptions(tryStatement);
   
    ReferenceBinding[] result = new ReferenceBinding[this.thrownExceptions.elementSize];
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

    return false;
  }

  public boolean visit(TryStatement tryStatement, BlockScope scope) {
    this.exceptionsStack.push(this.thrownExceptions);
    SimpleSet exceptionSet = new SimpleSet();
    this.thrownExceptions = exceptionSet;
    tryStatement.tryBlock.traverse(this, scope);
   
    this.removeCaughtExceptions(tryStatement);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

}
/*
* Removes unused indexes from disk.
*/
public void cleanUpIndexes() {
  SimpleSet knownPaths = new SimpleSet();
  IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope();
  PatternSearchJob job = new PatternSearchJob(null, SearchEngine.getDefaultSearchParticipant(), scope, null);
  Index[] selectedIndexes = job.getIndexes(null);
  for (int i = 0, l = selectedIndexes.length; i < l; i++) {
    String path = selectedIndexes[i].getIndexFile().getAbsolutePath();
    knownPaths.add(path);
  }

  if (this.indexStates != null) {
    Object[] keys = this.indexStates.keyTable;
    IPath[] locations = new IPath[this.indexStates.elementSize];
    int count = 0;
    for (int i = 0, l = keys.length; i < l; i++) {
      IPath key = (IPath) keys[i];
      if (key != null && !knownPaths.includes(key.toOSString()))
        locations[count++] = key;
    }
    if (count > 0)
      removeIndexesState(locations);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

    PackageDeclarationPattern pkgPattern = (PackageDeclarationPattern) searchPattern;
    boolean isWorkspaceScope = this.scope == JavaModelManager.getJavaModelManager().getWorkspaceScope();
    IPath[] scopeProjectsAndJars =  isWorkspaceScope ? null : this.scope.enclosingProjectsAndJars();
    int scopeLength = isWorkspaceScope ? 0 : scopeProjectsAndJars.length;
    IJavaProject[] projects = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProjects();
    SimpleSet packages = new SimpleSet();
    for (int i = 0, length = projects.length; i < length; i++) {
      IJavaProject javaProject = projects[i];
      // Verify that project belongs to the scope
      if (!isWorkspaceScope) {
        boolean found = false;
        for (int j=0; j<scopeLength; j++) {
          if (javaProject.getPath().equals(scopeProjectsAndJars[j])) {
            found = true;
            break;
          }
        }
        if (!found) continue;
      }
      // Get all project package fragment names
      this.nameLookup = ((JavaProject) projects[i]).newNameLookup(this.workingCopies);
      IPackageFragment[] packageFragments = this.nameLookup.findPackageFragments(new String(pkgPattern.pkgName), false, true);
      int pLength = packageFragments == null ? 0 : packageFragments.length;
      // Report matches avoiding duplicate names
      for (int p=0; p<pLength; p++) {
        IPackageFragment fragment = packageFragments[p];
        if (packages.addIfNotIncluded(fragment) == null) continue;
        if (encloses(fragment)) {
          IResource resource = fragment.getResource();
          if (resource == null) // case of a file in an external jar
            resource = javaProject.getProject();
          try {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

          : unitScope.getImport(importRef.tokens, false, importRef.isStatic());
        this.patternLocator.matchLevelAndReportImportRef(importRef, binding, this);
      }
      nodeSet.addMatch(node, this.patternLocator.resolveLevel(node));
    }
    nodeSet.possibleMatchingNodesSet = new SimpleSet(3);
    if (BasicSearchEngine.VERBOSE) {
      int size = nodeSet.matchingNodes==null ? 0 : nodeSet.matchingNodes.elementSize;
      System.out.print("  - node set: accurate="+size); //$NON-NLS-1$
      size = nodeSet.possibleMatchingNodesSet==null ? 0 : nodeSet.possibleMatchingNodesSet.elementSize;
      System.out.println(", possible="+size); //$NON-NLS-1$
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) {
  super(false, true, true, null, null, null, null, null, R_PATTERN_MATCH);

  this.enclosingElement = enclosingElement;
  this.knownFields = new SimpleSet();
  ((InternalSearchPattern)this).mustResolve = true;
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

  super.matchLevelAndReportImportRef(importRef, refBinding, locator);
}
protected void matchReportImportRef(ImportReference importRef, Binding binding, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
  if (this.isDeclarationOfReferencedTypesPattern) {
    if ((element = findElement(element, accuracy)) != null) {
      SimpleSet knownTypes = ((DeclarationOfReferencedTypesPattern) this.pattern).knownTypes;
      while (binding instanceof ReferenceBinding) {
        ReferenceBinding typeBinding = (ReferenceBinding) binding;
        reportDeclaration(typeBinding, 1, locator, knownTypes);
        binding = typeBinding.enclosingType();
      }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet

      for (int i = 0, l = this.javaBuilder.participants.length; i < l; i++) {
        if (this.javaBuilder.participants[i].isAnnotationProcessor()) {
          // initialize this set so the builder knows to gather CUs that define Annotation types
          // each Annotation processor participant is then asked to process these files AFTER
          // the compile loop. The normal dependency loop will then recompile all affected types
          this.filesWithAnnotations = new SimpleSet(1);
          break;
        }
      }
    }
  }
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.