Monday, January 02, 2006

the end of the first project phase

HAPPY NEW YEAR to everyone!!

the first phase of the SharedCodeDoc project has ended at december 16th.
the goal of this phase was to make a feasability study, if it is possible to create an application, with that the user is able to document the code without the sourcecode. the application should be a base for further development.
the following features are implemented in the prototype:
  • down- and upload of source files within a Visual Studio solution from a folder in the local data store to the SharedCodeDoc server
  • create the html documentation of the source files (with NDoc)
  • edit the html documentation via a web interface
  • synch back of the changed documentation to source files
below you can see the poster on which the whole SharedCodeDoc workflow is shown.

when the project goes the next phase, the following features should be improved first:
  • synchronisation of all possible comment cases (changed parameter names, interfaces, classes in classes, enums in classes, ...)
  • implementation of all conflict resolution methods (source code as master, manual)
  • implementation of all synchronization times (daily, weekly)
with this post my study work ends and other students continue the work of this project.
i hope my successors can work with the base implementation of the application. so the application will reache his full functionallity as soon as possible.
i will thank reto and remy for the faboules collaboration during the first project phase.

Sunday, December 04, 2005

referenced assemblies

i started with the implementation of the referenced assemblies problem today. the system is now able to get the files in base of a .sln file and create the folder structure like it is on the 'server'. with this structure is it easier to upload the synced sourcefiles back to the 'server'. i just started with the new compilation process.
ATTENTION: when you get newest source, you won't be able to create new projects or sync the documentation back, because the compilation doesn't work properly now!!!!
i believe, i can finish the new compilation tomorrow. so you will be able to test the application tomorrow.

for tomorrows meeting i have no special topics planned.

Saturday, December 03, 2005

comment reflection

i have added the comment reflection to the project. i have implemented this feature in a very basic way. i just replace the new string with the old ones in the specific summary file. this is not practicabel, i know. because when you have exact the same string on the same page, all these strings will be replaced. but for now it should be sufficient. or not?

also, i have corrected some bugs:
  • now, you can create projects with whitespaces in the name
  • edit problem with controls with the same id
  • you won't be able to edit the comments of an overload list site
tomorrow, i will start with the assembly problem.

@reto
i have never seen this error before. i get this error never today. are you sure, that the path in the web.config points to the presentation folder of the application? if this is correct, can you send me your common.xslt and syntax.xslt from the MSDN/xslt folder. this is very corious, because i have changed nothing in this section and i uploaded all the changed files yesterday.

Wednesday, November 30, 2005

i started with the implementation of the synchronization process. i think it should work, when i know the right source line. i just started with the implementation of this and the first tries look good.

some questions:
------------------------------
  • do you know, how i can determine the source line with a regular expression? by now i have an array with the lines (a new funtion in 2.0). but when the method signature is on more then one line i have a little problem. any hints?
  • how can you comment a enum member? it should possible, because in the html documentation every member is listed and it has a field with a description to every member. is there a special tag or something? i couldn't find out how i can do this.
  • when do we make the meeting tomorrow? i would prefer 9pm swiss time.

Monday, November 28, 2005

vs project installation

a brief description of the installation of the new vs project (SharedCodeDoc2_0.sln):
  • install visual studio 2005
  • register the new framework to iis
    • open console
    • go to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    • type in: aspnet_regiis -i
    • wait until the installation procedure is finish
  • start the vs project
  • correct the path of the application home [PROJECT_LOCATION]\Presentation in Web.config
  • make sure, that the presentation project is the startproject. startpage is the HomeForm.aspx.
  • let's go .... (ctrl+f5) the application will run in the new built-in webserver.
    • UPDATE: if you use firefox as your default browser, you must set in the Presentation property page the Start Option -> NTLM Authentication to false! if it's not already.
  • if you want to run it, with the iis. make a new virtual directory, which points to the presentation folder of the vs project
UPDATE: all referenced assemblies are in the external dll folder of the project. for nunit you have to download the newest version (2.2.3)

Sunday, November 27, 2005

screens screens screens

now i have the first official screens from the application:


home site


admin: project detail view

admin: new project

admin: modify project

the start page of the documentation


for tomorrows meeting i have no special topics from my site. only one or two question to the design or some implementation details. if you have any question or some input to the design. just write me an email.
by the way, today i solved the problem with the links and all works just fine. thanks to reto and remy for the input.

Friday, November 25, 2005

sync xml

i finished now the creation of the xml, which is the base to find the methods in the source files. it looks as follows:

