本文整理匯總了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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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();
}
}
}
示例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;
}