Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IType


        if (controller == null) {
            return null;
        }

        // find the type
        IType types[] = PhpModelAccess.getDefault().findTypes(controller,
                MatchRule.EXACT, 0, 0,
                SearchEngine.createSearchScope(module.getScriptProject()), null);

        // type is ambigous
        if (types.length != 1)
View Full Code Here


    * @param sourceModule
    * @return
    */
    public TemplateField findTemplateVariableType(String variableName, ISourceModule sourceModule) {
        // find the corresponding controller for the template
        IType controller = findControllerByTemplate(sourceModule);
        if (controller == null) {
            return null;
        }

        // create a searchscope for the Controller class only
View Full Code Here

        IType[] types = findTypes(bundle, MatchRule.EXACT, 0, 0, scope, null);

        if (types.length != 1)
            return null;

        IType bundleType = types[0];
        return  (ScriptFolder) bundleType.getSourceModule().getParent();

    }
View Full Code Here

        ViewPath vPath = new ViewPath(route.getViewPath());

        if (!vPath.isValid())
            return null;

        IType type = null;

        IType[] controllers = findBundleControllers(vPath.getBundle(), project);

        if (controllers == null) {
            String msg = "Unable to find bundle controllers ";
            if (vPath != null)
                msg += vPath.getBundle();

            if (project != null) {
                msg += " project: " + project.getElementName();
            }
            Logger.debugMSG(msg);
            return null;
        }

        String ctrl = vPath.getController() + "Controller";

        for (IType t : controllers) {

            if (t.getElementName().equals(ctrl)) {
                type = t;
                break;
            }
        }

        if (type == null) {
            return null;
        }

        IMethod method = type.getMethod(vPath.getTemplate() + "Action");

        if (method != null)
            return method;

        return type.getMethod(vPath.getTemplate());


    }
View Full Code Here

        }

        IType[] types = findTypes(sb.toString(), entity, MatchRule.EXACT, 0, 0, scope, null);

        if (types.length == 1) {
            IType t = types[0];
            entityCache.put(key, t);
            return t;
        }
        entityCache.put(key, NULL_ENTRY);
        return null;
View Full Code Here

                  IDLTKSearchScope scope = SearchEngine.createSearchScope(source);
                  SymfonyModelAccess model = SymfonyModelAccess.getDefault();
                  IType[] types = model.findTypes(fqn, MatchRule.EXACT, 0, 0, scope, null);
                 
                  if (types.length == 1) {                   
                    IType type = types[0];                   
                    IMethod method = type.getMethod(sourceMethod.getElementName());
                    route = model.getRoute(type, method);                   
                  }
                 
                }
              }
View Full Code Here

                    IType[] paramTypes = model.findTypes(param.getType(), MatchRule.EXACT, 0, 0, scope, null);

                    if (paramTypes.length == 1) {

                      IType paramType = paramTypes[0];                     
                      String statement = "use " + paramType.getTypeQualifiedName("\\") + ";";
                     
                      if (!statements.contains(statement))                     
                        statements.add(statement);
                    }
                  }
View Full Code Here

            String name = template.getElementName();

            try {

                if (module.getTypes().length > 0) {
                    IType type = module.getTypes()[0];
                    if (type.getTypes().length > 0) {
                        IType sType = type.getTypes()[0];
                        name = sType.getFullyQualifiedName().replace("$", "\\");

                        body = PHPDocumentationContentAccess.getHTMLContent(sType);

                    }
                }
View Full Code Here

            // next search for a service
            Service service = model.findService(literal, project.getPath());

            if (service != null) {

                IType serviceType = model.findServiceType(service, project);

                if (serviceType != null)
                    return new IModelElement[] { serviceType };

            }
View Full Code Here

           
            IType[] controllers = model.findBundleControllers(bundle, project);
           
            for (IPath path : model.findBundleViewPaths(bundle, project)) {
               
                IType t  = null;
                for (IType type : controllers) {
                   
                    String pathString = path.removeLastSegments(path.segmentCount()-1).toString();
                   
                    if (type.getElementName().contains(pathString)) {
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.IType

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.