1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.core.runtime.IConfigurationElement; 14 import org.eclipse.ui.IViewPart; 15 import org.eclipse.ui.IViewReference; 16 import org.eclipse.ui.IViewSite; 17 import org.eclipse.ui.internal.util.Util; 18 import org.eclipse.ui.views.IViewDescriptor; 19 20 23 public class ViewSite extends PartSite implements IViewSite { 24 25 public ViewSite(IViewReference ref, IViewPart view, WorkbenchPage page, 26 String id, String pluginId, String registeredName) { 27 28 super(ref, view, page); 29 30 setId(id); 31 setRegisteredName(registeredName); 32 setPluginId(pluginId); 33 } 34 35 38 public ViewSite(IViewReference ref, IViewPart view, WorkbenchPage page, 39 IViewDescriptor desc) { 40 super(ref, view, page); 41 setConfigurationElement((IConfigurationElement) Util.getAdapter(desc, IConfigurationElement.class)); 42 } 43 44 47 public String getSecondaryId() { 48 return ((IViewReference) getPartReference()).getSecondaryId(); 49 } 50 51 54 public IViewPart getViewPart() { 55 return (IViewPart) getPart(); 56 } 57 } 58 | Popular Tags |