having duplication in the added libraries to the generated code #1011

Closed
vahdat-ab opened this Issue Mar 3, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@vahdat-ab
Member

vahdat-ab commented Mar 3, 2017

Consider the following example:

class PaperDistribution{
  depend java.util.*; 
  String[] data;
}

In the generated code, we will have two times the library import java.util.* imported.
These cases must be detected and one time the library needs to be added.

@TimLethbridge

This comment has been minimized.

Show comment
Hide comment
@TimLethbridge

TimLethbridge Dec 8, 2017

Member

One depend is created by default; the other is created by the depend. When depend is used, there should be a check to see if it is going to be created by default anywhere. Alternatively the code generator should look for duplicates before outputting.

Member

TimLethbridge commented Dec 8, 2017

One depend is created by default; the other is created by the depend. When depend is used, there should be a check to see if it is going to be created by default anywhere. Alternatively the code generator should look for duplicates before outputting.

@TimLethbridge TimLethbridge added this to the April 2018 for release 1.28 milestone Dec 8, 2017

@BernardYuan BernardYuan self-assigned this Jan 9, 2018

@BernardYuan

This comment has been minimized.

Show comment
Hide comment
@BernardYuan

BernardYuan Jan 17, 2018

Contributor

After having Umple Release 1.27 I found the behavior of this issue has changed. It seems that there are no dependencies added by default in the newer version release. Example:

  1. With dependencies input:
    class SomeTest{ depend a.b.c; sth; }
    The output imports are:
    import a.b.c;
  2. With no dependency input there will be no imports generated at all.

I would suggest closing this issue and open another one, depending on whether it is Umple's responsibility to by default provide necessary dependencies such as java.util.*.

Contributor

BernardYuan commented Jan 17, 2018

After having Umple Release 1.27 I found the behavior of this issue has changed. It seems that there are no dependencies added by default in the newer version release. Example:

  1. With dependencies input:
    class SomeTest{ depend a.b.c; sth; }
    The output imports are:
    import a.b.c;
  2. With no dependency input there will be no imports generated at all.

I would suggest closing this issue and open another one, depending on whether it is Umple's responsibility to by default provide necessary dependencies such as java.util.*.

@TimLethbridge

This comment has been minimized.

Show comment
Hide comment
@TimLethbridge

TimLethbridge Jan 17, 2018

Member

@BernardYuan No the issue still is a problem. Try the original case where the attribute is String[] data;
Your test in the last comment doesn't have the []

Member

TimLethbridge commented Jan 17, 2018

@BernardYuan No the issue still is a problem. Try the original case where the attribute is String[] data;
Your test in the last comment doesn't have the []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment