Plugin eclipse auto start in product

后端 未结 3 1518
情深已故
情深已故 2021-01-28 15:39

I am trying to create a plugin that loads different resources taken from the loaded project. I am trying to register to ResourceChangeListener of the workspace in an early stage

3条回答
  •  不知归路
    2021-01-28 15:55

    If you want to know the resources (i.e. projects) that are open in a workspace, you can just get the IWorkspace and look at the project contained in it.

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceRoot rootResource = workspace.getRoot();
    

    Then you should be able to just traverse this tree structure to find out about all the resources. Hope this helps.

    Here are some resources:

    • Resources and File System
    • Resource Changes in Eclipse

提交回复
热议问题