Module 1: Adding decorators to the user interface
This module takes you through the steps to add a decorator, or image overlay, to the CARMA members shown in the CARMA Repositories view.
You add a lock decorator to display on members when they
are locked and a question mark decorator to display on members when
members need their metadata synchronized.
Note: The sample RAMs that
come with Developer for z/OS® do
not support the Lock function. You want to
use this exercise with a RAM that supports the Lock function.
Learning objectives
After completing the lessons in this exercise, you will be able to:- Create a Developer for z/OS plug-in Project
- Import graphics to the plug-in project
- Modify the Java™
Activator
class, so the plug-in is able to find the necessary graphics - Create a Java
Decorator
class and write code to display the appropriate graphic - Modify the
plugin.xml
file to provide theorg.eclipse.ui.decorators
extension point - Run and debug the sample plug-in
Time required
This module takes approximately 30 minutes to complete.Prerequisites
To successfully complete the lessons in this module, you should have:- Created an Eclipse plug-in project
- An accessible directory containing a graphic of a lock and a question mark, or other representative graphics, with dimensions of approximately 11 x 13 pixels
- Lesson 1: Create an icons folder and import sample graphics
In this lesson, you create an icons folder and import the sample graphics to use as your decorators. - Lesson 2: Modify the Java Activator class
TheActivator
class is created automatically with the creation of the Eclipse plug-in project. This lesson guides you through the steps to modify theActivator
class to display the appropriate graphics as decorators. - Lesson 3: Create a Java Decorator class
You create theDecorator
class in this lesson, which will later be responsible for placing the graphics as decorators on CARMA members. - Lesson 4: Develop the code for the Java Decorator class
In this lesson, you develop code for theDecorator
class that handles the decorating of the CARMA resources in the CARMA Repositories view. - Lesson 5: Modify the plugin.xml file
In this lesson, you modify theplugin.xml
file to provide theorg.eclipse.ui.decorators
extension point and attributes. - Summary: Module1
This module has guided you through the steps to create an Eclipse plug-in project that adds decorators to CARMA members and containers, which are locked or unsynchronized.