• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WorkspaceObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中WorkspaceObject的典型用法代码示例。如果您正苦于以下问题:C# WorkspaceObject类的具体用法?C# WorkspaceObject怎么用?C# WorkspaceObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WorkspaceObject类属于命名空间,在下文中一共展示了WorkspaceObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CustomCommandWidget

		public CustomCommandWidget (WorkspaceObject entry, CustomCommand cmd, ConfigurationSelector configSelector, CustomCommandType[] supportedTypes)
		{
			this.Build();
			this.supportedTypes = supportedTypes;
			this.cmd = cmd;
			
			updating = true;
			
			if (cmd == null)
				comboType.AppendText (GettextCatalog.GetString ("(Select a project operation)"));
			
			foreach (var ct in supportedTypes)
				comboType.AppendText (commandNames [(int)ct]);
			
			updating = false;
			
			this.entry = entry;
			UpdateControls ();
			this.WidgetFlags |= Gtk.WidgetFlags.NoShowAll;
			
			StringTagModelDescription tagModel;
			if (entry is SolutionFolderItem)
				tagModel = ((SolutionFolderItem)entry).GetStringTagModelDescription (configSelector);
			else if (entry is WorkspaceItem)
				tagModel = ((WorkspaceItem)entry).GetStringTagModelDescription ();
			else
				tagModel = new StringTagModelDescription ();

			tagSelectorDirectory.TagModel = tagModel;
			tagSelectorDirectory.TargetEntry = workingdirEntry;
			
			tagSelectorCommand.TagModel = tagModel;
			tagSelectorCommand.TargetEntry = entryCommand;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:34,代码来源:CustomCommandWidget.cs


示例2: SupportsObject

		internal protected override bool SupportsObject (WorkspaceObject item)
		{
			var p = item as SolutionItem;
			if (p == null)
				return false;

			return FlavorGuid == null || p.GetItemTypeGuids ().Any (id => id.Equals (FlavorGuid, StringComparison.OrdinalIgnoreCase));
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:SolutionItemExtension.cs


示例3: VersionControlItem

		public VersionControlItem (Repository repository, WorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
		{
			Path = path;
			Repository = repository;
			WorkspaceObject = workspaceObject;
			IsDirectory = isDirectory;
			this.versionInfo = versionInfo;
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:8,代码来源:VersionControlItem.cs


示例4: UnitTest

		protected UnitTest (string name, WorkspaceObject ownerSolutionItem)
		{
			this.name = name;
			this.ownerSolutionItem = ownerSolutionItem;
			ownerSolutionEntityItem = ownerSolutionItem as SolutionItem;
			if (ownerSolutionEntityItem != null)
				ownerSolutionEntityItem.DefaultConfigurationChanged += OnConfugurationChanged;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:UnitTest.cs


示例5: HandleTreeSelectionChanged

		void HandleTreeSelectionChanged (object sender, EventArgs e)
		{
			TreeIter it;
			if (tree.Selection.GetSelected (out it))
				currentSelection = (WorkspaceObject) store.GetValue (it, 2);
			else
				currentSelection = null;
			
			if (SelectionChanged != null)
				SelectionChanged (this, EventArgs.Empty);
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:11,代码来源:ProjectSelectorWidget.cs


示例6: CreateUnitTest

		public UnitTest CreateUnitTest (WorkspaceObject entry)
		{
			var ext = entry.GetService<MonoMakefileProjectExtension> ();
			if (ext != null) {
				var project = (DotNetProject) entry;
				if (ext.UnitTest != null)
					return (UnitTest) ext.UnitTest;
				string testFileBase = ext.GetTestFileBase ();
				UnitTest testSuite = new MonoTestSuite (project, project.Name, testFileBase);
				ext.UnitTest = testSuite;
				return testSuite;
			}
			return null;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:14,代码来源:MonoTestProvider.cs


示例7: CreateUnitTest

		public UnitTest CreateUnitTest (WorkspaceObject entry)
		{
			UnitTest test = null;
			
			if (entry is DotNetProject)
				test = NUnitProjectTestSuite.CreateTest ((DotNetProject)entry);
			
			UnitTestGroup grp = test as UnitTestGroup;
			if (grp != null && !grp.HasTests) {
				test.Dispose ();
				return null;
			}
			
			return test;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:15,代码来源:SystemTestProvider.cs


示例8: SupportsObject

		internal protected override bool SupportsObject (WorkspaceObject item)
		{
			var s = item as SolutionItem;
			if (s == null)
				return false;

			var res = FlavorGuid == null || s.GetItemTypeGuids ().Any (id => id.Equals (FlavorGuid, StringComparison.OrdinalIgnoreCase));

			if (!res)
				return false;

			var p = item as DotNetProject;
			if (p == null || LanguageName == null)
				return true;

			return LanguageName == p.LanguageName;
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:17,代码来源:SolutionItemExtension.cs


示例9: VersionControlItem

		public VersionControlItem (Repository repository, WorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
		{
			Path = path;
			Repository = repository;
			WorkspaceObject = workspaceObject;
			IsDirectory = isDirectory;
			this.versionInfo = versionInfo;

			var obj = workspaceObject;
			while (obj != null) {
				var p = obj as Project;
				if (p != null)
					ContainerProject = p;

				obj = obj.ParentObject;
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:17,代码来源:VersionControlItem.cs


示例10: AddTask

		public static void AddTask (string fileName, string message, int column, int line, TaskSeverity taskType, WorkspaceObject workspaceObject)
		{
			// HACK: Use a compiler error since we cannot add an error
			// task otherwise (task type property is read-only and
			// no constructors usable).
			BuildError error = new BuildError ();
			error.Column = column;
			error.Line = line;
			error.ErrorText = message;
			error.FileName = fileName;
			error.IsWarning = false;
			
			//Task task = new Task(fileName, message, column, line);
			TaskListEntry task = new TaskListEntry (error);
			task.WorkspaceObject = workspaceObject;
			task.Owner = ActiveEditor;
			TaskService.Errors.Add(task);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:18,代码来源:XmlEditorService.cs


示例11: CreateUnitTest

		public UnitTest CreateUnitTest (WorkspaceObject entry)
		{
			UnitTest test = null;
			
			if (entry is SolutionFolder)
				test = SolutionFolderTestGroup.CreateTest ((SolutionFolder)entry);
			if (entry is Solution)
				test = SolutionFolderTestGroup.CreateTest (((Solution)entry).RootFolder);
			if (entry is Workspace)
				test = WorkspaceTestGroup.CreateTest ((Workspace)entry);
			
			UnitTestGroup grp = test as UnitTestGroup;
			if (grp != null && !grp.HasTests) {
				test.Dispose ();
				return null;
			}
			
			return test;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:19,代码来源:SystemTestProvider.cs


示例12: Publish

		public static bool Publish (WorkspaceObject entry, FilePath localPath, bool test)
		{
			if (test)
				return VersionControlService.CheckVersionControlInstalled () && VersionControlService.GetRepository (entry) == null;

			List<FilePath> files = new List<FilePath> ();

			// Build the list of files to be checked in			
			string moduleName = entry.Name;
			if (localPath == entry.BaseDirectory) {
				GetFiles (files, entry);
			} else if (entry is Project) {
				foreach (ProjectFile file in ((Project)entry).Files.GetFilesInPath (localPath))
					if (file.Subtype != Subtype.Directory)
						files.Add (file.FilePath);
			} else
				return false;

			if (files.Count == 0)
				return false;
	
			SelectRepositoryDialog dlg = new SelectRepositoryDialog (SelectRepositoryMode.Publish);
			try {
				dlg.ModuleName = moduleName;
				dlg.Message = GettextCatalog.GetString ("Initial check-in of module {0}", moduleName);
				do {
					if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok && dlg.Repository != null) {
						AlertButton publishButton = new AlertButton ("_Publish");					
						if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to publish the project?"), GettextCatalog.GetString ("The project will be published to the repository '{0}', module '{1}'.", dlg.Repository.Name, dlg.ModuleName), AlertButton.Cancel, publishButton) == publishButton) {
							PublishWorker w = new PublishWorker (dlg.Repository, dlg.ModuleName, localPath, files.ToArray (), dlg.Message);
							w.Start ();
							break;
						}
					} else
						break;
				} while (true);
			} finally {
				dlg.Destroy ();
				dlg.Dispose ();
			}
			return true;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:42,代码来源:PublishCommand.cs


示例13: CreateUnitTest

		public UnitTest CreateUnitTest (WorkspaceObject entry)
		{
			UnitTest test = null;
			
			if (entry is SolutionFolder)
				test = SolutionFolderTestGroup.CreateTest ((SolutionFolder)entry);
			if (entry is Solution)
				test = SolutionFolderTestGroup.CreateTest (((Solution)entry).RootFolder);
			if (entry is Workspace)
				test = WorkspaceTestGroup.CreateTest ((Workspace)entry);
			if (entry is DotNetProject)
				test = NUnitProjectTestSuite.CreateTest ((DotNetProject)entry);
			if (entry is NUnitAssemblyGroupProject)
				test = ((NUnitAssemblyGroupProject)entry).RootTest;
			
			UnitTestGroup grp = test as UnitTestGroup;
			if (grp != null && !grp.HasTests) {
				test.Dispose ();
				return null;
			}
			
			return test;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:23,代码来源:SystemTestProvider.cs


示例14: BelongsToItem

		public bool BelongsToItem (WorkspaceObject item, bool checkHierarchy)
		{
			if (!checkHierarchy)
				return item == parentObject;
			
			WorkspaceObject cit = parentObject;
			do {
				if (cit == item)
					return true;
				if (cit is SolutionFolderItem) {
					var sfi = (SolutionFolderItem) cit;
					if (sfi.ParentFolder != null)
						cit = sfi.ParentFolder;
					else
						cit = sfi.ParentSolution;
				}
				else if (cit is WorkspaceItem) {
					cit = ((WorkspaceItem)cit).ParentWorkspace;
				}
				else
					cit = null;
			} while (cit != null);
			
			return false;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:25,代码来源:TaskListEntry.cs


示例15: TaskListEntry

		public TaskListEntry (BuildError error, object owner)
		{
			parentObject = error.SourceTarget as WorkspaceObject;
			file = error.FileName;
			this.owner = owner;
			description = error.ErrorText;
			column = error.Column;
			line = error.Line;
			if (!string.IsNullOrEmpty (error.ErrorNumber))
				description += " (" + error.ErrorNumber + ")";
			if (error.IsWarning)
				severity = error.ErrorNumber == "COMMENT" ? TaskSeverity.Information : TaskSeverity.Warning;
			else
				severity = TaskSeverity.Error;
			priority = TaskPriority.Normal;
			code = error.ErrorNumber;
			category = error.Subcategory;
			helpKeyword = error.HelpKeyword;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:19,代码来源:TaskListEntry.cs


示例16: IsSelectable

		bool IsSelectable (WorkspaceObject item)
		{
			if (SelectableFilter != null && !SelectableFilter (item))
				return false;
			if (selectableTypes.Count > 0)
				return selectableTypes.Any (t => t.IsInstanceOfType (item));
			return true;
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:8,代码来源:ProjectSelectorWidget.cs


示例17: ShowOptions

		public void ShowOptions (WorkspaceObject entry)
		{
			ShowOptions (entry, null);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:4,代码来源:ProjectOperations.cs


示例18: ContainsTarget

		internal static bool ContainsTarget (WorkspaceObject owner, WorkspaceObject target)
		{
			if (owner == target)
				return true;
			else if (target is RootWorkspace)
				return ContainsTarget (owner, IdeApp.ProjectOperations.CurrentSelectedSolution);
			else if (owner is WorkspaceItem)
				return ((WorkspaceItem)owner).ContainsItem (target);
			return false;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:10,代码来源:ProjectOperations.cs


示例19: IsBuilding

		public bool IsBuilding (WorkspaceObject ob)
		{
			var owner = currentBuildOperationOwner as WorkspaceObject;
			return owner != null && !currentBuildOperation.IsCompleted && ContainsTarget (ob, owner);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:5,代码来源:ProjectOperations.cs


示例20: SetSelection

		bool SetSelection (TreeIter it, WorkspaceObject selected, HashSet<WorkspaceObject> active)
		{
			do {
				WorkspaceObject item = (WorkspaceObject) store.GetValue (it, 2);
				if (selected != null && item == selected) {
					tree.Selection.SelectIter (it);
					tree.ExpandToPath (store.GetPath (it));
					tree.ScrollToCell (store.GetPath (it), tree.Columns[0], false, 0, 0);
					if (active == null)
						return true;
				}
				bool val = (bool) store.GetValue (it, 3);
				bool newVal = active != null ? active.Contains (item) : val;
				if (val != newVal)
					store.SetValue (it, 3, newVal);
				
				TreeIter ci;
				if (store.IterChildren (out ci, it)) {
					if (SetSelection (ci, selected, active))
						return true;
				}
				
			} while (store.IterNext (ref it));
			
			return false;
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:26,代码来源:ProjectSelectorWidget.cs



注:本文中的WorkspaceObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# World类代码示例发布时间:2022-05-24
下一篇:
C# WorkspaceModel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap