1 11 package org.eclipse.jdt.internal.debug.ui; 12 13 14 import java.util.ArrayList ; 15 import java.util.HashSet ; 16 import java.util.List ; 17 import java.util.Set ; 18 import java.util.StringTokenizer ; 19 20 import org.eclipse.core.resources.IMarker; 21 import org.eclipse.core.resources.IMarkerDelta; 22 import org.eclipse.core.resources.IResource; 23 import org.eclipse.core.resources.IWorkspaceRunnable; 24 import org.eclipse.core.resources.ResourcesPlugin; 25 import org.eclipse.core.runtime.CoreException; 26 import org.eclipse.core.runtime.IAdaptable; 27 import org.eclipse.core.runtime.IProgressMonitor; 28 import org.eclipse.core.runtime.IStatus; 29 import org.eclipse.core.runtime.MultiStatus; 30 import org.eclipse.core.runtime.Status; 31 import org.eclipse.core.runtime.jobs.Job; 32 import org.eclipse.debug.core.DebugEvent; 33 import org.eclipse.debug.core.DebugException; 34 import org.eclipse.debug.core.DebugPlugin; 35 import org.eclipse.debug.core.IBreakpointsListener; 36 import org.eclipse.debug.core.IDebugEventSetListener; 37 import org.eclipse.debug.core.ILaunch; 38 import org.eclipse.debug.core.ILaunchConfiguration; 39 import org.eclipse.debug.core.ILaunchListener; 40 import org.eclipse.debug.core.model.IBreakpoint; 41 import org.eclipse.debug.core.model.IDebugTarget; 42 import org.eclipse.debug.ui.DebugUITools; 43 import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult; 44 import org.eclipse.jdt.core.dom.Message; 45 import org.eclipse.jdt.debug.core.IJavaBreakpoint; 46 import org.eclipse.jdt.debug.core.IJavaBreakpointListener; 47 import org.eclipse.jdt.debug.core.IJavaDebugTarget; 48 import org.eclipse.jdt.debug.core.IJavaExceptionBreakpoint; 49 import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; 50 import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint; 51 import org.eclipse.jdt.debug.core.IJavaMethodEntryBreakpoint; 52 import org.eclipse.jdt.debug.core.IJavaStackFrame; 53 import org.eclipse.jdt.debug.core.IJavaThread; 54 import org.eclipse.jdt.debug.core.IJavaType; 55 import org.eclipse.jdt.debug.core.IJavaWatchpoint; 56 import org.eclipse.jdt.debug.core.JDIDebugModel; 57 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants; 58 import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint; 59 import org.eclipse.jdt.internal.debug.core.logicalstructures.IJavaStructuresListener; 60 import org.eclipse.jdt.internal.debug.core.logicalstructures.JavaLogicalStructures; 61 import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget; 62 import org.eclipse.jdt.internal.debug.ui.actions.JavaBreakpointPropertiesAction; 63 import org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookLauncher; 64 import org.eclipse.jface.preference.IPreferenceStore; 65 import org.eclipse.jface.util.IPropertyChangeListener; 66 import org.eclipse.jface.util.PropertyChangeEvent; 67 import org.eclipse.jface.viewers.ILabelProvider; 68 import org.eclipse.jface.viewers.StructuredSelection; 69 import org.eclipse.jface.window.Window; 70 import org.eclipse.swt.widgets.Display; 71 import org.eclipse.swt.widgets.Shell; 72 73 import com.ibm.icu.text.MessageFormat; 74 import com.sun.jdi.InvocationException; 75 import com.sun.jdi.ObjectReference; 76 77 87 public class JavaDebugOptionsManager implements IDebugEventSetListener, IPropertyChangeListener, IJavaBreakpointListener, ILaunchListener, IBreakpointsListener, IJavaStructuresListener { 88 89 92 private static JavaDebugOptionsManager fgOptionsManager = null; 93 94 97 private IJavaExceptionBreakpoint fSuspendOnExceptionBreakpoint = null; 98 99 102 private IJavaExceptionBreakpoint fSuspendOnErrorBreakpoint = null; 103 104 107 private static ILabelProvider fLabelProvider= DebugUITools.newDebugModelPresentation(); 108 109 113 private static final int ADDED = 0; 114 private static final int REMOVED = 1; 115 private static final int CHANGED = 2; 116 117 120 private String [] fActiveStepFilters = null; 121 122 127 private static Set fgDisplayOptions; 128 129 static { 130 fgDisplayOptions = new HashSet (); 131 fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_CHAR); 132 fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_HEX); 133 fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_UNSIGNED); 134 } 135 136 139 private boolean fActivated = false; 140 141 class InitJob extends Job { 142 143 public InitJob() { 144 super(DebugUIMessages.JavaDebugOptionsManager_0); 145 } 146 147 protected IStatus run(IProgressMonitor monitor) { 148 MultiStatus status = new MultiStatus(JDIDebugUIPlugin.getUniqueIdentifier(), IJavaDebugUIConstants.INTERNAL_ERROR, DebugUIMessages.JavaDebugOptionsManager_1, null); 149 try { 151 IJavaExceptionBreakpoint bp = JDIDebugModel.createExceptionBreakpoint(ResourcesPlugin.getWorkspace().getRoot(),"java.lang.Error", true, true, false, false, null); bp.setPersisted(false); 153 setSuspendOnCompilationErrorsBreakpoint(bp); 154 } catch (CoreException e) { 155 status.add(e.getStatus()); 156 } 157 158 try { 160 IJavaExceptionBreakpoint bp = JDIDebugModel.createExceptionBreakpoint(ResourcesPlugin.getWorkspace().getRoot(),"java.lang.Throwable", false, true, false, false, null); ((JavaExceptionBreakpoint)bp).setSuspendOnSubclasses(true); 162 bp.setPersisted(false); 163 setSuspendOnUncaughtExceptionBreakpoint(bp); 164 } catch (CoreException e) { 165 status.add(e.getStatus()); 166 } 167 168 if (status.getChildren().length == 0) { 169 return Status.OK_STATUS; 170 } 171 return status; 172 } 173 } 174 175 180 private JavaDebugOptionsManager() { 181 } 182 183 186 public static JavaDebugOptionsManager getDefault() { 187 if (fgOptionsManager == null) { 188 fgOptionsManager = new JavaDebugOptionsManager(); 189 } 190 return fgOptionsManager; 191 } 192 193 196 public void startup() { 197 DebugPlugin debugPlugin = DebugPlugin.getDefault(); 199 debugPlugin.getLaunchManager().addLaunchListener(this); 200 debugPlugin.getBreakpointManager().addBreakpointListener(this); 201 EvaluationContextManager.startup(); 202 } 203 204 207 public void shutdown() { 208 DebugPlugin debugPlugin = DebugPlugin.getDefault(); 209 debugPlugin.removeDebugEventListener(this); 210 debugPlugin.getLaunchManager().removeLaunchListener(this); 211 debugPlugin.getBreakpointManager().removeBreakpointListener(this); 212 if (!JDIDebugUIPlugin.getDefault().isShuttingDown()) { 213 JDIDebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this); 215 } 216 JDIDebugModel.removeJavaBreakpointListener(this); 217 JavaLogicalStructures.removeStructuresListener(this); 218 System.getProperties().remove(JDIDebugUIPlugin.getUniqueIdentifier() + ".debuggerActive"); } 220 221 225 protected void initializeProblemHandling() { 226 InitJob job = new InitJob(); 227 job.setSystem(true); 228 job.schedule(); 229 } 230 231 238 protected void notifyTargets(IBreakpoint breakpoint, int kind) { 239 IDebugTarget[] targets = DebugPlugin.getDefault().getLaunchManager().getDebugTargets(); 240 for (int i = 0; i < targets.length; i++) { 241 if (targets[i] instanceof IJavaDebugTarget) { 242 IJavaDebugTarget target = (IJavaDebugTarget)targets[i]; 243 notifyTarget(target, breakpoint, kind); 244 } 245 } 246 } 247 248 253 protected void notifyTargetOfFilters(IJavaDebugTarget target) { 254 255 IPreferenceStore store = JDIDebugUIPlugin.getDefault().getPreferenceStore(); 256 257 target.setFilterConstructors(store.getBoolean(IJDIPreferencesConstants.PREF_FILTER_CONSTRUCTORS)); 258 target.setFilterStaticInitializers(store.getBoolean(IJDIPreferencesConstants.PREF_FILTER_STATIC_INITIALIZERS)); 259 target.setFilterSynthetics(store.getBoolean(IJDIPreferencesConstants.PREF_FILTER_SYNTHETICS)); 260 if (target instanceof JDIDebugTarget) { 261 ((JDIDebugTarget)target).setStepThruFilters(store.getBoolean(IJDIPreferencesConstants.PREF_STEP_THRU_FILTERS)); 262 } 263 target.setStepFilters(getActiveStepFilters()); 264 265 } 266 267 270 protected void notifyTargetsOfFilters() { 271 IDebugTarget[] targets = DebugPlugin.getDefault().getLaunchManager().getDebugTargets(); 272 for (int i = 0; i < targets.length; i++) { 273 if (targets[i] instanceof IJavaDebugTarget) { 274 IJavaDebugTarget target = (IJavaDebugTarget)targets[i]; 275 notifyTargetOfFilters(target); 276 } 277 } 278 } 279 280 288 protected void notifyTarget(IJavaDebugTarget target, IBreakpoint breakpoint, int kind) { 289 switch (kind) { 290 case ADDED: 291 target.breakpointAdded(breakpoint); 292 break; 293 case REMOVED: 294 target.breakpointRemoved(breakpoint,null); 295 break; 296 case CHANGED: 297 target.breakpointChanged(breakpoint,null); 298 break; 299 } 300 } 301 302 305 public void propertyChange(PropertyChangeEvent event) { 306 String property = event.getProperty(); 307 if (property.equals(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS)) { 308 IBreakpoint breakpoint = getSuspendOnCompilationErrorBreakpoint(); 309 if (breakpoint != null) { 310 int kind = REMOVED; 311 if (isSuspendOnCompilationErrors()) { 312 kind = ADDED; 313 } 314 notifyTargets(breakpoint, kind); 315 } 316 } else if (property.equals(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS)) { 317 IBreakpoint breakpoint = getSuspendOnUncaughtExceptionBreakpoint(); 318 if (breakpoint != null) { 319 int kind = REMOVED; 320 if (isSuspendOnUncaughtExceptions()) { 321 kind = ADDED; 322 } 323 notifyTargets(breakpoint, kind); 324 } 325 } else if (fgDisplayOptions.contains(property)) { 326 variableViewSettingsChanged(); 327 } else if (isUseFilterProperty(property)) { 328 notifyTargetsOfFilters(); 329 } else if (isFilterListProperty(property)) { 330 updateActiveFilters(); 331 } 332 } 333 334 338 private boolean isUseFilterProperty(String property) { 339 return property.equals(IJDIPreferencesConstants.PREF_FILTER_CONSTRUCTORS) || 340 property.equals(IJDIPreferencesConstants.PREF_FILTER_STATIC_INITIALIZERS) || 341 property.equals(IJDIPreferencesConstants.PREF_FILTER_SYNTHETICS) || 342 property.equals(IJDIPreferencesConstants.PREF_STEP_THRU_FILTERS); 343 } 344 345 349 private boolean isFilterListProperty(String property) { 350 return property.equals(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST) || 351 property.equals(IJDIPreferencesConstants.PREF_INACTIVE_FILTERS_LIST); 352 } 353 354 361 protected void setEnabled(IBreakpoint breakpoint, boolean enabled) { 362 try { 363 breakpoint.setEnabled(enabled); 364 notifyTargets(breakpoint, CHANGED); 365 } catch (CoreException e) { 366 JDIDebugUIPlugin.log(e); 367 } 368 } 369 370 377 protected boolean isSuspendOnCompilationErrors() { 378 return JDIDebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS); 379 } 380 381 388 protected boolean isSuspendOnUncaughtExceptions() { 389 return JDIDebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS); 390 } 391 392 393 398 private void setSuspendOnUncaughtExceptionBreakpoint(IJavaExceptionBreakpoint breakpoint) { 399 fSuspendOnExceptionBreakpoint = breakpoint; 400 } 401 402 407 protected IJavaExceptionBreakpoint getSuspendOnUncaughtExceptionBreakpoint() { 408 return fSuspendOnExceptionBreakpoint; 409 } 410 411 417 private void setSuspendOnCompilationErrorsBreakpoint(IJavaExceptionBreakpoint breakpoint) { 418 fSuspendOnErrorBreakpoint = breakpoint; 419 } 420 421 427 protected IJavaExceptionBreakpoint getSuspendOnCompilationErrorBreakpoint() { 428 return fSuspendOnErrorBreakpoint; 429 } 430 431 436 public static String [] parseList(String listString) { 437 List list = new ArrayList (10); 438 StringTokenizer tokenizer = new StringTokenizer (listString, ","); while (tokenizer.hasMoreTokens()) { 440 String token = tokenizer.nextToken(); 441 list.add(token); 442 } 443 return (String [])list.toArray(new String [list.size()]); 444 } 445 446 453 public static String serializeList(String [] list) { 454 if (list == null) { 455 return ""; } 457 StringBuffer buffer = new StringBuffer (); 458 for (int i = 0; i < list.length; i++) { 459 if (i > 0) { 460 buffer.append(','); 461 } 462 buffer.append(list[i]); 463 } 464 return buffer.toString(); 465 } 466 467 472 protected String [] getActiveStepFilters() { 473 if (fActiveStepFilters == null) { 474 fActiveStepFilters= parseList(JDIDebugUIPlugin.getDefault().getPreferenceStore().getString(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST)); 475 JDIDebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this); 477 } 478 return fActiveStepFilters; 479 } 480 481 485 protected void updateActiveFilters() { 486 fActiveStepFilters= parseList(JDIDebugUIPlugin.getDefault().getPreferenceStore().getString(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST)); 487 notifyTargetsOfFilters(); 488 } 489 490 498 public void handleDebugEvents(DebugEvent[] events) { 499 for (int i = 0; i < events.length; i++) { 500 DebugEvent event = events[i]; 501 if (event.getKind() == DebugEvent.CREATE) { 502 Object source = event.getSource(); 503 if (source instanceof IJavaDebugTarget) { 504 IJavaDebugTarget javaTarget = (IJavaDebugTarget)source; 505 506 if (isSuspendOnCompilationErrors()) { 508 notifyTarget(javaTarget, getSuspendOnCompilationErrorBreakpoint(), ADDED); 509 } 510 511 if (isSuspendOnUncaughtExceptions()) { 513 ILaunchConfiguration launchConfiguration = javaTarget.getLaunch().getLaunchConfiguration(); 514 boolean isSnippetEditor = false; 515 516 try { 517 isSnippetEditor = (launchConfiguration.getAttribute(ScrapbookLauncher.SCRAPBOOK_LAUNCH, (String )null) != null); 518 } catch (CoreException e) { 519 } 520 521 if (!isSnippetEditor) { 522 notifyTarget(javaTarget, getSuspendOnUncaughtExceptionBreakpoint(), ADDED); 523 } 524 } 525 526 notifyTargetOfFilters(javaTarget); 528 } 529 } 530 } 531 } 532 533 536 public void addingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint) { 537 } 538 539 542 public int installingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint, IJavaType type) { 543 return DONT_CARE; 544 } 545 546 549 public int breakpointHit(IJavaThread thread, IJavaBreakpoint breakpoint) { 550 if (breakpoint == getSuspendOnCompilationErrorBreakpoint()) { 551 IJavaExceptionBreakpoint exception = (IJavaExceptionBreakpoint) breakpoint; 552 if (exception.getExceptionTypeName().equals("java.lang.Error")) { try { 556 return getProblem(thread) != null ? SUSPEND : DONT_SUSPEND; 557 } catch (DebugException e) { 558 JDIDebugUIPlugin.log(e); 559 return DONT_SUSPEND; 561 } 562 } 563 return DONT_SUSPEND; 564 } 565 if (breakpoint == getSuspendOnUncaughtExceptionBreakpoint()) { 566 if (!isSuspendOnCompilationErrors()) { 571 try { 572 if (getProblem(thread) != null) { 573 return DONT_SUSPEND; 574 } 575 } catch (DebugException e) { 576 JDIDebugUIPlugin.log(e); 577 } 579 } 580 return SUSPEND; 581 } 582 return DONT_CARE; 583 } 584 585 593 private IMarker getProblem(IJavaThread thread) throws DebugException { 594 IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame(); 595 if (frame != null) { 596 return getProblem(frame); 597 } 598 return null; 599 } 600 601 604 public void breakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint) { 605 } 606 607 610 public void breakpointRemoved(IJavaDebugTarget target, IJavaBreakpoint breakpoint) { 611 } 612 613 621 protected IMarker getProblem(IJavaStackFrame frame) { 622 ILaunch launch = frame.getLaunch(); 623 if (launch != null) { 624 ISourceLookupResult result = DebugUITools.lookupSource(frame, null); 625 Object sourceElement = result.getSourceElement(); 626 if (sourceElement instanceof IResource) { 627 try { 628 IResource resource = (IResource) sourceElement; 629 IMarker[] markers = resource.findMarkers("org.eclipse.jdt.core.problem", true, IResource.DEPTH_INFINITE); int line = frame.getLineNumber(); 631 for (int i = 0; i < markers.length; i++) { 632 IMarker marker = markers[i]; 633 if (marker.getAttribute(IMarker.LINE_NUMBER, -1) == line && marker.getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR) { 634 return marker; 635 } 636 } 637 } catch (CoreException e) { 638 } 639 } 640 } 641 return null; 642 } 643 644 647 public void breakpointHasRuntimeException(final IJavaLineBreakpoint breakpoint, final DebugException exception) { 648 IStatus status; 649 Throwable wrappedException= exception.getStatus().getException(); 650 if (wrappedException instanceof InvocationException) { 651 InvocationException ie= (InvocationException) wrappedException; 652 ObjectReference ref= ie.exception(); 653 status= new Status(IStatus.ERROR,JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, ref.referenceType().name(), null); 654 } else { 655 status= exception.getStatus(); 656 } 657 openConditionErrorDialog(breakpoint, DebugUIMessages.JavaDebugOptionsManager_Conditional_breakpoint_encountered_runtime_exception__1, status); 658 } 659 660 663 public void breakpointHasCompilationErrors(final IJavaLineBreakpoint breakpoint, final Message[] errors) { 664 StringBuffer message= new StringBuffer (); 665 Message error; 666 for (int i=0, numErrors= errors.length; i < numErrors; i++) { 667 error= errors[i]; 668 message.append(error.getMessage()); 669 message.append("\n "); } 671 IStatus status= new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, message.toString(), null); 672 openConditionErrorDialog(breakpoint, DebugUIMessages.JavaDebugOptionsManager_Conditional_breakpoint_has_compilation_error_s___2, status); 673 } 674 675 private void openConditionErrorDialog(final IJavaLineBreakpoint breakpoint, final String errorMessage, final IStatus status) { 676 final Display display= JDIDebugUIPlugin.getStandardDisplay(); 677 if (display.isDisposed()) { 678 return; 679 } 680 final String message= MessageFormat.format(errorMessage, new String [] {fLabelProvider.getText(breakpoint)}); 681 display.asyncExec(new Runnable () { 682 public void run() { 683 if (display.isDisposed()) { 684 return; 685 } 686 Shell shell= JDIDebugUIPlugin.getActiveWorkbenchShell(); 687 ConditionalBreakpointErrorDialog dialog= new ConditionalBreakpointErrorDialog(shell, message, status); 688 int result = dialog.open(); 689 if (result == Window.OK) { 690 JavaBreakpointPropertiesAction action= new JavaBreakpointPropertiesAction(); 691 action.selectionChanged(null, new StructuredSelection(breakpoint)); 692 action.run(null); 693 } 694 } 695 }); 696 } 697 698 706 private void activate() { 707 if (fActivated) { 708 return; 709 } 710 fActivated = true; 711 initializeProblemHandling(); 712 notifyTargetsOfFilters(); 713 DebugPlugin.getDefault().addDebugEventListener(this); 714 JDIDebugModel.addJavaBreakpointListener(this); 715 JavaLogicalStructures.addStructuresListener(this); 716 } 717 718 723 public void launchAdded(ILaunch launch) { 724 launchChanged(launch); 725 } 726 729 public void launchChanged(ILaunch launch) { 730 activate(); 731 DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); 732 } 733 734 737 public void launchRemoved(ILaunch launch) { 738 } 739 740 745 public void breakpointsAdded(final IBreakpoint[] breakpoints) { 746 List update = new ArrayList (); 748 for (int i = 0; i < breakpoints.length; i++) { 749 IBreakpoint breakpoint = breakpoints[i]; 750 try { 751 if (breakpoint instanceof IJavaBreakpoint && breakpoint.getMarker().getAttribute(IMarker.MESSAGE) == null) { 752 update.add(breakpoint); 753 } 754 } catch (CoreException e) { 755 JDIDebugUIPlugin.log(e); 756 } 757 } 758 if (!update.isEmpty()) { 759 updateBreakpointMessages((IBreakpoint[])update.toArray(new IBreakpoint[update.size()])); 760 } 761 } 762 763 768 private void updateBreakpointMessages(final IBreakpoint[] breakpoints) { 769 IWorkspaceRunnable runnable = new IWorkspaceRunnable() { 770 public void run(IProgressMonitor monitor) throws CoreException { 771 for (int i = 0; i < breakpoints.length; i++) { 772 IBreakpoint breakpoint = breakpoints[i]; 773 if (breakpoint instanceof IJavaBreakpoint) { 774 String info = fLabelProvider.getText(breakpoint); 775 String type = DebugUIMessages.JavaDebugOptionsManager_Breakpoint___1; 776 if (breakpoint instanceof IJavaMethodBreakpoint || breakpoint instanceof IJavaMethodEntryBreakpoint) { 777 type = DebugUIMessages.JavaDebugOptionsManager_Method_breakpoint___2; 778 } else if (breakpoint instanceof IJavaWatchpoint) { 779 type = DebugUIMessages.JavaDebugOptionsManager_Watchpoint___3; 780 } else if (breakpoint instanceof IJavaLineBreakpoint) { 781 type = DebugUIMessages.JavaDebugOptionsManager_Line_breakpoint___4; 782 } 783 breakpoint.getMarker().setAttribute(IMarker.MESSAGE, type + info); 784 } 785 } 786 } 787 }; 788 try { 789 ResourcesPlugin.getWorkspace().run(runnable, null, 0, null); 790 } catch (CoreException e) { 791 JDIDebugUIPlugin.log(e); 792 } 793 } 794 795 800 public void breakpointsChanged( 801 IBreakpoint[] breakpoints, 802 IMarkerDelta[] deltas) { 803 updateBreakpointMessages(breakpoints); 804 805 } 806 807 810 public void breakpointsRemoved( 811 IBreakpoint[] breakpoints, 812 IMarkerDelta[] deltas) { 813 } 814 815 818 public void logicalStructuresChanged() { 819 variableViewSettingsChanged(); 820 } 821 822 826 protected void variableViewSettingsChanged() { 827 IAdaptable selected = DebugUITools.getDebugContext(); 830 if (selected != null) { 831 IJavaStackFrame frame= (IJavaStackFrame) selected.getAdapter(IJavaStackFrame.class); 832 if (frame != null) { 833 DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] { 834 new DebugEvent(frame, DebugEvent.CHANGE) 835 }); 836 } 837 } 838 } 839 840 } 841 | Popular Tags |