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


Java DataObjectNotFoundException.printStackTrace方法代码示例

本文整理汇总了Java中org.openide.loaders.DataObjectNotFoundException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java DataObjectNotFoundException.printStackTrace方法的具体用法?Java DataObjectNotFoundException.printStackTrace怎么用?Java DataObjectNotFoundException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.loaders.DataObjectNotFoundException的用法示例。


在下文中一共展示了DataObjectNotFoundException.printStackTrace方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPosition

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
public PositionBounds getPosition() {
    try {
        DataObject dobj = DataObject.find(getParentFile());
        if (dobj != null) {
            EditorCookie.Observable obs = (EditorCookie.Observable)dobj.getCookie(EditorCookie.Observable.class);
            if (obs != null && obs instanceof CloneableEditorSupport) {
                CloneableEditorSupport supp = (CloneableEditorSupport)obs;

                if (loc == null) {
                    loc = location();
                }
            PositionBounds bounds = new PositionBounds(
                    supp.createPositionRef(loc[0], Position.Bias.Forward),
                    supp.createPositionRef(Math.max(loc[0], loc[1]), Position.Bias.Forward)
                    );
            
            return bounds;
        }
        }
    } catch (DataObjectNotFoundException ex) {
        ex.printStackTrace();
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:AbstractRefactoringElement.java

示例2: performAction

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
protected void performAction(Node[] nodes) {
    Node node = nodes[ 0 ];
    
    FileObject fo = node.getLookup().lookup(FileObject.class );
    try {
    if ( fo != null ) {
        DataObject dataObject = DataObject.find( fo );
        if ( dataObject != null ) {
            EditCookie ec = dataObject.getCookie(EditCookie.class );
            if ( ec != null ) {
                ec.edit();
            }
        }
    }
    } catch ( DataObjectNotFoundException donfe ) {
        donfe.printStackTrace();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:JAXBWizardOpenXSDIntoEditorAction.java

示例3: getNodes

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
private final Vector getNodes() {
    Vector<Node> result = new Vector(javaObjects.size());
    LinkedList<FileObject> q = new LinkedList<FileObject>(javaObjects);
    while (!q.isEmpty()) {
        FileObject f = q.removeFirst();
        if (!VisibilityQuery.getDefault().isVisible(f)) {
            continue;
        }
        DataObject d = null;
        try {
            d = DataObject.find(f);
        } catch (DataObjectNotFoundException ex) {
            ex.printStackTrace();
        }
        if (d instanceof DataFolder) {
            for (DataObject o:((DataFolder) d).getChildren()) {
                q.addLast(o.getPrimaryFile());
            }
        } else {
            result.add(d.getNodeDelegate());
        }
    }
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:MoveClassesUI.java

示例4: getNodes

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
private final Vector getNodes() {
    Vector<Node> result = new Vector<Node>(mappingFileObjects.length);
    LinkedList<FileObject> q = new LinkedList<FileObject>(Arrays.asList(mappingFileObjects));
    while (!q.isEmpty()) {
        FileObject f = q.removeFirst();
        if (!VisibilityQuery.getDefault().isVisible(f)) {
            continue;
        }
        DataObject d = null;
        try {
            d = DataObject.find(f);
        } catch (DataObjectNotFoundException ex) {
            ex.printStackTrace();
        }
        if (d instanceof DataFolder) {
            for (DataObject o : ((DataFolder) d).getChildren()) {
                q.addLast(o.getPrimaryFile());
            }
        } else {
            result.add(d.getNodeDelegate());
        }
    }
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:MoveMappingFilesRefactoringUI.java

示例5: actionPerformed

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
    if (fo != null) {
        try {
            DataObject dobj = DataObject.find(fo);
            EditCookie edit = dobj.getLookup().lookup(EditCookie.class);
            edit.edit();
        } catch (DataObjectNotFoundException ex) {
            ex.printStackTrace();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ProblemReporterImpl.java

示例6: getLineCookie

import org.openide.loaders.DataObjectNotFoundException; //导入方法依赖的package包/类
public static LineCookie getLineCookie(final FileObject fo) {
    LineCookie result = null;
    try {
        DataObject dataObject = DataObject.find(fo);
        if (dataObject != null) {
            result = dataObject.getLookup().lookup(LineCookie.class);
        }
    } catch (DataObjectNotFoundException e) {
        e.printStackTrace();
    }
    return result;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:JSUtils.java


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