Search code examples
eclipseeclipse-kepler

The compiler show error message when using ProjectExplorer in Eclipse Kpler


I use the following code in Kepler:

ProjectExplorer projExplorer = (ProjectExplorer) PlatformUI.getWorkbench().getActiveWorkbenchWindow().
getActivePage().findView(IPageLayout.ID_PROJECT_EXPLORER);

And I have added org.eclipse.ui.navigator.resources.jar, however, when I compile my project, it shows an error message:

The type org.eclipse.ui.navigator.CommonNavigator cannot be resolved. It is indirectly referenced from required .class 

files


Solution

  • CommonNavigator is in the org.eclipse.ui.navigator plugin so add that to your plugin's dependencies.