Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Force editor to (re)validate/refresh(During the configuration changed in the backend, I need to force the validation of the editor with that new informations)
Force editor to (re)validate/refresh [message #1831665] Wed, 26 August 2020 09:02 Go to next message
M. J. is currently offline M. J.Friend
Messages: 4
Registered: September 2018
Junior Member
Hello everyone,

I'm having a eclipse plugin, which includes an editor (extension point org.eclipse.ui.editors), in fact the MultiPageEditorPart. The editor has some more components and related extensions, like the configuration (extension point org.eclipse.wst.sse.ui.editorConfiguration) and validator (extension point org.eclipse.wst.sse.ui.sourcevalidation).

The problem is, sometimes the "configuration" (the internal state of the editor backend) sometimes changes during the runtime, thus the behaviour of the editor may change. The most important is to re-run the validation of the editor input. Secondly, the editor may be rerendered/redrawn, because some elements/regions may then be displayed by different style.

The question is how to force the validation (or, in general, to update/refresh) the editor.

What did I try:
- refresh the file resource opened in the editor
- look for some "validate" method of the editor
- try to incorporate the PropertyChangeEvent s
- debug the Validator calls and try to find out something in the stack trace

All I know is the validation gets triggered some time after user interaction with the editor. (Which is currently the workaround, press some key and wait a few seconds.)

Is there any way to trigger the validation (or rerender) or just the general refresh of the editor by hand?

Re: Force editor to (re)validate/refresh [message #1831671 is a reply to message #1831665] Wed, 26 August 2020 10:19 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 179
Registered: April 2012
Senior Member
I don't think that you will get proper reaction here, the validation extensions you are using are provided by the WST project. You will have better changes asking it on their forum.

Have a look at the source of interfaces you had to implement to provide the validator, i.e. the IValidator: 'A validator's verification starts when the ValidatorLauncher singleton calls <code>validate</code>.'

The ValidationFramework calls might be helpful too.

Previous Topic:Change the style of property sheet
Next Topic:swt browser in view crash when loading ext js page with complex and heavy layout
Goto Forum:

Current Time: Tue Oct 27 13:47:13 GMT 2020

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

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

Back to the top