Examples of IDLTKSearchScope


Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

  private OpenTypeSelectionDialog2 getDialog(int type, String title, String message, boolean multi) {
    int falseFlags = 0;
    int trueFlags = 0;

    IDLTKSearchScope scope = SearchEngine.createSearchScope(getScriptFolder().getScriptProject());

    falseFlags = (type == NewElementWizardPage.CLASSES ? PHPFlags.AccTrait | PHPFlags.AccInterface
        | PHPFlags.AccNameSpace : 0);
    trueFlags = (type == NewElementWizardPage.INTERFACES ? PHPFlags.AccInterface : 0);
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

    namespaceField.setDialogFieldListener(new IDialogFieldListener() {

      @Override
      public void dialogFieldChanged(DialogField field) {
        List<String> props = new ArrayList<String>();
        IDLTKSearchScope scope = SearchEngine.createSearchScope(getScriptFolder().getScriptProject());
        IType[] types = PhpModelAccess.getDefault().findTypes(((StringDialogField) field).getText(),
          MatchRule.PREFIX,
          PHPFlags.AccNameSpace,
          0,
          scope,
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

    if (element == null || !(element instanceof SourceType)) {
      return;
    }

    IDLTKSearchScope scope = SearchEngine.createSearchScope(module.getScriptProject());
    SourceType type = (SourceType) element;
    SourceRange range = getReplacementRange(context);
    String prefix = context.getPrefix();

    IType[] projectTypes = PhpModelAccess.getDefault().findTypes(type.getElementName(), MatchRule.EXACT, 0, 0, scope, null);
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

      return (Boolean) typeCache.get(key);
   
    if (type == null || "object".equals(type))
      return (Boolean) typeCache.put(key, new Boolean(false));
   
    IDLTKSearchScope scope = SearchEngine.createSearchScope(project);
    IType[] types = PhpModelAccess.getDefault().findTypes(type, MatchRule.EXACT, 0, 0,
        scope, new NullProgressMonitor());
   
    return (Boolean) typeCache.put(key, new Boolean(types.length > 0));
   
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

   */
  public static Map<String, IMethod> getImportedMethods(IType type) {
    Map<String, IMethod> ret = new HashMap<String, IMethod>();
   
    UseTrait parsed = TraitUtils.parse(type);
    IDLTKSearchScope scope = TraitUtils.createSearchScope(type);
   
    Map<String, IType> traits = new HashMap<String, IType>();
    Set<String> usedMethods = new HashSet<String>();
    for (String traitName : parsed.getTraits()) {
      if (findType(type.getSourceModule(), traitName) != null) {
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

   * @since 0.18
   */
  public static IType[] findTypes(IScriptProject project, String fqn) {
    Set<IType> list = new HashSet<IType>();
   
    IDLTKSearchScope searchScope = SearchEngine.createSearchScope(project);
    IType[] types = PhpModelAccess.getDefault().findTypes(fqn,
        MatchRule.EXACT, 0, 0, searchScope, new NullProgressMonitor());

    for (IType type : types) {
      if (fqn.equals(type.getFullyQualifiedName(BACK_SLASH))) {
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

      boolean isRes = isResolved(sFullName);
      parts.put(part, isRes);

      // add problem if namespace is empty
      if (!isRes) {
        IDLTKSearchScope searchScope = SearchEngine
            .createSearchScope(context.getProject());
        IType[] types = PhpModelAccess.getDefault().findTypes(
            sFullName.substring(1) + BACK_SLASH, MatchRule.PREFIX, 0, 0, //$NON-NLS-1$
            searchScope, new NullProgressMonitor());
        if (types.length == 0) {
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

    }
   
    Collection<TypeReference> interfaces = getClassDeclaration().getInterfaceList();
   
    List<IMethod> unimplemented = new ArrayList<IMethod>();   
    IDLTKSearchScope scope = SearchEngine.createSearchScope(project);   
    PhpModelAccess model = PhpModelAccess.getDefault();   
    IType nss = PHPModelUtils.getCurrentNamespace(sourceModule, getClassDeclaration().getNameStart());
    String search = nss != null ? nss.getElementName() + BACK_SLASH + getClassDeclaration().getName() : getClassDeclaration().getName();
     
    IType classType = context != null ? PDTModelUtils.findType(sourceModule, search) : null;
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

         
          try {
           
            int repOffset = getReplacementOffset();
            int length = getReplacementLength();
            IDLTKSearchScope scope = SearchEngine.createSearchScope(input.getScriptProject());
            String type = document.get(repOffset, length);
            IType[] types = PhpModelAccess.getDefault().findTypes(null, type, MatchRule.EXACT, 0, 0, scope, new NullProgressMonitor());
           
            if (types.length == 1) {
              this.type = types[0];
View Full Code Here

Examples of org.eclipse.dltk.core.search.IDLTKSearchScope

  }
 
  @Override
  public IContentProposal[] getProposals(String contents, int position) {
    List<PHPTypeContentProposal> props = new ArrayList<PHPTypeContentProposal>();
    IDLTKSearchScope scope = SearchEngine.createSearchScope(element);
    @SuppressWarnings("restriction")
    IType[] types = PhpModelAccess.getDefault().findTypes(contents, MatchRule.PREFIX,
        0, PHPFlags.AccNameSpace | PHPFlags.AccInterface, scope, null);

    for (IType type : types) {
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.