/* (non-Javadoc)
  * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
  */
 public void debugContextChanged(DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     IWorkbenchPart part = event.getDebugContextProvider().getPart();
     if (part != null) {
       IWorkbenchPage page = part.getSite().getPage();
       ISelection selection = event.getContext();
       if (selection instanceof IStructuredSelection) {
         IStructuredSelection ss = (IStructuredSelection) selection;
         if (ss.size() == 1) {
           Object element = ss.getFirstElement();
           if (element instanceof IAdaptable) {
             IJavaScriptStackFrame frame =
                 (IJavaScriptStackFrame)
                     ((IAdaptable) element).getAdapter(IJavaScriptStackFrame.class);
             if (frame != null) {
               setContext(page, frame);
               return;
             }
           }
         }
       }
       // no context in the given view
       removeContext(page);
     }
   }
 }
Beispiel #2
0
 public void debugContextChanged(DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     PlatformObject object =
         (PlatformObject) ((IStructuredSelection) event.getContext()).getFirstElement();
     if (object == null) return;
     SCTDebugTarget newTarget = (SCTDebugTarget) object.getAdapter(IDebugTarget.class);
     if (newTarget != debugTarget && newTarget != null && !newTarget.isTerminated()) {
       debugTarget = newTarget;
       setInput(newTarget);
     }
   }
 }
 /*
  * (non-Javadoc)
  *
  * @see
  * org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextListener
  * #contextEvent
  * (org.eclipse.debug.internal.ui.contexts.provisional.DebugContextEvent)
  */
 public void debugContextChanged(final DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     IProcess process = getProcess();
     if (fView != null && process != null && process.equals(DebugUITools.getCurrentProcess())) {
       fView.display(fConsole);
     }
   }
 }
 @Override
 public void debugContextChanged(DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     // Show this GDB console if it matches with the currently
     // selected debug session
     if (fLaunch.equals(getCurrentLaunch())) {
       fView.display(fConsole);
     }
   }
 }
 @Override
 public void debugContextChanged(DebugContextEvent event) {
   fDebugContext = event.getContext();
 }
 @Override
 public void debugContextChanged(final DebugContextEvent event) {
   if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
     contextActivated(event.getContext());
   }
 }
 @Override
 public void debugContextChanged(DebugContextEvent event) {
   ISelection selection = event.getContext();
   contextActivated(selection);
 }