Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.IType


            String name = bundle.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


     
      TemplateVariableCompletionContext ctxt = (TemplateVariableCompletionContext) getContext();
     
      SymfonyModelAccess model = SymfonyModelAccess.getDefault();
      ISourceModule module = ctxt.getSourceModule();
      IType controller = model.findControllerByTemplate(module);
      List<TemplateField>variables = model.findTemplateVariables(controller);
      String viewPath = PathUtils.createViewPathFromTemplate(ctxt.getSourceModule(), true);
     
      SourceRange range = getReplacementRange(ctxt);
     
View Full Code Here

   
    String prefix = context.getPrefix();
   
    for (Route route : routes) {

      IType controller = model.findController(route.bundle, route.controller, context.getSourceModule().getScriptProject());
     
      if (controller == null) {
        continue;
      }
     
View Full Code Here

  private ISourceModule input;
  private PHPStructuredEditor editor;

  private IHyperlink getControllerlink(ViewPath viewPath, IRegion wordRegion) {
   
    IType controller = SymfonyModelAccess.getDefault().findController(viewPath.getBundle(), viewPath.getController(), input.getScriptProject());

    if (controller != null) {     
     
      String tpl = viewPath.getTemplate();
     
      // 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

   
    String prefix = context.getPrefix();
   
    for (Route route : routes) {

      IType controller = model.findController(route.bundle, route.controller, context.getSourceModule().getScriptProject());
     
      if (controller == null)
        continue;
     
      if (CodeAssistUtils.startsWithIgnoreCase(route.name, prefix)) {
View Full Code Here

                    return false;
                }

                SymfonyModelAccess model = SymfonyModelAccess.getDefault();
                ISourceModule module = getSourceModule();
                IType controller = model.findControllerByTemplate(module);
                variables = model.findTemplateVariables(controller);
                viewPath = PathUtils.createViewPathFromTemplate(getSourceModule(), false);

                return true;
View Full Code Here

        } else {
            List<Entity> entities = doctrineModel.getEntities(project);
            //TODO: cache the entities
            for (Entity entity : entities) {
                EntityAlias newAliase = new EntityAlias(alias.getBundleAlias(), entity.getElementName());
                IType type = model.findEntity(newAliase, project);

                if (type != null) {
                    reporter.reportType(new Entity((ModelElement) type, type.getElementName()), "", range);
                }
            }
        }
    }
View Full Code Here

        String viewName = sourceModule.getPath().lastSegment();

        if (keepFileExtension == false)
            viewName = PathUtils.getViewFromTemplatePath(sourceModule.getPath());

        IType controller = model.findControllerByTemplate(sourceModule);

        if (controller == null)
            return null;

        String bundle = ModelUtils.extractBundleName(controller.getFullyQualifiedName());

        if (bundle == null)
            return null;

        String controllerPart = controller.getElementName().replace(SymfonyCoreConstants.CONTROLLER_CLASS, "");
        return String.format("%s:%s:%s", bundle, controllerPart, viewName);

    }
View Full Code Here

  public static String getURL(String base, Route route, IScriptProject project) {
   
    String URL = null;   
   
    List<Resource> resources = SymfonyResourceAccess.getDefault().getResources(project);
    IType controller = SymfonyModelAccess.getDefault().findController(route.bundle, route.controller, project);       
    String prefix = null;

    if (controller != null) {         
      for (Resource resource : resources) {     
        if (resource.type == Resource.ROUTE_RESOURCE) {
          String controllerp = ModelUtils.resolveControllerShortcut(resource.path, project);             
          if (controllerp != null) {
            if (controllerp.equals(controller.getPath().toString())) {
              prefix = resource.prefix;
              break;
            }
          }
        }                   
View Full Code Here

          types = findTypes(namespace, className, MatchRule.EXACT, 0, 0, scope, null);
      }
        if (types.length != 1)
            return null;

        IType type = types[0];

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

        if (method == null)
            return null;

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.