comparison org.eclipse.jface/src/org/eclipse/jface/resource/FileImageDescriptor.d @ 20:dccb717aa902

Remove more tango imports
author Frank Benoit <benoit@tionex.de>
date Wed, 18 Mar 2009 12:10:17 +0100
parents 6f068362a363
children
comparison
equal deleted inserted replaced
19:52184e4b815c 20:dccb717aa902
32 import java.io.InputStream; 32 import java.io.InputStream;
33 import java.io.FileInputStream; 33 import java.io.FileInputStream;
34 import java.io.BufferedInputStream; 34 import java.io.BufferedInputStream;
35 import java.io.ByteArrayInputStream; 35 import java.io.ByteArrayInputStream;
36 36
37 import tango.util.log.Trace;
38
39 /** 37 /**
40 * An image descriptor that loads its image information from a file. 38 * An image descriptor that loads its image information from a file.
41 */ 39 */
42 class FileImageDescriptor : ImageDescriptor { 40 class FileImageDescriptor : ImageDescriptor {
43 41
105 if (in_ !is null) { 103 if (in_ !is null) {
106 try { 104 try {
107 result = new ImageData(in_); 105 result = new ImageData(in_);
108 } catch (SWTException e) { 106 } catch (SWTException e) {
109 if (e.code !is SWT.ERROR_INVALID_IMAGE /+&& e.code !is SWT.ERROR_UNSUPPORTED_FORMAT+/) { 107 if (e.code !is SWT.ERROR_INVALID_IMAGE /+&& e.code !is SWT.ERROR_UNSUPPORTED_FORMAT+/) {
110 Trace.formatln( "FileImageDescriptor getImageData SWTException for name={}", name ); 108 getDwtLogger().trace( __FILE__, __LINE__, "FileImageDescriptor getImageData SWTException for name={}", name );
111 throw e; 109 throw e;
112 // fall through otherwise 110 // fall through otherwise
113 } 111 }
114 } finally { 112 } finally {
115 in_.close(); 113 in_.close();
127 */ 125 */
128 private InputStream getStream() { 126 private InputStream getStream() {
129 InputStream is_ = null; 127 InputStream is_ = null;
130 128
131 // if (location !is null) { 129 // if (location !is null) {
132 // Trace.formatln( "FileImageDescriptor getStream importdata.length={} name={}",importdata.length, name );
133 is_ = new ByteArrayInputStream(cast(byte[]) importdata); 130 is_ = new ByteArrayInputStream(cast(byte[]) importdata);
134 // is_ = ClassInfoGetResourceAsStream( location, name); 131 // is_ = ClassInfoGetResourceAsStream( location, name);
135 132
136 // } else { 133 // } else {
137 // try { 134 // try {