-
Notifications
You must be signed in to change notification settings - Fork 1
Icon Handling
The SPLevo tooling aims to provide a smooth integration with the Eclipse IDE to provide a high usability for the developer.
To support this, it makes use of the JDT and MoDisco icons for the software artifact representation. These icons should be used whenever reasonable. To provide additional information with an icon, overlay images should be used. For example, if a diffing element is about an inserted method, the MoDisco method icon is overlaid with a plus icon.
The code below presents a method encapsulating the combination of a provided image (Object baseImage) with an overlay image described by a relative path.
The code below is used within the plugin org.splevo.diffing.emfcompare.edit
. The icons are located in the directory /icons/
and the paths provided to the method are relative to this base path without a file extension (e.g. "ast/statement-single").
/**
* Compose two images to derive a combined icon.
* @param baseImage The base image to combine.
* @param itemProvider The item provider to retrieve the resource locator.
* @param imagePath The path to the image to be overlaid. (relative to /icons/)
* @return The composed image object.
*/
public static Object composeImage(Object baseImage, AbstractDiffExtensionItemProvider itemProvider, String imagePath){
List<Object> images = new ArrayList<Object>(2);
images.add(baseImage);
images.add(itemProvider.getResourceLocator().getImage(imagePath));
return new ComposedImage(images);
}
Contact
KoPL Project
http://www.kopl-project.org
Project Lead: DevBoost GmbH
-
User Guide
-
Demonstrations
-
- Getting Started
- Recommended Tools
- Coding Conventions
- Architecture
- Variation Point Model
- UI
- Quality Assurance (QS)