Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
26a19621
Commit
26a19621
authored
Jan 27, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MCP initial files
parent
9c971dfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
+109
-0
McpDialogField.java
src/main/java/com/elphel/imagej/mcp/McpDialogField.java
+35
-0
McpDialogRegistry.java
src/main/java/com/elphel/imagej/mcp/McpDialogRegistry.java
+26
-0
McpDialogSession.java
src/main/java/com/elphel/imagej/mcp/McpDialogSession.java
+48
-0
No files found.
src/main/java/com/elphel/imagej/mcp/McpDialogField.java
0 → 100644
View file @
26a19621
package
com
.
elphel
.
imagej
.
mcp
;
public
class
McpDialogField
{
public
enum
Type
{
MESSAGE
,
BOOLEAN
,
NUMBER
,
STRING
,
CHOICE
}
public
final
Type
type
;
public
final
String
label
;
public
final
String
tooltip
;
public
final
String
tab
;
public
final
String
units
;
public
final
String
[]
choices
;
public
final
String
defaultValue
;
public
McpDialogField
(
Type
type
,
String
label
,
String
tooltip
,
String
tab
,
String
units
,
String
[]
choices
,
String
defaultValue
)
{
this
.
type
=
type
;
this
.
label
=
label
;
this
.
tooltip
=
tooltip
;
this
.
tab
=
tab
;
this
.
units
=
units
;
this
.
choices
=
choices
;
this
.
defaultValue
=
defaultValue
;
}
}
src/main/java/com/elphel/imagej/mcp/McpDialogRegistry.java
0 → 100644
View file @
26a19621
package
com
.
elphel
.
imagej
.
mcp
;
import
java.util.concurrent.atomic.AtomicReference
;
public
class
McpDialogRegistry
{
private
static
final
AtomicReference
<
McpDialogSession
>
CURRENT
=
new
AtomicReference
<
McpDialogSession
>(
null
);
private
McpDialogRegistry
()
{
}
public
static
void
setCurrent
(
McpDialogSession
session
)
{
CURRENT
.
set
(
session
);
}
public
static
McpDialogSession
getCurrent
()
{
return
CURRENT
.
get
();
}
public
static
void
setValue
(
String
label
,
String
value
)
{
McpDialogSession
session
=
CURRENT
.
get
();
if
(
session
==
null
)
{
return
;
}
session
.
setValue
(
label
,
value
);
}
}
src/main/java/com/elphel/imagej/mcp/McpDialogSession.java
0 → 100644
View file @
26a19621
package
com
.
elphel
.
imagej
.
mcp
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
public
class
McpDialogSession
{
private
final
String
id
;
private
final
String
title
;
private
final
List
<
McpDialogField
>
fields
;
private
final
Map
<
String
,
String
>
valuesByLabel
;
public
McpDialogSession
(
String
title
,
List
<
McpDialogField
>
fields
)
{
this
.
id
=
UUID
.
randomUUID
().
toString
();
this
.
title
=
title
;
this
.
fields
=
new
ArrayList
<
McpDialogField
>(
fields
);
this
.
valuesByLabel
=
new
HashMap
<
String
,
String
>();
}
public
String
getId
()
{
return
id
;
}
public
String
getTitle
()
{
return
title
;
}
public
List
<
McpDialogField
>
getFields
()
{
return
Collections
.
unmodifiableList
(
fields
);
}
public
void
setValue
(
String
label
,
String
value
)
{
if
(
label
==
null
)
{
return
;
}
valuesByLabel
.
put
(
label
,
value
);
}
public
String
getValue
(
String
label
)
{
if
(
label
==
null
)
{
return
null
;
}
return
valuesByLabel
.
get
(
label
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment