Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to import Classes and ownedAttributes with Comments(Import from CSV Classes and ownedAttributes with Comments)
How to import Classes and ownedAttributes with Comments [message #1860333] Sat, 29 July 2023 14:02 Go to next message
Ilja Kraval is currently offline Ilja KravalFriend
Messages: 39
Registered: October 2021
Member
Hi all,

I need help:

I managed to successfully import classes and attributes from CSV via CLASS TREE TABLE in the given Package element (simple, excellent).

I would need the same
but Class has N Comments
and likewise Property (ownedAttribute) also has N Comments
I also need to import these Comments.

CLASS TREE TABLE can no longer do this (it has limited elements), but I could not set up and make GENERIC TREE TABLE work for importing classes and attributes even with Comments (owner of Table is parent Package).

Could someone help me?

Thanks!
Re: How to import Classes and ownedAttributes with Comments [message #1860411 is a reply to message #1860333] Thu, 03 August 2023 15:00 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 261
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello,
I confirm that Class Tree table won't be able to manage Comment. You need to start from a Generic Tree Table defined on a Package.
You need to configure your Generic Tree Table like described here. from the table contextual menu, select "Configure Categories and Paste", to configure the categories like this:

  • depth 0

    • packagedElement

  • depth 1

    • ownedComment
    • ownedAttribute

  • depth 2

    • ownedComment



Then on the next page of the wizard, you should to configure the Paste:

  • packagedElement -> org.eclipse.papyrus.uml.Class - packagedElement
  • ownedComment -> org.eclipse.papyrus.uml.Comment - ownedComment
  • ownedAttribute -> org.eclipse.papyrus.uml.Property - ownedProperty (in the tree, select the ownedProperty under Class and not another one!)
  • ownedComment -> org.eclipse.papyrus.uml.Comment - ownedComment


Then save.
On the table, display the column "name" and "body" and set the Hierarchic Style as Tree Multi Column Style.
Now you will be able to import a csv file with the Comments.

In attachment, several snapshot to help you.

HTH,
Vincent
Re: How to import Classes and ownedAttributes with Comments [message #1860441 is a reply to message #1860411] Sat, 05 August 2023 10:02 Go to previous messageGo to next message
Ilja Kraval is currently offline Ilja KravalFriend
Messages: 39
Registered: October 2021
Member
Hi Vincent

thank you very much, I will try it,

Ilja
Re: How to import Classes and ownedAttributes with Comments [message #1860443 is a reply to message #1860411] Sat, 05 August 2023 18:23 Go to previous message
Ilja Kraval is currently offline Ilja KravalFriend
Messages: 39
Registered: October 2021
Member
Hi Vincent,

thank you very much once again
your example works perfectly!
Great explanation with screens!

I had a problem before with the second screen of the Wizard, how to set the "Pasted Element ID" and "Contaiment Feature",
now it's clear to me,
thanks.

Ilja.
  • Attachment: imported.png
    (Size: 14.85KB, Downloaded 52 times)
Previous Topic:is there a way to export in reqiF from sysml 1.6 ?
Next Topic:XSD import
Goto Forum:
  


Current Time: Sat Sep 07 12:02:38 GMT 2024

Powered by FUDForum. Page generated in 0.03986 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top