當前位置: 首頁>>代碼示例>>Java>>正文


Java IViewPart.getSite方法代碼示例

本文整理匯總了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);
}
 
開發者ID:iloveeclipse,項目名稱:datahierarchy,代碼行數:13,代碼來源:JavaActionsGroup.java

示例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;
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:36,代碼來源:WebAppLaunchViewActivator.java

示例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();
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:16,代碼來源:RefactorActionGroup.java

示例4: init

import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
@Override
public void init ( final IViewPart view )
{
    this.site = view.getSite ();
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:6,代碼來源:WriteAttributesOperationAction.java

示例5: RefreshableViewRefreshAction

import org.eclipse.ui.IViewPart; //導入方法依賴的package包/類
public RefreshableViewRefreshAction(IViewPart part) {
	super(part.getSite());
	fPart= part;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:5,代碼來源:BuildActionGroup.java

示例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());
}
 
開發者ID:angelozerr,項目名稱:jsbuild-eclipse,代碼行數:15,代碼來源:OpenEditorActionGroup.java

示例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());
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:14,代碼來源:GWTOpenEditorActionGroup.java

示例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());
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:11,代碼來源:N4JSProjectActionGroup.java

示例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);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:11,代碼來源:OpenEditorActionGroup.java

示例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());
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:11,代碼來源:ProjectActionGroup.java

示例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);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:11,代碼來源:CCPActionGroup.java

示例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());
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:11,代碼來源:FindOccurrencesInFileAction.java

示例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();
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:13,代碼來源:GenerateActionGroup.java

示例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;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:12,代碼來源:ShowActionGroup.java


注:本文中的org.eclipse.ui.IViewPart.getSite方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。