Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Changelog Plug-in?

> 
> Hello All,
> 
> I remember some months ago, there being interest expressed on this list
> for an emacs like changelog plug-in for Eclipse. 
> 
> Has there been any further thought on this? As (CDT being) on of the
> tools projects in Eclipse  that use changelogs, you might know how
> desirable one would be :-)
> 
> I did start a small plug-in around this. I got stuck in trying to make
> it language independent. Is there any interest in implementing something
> like this in the CDT (or eclipse in general, at which eclipse-dev list
> might be more appropriate)?
> 
> I did hack around on this. A simple plug-in really, that implemented
> IEditorActionDelegate, set the active editor to something like:
> 
> this.editor = (AbstractTextEditor) targetEditor
> 
> And then used the IDocument interface to access the underlying text:
> 
> IDocumentProvider provider = this.editor.getDocumentProvider();
> 		
> this.document = provider.getDocument(this.editor.getEditorInput());
> ITextSelection selection = (ITextSelection)
> this.editor.getSelectionProvider().getSelection();
> 
> I could then use a partition scanner to locate the section of code that
> was under the cursor? I got stuck in parsing the function in a non
> language dependent way (I wanted to avoid writing a parser for
> C/C++/Java etc).
> 
> Alain, I was reminded it may have been you who mentioned this sometime
> ago. Has there been any further thought on it?
> 

Thoughts yes, action none, one possibility:
When ChangeLogs are needed, the user hits a button and a diff from the last
known state is compare to create the ChangeLog entries.  The problem is
where to retrieve the last known file content.  It could be provided via the team
if the project is under CVS or the local history.  Unfortunately the local
history may not be reliable ....

But yes, in term of parsing the ideas was the same as yours, we use ther parser(AST)
or the core model(ICElement) to find the changes nodes and format the diff in term
of ChangeLog entries.



Back to the top