hellou
Im trying to outline all methods from all classes from all namespaces from
all projects in solution
everything works fine - all this method iteration but
this code only outlines the methods in files already open in studio
private void Outline(CodeElement elem) {
EditPoint start = elem.StartPoint.CreateEditPoint(); start.EndOfLine();
EditPoint end = elem.EndPoint.CreateEditPoint();
if (start.LessThan(end)) {
Message("Outlining");
start.OutlineSection(end);
}
}
so im opening all docs before outling and all *.cs docs are opening but
outlining doesnt work either - only in oryginally opened docs methods are
outlined
foreach(Project project in applicationObject.Solution.Projects) {
foreach (ProjectItem pItem in project.ProjectItems) {
try {
if (pItem.Name.EndsWith(".cs"))
pItem.Open(Constants.vsViewKindCode);
} catch {
continue; }
Document doc = pItem.Document;
if (doc == null) continue;
doc.Activate();
....
Please help me if u can
Me work is so close to the end.....
Himo - 10 Dec 2004 08:29 GMT
I don't exactly understand what you mean by 'outlining' all files?
xqsnake - 10 Dec 2004 17:19 GMT
> I don't exactly understand what you mean by 'outlining' all files?
Not files, i mean outlinenig classes' methods only, but in all document files.
xqsnake - 10 Dec 2004 17:59 GMT
these lines dont help either
Window win = projectItem.Open(Constants.vsViewKindCode);
win.Visible = true;