Setting the default filename

Issue #187 invalid
Jörg Kienzle created an issue

When creating a new aspect model for a feature by tap-and-holding on a feature and selecting "New Aspect", a new aspect appears as it should with the right name, i.e., the name of the feature. However, when clicking the save button, the default filename is not set. It should also be the name of the feature/aspect.

Comments (7)

  1. nishanthg1991

    Not able to reproduce this. The default filename for saving is right now set as the same aspect name.

  2. Matthias Schoettle

    I briefly tried it and it only happens when the aspect name matches the concern name. The suggested file name can then be a directory, which will suppress that this file name is suggested.

    if (type == RamFileBrowserType.SAVE && defaultFile != null && !defaultFile.isDirectory()) {
    

    I think it would be safe to remove the last check.

  3. Matthias Schoettle

    Alternatively, the suggested filename that is determined for unsaved files (no eResource()), could have the file extension added at the end and then it won't be recognized as a directory anymore.

    But I think the first option might be better since it will be independent of the file extension.

  4. Matthias Schoettle

    Did you try it with the aspect name matching the concern name (i.e., the directory name as well)? Then it is a directory in the check.

  5. nishanthg1991

    Yes, I am presuming it is the root feature which will share the exact name of the concern.It would produce the error before, but unfortunately I am not able to get it now.

  6. Log in to comment