本文整理汇总了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;
}