<symbols file="C:\SharedCodeDocTestProjects\PdbTest\SharedCodeDoc.dll">
<files>
<file id="1" name="c:\SharedCodeDocTestProjects\CompilationTest\Class1.cs" />
<file id="2" name="c:\SharedCodeDocTestProjects\CompilationTest\Class2.cs" />
</files>
<metainfo>
<class name="CommentExample.CommentDelegate" />
<enum name="CommentExample.Color" />
<class name="CommentExample.Comments">
...
</class>
<enum name="CommentExample.Comments+CommentPriority" />
<struct name="CommentExample.Point">
<attribute name="x" type="Int32" file_ref="1" />
<constructor name=".ctor" file_ref="1">
<param>Int32</param>
</constructor>
</struct>
<class name="CommentExample.Comments2">
<attribute name="comment" type="String" file_ref="2" />
<attribute name="commentEvent" type="CommentDelegate" file_ref="2" />
<property name="Comment2" type="String" file_ref="2" />
<event name="commentEvent" type="CommentDelegate" file_ref="2" />
<constructor name=".ctor" file_ref="2" />
<constructor name=".ctor" file_ref="2">
<param>String</param>
</constructor>
<method name="get_Comment2" file_ref="2" />
<method name="set_Comment2" file_ref="2">
<param>String</param>
</method>
<method name="Main" file_ref="2">
<param>String[]</param>
</method>
<method name="UpperCase2" file_ref="2">
<param>Int32</param>
</method>
</class>
...
</metainfo>
</symbols>


i think it should be usable for the synchronisation. unfortunately it is not possible to print out the correct sourceline of the methods. the reader has a method, which should exactly do that. but unfortunately this method isn't implemented. but i have the correct method name. and can search after it.
i also changed the project from .net 1.1 to 2.0. i must replace the wilson master page with them from microsoft. because wilson master page didn't function correctly. when you try to execute the project. note that you first install the new .net version on the iis.
ok, that's all for the moment.

Wednesday, November 23, 2005

change to 2.0

it doesn't exist a version for mdbgcore.dll for the framework 1.1.
i found only a link, which describes the probs with version 1.1.
http://blogs.gotdotnet.com/jmstall/archive/2004/11/02/250946.aspx

it sounds very tough to implement it in version 1.1. i think it will take a lot of time to do this. and i haven't that time. so, what should we do? change to version 2.0?
i agree with reto, when the sharedcodedoc reaches a productive state, the mono project will have then fully integrated version 2.0.

Update:
Ok, reto and i have decided, that we advance to .net 2.0. because of the easier way to implement the synchronisation process. but i will not change the implementation of the existing code to 2.0. i will make a new vs project for 2.0 and leave the other on the svn.

Tuesday, November 22, 2005

synchronization problem

i took a look at the synchronization problem. i've tried to test the sample code from retos links. but i didn't it get running, because i couldn't find out, how i can reference the mscoree.dll from visual studio. in this dll is the IMetaDataDispenser defined. could you help me?

then i googled a little bit and found the following link:
http://blogs.msdn.com/jmstall/archive/2005/08/25/pdb2xml.aspx

in that link is an example, which generates a xml from the pdb file. and it works. see the xml below:

<symbols file="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\bin\Core.dll">
<!--This is a list of all source files referred by the PDB.-->
<files>
<file id="1" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\CommentChangeLog.cs" />
<file id="2" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\HTMLEngine.cs" />
<file id="3" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\HTMLReader.cs" />
<file id="4" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\HTMLWriter.cs" />
<file id="5" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\ProjectManager.cs" />
<file id="6" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\ProjectSynchronizer.cs" />
<file id="7" name="E:\Daten\HSR\diplomarbeit\SharedCodeDoc\Core\Synchronizer.cs" />
</files>
<!--There is no entry point token such as a 'Main' method. This module is probably a '.dll'-->
<!--This is a list of all methods in the assembly that matches this PDB.-->
<!--For each method, we provide the sequence tables that map from IL offsets back to source.-->
<methods>
<method name="SharedCodeDoc.Core.Logging.CommentChangeLog.LogChangeComment" token="0x6000002">
<sequencepoints total="3">
</sequencepoints>
<locals>
<local name="CS$00000003$00000000" il_index="1" il_start="0" il_end="23" />
<local name="access" il_index="0" il_start="0" il_end="23" />
</locals>
</method>
<method name="SharedCodeDoc.Core.Logging.CommentChangeLog.LogChangeConflict" token="0x6000003">
<sequencepoints total="1">
<entry il_offset="0" start_row="25" start_column="3" end_row="25" end_column="4" file_ref="1" />
</sequencepoints>
<locals />
</method>
<method name="SharedCodeDoc.Core.Logging.CommentChangeLog.DeleteCommentChangeLog" token="0x6000004">
<sequencepoints total="1">
<entry il_offset="0" start_row="30" start_column="3" end_row="30" end_column="4" file_ref="1" />
</sequencepoints>
<locals />
</method>
...
</methods>
</symbols>


