diff --git a/ivette/src/renderer/ASTview.js b/ivette/src/renderer/ASTview.js new file mode 100644 index 0000000000000000000000000000000000000000..ae39f1c8c5a7de8f0776d3070e91bdadcbaf396e --- /dev/null +++ b/ivette/src/renderer/ASTview.js @@ -0,0 +1,41 @@ +// -------------------------------------------------------------------------- +// --- AST Source Code +// -------------------------------------------------------------------------- + +import _ from 'lodash' ; +import React from 'react' ; +import Dome from 'dome' ; +import States from 'frama-c/states' ; +import { Component } from 'frama-c/labviews' ; + +// -------------------------------------------------------------------------- +// --- AST Printer +// -------------------------------------------------------------------------- + +const ASTview = () => { + + // Hooks + const [ select, setSelect ] = States.useSelection(); + + return ( + <div> + <div>Function: {select && select.function}</div> + <div>Marker: {select && select.marker}</div> + </div> + ); +}; + +// -------------------------------------------------------------------------- +// --- Export Component +// -------------------------------------------------------------------------- + +export default () => ( + <Component id='frama-c.astview' + label='AST' + title='Normalized source code representation.' + > + <ASTview/> + </Component> +); + +// -------------------------------------------------------------------------- diff --git a/ivette/src/renderer/Application.js b/ivette/src/renderer/Application.js index dc02e42e700aabeac0a917691473118b7d613a81..684da31a04f7b5f2afef904f438765f5bcceeb8c 100644 --- a/ivette/src/renderer/Application.js +++ b/ivette/src/renderer/Application.js @@ -17,6 +17,7 @@ import { LabView, View, Group, Component } from 'frama-c/labviews' ; import { GridItem, GridHbox, GridVbox } from 'dome/layout/grids'; import Controller from './Controller' ; import Properties from './Properties' ; +import ASTview from './ASTview' ; // -------------------------------------------------------------------------- // --- Main View @@ -56,8 +57,8 @@ export default (function() { </View> <Group id='frama-c' label='Frama-C' title='Frama-C Kernel Components'> <Controller.Console/> - <Properties.PropTable/> <Properties/> + <ASTview/> </Group> </LabView> </Splitter>