Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361760

Summary: windowbuilder crashes during design page open
Product: z_Archived Reporter: poirot <poirot>
Component: WindowBuilderAssignee: Andrey Sablin <sablin.andrey>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: clayberg, mattpoll, Thomas.Feickert
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
generated report file none

Description poirot CLA 2011-10-23 13:38:31 EDT
Created attachment 205774 [details]
generated report file

eclipse windowbuilder pro crashes with  

java.lang.NullPointerException
	at org.eclipse.wb.core.model.AbstractComponentInfo.getAbsoluteBounds(AbstractComponentInfo.java:83)

if you try to reopen that smartgwt-gui-window-class (created with windowbuilder) in the design page.

simply uncomment the marked line ...

package com.smartgwt.sample.client;

import com.smartgwt.client.types.LayoutResizeBarPolicy;
import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VStack;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;

public class TestWindos extends Window {

	public TestWindos() {
		setSize("400", "300");
		setDefaultResizeBars(LayoutResizeBarPolicy.MARKED);
		setShowMinimizeButton(false);
		setAutoSize(false);
		setTitle("New window");
		setCanDragResize( true );
		
		VStack vStack = new VStack();
		vStack.setSize("100%", "100%");
		
		TabSet tabSet = new TabSet();
		tabSet.setSize("100%", "100%");
		
		Tab tab = new Tab("newTab");
		
		SectionStack sectionStack = new SectionStack();
		sectionStack.setSize("100%", "100%");
		
		SectionStackSection sctnstcksctnNewSection = new SectionStackSection("New Section");
		sctnstcksctnNewSection.setExpanded(true);
		
		sectionStack.addSection(sctnstcksctnNewSection);
		
		SectionStackSection sctnstcksctnNewSection_1 = new SectionStackSection("New Section");
		sctnstcksctnNewSection_1.setExpanded(true);
		
		TabSet tabSet_2 = new TabSet();
		tabSet_2.setSize("100%", "100%");
		
		Tab tab_2 = new Tab("newTab");
//uncomment this line to reproduce the crash		tabSet_2.addTab(tab_2);
		
		sctnstcksctnNewSection_1.addItem(tabSet_2);
		sectionStack.addSection(sctnstcksctnNewSection_1);
		tab.setPane(sectionStack);
		tabSet.addTab(tab);
		
		Tab tab_1 = new Tab("newTab");
		tabSet.addTab(tab_1);
		vStack.addMember(tabSet);
		addItem(vStack);
		vStack.moveTo(6, 22);
	}

}
Comment 1 Konstantin Scheglov CLA 2011-11-11 14:00:32 EST
I've added com.google.gdt.eclipse.designer.smartgwt.model.widgets.SectionStackTest._test_tabSet()
Remove leading "_" to reproduce problem.
Comment 2 Andrey Sablin CLA 2011-11-12 10:42:48 EST
Fixed in trunk.
Comment 3 Eric Clayberg CLA 2011-11-16 18:31:38 EST
Fixed