Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » I can't create more 4 Palette Item on Windows 7 but It can on Win XP
icon5.gif  I can't create more 4 Palette Item on Windows 7 but It can on Win XP [message #544951] Tue, 06 July 2010 08:18
SeungJin Jeong is currently offline SeungJin JeongFriend
Messages: 1
Registered: July 2010
Junior Member
It works on Windows XP but Windows 7 doesn't work.
When I block createCategories(PaletteRoot root) method , It works fine.
otherwise It works creating only 4 item on each group.

below is source code..
 private static List<PaletteContainer> createCategories(PaletteRoot root) {
        xmlRootNode = initXmlData("Surge.xml");
        List<PaletteContainer> categories = new ArrayList<PaletteContainer>();
       
        Iterator<XMLNode> it = xmlRootNode.getChildNodes().iterator();
       
        String sGroupLabel = null;
        String sGroupName = null;
        String sGroupPath = null;
       
         
        String sName = null;    
        String sSVGPath = null;    
        String sIconPath = null;    
        String sNodeName = null;
        while(it.hasNext()){
            XMLNode tmpNode = it.next();
            sGroupLabel = (String) tmpNode.getAttribute("name");
            sGroupName = tmpNode.getNodeName();
            sGroupPath = (String) tmpNode.getAttribute("path");
           
            PaletteDrawer drawer = new PaletteDrawer(sGroupLabel,
                    ImageDescriptor.createFromFile(AppPaletteView.class, "/kr/a2m/gef/palette/icons/"+sGroupPath));
           
            Iterator<XMLNode> it2 = tmpNode.getChildNodes().iterator();
           
            while(it2.hasNext()){
                XMLNode tmp2Node = it2.next();
                Iterator<XMLNode> it3 = tmp2Node.getChildNodes().iterator();
//                List<CombinedTemplateCreationEntry> entries = new ArrayList<CombinedTemplateCreationEntry>();
                sNodeName = tmp2Node.getNodeName();
                int iSize = 0;
               
                while(it3.hasNext()){
                    XMLNode tmp3Node = it3.next();
                    if( "name".equals(tmp3Node.getNodeName()) ){
                        sName = tmp3Node.getNodeValue();
                    }else if( "icon_path".equals(tmp3Node.getNodeName()) ){
                        sIconPath = "icons/"+tmp3Node.getNodeValue();
                    }else if( "svg_path".equals(tmp3Node.getNodeName()) ){
                        sSVGPath = "/kr/a2m/gef/figure/svg/images/"+tmp3Node.getNodeValue();
                    }else if( "size".equals(tmp3Node.getNodeName()) ){
                        iSize = Integer.parseInt(tmp3Node.getNodeValue());
                    }
                   
                }
               
                CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                        sName,
                        sName,
                        new AtpNodeCreateFactory(sSVGPath, sGroupName, sNodeName, sName, iSize),
                        ImageDescriptor.createFromFile(AppPaletteView.class, sIconPath),
                        ImageDescriptor.createFromFile(AppPaletteView.class, sIconPath));
//                entries.add(combined);
//                drawer.addAll(entries);
                drawer.add(combined);
            }
            categories.add(drawer);
        }
       
        return categories;
    }


and below is log file.
!ENTRY org.eclipse.ui.workbench 4 0 2010-07-06 16:42:32.255
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
    at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:171)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:174)
    at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:771)
    at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1211)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:446)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:674)
    at org.eclipse.swt.widgets.Display.release(Display.java:3472)
    at org.eclipse.swt.graphics.Device.dispose(Device.java:261)
    at kr.a2m.gef.Application.start(Application.java:36)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

!ENTRY org.eclipse.ui.workbench 4 0 2010-07-06 16:42:32.258
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
    at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:171)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:174)
    at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:771)
    at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1211)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:446)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:674)
    at org.eclipse.swt.widgets.Display.release(Display.java:3472)
    at org.eclipse.swt.graphics.Device.dispose(Device.java:261)
    at kr.a2m.gef.Application.start(Application.java:36)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

!ENTRY org.eclipse.ui.workbench 4 0 2010-07-06 16:42:32.260
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
    at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:171)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:174)
    at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:771)
    at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1211)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:446)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:674)
    at org.eclipse.swt.widgets.Display.release(Display.java:3472)
    at org.eclipse.swt.graphics.Device.dispose(Device.java:261)
    at kr.a2m.gef.Application.start(Application.java:36)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

!ENTRY org.eclipse.ui.workbench 4 0 2010-07-06 16:42:32.261
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
    at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:171)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:804)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:755)
    at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:174)
    at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:771)
    at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1211)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:807)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:441)
    at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:446)
    at org.eclipse.swt.widgets.Shell.dispose(Shell.java:674)
    at org.eclipse.swt.widgets.Display.release(Display.java:3472)
    at org.eclipse.swt.graphics.Device.dispose(Device.java:261)
    at kr.a2m.gef.Application.start(Application.java:36)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)


Anybody help me~~~! I'm sick of this situation. and I can't find any way to solve it..
Previous Topic:TabbedPane
Next Topic:Integrate Form items in GEF
Goto Forum:
  


Current Time: Mon Nov 24 03:11:33 GMT 2014

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

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