2

To get the name of a project as a string I can use:

loc project = |project://Test/|;<br/>
str name = project.authority;

Is there something similar available for classes or methods?

I would like to write the contents of a class/method to disk and then use its name as the filename.

Ethan
  • 876
  • 8
  • 18
  • 34
Richard
  • 294
  • 1
  • 7

1 Answers1

2

To answer my own question, I needed to use;

public void testcode( loc project){
M3 model = createM3FromEclipseProject(project);
for (loc l <- classes(model)) {
     println(l.path);
}

Sorry, didn't read the docs thoroughly.

Richard
  • 294
  • 1
  • 7