Package org.eclipse.jdt.core.search

Examples of org.eclipse.jdt.core.search.IJavaSearchScope


  public Set<IType> locateJavaConfigs(IProject project,
      IProgressMonitor monitor) {
    Set<IType> types = new HashSet<IType>();
    IJavaProject javaProj = JdtUtils.getJavaProject(project);
    if (javaProj != null) {
      IJavaSearchScope sources = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProj },
          IJavaSearchScope.SOURCES);
      SearchPattern bootAutoConfigPattern = SearchPattern.createPattern("org.springframework.boot.autoconfigure.EnableAutoConfiguration",
          IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE,
          SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE);
      Set<IType> candidates = org.springframework.ide.eclipse.core.java.JdtUtils.searchForJavaConfigs(bootAutoConfigPattern, sources);
View Full Code Here


   *
   * @param button
   */
  private void handleButtonPressed(Button button) {

    IJavaSearchScope searchScope = SearchEngine.createWorkspaceScope();
    FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),
        false, new ProgressMonitorDialog(getShell()), searchScope,
        IJavaSearchConstants.CLASS);

    dialog.setMessage("Select an type"); //$NON-NLS-1$
View Full Code Here

 
  private SelectionDialog createFilteredTypesDialog() {
    SelectionDialog dialog = null;
    IJavaProject javaProj = JdtUtils.getJavaProject(project.getProject());
    if (javaProj != null) {
      IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProj });
      Set<IType> annotatedTypes =org.springframework.ide.eclipse.core.java.JdtUtils.searchForJavaConfigs(scope);
      final Set<String> filteredResults = new HashSet<String>();
      for (IType type : annotatedTypes) {
        filteredResults.add(type.getPackageFragment().getElementName() + "/" + type.getTypeQualifiedName('.'));
      }
View Full Code Here

   *
   * @param button
   */
  private void handleButtonPressed(Button button) {

    IJavaSearchScope searchScope = SearchEngine.createWorkspaceScope();
    FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),
        false, new ProgressMonitorDialog(getShell()), searchScope,
        IJavaSearchConstants.CLASS);

    dialog.setMessage("Select an type"); //$NON-NLS-1$
View Full Code Here

  protected void handleButtonPressed(Button widget) {
    try {
      IType throwable = JdtUtils.getJavaType(WebflowUtils.getActiveWebflowConfig()
          .getProject().getProject(), "java.lang.Throwable");
      IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(throwable
          .newTypeHierarchy(new NullProgressMonitor()).getAllSubtypes(throwable));
      FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(), false,
          new ProgressMonitorDialog(getShell()), searchScope, IJavaSearchConstants.CLASS);
      dialog.setBlockOnOpen(true);
      dialog.setTitle("Type Selection");
View Full Code Here

   *
   * @param button
   */
  private void handleButtonPressed(Button button) {

    IJavaSearchScope searchScope = SearchEngine.createWorkspaceScope();
    FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),
        false, new ProgressMonitorDialog(getShell()), searchScope,
        IJavaSearchConstants.CLASS);

    dialog.setMessage("Select an type"); //$NON-NLS-1$
View Full Code Here

   */
  private void handleButtonPressed(Button button) {

    if (button.equals(this.browseTypeButton)) {

      IJavaSearchScope searchScope = SearchEngine.createWorkspaceScope();
      FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(), false,
          new ProgressMonitorDialog(getShell()), searchScope, IJavaSearchConstants.CLASS);

      dialog.setMessage("Select an type"); //$NON-NLS-1$
      dialog.setBlockOnOpen(true);
View Full Code Here

  private void createSubtypeProposals(final ContentAssistRequest contentAssistRequest, final CompletionProposalInvocationContext context, IType superType) {
    IJavaProject jproject = findProject(contentAssistRequest);

    try {
      IJavaSearchScope hierarchyScope = SearchEngine.createHierarchyScope(superType);
      IJavaSearchScope projectScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { jproject });
      IJavaSearchScope scope = new IntersectingJavaSearchScope(projectScope, hierarchyScope);
      SearchEngine searchEngine = new SearchEngine();

      char[] typeName = null;
      char[] packageName = null;
      if (!contentAssistRequest.getMatchString().isEmpty()) {
View Full Code Here

              } else {
                typeName = contentAssistRequest.getMatchString().toCharArray();
              }
            }
           
            IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(new IJavaElement[] { jproject });
            SearchEngine searchEngine = new SearchEngine();
            try {
              searchEngine.searchAllTypeNames(packageName, SearchPattern.R_PATTERN_MATCH, typeName, SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CAMELCASE_MATCH, IJavaSearchConstants.TYPE, searchScope, new TypeNameRequestor() {
                public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
                  String sPackageName = new String(packageName);
View Full Code Here

     
      try {
        IType superType = project.findType("javafx.scene.Parent");
       
        if( superType != null ) {
          IJavaSearchScope searchScope = SearchEngine.createStrictHierarchyScope(project, superType, true, false, null);   
         
          SelectionDialog dialog = JavaUI.createTypeDialog(getShell(), PlatformUI.getWorkbench().getProgressService(), searchScope, IJavaElementSearchConstants.CONSIDER_CLASSES, false, "");
          dialog.setTitle("Find Preloader");
          if (dialog.open() == Window.OK) {
            IType type = (IType) dialog.getResult()[0];
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.search.IJavaSearchScope

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.