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


Java DataEditorSupport.findDataObject方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:ToolTipAnnotation.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:42,代码来源:ToolTipAnnotation.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:42,代码来源:AbstractJSToolTipAnnotation.java


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