Hello, everybody!
I have a problem in subversive
extension.
I want to extend the commit dialog window in such way: when the
"OK" button pressed in commit dialog - new my window appears before the commit
process starts. So, I created MyCommitDialog and MyCommitActionFactory classes
in my separate package. MyCommitActionFactory looks like
DefaultCommitAcionFactory, but itcalls for MyCommitDialog instead of
DefaultCommitDialog.
public class MyCommitActionFactory implements
ICommitActionFactory {
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?
So, the main question is - what have i do after my actions to make it
work (I mean to load my factory and my dialog instead of default)? I think
I have to change plugin.xml and commit.exsd files in
org.polarion.team.svn.ui_1.0.5 folder? So, if that right, how have I change
them? I didn't find anything on this topic...
Please, help
me.
_________
With best
regards,
Andrey
Pavlenko