Difference between revisions of "Code::Completion Rewrite"

From Code::Blocks
Line 7: Line 7:
  
 
== Current Effort ==
 
== Current Effort ==
=== Current Specification ===
+
=== Structure ===
To appear at some near date.
+
The current C::C is a monolithic library of features, which could be de-coupled and split up for use in multiple plugins, providing extra functionality and flexibility in the future.
=== Current Data Model ===
+
Therefore, I propose the C::C be broken up into the following components:
Also to appear at some near date.
+
 
 +
* Code::SymbolTable
 +
** Provide a list of valid symbols in the workspace, along with relevant scope information
 +
* Code::Completion
 +
** Provide Auto-complete features
 +
* Code::SymbolOutline
 +
** Provide Symbol browser, find symbol, function jump features
 +
* Code::Refactoring
 +
** Provide code refactoring features
 +
* Code::Documentation
 +
** Provide automatic code generation features
 +
 
 +
=== Purpose Statement ===
 +
==== Code::SymbolTable ====
 +
==== Code::Completion ====
 +
The current Code::Completion plugin is outdated, and needs a complete rewrite.
 +
The purpose of the Code::Completion plugin is thus:
 +
 
 +
* Provide a list of likely symbols in the current scope as possible solutions to the current symbol.
 +
* Provide function tooltips
 +
** Parameter list
 +
** Relevant documentation
 +
* Provide completion features for class constructors
 +
* Provide completion features for initializer lists
 +
 
 +
==== Code::SymbolOutline ====
 +
==== Code::Refactoring ====
 +
==== Code::Documentation ====
 +
=== Process ===
 +
==== Code::SymbolTable ====
 +
==== Code::Completion ====
 +
 
 +
# Generate a list of all valid symbols in the current scope
 +
## Take global list from C::SymbolTable
 +
## Add in local scope parsed on the fly
 +
# Reduce that list to what is likely
 +
# Show that list to the user in some fashion
 +
# Insert the proper solution on user request
 +
 
 +
==== Code::SymbolOutline ====
 +
==== Code::Refactoring ====
 +
==== Code::Documentation ====
  
 
== More complex cases of C::C usage ==
 
== More complex cases of C::C usage ==

Revision as of 15:02, 11 March 2008

Background

The current Code::Completion plug-in has some flaws, and is currently development frozen. The current plug-in lacks full support for:

  1. function and class templates
  2. default arguments in some cases
  3. some of the more complicated c++ mucky business

Current Effort

Structure

The current C::C is a monolithic library of features, which could be de-coupled and split up for use in multiple plugins, providing extra functionality and flexibility in the future. Therefore, I propose the C::C be broken up into the following components:

  • Code::SymbolTable
    • Provide a list of valid symbols in the workspace, along with relevant scope information
  • Code::Completion
    • Provide Auto-complete features
  • Code::SymbolOutline
    • Provide Symbol browser, find symbol, function jump features
  • Code::Refactoring
    • Provide code refactoring features
  • Code::Documentation
    • Provide automatic code generation features

Purpose Statement

Code::SymbolTable

Code::Completion

The current Code::Completion plugin is outdated, and needs a complete rewrite. The purpose of the Code::Completion plugin is thus:

  • Provide a list of likely symbols in the current scope as possible solutions to the current symbol.
  • Provide function tooltips
    • Parameter list
    • Relevant documentation
  • Provide completion features for class constructors
  • Provide completion features for initializer lists

Code::SymbolOutline

Code::Refactoring

Code::Documentation

Process

Code::SymbolTable

Code::Completion

  1. Generate a list of all valid symbols in the current scope
    1. Take global list from C::SymbolTable
    2. Add in local scope parsed on the fly
  2. Reduce that list to what is likely
  3. Show that list to the user in some fashion
  4. Insert the proper solution on user request

Code::SymbolOutline

Code::Refactoring

Code::Documentation

More complex cases of C::C usage

Here we can put some more comples examples of c++ code where C::C may fail. Symbols that may be hard to find should be marked in bold

1: Fetching type of operator call

#include <string>
using namespace std;

int main(int,char**)
{
    ( string("first") + "second" + "third" ) . c_str();
    return 0;
}