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.


Topics - Thomas Arnbjerg

Pages: 1 [2] 3
16
Is there a way to either:

1) Avoid having EA generating includes for known data types?
2) Somehow configure the format of includes generated by EA - e.g. switch from backslash to forward slash, use relative paths.

17
Hi all,
Is it possible to set the code generation destination for a C++ class created in javascript? - i.e. the contents of the 'Path' field in 'Generate code'

18
I'm adding a method in Javascript like this:

function addSerialize(element){
      
   var signal as EA.Element;
   signal = element;
   
   var newMethod as EA.Method;
   newMethod = signal.Methods.AddNew("serialize", "void");    
   newMethod.Update();
   var newParameter as EA.Parameter;
   newParameter = newMethod.Parameters.AddNew("foobar", "int");
   newParameter.Update();
   newMethod.Parameters.Refresh();
   signal.Methods.Refresh();
        signal.Refresh();
}

After calling 'addSerialize(inputClass)' I try to retrieve serialize as:
var serializeFunction as EA.Method;
serializeFunction = inputClass.Methods.GetByName("serialize");

- but 'serializeFunction is undefined.

Any suggestions?

19
Hi all,

Does anyone know how to set a newly created package as namespace root from JavaScript?


20
Bugs and Issues / Auto naming - EA goes bananas
« on: March 03, 2023, 01:09:46 am »
Hi all,

I've created a number use case elements with the stereotype 'userstory'

When I configure autonaming for 'UseCase' with sterotype='userstory', prefix=URE, counter=0000, postfix='FOOBAR' and apply this on the new elements EA locks up and CPU consumption goes through the roof.

Any ideas?

I'm using EA 16.1 build 1624 on Windows 11.


21
General Board / Change in Project VC id
« on: February 22, 2023, 09:18:56 pm »
Hi all,

I have two EA projects in separate DBMS repos. Both are assigned to VC unique ID 1. This creates a problem when switching between them since i manually have to change the VC working copy path.

Is there a way to change the unique ID for one of the VC configurations to 2?

22
Is it possible to configure linked document defaults? - e.g. margins, page layout, page size, fonts, table  borders.

So when creating a linked document without specifying a template the default settings apply.

23
Hi all,

When I'm debugging a javascript script containing the following fragment the variable 'traceElement' is reported as 'undefined' at the first line containing 'traceElement.'. Any suggestions?
..
if (currentRequirement.Type == "Requirement"){
   Session.Output( "Found link between " + currentUseCase.Alias + " to " + currentRequirement.Alias );
   var traceElement as EA.Element;               
   traceElement = tracePackage.Elements.AddNew( currentUseCase.Alias + " to " + currentRequirement.Alias, "");
   traceElement.TaggedValues.AddNew("from", currentUseCase.Alias);
   traceElement.TaggedValues.AddNew("to", currentRequirement.Alias);
   traceElement.Update();
   tracePackage.Elements.Refresh();
}
..

24
General Board / 2 Linked document issues
« on: January 13, 2023, 07:44:42 pm »
Hi all,

How do I re-activate the display of the linked document template to use?

How do I re-activate display of the red 'A' on elements with a linked document?

br
Thomas

25
Bugs and Issues / MDA transformation explodes in memory usage
« on: December 09, 2022, 12:21:52 am »
Hi all,
We have an MDA transformation, which has suddenly caused EA to use extreme amounts of memory (>30 GB) and the transformation never completes. I have narrowed the problem down to 1 custom template (Class__xx). I've removed all calls to other templates (e.g. Connector__xx) with the list macro, but the problem persists.

Any suggestions?

The template is shown below:

%if elemType != "Component"%
%endTemplate%

