EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.cip.runtime]

COVERAGE SUMMARY FOR SOURCE FILE [RunConfigImages.java]

nameclass, %method, %block, %line, %
RunConfigImages.java0%   (0/1)0%   (0/9)0%   (0/106)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RunConfigImages0%   (0/1)0%   (0/9)0%   (0/106)0%   (0/20)
<static initializer> 0%   (0/1)0%   (0/77)0%   (0/13)
RunConfigImages (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getAnnotationIcon (): Image 0%   (0/1)0%   (0/4)0%   (0/1)
getAnnotationNewIcon (): Image 0%   (0/1)0%   (0/4)0%   (0/1)
getChiliIconDescriptor (): ImageDescriptor 0%   (0/1)0%   (0/4)0%   (0/1)
getCompletionTabImage (): Image 0%   (0/1)0%   (0/4)0%   (0/1)
getFileNamesTabImage (): Image 0%   (0/1)0%   (0/2)0%   (0/1)
getFolderIcon (): Image 0%   (0/1)0%   (0/4)0%   (0/1)
getImageDescriptor (String): ImageDescriptor 0%   (0/1)0%   (0/4)0%   (0/1)

1package de.uka.ipd.sdq.cip.runtime;
2 
3import org.eclipse.jface.resource.ImageDescriptor;
4import org.eclipse.jface.resource.ImageRegistry;
5import org.eclipse.swt.graphics.Image;
6 
7 
8/**
9 * The class is used for the administration the images stored in the Plug-In.
10 * 
11 * @author Roman Andrej
12 * @author Thomas Schuischel
13 */
14public class RunConfigImages {
15        
16        /**
17         * Names of images used to represent actions in ToolBar
18         */
19        public static final String COMPLETION_TAB                 = "completion_tab";
20        public static final String FOLDER_ICON                         = "folder_icon";
21        public static final String ANNOTATION_ICON                 = "annotation_icon";
22        public static final String ANNOTATION_NEW_ICON         = "annotation_new_icon";
23        public static final String CHILI_ICON                         = "chili";
24        
25        /** For the toolbar images */
26        public static ImageRegistry imageRegistry = new ImageRegistry();
27        
28        /**
29         * Note: An image registry owns all of the image objects registered with it,
30         * and automatically disposes of them the SWT Display is disposed.
31         */ 
32        static {
33                String iconPath = "icons/";
34                
35                imageRegistry.put(COMPLETION_TAB,
36                                 getImageDescriptor(iconPath + COMPLETION_TAB + ".gif"));
37                
38                imageRegistry.put(FOLDER_ICON,
39                                 getImageDescriptor(iconPath + FOLDER_ICON + ".png"));
40                
41                imageRegistry.put(ANNOTATION_ICON,
42                                 getImageDescriptor(iconPath + ANNOTATION_ICON + ".png"));
43                
44                imageRegistry.put(ANNOTATION_NEW_ICON,
45                                 getImageDescriptor(iconPath + ANNOTATION_NEW_ICON + ".png"));
46                
47                imageRegistry.put(CHILI_ICON,
48                                 getImageDescriptor(iconPath + CHILI_ICON + ".jpg"));
49        }
50 
51        /**
52         * @param imageFilePath
53         *            the relative to the root of the plug-in; the path must be
54         *            legal
55         * @return an image descriptor, or null if no image could be found
56         */
57        public static ImageDescriptor getImageDescriptor(String imageFilePath) {
58                return CipRuntimePlugin.imageDescriptorFromPlugin(CipRuntimePlugin.PLUGIN_ID, imageFilePath);
59        }
60 
61        public static Image getCompletionTabImage() {
62                return imageRegistry.get(COMPLETION_TAB);
63        }
64 
65        public static Image getFileNamesTabImage() {
66                // TODO Auto-generated method stub
67                return null;
68        }
69        
70        public static Image getFolderIcon() {
71                return imageRegistry.get(FOLDER_ICON);
72        }
73        
74        public static Image getAnnotationIcon() {
75                return imageRegistry.get(ANNOTATION_ICON);
76        }
77        
78        public static Image getAnnotationNewIcon() {
79                return imageRegistry.get(ANNOTATION_NEW_ICON);
80        }
81        
82        public static ImageDescriptor getChiliIconDescriptor() {
83                return imageRegistry.getDescriptor(CHILI_ICON);
84        }
85}

[all classes][de.uka.ipd.sdq.cip.runtime]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov