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
c66e1dff
Commit
c66e1dff
authored
3 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[server] New kernel request to save the current session.
parent
7736d378
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/frama-c/api/generated/kernel/services/index.ts
+9
-0
9 additions, 0 deletions
ivette/src/frama-c/api/generated/kernel/services/index.ts
src/plugins/server/kernel_main.ml
+10
-0
10 additions, 0 deletions
src/plugins/server/kernel_main.ml
with
19 additions
and
0 deletions
ivette/src/frama-c/api/generated/kernel/services/index.ts
+
9
−
0
View file @
c66e1dff
...
@@ -75,6 +75,15 @@ const load_internal: Server.SetRequest<string,string | undefined> = {
...
@@ -75,6 +75,15 @@ const load_internal: Server.SetRequest<string,string | undefined> = {
/** Load a save file. Returns an error, if not successfull. */
/** Load a save file. Returns an error, if not successfull. */
export
const
load
:
Server
.
SetRequest
<
string
,
string
|
undefined
>=
load_internal
;
export
const
load
:
Server
.
SetRequest
<
string
,
string
|
undefined
>=
load_internal
;
const
save_internal
:
Server
.
SetRequest
<
string
,
string
|
undefined
>
=
{
kind
:
Server
.
RqKind
.
SET
,
name
:
'
kernel.services.save
'
,
input
:
Json
.
jString
,
output
:
Json
.
jString
,
};
/** Save the current session. Returns an error, if not successfull. */
export
const
save
:
Server
.
SetRequest
<
string
,
string
|
undefined
>=
save_internal
;
/** Source file positions. */
/** Source file positions. */
export
type
source
=
export
type
source
=
{
dir
:
string
,
base
:
string
,
file
:
string
,
line
:
number
};
{
dir
:
string
,
base
:
string
,
file
:
string
,
line
:
number
};
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/kernel_main.ml
+
10
−
0
View file @
c66e1dff
...
@@ -74,6 +74,16 @@ let () =
...
@@ -74,6 +74,16 @@ let () =
try
Project
.
load_all
(
Filepath
.
Normalized
.
of_string
file
);
None
try
Project
.
load_all
(
Filepath
.
Normalized
.
of_string
file
);
None
with
Project
.
IOError
err
->
Some
err
)
with
Project
.
IOError
err
->
Some
err
)
let
()
=
Request
.
register
~
package
~
kind
:
`SET
~
name
:
"save"
~
descr
:
(
Md
.
plain
"Save the current session. Returns an error, if not successfull."
)
~
input
:
(
module
Jstring
)
~
output
:
(
module
Joption
(
Jstring
))
(
fun
file
->
try
Project
.
save_all
(
Filepath
.
Normalized
.
of_string
file
);
None
with
Project
.
IOError
err
->
Some
err
)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* --- File Positions --- *)
(* --- File Positions --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
...
...
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