Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to validate a Preference page?
How to validate a Preference page? [message #332976] Mon, 17 November 2008 17:16 Go to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member

I am trying to validate a Preference page (FieldEditorPreferencePage) that
contains a FileFieldEditor. I have not been able to work out where to
perform the validation after the value has been changed.

I have tried overriding FileFieldEditor.checkState() to no avail. It does
not seem to be called after an update.

I have also tried overriding StringFieldEditor.doCheckState() and again it
does not seem to be called during a field change.

As I final resort I have tried to extend FileFieldEditor and to override
doCheckState() there. Yet another disappointment.

I am out of bright ideas for the moment, so I figured I would shout out for
help. Any ideas?

Many thanks,
Joel Rosi-Schwartz
Etish Limited []
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== []
Re: How to validate a Preference page? [message #333548 is a reply to message #332976] Wed, 17 December 2008 06:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:


Override the method "propertyChange" in the preference page as shown below:

public void propertyChange(PropertyChangeEvent event) {
   //field for which validation is required
     //validation is successful
	setErrorMessage(null);						super.performApply();
     //validation fails
	setErrorMessage("Error message");

Re: How to validate a Preference page? [message #1801966 is a reply to message #333548] Wed, 30 January 2019 04:20 Go to previous message
Vaishali Agarwal is currently offline Vaishali AgarwalFriend
Messages: 1
Registered: January 2019
Junior Member
I have overrided propertyChange method in the preference page. But still the validation is not happening. Do i need to add any listener or we have to call propertyChange method.
Previous Topic:Code folding bar color?
Next Topic:Eclipse crashing on loading workspace
Goto Forum:

Current Time: Tue Feb 07 11:00:30 GMT 2023

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

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

Back to the top