Package com.dubture.symfony.core.model

Examples of com.dubture.symfony.core.model.ViewPath


     
      if (wordRegion == null)
        return null;

      String path = document.get(wordRegion.getOffset(), wordRegion.getLength());
      ViewPath viewPath = new ViewPath(path);
     
      //   "AcmeDemoBundle::layout.html.twig" 2 part viewpath
      // link the whole thing to the template
      if (path.contains("::")) {
View Full Code Here


            // We found at least of annotation with class Template, create a view path
            String bundle = namespaceDeclaration.getName().replace("\\Controller", "").replace("\\", "");
            String controller = classDeclaration.getName().replace("Controller", "");
            String action = methodDeclaration.getName().replace("Action", "");

            ViewPath path = new ViewPath(String.format("%s:%s:%s", bundle, controller, action));
           
            if (!path.isValid()) {
                return false;
            }

            IModelElement[] templates = SymfonyModelAccess.getDefault().findTemplates(bundle, controller, project);
            this.template = null;
View Full Code Here

          }
          else path = "";
        }

        if (path != null) {               
          viewPath = new ViewPath(path);
          return true;
        }

      } catch (Exception e) {
View Full Code Here

    {
        if (path == null || !path.contains(".")) {
            return null;
        }
       
        IModelElement template = SymfonyModelAccess.getDefault().findTemplate(new ViewPath(path), project);
        if (template != null && template instanceof SourceModule) {
            try {
                SourceModule module = (SourceModule) template;
                return module;
            } catch (Exception e) {
View Full Code Here

                @Override
                public void proposalAccepted(IContentProposal proposal)
                {
                    parent = proposal.getContent();
                    IModelElement template = model.findTemplate(new ViewPath(parent), scriptProject);

                    if (template != null && template instanceof SourceModule) {

                        try {
View Full Code Here

         }
         int startOffset = SymfonyTextSequenceUtilities.readViewPathStartIndex(statement);
         String path = getDocument().getText().substring(statement.getOriginalOffset(startOffset), offset);
        
         if (path != null) {               
           viewPath = new ViewPath(path);
           return true;
         }
        
      } catch (Exception e) {
        Logger.logException(e);
View Full Code Here

TOP

Related Classes of com.dubture.symfony.core.model.ViewPath

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.