本文整理汇总了Java中org.netbeans.spi.project.ui.LogicalViewProvider.findPath方法的典型用法代码示例。如果您正苦于以下问题:Java LogicalViewProvider.findPath方法的具体用法?Java LogicalViewProvider.findPath怎么用?Java LogicalViewProvider.findPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.spi.project.ui.LogicalViewProvider
的用法示例。
在下文中一共展示了LogicalViewProvider.findPath方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: find
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
private Node find(LogicalViewProvider lvp, String path) throws Exception {
FileObject f = FileUtil.toFileObject(file(path));
assertNotNull("found " + path, f);
Node root = new FilterNode(lvp.createLogicalView());
lvp.findPath(root, f); // ping
waitForNodesUpdate();
DataObject d = DataObject.find(f);
Node n = lvp.findPath(root, f);
assertEquals("same result for DataObject as for FileObject", n, lvp.findPath(root, d));
if (n != null) {
assertEquals("right DataObject", d, n.getLookup().lookup(DataObject.class));
}
return n;
}
示例2: findPath
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
@Override
public Node findPath(Node root, Object target) {
final LogicalViewProvider lvp = delegate;
if (lvp != null) {
return lvp.findPath(root, target);
} else {
//Todo: Probably not needed
return null;
}
}
示例3: locateChild
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
private static Node locateChild(Node parent, LogicalViewProvider lvp, FileObject file) {
if (lvp != null) {
return lvp.findPath(parent, file);
}
throw new UnsupportedOperationException("Not done yet");
}
示例4: locateChild
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
private static Node locateChild(Node parent, LogicalViewProvider lvp, FileObject file) {
if (lvp != null) {
return lvp.findPath(parent, file);
}
throw new UnsupportedOperationException("Not done yet");
}
示例5: doTestFindPathPositive
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
public static void doTestFindPathPositive(LogicalViewProvider lvp, Node root, Project project, String path) throws Exception {
FileObject file = project.getProjectDirectory().getFileObject(path);
assertNotNull("found " + path, file);
DataObject d = DataObject.find(file);
Node nDO = lvp.findPath(root, d);
Node nFO = lvp.findPath(root, file);
assertNotNull("found node for " + path, nDO);
assertNotNull("found node for " + path, nFO);
assertEquals("correct node", d, nDO.getLookup().lookup(DataObject.class));
//not exactly fullfilling the contract:
assertEquals("correct node", d, nFO.getLookup().lookup(DataObject.class));
}
示例6: doTestFindPathNegative
import org.netbeans.spi.project.ui.LogicalViewProvider; //导入方法依赖的package包/类
public static void doTestFindPathNegative(LogicalViewProvider lvp, Node root, Project project, String path) throws Exception {
FileObject file = project.getProjectDirectory().getFileObject(path);
assertNotNull("found " + path, file);
DataObject d = DataObject.find(file);
Node n = lvp.findPath(root, d);
assertNull("did not find node for " + path, n);
}