Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 342777 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/sapphire/ui/SapphireActionSystemPart.java (-4 / +11 lines)
Lines 16-21 Link Here
16
import java.util.concurrent.CopyOnWriteArrayList;
16
import java.util.concurrent.CopyOnWriteArrayList;
17
17
18
import org.eclipse.jface.resource.ImageDescriptor;
18
import org.eclipse.jface.resource.ImageDescriptor;
19
import org.eclipse.sapphire.modeling.ImageData;
19
import org.eclipse.sapphire.modeling.el.FailSafeFunction;
20
import org.eclipse.sapphire.modeling.el.FailSafeFunction;
20
import org.eclipse.sapphire.modeling.el.Function;
21
import org.eclipse.sapphire.modeling.el.Function;
21
import org.eclipse.sapphire.modeling.el.FunctionContext;
22
import org.eclipse.sapphire.modeling.el.FunctionContext;
Lines 80-92 Link Here
80
            
81
            
81
            for( ISapphireActionImage image : def.getImages() )
82
            for( ISapphireActionImage image : def.getImages() )
82
            {
83
            {
83
                final Function imageFunction = FailSafeFunction.create( image.getImage().getContent(), Literal.create( ImageDescriptor.class ) );
84
                final Function imageFunction = FailSafeFunction.create( image.getImage().getContent(), Literal.create( ImageData.class ) );
84
                final FunctionResult imageFunctionResult = imageFunction.evaluate( this.functionContext ); 
85
                final FunctionResult imageFunctionResult = imageFunction.evaluate( this.functionContext ); 
85
                final ImageDescriptor img = (ImageDescriptor) imageFunctionResult.value();
86
                final ImageData data = (ImageData) imageFunctionResult.value();
86
                
87
                
87
                if( img != null )
88
                if( data != null )
88
                {
89
                {
89
                    this.images.add( img );
90
                	final org.eclipse.swt.graphics.ImageData swtdata = new org.eclipse.swt.graphics.ImageData( data.contents() );
91
                   final ImageDescriptor img = ImageDescriptor.createFromImageData( swtdata );
92
                    
93
                   if ( img != null )
94
                    {
95
                    	this.images.add( img );	
96
                    }                	
90
                }
97
                }
91
                
98
                
92
                imageFunctionResult.dispose();
99
                imageFunctionResult.dispose();

Return to bug 342777