Java Eclipse4应用程序没有';我看不出我的观点
我遵循《InstantEclipse4RCP开发方法》一书,并尝试构建示例应用程序。 但是我创建的视图没有显示出来 这是其中一个视图的代码:Java Eclipse4应用程序没有';我看不出我的观点,java,eclipse-rcp,e4,Java,Eclipse Rcp,E4,我遵循《InstantEclipse4RCP开发方法》一书,并尝试构建示例应用程序。 但是我创建的视图没有显示出来 这是其中一个视图的代码: package codesnippetapp.views; import javax.annotation.PostConstruct; import javax.inject.Inject; import org.eclipse.e4.ui.di.Focus; import org.eclipse.jface.viewers.TableViewer;
package codesnippetapp.views;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Composite;
public class SnippetListView {
TableViewer snippetsList;
@Inject
public SnippetListView() {
//TODO Your code here
}
@PostConstruct
public void postConstruct(Composite parent){
snippetsList = new TableViewer (parent);
}
}
我从Application.e4xmi的向导中创建了这个类,因此它连接在那里
我还从图书网站()下载了文件,但仍然看不到视图
我还能查什么?如何调试这个问题?好的,最后我通过谷歌搜索找到了答案:我必须像本文中解释的那样将javax.annotation作为一个包导入:。在Eclipse中运行RCP时,需要指定-clearPersistedState参数,以确保它拾取应用程序中的更改。e4xmi。我做到了,但这并不能解决我的问题。