コード例 #1
0
 private String getPrefId() {
   // constructs id based on memory view's secondary id + the rendering view pane id
   // format:  secondaryId:viewPaneId
   StringBuffer id = new StringBuffer();
   IMemoryRenderingSite renderingSite = fViewPane.getMemoryRenderingSite();
   IWorkbenchPartSite ps = renderingSite.getSite();
   if (ps instanceof IViewSite) {
     IViewSite vs = (IViewSite) ps;
     String secondaryId = vs.getSecondaryId();
     if (secondaryId != null) {
       id.append(secondaryId);
       id.append(":"); // $NON-NLS-1$
     }
   }
   id.append(fViewPane.getId());
   String prefId = id.toString();
   return prefId;
 }
コード例 #2
0
 /** @return secondary id, or null if not available */
 private String getViewSiteSecondaryId() {
   IMemoryRenderingSite renderingSite = fViewPane.getMemoryRenderingSite();
   IWorkbenchPartSite ps = renderingSite.getSite();
   if (ps instanceof IViewSite) {
     IViewSite vs = (IViewSite) ps;
     String secondaryId = vs.getSecondaryId();
     return secondaryId;
   }
   return null;
 }
コード例 #3
0
  public void handleDebugEvent(DebugEvent event) {
    Object obj = event.getSource();
    IDebugTarget dt = null;

    if (event.getKind() == DebugEvent.TERMINATE) {
      // a terminate event could happen from an IThread or IDebugTarget
      // Only handle terminate event from debug target
      if (obj instanceof IDebugTarget) {
        dt = ((IDebugTarget) obj);

        // returns empty array if dt == null
        IMemoryRendering[] deletedrendering = getRenderingsFromDebugTarget(dt);

        for (int i = 0; i < deletedrendering.length; i++) {
          removeMemoryBlockRendering(
              deletedrendering[i].getMemoryBlock(), deletedrendering[i].getRenderingId());
          fViewPane.removeMemoryRendering(deletedrendering[i]);
        }
      }
    }
  }