in this xml i have the reference from the method to the file. but now it comes the drawback! the code and some referenced assemblys are from .net 2.0. which i can't reference in .net 1.1. what should we do? change to 2.0? and hope that the mono project has as fast as possible integrated .net 2.0 or should i search for an other way to solve the problem?

Monday, November 21, 2005

edit comment sd

below you can see the sd for the edit comment process.
i hope, it helps a little bit to better understand the code.


if you have any questions. write me a mail.

Sunday, November 20, 2005

ok, the edit comment process is emplemented now. i can now change the comment, the system can identify, that the comment has changed. the system log the comment change to the sharedcodedoc project specific xml file and writes the new html file to disk.
the comment changed xml file looks like this:

<ChangedComments>
<Namespace Name="CommentExample">
<Class Name="Comments">
<Method MethodSignature="publicstaticvoidMain(string[]str);" LastModified="20.11.2005 15:44:53">
<Comment>
<New>
<summary> summarytext Test</summary>
</New>
<Original>
<summary> summarytext </summary>
</Original>
</Comment>
<Comment>
<New>
<param name="str">paramtext Test</param>
</New>
<Original>
<param name="str">paramtext</param>
</Original>
</Comment>
<Comment>
<New>
<remarks>remarkstext Test</remarks>
</New>
<Original>
<remarks>remarkstext</remarks>
</Original>
</Comment>
<Comment>
<New>
<exception cref="">exceptiontext Test</exception>
</New>
<Original>
<exception cref="">exceptiontext</exception>
</Original>
</Comment>
<Comment>
<New>
<example>exampletext Test</example>
</New>
<Original>
<example>exampletext</example>
</Original>
</Comment>
<Comment>
...
</Comment>
</Method>
</Class>
</Namespace>
</ChangedComments>

i think these are all information, which i need for the sync process.

this is the agenda for the meeting tomorrow 5pm mez
  • discussion link problem
  • discussion control problem
  • discussion synchronisation
  • other problems
  • next steps
you get more precisely information about the problems with the e-mail.

Saturday, November 19, 2005

comment changelog

i started with the implementation of the documentation changelog today. it looks good, i think i could finish this tomorrow.
so we would have at monday the whole 'editcomment' process running. if the gui makes, what i will. i have a lot of problems with it. when the user presses the save button all controls from the page are gone. so i can't read the changes from the textboxes, which i added when the user has pressed the edit button. and therefore i can't track the documentation changes in the htmlwriter. i don't know where the mistake is. or what i should do. we can also look at this problem at monday. the only thing what i've tried is, that i save the controls in the cache from the site. i have then the controls when the user saves the documentation, but the text is the same as before editing :(

all right, i'll post the agenda for the weekly meeting tomorrow.

Thursday, November 17, 2005

first screens !!!!

i made a good progress today.
i was able to solve the problem with the masterpages. i've made a user control, which is responsible for the documentation view (see the screens below). the system can now build the editpage with the textboxes (see the screens below). thats all what i made and tested today. i hope, that i can implement the save process of the documentation tomorrow.

these are the screens: (remark: the menu is only a prototype!)


the documentation page, which was generated with ndoc.

the editpage of the documentation above. (note: the text of requrements section is not that, it should be, because the xslt wasn't modify)


the link problem
--------------------------------
on the screens you can see a 'See also' section. in this section you can navigate to other documentation parts. the links, which are behind, are generated with ndoc. and these point now to a wrong location in the servers filesystem. when the user presses on such a link, i would track this. so i can correct the link and build the new page with the htmlengine. is that possible to implement? or do you have any other ideas?

Wednesday, November 16, 2005

little progress, lots of probs

the good news first. the parser can extract the comment text from the html source file. the HTMLSite class is able to determine, if the html contains editable comments. this is important for later implementation of the edit function. with this i can quickly decide if an edit button es required or not.
ok, after that i would start with the forms and then the problems came :-(
the actual problems:
  • the links in the html source point to the wrong destination. but this can i fix. it has two possibilities to do that. first, i correct all the links with the parser. second, i intercept the every http request and rewrite the url if needed. but, how can i intercept the request? do i need a http module or a http handler for that? do you have any experiences with these? is that a good idea?
  • the request interception do i need specially for the links which are defined in the generated documentation. because i can't define any events on these.
  • i can show the html documentation in the browser. but it has some drawbacks with the masterpage. the documentation will be placed above all masterpage definition even if i define the control which shows the html text below the masterpage definition. do you have any hints or solutions?