本文整理汇总了C#中MonoDevelop.CodeGeneration.CodeGenerationOptions类的典型用法代码示例。如果您正苦于以下问题:C# CodeGenerationOptions类的具体用法?C# CodeGenerationOptions怎么用?C# CodeGenerationOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodeGenerationOptions类属于MonoDevelop.CodeGeneration命名空间,在下文中一共展示了CodeGenerationOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitalizeSelection
public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
{
PropertyGenerator.CreateProperty createProperty = new PropertyGenerator.CreateProperty (options);
createProperty.ReadOnly = true;
createProperty.Initialize (treeView);
return createProperty;
}
示例2: PartialMethods
public PartialMethods (CodeGenerationOptions options) : base (options)
{
}
示例3: InitalizeSelection
public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
{
OverrideMethods overrideMethods = new OverrideMethods (options);
overrideMethods.Initialize (treeView);
return overrideMethods;
}
示例4: CreateToString
public CreateToString (CodeGenerationOptions options) : base (options)
{
}
示例5: IsValid
public bool IsValid (CodeGenerationOptions options)
{
return new CreateToString (options).IsValid ();
}
示例6: InitalizeSelection
public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
{
var createEventMethod = new CreateEventMethod (options);
createEventMethod.Initialize (treeView);
return createEventMethod;
}
示例7: CreateCodeGenerationOptions
public static CodeGenerationOptions CreateCodeGenerationOptions (Document document)
{
document.UpdateParseDocument ();
var options = new CodeGenerationOptions {
Document = document
};
if (document.ParsedDocument != null && document.ParsedDocument.ParsedFile != null) {
options.EnclosingPart = document.ParsedDocument.ParsedFile.GetInnermostTypeDefinition (document.Editor.Caret.Location);
if (options.EnclosingPart != null)
options.EnclosingType = options.EnclosingPart.Resolve (document.Project).GetDefinition ();
if (options.EnclosingType != null) {
options.EnclosingMember = options.EnclosingType.Members.FirstOrDefault (m => !m.IsSynthetic && m.Region.FileName == document.FileName && m.Region.IsInside (document.Editor.Caret.Location));
}
}
return options;
}
示例8: IsValid
public bool IsValid (CodeGenerationOptions options)
{
return new CreateEquality (options).IsValid ();
}
示例9: InitalizeSelection
public IGenerateAction InitalizeSelection (CodeGenerationOptions options, Gtk.TreeView treeView)
{
CreateConstructor createConstructor = new CreateConstructor (options);
createConstructor.Initialize (treeView);
return createConstructor;
}
示例10: IsValid
public bool IsValid (CodeGenerationOptions options)
{
CreateConstructor createConstructor = new CreateConstructor (options);
return createConstructor.IsValid ();
}
示例11: ExportMethods
IGenerateAction ICodeGenerator.InitalizeSelection (CodeGenerationOptions options, TreeView treeView)
{
var exportMethods = new ExportMethods (this, options);
exportMethods.Initialize (treeView);
return exportMethods;
}
示例12: AbstractGenerateAction
public AbstractGenerateAction (CodeGenerationOptions options)
{
this.options = options;
}
示例13: GenerateCodeWindow
GenerateCodeWindow (CodeGenerationOptions options, MonoDevelop.Ide.CodeCompletion.CodeCompletionContext completionContext) : base(Gtk.WindowType.Toplevel)
{
this.options = options;
this.Build ();
scrolledwindow1.Child = treeviewGenerateActions;
scrolledwindow1.ShowAll ();
scrolledwindow2.Child = treeviewSelection;
scrolledwindow2.ShowAll ();
treeviewGenerateActions.Cancel += delegate {
Destroy ();
};
treeviewGenerateActions.Submit += delegate {
treeviewSelection.GrabFocus ();
};
treeviewSelection.Cancel += delegate {
treeviewGenerateActions.GrabFocus ();
};
treeviewSelection.Submit += delegate {
if (curInitializeObject != null) {
curInitializeObject.GenerateCode ();
curInitializeObject = null;
}
Destroy ();
};
WindowTransparencyDecorator.Attach (this);
treeviewSelection.HeadersVisible = false;
treeviewGenerateActions.HeadersVisible = false;
treeviewGenerateActions.Model = generateActionsStore;
TreeViewColumn column = new TreeViewColumn ();
var pixbufRenderer = new CellRendererImage ();
column.PackStart (pixbufRenderer, false);
column.AddAttribute (pixbufRenderer, "image", 0);
CellRendererText textRenderer = new CellRendererText ();
column.PackStart (textRenderer, true);
column.AddAttribute (textRenderer, "text", 1);
column.Expand = true;
treeviewGenerateActions.AppendColumn (column);
treeviewGenerateActions.Selection.Changed += TreeviewGenerateActionsSelectionChanged;
this.Remove (this.vbox1);
BorderBox messageArea = new BorderBox ();
messageArea.Add (vbox1);
this.Add (messageArea);
this.ShowAll ();
int x = completionContext.TriggerXCoord;
int y = completionContext.TriggerYCoord;
int w, h;
GetSize (out w, out h);
int myMonitor = Screen.GetMonitorAtPoint (x, y);
Gdk.Rectangle geometry = DesktopService.GetUsableMonitorGeometry (Screen, myMonitor);
if (x + w > geometry.Right)
x = geometry.Right - w;
if (y + h > geometry.Bottom)
y = y - completionContext.TriggerTextHeight - h;
Move (x, y);
}
示例14: IsValid
public bool IsValid (CodeGenerationOptions options)
{
return new CreateWriteLine (options).IsValid ();
}
示例15: CreateWriteLine
public CreateWriteLine (CodeGenerationOptions options) : base (options)
{
}