Example #1
0
ResourceTopLevelNode::ResourceTopLevelNode(const Utils::FileName &filePath, FolderNode *parent)
    : ProjectExplorer::FolderNode(filePath)
{
    setIcon(Core::FileIconProvider::icon(filePath.toString()));
    m_document = new ResourceFileWatcher(this);
    Core::DocumentManager::addDocument(m_document);

    Utils::FileName base = parent->filePath();
    if (filePath.isChildOf(base))
        setDisplayName(filePath.relativeChildPath(base).toUserOutput());
    else
        setDisplayName(filePath.toUserOutput());
}