支持HW团队,就支付宝领取下面的红包吧!(2018年3月31前,就几毛,也会几块,可以和其他红包叠加使用),你领取消费,HW有奖励。红包使用无条件限制,有条件请注意是不是有病毒。

小伙伴们,给大家发红包喽!人人可领,领完就能用。祝大家领取的红包金额大大大!#吱口令#长按复制此消息,打开支付宝就能领取!er1OEj73Uj

登入 注册 | 验证
| 搜索
HelloWorld论坛 : > 计算机科学、技术、教学> HelloWorld团队自营项目> HW数据库模型> 【原翻】org.eclipse.ui.newWizards配置
 
 
 
 
类别:eclipse 阅读:4681 评论:0 时间:二月 8, 2015, 10:31 p.m. 关键字:newWizards

 

 来源:http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fdialogs_wizards_newWizards.htm&cp=2_0_5_4_0【水平很烂,借助百度。如何有不对,请告知,马上改进!】

Creation Wizards创建向导

 

Identifier: 

org.eclipse.ui.newWizards

 

Description描述: 

This extension point is used to register resource creation wizard extensions.这个扩展点被用来注册资源创建扩展向导。 Creation wizards appear as choices within the "New Dialog", and are typically used to create folders and files.新建向导表现为内嵌多个对话框的形式,通常被用来创建文件夹和文件。

In the "New Dialog", wizards are organized into categories which usually reflect a particular problem domain.在一个新建窗口对话框向导中,向导包含几个分类,每一个分类用来解决一个特定范围的问题For instance, a Java oriented plugin may define a category called "Java" which is appropriate for "Class" or "Package" creation wizards.例如,面向java的插件可以定义一类称为Java的特性,这类特性能创建java类和包的向导。 The categories defined by one plug-in can be referenced by other plug-ins using the category attribute.一个插件中定义的特性能被用到这个特性属性的其他插件引用。 Uncategorized wizards, as well as wizards with invalid category paths, will end up in an "Other" category.未分类的向导,以及无效的类别路径向导,最终会在“其他”类别。

Wizards may optionally specify a description subelement whose body should contain short text about the wizard.向导可以选择指定一个描述元素,这个元素应该包含简单的文字,介绍这个向导。

 

Configuration Markup:

 

<!ELEMENT extension (category | wizard | primaryWizard)*>
<!ATTLIST extension
point CDATA #REQUIRED
id    CDATA #IMPLIED
name  CDATA #IMPLIED
>

 

  • point - a fully qualified identifier of the target extension point一个完全合格的目标扩展点标识符
  • id - an optional identifier of the extension instance一个可选的扩展实例标识符
  • name - an optional name of the extension instance一个可选的扩展实例名称

 

<!ELEMENT category EMPTY>
<!ATTLIST category
id             CDATA #REQUIRED
name           CDATA #REQUIRED
parentCategory IDREF #IMPLIED
>
  • id - a unique name that can be used to identify this category一个可以用来识别这类特性的名字
  • name - a translatable name of the category that will be used in the dialog box这个特性的名称,将会被用在对话框中。
  • parentCategory - a path to another category if this category should be added as a child另一个作为子特征被加入的特征路径

 

<!ELEMENT wizard (description? , selection* , keywordReference*)>
<!ATTLIST wizard
id                    CDATA #REQUIRED
name                  CDATA #REQUIRED
icon                  CDATA #IMPLIED
category              CDATA #IMPLIED
class                 CDATA #REQUIRED
project               (true | false)
finalPerspective      IDREF #IMPLIED
preferredPerspectives CDATA #IMPLIED
helpHref              CDATA #IMPLIED
descriptionImage      CDATA #IMPLIED
canFinishEarly        (true | false)
hasPages              (true | false)
>

 

 

  • id - a unique name that can be used to identify this wizard一个可以用来识别这个向导的唯一名称
  • name - a translatable name of the wizard that will be used in the dialog box在对话框中使用的向导名字
  • icon - a relative path of an icon that will be used together with the name to represent the wizard as one of the choices in the creation dialog box.一个图标的相对路径,这个图标会和代表这个向导的名字在创建对话框中一起显示。
  • category - a slash-delimited path ('/') of category IDs. Each token in the path must represent a valid category ID previously defined by this or some other plug-in. If omitted, the wizard will be added to the "Other" category.一个斜线分隔的路径(“/”)的特征ID。路径中的每个标记必须代表一个先前定义的或其他一些插件有效的类别ID。如果省略,向导将添加到“其他”类别。
  • class - a fully qualified name of the Java class implementing org.eclipse.ui.INewWizard. 一个完整合规的Java类名,实现org.eclipse.ui.INewWizard接口。
  • project - an optional attribute indicating the wizard will create an IProject resource. Also causes the wizard to appear as a choice within the "New Project Dialog".一个可选的属性,指示该向导将创建一个IProject资源。也使特征出现在“新建项目”对话框中选择“。
  • finalPerspective - an optional attribute which identifies a perspective to activate when IProject resource creation is finished.一个可选的属性,当IProject 资源被创建完成的时候激活。
  • preferredPerspectives - an optional attribute specifying a comma-separated list of perspective IDs.一个可选的属性,指定一个以逗号分隔的透视图的列表。 If the current perspective is in this list, then no perspective activation occurs when IProject resource creation is finished.如果目前的透视图在这个列表中,那么没有透视图激活时发生IProject资源创建完成。
  • helpHref - a help url that can describe this wizard in detail.

    Since 3.0从3.0开始,帮助URL,可以详细描述该向导。

  • descriptionImage - a larger image that can help describe this wizard.

    Since 3.0从3.0开始,较大的图像,可以帮助描述此向导。

  • canFinishEarly - whether the wizard is capable of finishing without ever showing pages to the user.是否向导在没有显示页面给用户的时候可以结束。
  • hasPages - whether the wizard provides any pages.是否向导提供其他界面。

 

