本文整理汇总了Java中org.openide.text.DataEditorSupport.findDataObject方法的典型用法代码示例。如果您正苦于以下问题:Java DataEditorSupport.findDataObject方法的具体用法?Java DataEditorSupport.findDataObject怎么用?Java DataEditorSupport.findDataObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.text.DataEditorSupport
的用法示例。
在下文中一共展示了DataEditorSupport.findDataObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getShortDescription
import org.openide.text.DataEditorSupport; //导入方法依赖的package包/类
@Override
public String getShortDescription () {
DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager ().
getCurrentEngine ();
if (currentEngine == null) return null;
AntDebugger d = currentEngine.lookupFirst(null, AntDebugger.class);
if (d == null) return null;
Part lp = (Part)
getAttachedAnnotatable();
if (lp == null) return null;
Line line = lp.getLine ();
DataObject dob = DataEditorSupport.findDataObject (line);
if (dob == null) return null;
EditorCookie ec = dob.getLookup().lookup(EditorCookie.class);
if (ec == null) return null;
this.lp = lp;
this.ec = ec;
RequestProcessor.getDefault ().post (this);
return null;
}
示例2: getShortDescription
import org.openide.text.DataEditorSupport; //导入方法依赖的package包/类
@Override
public String getShortDescription () {
// [TODO] hack for org.netbeans.modules.debugger.jpda.actions.MethodChooser that disables tooltips
if ("true".equals(System.getProperty("org.netbeans.modules.debugger.jpda.doNotShowTooltips"))) { // NOI18N
return null;
}
DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager ().
getCurrentEngine ();
if (currentEngine == null) {
return null;
}
JPDADebugger d = currentEngine.lookupFirst(null, JPDADebugger.class);
if (d == null) {
return null;
}
Part lp = (Part) getAttachedAnnotatable();
if (lp == null) {
return null;
}
Line line = lp.getLine ();
DataObject dob = DataEditorSupport.findDataObject (line);
if (dob == null) {
return null;
}
EditorCookie ec = dob.getLookup().lookup(EditorCookie.class);
if (ec == null) {
return null;
// Only for editable dataobjects
}
this.lp = lp;
this.ec = ec;
RequestProcessor rp = currentEngine.lookupFirst(null, RequestProcessor.class);
if (rp == null) {
// Debugger is likely finishing...
rp = RequestProcessor.getDefault();
}
rp.post (this);
return null;
}
示例3: getShortDescription
import org.openide.text.DataEditorSupport; //导入方法依赖的package包/类
@Override
public String getShortDescription () {
final Session session = DebuggerManager.getDebuggerManager ().getCurrentSession();
if (session == null) {
return null;
}
final DebuggerEngine engine = session.getCurrentEngine();
if (engine == null) {
return null;
}
final Line.Part lp = (Line.Part) getAttachedAnnotatable();
if (lp == null) {
return null;
}
Line line = lp.getLine ();
DataObject dob = DataEditorSupport.findDataObject (line);
if (dob == null) {
return null;
}
final EditorCookie ec = dob.getLookup().lookup(EditorCookie.class);
if (ec == null) {
return null;
// Only for editable dataobjects
}
Runnable runnable = new Runnable() {
@Override
public void run() {
evaluate(session, engine/*, dbg*/, lp, ec);
}
};
RequestProcessor rp = engine.lookupFirst(null, RequestProcessor.class);
if (rp == null) {
// Debugger is likely finishing...
rp = RP;
}
rp.post(runnable);
return null;
}