Package org.eclipse.emf.common.notify

Examples of org.eclipse.emf.common.notify.Adapter


            NotificationFilter
                .createEventTypeFilter(Notification.ADD)).and(
            NotificationFilter.createFeatureFilter(
                ResourceSet.class,
                ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here


            }
        };
        mainmap.getContextModel().eAdapters().add(contextListener);
       
        //add a deep listener to listen to layer hide/show events
        Adapter layerVisibilityAdapter = new AdapterImpl(){
            @SuppressWarnings("unchecked")
            public void notifyChanged( final Notification msg ) {
                if (msg.getNotifier() instanceof Layer && msg.getFeatureID(Layer.class) == ProjectPackage.LAYER__VISIBLE) {
                    if (msg.getNewBooleanValue() != msg.getOldBooleanValue()){
                        // mapviewer needs refreshing
View Full Code Here

                    SynchronizedEList adapters = (SynchronizedEList) map.getContextModel()
                            .eAdapters();
                    adapters.lock();
                    try {
                        for( Iterator<Adapter> iter = adapters.iterator(); iter.hasNext(); ) {
                            Adapter next = iter.next();
                            if (next instanceof ContextModelItemProvider
                                    && ((ContextModelItemProvider) next).getAdapterFactory() == getAdapterFactory())
                                found = true;
                        }
                    } finally {
View Full Code Here

                    SynchronizedEList adapters = (SynchronizedEList) map.getContextModel()
                            .eAdapters();
                    adapters.lock();
                    try {
                        for (Iterator<Adapter> iter = adapters.iterator(); iter.hasNext();) {
                            Adapter next = iter.next();
                            if (next instanceof ContextModelItemProvider
                                    && ((ContextModelItemProvider) next).getAdapterFactory() == getAdapterFactory())
                                found = true;
                        }
                    } finally {
View Full Code Here

                ((SynchronizedEList) adapters).lock();
            }
            try {
                ArrayList<Adapter> toRemove = new ArrayList<Adapter>();
                for (Iterator<Adapter> iter = adapters.iterator(); iter.hasNext();) {
                    Adapter t = iter.next();
                    if (t instanceof RenderExecutorImpl.LayerListener) {
                        //                        iter.remove();
                        //iter.remove() doesn't seem to work here; nothing gets removed.
                        toRemove.add(t);
                    }
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    void setActiveTool( MapPart editor ) {
        // ensure we are listening to this MapPart's Map
        Map map = editor.getMap();
        Adapter listener = getCommandListener(editor);
        if (!map.eAdapters().contains(listener)){
            map.eAdapters().add(listener);
        }
       
        // Define the tool context allowing tools to interact with this map
View Full Code Here

     */
    public static IDOMNode getDomNode(EObject eObj)
    {
        for (Iterator it = eObj.eAdapters().iterator(); it.hasNext();)
        {
            Adapter adapter = (Adapter) it.next();
           
            if (adapter instanceof EMF2DOMSSEAdapter)
            {
                final EMF2DOMSSEAdapter sseAdapter = (EMF2DOMSSEAdapter) adapter;
                final Node node = sseAdapter.getNode();
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

            NotificationFilter
                .createEventTypeFilter(Notification.ADD)).and(
            NotificationFilter.createFeatureFilter(
                ResourceSet.class,
                ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.notify.Adapter

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.