Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » FormEditor and canLeaveThePage
FormEditor and canLeaveThePage [message #636660] Tue, 02 November 2010 11:26
Boris Stepanov is currently offline Boris StepanovFriend
Messages: 68
Registered: July 2009
Hi all,

I found the following issue in FormEditor class:

protected void setActivePage(int pageIndex) {
// fix for window handles problem
// this should be called only when the editor is first opened
if (pages.size() > pageIndex
&& pages.get(pageIndex) instanceof IFormPage) {
IFormPage activePage = (IFormPage) pages.get(pageIndex);
} else

This method calls super.setActivePage(int pageIndex) which executes
pageChange(int newPageIndex), but the last one can cancel page changing
through canLeaveThePage() method of the page (see FormEditor
implementation). setActivePage uses pageIndex variable even when page
change was cancelled in super method and sometimes we can see actions in
menu and toolbar from not active page (we see contributor from first
page, but second page is active).

We use method setActivePage to change page programmatically, if you
click on the tab pageChange protected method will be used, so this issue
cannot be reproduced by clicking on tabs. We have list of pages in
Outline view, so when user click on the one of them, page will be
changed through setActivePage method.

Is this a bug? I did not find anything on

Previous Topic:How to add java project's classpath to a plug-in's classpath?
Next Topic:Changing fonts without effect
Goto Forum:

Current Time: Mon Jun 18 04:17:30 GMT 2018

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

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

Back to the top