%if classLanguage == "Java"%
Package
{
   %TRANSFORM_REFERENCE("MessagingClassesPackage","IMPLEMENTATION", "ONLY_ONE")%
   name = "datastructureclasses"

   Class
   {
      %TRANSFORM_REFERENCE("ComponentEventbusFacade",className,classGUID)%
      name=%qt%%className%Implementation%qt%
      notes=%qt%*** AUTOGENERATED - Do not modify by hand. ***
   This class implements the interface against the system for component '%className%'.%qt%
      Language="Java"
      stereotype="system_interface_implementation"
      Tag
      {
         name="application"
         value=%qt%%className%%qt%
      }
      
      Attribute
      {
         name="PROPERTYBAGNAME"
         default=%qt%%sl%%qt%propertyBagName%sl%%qt%%qt%
         type="String"
         Constant="true"
         
         
      }
      
      Attribute
      {
         name="COMMANDID"
         default=%qt%%sl%%qt%commandId%sl%%qt%%qt%
         type="String"
         Constant="true"
         
         
      }
            
      Attribute
      {
         Name = "communicationMap"
         Type="Map<String, ISocketChannel>"
      }
      
      Attribute
      {
         Name = "logger"
         Type="Logger"
      }
      Operation
      {
         Name = "handleMessage"
         Type="void"
         Scope="public"
         Parameter
         {
            Name="_message"
            Type="IMessage"
         }   

         Code=%qt%
try
{
   PropertyBagMessage pbMessage = (PropertyBagMessage)_message;
   Map<String, Object> propertyBag = pbMessage.getPropertyMap();   
      
   return;
}
catch(Exception e)
{
   logger.error(String.format(%sl%%qt%Exception caught: %s  Stack trace:%s%sl%%qt%, e.getMessage(), e.getStackTrace()));
   throw e;
}

      
               %qt%
      }
      
      Header=%qt%
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import dk.medtrace.util.socket.data.PropertyBagMessage;
import dk.medtrace.util.socket.interfaces.ISocketChannel;
import dk.medtrace.util.socket.impl.SocketFactoryImpl;
import dk.medtrace.util.socket.interfaces.IMessage;
import dk.medtrace.util.autogenerated.framework.ESocketChannel;
import dk.medtrace.util.autogenerated.framework.ComponentSocketChannels;
import java.util.*;

%qt%      
   }

   Realisation
   {
      %TRANSFORM_REFERENCE("FacadeRealizesInterface",className,classGUID)%
      direction="Source->Destination"
         
      Source
      {
         %TRANSFORM_REFERENCE("ComponentEventbusFacade",className,classGUID)%
      }
      
      Target
      {
         %TRANSFORM_REFERENCE("ComponentInterfaceClass",className,classGUID)%
      }
   }
   
   Realisation
   {
      %TRANSFORM_REFERENCE("FacadeRealizesIMessageHandler",className,classGUID)%
      direction="Source->Destination"
         
      Source
      {
         %TRANSFORM_REFERENCE("ComponentEventbusFacade",className,classGUID)%
      }
      
      Target
      {
         GUID="{115E54AE-749C-4552-92D2-C8BDF85BD460}"
      }
   }   
}
%endIf%

26
General Board / PostgreSQL DBMS
« on: October 26, 2022, 01:36:39 am »
I'm trying to configure a PostgreSQL repository.

1) 32 bit ODBC driver is installed (version 13.x)
2) ODBC datasource configured according to https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_repositories/setupapostgresqlodbcdriver.html
Test connection succeeds.
3) The PostgreSQL database has been created on a remote Debian 11 and EASchema*.sql has been run. The tables are present in the database as seen in pgAdmin running on the same machine as EA. A user has been created for EA and permissions on all EA tables look correct in pgAdmin.

When I try to transfer an eapx file to the new repository i get the error 'All Enterprise architect tables in the target repository are missing...'

Any suggestions on how to troubleshoot this?
Thx
Thomas

27
Bugs and Issues / Excessive template parameters on generated code.
« on: September 16, 2022, 04:59:08 pm »
Hi,
we have the following construct in java - source:
public class Class1 extends AbstractClass2<EnumType1, EnumType2> implements  Interface1

In Ea this is modeled with 2 classes and 1 interface (without template arguments). The generalization connector between Class1 and Abstract Class2 has to template bindings identifying EnumType1 and EnumType2 for the template arguments for AbstractClass2.

When the code is generated from EA the result is:
public class Class1 extends AbstractClass2<EnumType1, EnumType2> implements  Interface1<EnumType1, EnumType2>

- i.e. the implementation of Interface1 also gets the template arguments.

Any suggestions?

br
Thomas

28
Hi all,
Does anyone know how to avoid the timestamps in the comment headers for generated operations (in my case Java: * @created 25-Apr-2022 13.49.25)?

br
Thomas

29
Hi all,
The templates 'Class__InitializeComponentSocketMaps' and 'Class__PopulateSocketChannels' are never called in the fragment below. If I write 'foobar' immediately before 'Class__InitializeComponentSocketMaps' it is present in the debug log. The names are correct. Any ideas?

Package
{
   %TRANSFORM_REFERENCE("SharedPackage",packageName,packageGUID)%
   name="shared"
   notes="*** AUTOGENERATED - DO NOT MODIFY"
%if packagePath == ""%

%list="Namespace" @separator="\n"%
%list="Class__ComponentPackages" @separator="\n"%
%list="Class__CallbackInterfaceDeclarations" @separator="\n" @indent="  "%
%list="Class__InterfaceClassArguments" @separator="\n" @indent="  "%
%list="Class__InterfaceImplementations" @separator="\n" @indent="  "%

$initSocketMaps = %list="Class__InitializeComponentSocketMaps" @separator="\n" @indent=" "%
$socketChannels = %list="Class__PopulateSocketChannels" @separator="\n" @indent="  "%

br
Thomas

30
Automation Interface, Add-Ins and Tools / 'PROCESS_END_OBJECT' macro
« on: April 06, 2022, 08:32:23 pm »
Hi all,

Can anyone explain when the 'PROCESS_END_OBJECT'-macro should be used?

br
Thomas

Pages: 1 [2] 3