Book a Demo

Author Topic: Bulk Updates  (Read 3342 times)

HankRank

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Bulk Updates
« on: March 11, 2008, 04:27:35 pm »
I am building a domain model and after adding a few hundred class elements, I realize that I want to change the language property to none across all classes in a package. I know there is a way to bulk change the status, phase, version; but, is there a way to bulk change other elements, like language?

Thanks,

M

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Bulk Updates
« Reply #1 on: March 11, 2008, 11:21:25 pm »
Hi Hank,

[EDIT: Readers, please see Simon's post below. I'm clearly not keeping up on things.

Thanks Simon.]

AFAIK you are (sort of) out of luck. There's no way I know of to change these after the fact. At least not in EA.

But the 'sort of' clause could help you here. I'll explain in a moment.

The first thing you need to do is set 'none' as a language (if you can) for your project. You do this via the Tools | Options | Source Code Generation dialog. This will prevent elements you add in future from 'polluting' your setting.

Theoretically this is set globally, so it should affect new projects. However, the default behavior when you create a new project, is for EA to copy a 'seed' project. The default for that operation has Java set as the default language, which overwrites the preference you set in the dialog.

If you want to have some control over this create your own seed project (or several) and set things up just the way you want them. When you want a new project based on your seed go to the EA Start Page (the default) and click on Copy a Base Project (under Manage Projects). You can also open your seed project and use the Save As command.

Now, what about the project you've already got. I suggest you export it to an XMI file. When you've done that use a (good) editor to change the language setting to none. [Create a test element with the language set appropriately, then export it to XMI. Inspect this file to determine the exact syntax.]

Once you've done this, make a backup copy of your project!

Now import the updated XMI back into your project, and clear the option to strip GUIDs. This tells EA that you are replacing elements with updated versions (i.e. you want to overwrite the old elements with the new ones).

That should do it.


David
« Last Edit: March 12, 2008, 07:39:46 am by Midnight »
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bulk Updates
« Reply #2 on: March 12, 2008, 06:29:18 am »