Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Extension of Subversive-Plug-In(Coding additional commitment-action to the subversive-plug-in)
Extension of Subversive-Plug-In [message #557924] Thu, 09 September 2010 12:40 Go to next message
JC Temp is currently offline JC Temp
Messages: 7
Registered: September 2010
Junior Member
Hi @ all,

I'm using the Subversive-plugIn for Eclipse to check in/out code to and from my subversion-repository.

Beside the subversive-history I have got an own historyfile on a server (System i) which I have to edit everytime I commit a java-source. To improve the usability of the plugIn I've started to implemet a data-interchange into that plugIn, using the "commit" exit point.

Therefore I had to extend some classes and manipulate them. I don't like that solution because it is very rude. And finally I stuck at the point where I can retrieve information about comitted resources.

So here are my questions:
- I use the extension-point "commit". How can I write my own (initial) text into the comment-text-box?
- After hitting the OK-button to commit my sources to the repository I need to know which java-files were commited and wheather they were added/deleted/changed/... The version of the source is important too. How can I get this information?

The methods where I want to perform some "actions" are the implemented methods getCommitDialog and performAfterCommitTasks of the interface ICommitActionFactory (inside an own new class).

I've found out that the commit-panel (the text is transfered as parameter into the commit-panels constructor) is already created when the exit is called. And therefore it's to late to write an individual text into the comment-text-box.

Are there some other exits which I can use to continue my implementation?

Thank you!
Re: Extension of Subversive-Plug-In [message #558280 is a reply to message #557924] Fri, 10 September 2010 19:15 Go to previous messageGo to next message
Alexander Gurov is currently offline Alexander Gurov
Messages: 92
Registered: July 2009
Member
Hi,

This is one of the extension points that were initially developed for the specific project and later were shared "as is". So, there is some room for improvement and we will appreciate your suggestions on this topic.

Currently this extension point allows you to:
1) customize commit message after "Ok" button is pressed
2) customize Commit operation (i.e. add some depended actions). Those actions could fetch committed revisions information from the IRevisionProvider interface (but still there is no information about additions, deletions etc.)
Re: Extension of Subversive-Plug-In [message #558504 is a reply to message #558280] Mon, 13 September 2010 09:48 Go to previous messageGo to next message
JC Temp is currently offline JC Temp
Messages: 7
Registered: September 2010
Junior Member
Hi,

first of all, thank's for your fast reply.

When you open the commit-dialog there is shown a table with all modified sources you want to commit.
This table contains a column named "Content". How do you fill the cells of this column? How can I get that information?

Would it be possible to enhance some of the subversive-classes, so you could put it into subversive default inplementation in the future?
Re: Extension of Subversive-Plug-In [message #558849 is a reply to message #558504] Tue, 14 September 2010 15:33 Go to previous messageGo to next message
Alexander Gurov is currently offline Alexander Gurov
Messages: 92
Registered: July 2009
Member
Both columns ('Content' and 'Properties') shows change type for the resource content or its properties appropriately.
This information is provided to the resources table through the ITableLabelProvider interface. Concrete status values are obtained through Subversive API:
ILocalResource local = SVNRemoteStorage.instance().asLocalResource(resource);
contentStatus = local.getTextStatus();
propertyStatus = local.getPropStatus();

Regarding changes in Subversive code - everything is possible. Smile
But important matter is what are those changes you want to see? If those will be helpful for the Subversive project and people who uses this plug-in - why not? Smile
Re: Extension of Subversive-Plug-In [message #559444 is a reply to message #558849] Thu, 16 September 2010 15:47 Go to previous messageGo to next message
JC Temp is currently offline JC Temp
Messages: 7
Registered: September 2010
Junior Member
Yeehaw, that works! Wink

Ok, now all changes are made and I got all information I need for my little extra action.

I've changed these classes/files:
- ICommitActionFactory (new methods)
- CommitAction (calling a new exit from here)
- DefaultCommitActionFactory (implements new methods from ICommitActionFactory)
- CommitOperation (the 2nd new exit is called from here)
- MANIFEST.MF of the svn-core jar (needs two additional imports)

So, how do you want to check the code? May I send you a zipped file with all changes? Via this forum or mail?
Re: Extension of Subversive-Plug-In [message #560076 is a reply to message #557924] Tue, 21 September 2010 07:05 Go to previous messageGo to next message
JC Temp is currently offline JC Temp
Messages: 7
Registered: September 2010
Junior Member
After a few tests I had to change three more classes:
- ShareProjectWizard
- OverrideAndCommitModelActionHelper
- CommitActionHelper

All these classes got similar changes to the class CommitAction.
They needed one of the new exits...
Re: Extension of Subversive-Plug-In [message #630635 is a reply to message #557924] Mon, 04 October 2010 12:59 Go to previous messageGo to next message
JC Temp is currently offline JC Temp
Messages: 7
Registered: September 2010
Junior Member
Hi it's me again,

so now all changes were made and the plugIn works fine.

What's about the implementation into default? Do you want to take a look into the sources? What are the next steps?
Re: Extension of Subversive-Plug-In [message #631894 is a reply to message #557924] Sun, 10 October 2010 07:44 Go to previous message
Alexander Gurov is currently offline Alexander Gurov
Messages: 92
Registered: July 2009
Member
Hi,

In that case we need to review the code and discuss changes with you if it is required.
So, you can create a *.patch file which contains all the changes you have made and send it to us.

P.S.
You can send patch directly to my mailbox: alexander<dot>gurov<at>polarion<dot>com.
Previous Topic:How to ignore an incoming change or add in sync view?
Next Topic:Information about update
Goto Forum:
  


Current Time: Thu Oct 23 15:26:41 GMT 2014

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software