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


Java JPDADebugger.STATE_DISCONNECTED属性代码示例

本文整理汇总了Java中org.netbeans.api.debugger.jpda.JPDADebugger.STATE_DISCONNECTED属性的典型用法代码示例。如果您正苦于以下问题:Java JPDADebugger.STATE_DISCONNECTED属性的具体用法?Java JPDADebugger.STATE_DISCONNECTED怎么用?Java JPDADebugger.STATE_DISCONNECTED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.netbeans.api.debugger.jpda.JPDADebugger的用法示例。


在下文中一共展示了JPDADebugger.STATE_DISCONNECTED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSessionState

private String getSessionState (Session s) {
    DebuggerEngine e = s.getCurrentEngine ();
    if (e == null)
        return loc ("MSG_Session_State_Starting");
    JPDADebugger d = e.lookupFirst(null, JPDADebugger.class);
    synchronized (this) {
        if (!addedAsListener) {
            d.addPropertyChangeListener (JPDADebugger.PROP_STATE, this);
        }
    }
    switch (d.getState ()) {
        case JPDADebugger.STATE_DISCONNECTED:
            return loc ("MSG_Session_State_Disconnected");
        case JPDADebugger.STATE_RUNNING:
            return loc ("MSG_Session_State_Running");
        case JPDADebugger.STATE_STARTING:
            return loc ("MSG_Session_State_Starting");
        case JPDADebugger.STATE_STOPPED:
            return loc ("MSG_Session_State_Stopped");
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:SessionsTableModelFilter.java

示例2: DebuggingTreeModel

public DebuggingTreeModel(ContextProvider lookupProvider) {
    debugger = lookupProvider.lookupFirst(null, JPDADebugger.class);
    dvSupport = (DebuggingViewSupportImpl) lookupProvider.lookupFirst(null, DebuggingView.DVSupport.class);
    debugger.addPropertyChangeListener(JPDADebugger.PROP_STATE, debuggerListener);
    if (debugger.getState() == JPDADebugger.STATE_DISCONNECTED) {
        debugger.removePropertyChangeListener(JPDADebugger.PROP_STATE, debuggerListener);
    } else {
        prefListener = new DebuggingPreferenceChangeListener();
        preferences.addPreferenceChangeListener(prefListener);
    }
    monitorChildrenFilter = new DebuggingMonitorModel.Children(debugger, dvSupport,
            new ModelListener() {
                @Override
                public void modelChanged(ModelEvent event) {
                    fireModelChange(event);
                }
            }, this);
    childrenModelImpl = new ChildrenImplModel();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:DebuggingTreeModel.java

示例3: propertyChange

@Override
public void propertyChange (java.beans.PropertyChangeEvent evt) {
    if (debugger.getState () == JPDADebugger.STATE_RUNNING) {
        if (started) return;
        started = true;
        DebuggerManager.getDebuggerManager ().addDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
        createBreakpointImpls ();
    }
    if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) {
        DebuggerManager.getDebuggerManager ().removeDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
        removeBreakpointImpls ();
        started = false;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:BreakpointsEngineListener.java

示例4: checkEnabled

@Override
protected void checkEnabled(int debuggerState) {
    setEnabled (
        ActionsManager.ACTION_RUN_TO_CURSOR,
        getActionsManager().isEnabled(ActionsManager.ACTION_CONTINUE) &&
        (debuggerState== JPDADebugger.STATE_STOPPED) &&
        (EditorContextBridge.getContext().getCurrentLineNumber () >= 0) && 
        (EditorContextBridge.getContext().getCurrentURL ().endsWith (".java") || 
         EditorContextBridge.getContext().getCurrentURL ().endsWith (".scala"))
    );
    if (debuggerState != JPDADebugger.STATE_RUNNING && breakpoint != null) {
        DebuggerManager.getDebuggerManager ().removeBreakpoint (breakpoint);
        breakpoint = null;
    }
    if (debuggerState == JPDADebugger.STATE_DISCONNECTED) {
        destroy ();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:RunToCursorActionProvider.java

示例5: propertyChange

@Override
public void propertyChange (java.beans.PropertyChangeEvent evt) {
    if (debugger.getState () == JPDADebugger.STATE_RUNNING) {
        if (started) return;
        started = true;
        createBreakpointImpls ();
        DebuggerManager.getDebuggerManager ().addDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
    }
    if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) {
        removeBreakpointImpls ();
        started = false;
        DebuggerManager.getDebuggerManager ().removeDebuggerListener (
            DebuggerManager.PROP_BREAKPOINTS,
            this
        );
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:BreakpointsEngineListener.java

示例6: propertyChange

@Override
        public void propertyChange(PropertyChangeEvent e) {
            if (JPDADebugger.PROP_STATE.equals(e.getPropertyName())) {
                int state = ((Integer) e.getNewValue()).intValue();
                if ( (state == JPDADebugger.STATE_DISCONNECTED) ||
                        (state == JPDADebugger.STATE_STOPPED)
                        ) {
//                    RequestProcessor.getDefault ().post (new Runnable () {
//                        public void run () {
                    if (breakpoint != null) {
                        DebuggerManager.getDebuggerManager().
                                removeBreakpoint(breakpoint);
                        breakpoint = null;
                    }
//                        }
//                    });
                    dispose();
                }
            }
        }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:JPDAStart.java

示例7: propertyChange

@Override
public void propertyChange (PropertyChangeEvent e) {
    if (e.getPropertyName () == JPDADebugger.PROP_STATE) {
        int state = ((Integer) e.getNewValue ()).intValue ();
        if ( (state == JPDADebugger.STATE_DISCONNECTED) ||
             (state == JPDADebugger.STATE_STOPPED)
        ) {
            JPDADebugger debugger = (JPDADebugger) e.getSource();
            Pair<LineBreakpoint, Project> lbp;
            synchronized (debuggerBreakpoints) {
                lbp = debuggerBreakpoints.remove(debugger);
            }
            if (lbp != null) {
                removeBreakpoint(lbp.first());
                synchronized (projectBreakpoints) {
                    projectBreakpoints.put(lbp.second(), null);
                }
            }
        }
        return;
    }
    setEnabled (
        ActionsManager.ACTION_RUN_TO_CURSOR,
        shouldBeEnabled ()
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:RunToCursorActionProvider.java

示例8: propertyChange

@Override
public void propertyChange (final PropertyChangeEvent e) {
    if (JPDADebugger.PROP_STATE.equals(e.getPropertyName ())) {
        int state = ((Integer) e.getNewValue ()).intValue ();
        if (state == JPDADebugger.STATE_STOPPED || state == JPDADebugger.STATE_DISCONNECTED) {
            rp.post(new Runnable() {
                @Override
                public void run() {
                    if (first != null) {
                        DebuggerManager.getDebuggerManager().removeBreakpoint(first);
                        first = null;
                        ((JPDADebugger) e.getSource()).removePropertyChangeListener(JPDADebugger.PROP_STATE, pcl);
                    }
                }
            });
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:JPDAStart.java

示例9: handleToolTipClose

@Override
protected void handleToolTipClose(DebuggerEngine engine, ToolTipSupport tts) {
    JPDADebugger d = engine.lookupFirst(null, JPDADebugger.class);
    if (d == null) {
        return ;
    }
    PropertyChangeListener l = (PropertyChangeEvent evt) -> {
        int state = ((Integer) evt.getNewValue());
        if (JPDADebugger.STATE_DISCONNECTED == state ||
                JPDADebugger.STATE_RUNNING == state) {
            SwingUtilities.invokeLater(() ->
                    tts.setToolTipVisible(false)
            );
        }
    };
    d.addPropertyChangeListener(JPDADebugger.PROP_STATE, l);
    tts.addPropertyChangeListener(pl -> {
        if (ToolTipSupport.PROP_STATUS.equals(pl.getPropertyName()) &&
                !tts.isToolTipVisible()) {
            d.removePropertyChangeListener(JPDADebugger.PROP_STATE, l);
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:ToolTipAnnotation.java

示例10: propertyChange

@Override
public void propertyChange (PropertyChangeEvent e) {
    if (e.getSource() instanceof JPDADebugger) {
        int state = ((JPDADebugger) e.getSource()).getState();
        if (state == JPDADebugger.STATE_DISCONNECTED) {
            detachFromStateChange();
        } else if (state != JPDADebugger.STATE_STARTING) {
            getRefreshContentTask().schedule(10);
        }
        return ;
    }
    DebuggerEngine engine = (DebuggerEngine) e.getNewValue();
    attachToStateChange(engine);
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
            setContent();
            getRefreshContentTask().schedule(10);
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:ClassesCountsView.java

示例11: getTheState

private int getTheState() {
    int state = JPDADebugger.STATE_DISCONNECTED;
    DebuggerEngine de = DebuggerManager.getDebuggerManager().getCurrentEngine();
    if (de != null) {
        JPDADebugger d = de.lookupFirst(null, JPDADebugger.class);
        if (d != null) {
            state = getThreadsState(d);
            synchronized (this) {
                if (!attachedTo.contains(d)) {
                    attachedTo.add(d);
                    d.addPropertyChangeListener(this);
                }
            }
        }
    }
    return state;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:InstancesView.java

示例12: update

/**
 * Called from set () and propertyChanged.
 */
final void update () {
    if ( (getVirtualMachine () == null) ||
         (getDebugger ().getState () == JPDADebugger.STATE_DISCONNECTED)
    ) return;
    removeAllEventRequests ();
    if (canSetRequests()) {
        setRequests ();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:BreakpointImpl.java

示例13: propertyChange

@Override
public void propertyChange(PropertyChangeEvent evt) {
    if (JPDAStep.PROP_STATE_EXEC.equals(evt.getPropertyName())) {
        synchronized(this) {
            notifyAll();
        }
    } else if (debugger.getState() == JPDADebugger.STATE_DISCONNECTED ||
               currentThread != debugger.getCurrentThread() || !currentThread.isSuspended()) {
        synchronized(this) {
            notifyAll();
        }
        ruil.releaseUI();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:JPDAMethodChooserUtils.java

示例14: propertyChange

@Override
public void propertyChange (PropertyChangeEvent evt) {
    setEnabled (
        ActionsManager.ACTION_RUN_INTO_METHOD,
        getActionsManager().isEnabled(ActionsManager.ACTION_CONTINUE) &&
        (debugger.getState () == JPDADebugger.STATE_STOPPED) &&
        (debugger.getCurrentThread() != null) &&
        (EditorContextBridge.getContext().getCurrentLineNumber () >= 0) && 
        (EditorContextBridge.getContext().getCurrentURL ().endsWith (".java"))
    );
    if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) 
        destroy ();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:RunIntoMethodActionProvider.java

示例15: getState

@Override
public STATE getState() {
    int state = debugger.getState();
    if (state == JPDADebugger.STATE_DISCONNECTED) {
        return STATE.DISCONNECTED;
    } else {
        return STATE.RUNNING;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:DebuggingViewSupportImpl.java


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