當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。