Skip to content

Instantly share code, notes, and snippets.

Avatar
🍸
retired

Dmitri Nesteruk nesteruk

🍸
retired
  • Mesa Funds
View GitHub Profile
@nesteruk
nesteruk / gist:1474476
Created Dec 13, 2011
Highlighting on 2nd line in every document
View gist:1474476
using System;
using System.Collections.Generic;
using System.Diagnostics;
using JetBrains.Annotations;
using JetBrains.Application.Progress;
using JetBrains.Application.Settings;
using JetBrains.DocumentModel;
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;
@nesteruk
nesteruk / gist:1632784
Created Jan 18, 2012
Random list generation program (with comments :)
View gist:1632784
#include <iostream>
using namespace std;
struct list_item
{
list_item *next;
list_item *rand;
};
void deep_copy(list_item* src, list_item* &dst)
@nesteruk
nesteruk / gist:1632782
Created Jan 18, 2012
Random list duplication
View gist:1632782
#include <iostream>
using namespace std;
struct list_item
{
list_item *next;
list_item *rand;
};
void deep_copy(list_item* src, list_item* &dst)
@nesteruk
nesteruk / MixinContextAction
Created Aug 23, 2012
Mixin context action
View MixinContextAction
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using ActiveMesa.R2P.ContextActions;
using ActiveMesa.R2P.Infrastructure;
using JetBrains.Application;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
@nesteruk
nesteruk / ReadOnlyInterfaceGen.cs
Created Nov 6, 2012
Readonly interface generator
View ReadOnlyInterfaceGen.cs
using System.Collections.Generic;
using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.CSharp.Generate;
using JetBrains.ReSharper.Feature.Services.Generate;
using JetBrains.ReSharper.Feature.Services.Generate.Actions;
using JetBrains.ReSharper.Psi;
@nesteruk
nesteruk / gist:4152824
Created Nov 27, 2012
Factoring context action
View gist:4152824
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JetBrains.ReSharper.Psi.CSharp.Tree;
namespace ActiveMesa.R2P.Maths.Factor
{
using System;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
@nesteruk
nesteruk / gist:4970909
Last active Dec 13, 2015
Bindable CheckBoxElement
View gist:4970909
using System;
namespace ConsoleApplication1
{
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Annotations;
public class CheckBoxElement : INotifyPropertyChanged, IEquatable<CheckBoxElement>
@nesteruk
nesteruk / gist:4987154
Last active Dec 13, 2015
R# plugin class creation sample
View gist:4987154
private static class ReadOnlyIntefaceBuilderWorkflow
{
public static WorkflowResult Start([CanBeNull] CSharpGeneratorContext context, CSharpElementFactory factory)
{
if (context.ClassDeclaration == null) return WorkflowResult.Inapplicable;
return CreateNewInterfaceDeclaration(context, factory);
}
private static WorkflowResult CreateNewInterfaceDeclaration(CSharpGeneratorContext context, CSharpElementFactory factory)
{
You can’t perform that action at this time.