`
lizhensan
  • 浏览: 370068 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表

rcp 不足。

好多需要转换为子类 才可以得到你需要的东西。 比如:   WorkbenchPage page=(WorkbenchPage) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();   Perspective p= page.getActivePerspective();   上面只有把IWorkbenchPage  转换为WorkbenchPage   才可以得到对应的透视图Perspective 。     类似 的地方还有很多。         WorkbenchWindow ...
  IStatusLineManager status=this.getViewSite().getActionBars().getStatusLineManager(); status.setMessage("aa");                                PlatformUI.getWorkbench().getActiveWorkbenchWindow(); IActionBars  bars=getViewSite().getActionBars(); IStatusLineManager st ...
http://hi.baidu.com/yang_lc/blog/item/b05ba890c29d8386a877a461.html   .如果要实现在属性视图中编辑被选择的对象,则至少必须满足以下两个条件: 被选择的对象必须实现或者能够适配成IPropertySource接口对象。 被选择的对象必须能够被实现了ISelectionProvider接口的选择提供者提供属性视图 2.Eclipse中内置了一些实现了IPropertyDescriptor接口的类 PropertyDescriptor 可以实现不可编辑的属性 ColorProper ...
IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();         window.getActivePage().closeAllPerspectives(true, true);       关闭说有的透视图       打开指定的透视图。         try {          window.openPage("sunline.ide2.transaction.perspective", null);         } catch (WorkbenchE ...
PropertySheetPage 属性有的时候属性不是按照我们添加的顺序排序的。 其实 PropertySheetPage 默认是按照我们的属性名称来排序的,如何来控制属性的顺序呢? 1:首先需要在你的part中实现  IAdaptable     2:在getAdapter方法中添加   如下:   if (adapter == IPropertySheetPage.class) {   PropertySheetPage page = new PropertySheetPage(){    @Override    public void createControl(Comp ...
讲classpath  中的点  移动到最上面,就可以解决了。参考     http://www.blogjava.net/lhulcn618/archive/2007/12/03/164822.html
参考文章: http://hi.baidu.com/peiwenlin/blog/item/3d67059b41728cb9c9eaf4cd.html   http://www.eclipse.org/articles/Article-Properties-View/properties-view.html     org.eclipse.ui.views.properties.tabbed.propertyContributor org.eclipse.ui.views.properties.tabbed.PropertyTabs org.eclipse.ui.views.pr ...
  final Composite bottomComposite = new Composite(parent, SWT.NONE); final GridData gd_bottomComposite = new GridData(SWT.FILL, SWT.FILL, true, true); bottomComposite.setLayoutData(gd_bottomComposite); bottomComposite.setLayout(new FillLayout());   graphicalViewer = new ScrollingGrap ...

uml 的学习

    博客分类:
  • java
http://www.cnblogs.com/kingvax/archive/2011/04/26/2029021.html 很不错。。。  http://www.open-open.com/lib/view/open1328059700311.html    继承(泛化) Generalization  接口的实现  Realization      依赖  dependency   关联  Association     聚合  aggregation  组合  composition     聚合 组合    聚合可以独立的存在,并且可以共享与其它聚合。 ...
gef uml 类图
package sunline.ide2.transaction.utils; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorReference; import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclip ...
public static void test1() {     List<String> list=new ArrayList<String>();        list.add("11");        list.add("22");        list.add("33");        for(String s:list)        {        System.out.println(s);        if(s.equals("22"))   ...
首先 我们先说一下 property tabbed 的实现。 我们可以通过三个扩展点 来实现 属性的多页码显示。 1:propertyContributor    <extension         point="org.eclipse.ui.views.properties.tabbed.propertyContributor">       <propertyContributor             contributorId="gef.propertyContributor1">          <prop ...
PropertySheet 在rcp中引用还是很广泛的,如何gef中,或者数据编辑中。 使用PropertySheet  需要设计到一个很重要类 IPropertySource 这里是个标准的属性源,以键值的形式显示。 我们可以在任何地方,任何事件中显示  属性。 代码如下: //现实一般模型的属性 public static void showPropertyInPropertySheet(IAdaptable model) { PropertySheet property = getPropertySheet(); IPropertySource  source= ( ...

xstream 的初步学习

    博客分类:
  • java
核心代码 创建 对象 XStream sm = new XStream();  设置自动识别 注释 sm.autodetectAnnotations(true);  把对象写入file中 sm.toXML(model, file); 从xml读取object***这里需要注意,如何读xml是,创建sm必须为 XStream sm = new XStream(new DomDriver());    需要添加驱动 Model model=  (Model) sm.fromXML(file); xstream 注释 annotation 为pojo起别名,可以作用在 类、属性 @XS ...
Global site tag (gtag.js) - Google Analytics