Example #1
0
        public IEnumerable <string> GenerateImports(string sourceNamespace, List <string> myNamespaceList, string destPackage)
        {
            yield return("com.google.gwt.core.client.JsArrayInteger");

            yield return("java.util.ArrayList");

            yield return("tickbox.web.shared.util.JsArrayIntegerIterable");

            yield return("tickbox.web.shared.util.Utils");

            var myNamespace = sourceNamespace + string.Join("", myNamespaceList.Select(n => "." + n));

            if ((_prop.PropType.GenericTypeArguments[0].Namespace ?? "") != myNamespace)
            {
                yield return(string.Format("{0}.{1}", destPackage + string.Join("", DtGenUtil.CalculateRelativeNamespace((_prop.PropType.GenericTypeArguments[0].Namespace ?? ""), sourceNamespace).Select(n => "." + n.ToLowerInvariant())), _prop.PropType.GenericTypeArguments[0].Name));
            }


            if (_prop.CanWrite)
            {
                yield return("tickbox.web.shared.util.JsArrayIntegerWrapper");

                yield return("tickbox.web.shared.util.JavaOnlyUtils");

                yield return("tickbox.web.shared.util.Func");

                yield return("java.util.List");
            }
        }
        public IEnumerable <string> GenerateImports(string sourceNamespace, List <string> myNamespaceList, string destPackage)
        {
            yield return("tickbox.web.shared.util.IJsArray");

            yield return("tickbox.web.shared.util.JsArrayWrapper");

            var myNamespace = sourceNamespace + string.Join("", myNamespaceList.Select(n => "." + n));

            if ((_prop.PropType.GenericTypeArguments[0].Namespace ?? "") != myNamespace)
            {
                yield return
                    (string.Format("{0}.{1}",
                                   destPackage +
                                   string.Join("",
                                               DtGenUtil.CalculateRelativeNamespace((_prop.PropType.GenericTypeArguments[0].Namespace ?? ""),
                                                                                    sourceNamespace).Select(n => "." + n.ToLowerInvariant())),
                                   _prop.PropType.GenericTypeArguments[0].Name));


                yield return
                    (string.Format("{0}.{1}",
                                   destPackage +
                                   string.Join("",
                                               DtGenUtil.CalculateRelativeNamespace((_prop.PropType.GenericTypeArguments[0].Namespace ?? ""),
                                                                                    sourceNamespace).Select(n => "." + n.ToLowerInvariant())),
                                   "I" + _prop.PropType.GenericTypeArguments[0].Name));
            }
        }
Example #3
0
        public IEnumerable <string> GenerateTModelImports(string sourceNamespace, List <string> relativeNamespace, string dtoPackage, string destTModelPackage)
        {
            yield return("static org.tessell.model.properties.NewProperty.listProperty");

            yield return("org.tessell.model.properties.ListProperty");

//            yield return "org.tessell.model.validation.rules.Required";
            yield return(string.Format("{0}.{1}", dtoPackage + string.Join("", DtGenUtil.CalculateRelativeNamespace((_prop.PropType.GenericTypeArguments[0].Namespace ?? ""), sourceNamespace).Select(n => "." + n.ToLowerInvariant())), _prop.PropType.GenericTypeArguments[0].Name));
        }
Example #4
0
        public IEnumerable <string> GenerateInterfaceImports(string sourceNamespace, List <string> relativeNamespace, string destPackage)
        {
            var myNamespace = sourceNamespace + string.Join("", relativeNamespace.Select(n => "." + n));

            if ((_prop.PropType.GenericTypeArguments[0].Namespace ?? "") != myNamespace)
            {
                yield return(string.Format("{0}.{1}", destPackage + string.Join("", DtGenUtil.CalculateRelativeNamespace((_prop.PropType.GenericTypeArguments[0].Namespace ?? ""), sourceNamespace).Select(n => "." + n.ToLowerInvariant())), _prop.PropType.GenericTypeArguments[0].Name));
            }


            if (_prop.CanRead)
            {
                yield return("java.util.List");
            }
        }
Example #5
0
        public IEnumerable <string> GenerateImports(string sourceNamespace, List <string> myNamespaceList, string destPackage)
        {
            var myNamespace = sourceNamespace + string.Join("", myNamespaceList.Select(n => "." + n));

            if ((_prop.PropType.Namespace ?? "") != myNamespace)
            {
                yield return
                    (string.Format("{0}.{1}",
                                   destPackage +
                                   string.Join("",
                                               DtGenUtil.CalculateRelativeNamespace((_prop.PropType.Namespace ?? ""), sourceNamespace)
                                               .Select(n => "." + n.ToLowerInvariant())),
                                   _prop.PropType.Name));
            }
        }
Example #6
0
        public IEnumerable <string> GenerateTModelImports(string sourceNamespace, List <string> relativeNamespace, string dtoPackage, string destTModelPackage)
        {
            var myNamespace = sourceNamespace + string.Join("", relativeNamespace.Select(n => "." + n));

            if ((_prop.PropType.Namespace ?? "") != myNamespace)
            {
                yield return(string.Format("{0}.{1}Tm", destTModelPackage + string.Join("", DtGenUtil.CalculateRelativeNamespace((_prop.PropType.Namespace ?? ""), sourceNamespace).Select(n => "." + n.ToLowerInvariant())), _prop.PropType.Name));
            }
//            yield return "static org.tessell.model.properties.NewProperty.enumProperty";
//            yield return "org.tessell.model.properties.EnumProperty";
//            yield return "org.tessell.model.validation.rules.Required";
        }