I'm writing an eclipse plugin which contributes to the standard workbench and one action creates a new file under the current project. My problem is though, that the explorer does not refresh when the file is created in the action. What I tried so far:
((PackageExplorerPart)part).refresh(treeSelection); //where the selection is the root project
((PackageExplorerPart)part).getTreeViewer().refresh;
Both are called right after the resource is created. What am I missing? Maybe the resource is not yet merged with the explorer's model? The manual refresh reveals the file...