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
.getRoot().getFile(resourcePath).exists())) {
            problemType = PROBLEM_RESOURCE_EXIST;
            problemMessage = IDEWorkbenchMessages.ResourceGroup_nameExists;
            return false;
        }
        return true;
    }
    /**
     * Returns a <code>boolean</code> indicating whether the resource name rep-
     * resents a valid resource name in the workbench.  An error message is stored
     * for future reference if the name does not represent a valid resource name.
     *
     * @return <code>boolean</code> indicating validity of the resource name
     */
    protected boolean validateResourceName() {
        String resourceName = resourceNameField.getText();
        if (resourceName.equals("")) {
            problemType = PROBLEM_RESOURCE_EMPTY;
            problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_emptyName, resourceType);
            return false;
        }
        if (!(new Path("")).isValidPath(resourceName)) { 
            problemType = PROBLEM_NAME_INVALID;
            problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_invalidFilename, resourceName);
            return false;
        }
        return true;
    }
}