Exemple #1
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;
 }
Exemple #2
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;
 }