[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: About classloader: NoClassDefFound with two dependant plugins

Joonas,

The way you have it set up currently, the core plugin needs to require the editor plugin and the editor plugin needs to require the core plugin. Since plugins dependencies cannot be circular, this won't work.

Sounds to me like you need to subclass your Graphical Editor in your editor plugin and implement this method in the subclass.

jkca

Joonas Reynders wrote:
I am implementing a graphical editor using GEF and I get a NoClassDefFound
exception when I try to set my EditPart factory. I have created two plug-in
projects (core and editor). I have generalized pars of my implementation to
be reused in future editors.

The Problem I have goes as follows (This is taken from my Graphical Editor)

    /**

     * @see
org.eclipse.gef.ui.parts.GraphicalEditor#configureGraphicalViewer()

     */

    protected void configureGraphicalViewer() {

        super.configureGraphicalViewer();



        GraphicalViewer viewer = getGraphicalViewer();



        viewer.setRootEditPart(new FreeformGraphicalRootEditPart());



        ((FigureCanvas) viewer.getControl()).setScrollBarVisibility(

            FigureCanvas.ALWAYS);



        viewer.setEditPartFactory(new ControlFactory()); (This line causes
the problem)

        viewer.setContextMenuProvider(contextMenu);

    }



InternalPlatform Class fails trying to create the ControlFactory() class. I
have an abstract base class for the Graphical editor (in the core plugin)
and the ControlFactory is declared (implements the EditPartFactory
interface) in the editor plugin.



Can anyone help?