惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 般若菩提

GEF源码分析(六) GEF 的EditPart的职能分离 __ 跨国时尚媒体集团广告部门 的故事 二 GEF源码分析(五) GEF 的EditPart的职能分离 __ 跨国时尚媒体集团广告部门 的故事 GEF源码分析(四) GEF 消息转义 ___ Tool的作用 GEF源码分析(三) GEF 的树状构架 ___ Model/EditPart/Figure GEF源码分析(三) 模拟GEF设计思路,解剖GEF2 附图:包含GEF的Editor创建时序图 GEF源码分析(二) 模拟GEF设计思路,解剖GEF 1 GEF源码分析(一) eclipse的GEF相关项目说明 项目管理杂谈之打造软件团队 兄弟姐妹们测试一下你的职业倾向:〉 CodeReview的思索 eclipse内部类部分框架 eclipse工作台概念图 转载自CSDN:Martin Fowler:设计已死? 诸子百家与项目管理 之 孙子兵法篇(项目管理的整体思维) 世界可用性日你听说了嘛? 经典搞笑故事,结婚的男同胞注意哦;) 少时好坏,中时对错,老时因果 强烈推荐两本经典OO书籍以及对用例编写的启发 - 般若菩提 - 博客园 哲学离我们有多远?
SharpDevelop自动命令启动UI部分(看SharpDevelop源码分析笔记随想)
般若菩提 · 2005-08-03 · via 博客园 - 般若菩提
 

参见:Fbt2008的大作  SharpDevelop源码分析笔记(一)   

源文档 <http://www.cnblogs.com/fbt2008/archive/2005/08/02/205785.aspx?Pending=true>

Fbt2008的大作中描述了SharpDevelopRuntime的启动过程,我把其中GUI启动补充一下。

其中写到如下系统代码启动片断

系统代码:

//这段代码就是程序启动时加载前台插件了,/Workspace/Autostart是系统自动运行命令的扩展点路径,定义在这个路径下的插件会在系统启动的时候自动运行。在这里,通过插件树初始化建立处于这个路径下的Command(命令),并逐一执行。BuildChildItems方法的功能是建立这个扩展点下的Command列表
commands = AddInTreeSingleton.AddInTree.GetTreeNode("/Workspace/Autostart").BuildChildItems(null);
for (int i = 0; i < commands.Count - 1++i) 
{
    ((ICommand)commands[i]).Run();
    }

这段代码会载入如下清单文件,并根据此清单文件中的ClassId载入运行

插件清单之一(SharpDevelopCore.addin文件)

片断

<Extension path = "/Workspace/Autostart">

<Class id = "InitializeWorkbenchCommand"

class = "ICSharpCode.SharpDevelop.Commands.InitializeWorkbenchCommand"/>

<Class id = "StartCodeCompletionWizard"

class = "ICSharpCode.SharpDevelop.Commands.StartCodeCompletionWizard"/>

<Class id = "StartParserServiceThread"

class = "ICSharpCode.SharpDevelop.Commands.StartParserServiceThread"/>

<!-- #assembly preload -->

<Class id = "StartSharpAssemblyPreloadThread"

class = "ICSharpCode.SharpDevelop.Commands.StartSharpAssemblyPreloadThread"/>

<Class id = "StartWorkbenchCommand"

class = "ICSharpCode.SharpDevelop.Commands.StartWorkbenchCommand"/>

</Extension>

大家注意了:"/Workspace/Autostart" 就是上面代码根据此描述将这一段的描述中的Class的实例载入,然后执行他们的方法(这些Class都继承了Icommand

这些类都在文件AutostartCommands.cs中

GUI的主要启动过程就在InitializeWorkbenchCommand类上,如下:

DefaultWorkbench 的 InitializeWorkspace代码如下

   w.SetMemento(...);
    w.UpdatePadContents(null, null);
    这两句稍稍复杂些,在这里就不分析了。

注意:有关WorkbenchpadEditor等概念基本可以参照Eclipse文档。有一些细小差别,例如PadEclipse中叫View,WorkenchSharpDevelop仅存在一个WorkbenchWindow.而在SharpDevelop有多个等等。