Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mrpmorris

Pages: [1]
1
Suggestions and Requests / Re: "Website" forum
« on: April 19, 2012, 07:55:48 pm »
Quote
EA's menu structure changes almost each version. So it's not wonder that the documentation gets behind...

q.

I wasn't criticising the fact that it is wrong, I was suggesting a way on the forum for people to help to identify instances.  If someone at Sparkx agrees with the suggestion/correction they can add it to some internal bug tracking system

2
Suggestions and Requests / "Website" forum
« on: April 19, 2012, 07:01:38 pm »
Perhaps you should have a forum for discussing changes on the website?

For example
http://www.sparxsystems.com/uml_tool_guide/mda_transformations/importingtransforms.htm

Says that "Import Reference Data" is in the Tools menu, but it is in Project->Model Import/Export


3
General Board / Re: e-Book for Enterprise Architect available
« on: April 06, 2012, 10:35:11 pm »
Does it contain information about

1: Creating profiles
2: Affecting the way these profiles generate source code
3: How to do simple stuff like the various ways of creating properties?

4
General Board / Re: Default language to C#
« on: April 19, 2012, 11:18:01 pm »
Thanks :)

5
General Board / Default language to C#
« on: April 19, 2012, 10:57:39 pm »
Is there a way to tell EA I want new classes to default to C# and not Java?

6
General Board / Re: Profile problem
« on: April 19, 2012, 10:41:46 pm »
My opinion of that is that it is unintuitive, and shouldn't even be necessary.

Thanks for the answer though! :)

7
General Board / Profile problem
« on: April 19, 2012, 10:02:11 pm »
I have created a profile, then saved it as a profile.
Then I created a class using my NHEntity stereotype from the tool box.
I see my "TableName" tagged value in NHibernateProfile as expected.

I have now added another attribute to my NHEntity metaclass, saved the profile, and then reimported the profile into my test project.  New NHEntity classes added to my model have the new IDType value, but NHEntities created before the re-import do not.

----UPDATE----
This is also apparent in specifying that an attribute is an enumeration.  Here is the profile



At first the enumeration wasn't in the profile and the IDType was a string.  I later changed it to an enumeration.

After re-importing the profile I see that the class I originally added to my test project does not realise it is an enumeration



Whereas a class I add to the diagram after re-importing does


----/UPDATE----


It seems the template's metaclass attributes and their types are only added to the new class when it is created, and not re-applied when the profile is re-imported.

This would be a major pain if I had a large model and for some reason had to re-import a modified profile.  Is there a step I am missing, or does EA simply not do this?

8
General Board / Re: Duplicate attribute when CamelCasing
« on: April 13, 2012, 05:14:41 pm »
Quote
See here:
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/model_transformation/mdastyletransforms.html

Geert

Thanks Geert.  Hopefully I will be able to read that this weekend.  Hopefully it will describe how to "override" the existing C# template without having to copy it and do this kind of thing, will it?

9
General Board / Re: Duplicate attribute when CamelCasing
« on: April 13, 2012, 04:42:04 pm »
Quote
Essentially, don't change attribute names (or any other name) in code generation templates.

If you need to ensure particular naming conventions then you'll need to do it via a transformation.

How is that done?  Ideally what I would like to be able to do is to add an attribute to my model, and depending on a tagged value "HasUserCode" do this

HasUserCode=False
public virtual string AttributeName { get; set; }

HasUserCode=True
private string attributeName;
public string AttributeName
{
  get { return attributeName; }
  set { attributeName = value; }
}

How would I achieve that?  My trial has nearly expired and I don't think there is any way I will be able to work it out in time.

Thanks

10
General Board / Duplicate attribute when CamelCasing
« on: April 07, 2012, 07:33:53 am »
I have added a stereotype overload for the code template "attribute declaration" (as below.)  If I do not camel case the attribute name then on subsequent code generations EA notices I have an "ID" attribute already in the source file and doesn't add it again, however if I do camel case the attribute name then EA sees there is no "ID" (because it is "iD") and applies this template again.

How do I prevent that from happening?


%PI=""%
private
 %RESOLVE_QUALIFIED_TYPE(".", "int")%
 %CONVERT_NAME(attName, "Pascal Case", "Camel Case")%;\n
%CONVERT_SCOPE(attScope)%
 virtual
 %RESOLVE_QUALIFIED_TYPE(".", "int")%
 %attName%\n
{\n
      get { return %CONVERT_NAME(attName, "Pascal Case", "Camel Case")%; }\n
      private set { %CONVERT_NAME(attName, "Pascal Case", "Camel Case")% = value; }\n
}\n
%endTemplate%

11
General Board / Profiles and properties
« on: April 06, 2012, 10:30:35 pm »
I created a profile which extends Class and Property.  The attributed I added to class appears in the properties window for the class when I set the PersistentEntity stereotype.  But when I create a property how do I

1: Mark it as virtual?
2: Tell EA I don't want a private field + getter + setter but just want the shortened format "public virtual Guid ID { get; protected set; }
3: How do I set the profile attributes on that property?  Unlike the Class Properties window I do not see a tree item for my profile in the property's "Properties" window, and EA keeps insisting on giving it a "property" stereotype
4: How do I make the setter protected and the getter public? (Set Scope is always disabled)

Thanks

12
General Board / NHibernate
« on: April 02, 2012, 10:28:36 pm »
Does anyone have some kind of NHibernate template for EA, or a blog describing any experiences?

Pages: [1]