One of the main advantages of IDEs and smart code editors is that they constantly maintain the structural model of the source code (syntax model, semantics model, etc.). This structural model allows IDEs to offer various structural exploration tools and enable structural transformations of the program while still providing textual editing of the source code.
In this internship project, we want to explore the theme of syntax-based structural IDE features. Currently, most JetBrains IDEs offer features like Extend Selection and Rearrange Code, while some IDEs (Rider/ReSharper) also provide Structural Remove and Structural Navigation features. With those features, you can quickly set editor selection structurally (selecting whole language constructs instead of ranges of text), move language constructs around, and remove constructs structurally (leaving the remaining code syntactically correct).
What we currently lack is the Structural Duplicate feature — the ability to duplicate a language construct while maintaining syntactic correctness and providing some form of intelligent parameterization for the duplicated piece of code, for further editing. For example, if the currently selected method is void Test() { }
:
class C {
void Test() { } // <------------ press Ctrl+D
}
We can produce a method copy below and ask the user to name this method appropriately:
class C {
bool Test() { return true; }
bool EnterNewName() { return true; }
}
Or if the user needs to pass another parameter to some method, instead of typing the parameter and dealing with commas:
public static Result DoSomeJob(
IServiceLocator serviceLocator,
string endpointId, // <------------ Ctrl + D
bool executeFast = true)
{
The user can just hit the hotkey and get the new parameter in place, formatted well, while it will be offered to change its type and name it properly:
public static Result DoSomeJob(
IServiceLocator serviceLocator,
string endpointId,
string enterNewName,
bool executeFast = true)
{
During this internship, we will design and implement this IDE feature for the C# programming language. We will reach the production-level quality and eventually your feature will be included in our .NET IDEs — Rider and ReSharper.
Programming skills in C#, Java, or Kotlin: readable code, some frameworks.
Basic knowledge of data structures and common algorithms.
Problem-solving skills: ability to turn a rough spec into a prototype.
Nice to have:
Good knowledge of the .NET development.
Knowledge in programming languages & compilers.