Package org.eclipse.mcp.builtins.tools
Class BuiltinAnnotatedToolsFactory
java.lang.Object
org.eclipse.mcp.factory.ToolFactory
org.eclipse.mcp.experimental.annotated.MCPAnnotatedToolFactory
org.eclipse.mcp.builtins.tools.BuiltinAnnotatedToolsFactory
- All Implemented Interfaces:
IFactory
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.mcp.experimental.annotated.MCPAnnotatedToolFactory
MCPAnnotatedToolFactory.Tool, MCPAnnotatedToolFactory.ToolArg
Nested classes/interfaces inherited from class org.eclipse.mcp.factory.ToolFactory
ToolFactory.ToolVisibilityListener
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltinAnnotatedToolsFactory
(Method method, MCPAnnotatedToolFactory.Tool toolAnnotation) -
Method Summary
Modifier and TypeMethodDescriptionboolean
changeEditorText
(String editorURI, TextReplacement[] replacements) void
closeEditor
(String editorUri) listChildResources
(String resourceURI, int depth) listProblems
(String resourceURI, String severity) openEditor
(String fileUri, int selectionOffset, int selectionLength) readResource
(String uri) boolean
saveEditor
(String editorUri) Methods inherited from class org.eclipse.mcp.experimental.annotated.MCPAnnotatedToolFactory
apply, apply, createInputSchema, createOutputSchema, createTool, createToolFactories, createToolFactories, getDescription, getName, isValid
Methods inherited from class org.eclipse.mcp.factory.ToolFactory
addVisibilityListener, createSpec, isVisible, removeVisibilityListener, setVisibility
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.mcp.factory.IFactory
getId, getJsonSchemaJacksonOptions
-
Constructor Details
-
BuiltinAnnotatedToolsFactory
-
-
Method Details
-
currentSelection
@Tool(name="currentSelection", title="Currrent Selection", description="Return the active Eclipse IDE text editor and its selected text") public TextEditorSelection currentSelection() -
listEditors
@Tool(name="listEditors", title="List Editors", description="List open Eclipse IDE text editors") public Editors listEditors() -
listConsoles
@Tool(name="listConsoles", title="List Consoles", description="List open Eclipse IDE consoles") public Consoles listConsoles() -
listProjects
@Tool(name="listProjects", title="List Projects", description="List open Eclipse IDE projects") public Resources listProjects() -
listChildResources
-
readResource
-
openEditor
@Tool(title="openEditor", description="open an Eclipse IDE editor on a file URI and set an initial text selection") public Editor openEditor(String fileUri, int selectionOffset, int selectionLength) - Parameters:
fileUri
-selectionOffset
-selectionLength
-- Returns:
-
closeEditor
@Tool(title="closeEditor", description="close an Eclipse IDE editor") public void closeEditor(String editorUri) -
saveEditor
@Tool(title="saveEditor", description="save the contents of a dirty Eclipse IDE editor to file") public boolean saveEditor(String editorUri) -
changeEditorText
@Tool(title="changeEditorText", description="Make one or more changes to an Eclipse text editor") public boolean changeEditorText(String editorURI, TextReplacement[] replacements) -
listProblems
-
listTasks
@Tool(title="listTasks", description="list codebase locations of tasks including TODO comments") public Tasks listTasks(String resourceURI)
-