eclipse插件开发(视图)

一。视图配置文件

  <extension  point="org.eclipse.ui.views">   ---扩展点
      <view
            class="a.views.MyView1"  --实现了IViewPart接口的回调对象
            id="a.views.myView1"
            name="MyView1"
            restorable="true">
      </view>


   </extension>
 

二。实现IViewPart接口的回调对象

public class MyView1 implements IViewPart
{

	@Override
	public IViewSite getViewSite()
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void init(IViewSite site) throws PartInitException
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void init(IViewSite site, IMemento memento) throws PartInitException
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void saveState(IMemento memento)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void addPropertyListener(IPropertyListener listener)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void createPartControl(Composite parent)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose()
	{
		// TODO Auto-generated method stub

	}

	@Override
	public IWorkbenchPartSite getSite()
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getTitle()
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Image getTitleImage()
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getTitleToolTip()
	{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void removePropertyListener(IPropertyListener listener)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void setFocus()
	{
		// TODO Auto-generated method stub

	}

	@Override
	public Object getAdapter(Class adapter)
	{
		// TODO Auto-generated method stub
		return null;
	}

}
 

三。待续。。。。

你可能感兴趣的:(eclipse,UI)