Quantcast

Building fragment that have eclipse plugin as host?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Building fragment that have eclipse plugin as host?

mort.motes
This post has NOT been accepted by the mailing list yet.
I am trying to build a project that contains a fragment that has org.eclipse.jface as host. In the fragment I have created a new package: org.eclipse.jface.viewers where I have put the type: MyTableViewerEditor. I have then exported this package in the manifest file.

I then have another plugin where I import the org.eclipse.jface.viewers package but I cannot see the MyTableViewerEditor type when I declare it in the Activator in the plugin.A workaround is to add

  <classpathentry combineaccessrules="false" kind="src" path="/my.fragment.jface"/>

to the .classpath file in the plugin. Then the type MyTableViewerEditor can be seen just fine. But when I build the project with tycho I get:

----------
1. ERROR in C:\Users\mm\workspace_fragments\my.plugin\src\my\plugin\Activator.java (at line 3)
        import org.eclipse.jface.viewers.MyTableViewerEditor;
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.eclipse.jface.viewers.MyTableViewerEditor cannot be resolved
----------
2. ERROR in C:\Users\mm\workspace_fragments\my.plugin\src\my\plugin\Activator.java (at line 32)
        MyTableViewerEditor asd;
        ^^^^^^^^^^^^^^^^^^^
MyTableViewerEditor cannot be resolved to a type
----------
2 problems (2 errors)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] My Parent Project ................................. SUCCESS [0.313s]
[INFO] My Target Project ................................. SUCCESS [0.193s]
[INFO] My Fragment JFace ................................. SUCCESS [1.618s]
[INFO] My Plugin ......................................... FAILURE [0.145s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.065s
[INFO] Finished at: Mon May 16 12:05:20 CEST 2011
[INFO] Final Memory: 62M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.12.0:compile (default-compile) on project plugin: Compilation failure: Compilation failure:
[ERROR] C:\Users\mm\workspace_fragments\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
[ERROR]
[ERROR] C:\Users\mm\workspace_fragments\my.plugin\src\my\plugin\Activator.java (at line 32):[-1,-1]
[ERROR] MyTableViewerEditor asd;
[ERROR] ^^^^^^^^^^^^^^^^^^^
[ERROR] MyTableViewerEditor cannot be resolved to a type
[ERROR] -> [Help 1]
[ERROR]



Any suggestions on how to build and use fragments that has build in plugins as hosts?

A minimal project can be downloaded below that produce the above error:

http://download555.mediafire.com/41g5529tu6bg/9iicvcvrupyhu3u/example_project.zip
Loading...