Automated Formal Static Analysis and Retrieval of Source Code - JKU
Automated Formal Static Analysis and Retrieval of Source Code - JKU
Automated Formal Static Analysis and Retrieval of Source Code - JKU
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.2. INTEGRATION OF MINDBREEZE CODE SEARCH INTO MINDBREEZE ENTERPRISE SEARCH43<br />
3. the context items for a search hit (or artifact).<br />
For building up a context provider we provide implementations for a ContextIcon class,<br />
namely Icon, <strong>and</strong> a ContextMenu class, namely Menu.<br />
The class <strong>Code</strong>SearchContextProvider, which implements the context provider, initializes<br />
the classes Icon <strong>and</strong> Menu thus implementing the three types <strong>of</strong> context items: context menu,<br />
context action <strong>and</strong> context icon.<br />
A ContextIcon class represents artifact icons <strong>and</strong> context menu entries icons.<br />
A ContextMenu class represents context menus, a set <strong>of</strong> context actions.<br />
A ContextAction class represents a single context menu entry.<br />
The two classes (Menu <strong>and</strong> Icon) (see Figure 3.6) provide parameterless constructors which<br />
are called via the <strong>Code</strong>SearchContextProvider constructor.<br />
Figure 3.6: <strong>Code</strong>SearchContextProvider Class <strong>and</strong> Inner Classes<br />
The class Menu implements specific context menus <strong>and</strong> actions for the hit-types from the<br />
<strong>Code</strong>Search category. The methods implemented by this class are:<br />
• public ContextMenu[] getBulked(Principal identity, String lang,<br />
int itemCount, String[] metadataKeys, Collection) – returns<br />
a context menu for the given hits. It uses the method getMenu() for retrieving the hittypes<br />
stored in a Map structure.