本文整理匯總了Java中org.eclipse.ui.IViewPart.getSite方法的典型用法代碼示例。如果您正苦於以下問題:Java IViewPart.getSite方法的具體用法?Java IViewPart.getSite怎麽用?Java IViewPart.getSite使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.IViewPart
的用法示例。
在下文中一共展示了IViewPart.getSite方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: JavaActionsGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
public JavaActionsGroup(final IViewPart view, ISelectionProvider selProvider) {
super();
final IStructuredSelection selection1 = getRealSelection((IStructuredSelection) selProvider
.getSelection());
copyQualifiedNameAction = new CopyQualifiedNameAction(view.getSite());
copyQualifiedNameAction.setActionDefinitionId(CopyQualifiedNameAction.ACTION_DEFINITION_ID);
copyQualifiedNameAction.setSpecialSelectionProvider(selProvider);
copyQualifiedNameAction.update(selection1);
selProvider.addSelectionChangedListener(copyQualifiedNameAction);
}
示例2: runInUIThread
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
IViewPart webAppView = page.findView(WebAppLaunchView.ID);
if (webAppView == null) {
try {
webAppView = page.showView(WebAppLaunchView.ID);
} catch (PartInitException e) {
return StatusUtilities.newErrorStatus(e, Activator.PLUGIN_ID);
}
}
if (webAppView != null) {
synchronized(boldingLock) {
if (bolding) {
if (webAppView.getSite() != null) {
IWorkbenchSiteProgressService service =
(IWorkbenchSiteProgressService) webAppView.getSite().getAdapter(
IWorkbenchSiteProgressService.class);
if (service != null) {
service.warnOfContentChange();
}
}
} else {
page.bringToTop(webAppView);
}
}
}
}
}
return Status.OK_STATUS;
}
示例3: RefactorActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>RefactorActionGroup</code>. The group requires
* that the selection provided by the part's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public RefactorActionGroup(IViewPart part) {
this(part.getSite(), null);
IUndoContext workspaceContext= (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
fUndoRedoActionGroup= new UndoRedoActionGroup(part.getViewSite(), workspaceContext, true);
installQuickAccessAction();
}
示例4: init
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
@Override
public void init ( final IViewPart view )
{
this.site = view.getSite ();
}
示例5: RefreshableViewRefreshAction
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
public RefreshableViewRefreshAction(IViewPart part) {
super(part.getSite());
fPart= part;
}
示例6: OpenEditorActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>OpenActionGroup</code>. The group requires that the
* selection provided by the part's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part
* the view part that owns this action group
*/
public OpenEditorActionGroup(IViewPart part) {
fSite = part.getSite();
fOpen = new OpenAction(fSite);
fOpen.setActionDefinitionId(OPEN_EDITOR); // IJavaEditorActionDefinitionIds.OPEN_EDITOR);
initialize(fSite.getSelectionProvider());
}
示例7: GWTOpenEditorActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>GWTOpenEditorActionGroup</code>. The group requires
* that the selection provided by the part's selection provider is of type
* <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public GWTOpenEditorActionGroup(IViewPart part) {
site = part.getSite();
openAction = new GWTOpenAction(site);
openAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR);
initialize(site.getSelectionProvider());
}
示例8: N4JSProjectActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new {@code N4JSProjectActionGroup}. The group requires that the selection provided by the site's
* selection provider is of type {@link IStructuredSelection}.
*
* @param part
* the view part that owns this action group
*/
public N4JSProjectActionGroup(final IViewPart part) {
this(part.getSite(), part.getSite().getSelectionProvider());
}
示例9: OpenEditorActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>OpenActionGroup</code>. The group requires
* that the selection provided by the part's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public OpenEditorActionGroup(IViewPart part) {
this(part.getSite(), null);
}
示例10: ProjectActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>ProjectActionGroup</code>. The group requires
* that the selection provided by the site's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public ProjectActionGroup(IViewPart part) {
this(part.getSite(), part.getSite().getSelectionProvider());
}
示例11: GenerateBuildPathActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the part's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public GenerateBuildPathActionGroup(IViewPart part) {
this(part.getSite(), part.getSite().getSelectionProvider());
}
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion-Juno38,代碼行數:11,代碼來源:GenerateBuildPathActionGroup.java
示例12: CCPActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>CCPActionGroup</code>. The group requires that
* the selection provided by the view part's selection provider is of type
* <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public CCPActionGroup(IViewPart part) {
this(part.getSite(), null, false);
}
示例13: FindOccurrencesInFileAction
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>FindOccurrencesInFileAction</code>. The action requires
* that the selection provided by the view part's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the part providing context information for this action
*/
public FindOccurrencesInFileAction(IViewPart part) {
this(part.getSite());
}
示例14: GenerateActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the part's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public GenerateActionGroup(IViewPart part) {
this(part.getSite(), null);
installQuickAccessAction();
}
示例15: ShowActionGroup
import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
/**
* Creates a new <code>ShowActionGroup</code>. The action requires
* that the selection provided by the part's selection provider is of type
* <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public ShowActionGroup(IViewPart part) {
this(part.getSite());
fIsPackageExplorer= part instanceof PackageExplorerPart;
}