Is there any way to hook into the Complete Statement action?
You can override any action by creating your own IActionHandler and attaching it to the action as follows:
var actionId = "CompleteStatement"; var action = ActionManager.Instance.GetAction(actionId); action.AddHandler( actionHandler);
If You want to implement statement completion for any language other than C#, you may create a ICompleteStatementActionProvider and mark your class with LanguageSpecificImplementation attribute like the following. But this will not allow You override C# behaviour and will work if and only if there is no other provider for the same language. [LanguageSpecificImplementation(CSharpLanguageService.CSHARP_LANGUAGEID, typeof(ICompleteStatementActionProvider))]
public class CSharpCompleteStatementActionProvider : ElementBasedCompleteStatementActionProvider {}
>> Is there any way to hook into the Complete Statement action? >>
You can override any action by creating your own IActionHandler and attaching it to the action as follows:
var actionId = "CompleteStatement"; var action = ActionManager.Instance.GetAction(actionId); action.AddHandler( actionHandler); If You want to implement statement completion for any language other than C#, you may create a ICompleteStatementActionProvider and mark your class with LanguageSpecificImplementation attribute like the following. But this will not allow You override C# behaviour and will work if and only if there is no other provider for the same language. [LanguageSpecificImplementation(CSharpLanguageService.CSHARP_LANGUAGEI D, typeof(ICompleteStatementActionProvider))]
public class CSharpCompleteStatementActionProvider : ElementBasedCompleteStatementActionProvider {}
Jakob,
You can override any action by creating your own IActionHandler and
attaching it to the action as follows:
var actionId = "CompleteStatement";
var action = ActionManager.Instance.GetAction(actionId);
action.AddHandler( actionHandler);
If You want to implement statement completion for any language other than
C#, you may create a ICompleteStatementActionProvider and mark your class
with LanguageSpecificImplementation attribute like the following. But this
will not allow You override C# behaviour and will work if and only if there
is no other provider for the same language.
[LanguageSpecificImplementation(CSharpLanguageService.CSHARP_LANGUAGEID,
typeof(ICompleteStatementActionProvider))]
public class CSharpCompleteStatementActionProvider :
ElementBasedCompleteStatementActionProvider {}
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Sergey,
Thanks a lot!
--Jakob
>> Is there any way to hook into the Complete Statement action?
>>