⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filelistview.java

📁 基于Java RCP 应用的属性编辑, 可以对RCP 程序进行属性的设置
💻 JAVA
字号:
package commonproperties.views;import org.eclipse.jface.viewers.TreeViewer;import org.eclipse.swt.widgets.Composite;import org.eclipse.ui.part.ViewPart;import org.eclipse.ui.views.properties.IPropertySheetPage;import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;import commonproperties.tree.FileListTree;/** * This sample class demonstrates how to plug-in a new workbench view. The view * shows data obtained from the model. The sample creates a dummy model on the * fly, but a real implementation would connect to the model available either in * this or another plug-in (e.g. the workspace). The view is connected to the * model using a content provider. * <p> * The view uses a label provider to define how model objects should be * presented in the view. Each view can present the same model objects using * different labels and icons, if needed. Alternatively, a single label provider * can be shared between views in order to ensure that objects of the same type * are presented in the same way everywhere. * <p> */public class FileListView extends ViewPart implements ITabbedPropertySheetPageContributor {	private TreeViewer treeViewer;	@Override	public void createPartControl(Composite parent) {		treeViewer = FileListTree.createFileListTreeViewer(parent);		getSite().setSelectionProvider(treeViewer);	}	@Override	public void setFocus() {	}	public String getContributorId() {		// TODO Auto-generated method stub		return getSite().getId();	}	@Override	public Object getAdapter(Class adapter) {		if(adapter==IPropertySheetPage.class){			return new TabbedPropertySheetPage(this);		}		return super.getAdapter(adapter);	}		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -