Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » performOK not called. (property)
performOK not called. (property) [message #274117] Fri, 15 October 2004 18:28 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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();
> }
> }
>
>
>
>
Previous Topic:java.lang.NoClassDefFoundError and RMI
Next Topic:Problem getting a plug-in to work
Goto Forum:
  


Current Time: Sat May 10 06:16:37 EDT 2025

Powered by FUDForum. Page generated in 0.03506 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top