Building Concerns

After an empty concern graph is created, the user may begin to browse and query the source code, and bit by bit adding related elements and relations to the concern. At the very beginning, user need search for a starting point and seed a concern.

Seeding a Concern

Involves choosing Java elements relevant to a change task and moving them to FEAT.

A good way to proceed with FEAT is to find a seed (or code element relevant to a task), add this element to a FEAT concern, and then grow a concern description based on this element. This seed sometimes can be very easy to find, if there are some classes or methods that user already know that should be a part of the concern. If the user does not know anything about the source code, then the best way is probably skim through the code or user Eclipse search to find any classes or methods that looks like related to the subject of examination. After a good seed is found, add it to the concern by right-clicking the element and selection "add to concern".

To search for an element in Eclipse (an example)

  1. If you aren't already in the Java perspective, switch to it.
  2. In the Workbench menu, select the src folder of the project you are interested in.
  3. In the Workbench menu, select Search | Search.... The Eclipse search dialog will appear.
  4. Click on the Java Search tab.
  5. In the Scope box, select Selected Resources.
  6. For the search string enter the names of the classes that you think might be a part of the concern.
  7. In the search options box, select Type and Declarations. (this is just an example)
  8. Click Search. The results will appear in the Search Result View, at the bottom of the Workbench. To display a result, right-click on it and select Open. This will display the type in the editor and select the corresponding file in the package explorer.

Expanding the Concerns

Involve query participants and participants candidates.

Now user may start to "browse" around the source code by doing all kinds of queries on this seed to spot more related elements. The queries allow user to explore all the possible relations this seed may have, and user can add query results to the concern in Projection View, or do more queries on the query results to verify the relavancy of some of the elements.

And adding elements and relations to concerns.

Once the elements are decided to be useful and should take place in the concern, we can add it to the concern graph. There are two ways of adding an element to FEAT. One way is to put it directly in a concern from Package Explorer. Another way is to put it in the Projection View, and then moving it to a concern.

The Participants View displays all the elemtns and relations in each concern, while the Projection View allows user to query and testing all the possible elements and relations. In other words, Projection View is like a scratch pad for user to explicitly viewing all kinds of relations a particular element may have. And once user decided that this element should be a part of the concern, user can add it to the Participants View, which displays the concent of current active concern.

To add an element or relation to a concern:

  1. Make sure the concern this element will go to is active (is selected in Concern View, or is displayed in Participants View).
  2. Right click on the element to be added (either in Package Explorer or Projection View).
  3. Select "add element to concern" or "add relation to concern" (only in Projection View).
  4. If FEAT Perspective is not current perspective, nor is Participants View displayed, switch to the FEAT Perspective will allow you to see the newly added elements/relations in Participants View.

There is another way of adding a relation to a concern. This method involves Relation View's existing relation detection feature:

  1. Click on a participan in the Participants View.
  2. the After the Relation View appears, a list of added relations and exisiting relations are displayed in the view.
  3. If user spot any existing relation that's currently not a part of the concern but should be, right click on that relation and select "add relation to concern".
  4. Then the relation is added to the active concern and the icon beside the relation will change to a blue dot.
  5. Clicking on the Projection View tab at the bottom of the Relation View to switch back to the Projection View, if needed.

So the process of building this concern can be considered as an alternation of querying on participants to discover unrevealed elements of concern, and selecting elements and relations to add them to concerns.

Breaking down the concern

At some point, user may discover the fact that this concern to be built is actually a collection of several seperated sub-concern. Then, user can choose to create more top-level concerns or sub-concerns under the existing concerns. And add each element to its belonging concern. This seperation of concerns provide user with a more modulized perspective on entire concern. It helps the user to stay more focused on the task and also organize the soon to be populated Participants View. Moreover, in the current version of FEAT, it's better to create child concerns as early as possible, since it's not possible to move elements from one concern to another.

To create a sub-concern:

  1. Switch to FEAT perspective and make sure the Concern Graph View is visible.
  2. Select the concern which will be the parent of the new sub-concern.
  3. Right-click that concern and choose in the pop-up menu "New Concern".
  4. Name the new concern and press Enter.

Important: to add elements and relations to a concern or sub-concern requres that concern to be the current active concern. (is displayed in the Participants View)