Returns an image descriptor for a compilation unit not on the class path.
The descriptor includes overlays, if specified.

@param file
the cu resource file
@param flags
the image flags
@return returns the image descriptor
557179
public ImageDescriptor getCUResourceImageDescriptor(IFile file, int flags) {
		Point size = useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;
		return new VdmElementImageDescriptor(
				VdmPluginImages.DESC_OBJS_CUNIT_RESOURCE, 0, size);
	}
72373
public ImageDescriptor image(SarlEvent event) {
		final JvmDeclaredType jvmElement = this.jvmModelAssociations.getInferredType(event);
		return this.images.forEvent(
				event.getVisibility(),
				this.adornments.get(jvmElement));
	}
644002
public static Icon getImageIcon(ClassLoader objectLoader, String fileName) throws UrlProviderException
	{
		return getImageIcon(new ClassLoaderUrlProvider(objectLoader), fileName);
	}
72458
public static int cudnnSetFilterNdDescriptor(
        cudnnFilterDescriptor filterDesc, 
        int dataType, /** image data type */
        int format, 
        int nbDims, 
        int[] filterDimA)
    {
        return checkResult(cudnnSetFilterNdDescriptorNative(filterDesc, dataType, format, nbDims, filterDimA));
    }
125075
public Image getImage(Object element)
	{
		try
		{
			Image resultB = fImageLabelProvider.getImageLabel(element, evaluateImageFlags(element));
			// if (result == null && (element instanceof IStorage)) {
			// result= fStorageLabelProvider.getImage(element);
			// }
			Image result = decorateImage(resultB, element);

			
			return result;
		} catch (Exception e)
		{
			VdmUIPlugin.log(e);
			return null;
		}
	}
1176951
protected Graphics2D getGraphics(BufferedImage image) {
		Graphics2D graphics = image.createGraphics();
		graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);
		return graphics;
	}
466471
public ImageDescriptor image(SarlAction action) {
		final JvmOperation jvmElement = this.jvmModelAssociations.getDirectlyInferredOperation(action);
		return this.images.forOperation(
				action.getVisibility(),
				this.adornments.get(jvmElement));
	}
805886
public static Properties readPropertiesFile(final File file) {
		if (!file.exists()) {
			JKIOUtil.logger.info(String.format("File %s doesnot exists , return empty map", file.getName()));
			return new Properties();
		}
		try {
			InputStream in = new FileInputStream(file);
			if (in != null) {
				return readPropertiesStream(in);
			}
		} catch (IOException e) {
			JKExceptionUtil.handle(e);
		}
		return null;
	}
936941
public static List<TransformationDescription> getDescriptionsFromXMLFile(File file) {
        List<TransformationDescription> desc = new ArrayList<TransformationDescription>();
        try {
            return loadDescrtipionsFromXMLInputSource(new InputSource(file.getAbsolutePath()), file.getName());
        } catch (Exception e) {
            LOGGER.error("Unable to read the descriptions from file " + file.getAbsolutePath(), e);
        }
        return desc;
    }
1112089
public ImageDescriptor image(SarlField attribute) {
		return this.images.forField(
				attribute.getVisibility(),
				this.adornments.get(this.jvmModelAssociations.getJvmField(attribute)));
	}
1143152
static Image getIcon(String target) {

        if (target.equalsIgnoreCase("SystemCursor")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Hourglass.gif")).getImage());
        } else if (target.equalsIgnoreCase("Frame")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("hsqldb.gif")).getImage());
        } else if (target.equalsIgnoreCase("Execute")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("run_exc.gif")).getImage());
        } else if (target.equalsIgnoreCase("StatusRunning")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("RedCircle.gif")).getImage());
        } else if (target.equalsIgnoreCase("StatusReady")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("GreenCircle.gif")).getImage());
        } else if (target.equalsIgnoreCase("Clear")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Clear.png")).getImage());
        } else if (target.equalsIgnoreCase("Problem")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("problems.gif")).getImage());
        } else if (target.equalsIgnoreCase("BoldFont")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Bold.gif")).getImage());
        } else if (target.equalsIgnoreCase("ItalicFont")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Italic.gif")).getImage());
        } else if (target.equalsIgnoreCase("ColorSelection")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Colors.png")).getImage());
        } else if (target.equalsIgnoreCase("Close")) {
            return (new ImageIcon(
                CommonSwing.class.getResource("Close.png")).getImage());
        } else {
            return (null);
        }
    }
297274
protected final Image getImage(String imagePath) {
		final ImageDescriptor descriptor = getImageDescriptor(imagePath);
		if (descriptor == null) {
			return null;
		}
		return descriptor.createImage();
	}
492907
public AceObjectFlags addFlag(final Flag flag) {
        if (!flags.contains(flag)) {
            flags.add(flag);
        }
        return this;
    }
238448
protected ImageDescriptor imageDescriptor(SarlAction element) {
		final JvmOperation jvmElement = this.jvmModelAssociations.getDirectlyInferredOperation(element);
		return this.images.forOperation(
				element.getVisibility(),
				this.adornments.get(jvmElement));
	}
1079126
public static boolean isImage( File file ){
		try {
			String mimeType = Files.probeContentType(file.toPath());
			if( mimeType == null ) {
				// In some OS there is a bug where it always returns null/
				String extension = FilenameUtils.getExtension(file.getName()).toLowerCase();
				String[] suffixes = ImageIO.getReaderFileSuffixes();
				for( String s : suffixes ) {
					if( s.equals(extension)) {
						return true;
					}
				}
			} else {
				return mimeType.startsWith("image");
			}
		} catch (IOException ignore) {}
		return false;
	}
75923
public static long flags(JCTree tree) {
        switch (tree.getTag()) {
        case VARDEF:
            return ((JCVariableDecl) tree).mods.flags;
        case METHODDEF:
            return ((JCMethodDecl) tree).mods.flags;
        case CLASSDEF:
            return ((JCClassDecl) tree).mods.flags;
        case BLOCK:
            return ((JCBlock) tree).flags;
        default:
            return 0;
        }
    }
1074576
public static PemObject getPemObject(final File file) throws IOException
	{
		PemObject pemObject;
		try (PemReader pemReader = new PemReader(new InputStreamReader(new FileInputStream(file))))
		{
			pemObject = pemReader.readPemObject();
		}
		return pemObject;
	}