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 - ESC

Pages: [1]
1
PCS General Board / PCS with polarion integration
« on: June 08, 2022, 06:48:44 pm »
Hello,

I'm testing Pro Cloud Server and have a few questions.

Initially, we wanted to use SVN to save models, make development branches and manage versioning. The use of LemonTree should make it possible to visualize the differences of the model during the commits.
The problem is that we want to have a possibility of integration with Polarion in order to retrieve the requirements and associate them with the model.
The Polarion Connector (EAPO) does not allow you to do this (it only allows you to export elements created from EA), which means that you have to switch to Pro Cloud Server to use this feature.

So here are my questions about Pro Cloud Server:
- The number of models seems limited to 7 if we don't take the Enterprise version of Pro Cloud Server, is that correct? https://sparxsystems.com/products/procloudserver/compare-editions.html
- How can we manage the versioning strategy, branches, log etc. on the models stored on Cloud Server?

Thanks

2
General Board / Re: Synchronize model and code vs Overwrite code
« on: May 13, 2022, 11:20:40 pm »
Thanks Eve for your reply,

I did several tests from the default values of the Code Template Editor to check if it was not related to my changes.

The bug is very easy to reproduce (with default code template editor):
1. Create a C-Class with one public attributes
2. Add some notes for Class
3. Add some notes for Attributes
4. Generate the file with "Overwrite code" options
5. Synchronize package with "Reverse engineer" option
=> Class notes are replaced by attribute notes

I confirm that the problem is present for the C language but not for Java.

I am looking for a workaround to this situation, I'm wondering if I can't just ignore the contents of the class notes and use another way to set the class note (I don't necessarily want to resynchronize the contents of the classNotes)

I had already used the link with the requirement connector to be able to generate the requirements notes in the code (thanks to the help you provided on another post).

So I tried to do the same for a note but i tried with different types of note (text, note with Relationship = NoteLink, InformationItem, etc) which would be associated with the class but i can't generate the note content in code with the code template editor.

I also tried using the linked document of the class to put the note in there but also failed to generate the content of the linked document in the code.

If there isn't really a simple solution with notes in connector, I'll probably use the %classAlias% instead of the %classNotes% and ignore the content of the %classNotes%

3
General Board / Re: Synchronize model and code vs Overwrite code
« on: May 10, 2022, 05:56:21 pm »
Thanks Eve for your reply,

Actually I don't try to add extra comments in the code. Here are the steps I do:
1. Generate package with "Overwrite code option" to generate all *.c / *.h files from the model
2. Test with generate package with "Synchronize model and code" => Ok I have the same code / model
   => If I add a new operation on the model => the new operation is correctly added to the *.c / *.h files
   => If I add a new operation on the code => the new operation is ignored during this phase and the model is not updated
3. Synchronize package with Reverse engineer => NOK : the notes of each class are replaced in the model by the comment of the first operation (Even without any code changes since step 1)

The objective is to create the source files from the model, then continue the development on the code and resynchronize the changes in the model if necessary to generate the updated documentation. The problem is that during synchronization the notes are no longer correct and the documentation cannot be generated.

Here is an example of the structure of the .h file :
Code: [Select]
/** @file %fileName%
 *
 * Header-File with definitions for %className%
 *
 */

/**
 *  Extra comment for test
 */
/* ----------------------------------------------------------------------------
* includes
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
* public defines
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
* public macros
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
 * public types
 * ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
 * public functions
 * ---------------------------------------------------------------------------*/
/**
 * Comment for Function1
 */
void Function1(void);

/**
 * Comment for Function2
 */
void Function2(void);

Each time after the synchronization, the content of %classnotes% is replaced by the comment of function N°1 (the notes of function N°1 and of the other functions are always correct, only the notes of the class are replaced)

In fact, it will always consider the notes of the class by the first comment of an element of the class, for example :
Code: [Select]
/** @file %fileName%
 *
 * Header-File with definitions for %className%
 *
 */

/**
 *  Extra comment for test
 */
/* ----------------------------------------------------------------------------
* includes
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
* public defines
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
* public macros
* ---------------------------------------------------------------------------*/

/* ----------------------------------------------------------------------------
 * public types
 * ---------------------------------------------------------------------------*/
/**
 * Comment for Enum1
 */
typedef enum
{
  EnumValue0 = 0,
  EnumValue1 = 1
} Enum1;

/* ----------------------------------------------------------------------------
 * public functions
 * ---------------------------------------------------------------------------*/
/**
 * Comment for Function1
 */
void Function1(void);

/**
 * Comment for Function2
 */
void Function2(void);

In this case the note of the class will be replaced by the comment of Enum1.

This is a blocking element for the moment because it prevents us from considering the use of enterprise architect for code generation and synchronization in order to always have up-to-date documentation.

4
General Board / Re: Synchronize model and code vs Overwrite code
« on: May 10, 2022, 12:33:15 am »
In fact I always have an issue when I use the button "Synchronize", "Synchronize Package", "Reverse engineer". In this case I have each time the notes of my classes which are replaced by the comment of the first function, does anyone have a suggestion?

I don't know if I should use something like %synchNewClassNotesSpace% to fix this. I also have the possibility to choose to uncheck the Comments on the Reverse in the preferences of the "Source Code Engineering" but the idea was still to manage to synchronize everything.

I understood how the Code Template Editor works for generation but I still have trouble understanding how it uses the template for synchronization.

5
General Board / Re: Synchronize model and code vs Overwrite code
« on: May 09, 2022, 09:11:18 pm »
I think it's a synchronization bug with %classNotes% and %ClassNotes% macros

Here's how I fixed it :

For File Impl, i use %classNotes% :
Code: [Select]
/** @file %fileNameImpl%
 *
 * %classNotes%
 */

And I edit "Class Notes" to add Notes only for enumeration and structure :
Code: [Select]
%PI="\n"%
%if genOptGenComments != "T"%
%endTemplate%

%if elemType == "Enumeration" or classStereotype == "struct"%
$wrapLen = %genOptWrapComment%
%CSTYLE_COMMENT($wrapLen)%
%endIf%

So I no longer have a problem, but if I want to have access to the class notes, I have to be careful to use %classNotes% instead of %ClassNotes%

6
General Board / Synchronize model and code vs Overwrite code
« on: May 09, 2022, 06:16:24 pm »
I am currently testing Enterprise Architect v15.2.

I created several classes in C language with attributes and operations, when I click on "Generate" to generate the Package Source Code, I have two choices for "Synchronize":
  • Synchronize model and code
  • Overwrite code

I use the "Overwrite code", it allows me to create the .c / .h files of the package, everything works well with the comments associated with the operations / attributes (I edited the Code Template Editor to match the template of our company)

But when I then do "Synchronize model and code" without modifying the files, the comment in the header associated with my first function is replaced by the class comment

Do you have any recommendations for fixing this?

Thanks

Pages: [1]