[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tycho-user] Cannot compile project using classes from a fragment
|
I have created a parent project with some submodules:
http://download1322.mediafire.com/tz8ipgfqnimg/7e3i2z9vf55vb7b/my.zip
One of the submodules is a fragment that has org.eclipse.jface as
host. I have added a class MyTableViewerEditor to the package:
org.eclipse.jface.viewers
in the fragment and exported the package on the runtime tab.
In a plugin submodule I need to use the class MyTableViewerEditor. But
since its not possible to have a dependency on a fragment I have
added:
<classpathentry combineaccessrules="false" kind="src"
path="/my.fragment.jface"/>
to the .classpath in the bundle project. This works fine in the
eclipse IDE, but when I build it with tycho the type
MyTableViewerEditor cannot be found when the plugin is compiled:
[ERROR] C:\workspace_tycho_examples\my\my.plugin\src\my\plugin\Activator.java
(at line 3):[-1,-1]
[ERROR] import org.eclipse.jface.viewers.MyTableViewerEditor;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.eclipse.jface.viewers.MyTableViewerEditor
cannot be resolved
One possible workaround is to do the following:
1) Add the fragment to a feature and build a p2 site.
2) Add the p2 site to the target definition for the original project
and then build the project.
When doing the above the tycho build succeeds but maybe there is a
simpler way to build the project in one step (instead of having to
introduce a prebuild phase that creates the p2 site).
Any suggestions?