Members
affectedTreeDataProvider
Tree data provider for affected nodes TreeView
- Source:
(constant) BASE_AFFECTED_NODE_COLOR :string
Base color of affected nodes.
Type:
- string
- Source:
(constant) BASE_FOUND_NODE_COLOR :string
Base color of requested nodes.
Type:
- string
- Source:
(constant) BASE_LINK_COLOR :string
Base color of links.
Type:
- string
- Source:
(constant) BASE_NODE_COLOR :string
Base color of nodes.
Type:
- string
- Source:
(constant) BASE_NODE_NAME_COLOR :string
Base node name color.
Type:
- string
- Source:
(constant) BASE_REQUESTED_NODE_COLOR :string
Base color of requested nodes.
Type:
- string
- Source:
(constant) BASE_SELECTED_NODE_COLOR :string
Base color of selected nodes.
Type:
- string
- Source:
(constant) BASE_USED_BY_NODE_COLOR :string
Base color of used-by nodes.
Type:
- string
- Source:
DEFAULT_DISTANCE
Default distance for the simulation algorithm.
- Source:
DEFAULT_DISTANCE
Default distance for the simulation algorithm.
- Source:
DEFAULT_ITERATIONS
Default number of iterations for the simulation algorithm.
- Source:
DEFAULT_ITERATIONS
Default number of iterations for the simulation algorithm.
- Source:
DEFAULT_MODE
Default mode of analysis.
- Source:
DEFAULT_MODE
Default mode of analysis.
- Source:
DEFAULT_STRENGTH
Default strength for the simulation algorithm.
- Source:
DEFAULT_STRENGTH
Default strength for the simulation algorithm.
- Source:
DEFAULT_TYPE
Default value for the selected BitBake task.
- Source:
DEFAULT_TYPE
Default value for the selected BitBake task.
- Source:
graph_data :any
JSON string with visualizaton data.
Type:
- any
- Source:
graph_links :d3.Selection.<SVGLineElement, any, SVGGElement, any>
List of lines representing links in the graph.
Type:
- d3.Selection.<SVGLineElement, any, SVGGElement, any>
- Source:
graph_nodes :d3.Selection.<SVGRectElement, any, SVGGElement, any>
List of rectangles representing nodes in the graph.
Type:
- d3.Selection.<SVGRectElement, any, SVGGElement, any>
- Source:
graph_package_names :d3.Selection.<SVGTextElement, any, SVGGElement, any>
List of text elements with node names.
Type:
- d3.Selection.<SVGTextElement, any, SVGGElement, any>
- Source:
height :number
Height of the panel.
Type:
- number
- Source:
legend
Legend in the sidebar
- Source:
(constant) LICENSE_COLORS
Colors for 10 most used licenses.
- Source:
linkMatrix :Object
Dictionary storing which node is connected to which node.
Type:
- Object
- Source:
mode :string
Mode of analysis.
Type:
- string
- Source:
(constant) node_height :number
Height of the node.
Type:
- number
- Source:
node_width :number
Width of the node.
Type:
- number
- Source:
removedLinks
List of links removed from the visualization.
- Source:
removedNodes :Array.<any>
List of nodes removed from the visualization.
Type:
- Array.<any>
- Source:
removedTreeDataProvider
Tree data provider for removed nodes TreeView
- Source:
requestedTreeDataProvider
Tree data provider for nodes that the selected node depends on TreeView
- Source:
sidebar
Sidebar menu
- Source:
simulation :any
Instance of the simulation.
Type:
- any
- Source:
svg :d3.Selection.<SVGGElement, any, HTMLElement, any>
SVG element with the visualization.
Type:
- d3.Selection.<SVGGElement, any, HTMLElement, any>
- Source:
used_licenses
List of all used licenses.
- Source:
usedByTreeDataProvider
Tree data provider for nodes that depend on the selected node TreeView
- Source:
visualizationPanel
Main visualization panel
- Source:
(constant) vscode :any
Instance of the WebView API.
Type:
- any
- Source:
width :number
Width of the panel.
Type:
- number
- Source:
Methods
activate(context)
Activate the extension. Register commands and views.
Parameters:
Name | Type | Description |
---|---|---|
context |
Extension context. |
- Source:
addAffectedNodes(affected_nodes, node, starting_node, is_removed)
Store all nodes that depend on the specified node (called recursively).
Parameters:
Name | Type | Description |
---|---|---|
affected_nodes |
||
node |
any | Current node. |
starting_node |
any | Starting node. |
is_removed |
number | Stores if noded is removed from visualization. |
- Source:
addNodeToRemoved(name, recipe, id)
Add node to the removed nodes TreeView.
Parameters:
Name | Type | Description |
---|---|---|
name |
Name of the node to be removed. | |
recipe |
Path to the recipe of the node to be removed. | |
id |
ID of the node to be removed. |
- Source:
arrowInit()
Create arrows for lines.
- Source:
callExportSVG()
Send message to the Sidebar class instance to export to the SVG file.
- Source:
clearSelectedNode()
Clear information elements of selected node.
- Source:
createVizualization(extensionUri, type, distance, iterations, strength, mode)
Create and show visualization.
Parameters:
Name | Type | Description |
---|---|---|
extensionUri |
Extension URI. | |
type |
Type of the BitBake task. | |
distance |
Distance between the nodes (for the force directed algorithm). | |
iterations |
Number of iterations (for the force directed algorithm). | |
strength |
Strength of the force between nodes (for the force directed algorithm). | |
mode |
Mode of analysis. |
- Source:
Returns:
void
exportSVG()
Export the visualization SVG.
- Source:
exportSVG()
Export the SVG element with visualization.
- Source:
findNodes()
Get input value and send message to the Sidebar class instance to find a node.
- Source:
findNodes(search)
Find nodes in visualization. If no node is found, send info to VisualizationPanel.
Parameters:
Name | Type | Description |
---|---|---|
search |
string | Name or pattern of the node that should be found. |
- Source:
generate()
Get input values and send message to the Sidebar class instance to generate the visualization.
- Source:
getNonce()
Generated nonce to be used for loading JS file in HTML.
- Source:
Returns:
Nonce string.
getNonce()
Generated nonce to be used for loading JS file in HTML.
- Source:
Returns:
Nonce string.
getRecipePath(recipe)
Get correct path to the recipe file (used for WSLv2 functionality).
Parameters:
Name | Type | Description |
---|---|---|
recipe |
Path to recipe. |
- Source:
Returns:
Correct path to recipe.
getRecipePath(recipe)
Get correct path to the recipe file (used for WSLv2 functionality).
Parameters:
Name | Type | Description |
---|---|---|
recipe |
Path to recipe. |
- Source:
Returns:
Correct path to recipe.
initData()
Load data from HTML elements. If license analysis mode is used get all used licenses and send legend to WebView.
- Source:
initMatrix()
Init dictionary storing which node is connected to which node.
- Source:
initSimulation()
Init the simulation with parameters from the HTML elements.
- Source:
initSVG()
Initialize the SVG element that will contain the visualization.
- Source:
labelsUpdate()
Update node names in the visualization.
- Source:
linksUpdate()
Update links in the visualization.
- Source:
loadFile(file)
Load data from a specified file and return them as a list of lines.
Parameters:
Name | Type | Description |
---|---|---|
file |
File to be opened. |
- Source:
Returns:
List of lines (strings).
loadFile(file)
Load data from a specified file and return them as a list of lines.
Parameters:
Name | Type | Description |
---|---|---|
file |
File to be opened. |
- Source:
Returns:
List of lines (strings).
nodesUpdate()
Update nodes in the visualization.
- Source:
openSelectedRecipe()
Send message to the Sidebar class instance that selected node's recipe needs to be opened.
- Source:
parseRecipe(recipe)
Parse a recipe file and return a dictionary with license information.
Parameters:
Name | Type | Description |
---|---|---|
recipe |
Path to the recipe file. |
- Source:
Returns:
Dictionary with license information.
removeNode(id)
Remove node from visualization.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of the node that will be removed. |
- Source:
removeSelected()
Send message to the Sidebar class instance that selected node needs to be removed from
the visualization.
- Source:
returnNode(name)
Return node to visualization.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the node that should be returned. |
- Source:
returnToVisualization(name)
Return node from the TreeView of removed nodes back to visualization.
Parameters:
Name | Type | Description |
---|---|---|
name |
Name of the node to be removed. |
- Source:
selectNode(node, used_by, requested, affected)
Select node from visualization.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node to be selected. | |
used_by |
List of nodes that request the selected node. | |
requested |
List of nodes that the selected node reauests. | |
affected |
List of node directly or inderectly depenedent on the selected node. |
- Source:
selectNode(name, recipe, licence)
Set name, recipe and license of the selected node to information elements.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the selected node. |
recipe |
string | Path to the recipe of the selected node. |
licence |
string | Used license of the selected node. |
- Source:
selectNode(node)
Select node from the graph.
Parameters:
Name | Type | Description |
---|---|---|
node |
any | Selected node. |
- Source:
selectNodeAffectedConnections(node)
Parameters:
Name | Type | Description |
---|---|---|
node |
any |
- Source:
selectNodeFromList(name)
Select node from the list of requested or used by nodes.
Parameters:
Name | Type | Description |
---|---|---|
name |
Name of the node that will be selected. |
- Source:
selectNodeNormalConnections(node, licenses)
Select node in the visualization if default or licenses analysis is used.
Parameters:
Name | Type | Description |
---|---|---|
node |
any | |
licenses |
boolean |
- Source:
setAffectedColors(id, affected_nodes)
Set BASE_AFFECTED_NODE_COLOR color to nodes directly or indirectly dependent on the selected node.
Set color to BASE_SELECTED_NODE_COLOR if node equals the selected node with given ID.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of the selected node. |
affected_nodes |
- Source:
setDimensions()
Set dimensions of the graph.
- Source:
setLegendData(legendData)
Set data for the legend.
Parameters:
Name | Type | Description |
---|---|---|
legendData |
Legend data to be set. |
- Source:
setLicensesColors()
Set colors to nodes based on 10 most used licenses.
- Source:
setSelectedColors(id)
Set colors of all nodes.
If the node is requested by the node with a given ID set the color to BASE_REQUESTED_NODE_COLOR.
If the node is depends on the node with a given ID set the color to BASE_USED_BY_COLOR.
If the node equals the node with a given ID set color to BASE_SELECTED_NODE_COLOR.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of the selected node. |
- Source:
showLegend(legendData)
Loads each legend element and adds it to the "legend" div.
Parameters:
Name | Type | Description |
---|---|---|
legendData |
- Source:
simulationTicked()
Update positions of nodes, node names and links.
- Source: