| [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. **********************************************************************
|