Module 7: Creating a new view using a custom context provider
This module takes you through the steps of creating and
using a custom context provider to customize a CARMA view. The ContextProvider
,
which you create, controls how the context of the CARMA model is displayed
in the view. This module demonstrates how to customize the context
provider to filter out repository instances that are PDS part of the
build process (that is, the listing, object, and load PDS). It will
also only show PDS that are associated with CARMA, the PDS that have
a CARMA token in the name.
Learning objectives
After completing the lessons that make up this module, you should be able to:- Modify an existing Eclipse plug-in project
- Create and modify a Java™ class to perform the enhancements that are offered by the plug-in
- Run or debug the plug-in project
Time required
This module should take approximately 30 minutes to complete.Prerequisites
To successfully complete the lessons in this module, you should have:- Successfully completed Exercise 5 and Exercise 6
- Lesson 1: Create the CustomContextProvider class
This lesson builds on top of the plug-in project you created in Exercise 5, and modified in Exercise 6. In this lesson, you create theCustomContextProvider
class, which can be customized to fit any viewer you want. For example, if you want the field viewer, the context provider can extend theCarmaFieldsContentProvider
. - Lesson 2: Include the CustomContextProvider in the CARMADeveloperView class
In this lesson, you rewrite thecreateViewer
method to include theCustomContentProvider
. - Summary: Module 7
In this module, you have modified the Eclipse plug-in project from Modules 5 and 6 to only show those PDS that are not object, listing, or load repository instances, and those that have to do with CARMA.