Package com.dubture.symfony.core.index.SymfonyElementResolver

Examples of com.dubture.symfony.core.index.SymfonyElementResolver.TemplateField


  @Override
  public void apply(ICompletionReporter reporter) throws Exception {

    VariableFieldContext ctx = (VariableFieldContext) getContext();
    String varName = ctx.getVariable();
    TemplateField var = SymfonyModelAccess.getDefault().findTemplateVariableType("$" + varName, ctx.getSourceModule());
   
    if (var == null) {
      return;
    }
   
    String className = var.getClassName();
    IDLTKSearchScope scope = SearchEngine.createSearchScope(ctx.getSourceModule().getScriptProject());
   
    String prefix = ctx.getPrefix();
   
    SourceRange range = getReplacementRange(getContext());
   
    if (className != null) {

      IType[] types =  PhpModelAccess.getDefault().findTypes(var.getQualifier(), var.getClassName(), MatchRule.EXACT, 0, 0, scope, null);
     
     
      if (types.length == 1) {
        IType type = types[0];
View Full Code Here


        ASTNode node = expressionGoal.getExpression();
       
        if (node instanceof VariableReference) {
         
          VariableReference variable = (VariableReference) node;
          TemplateField element = SymfonyModelAccess.getDefault().findTemplateVariableType(variable.toString(), context.getSourceModule());
          
           if (element != null) {
                        
             String viewName = PathUtils.createViewPathFromTemplate(context.getSourceModule(), false);
            
             if (viewName != null && element.getViewPath().equals(viewName))
               return new TemplateVariableGoalEvaluator(goal, element);
           }
        }
      }     
    }       
View Full Code Here

TOP

Related Classes of com.dubture.symfony.core.index.SymfonyElementResolver.TemplateField

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.