Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
6a0995e4
Commit
6a0995e4
authored
5 months ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Ivette] Removes dead code from display.
parent
b7ec471a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivette/src/ivette/display.tsx
+1
-65
1 addition, 65 deletions
ivette/src/ivette/display.tsx
with
1 addition
and
65 deletions
ivette/src/ivette/display.tsx
+
1
−
65
View file @
6a0995e4
...
...
@@ -29,73 +29,9 @@
@module ivette/display
*/
import
React
from
'
react
'
;
import
{
VIEW
,
COMPONENT
,
LayoutPosition
}
from
'
ivette
'
;
import
*
as
State
from
'
./state
'
;
import
{
LayoutPosition
}
from
'
ivette
'
;
import
*
as
Laboratory
from
'
./laboratory
'
;
export
interface
ItemProps
{
id
:
string
;
selected
?:
boolean
;
}
/**
A sidebar item for controlling an Ivette view.
*/
export
function
ViemItem
(
props
:
ItemProps
):
JSX
.
Element
|
null
{
const
{
id
,
selected
=
false
}
=
props
;
const
view
=
State
.
useElement
(
VIEW
,
id
);
const
state
=
Laboratory
.
useState
();
if
(
!
view
)
return
null
;
const
status
=
Laboratory
.
getViewStatus
(
state
,
id
);
return
(
<
Laboratory
.
ViewItem
view
=
{
view
}
selected
=
{
selected
}
{
...
status
}
/>
);
}
/**
A sidebar item for controlling an Ivette component.
*/
export
function
ComponentItem
(
props
:
ItemProps
):
JSX
.
Element
|
null
{
const
{
id
,
selected
=
false
}
=
props
;
const
comp
=
State
.
useElement
(
COMPONENT
,
id
);
const
state
=
Laboratory
.
useState
();
if
(
!
comp
)
return
null
;
const
status
=
Laboratory
.
getComponentStatus
(
state
,
id
);
return
(
<
Laboratory
.
ComponentItem
comp
=
{
comp
}
selected
=
{
selected
}
{
...
status
}
/>
);
}
export
interface
GroupItemsProps
{
id
:
string
;
selected
?:
string
;
}
/**
A bundle of sidebar items for controlling an Ivette group of components.
*/
export
function
GroupItems
(
props
:
GroupItemsProps
):
JSX
.
Element
|
null
{
const
items
=
State
.
useElements
(
COMPONENT
)
.
filter
(
Laboratory
.
inGroup
(
props
))
.
map
(({
id
})
=>
(
<
ComponentItem
key
=
{
id
}
id
=
{
id
}
selected
=
{
id
===
props
.
selected
}
/>
));
return
<>
{
items
}
</>;
}
/** Switch display to specified view. */
export
function
switchToView
(
id
:
string
):
void
{
Laboratory
.
switchToView
(
id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment