Ok, finally I found the answer by googeling: I had to import javax.annotation as a package as explained in this article: http://blog.vogella.com/2012/11/23/eclipse4-and-postconstruct-and-predestroy-not-called-javax-annotation.
Eclipse 4 Application doesn't show my View
-
30-07-2022 - |
Вопрос
I follow the book "Instant Eclipse 4 RCP Development How-to" and try to build the example application. But the view I created just don't show up.
This is my code for one of the views:
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);
}
}
I created this class from the wizard from Application.e4xmi, so it is connected there.
I also dowloaded the files from the books website (http://www.packtpub.com/support/12481), and still can't see the view.
What else can I check? How can I debug this problem?
Решение
Не связан с StackOverflow