<!ELEMENT description (#PCDATA)>

an optional subelement whose body contains a short text describing what the wizard will do when started一个可选的子元素,其体内含有一个简短的文字描述向导会什么时候开始。

<!ELEMENT selection EMPTY>
<!ATTLIST selection
class CDATA #REQUIRED
name  CDATA #IMPLIED
>

 

  • class - a fully qualified class name. If each object in the workbench selection implements this interface the selection will be passed to the wizard. Otherwise, an empty selection is passed完全合格类名。在工作台,选择每个对象实现该接口的选择将被传递到向导。否则,一个空的选择是通过。
  • name - an optional name filter. Each object in the workbench selection must match the name filter to be passed to the wizard一个可选的名称过滤。在工作台上,滤波器必须选择每个对象的名称匹配,向导才允许通过。

 

<!ELEMENT primaryWizard EMPTY>
<!ATTLIST primaryWizard
id IDREF #REQUIRED
>

a means of declaring that a wizard is "primary" in the UI.在UI当中,申明一个主向导的方法。 A primary wizard is emphasized in the new wizard dialog. 主向导在新的向导对话框中被强调。Please note that this element is not intended to be used by plug in developers!请注意,此元素不打算由插件开发者使用! This element exists so that product managers may emphasize a set of wizards for their products.这些元素的存在,会使产品经理强调他的一些列产品向导。

 

  • id - the id of a wizard that should be made primary.一个向导的主ID。

 

<!ELEMENT keywordReference EMPTY>
<!ATTLIST keywordReference
id IDREF #REQUIRED
>

A reference by a New Wizard to a keyword. 通过关键字参考一个新向导。See the keywords extension point.通过关键字看扩展点。

 

  • id - The id of the keyword being referred to.关键字被当做ID。

 

Examples: 例子:

Following is an example of creation wizard configuration:接下来是一个创建向导配置的例子:

 

<extension point="org.eclipse.ui.newWizards">
        <category          id="com.xyz.XYZ"          name="XYZ Wizards">        </category>
        <category          id="com.xyz.XYZ.Web"          name="Web Wizards"          parentCategory="com.xyz.XYZ">        </category>
        <wizard            id="com.xyz.wizard1"            name="XYZ artifact"            category="com.xyz.XYZ/com.xyz.XYZ.Web"            icon="./icons/XYZwizard1.gif"            class="com.xyz.XYZWizard1">
                <description>                Create a simple XYZ artifact and set initial content            </description>
                <selection class="org.eclipse.core.resources.IResource"/>
        </wizard>
</extension>




API Information: API信息:

The value of the class attribute must represent a class that implements org.eclipse.ui.INewWizard.类必须实现接口org.eclipse.ui.INewWizard。If the wizard is created from within the New Wizard it will be inserted into the existing wizard.如果向导被创建,新的向导将会插入。 If the wizard is launched as a shortcut (from the File New menu or a toolbar button) it will appear standalone as a separate dialog box.如果向导作为快捷方式启动(出现在文件右击菜单或工具栏按钮),它会作为一个单独的对话框出现。

 

Supplied Implementation: 所提供的实现:

The workbench comes with wizards for creating empty resources of the following types:project, folder and file. 平台提供的空向导,创建如下类型: 空项目、空文件夹、空文件。These wizards are registered using the same mechanism as described above. 这些向导都使用如上面所描述的相同的机制注册。 Additional wizards may also appear, subject to particular platform installation.其他的向导也会出现,用来解决特殊的问题。


 

[挂载人]初学MPEG [审核人]初学MPEG 推荐

个人签名--------------------------------------------------------------------------------

Please Login (or Sign Up) to leave a comment