Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » No root methods when designing a class which implements IDetailsPage and extends a bean
No root methods when designing a class which implements IDetailsPage and extends a bean [message #759225] Sun, 27 November 2011 20:03 Go to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Hello,
I'm working on a Master/Detail page using MasterDetailsBlock & IDetailsPage.
In order to generalize some Details pages, I've created an abstract class which implements the IDetailsPage interface.
Unfortunately, when trying to design classes which extend my abstract class, WindowBuilder claims to not find any root methods. As suggested, I tried using the @wbp.parser.entryPoint but that didn't help much.

Is there a way around this? or am I doing things completely wrong?
Any tips would be great.
Thanks a lot,
Roded

[Updated on: Sun, 27 November 2011 20:26]

Report message to a moderator

Re: No root methods when designing a class which implements IDetailsPage and extends a bean [message #759233 is a reply to message #759225] Sun, 27 November 2011 21:53 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 886
Registered: July 2009
Location: Boston, MA
Senior Member
I would suggest posting a test case.
Re: No root methods when designing a class which implements IDetailsPage and extends a bean [message #759265 is a reply to message #759233] Mon, 28 November 2011 07:36 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
An abstract class which implements IDetailsPage:
package testcasedetailspage;

import org.eclipse.ui.forms.IDetailsPage;

public abstract class testcaseabstractclass implements IDetailsPage {

}


The details page itself (Created using the WindowBuilder "DetailsPage" wizard.
The only change is that "implements IDetailsPage" was changed to "extends testcaseabstractclass"):
package testcasedetailspage;

import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

public class testcasedetailspage extends testcaseabstractclass {

	private IManagedForm managedForm;

	/**
	 * Create the details page.
	 */
	public testcasedetailspage() {
		// Create the details page
	}

	/**
	 * Initialize the details page.
	 * @param form
	 */
	public void initialize(IManagedForm form) {
		managedForm = form;
	}

	/**
	 * Create contents of the details page.
	 * @param parent
	 */
	public void createContents(Composite parent) {
		FormToolkit toolkit = managedForm.getToolkit();
		parent.setLayout(new FillLayout());
		//		
		Section section = toolkit.createSection(parent,
				ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR);
		section.setText("Empty Section");
		//
		Composite composite = toolkit.createComposite(section, SWT.NONE);
		toolkit.paintBordersFor(composite);
		section.setClient(composite);
	}

	public void dispose() {
		// Dispose
	}

	public void setFocus() {
		// Set focus
	}

	private void update() {
		// Update
	}

	public boolean setFormInput(Object input) {
		return false;
	}

	public void selectionChanged(IFormPart part, ISelection selection) {
		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
		update();
	}

	public void commit(boolean onSave) {
		// Commit
	}

	public boolean isDirty() {
		return false;
	}

	public boolean isStale() {
		return false;
	}

	public void refresh() {
		update();
	}

}


The same thing happens when the class extends the abstract class and implements IDetailsPage.
Reverting the change back to the original "implements" makes the design view work again.

Would appreciate any help.
Thanks,
Roded

[Updated on: Mon, 28 November 2011 07:40]

Report message to a moderator

Re: No root methods when designing a class which implements IDetailsPage and extends a bean [message #759455 is a reply to message #759265] Mon, 28 November 2011 17:49 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Worked it out by having the abstract class implement all IDetailsPage methods, making it editable in WB as well as its subclasses.
Thanks.
Re: No root methods when designing a class which implements IDetailsPage and extends a bean [message #759658 is a reply to message #759265] Tue, 29 November 2011 14:17 Go to previous message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
This was fixed in trunk.

Konstantin Scheglov,
Google, Inc.
Previous Topic:Swing JFrame vs Application Window templates
Next Topic:Newbie question
Goto Forum:
  


Current Time: Tue Nov 25 21:17:26 GMT 2014

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

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