Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IMethod


              type,
              cache == null ? null : cache.getSuperTypeHierarchy(
                  type, null));

          for (IType superClass : superClasses) {
            IMethod superClassMethod = superClass.getMethod(method
                .getElementName());

            if (superClassMethod != null) {
              PHPDocBlock superDocBlock = PHPModelUtils
                  .getDocBlock(superClassMethod);
View Full Code Here


        PHPDocBlock[] docBlocks = new PHPDocBlock[0];
        try {
          IModelElement element = methodContext.getSourceModule()
              .getElementAt(methodDeclaration.getNameStart());
          if (element instanceof IMethod) {
            IMethod method = (IMethod) element;
            if (method.getDeclaringType() != null) {
              docBlocks = PHPModelUtils
                  .getTypeHierarchyMethodDoc(
                      method.getDeclaringType(),
                      methodContext.getCache() != null ? methodContext
                          .getCache()
                          .getSuperTypeHierarchy(
                              method.getDeclaringType(),
                              null)
                          : null, method
                          .getElementName(), true,
                      null);
            } else {
              docBlocks = new PHPDocBlock[] { methodDeclaration
                  .getPHPDoc() };
View Full Code Here

      IHyperlink[] links = new IHyperlink[tvars.size()];
     
      int i =0;
      for (TemplateField field : tvars) { 
       
        IMethod method = field.getMethod();
        IDLTKSearchScope scope = SearchEngine.createSearchScope(field.getSourceModule());
        IMethod[] methods = model.findMethods(method.getElementName(), MatchRule.EXACT, 0, 0, scope, null);
       
        if (methods.length == 1) {                   
          links[i++] = new ModelElementHyperlink(wordRegion, methods[0], new OpenAction(editor));;
        }
      }
View Full Code Here

      // try to open a corresponding action
      try {
        String action = tpl.substring(0, tpl.indexOf("."));
       
        if (action.length() > 0) {         
          IMethod method = controller.getMethod(action + "Action");         
          return new ModelElementHyperlink(wordRegion, method, new OpenAction(editor));
        }
      } catch (Exception e) {
        // ignore and open the controller
      }
View Full Code Here

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

        IType type = types[0];

        final IMethod method = type.getMethod(callName.getName());

        if (method == null)
            return null;


        ModuleDeclaration module = SourceParserUtil.getModuleDeclaration(method.getSourceModule());
        ReturnTypeVisitor visitor = new ReturnTypeVisitor(method.getElementName());
        try {
            module.traverse(visitor);
        } catch (Exception e) {
            Logger.logException(e);
        }
View Full Code Here

        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

                  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

            // nope, not a viewpath, check for a route
            Route route = model.findRoute(literal, project);

            if (route != null) {

                IMethod method = model.findAction(route, project);

                if (method != null)
                    return new IModelElement[] { method };
            }
View Full Code Here

            IMethod[] methods = PhpModelAccess.getDefault().findMethods(
                    filter.getInternalFunction(), MatchRule.EXACT, 0, 0, scope,
                    null);

            if (methods.length > 0 && filter.getInternalFunction().length() > 0) {
                IMethod method = methods[0];
                try {
                    body = PHPDocumentationContentAccess.getHTMLContent(method);
                } catch (Exception e) {

                    e.printStackTrace();
View Full Code Here

TOP

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

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.