Hi Simon,
Hello Vladan,
You are on the right track with setting the namespace root, but how it works is that you set the namespace root for any package at the root level. So your packages under that package generate namespaces in the code.
I still have the problem with the namespaces, but I've been able to bypass that by creating a new Root node called "CompanyName" and in it project like "Application" as a view, and in the view packages that correspond to my projects in VS.NET (like "BLL", "DAL", etc...) do you know a better way to do this ? (and have EA generate the correct namespace like "CompanyName.ApplicationName.ProjectName")
To generate a readonly property first create the Get part of the property. That will have created a new method in your class with the stereotype <<property>>.
Edit this operation and click the Advanced button. Select ReadOnly from the list.
Then when you generate your code it will be readonly.
This works now, altho I would suggest a little more user friendly approach to this in the future, it's a bit confusing (my idea was if you turn off the "read" or "write" part of the property that it automaticly gets the deserved "readonly" or "writeonly" attribute
I'd need more details to help with your problem of incorrectly generated import statements. So if you could give more details that would be great. What is meant to happen here is that the appropriate import statement for every class that is needed by the classes in that file.
I'd also like to mention that there are code generation templates that allow customization of what is generated and there is also quite a few options that can be set that change how it works too.
Simon
ok, about this part...
if I have something like:
RootNode is called "Netmedia"
Inside it a View is called "ApplicationName"
Inside that view I have a package called "BLL" which is something like my root package, inside that package I have two levels down:
Netmedia
---- ApplicationName
--------- Entities
------------- CategoryEntites
------------- ProductEntites
------------- *...Entites
and if I have inside of "ProductEntites" 2 classes, like "Class1" and "Class1Collection" which uses "Class1"
in the Class1Collection I will have:
Imports Entites.ProductEntites; (Plus the VBNet syntax does not have a ";")
Namespace Entites.ProductEntites
Public Class Class1Collection
Public _class1 As Class1
End Class ' Class1Collection
End Namespace ' ProductEntites
which is not correct, because this Imports statement does not belong here.
so can you please tell me where to turn this off, or where in the templates I can find this (I've searched, but do not see it...)
ok, one last issue I found out for code generation is... I want my packages from the project in EA to be created as folders in my project in VS.NET (if you see the example from above with thoose sub packages, example is this:
Netmedia
---- ApplicationName
---------
Entities-------------
CategoryEntites-------------
ProductEntites-------------
*...Entitesany idea how to acomplish this ? (I've also tried to generate code, put then the classes into some directories named as packages, but EA afterwards just doesnt see them, and generates them again in the root of the project)
ok, thx allot for your efforts
hope to hearing from you soon
Vladan