IvyDE
  1. IvyDE
  2. IVYDE-164

Add Ivy Library command adds classpath container even though it already exists

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.beta1
    • Fix Version/s: 2.0.0.final
    • Component/s: classpath container
    • Labels:
      None

      Description

      1. Create ivy.xml file
      2. Open popup menu with ivy.xml selected
      3. Select Add Ivy Library
      -> Ivy classpath is added
      2. Open popup menu with ivy.xml selected
      3. Select Add Ivy Library
      -> another Ivy classpath is added

        Activity

        Hide
        Nicolas Lalevée added a comment -

        I used it many time, it seems ok. So let's resolve it as fixed.

        Show
        Nicolas Lalevée added a comment - I used it many time, it seems ok. So let's resolve it as fixed.
        Hide
        Nicolas Lalevée added a comment -

        I have implemented what I described in my last comment.
        I am not very sure about the correctness of the implementation regarding the wizard creation, it doesn't seems to be well supported by the JDT API. Any feedback on this will be appreciated.

        Show
        Nicolas Lalevée added a comment - I have implemented what I described in my last comment. I am not very sure about the correctness of the implementation regarding the wizard creation, it doesn't seems to be well supported by the JDT API. Any feedback on this will be appreciated.
        Hide
        Nicolas Lalevée added a comment -

        Here is what I am willing to implement unless there are some objections:

        • an IvyDE classpath container will be unique by ivy.xml and conf:
          • having ivy.xml[*] configured and trying to add ivy.xml[*] will fail
          • having ivy.xml[default] configured and trying to add ivy.xml[test] will be sucessfull
          • having ivy.xml[*] configured and trying to add ivy.xml[test] will fail
        • the "add library" action will not just add a container, it will open the wizard of creation of the container with its fields being already filled. So instead of one click there will be two, but it is less than the 3+ clicks needed by the classical "Add library" workflow.

        Note: I didn't include the ivysettings and properties in the "uniqueness" check of the IvyDE classpath container in a project: it seems to me too weird to have the same ivy.xml and same conf used with just some different settings.

        Show
        Nicolas Lalevée added a comment - Here is what I am willing to implement unless there are some objections: an IvyDE classpath container will be unique by ivy.xml and conf: having ivy.xml [*] configured and trying to add ivy.xml [*] will fail having ivy.xml [default] configured and trying to add ivy.xml [test] will be sucessfull having ivy.xml [*] configured and trying to add ivy.xml [test] will fail the "add library" action will not just add a container, it will open the wizard of creation of the container with its fields being already filled. So instead of one click there will be two, but it is less than the 3+ clicks needed by the classical "Add library" workflow. Note: I didn't include the ivysettings and properties in the "uniqueness" check of the IvyDE classpath container in a project: it seems to me too weird to have the same ivy.xml and same conf used with just some different settings.
        Hide
        Marko Niemi added a comment -

        Yes, it is a normal use case to have multiple ivy classpath containers. With web applications it is necessary to have different directories for runtime, tool and test classpaths. So I would guess that there is no need to create a warning of multiple ivy classpath containers.

        Show
        Marko Niemi added a comment - Yes, it is a normal use case to have multiple ivy classpath containers. With web applications it is necessary to have different directories for runtime, tool and test classpaths. So I would guess that there is no need to create a warning of multiple ivy classpath containers.
        Hide
        Adam Bryzak added a comment -

        I use multiple classpath containers for main dependencies and test dependencies so they're visually separated in the package explorer.

        Show
        Adam Bryzak added a comment - I use multiple classpath containers for main dependencies and test dependencies so they're visually separated in the package explorer.
        Hide
        Robert Munteanu added a comment -

        What about issuing a warning that another classpath container already exists?

        This should fix any confusion issues and still allow advanced uses cases.

        Show
        Robert Munteanu added a comment - What about issuing a warning that another classpath container already exists? This should fix any confusion issues and still allow advanced uses cases.
        Hide
        Marko Niemi added a comment -

        True, someone might want to have multiple classpath containers with different configurations.

        Show
        Marko Niemi added a comment - True, someone might want to have multiple classpath containers with different configurations.
        Hide
        Nicolas Lalevée added a comment -

        Actually I can still do it.
        But then I don't know if it is a bug or a feature, should we allow sevral IvyDE classpath container in the same project ?
        If we allow different container with different resolved configuration, should we support different container with just a different order of classpath entries ?

        Show
        Nicolas Lalevée added a comment - Actually I can still do it. But then I don't know if it is a bug or a feature, should we allow sevral IvyDE classpath container in the same project ? If we allow different container with different resolved configuration, should we support different container with just a different order of classpath entries ?
        Hide
        Marko Niemi added a comment -

        With the version from SVN this is no longer reproducible.

        Show
        Marko Niemi added a comment - With the version from SVN this is no longer reproducible.
        Hide
        Marko Niemi added a comment -

        A quick fix that is based on 2nd segment being the ivy classpath identifier.

        Show
        Marko Niemi added a comment - A quick fix that is based on 2nd segment being the ivy classpath identifier.

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Marko Niemi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development