当前位置: 首页>>代码示例>>Java>>正文


Java LogicalViewProvider.findPath方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ModuleLogicalViewTest.java

示例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;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:ExtProjectConvertorServices.java

示例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");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Nodes.java

示例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");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Nodes.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ViewTest.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ViewTest.java


注:本文中的org.netbeans.spi.project.ui.LogicalViewProvider.findPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。