| RE: [subversive-dev] Commit Dialog extension |
|
Hello Andrey.
You are wrong in fact. You do not need to change
org.eclipse.team.svn.ui plug-in.
All you have to is to create your own plug-in, that
contains the text below in its plug-in.xml:
<extension point="org.eclipse.team.svn.ui.commit"> <commit class="your_package.MyCommitActionFactory"/></extension> And then when running your plug-in near Subversive will
make the last to use your ICommitActionFactory
implementation.
Best regards, Alexei
Goncharov.
Subversive Team.
From: subversive-dev-bounces@xxxxxxxxxxx [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrey Pavlenko Sent: Wednesday, December 17, 2008 1:31 PM To: subversive-dev@xxxxxxxxxxx Subject: [subversive-dev] Commit Dialog extension Hello, everybody! public ICommitDialog
getCommitDialog(final Shell shell, Collection allFilesToCommit, final
ICommentDialogPanel commentPanel) { return
new ICommitDialog() { public
String getMessage() { return
commentPanel.getMessage(); } public
int open() { MyCommitDialog dialog = new MyCommitDialog(new
Shell(shell), commentPanel); return
dialog.open(); } }; } } So, MyCommitDialog changes DefaultDialog to call
ourWindow: public class MyCommitDialog extends
DefaultDialog{ private TaskSelectDialog
taskSelectDialog; public MyCommitDialog(Shell
parentShell, IDialogPanel panel) { super(parentShell, panel); taskSelectDialog = new
TaskSelectDialog(); } protected void buttonPressed(int
buttonId) { if
(IDialogConstants.OK_ID == buttonId) { // Shows
our dialog when OK button pressed showTaskSelectDialog(); } } private void
showTaskSelectDialog() { taskSelectDialog.createAndShowGUI(); taskSelectDialog.addSubmitListener(new ActionListener()
{ public
void actionPerformed(ActionEvent e) { preCommitAction(); } }); } private void preCommitAction()
{ //after
the button ok at my window presses the commit process
continues super.buttonPressed(IDialogConstants.OK_ID); } } I added my package to SVNTeamUI.jar. Is that
right? With best
regards, Andrey
Pavlenko ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. **********************************************************************
|