为什么前面加了org.eclipse.org

为什么很多单词前面要加THE?在什么情况下要加?等着你的回答& 可以举个例子吗_百度作业帮
为什么很多单词前面要加THE?在什么情况下要加?等着你的回答> 可以举个例子吗
定冠词the.特指的意思,表示特指的时候就要加另外,如一些专有名次,如:the moon,the sky,the Spring Festival等等也要+the.
定冠词the与指示代词this,that同源,有"那(这)个"的意思,但较弱,可以和一个名词连用,来表示某个或某些特定的人或东西。 1)特指双方都明白的人或物: Take the medicine. 把药吃了。 2)上文提到过的人或事: He bought a house. I've been to the house. 他买了幢房子。我去过那幢房...
the是定冠词,表示特指的时候就要加!
除了楼上说的之外,最常见的是指“这个,那个”,也就是特定。比如,我在路上看到一个女孩(a girl),这个女孩(the girl)正在过马路。
表示特指这个,那个的时候要加表示世界上独一无二的事物(如太阳,月亮)时要加序数词前要加表示某人一家时要加,如the Smiths表示Smith一家表示玩乐器之前要加,如play the guitar表示谈吉他还有很多,平时注意多总结就行了,如果有了语感就更好办了,也不用死记了,呵呵,希望能帮到你...
定冠词the与指示代词this,that同源,有"那(这)个"的意思,但较弱,可以和一个名词连用,来表示某个或某些特定的人或东西。 1)特指双方都明白的人或物:
Take the medicine. 把药吃了。 2)上文提到过的人或事:
He bought a house. I've been to the house.
他买了幢房子...
说那么多没用,你去看一看语法书的冠词一章吧,那里最权威也最完整
语法书上什么都有URL前面加个S是什么意思?也就是问:sURL是什么意思?为什么要加个S?_百度知道
URL前面加个S是什么意思?也就是问:sURL是什么意思?为什么要加个S?
提问者采纳
你是说编程语言吗。?。sUrl是我在代码里表示网页地址经常用的变量名
其他类似问题
按默认排序
其他1条回答
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁1776人阅读
以下是eclipse help中的内容
org.eclipse.ui.menus
Commands can be implemented using and bound to keys using. With the
extension point they can be placed in the main menu, view dropdown menus, context menus. They can also be added to the main toolbar, view toolbars, and various trim locations.
Contribution location
The older action contribution points use the concept of to place menu items and tool items. The org.eclipse.ui.menusextension point requires the id of a menu, toolbar, or trim area and an insertion point. This is the
locationURI of a &menuContribution/& element. Some examples of
locationURIs:
menu:org.eclipse.ui.main.menu?after=window - insert this contribution in the main menu after the
Window menu.menu:file?after=additions - insert this contribution in the File menu after the additions group. Equivalent to the old menubarPath=&file/additions&.menu:org.eclipse.ui.views.ContentOutline?after=additions - insert this contribution in the Content Outline view dropdown menu after the additions group.toolbar:org.eclipse.ui.views.ContentOutline?after=additions - insert this contribution in the Content Outline view toolbar, after the additions group.popup:org.eclipse.ui.examples.propertysheet.outline?after=additions - insert this contribution in the Property Sheet outline page context menu after the additions group.
A word about popup: locationURIs. In popup:id, the id refers to the id that comes from registering the context menu when the registerContextMenu(*) method is called. If an no id is specified in the call, it defaults to the id of the view or
editor registering the context menu.
The workbench defines all of its group slot names in the classes and
. These ids, like the
file example above, are available to menu contributions.
After the locationURI specifies the insertion point, the &menuContribution/& elements are turned into IContributionItems and inserted in order. Another difference between menu contributions and action contributions is that the menu contributions
can be defined in the XML in the same kind of containing relationship that one would would see in a menu or toolbar.
Let's start with a simple example from our Info example, adding some commands to the InfoView.
&extension
point=&org.eclipse.ui.menus&&
&menuContribution
locationURI=&menu:org.eclipse.ui.examples.contributions.view?after=additions&&
commandId=&org.eclipse.ui.examples.contributions.view.count&
mnemonic=&%contributions.view.count.mnemonic&&
&/command&
commandId=&org.eclipse.ui.examples.contributions.view.edit&
mnemonic=&%contributions.view.edit.mnemonic&&
&/command&
commandId=&org.eclipse.ui.file.refresh&
mnemonic=&%contributions.view.refresh.mnemonic&&
&/command&
&/menuContribution&
Our locationURI marks this contribution for the org.eclipse.ui.examples.contributions.view view. Here we are adding 3 commands to the InfoView dropdown menu: Count Entries, Edit, and Refresh.
Although you can specify a label in the menu contribution &command/& element, if you don't we will use the
nameattribute from the command definition. Now clicking on the menu element will execute that command.
We've also placed a command in the InfoView toolbar:
&menuContribution
locationURI=&toolbar:org.eclipse.ui.examples.contributions.view?after=additions&&
commandId=&org.eclipse.ui.examples.contributions.view.swap&
label=&%contributions.view.swap.name&
tooltip=&%contributions.view.swap.tooltip&&
&/command&
&/menuContribution&
Note: this command will appear in the view's toolbar. To place the same command in the main toolbar, you have to create the toolbar as well by including a &toolbar/& element in the &menuContribution/& to contain the command.
The &Swap Entries& button on the toolbar will be disabled until 2 Person entries are selected in the info view because we defined an &enabledWhen& expression in the handler definition:
&enabledWhen&
value=&2&&
&/enabledWhen&
Contribution visibility
A command's enabled state is controlled by a combination of the command is handled and if so, the handler's enabled state. Menu contributions can use core expressions to control the command's visibility in menus and toolbars.
As an example, menu contributions can still be tied to an existing action set while being contributed to the main menu or main toolbar, as action sets are converted into contexts. In this example we place our command in the main menu and main toolbar.
&extension
point=&org.eclipse.ui.actionSets&&
&actionSet
id=&org.eclipse.ui.examples.contributions.globalActionSet&
label=&%contributions.globalActionSet.label&
visible=&false&&
&/actionSet&
&/extension&
&extension
point=&org.eclipse.core.expressions.definitions&&
&definition
id=&org.eclipse.ui.examples.contributions.inGlobalActionSet&&
variable=&activeContexts&&
operator=&or&&
value=&org.eclipse.ui.examples.contributions.globalActionSet&&
&/iterate&
&/definition&
The above XML defines the action set to use, and a definition for a core expression that checks contexts to see if the action set is active. See the
section for other examples of core expressions.
Now we can add our command to the main menu:
&menuContribution
locationURI=&menu:org.eclipse.ui.main.menu?after=additions&&
label=&%contributions.menus.globalMenu.label&
mnemonic=&%contributions.menus.globalMenu.label&
id=&org.eclipse.ui.examples.contributions.menus.globalMenu&&
commandId=&org.eclipse.ui.mands.globalCommand&
mnemonic=&%contributions.menus.globalCommand.mnemonic&
id=&org.eclipse.ui.examples.contributions.menus.globalCommand&&
&visibleWhen&
&reference
definitionId=&org.eclipse.ui.examples.contributions.inGlobalActionSet&&
&/reference&
&/visibleWhen&
&/command&
&separator
name=&additions&
visible=&false&&
&/separator&
&/menuContribution&
&menuContribution
locationURI=&toolbar:org.eclipse.ui.main.toolbar?after=additions&&
id=&org.eclipse.ui.examples.contributions.toolbars.sampleToolbar&&
commandId=&org.eclipse.ui.mands.globalCommand&
icon=&icons/sample.gif&
tooltip=&%contributions.toolbars.globalCommand.tooltip&
id=&org.eclipse.ui.examples.contributions.toolbars.globalCommand&&
&visibleWhen&
&reference
definitionId=&org.eclipse.ui.examples.contributions.inGlobalActionSet&&
&/reference&
&/visibleWhen&
&/command&
&separator
name=&additions&
visible=&false&&
&/separator&
&/toolbar&
&/menuContribution&
In the above XML, we are adding the menu &Global Menu& to the main menu, and then placing the &Global Command& in it. The &visibleWhen/& element will evaluate the body of the previously defined inGlobalActionSet core expression. The &separator/& element
adds and additions group that can be used by other contributions. We are also creating a toolbar in the main coolbar (org.eclipse.ui.main.toolbar) and placing a our command in it with the sample.gif
Other contributions can now contribute to the &Global Menu& menu by specifying its id as a contribution
locationURI: menu:org.eclipse.ui.examples.contributions.menus.globalMenu?after=additions.
Currently, commands contributed to action sets don't show up in the
You can add menu contributions that work similar to org.eclipse.ui.editorActions. First you define your editor command and handler, like Reset. Then you can add them in an editor menu like &Info& to the main menu:
... org.eclipse.core.expressions.definitions
&definition
id=&org.eclipse.ui.examples.contributions.view.activeEditor&&
variable=&activeEditorId&&
value=&org.eclipse.ui.examples.contributions.editor&&
&/definition&
... org.eclipse.ui.menus
&menuContribution
locationURI=&menu:org.eclipse.ui.main.menu?after=additions&&
id=&org.eclipse.ui.examples.contributions.editor.menu&
label=&%contributions.editor.menu.label&
mnemonic=&%contributions.editor.menu.mnemonic&&
commandId=&org.eclipse.ui.examples.contributions.editor.reset&
mnemonic=&%contributions.editor.reset.mnemonic&&
&visibleWhen&
&reference
definitionId=&org.eclipse.ui.examples.contributions.view.activeEditor&&
&/reference&
&/visibleWhen&
&/command&
&/menuContribution&
This is similar to adding to the main menu with our global action example. Here our core expression will make this element visible as long as the active editor id variable matches our editor. You can check outfor
a list of supported variables names.
Note: updating the main menu and especially the main toolbar are expensive operations. You generally want to confine them to actionSet equivalent contexts and active editor type. Although you can update the main toolbar on each selection
change using the default variable or a &with variable=&selection&/& expression, it's not a good idea. The common practice is to leave your command visibility at the action set or active editor level, and have your handler enabled state track the current selection.
Contributing to popup menus
As in , commands can be contributed to a specific context menu by the context menu's id, or to any context menu where it can satisfy its &visibleWhen& clause. For example, we can add our Refresh command to the Info View popup as a convenience.
Because we didn't callregisterContextMenu(*) with a specific id it defaults to the view id.
&menuContribution
locationURI=&popup:org.eclipse.ui.examples.contributions.view?after=additions&&
commandId=&org.eclipse.ui.file.refresh&
mnemonic=&%contributions.view.refresh.mnemonic&&
&/command&
&/menuContribution&
To contribute a command to a popup if its selection matches a particular object type you can use the default variable, or for behaviour closest to
org.eclipse.ui.popupMenustarget a specific popup selection variable. Here's an example using the context menu selection provider. This just affects the popup menu visibility, not the command enabled state.
&menuContribution
locationURI=&popup:org.eclipse.ui.popup.any?after=additions&&
commandId=&org.eclipse.ui.examples.contributions.view.edit&
mnemonic=&%contributions.view.edit.mnemonic&&
&visibleWhen&
variable=&activeMenuSelection&&
type=&org.eclipse.ui.examples.contributions.model.Person&&
&/iterate&
&/visibleWhen&
&/command&
&/menuContribution&
Using &iterate&&adapt type=&Person&/&&/iterate& is the core expression equivalent of the old
objectClass attribute.
Adding toolbars to trim areas
A 'trim' widget is a control that gets sited into a location (called a 'Trim Area') on the outer boundary of the Workbench Window. The most common example is the generic 'status line' which almost all GUI's place along the bottom of the window. The extension
point allows plug-ins to add elements to the workbench trim by contributing
toolbars into trim areas and populating the toolbar with one or more controls (using the same mechanism as contributing controls into the main toolbar).
Controls contributed to the trim must be a subclass of .
This class will manage the life-cycle of the contribution, disposing and re-creating the contribution as necessary (such as when the user moves the control to another trim area). Note that the
getCurSide() and getOrientation() methods allow the implementation of
createControl(parent) to adjust the created control to its current location in the trim.
For this example we've contributed a simple trim widget that simply displays a string and an indication of which side the trim is currently docked on.
Let's take a look at the extension point definition used to contribute this piece of trim:
&menuContribution
locationURI=&toolbar:org.eclipse.ui.trim.status&&
id=&org.eclipse.ui.examples.contributions.contributedTrim&&
commandId=&org.eclipse.ui.examples.contributions.item2&
icon=&icons/editor.gif&
id=&contributions.trimItem&
label=&%Trim.item&
tooltip=&%TrimItem.toolTip&&
&/command&
class=&org.eclipse.ui.examples.contributions.ExampleControlContribution&
id=&contributions.controlContrib1&&
&/control&
commandId=&org.eclipse.ui.examples.contributions.item2&
icon=&icons/editor.gif&
id=&contributions.trimItem2&
label=&%Trim2.item&
tooltip=&%TrimItem2.toolTip&&
&/command&
&/toolbar&
&/menuContribution&
This extension defines the 'locationURI' identifying it as being at the start of the 'status' trim area (i.e. at the beginning of the bottom). We then define a
toolbar contribution at that location, adding a controlcontribution bracketed by two
command contributions directly into its definition.
One thing that is not reflected in this sample's code is the reliance of the trim layout manager on the trim control's proper implementation of the widget control's
computeSize method. The widget must be capable of calculating and returning its 'preferred' size since this is used throughout the layout management implementation to determine, for example, how much space is needed for a particular trim area.
For example, if you want to contribute a Text input control to the trim (i.e. a 'Search Bar') and you want to control the width it has you'll need to wrap the Text control in a Composite whose Layout's 'computeSize' returns the correct values.
See the SWT documentation for notes on how to correctly implement 'computeSize' correctly.
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:253896次
积分:4321
积分:4321
排名:第2750名
原创:170篇
转载:109篇
评论:51条
(2)(1)(3)(4)(8)(6)(1)(2)(5)(1)(1)(3)(15)(7)(22)(8)(7)(1)(2)(2)(8)(3)(18)(42)(80)(28)为什么前面的pressure是不加s而后面的pressure 是加上s?
在沪江关注实用英语的沪友zx_遇到了一个关于的疑惑,并悬赏5沪元,已有1人提出了自己的看法。
知识点疑惑描述:
From handling the pressure of school to handling the pressures of finding work in a down economy.
为什么前面的pressure是不加s而后面的pressure 是加上s?
最佳知识点讲解
知识点相关讲解
我的理解是:第一个pressure是指来自学校里(特指施压方是“学校”,根据后面的意思这里特指毕业吧)的压力,用单数;第二个pressure是指在找工作中出现的“各种压力”,用复数。
—— misssoup
相关其他知识点
CopyRight & 沪江网 2015&

我要回帖

更多关于 org.eclipse.ui 的文章

 

随机推荐