IdeUtils class
Manages IDE detection, extension installation, and integration.
- Inheritance
-
- Object
- Listenable
- ListNotifier
- SintController
- IdeUtils
Constructors
- IdeUtils()
Properties
-
cachedRunningIDEs
→ RxList<
IdeType> -
Cached IDE detection results.
final
- hasCachedResults → RxBool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialized → bool
-
Checks whether the controller has already been initialized.
no setterinherited
- isClosed → bool
-
Checks whether the controller has already been closed.
no setterinherited
- isDisposed → bool
-
no setterinherited
- listenersLength → int
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
SintStateUpdate listener) → Disposer -
Register a closure to be called when the object notifies its listeners.
inherited
-
addListenerId(
Object? key, SintStateUpdate listener) → Disposer -
inherited
-
checkIdeConnection(
String host, int port, {Duration timeout = const Duration(milliseconds: 500)}) → Future< bool> - Check if an IDE connection is responding by testing if the port is open.
-
cleanupStaleIdeLockfiles(
) → Future< void> - Cleans up stale IDE lockfiles.
-
configure(
{String getNeomageConfigHomeDir()?, String getOriginalCwd()?, void logForDebugging(String, {String? level})?, void logEvent(String, Map< String, dynamic> )?, void logError(Object)?}) → void -
containsListener(
SintStateUpdate listener) → bool -
inherited
-
debounce<
T> (RxInterface< T> rx, void callback(T), {Duration duration = const Duration(milliseconds: 400)}) → void -
Calls
callbackafterrxstops changing forduration. Useful for search-as-you-type, form validation, etc.inherited -
detectHostIP(
bool isIdeRunningInWindows, int port) → Future< String> - Detects the host IP to use to connect to the extension.
-
detectIDEs(
{bool includeInvalid = false}) → Future< List< DetectedIDEInfo> > - Detects IDEs that have a running extension/plugin.
-
detectRunningIDEs(
) → Future< List< IdeType> > - Detects running IDEs by process inspection.
-
detectRunningIDEsCached(
) → Future< List< IdeType> > - Returns cached IDE detection results, or performs detection if cache is empty.
-
dispose(
) → void -
inherited
-
ever<
T> (RxInterface< T> rx, void callback(T)) → void -
Calls
callbackevery timerxchanges. Auto-cancels on controller disposal.inherited -
findAvailableIDE(
{Duration timeout = const Duration(seconds: 30), Duration pollInterval = const Duration(seconds: 1)}) → Future< DetectedIDEInfo?> - Finds an available IDE with polling.
-
getConnectedIdeClient(
List< Map< ? mcpClients) → Map<String, dynamic> >String, dynamic> ? - Gets the connected IDE client from a list of MCP clients.
-
getConnectedIdeName(
List< Map< mcpClients) → String?String, dynamic> > - Gets the connected IDE name from MCP clients.
-
getIdeClientName(
Map< String, dynamic> ? ideClient) → String? - Get IDE client name from config.
-
getIdeLockfilesPaths(
) → Future< List< String> > - Gets the potential IDE lockfiles directories path based on platform.
-
getInstalledVSCodeExtensionVersion(
String command) → Future< String?> - Get the installed VSCode extension version.
-
getSortedIdeLockfiles(
) → Future< List< String> > - Gets sorted IDE lockfiles from ~/.neomage/ide directory.
-
getTerminalIdeType(
) → IdeType? - Get the terminal IDE type if available.
-
getVSCodeIDECommand(
IdeType ideType) → String? - Get the VSCode CLI command for a given IDE type.
-
hasAccessToIDEExtensionDiffFeature(
List< Map< mcpClients) → boolString, dynamic> > - Check if there is an IDE extension connected with diff support.
-
initializeIdeIntegration(
{required void onIdeDetected(DetectedIDEInfo?), IdeType? ideToInstallExtension, required void onShowIdeOnboarding(), required void onInstallationComplete(IDEExtensionInstallationStatus?)}) → Future< void> - Initializes IDE detection and extension installation.
-
interval<
T> (RxInterface< T> rx, void callback(T), {Duration duration = const Duration(seconds: 1)}) → void -
Calls
callbackat most once perduration, ignoring intermediate changes. Useful for rate-limiting UI updates.inherited -
isCursorInstalled(
) → Future< bool> - Check if cursor IDE is installed.
-
isIDEExtensionInstalled(
IdeType ideType, {String extensionId = 'neom.neomage'}) → Future< bool> - Check if the IDE extension is installed for a given IDE type.
-
isProcessRunning(
int pid) → bool - Check if a process is running by PID.
-
isSupportedJetBrainsTerminal(
) → bool - Check if running in a supported JetBrains terminal.
-
isSupportedTerminal(
) → bool - Check if running in any supported IDE terminal.
-
isSupportedVSCodeTerminal(
) → bool - Check if running in a supported VSCode terminal.
-
isVSCodeInstalled(
) → Future< bool> - Check if VS Code is installed.
-
isWindsurfInstalled(
) → Future< bool> - Check if Windsurf IDE is installed.
-
maybeInstallIDEExtension(
IdeType ideType) → Future< IDEExtensionInstallationStatus?> - Attempt to install the IDE extension.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
once<
T> (RxInterface< T> rx, void callback(T)) → void -
Calls
callbackonly the first timerxchanges, then cancels.inherited -
onClose(
) → void -
Called before onDelete method. onClose might be used to
dispose resources used by the controller. Like closing events,
or streams before the controller is destroyed.
Or dispose objects that can potentially create some memory leaks,
like TextEditingControllers, AnimationControllers.
Might be useful as well to persist some data on disk.
override
-
onDelete(
) → void -
inherited
-
onInit(
) → void -
Called immediately after the widget is allocated in memory.
You might use this to initialize something for the controller.
override
-
onReady(
) → void -
Called 1 frame after onInit(). It is the perfect place to enter
navigation events, like snackbar, dialogs, or a new route, or
async request.
inherited
-
onStart(
) → void -
Called at the exact moment the widget is allocated in memory.
It uses an internal "callable" type, to avoid any @overrides in subclasses.
This method should be internal and is required to define the
lifetime cycle of the subclass.
inherited
-
readIdeLockfile(
String path) → Future< IdeLockfileInfo?> - Read and parse an IDE lockfile.
-
refresh(
) → void -
inherited
-
refreshGroup(
Object id) → void -
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
removeListenerId(
Object id, VoidCallback listener) → void -
inherited
-
reportAdd(
VoidCallback disposer) → void -
inherited
-
reportRead(
) → void -
inherited
-
resetDetectRunningIDEs(
) → void - Resets the cache for detectRunningIDEsCached.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
[List< Object> ? ids, bool condition = true]) → void -
Notifies listeners to update the UI.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited