Class Coding
java.lang.Object
uno.anahata.ai.nb.tools.Coding
Tools related to coding tasks and modifying source files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SuggestChangeResultsuggestChange(String filePath, String proposedContent, String explanation, long lastModified) Proposes a change to an existing file by showing the NetBeans modal diff dialog to the user.
-
Constructor Details
-
Coding
public Coding()
-
-
Method Details
-
suggestChange
public static SuggestChangeResult suggestChange(String filePath, String proposedContent, String explanation, long lastModified) throws Exception Proposes a change to an existing file by showing the NetBeans modal diff dialog to the user. If the proposed content is identical to the current content on disk, the dialog is skipped and the change is automatically marked as ACCEPTED without writing to disk.- Parameters:
filePath- The absolute path of the existing file to modify.proposedContent- The full, new proposed content for the file.explanation- A clear and concise explanation of the proposed change.lastModified- Optimistic locking parameter. Must match the current 'lastModified' timestamp of the resource on disk.- Returns:
- A SuggestChangeResult indicating whether the user accepted or cancelled the change.
- Throws:
Exception- if an error occurs during the process.
-
