performOK not called. (property) [message #274117] |
Fri, 15 October 2004 18:28  |
Eclipse User |
|
|
|
Originally posted by: manish.garg.gmail.com
Hi,
I have a properties page and the code snippet is as below. The propery
page comes up, but when I click OK, the performOk in my class is not called.
Is there something missing or something wrong?
Thanks.
P.
public class MyPropertyPage extends PropertyPage
implements IWorkbenchPropertyPage {
Text text_MessageLocation;
/**
*
*/
public MyPropertyPage () {
super();
// TODO Auto-generated constructor stub
}
public boolean performOk(){
setLocationValue(text_MessageLocation.getText());
return super.performOk();
}
protected void setLocationValue(String location){
IProject project = (IProject)getElement();
try {
project.setPersistentProperty(MessageIDProperty.LOCATION_PRO PERTY,
location);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
|
|
|
Re: performOK not called. (property) [message #274132 is a reply to message #274117] |
Sat, 16 October 2004 18:49  |
Eclipse User |
|
|
|
Is this a workbench property window?
If it is, it is possible that some earlier page returns false and in
such case "performOk" of subsequent pages is not called and the
preferences window is just closed.
I've had a discussion about it, but I can't remember whether it was on
this newsgroup or on a bug.
Genady
Piranha wrote:
>Hi,
>
> I have a properties page and the code snippet is as below. The propery
>page comes up, but when I click OK, the performOk in my class is not called.
>Is there something missing or something wrong?
>
>Thanks.
>P.
>
>
>public class MyPropertyPage extends PropertyPage
> implements IWorkbenchPropertyPage {
>
> Text text_MessageLocation;
> /**
> *
> */
> public MyPropertyPage () {
> super();
> // TODO Auto-generated constructor stub
> }
>
> public boolean performOk(){
> setLocationValue(text_MessageLocation.getText());
> return super.performOk();
> }
>
> protected void setLocationValue(String location){
> IProject project = (IProject)getElement();
> try {
> project.setPersistentProperty(MessageIDProperty.LOCATION_PRO PERTY,
>location);
> } catch (CoreException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03506 seconds