Page 1 of 1

New package and new class artifacts

PostPosted: Mon 14 May 2018 15:27
by Dan
Hi de-buggers,

Under the browser main project I added a class view, class diagram and a test class.
If I right click on the class I see "create source artifact". ok.

I created new package under the main project browser package, then a class diagram and then a class.
If I right click on the class I DO NOT see "create source artifact". ??

I looked in every menu and right clicked everything I can see but have not found "create source artifact".

What am I doing wrong?

Re: New package and new class artifacts

PostPosted: Mon 14 May 2018 15:34
by Dan
Solved
- the new class view, if edited, has a deployment view drop down, once I select the deployment view then I get a create artifact option for the class.

So may be that should be selected by default if there is only one deployment view?

Re: New package and new class artifacts

PostPosted: Mon 14 May 2018 15:45
by Dan
No - still a problem -

If I edit the test package headers and source settings - say to testPackage ,
call generate c++ the test class is still placed in old deployment location ...

Re: New package and new class artifacts

PostPosted: Mon 14 May 2018 15:49
by Dan
SOLVED ...

So you have to have
edit package-> point to the new headers and source directory
edit class view -> deployment view to testDeployment
edit class edit -> artifact name in testPackage
then call generate c++ and it works ...

so many hoops ....

Re: New package and new class artifacts

PostPosted: Mon 14 May 2018 16:37
by Bruno Pagès
Dan wrote:- the new class view, if edited, has a deployment view drop down, once I select the deployment view then I get a create artifact option for the class.
So may be that should be selected by default if there is only one deployment view?

Yes and no, I prefer to have the association explicit, and to allow the class view and deployment view to be under a different package

Furthermore you can create a class view and its associated deployment view in one step ("new class and deployment views") so it is very easy to have that association between them

Re: New package and new class artifacts

PostPosted: Mon 14 May 2018 16:43
by Bruno Pagès
Dan wrote:If I edit the test package headers and source settings - say to testPackage ,
call generate c++ the test class is still placed in old deployment location ...

The generated files are represented by the artifact, so the location where the files are generated is specified by the package containing the deployment view where the artifact is ( the package containing the class is not relevant ), and if the package doesn't specify the directories the code generator look at the directories specified through the generations settings.

Note that the directories can be specified absolute or relative to the project