Book a Demo

Author Topic: Attaching a source code reference  (Read 4076 times)

Neeeol

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Attaching a source code reference
« on: April 05, 2007, 07:54:10 am »
I am trying to update an existing model with existing ActionScript source code.  When the project was built, EA was not used to create the original source code.  I want to tie a class object to a source file so I can sync the two.

I can't get it to work.  The only place I can find to set in a file name is in the class object properties window, on the files tab.  I have added a reference to the source for the class and it is the only file in the list.  But when I try to synchronize the model with the code, nothing happens - and I do mean nothing.  No error, no message, no dialog box, nothing.

What am I doing wrong?  I've read the help but didn't find anything about this issue.  I can't even locate the topic that talks about relating a source file to a class.

What am I missing?
« Last Edit: April 05, 2007, 08:11:43 am by Neeeol »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Attaching a source code reference
« Reply #1 on: April 05, 2007, 09:41:31 am »
I don't work with ActionScript at all, so I'm really not sure. While you are waiting for answers, take a look at the Tools |Options | Source Code Engineering | ActionScript page. Perhaps what you are doing is version specific.

Also, I've had situations in the past where nothing seemed to happen when I imported other languages. In the Import Source Directory dialog I had to fiddle a bit with the options. I also think it is important to make sure you've selected an appropriate target package before importing, and that that package is highlighted in the Project Browser.
No, you can't have it!

Neeeol

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Attaching a source code reference
« Reply #2 on: April 05, 2007, 10:19:16 am »
I guess the real question then is "Why isn't the source file name a property of the object?"

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Attaching a source code reference
« Reply #3 on: April 05, 2007, 11:51:05 am »
The following worked for me using Java files.

Select the class element.
Right click and select "Generate Code..."
Within the [Code Generate] dialog, select the file you want to associate using "Path" [...]

Once you have selected the file select [Save], DO NOT select [Generate]

After selecting [Save], click on [Close] and return to your diagram.

Now you should be able to use Cntl-E to edit, and also be able to synchronize using Cntl-R

Jim

Neeeol

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Attaching a source code reference
« Reply #4 on: April 05, 2007, 01:29:50 pm »
Thanks.  I sorta found that.  It bugs me that the whole path is stored, instead of the filename alone.  All my embedded paths are based on someone else's setup.  If I change them to match my machine (one at a time, of course), they'll be screwed up for the next guy.

I wish it would use the default directory that I established.

Thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Attaching a source code reference
« Reply #5 on: April 05, 2007, 02:42:22 pm »
There's some limited support for this via the Local Paths facility in EA. Look in Help, then search the forum if it seems this might work for you.

Note the word "limited" above though. These will take you to a certain point, but not beyond.
No, you can't have it!

Neeeol

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Attaching a source code reference
« Reply #6 on: April 06, 2007, 06:01:33 am »
I set the local path.  The individual files aren't using it.