Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support of default attribute values #1

Open
anb0s opened this issue Mar 18, 2017 · 3 comments
Open

add support of default attribute values #1

anb0s opened this issue Mar 18, 2017 · 3 comments
Assignees
Milestone

Comments

@anb0s
Copy link
Owner

anb0s commented Mar 18, 2017

imported from: https://bitbucket.org/jpikl/yafmt/issues/1/add-support-of-default-attribute-values

Andre Bossert created an issue 2015-09-01
I'm using Yafmt 0.3.0 to define extended Feature Model with attributes and cardinality.
Now i've use cases where the model should define default values for some attributes. So the configuration should use default values if not "defined" by user.
I've tried to understand the code, but have limited time to spend more on it. Is it possible to add such feature to Yafmt? If you cannot do this, may be if you can show me some code fragments or describe the architecture of the plugin so it will be possible to add this and other features by myself.
Thanks for the great plugin!

@anb0s
Copy link
Owner Author

anb0s commented Mar 18, 2017

Andre Bossert REPORTER
Hello,
i've created a local branch for this issue and want to contribute. Now i cannot push to you repository. How does the "pull request" works? Should i create a fork first to get it working or can you give me the right to contribute?
Thanks! Andre
Edit Delete 2015-09-03

@anb0s
Copy link
Owner Author

anb0s commented Mar 18, 2017

Jan Pikl REPO OWNER
Hello,
fork the repository, push you changes there a then create a pull request. I'll reivew the pull request and eventually merge it to the main repository. See bitbucket documentation
2015-09-03

@anb0s anb0s self-assigned this Mar 19, 2017
@anb0s anb0s added this to the 0.3.1 milestone Mar 19, 2017
@anb0s anb0s modified the milestones: 0.4.0, 0.3.1 Mar 19, 2017
anb0s added a commit that referenced this issue Apr 26, 2017
- [x] #1 add support of default attribute values
- [x] #21 [v0.3.1] update project from JavaSE-1.6 to 1.7
- [x] fixed model validation error "defaultValueLiteral= BOOLEAN"
- [x] fixed path to BooleanConstraintLanguage.genmodel
- [x] set dependency of org.yakindu.base.xtext.utils.jface to minimum
version=2.5.0
- [x] fixed NPE on dispose() because problemManager is null
- [x] added more information to tooltips
- [x] fixed Feature and Attribute ID and updated model
- [x] added migration (mapping) for old 0.3.0 models defined by Siemens
- [x] changed ID generation to UUID
- [x] added model 0.4.0 and migration from 0.3.0
- [x] updated YAFMT version to 0.4.0

Signed-off-by: Andre Bossert <[email protected]>
anb0s added a commit that referenced this issue Apr 26, 2017
- [x] #1 add support of default attribute values
- [x] #21 [v0.3.1] update project from JavaSE-1.6 to 1.7
- [x] fixed model validation error "defaultValueLiteral= BOOLEAN"
- [x] fixed path to BooleanConstraintLanguage.genmodel
- [x] set dependency of org.yakindu.base.xtext.utils.jface to minimum
version=2.5.0
- [x] fixed NPE on dispose() because problemManager is null
- [x] added more information to tooltips
- [x] fixed Feature and Attribute ID and updated model
- [x] added migration (mapping) for old 0.3.0 models defined by Siemens
- [x] changed ID generation to UUID
- [x] added model 0.4.0 and migration from 0.3.0
- [x] updated YAFMT version to 0.4.0

Signed-off-by: Andre Bossert <[email protected]>
@anb0s
Copy link
Owner Author

anb0s commented May 30, 2017

TODOs, see too: #13

  • I think it would be better to call it "defaultValue" instead of just "value" to make clear what it does. Also, it should be optional (Lower Bound = 0 in model) --> DONE via bcc48e7
  • For FC editor, I can think of much simpler approach:
    When users select new feature (or when they delete attribute value) and that attribute has a default value the value is automatically set to default value. In other words, I wouldn't distinguish wheter the value was set manually by user or automatically copied from FM.
  • The situation when "value == defaultValue" should be visible in FC editor. E.g. the value can have gray color --> DONE via 16c5a10
  • I suspect that the code generator is using line ending configured in Preferences > Workspace (which is CR/LF on Windows by default). You can configure git to automatically convert newline endings when commiting changes https://help.github.com/articles/dealing-with-line-endings/. Also, I noticed that the generated code contains tabs for indentation instead of 4 spaces (Preferences > Java > Code Style > Formatter) --> DONE via bcc48e7
  • You should also update FM validation (cz.zcu.yafmt.model.validation.fm.FeatureModelValidator), so it checks wheter the default value is appropriate for the given attribute type. --> DONE via 0ffa049

anb0s added a commit that referenced this issue Jun 15, 2017
appropriate for the given attribute type.

see issue #1 too

Signed-off-by: Andre Bossert <[email protected]>
anb0s added a commit that referenced this issue Feb 1, 2018
- change of default Value cases model change
- The situation when "value == defaultValue" should be visible in FC
editor. E.g. the value can have gray color
- changed tool tipps

Signed-off-by: Andre Bossert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant