Package com.dubture.symfony.core.model

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


    public static Bundle unpackBundle(String metadata) {

        try {
            JSONObject json = (JSONObject) parser.parse(metadata);
            Bundle bundle = new Bundle(null, (String) json.get(Bundle.NAME));
            bundle.setPath((String) json.get(Bundle.PATH));

            return bundle;
        } catch (ParseException e) {

            Logger.logException(e);
View Full Code Here


                  bundleTypes = PhpModelAccess.getDefault().findTypes(b.getElementName(), MatchRule.EXACT, 0, 0, projectScope, null);
                }
                if (bundleTypes.length == 1) {
                    ModelElement bType = (ModelElement) bundleTypes[0];
                    if (CodeAssistUtils.startsWithIgnoreCase(bType.getElementName(), prefix)) {
                        Bundle bundleType = new Bundle(bType, b.getElementName());
                        reporter.reportType(bundleType, ":", range);
                    }
                }
            }
        } else {
View Full Code Here

     
      if (parts.length > 0) {
        String bundle = parts[0];
       
        if (bundle.startsWith("@")) {         
          Bundle b = SymfonyModelAccess.getDefault().findBundle(bundle.replace("@", ""), project);         
          if (b != null) {           
            return b.getPath().toString() + path.replace(bundle, "");
          }
        }       
      }
    }
   
View Full Code Here

  {

      SymfonyModelAccess modelAccess = SymfonyModelAccess.getDefault();
      IPath truncated = webpath.removeFirstSegments(2);
      String bundleName = truncated.segment(0) + "bundle";
      Bundle bundle = modelAccess.findBundle(bundleName, project);
     
      if (bundle == null) {
          return null;
      }
     
      IPath bundlePath = bundle.getPath();
      IPath resourcePath = bundlePath.append("Resources").append("public").append(truncated.removeFirstSegments(1));
      return resourcePath.removeFirstSegments(1);
     
  }
View Full Code Here

      }
     
     
    } else if (element instanceof Bundle) {
     
      Bundle bundle = (Bundle) element;
     
      StyledString styledString = new StyledString(bundle.getElementName(), style);     
      cell.setText(styledString.toString());
      cell.setImage(SymfonyPluginImages.get(SymfonyPluginImages.IMG_OBJS_BUNDLE2));
     
     
    }
View Full Code Here

      IScriptProject sProject = DLTKCore.create(project);     
      List<Bundle> bundles = model.findBundles(sProject);     
      return bundles.toArray();
    } else if (parentElement instanceof Bundle) {
     
      Bundle bundle = (Bundle) parentElement;   
     
      List<Service> services = model.findServices(bundle.getPath());
     
      return services.toArray();
    }
    return EMTPY;
  }
View Full Code Here

    List<Bundle> bundles = model.findBundles(project);
    List<TransUnit> units = model.findTranslations(project.getPath());   
   
    for (TransUnit unit : units) {

      Bundle targetBundle = null;

      for (Bundle bundle : bundles) {     
        if (unit.path.startsWith(bundle.getTranslationPath())) {
          targetBundle = bundle;
          break;
        }
      }

      if (targetBundle.getScriptProject() == null) {
        targetBundle.setProject(project);
      }

      if (targetBundle != null && CodeAssistUtils.startsWithIgnoreCase(unit.name, prefix)) {
        Translation trans = new Translation(targetBundle,unit);       
        reporter.reportType(trans, "", range)
View Full Code Here

                if (bundleTypes.length == 1) {
                   
                    ModelElement bType = (ModelElement) bundleTypes[0];
                   
                    if (CodeAssistUtils.startsWithIgnoreCase(bType.getElementName(), prefix)) {
                        Bundle bundleType = new Bundle(bType, b.getElementName());
                        reporter.reportType(bundleType, ":", range);                       
                    }
                }
            }          
        // complete the controller part: "Bundle:|
View Full Code Here

TOP

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

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.