本文整理汇总了C#中MonoDevelop.Projects.SolutionFolderItem类的典型用法代码示例。如果您正苦于以下问题:C# SolutionFolderItem类的具体用法?C# SolutionFolderItem怎么用?C# SolutionFolderItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SolutionFolderItem类属于MonoDevelop.Projects命名空间,在下文中一共展示了SolutionFolderItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Fill
public void Fill (PackageBuilder builder, SolutionFolderItem selection)
{
store.Clear ();
this.builder = builder;
if (selection is SolutionFolder) {
foreach (SolutionFolderItem e in ((SolutionFolder)selection).GetAllItems ()) {
if (builder.CanBuild (e))
selectedEntries [e] = e;
}
}
else if (selection != null) {
selectedEntries [selection] = selection;
}
if (selection != null)
solution = selection.ParentSolution;
else {
solution = IdeApp.ProjectOperations.CurrentSelectedSolution;
if (solution == null) {
solution = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetAllItems<Solution> ().FirstOrDefault();
if (solution == null)
return;
}
}
AddEntry (TreeIter.Zero, solution.RootFolder);
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:27,代码来源:EntrySelectionTree.cs
示例2: GetDeployFiles
public override DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionFolderItem entry, ConfigurationSelector configuration)
{
if (entry is IDeployable)
return new DeployFileCollection (((IDeployable)entry).GetDeployFiles (configuration));
return base.GetDeployFiles (ctx, entry, configuration);
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:DefaultDeployServiceExtension.cs
示例3: CanDeploy
public bool CanDeploy (SolutionFolderItem entry, MakefileType type)
{
Project project = entry as Project;
if ( project == null ) return false;
if ( FindSetupForProject ( project ) == null ) return false;
return true;
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:SimpleProjectMakefileHandler.cs
示例4: DeployDialog
public DeployDialog (SolutionFolderItem defaultEntry, bool createBuilderOnly)
{
this.Build();
notebook.ShowTabs = false;
this.defaultEntry = defaultEntry;
if (createBuilderOnly) {
vboxSaveProject.Hide ();
checkSave.Active = true;
checkSave.Hide ();
saveSeparator.Hide ();
}
else {
pageSave.Hide ();
FillProjectSelectors ();
}
store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object));
targetsTree.Model = store;
targetsTree.HeadersVisible = false;
CellRendererImage cr = new CellRendererImage();
cr.Yalign = 0;
targetsTree.AppendColumn ("", cr, "image", 0);
targetsTree.AppendColumn ("", new Gtk.CellRendererText(), "markup", 1);
targetsTree.Selection.Changed += delegate (object s, EventArgs a) {
UpdateButtons ();
};
FillBuilders ();
UpdateButtons ();
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:34,代码来源:DeployDialog.cs
示例5: AddEntry
void AddEntry (TreeIter iter, SolutionFolderItem entry)
{
string icon;
if (entry.ParentFolder == null)
icon = MonoDevelop.Ide.Gui.Stock.Solution;
else if (entry is SolutionFolder)
icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
else if (entry is Project)
icon = ((Project)entry).StockIcon;
else
icon = MonoDevelop.Ide.Gui.Stock.Project;
bool visible = builder.CanBuild (entry);
bool selected = selectedEntries.ContainsKey (entry);
if (!(entry is SolutionFolder) && !visible)
return;
if (!iter.Equals (TreeIter.Zero))
iter = store.AppendValues (iter, icon, entry.Name, entry, selected && visible, visible);
else
iter = store.AppendValues (icon, entry.Name, entry, selected && visible, visible);
if (selected)
tree.ExpandToPath (store.GetPath (iter));
if (entry is SolutionFolder) {
foreach (SolutionFolderItem ce in ((SolutionFolder)entry).Items) {
AddEntry (iter, ce);
}
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:32,代码来源:EntrySelectionTree.cs
示例6: Install
public void Install (ProgressMonitor monitor, SolutionFolderItem entry, string appName, string prefix, ConfigurationSelector configuration)
{
this.appName = appName;
using (DeployContext ctx = new DeployContext (this, DeployService.CurrentPlatform, prefix)) {
InstallEntry (monitor, ctx, entry, configuration);
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:8,代码来源:InstallResolver.cs
示例7: GetHeader
public static string GetHeader (SolutionFolderItem policyParent, string fileName, bool newFile)
{
StandardHeaderPolicy headerPolicy = policyParent != null ? policyParent.Policies.Get<StandardHeaderPolicy> () : MonoDevelop.Projects.Policies.PolicyService.GetDefaultPolicy<StandardHeaderPolicy> ();
TextStylePolicy textPolicy = policyParent != null ? policyParent.Policies.Get<TextStylePolicy> ("text/plain") : MonoDevelop.Projects.Policies.PolicyService.GetDefaultPolicy<TextStylePolicy> ("text/plain");
AuthorInformation authorInfo = policyParent != null ? policyParent.AuthorInformation : AuthorInformation.Default;
return GetHeader (authorInfo, headerPolicy, textPolicy, fileName, newFile);
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:StandardHeaderService.cs
示例8: GetTagModel
TagModel GetTagModel (SolutionFolderItem policyParent, Project project, string language, string identifier, string fileName)
{
var model = new TagModel();
var projectModel = ProjectTagModel ?? Outer.ProjectTagModel;
if (projectModel != null)
model.InnerModels = new [] { projectModel };
ModifyTags (policyParent, project, language, identifier, fileName, ref model.OverrideTags);
return model;
}
开发者ID:picoe,项目名称:Eto,代码行数:9,代码来源:EnhancedFile.cs
示例9: AddToProject
public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
{
if (!GtkDesignInfo.SupportsDesigner (project)) {
ReferenceManager mgr = new ReferenceManager (project as DotNetProject);
mgr.GtkPackageVersion = mgr.DefaultGtkVersion;
mgr.Dispose ();
}
GtkDesignInfo info = GtkDesignInfo.FromProject ((DotNetProject) project);
GuiBuilderProject gproject = info.GuiBuilderProject;
string fileName = fileTemplate.GetFileName (policyParent, project, language, directory, name);
fileTemplate.AddToProject (policyParent, project, language, directory, name);
FileService.NotifyFileChanged (fileName);
DotNetProject netProject = project as DotNetProject;
string ns = netProject != null ? netProject.GetDefaultNamespace (fileName) : "";
string cname = Path.GetFileNameWithoutExtension (fileName);
string fullName = ns.Length > 0 ? ns + "." + cname : cname;
string[,] tags = {
{"Name", cname},
{"Namespace", ns},
{"FullName", fullName}
};
XmlElement widgetElem = steticTemplate ["widget"];
if (widgetElem != null) {
string content = widgetElem.OuterXml;
content = StringParserService.Parse (content, tags);
XmlDocument doc = new XmlDocument ();
doc.LoadXml (content);
gproject.AddNewComponent (doc.DocumentElement);
gproject.SaveAll (false);
IdeApp.ProjectOperations.SaveAsync (project);
return true;
}
widgetElem = steticTemplate ["action-group"];
if (widgetElem != null) {
string content = widgetElem.OuterXml;
content = StringParserService.Parse (content, tags);
XmlDocument doc = new XmlDocument ();
doc.LoadXml (content);
gproject.SteticProject.AddNewActionGroup (doc.DocumentElement);
gproject.SaveAll (false);
IdeApp.ProjectOperations.SaveAsync (project);
return true;
}
throw new InvalidOperationException ("<widget> or <action-group> element not found in widget template.");
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:57,代码来源:WidgetFileDescriptionTemplate.cs
示例10: AddClasses
void AddClasses (ITreeBuilder builder, SolutionFolderItem entry)
{
if (entry is SolutionFolder) {
foreach (SolutionFolderItem e in ((SolutionFolder)entry).Items)
AddClasses (builder, e);
} else if (entry is Project) {
ProjectNodeBuilder.BuildChildNodes (builder, entry as Project);
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:9,代码来源:CombineNodeBuilder.cs
示例11: AddToProject
public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
{
var model = CombinedTagModel.GetTagModel (ProjectTagModel, policyParent, project, language, name, null);
var fileName = StringParserService.Parse (name, model);
project.ProjectProperties.SetValue (typeAtt.Value, string.IsNullOrEmpty (fileName) ? propertyInnerText : string.Concat (fileName, extension));
return true;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:9,代码来源:PropertyDescriptionTemplate.cs
示例12: AddToProject
public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
{
ProjectFile file = template.AddFileToProject (policyParent, project, language, directory, name);
if (file != null) {
file.BuildAction = BuildAction.EmbeddedResource;
return true;
}
else
return false;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:ResourceFileDescriptionTemplate.cs
示例13: GetDeployFiles
public virtual DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionFolderItem entry, ConfigurationSelector configuration)
{
if (entry is SolutionFolder)
return GetCombineDeployFiles (ctx, (SolutionFolder) entry, configuration);
else if (entry is Project)
return GetProjectDeployFiles (ctx, (Project) entry, configuration);
else if (Next != null)
return Next.GetDeployFiles (ctx, entry, configuration);
else
return new DeployFileCollection ();
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:11,代码来源:DeployServiceExtension.cs
示例14: SolutionItemReference
public SolutionItemReference (SolutionFolderItem item)
{
if (item is SolutionItem) {
path = ((SolutionItem)item).FileName;
} else {
path = item.ParentSolution.FileName;
if ((item is SolutionFolder) && ((SolutionFolder)item).IsRoot)
id = ":root:";
else
id = item.ItemId;
}
}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:12,代码来源:SolutionItemReference.cs
示例15: ModifyTags
public override void ModifyTags (SolutionFolderItem policyParent, Project project, string language, string identifier, string fileName, ref Dictionary<string,string> tags)
{
base.ModifyTags (policyParent, project, language, identifier, fileName, ref tags);
if (fileName == null)
return;
tags ["AspNetMaster"] = "";
tags ["AspNetMasterContent"] = "";
var aspProj = project.GetService<AspNetAppProjectFlavor> ();
if (aspProj == null)
throw new InvalidOperationException ("MasterContentFileDescriptionTemplate is only valid for ASP.NET projects");
ProjectFile masterPage = null;
var dialog = new MonoDevelop.Ide.Projects.ProjectFileSelectorDialog (project, null, "*.master");
try {
dialog.Title = GettextCatalog.GetString ("Select a Master Page...");
int response = MonoDevelop.Ide.MessageService.RunCustomDialog (dialog);
if (response == (int)Gtk.ResponseType.Ok)
masterPage = dialog.SelectedFile;
} finally {
dialog.Destroy ();
dialog.Dispose ();
}
if (masterPage == null)
return;
tags ["AspNetMaster"] = aspProj.LocalToVirtualPath (masterPage);
try {
var pd = TypeSystemService.ParseFile (project, masterPage.FilePath).Result
as WebFormsParsedDocument;
if (pd == null)
return;
var sb = new System.Text.StringBuilder ();
foreach (string id in pd.XDocument.GetAllPlaceholderIds ()) {
sb.Append ("<asp:Content ContentPlaceHolderID=\"");
sb.Append (id);
sb.Append ("\" ID=\"");
sb.Append (id);
sb.Append ("Content\" runat=\"server\">\n</asp:Content>\n");
}
tags["AspNetMasterContent"] = sb.ToString ();
}
catch (Exception ex) {
//no big loss if we just insert blank space
//it's just a template for the user to start editing
LoggingService.LogWarning ("Error generating AspNetMasterContent for template", ex);
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:53,代码来源:MasterContentFileDescriptionTemplate.cs
示例16: Install
public static void Install (SolutionFolderItem entry, ConfigurationSelector configuration)
{
using (ProgressMonitor mon = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor ()) {
InstallDialog dlg = new InstallDialog (entry);
try {
if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok)
DeployService.Install (mon, entry, dlg.Prefix, dlg.AppName, configuration);
} finally {
dlg.Destroy ();
dlg.Dispose ();
}
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:13,代码来源:DeployOperations.cs
示例17: InitializeSettings
public override void InitializeSettings (SolutionFolderItem entry)
{
if (string.IsNullOrEmpty (targetDir))
targetDir = entry.BaseDirectory;
if (string.IsNullOrEmpty (defaultConfig)) {
SolutionItem se = entry as SolutionItem;
defaultConfig = se != null ? se.GetConfigurations () [0] : null;
}
if (File.Exists (Path.Combine (entry.BaseDirectory, "autogen.sh")) ||
File.Exists (Path.Combine (entry.BaseDirectory, "configure"))) {
generateFiles = false;
}
else
generateFiles = true;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:15,代码来源:Handler.cs
示例18: Deploy
public Makefile Deploy (AutotoolsContext ctx, SolutionFolderItem entry, ProgressMonitor monitor)
{
Makefile mkfile = new Makefile ();
TranslationProject project = (TranslationProject) entry;
StringBuilder files = new StringBuilder ();
foreach (Translation t in project.Translations) {
files.Append ("\\\n\t" + t.FileName);
}
string dir;
if (project.OutputType == TranslationOutputType.SystemPath) {
dir = ctx.DeployContext.GetResolvedPath (TargetDirectory.CommonApplicationDataRoot, "locale");
} else {
dir = ctx.DeployContext.GetResolvedPath (TargetDirectory.ProgramFiles, project.RelPath);
}
dir = dir.Replace ("@[email protected]", "$(prefix)");
dir = dir.Replace ("@[email protected]", "$(PACKAGE)");
TemplateEngine templateEngine = new TemplateEngine ();
templateEngine.Variables ["TOP_SRCDIR"] = FileService.AbsoluteToRelativePath (project.BaseDirectory, ctx.TargetSolution.BaseDirectory);
templateEngine.Variables ["FILES"] = files.ToString ();
templateEngine.Variables ["BUILD_DIR"] = ".";
templateEngine.Variables ["INSTALL_DIR"] = "$(DESTDIR)" + dir;
templateEngine.Variables ["ALL_TARGET"] = (ctx.TargetSolution.BaseDirectory == project.BaseDirectory) ? "all-local" : "all";
StringWriter sw = new StringWriter ();
string mt;
if (ctx.MakefileType == MakefileType.AutotoolsMakefile)
mt = "Makefile.am.template";
else
mt = "Makefile.template";
using (Stream stream = GetType().Assembly.GetManifestResourceStream (mt)) {
StreamReader reader = new StreamReader (stream);
templateEngine.Process (reader, sw);
reader.Close ();
}
mkfile.Append (sw.ToString ());
return mkfile;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:45,代码来源:MakefileHandler.cs
示例19: AddToProject
public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string entryName)
{
string[,] customTags = new string[,] {
{"ProjectName", project.Name},
{"EntryName", entryName},
{"EscapedProjectName", GetDotNetIdentifier (project.Name) }
};
string substName = StringParserService.Parse (this.name, customTags);
foreach (FileDescriptionTemplate fdt in innerTemplate.Files) {
if (fdt.EvaluateCreateCondition ()) {
if (!fdt.AddToProject (policyParent, project, language, directory, substName))
return false;
}
}
return true;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:18,代码来源:FileTemplateReference.cs
示例20: GenerateMakefiles
internal static void GenerateMakefiles (SolutionFolderItem entry, Solution solution)
{
if (solution == null) {
AlertButton generateMakefilesButton = new AlertButton (GettextCatalog.GetString ("_Generate Makefiles"));
if (MessageService.AskQuestion (GettextCatalog.GetString ("Generating Makefiles is not supported for single projects. Do you want to generate them for the full solution - '{0}' ?", entry.ParentSolution.Name),
AlertButton.Cancel,
generateMakefilesButton) == generateMakefilesButton)
solution = ((SolutionFolderItem)entry).ParentSolution;
else
return;
}
DeployContext ctx = null;
ProgressMonitor monitor = null;
GenerateMakefilesDialog dialog = new GenerateMakefilesDialog (solution);
try {
if (MessageService.RunCustomDialog (dialog) != (int) Gtk.ResponseType.Ok)
return;
SolutionDeployer deployer = new SolutionDeployer (dialog.GenerateAutotools);
if ( deployer.HasGeneratedFiles ( solution ) )
{
string msg = GettextCatalog.GetString ( "{0} already exist for this solution. Would you like to overwrite them?", dialog.GenerateAutotools ? "Autotools files" : "Makefiles" );
if (MonoDevelop.Ide.MessageService.AskQuestion (msg, AlertButton.Cancel, AlertButton.OverwriteFile) != AlertButton.OverwriteFile)
return;
}
ctx = new DeployContext (new TarballDeployTarget (dialog.GenerateAutotools), "Linux", null);
monitor = IdeApp.Workbench.ProgressMonitors.GetToolOutputProgressMonitor (true);
deployer.GenerateFiles (ctx, solution, dialog.DefaultConfiguration, monitor);
} finally {
dialog.Destroy ();
dialog.Dispose ();
if (ctx != null)
ctx.Dispose ();
if (monitor != null)
monitor.Dispose ();
}
}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:40,代码来源:Commands.cs
注:本文中的MonoDevelop.Projects.SolutionFolderItem类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论