IWorkspaceRunnable is a mechanism for batching a set of changes to the workspace so that change notification and autobuild are deferred until the entire batch completes. IRunnableWithProgress is a mechanism for batching a set of changes to be run outside the UI thread. You often need to do both of these at once: Make multiple changes to the workspace outside the UI thread. Wrapping one of these mechanisms inside the other would do the trick, but the resulting code is cumbersome, and it is awkward to communicate arguments, results, and exceptions between the caller and the operation to be run.
The solution is to use WorkspaceModifyOperation. This class rolls the two mechanisms together by implementing IRunnableWithProgress and performing the work within a nested IWorkspaceRunnable. To use it, simply create a subclass that implements the abstract method execute, and pass an instance of this subclass to IRunnableContext.run to perform the work. If you already have an instance of IRunnableWithProgress on hand, it can be passed to the constructor of the special subclass WorkspaceModifyDelegatingOperation to create a new IRunnableWithProgress that performs workspace batching for you.
原文:http://wiki.eclipse.org/FAQ_What_are_IWorkspaceRunnable,_IRunnableWithProgress,_and_WorkspaceModifyOperation%3F
分享到:
相关推荐
"英语教学设计:Lesson 5 What are you doing?" 本节课教学设计的主要目的是让学生学会使用现在进行时态来描述自己的活动,掌握相关的英语句式和词汇,以便在不同情况下使用。以下是相关知识点的详细解释: 一、...
What we are now and what we will be
What are Extreme Learning Machines Filling the Gap Between Frank Rosenblatts Dream and John von Neumanns Puzzle
电力电网工作汇报Never forget what you are 电力电网工作汇报Never forget what you are 电力电网工作汇报Never forget what you are 电力电网工作汇报Never forget what you are 电力电网工作汇报Never forget ...
这篇文档是关于二年级英语下学期Module 5 Unit 2 "What are the kids playing"的教案,使用的是外研社的教材。教案的核心是教授孩子们如何使用现在进行时来描述正在进行的动作,特别是针对动词后加-ing的形式。下面...
Lesson 5 What Are They Doing练习题及答案.doc
Lesson 2 What Are You Doing练习题及答案.doc
本课的教学主题是Look,listen and say,通过三组情境对话,呈现现在进行时的问句“What are you doing?”以及答语“I’m…We are…”本课的知识目标是让学生能听懂、会说、认读单词:we,read,eat,draw,和句型...
article from IEEE; What are ontologies and why we need hem
What are pseudo classes and pseudo elements? How to apply CSS rules to your website and what is the order of precedence? What is the CSS box model? How to position and float your CSS boxes How to hide...
本练习题的主题围绕“将要做什么”(What are you going to do),主要考察学生对于将来时态的运用以及询问他人计划的能力。在英语中,将来时态通常用"be going to"结构表示即将发生的动作或计划。下面我们将详细...
【五年级英语下册 Unit 4 What Are You Doing同步测试解析】 Unit 4的主题是"What Are You Doing",这是小学英语教学中一个重要的时态——现在进行时的学习。现在进行时用于描述正在进行的动作,通常由"be动词(am, ...
Darla Deardorff What are intercultural competencies.docx
eBPF and IO Visor -The what, how, and what next!
【五年级英语下册 Unit 4 What Are You Doing 同步测试(2) 人教PEP】测试主要考察学生对现在进行时态的理解和应用,以及与日常生活相关的词汇和短语。现在进行时态是表示当前正在进行的动作,通常由"be + 动词ing...
what are components of order c.emmx
这篇教学案例是关于五年级英语下册Unit 4 "What are you doing"的教学设计,适用于人教PEP版的小学教材。该单元主要围绕谈论正在进行的动作这一话题展开,旨在培养学生的语言应用能力,特别是使用现在进行时态表达...
《ChatGPT在做什么...以及为什么它有效》 这本书由斯蒂芬·沃尔夫勒姆(Stephen Wolfram)撰写,探讨了ChatGPT的工作原理及其为何能成功运作。沃尔夫勒姆是计算科学领域的权威,他的公司Wolfram Media出版了这本书...
这篇PPT课件是针对小学五年级下学期的英语课程,主题为"What Are you doing",主要教授现在进行时态的使用。现在进行时态表示正在进行的动作,通常由"be动词(am, is, are)+ 动词ing形式"构成。课件通过一系列的...