Examples of addListener()


Examples of org.eclipse.team.core.subscribers.Subscriber.addListener()

        if (log.isTraceEnabled()) {
            RepositoryProvider provider = RepositoryProvider
                .getProvider(project);
            Subscriber subscriber = provider.getSubscriber();
            if (subscriber != null)
                subscriber.addListener(subscriberChangeListener);
            else
                log.error("Could not add this SharedProject as an ISubscriberChangeListener."); //$NON-NLS-1$
        }
        Set<IPath> paths = resourceMap.keySet();
        for (IPath path : paths) {
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ScrolledForm.addListener()

    // gets a scroll bar.
    // When in the life cycle to do this? Only need to do it once, but
    // after the Grid Layout has happened. This can be the first resizing
    // event (learned this by debugging)

    sform.addListener(SWT.Resize, new Listener() {
      public void handleEvent(Event event) {
        float col1CurrentWidth = leftPanel.getSize().x;
        float col2CurrentWidth = rightPanel.getSize().x;
        final int minLeftPanelWidth = 250; // in pels
        final int minRightPanelWidth = (int) (col2CurrentWidth * minLeftPanelWidth / col1CurrentWidth);
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.BroadcastSupport.addListener()

  public FileContextDescriptionSupport(ObjectInfo object) {
    m_object = object;
    m_gwtState = ((IGwtStateProvider) object).getState();
    BroadcastSupport broadcastSupport = m_object.getBroadcastSupport();
    // add IFile based context descriptions
    broadcastSupport.addListener(null, new StylePropertyEditorListener() {
      @Override
      public void addContextDescriptions(ObjectInfo object, List<ContextDescription> contexts)
          throws Exception {
        addFileContextDesccriptions(contexts);
      }
View Full Code Here

Examples of org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapterFactory.addListener()

    }

    if ((newInput != null) && (newInput instanceof IDOMNode)) {
      IJFaceNodeAdapterFactory factory = (IJFaceNodeAdapterFactory) ((IDOMNode) newInput).getModel().getFactoryRegistry().getFactoryFor(IJFaceNodeAdapter.class);
      if (factory != null) {
        factory.addListener(viewer);
      }
    }

    if (newInput != null) {
      Document domDoc = (Document) newInput;
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager.addListener()

            ModelQuery query = ModelQueryUtil.getModelQuery(((Node) selectedObjects[i]).getOwnerDocument());
            if (query != null) {
              CMDocumentManager mgr = query.getCMDocumentManager();
              if (mgr != null) {
                managers.add(mgr);
                mgr.addListener(fCMDocumentManagerListener);
              }
            }
          }
          /*
           * Add UI refresh adapters and remember notifiers for
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache.addListener()

    }
    if (cache.getStatus(siStreamUri) == CMDocumentCache.STATUS_LOADED) {
      latch.countDown();
    }

    cache.addListener(new CMDocumentCacheListener() {

      public void cacheUpdated(CMDocumentCache cache, String uri, int oldStatus, int newStatus,
          CMDocument cmDocument) {
        if (newStatus == CMDocumentCache.STATUS_LOADED && oldStatus != CMDocumentCache.STATUS_LOADED) {
          if (uri.equals(siUri) || uri.equals(siJmsUri) || uri.equals(siStreamUri)) {
View Full Code Here

Examples of org.elasticsearch.common.netty.channel.ChannelFuture.addListener()

                        }
                    }
                }
                ChannelFuture future = channel.write(writeBuffer);
                if (releaseContentListener != null) {
                    future.addListener(releaseContentListener);
                }
            } catch (Exception e) {
                throw new MemcachedTransportException("Failed to write response", e);
            }
        } else {
View Full Code Here

Examples of org.elasticsearch.discovery.zen.fd.MasterFaultDetection.addListener()

        masterFD.start(nodeB, "test");

        final String[] failureReason = new String[1];
        final DiscoveryNode[] failureNode = new DiscoveryNode[1];
        final CountDownLatch notified = new CountDownLatch(1);
        masterFD.addListener(new MasterFaultDetection.Listener() {

            @Override
            public void onMasterFailure(DiscoveryNode masterNode, String reason) {
                failureNode[0] = masterNode;
                failureReason[0] = reason;
View Full Code Here

Examples of org.elasticsearch.discovery.zen.fd.NodesFaultDetection.addListener()

        nodesFD.setLocalNode(clusterState.nodes().localNode());
        nodesFD.updateNodesAndPing(clusterState);
        final String[] failureReason = new String[1];
        final DiscoveryNode[] failureNode = new DiscoveryNode[1];
        final CountDownLatch notified = new CountDownLatch(1);
        nodesFD.addListener(new NodesFaultDetection.Listener() {
            @Override
            public void onNodeFailure(DiscoveryNode node, String reason) {
                failureNode[0] = node;
                failureReason[0] = reason;
                notified.countDown();
View Full Code Here

Examples of org.elasticsearch.index.merge.scheduler.ConcurrentMergeSchedulerProvider.addListener()

    @Test
    public void testSegmentsWithMergeFlag() throws Exception {
        ConcurrentMergeSchedulerProvider mergeSchedulerProvider = new ConcurrentMergeSchedulerProvider(shardId, EMPTY_SETTINGS, threadPool, new IndexSettingsService(shardId.index(), EMPTY_SETTINGS));
        final AtomicReference<CountDownLatch> waitTillMerge = new AtomicReference<>();
        final AtomicReference<CountDownLatch> waitForMerge = new AtomicReference<>();
        mergeSchedulerProvider.addListener(new MergeSchedulerProvider.Listener() {
            @Override
            public void beforeMerge(OnGoingMerge merge) {
                try {
                    if (waitTillMerge.get() != null) {
                        waitTillMerge.get().countDown();
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.