Hello Andrey.
To add the button the way you want you should use the
following code:
protected void createButtonsForButtonBar(Composite parent) {
super.createButton(parent,
222, "Associate Issues", false);
super.createButtonsForButtonBar(parent);
}
Regarding the previous post:
AFAIK there is no way to replace the commit panel, so it is
always CommitPanel or CommitSetPanel depending on a situation. And
you are casting it to your type of the panel so this cast is impossible, so you
get the ClassCastException.
I do not want to
hurt you, but must admit that this list (subversive-dev) is for the questions
and problems, connected to Subversive plug-in and its parts. Yes, integration
API is a part of Subversive and we appriciate your interest and your afforts to
create the plug-in you are developing, but the fact is that I've already given
you all the required information and you are still having problems. Let me
notice that these problems are not connected to Subversive itself, but to
understanding the behaviour of MessageDialog and other Eclipse IDE
components.
I wish you good luck with investigating Eclipse and
developing your plug-in.
Best rards, Alexei Goncharov.
Subversive Team.
Hi to
everybody!
Also I have another
problem!
I want to add a third button to
DefaultDialog.
public
class MyDialog
extends DefaultDialog
implements
ICommitDialog{
@Override
protected
void
buttonPressed(int buttonId)
{
if (222==
buttonId) {
showTaskSelectDialog(buttonId);
} else
{
if
(frame.isVisible())
{
frame.setVisible(false);
frame.dispose();
}
super.buttonPressed(buttonId);
}
}
protected
void
createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
String[] buttonLabels = getButtonLabels();
Button[] buttons = new
Button[buttonLabels.length +
1];
String[] anotherLabels;
buttons[0] = createButton(parent, 222 "Associate
Issues",
false);
for
(int i = 0; i <
buttonLabels.length; i++)
{
buttons[i + 1] = getButton(i);
}
anotherLabels = new
String[buttonLabels.length +
1];
anotherLabels[0] = "MY New
Button";
for
(int i = 0; i <
buttonLabels.length; i++)
{
anotherLabels[i + 1] = buttonLabels[i];
}
super.setButtonLabels(anotherLabels);
super.setButtons(buttons);
}
}
So, in method
createButtonsForButtonBar
I changed the order of buttons. "MY New
Button" must be the first, and
another buttons are placed after it. But when I launch this, the order of
buttons does not change.
Can anybody tell me what may
be the problem?
_________
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.
**********************************************************************
|