Examples of ISelectionListener


Examples of org.eclipse.ui.ISelectionListener

        }
        // pass the selection to the page
        IPage page = getCurrentPage(); // We are expecting a FeaturePanelPage
                                       // here
        if (page != null && page instanceof ISelectionListener) {
            ISelectionListener notifyPage = (ISelectionListener) page;
            notifyPage.selectionChanged(part, editSelection);
        }
    }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

    parent.setLayout(new FillLayout());

    parentComposite = new Composite(parent, SWT.NONE);
    parentComposite.setLayout(new FillLayout());

    selectionServiceListener = new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart sourcepart,
          ISelection selection) {
       
        if (sourcepart instanceof QUARCModelElementEditor && ((QUARCModelElementEditor)sourcepart).getModelElement() instanceof SelectedGoalsPriorities) {
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

   
    txtServerName = createLabelAndText(serverInformation, "Server Name");
    txtServerAddress = createLabelAndText(serverInformation,"Server Address");
    txtMapName = createLabelAndText(serverInformation,"Map Name");
   
    getSite().getPage().addSelectionListener(ServerBrowserView.VIEW_ID, new ISelectionListener() {
      public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        IStructuredSelection sel = (IStructuredSelection)selection;
        if(sel.getFirstElement() instanceof GameServer) {
          GameServer server = (GameServer)sel.getFirstElement();
          ServerDetailsView.this.gameServer = server;
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

        .addPostSelectionListener(getSelectionListener());
  }

  private ISelectionListener getSelectionListener() {
    if (_selListener == null){
      _selListener = new ISelectionListener() {
        public void selectionChanged(IWorkbenchPart part,
            ISelection selection) {
          if (getEditor() == part)//only fire if the selection applies to this tabbed prop sheet instance
            WPETabbedPropertySheetPage.this.selectionChanged(
              part, selection);
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     * Actions according to the selection.
     */
    private void registerUpdateActions()
    {
        // Handling selection of the Browser View to enable/disable the Actions
        view.getSite().getPage().addSelectionListener( new ISelectionListener()
        {
            /**
             * {@inheritDoc}
             */
            public void selectionChanged( IWorkbenchPart part, ISelection selection )
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     * @param sel the selection or <code>null</code> if no active selection
     */
    protected void fireSelection(final IWorkbenchPart part, final ISelection sel) {
        Object[] array = listeners.getListeners();
        for (int i = 0; i < array.length; i++) {
            final ISelectionListener l = (ISelectionListener) array[i];
            if ((part != null && sel != null)
                    || l instanceof INullSelectionListener) {
               
                try {
                    l.selectionChanged(part, sel);
                } catch (Exception e) {
                    WorkbenchPlugin.log(e);
                }
            }
        }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     */
    protected void firePostSelection(final IWorkbenchPart part,
            final ISelection sel) {
        Object[] array = postListeners.getListeners();
        for (int i = 0; i < array.length; i++) {
            final ISelectionListener l = (ISelectionListener) array[i];
            if ((part != null && sel != null)
                    || l instanceof INullSelectionListener) {
               
                try {
                    l.selectionChanged(part, sel);
                } catch (Exception e) {
                    WorkbenchPlugin.log(e);
                }
            }
        }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

     * function to fail quietly, so we just don't set the already installed
     * flag true until after it is successful
     */
    ISelectionService selectionService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
    final IHandler handler = this;
    selectionService.addSelectionListener(new ISelectionListener() {
      @Override
      public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        fireHandlerChanged(new HandlerEvent(handler, true, false));
      }
    });
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

        }
        if (view instanceof IMarkerSelectionHandler) {
            IMarkerSelectionHandler handler = (IMarkerSelectionHandler) view;
            handler.markerSelected(source, marker);
        } else if (DETAILS_VIEW_ID.equals(viewId) && view instanceof ISelectionListener) {
            ISelectionListener listener = (ISelectionListener) view;
            listener.selectionChanged(source, new StructuredSelection(marker));
        }
    }
View Full Code Here

Examples of org.eclipse.ui.ISelectionListener

  public RedmineUiPlugin() {
    super();
   
    isEclipseVersionLesserThan37 = Platform.getBundle("org.eclipse.core.runtime").getVersion().compareTo(new Version(3, 7, 0)) < 0;
   
    taskListSelectionListener = new ISelectionListener() {
      @Override
      public void selectionChanged(IWorkbenchPart arg0, ISelection arg1) {
        if (arg1 instanceof IStructuredSelection) {
          IStructuredSelection selection = (IStructuredSelection)arg1;
          taskListSelection = selection.isEmpty() ? null : selection;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.