Package org.eclipse.jdt.internal.core.search

Examples of org.eclipse.jdt.internal.core.search.JavaSearchScope


* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public void acceptMatch(String relativePath, String containerPath, char separator, SearchPattern pattern, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor monitor) {

  if (scope instanceof JavaSearchScope) {
    JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
    // Get document path access restriction from java search scope
    // Note that requestor has to verify if needed whether the document violates the access restriction or not
    AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, containerPath);
    if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the document path
      StringBuffer documentPath = new StringBuffer(containerPath.length() + 1 + relativePath.length());
      documentPath.append(containerPath);
      documentPath.append(separator);
      documentPath.append(relativePath);
View Full Code Here


        IRunnableContext context= new BusyIndicatorRunnableContext();
        int style = PackageSelectionDialog.F_REMOVE_DUPLICATES |
                    PackageSelectionDialog.F_SHOW_PARENTS |
                    PackageSelectionDialog.F_HIDE_DEFAULT_PACKAGE;

        JavaSearchScope scope = new JavaSearchScope();
        try {
          IJavaProject project = JavaCore.create(getProject());
          scope.add((JavaProject)project, JavaSearchScope.SOURCES, new HashSet<Integer>(2, 1));
        } catch(Exception ex){
          ClickPlugin.log(ex);
        }

        PackageSelectionDialog dialog = new PackageSelectionDialog(getShell(), context, style, scope);
View Full Code Here

//      return fSearchScope;

      if(project == null) {         
          return fSearchScope;
      } else {
        JavaSearchScope js = new JavaSearchScope();
        try {
          int includeMask =
            JavaSearchScope.SOURCES |
          JavaSearchScope.APPLICATION_LIBRARIES |
          JavaSearchScope.SYSTEM_LIBRARIES ;
        js.add((JavaProject) project, includeMask, new HashSet());
      } catch (JavaModelException e) {
        log(e.getMessage(), e);
        return fSearchScope;
      }
        return js;
View Full Code Here

* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public void acceptMatch(String relativePath, String containerPath, char separator, SearchPattern pattern, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor monitor) {

  if (scope instanceof JavaSearchScope) {
    JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
    // Get document path access restriction from java search scope
    // Note that requestor has to verify if needed whether the document violates the access restriction or not
    AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, containerPath);
    if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the document path
      StringBuffer documentPath = new StringBuffer(containerPath.length() + 1 + relativePath.length());
      documentPath.append(containerPath);
      documentPath.append(separator);
      documentPath.append(relativePath);
View Full Code Here

* @nooverride This method is not intended to be re-implemented or extended by clients.
*/
public void acceptMatch(String relativePath, String containerPath, char separator, SearchPattern pattern, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor monitor) {

  if (scope instanceof JavaSearchScope) {
    JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
    // Get document path access restriction from java search scope
    // Note that requestor has to verify if needed whether the document violates the access restriction or not
    AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, containerPath);
    if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the document path
      StringBuffer documentPath = new StringBuffer(containerPath.length() + 1 + relativePath.length());
      documentPath.append(containerPath);
      documentPath.append(separator);
      documentPath.append(relativePath);
View Full Code Here

          documentPath = path.toString();
      relativePath = Util.relativePath(path, 1/*remove project segment*/);
      }

    if (scope instanceof JavaSearchScope) {
      JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
      // Get document path access restriction from java search scope
      // Note that requestor has to verify if needed whether the document violates the access restriction or not
      AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, index.containerPath);
      if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the path
        if (!requestor.acceptIndexMatch(documentPath, this, participant, access))
          throw new OperationCanceledException();
      }
    } else if (scope.encloses(documentPath)) {
View Full Code Here

        documentPath = path.toString();
    relativePath = Util.relativePath(path, 1/*remove project segment*/);
    }

  if (scope instanceof JavaSearchScope) {
    JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
    // Get document path access restriction from java search scope
    // Note that requestor has to verify if needed whether the document violates the access restriction or not
    AccessRuleSet access = javaSearchScope.getAccessRuleSet(relativePath, index.containerPath);
    if (access != JavaSearchScope.NOT_ENCLOSED) { // scope encloses the path
      if (!requestor.acceptIndexMatch(documentPath, this, participant, access))
        throw new OperationCanceledException();
    }
  } else if (scope.encloses(documentPath)) {
View Full Code Here

        IRunnableContext context= new BusyIndicatorRunnableContext();
        int style = PackageSelectionDialog.F_REMOVE_DUPLICATES |
                    PackageSelectionDialog.F_SHOW_PARENTS |
                    PackageSelectionDialog.F_HIDE_DEFAULT_PACKAGE;
       
        JavaSearchScope scope = new JavaSearchScope();
        try {
          IJavaProject project = JavaCore.create(getProject());
          scope.add((JavaProject)project, JavaSearchScope.SOURCES, new HashSet(2, 1));
        } catch(Exception ex){
          ClickPlugin.log(ex);
        }
       
        PackageSelectionDialog dialog = new PackageSelectionDialog(getShell(), context, style, scope);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.core.search.JavaSearchScope

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.