Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-build-dev] Resourcenavigator spastic jitting


Hi dudes,

imo there seems to be an bug in my sourcecode right on the bottom you can read.
If the handler is activated the resourcenavigator on current workbench there is no chance to work with.
The navigator has jitted then.
So where is the bug.

My Machine is:
WindowsXP
Eclipse Version: 3.2.0 Build id: I20060512-1600



/**
* from Listener
*/
  public void handleEvent(Event event) {
       
        if (event.item instanceof TreeItem) {
            TreeItem ti = (TreeItem) event.item;
           
            if (ti.getData() instanceof File) {
                File file = (File) ti.getData();
               
                if(file.getFileExtension().equals("gif") ||file.getFileExtension().equals("jpg") ||file.getFileExtension().equals("jpeg") )
                        try{
                                Image i=new Image(Display.getCurrent(),file.getRawLocation().toOSString());
                                ti.setText(file.getName()+"   ["+i.getImageData().width+"x"+i.getImageData().height+"]");
                                if(naviTreeColl==null)
                                {
                                        naviTreeColl=new TreeColumn(ti.getParent(),SWT.RIGHT);
                                        naviTreeColl.setText("Info");
                                        ti.getParent().setHeaderVisible(true);
                                       
                                }
                                ti.setImage(i);
                                System.out.println(file.getRawLocation().toOSString());
                        }catch (Exception e) {
                                e.printStackTrace();
                                        }
                       




Back to the top