Bug 151442 Javadoc error in ResourceAndContainerGroup.getResource()
/** * Returns a string that is the path of the currently selected * container. Returns an empty string if no container has been * selected. */ public String getResource() { return resourceNameField.getText(); } I don't believe "...currently selected 'container'..." is what is meant for this method, as 'container' is refers to the container field of this group, not the resource file name that this method is associated with.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ResourceAndContainerGroup.java
IWorkspace workspace = ResourcesPlugin.getWorkspace();
        String projectName = path.segment(0);
        if (projectName == null
                || !workspace.getRoot().getProject(projectName).exists()) {
            problemType = PROBLEM_PROJECT_DOES_NOT_EXIST;
            problemMessage = IDEWorkbenchMessages.ResourceGroup_noProject;
            return false;
        }
        
        IWorkspaceRoot root = workspace.getRoot();
        while (path.segmentCount() > 1) {
        	if (root.getFile(path).exists()) {
        		problemType = PROBLEM_PATH_OCCUPIED;
        		problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_pathOccupied, path.makeRelative());
        		return false;
        	}
        	path = path.removeLastSegments(1);
        }
        return true;
    }
    /**
     * Validates the values for each of the group's controls.  If an invalid
     * value is found then a descriptive error message is stored for later
     * reference.  Returns a boolean indicating the validity of all of the
     * controls in the group.
     */
    protected boolean validateControls() {
        
        if (containerGroup == null) {
            return false;