Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2251

Groovy Projects are not tracked properly with pre-existing Natures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1-rc-3
    • None
    • None
    • Patch

    Description

      The ResourceListener did not properly handle open and add of projects. If a project already had a nature, these were not added to the set of managed Groovy Projects. A restart would fix this problem.

      — Use the javaProject rather than IProject
      GroovyModel.getProjectOutputPath()
      GroovyModel.getModel().getGroovyProject(javaProject).setOutputPath(projectPreference, projectPreference);

      – Fix the listener code
      GroovyCoreActivator.resourceChanged()
      if (resourceType == IResource.PROJECT) {
      // adding a project either due to rename or open (ADDED)
      // removing a project due to rename (REMOVED) or closing (CHANGED)
      if (kind == IResourceDelta.ADDED ||
      (kind == IResourceDelta.CHANGED && project.isOpen() && (delta.getFlags() & IResourceDelta.OPEN) != 0))

      { // the check for the Groovy Nature is done during the add GroovyModel.getModel().addGroovyProject(project); }

      else if (kind == IResourceDelta.REMOVED ||
      (kind == IResourceDelta.CHANGED && !project.isOpen() && (delta.getFlags() & IResourceDelta.OPEN) != 0))

      { GroovyModel.getModel().removeGroovyProject(project); }

      } else if (resourceType == IResource.FILE) {

      Attachments

        Activity

          People

            fraenkel Michael Fraenkel
            fraenkel Michael Fraenkel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: