Wiki

Changes between Version 1 and Version 2 of AutoCompletion

Show
Ignore:
Timestamp:
09/24/12 04:29:01 (12 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AutoCompletion

    v1 v2  
    11The IDE support for Cobra (whether MonoDevelop, Visual Studio or others) does not yet support autocompletion (aka Intellisense). There are some mitigators to help you out: 
    22 
    3  1. '''Compiler suggestions:''' 
    4  2. '''@help directive:''' 
    5  3. '''Native autocomplete:''' 
     3 1. '''Compiler suggestions:''' The Cobra compiler will make provide suggestions for unknown members. For example, the code `someString.tri` will yield: 
     4{{{ 
     5error: Cannot find a definition for "tri" in "someString" whose type is "String". 
     6There are members with similar names including ".substring", ".toString", 
     7".trim", ".trimEnd" and ".trimStart". 
     8}}} 
    69 
     10 2. '''@help directive:''' Within your Cobra code you can prefix an expression such as a type name, variable or method call with `@help` which will cause the Cobra compiler to generate an .html help file including type information and convenient search links: 
     11{{{ 
     12#!cobra 
     13@help String 
     14t = [1, 2, 3] 
     15@help t  # will create a help file showing the interface to List<of int> 
     16}}} 
     17 
     18 3. '''Native autocomplete:''' Some editors such as UltraEdit on Windows and TextMate on Mac will provide an autocomplete based on words found in the file. While this doesn't help with discovery, it can reduce typing when variables, types and methods are reused. Other editors such as gedit can support this through a plug-in. 
     19 
     20Cobra is a community-driven open source project. If you would like to help with autocomplete support, speak up on the discussion forum. 
    721 
    822See also: [wiki:IDESupport], EditorSupport