Posted 17 years ago by Leif Zars
Version: 4.0.0246
Avatar
It would be real nice to have a list of all root astnodes and then a list of all keys.

Also if i load a file via SourceProjectContent.LoadForCode then i open it in a SyntaxEditor with the same key does everything work as expected or should i remove the "Loaded Code" first?

Also how can i remove just one file loaded via LoadForCode or do i have to use clear. A remove(key) would be nice.

Thanks
Leif

[Modified at 04/09/2007 10:21 AM]

Comments (3)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
These new methods are added for the next maintenance release:
Added the SourceProject.ContentGetCompilationUnits method that returns the ICompilationUnits that are currently loaded for reflection.
Added the SourceProject.ContentGetSourceKeys method that returns the source keys of the compilation units that are currently loaded for reflection.

The LoadForCode internals will automatically clear out any previous data with the same source key.

A Clear method overload takes a source key, allowing you to remove any data associated with that key.

[Modified at 04/09/2007 11:42 AM]


Actipro Software Support

Posted 17 years ago by Leif Zars
Avatar
Okay thanks that is all good.

p.s.
To me clear normally means 'remove all elements', i was looking for remove since that is normally associated with actions on one element.

Love yalls work

Thanks Leif
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We had considered calling it remove but in this case, the source project content really is storing a hierarchy of type data and not source keys. Clear is "clearing" out all types defined with a source key, which could potentially be many. Sometimes naming gets into gray areas where it could go either way. :)


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.