Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Add check & warning for sgen that does not contain any entries #1402

Merged
merged 2 commits into from
May 31, 2017

Conversation

BeckmaR
Copy link
Contributor

@BeckmaR BeckmaR commented May 30, 2017

The following sgen content will now create a warning:

GeneratorModel for yakindu::java {
}

The text is simply ".sgen file does not contain any entries"

Resolves #1381

@BeckmaR BeckmaR requested a review from andreasmuelder May 30, 2017 14:05

@Check
public void checkEntriesExist(GeneratorModel model) {
if(model.getEntries() == null || model.getEntries().isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model.getEntries is never null, EMF one to many references always return empty lists so the == null check is obsolete

@BeckmaR BeckmaR merged commit bb05c8e into master May 31, 2017
@BeckmaR BeckmaR deleted the issue_1381 branch May 31, 2017 09:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants