扩展Visual Editor的控件和属性

http://tech.ddvip.com   2008年01月10日    社区交流

内容摘要:Visual Editor for Java 是基于 eclipse 的 GUI 可视化编辑插件,该插件以 Java 代码为中心,实现了所见即所得的用户界面编辑方式,广泛支持目前的 SWT、AWT、Swing 等控件包。本文通过一个完整的对 Visual Editor 的扩展示例,向读者展示扩展 Visual Editor 的控件和属性的方法。

  清单 9:Palette.xmi 文件

<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.ve.internal.cde.palette:Drawer xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:org.eclipse.ve.internal.cde.palette=
    "http:///org/eclipse/ve/internal/cde/palette.ecore"
xmlns:org.eclipse.ve.internal.cde.utility=
      "http:///org/eclipse/ve/internal/cde/utility.ecore">
 <entryLabel xsi:type="org.eclipse.ve.internal.cde.utility:ConstantString"
       string="Custom Widgets"/>
 <children xsi:type="org.eclipse.ve.internal.cde.palette:EMFCreationToolEntry"
  icon16Name="platform:/plugin/developerworks.ve.example.textitem/icons/sample.gif"
  creationClassURI="java:/developerworks.ve.example.textitem#TextItem">
  <entryLabel xsi:type="org.eclipse.ve.internal.cde.utility:ConstantString"
      string="TextItem"/>
  <keyedValues xsi:type="ecore:EStringToStringMapEntry"
   key="org.eclipse.ve.internal.cde.core.nameincomposition" value="textitem"/>
 </children>
</org.eclipse.ve.internal.cde.palette:Drawer>

来源:ibm    作者:王 浩    责编:豆豆技术应用

正在加载评论...