Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchSite


                final IFile file = input.getFile();
                final IProject project = file.getProject();
                return Lists.newArrayList(project);
            }
        } else {
            final IWorkbenchSite site = getSite();
            final ISelection selection = site.getSelectionProvider().getSelection();
            if (selection instanceof IStructuredSelection) {
                final IStructuredSelection ss = (IStructuredSelection) selection;
                final Collection<IProject> result = Sets.newHashSet();
                for (final Object element : ss.toList()) {
                    if (element instanceof IErlElement) {
View Full Code Here


        UIText.GitActionContributor_Push, configuration);
    pushAction.setImageDescriptor(PUSH);
    appendToGroup(P_TOOLBAR_MENU, SYNCHRONIZE_GROUP, pushAction);

    ISynchronizePageSite site = configuration.getSite();
    IWorkbenchSite ws = site.getWorkbenchSite();
    openWorkingFileAction = new OpenWorkingFileAction(ws.getWorkbenchWindow()
      .getActivePage());

    site.getSelectionProvider().addSelectionChangedListener(
        openWorkingFileAction);
View Full Code Here

   * @param delete
   *            if <code>true</code>, the repository will be deleted from disk
   */
  protected void removeRepository(final ExecutionEvent event,
      final boolean delete) {
    IWorkbenchSite activeSite = HandlerUtil.getActiveSite(event);
    IWorkbenchSiteProgressService service = CommonUtils.getService(activeSite, IWorkbenchSiteProgressService.class);

    // get selected nodes
    final List<RepositoryNode> selectedNodes;
    try {
View Full Code Here

        }

        return Status.OK_STATUS;
      }
    };
    IWorkbenchSite activeSite = HandlerUtil.getActiveSite(event);
    IWorkbenchSiteProgressService service = CommonUtils.getService(activeSite, IWorkbenchSiteProgressService.class);
    service.schedule(job);

    return null;
  }
View Full Code Here

      public Object execute(ExecutionEvent event) throws ExecutionException {
        IWorkbenchPart part = HandlerUtil.getActivePart(event);
        if (part == null) {
          return null;
        }
        IWorkbenchSite site = part.getSite();
        if (site == null) {
          return null;
        }
        ISelectionProvider provider = site.getSelectionProvider();
        if (provider == null) {
          return null;
        }
        ISelection selection = provider.getSelection();
        if (selection instanceof IStructuredSelection) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchSite

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.