I'm experimenting with eclipse 4 API. I try to contribute a new view with a plugin. What I have so far is:
An extension to org.eclipse.e4.workbench.model
<plugin>
<extension id="id1" point="org.eclipse.e4.workbench.model">
<fragment uri="fragment.e4xmi"></fragment>
</extension>
</plugin>
The fragment.e4xmi
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_r_EgIEXDEeGuDquXwerIpw">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_rC_ngEXFEeGuDquXwerIpw">
<elements xsi:type="basic:Part" xmi:id="_sQq7kEXFEeGuDquXwerIpw" elementId="test.TestView2" contributionURI="platform:/plugin/test/test.TestView2" label="TestView2" tooltip="Test Test Test" closeable="true"/>
</fragments>
</fragment:ModelFragments>
My view implementation:
package test;
import javax.inject.Inject;
import org.eclipse.e4.ui.di.Focus;
public class TestView2 {
@Inject
public TestView2() {
}
@Focus
public void onFocus() {
}
}
For some reason the view seems not to be contributed. Have I missed something? Do I need another thing to complete the puzzle? How can I debug the problem?
Edit:
I guess the problem is, that I do not have an Element Id nor a Featurename for my String Model Fragment. I guess I have to insert the ID of an PartStack and the children as Featurename. Problem: The editor does not show any elements in the wizard to select the Element Id ...