use of org.openide.loaders.DataFolder in project netbeans-mmd-plugin by raydac.
the class MMKnowledgeSources method node.
@Override
public Node node(final SourceGroup key) {
SourceNode node = null;
if (key != null) {
final FileObject rootFolder = key.getRootFolder();
final DataFolder folder = getFolder(rootFolder);
if (folder != null) {
node = new SourceNode(project, folder, this, key.getDisplayName());
if (KNOWLEDGE_FOLDER_NAME.equals(folder.getName())) {
node.setIcons(BadgeIcons.BADGED_FOLDER, BadgeIcons.BADGED_FOLDER_OPEN);
node.setShortDescription(BUNDLE.getString("KnowledgeSourceGroup.tooltip"));
}
}
}
return node;
}
use of org.openide.loaders.DataFolder in project netbeans-mmd-plugin by raydac.
the class MMKnowledgeSources method keys.
@Override
public List<SourceGroup> keys() {
final SourceGroup[] sourceGroups = getSourceGroups(this.project);
final List<SourceGroup> keysList = new ArrayList<SourceGroup>();
FileObject fileObject;
for (final SourceGroup g : sourceGroups) {
fileObject = g.getRootFolder();
DataFolder srcDir = getFolder(fileObject);
if (srcDir != null) {
keysList.add(g);
}
}
return keysList;
}
Aggregations