문제

With help from many members of stackoverflow, I sort of finally completed my first RCP application.

I'm facing some issues with my Project Explorer

  1. Project Explorer seems not be active when I open my RCP application (Sort of wakes up when I right click on my empty project explorer window)
  2. Even when it ON, it doesnt show me the project explore options. I mean it just shows me the name of the project and nothing else (No files inside it are shown)

Pic:

My Perspective.java file looks as shown below

 package kr;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class Perspective implements IPerspectiveFactory {

    public void createInitialLayout(IPageLayout layout) {
        String editorArea = layout.getEditorArea();

         // Top left: Project Explorer view and Bookmarks view placeholder
         IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,
            editorArea);
         topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
         topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);

         // Bottom left: Outline view and Property Sheet view
         IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.50f,
                   "topLeft");
         bottomLeft.addView(IPageLayout.ID_OUTLINE);
         bottomLeft.addView(IPageLayout.ID_PROP_SHEET);

         // Bottom right: Task List view
        // layout.addView(IPageLayout.ID_TASK_LIST, IPageLayout.BOTTOM, 0.66f, editorArea);
    }
}

I have added o.e.ui.navigator and o.e.ui.navigator.resources to the dependency list

올바른 솔루션이 없습니다

다른 팁

For the initial empty view, you need to override the getDefaultPageInput in the WorkbenchAdvisor class of your RCP defining plugin, like this:

@Override
public IAdaptable getDefaultPageInput() {
    return ResourcesPlugin.getWorkspace().getRoot();
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top