Package org.eclipse.ui

Examples of org.eclipse.ui.ISelectionListener


    browser = new Browser(contentPanel, SWT.NONE);
    // Some day I will regret this, but it's currently the only way to have clickable links in the alert viewer
    browser.setJavascriptEnabled(true);
    linkClick = new LinkHandler(browser, getSite());
   
    getSite().getPage().addSelectionListener(new ISelectionListener() {

      @Override
      public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        if(!(selection instanceof IStructuredSelection))
          return;
View Full Code Here


    form.setWeights(new int[] {40, 60});
    parent.pack();
   
    final ISelectionService ss = getSite().getWorkbenchWindow().getSelectionService();
    final IModel model = Activator.getDefault().getModel();
    final ISelectionListener listener = new WebEntitySelectionListener(model, getViewSite().getSecondaryId());
    ss.addSelectionListener(listener);
   
    workspaceListener = new IEventHandler() {

      @Override
View Full Code Here

  @Override
  public void setInput(IWorkbenchPart part, ISelection selection) {
    this.part = part;
    this.selection = selection;
    if (page instanceof ISelectionListener) {
      ISelectionListener sl = (ISelectionListener) page;
      sl.selectionChanged(part, selection);
    }
  }
View Full Code Here

  }

  @Override
  public void aboutToBeShown() {
    if (page instanceof ISelectionListener) {
      ISelectionListener sl = (ISelectionListener) page;
      sl.selectionChanged(part, selection);
    }
    try {
      if (page instanceof ViewPropertySheetPage) {
        ViewPropertySheetPage sheetPage = (ViewPropertySheetPage) page;
        IViewPage viewPage = sheetPage.getView();
View Full Code Here

  @Override
  public void selectionChanged(IWorkbenchPart part, ISelection selection) {
    FormSupport form = getForm();
    if (form instanceof ISelectionListener) {
      ISelectionListener listener = (ISelectionListener) form;
      listener.selectionChanged(part, selection);
    }
  }
View Full Code Here

  @Override
  public void init(IViewSite site) throws PartInitException {
    super.init(site);

    if (site != null) {
      site.getWorkbenchWindow().getSelectionService().addSelectionListener(new ISelectionListener() {

        @Override
        public void selectionChanged(IWorkbenchPart part, ISelection selection) {
          // we only want to process selection change events from few selected sources...so filtering here
          if (!isRelevantSelectionSource(part, selection)) {
View Full Code Here

    public RunTestViewComposite getRunTestComposite() {
        return runTestComposite;
    }

    private void setSelectionListener() {
        fPostSelectionListener = new ISelectionListener() {
            public void selectionChanged(IWorkbenchPart part, ISelection selection) {
                project = getProjectService().getProject(selection);
                if (selection instanceof IStructuredSelection) {
                    IStructuredSelection ss = (IStructuredSelection) selection;
                    Object selElement = ss.getFirstElement();
View Full Code Here

          walk.release();
        }
      }
    };

    selectionChangedListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part,
          ISelection selection) {
        if (part instanceof IEditorPart) {
          IEditorInput input = ((IEditorPart) part).getEditorInput();
          if (input instanceof IFileEditorInput)
View Full Code Here

    setupRepositoryViewSelectionChangeListener();
    refreshUI();
  }

  private void setupRepositoryViewSelectionChangeListener() {
    selectionChangedListener = new ISelectionListener() {

      public void selectionChanged(IWorkbenchPart part,
          ISelection selection) {
        if (!listenOnRepositoryViewSelection
            || part == getSite().getPart())
View Full Code Here

      }
    });
    enableAutoExpand(stagedViewer);
    addListenerToDisableAutoExpandOnCollapse(stagedViewer);

    selectionChangedListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part,
          ISelection selection) {
        if (!reactOnSelection || part == getSite().getPart())
          return;
View Full Code Here

TOP

Related Classes of org.eclipse.ui.ISelectionListener

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.