Package org.apache.uima.caseditor.core.model.delta

Examples of org.apache.uima.caseditor.core.model.delta.AbstractResourceDelta


            // add the nlp project
            delta.setKind(Kind.ADDED);
            mEventDispatcher.notify(delta.getKind(), delta);

            // remove the old resource project
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }

              @Override
              public int getKind() {
                return IResourceDelta.REMOVED;
              }

              @Override
              public IPath getFullPath() {
                return resourceDelta.getFullPath();
              }

              @Override
              public IPath getProjectRelativePath() {
                return resourceDelta.getProjectRelativePath();
              }

              @Override
              public IResourceDelta[] getAffectedChildren() {
                return new IResourceDelta[] {};
              }
            };

            NlpModelDeltaImpl removeProjectDelta = new NlpModelDeltaImpl((NlpModelDeltaImpl) delta
                    .getParent(), removeProjectResourceDelta);

            NlpModelDeltaImpl parent = (NlpModelDeltaImpl) delta.getParent();

            parent.addChild(removeProjectDelta);

            return;
          } else {
            // remove the nlp project
            delta.setKind(Kind.REMOVED);
            mEventDispatcher.notify(delta.getKind(), delta);

            // add the closed project resource
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }

              @Override
              public int getKind() {
                return IResourceDelta.ADDED;
              }

              @Override
              public IPath getFullPath() {
                return resourceDelta.getFullPath();
              }

              @Override
              public IPath getProjectRelativePath() {
                return resourceDelta.getProjectRelativePath();
              }

              @Override
              public IResourceDelta[] getAffectedChildren() {
                return new IResourceDelta[] {};
              }
            };

            NlpModelDeltaImpl removeProjectDelta = new NlpModelDeltaImpl((NlpModelDeltaImpl) delta
                    .getParent(), removeProjectResourceDelta);

            NlpModelDeltaImpl parent = (NlpModelDeltaImpl) delta.getParent();

            parent.addChild(removeProjectDelta);
            return;
          }
        }
        // indicates that a nature was added to the project
        else if ((resourceDelta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
          if (project.isOpen()) {
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }
View Full Code Here


            // add the nlp project
            delta.setKind(Kind.ADDED);
            mEventDispatcher.notify(delta.getKind(), delta);

            // remove the old resource project
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }

              @Override
              public int getKind() {
                return IResourceDelta.REMOVED;
              }

              @Override
              public IPath getFullPath() {
                return resourceDelta.getFullPath();
              }

              @Override
              public IPath getProjectRelativePath() {
                return resourceDelta.getProjectRelativePath();
              }

              @Override
              public IResourceDelta[] getAffectedChildren() {
                return new IResourceDelta[] {};
              }
            };

            NlpModelDeltaImpl removeProjectDelta =
                    new NlpModelDeltaImpl((NlpModelDeltaImpl) delta.getParent(),
                    removeProjectResourceDelta);

            NlpModelDeltaImpl parent = (NlpModelDeltaImpl) delta.getParent();

            parent.addChild(removeProjectDelta);

            return;
          } else {
            // remove the nlp project
            delta.setKind(Kind.REMOVED);
            mEventDispatcher.notify(delta.getKind(), delta);

            // add the closed project resource
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }

              @Override
              public int getKind() {
                return IResourceDelta.ADDED;
              }

              @Override
              public IPath getFullPath() {
                return resourceDelta.getFullPath();
              }

              @Override
              public IPath getProjectRelativePath() {
                return resourceDelta.getProjectRelativePath();
              }

              @Override
              public IResourceDelta[] getAffectedChildren() {
                return new IResourceDelta[] {};
              }
            };

            NlpModelDeltaImpl removeProjectDelta =
                    new NlpModelDeltaImpl((NlpModelDeltaImpl) delta.getParent(),
                    removeProjectResourceDelta);

            NlpModelDeltaImpl parent = (NlpModelDeltaImpl) delta.getParent();

            parent.addChild(removeProjectDelta);
            return;
          }
        }
        // indicates that a nature was added to the project
        else if ((resourceDelta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
          if (project.isOpen()) {
            IResourceDelta removeProjectResourceDelta = new AbstractResourceDelta() {
              @Override
              public IResource getResource() {
                return project;
              }
View Full Code Here

TOP

Related Classes of org.apache.uima.caseditor.core.model.delta.AbstractResourceDelta

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.