Author Topic: Misc utilities: file system importer and link copy  (Read 2356 times)

pittagentskip007

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Misc utilities: file system importer and link copy
« on: February 22, 2012, 06:08:25 am »
Hi all,

Two random ideas for EA tools:

1) File system importer: create a package for a folder on the file system and create elements of the specified class and stereotype for every file encountered. Assume this would be recursive and create subpackages for sub folders and put the elements in the proper place in the hierarchy. Could get fancy and be able to map file types to class and stereotypes. Would also expect a synchronization feature like source code engineering so that could update project contents with file system contents.

Here is the use case for #1: We are trying to model vendor system in EA, that have a lot of special non-standard stuff like files with .PSS / .FPS extensions that are fancy configuration files and vendor specific scrpting languages. Also included are things like .bat files, .exe files, etc. Would like to model these in EA and trace requirements to them but not create them all manually. Could use the .CSV importer but that is a bit tedious and doesn't give us a package structure along with it.

2) Link copy. Pick a source element and a target element and copy all the links the source element has to the target (where valid UML).

Here is the use case for #2: one of my teammates accidently created a component element that represents our one of our subsystems for example sake "trade process" component. He then spent 40 hours linking requirements and other components to it. However, we already had an element for this that we been using since Day 1 with lots of links of its own. Rather than making him manually repoint all his links at the already existing component, a bulk copy would have been useful.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Misc utilities: file system importer and link
« Reply #1 on: February 22, 2012, 08:23:02 am »
1. Go to Tools | Options | Source Code Engineering. Click the 'Component Types' button on the top right.
Fill out the extensions you want.
Select the package you want to import into.
Import Source Directory. (You can ignore the code if you aren't going to find any matching extensions for the code part)

2. There's nothing built in, but you could easily write a script to do it. Something along the lines of GetElementByID/GUID. Loop over connectors, set the source/target of each to the original class and update.