@Override public EList<Widget> getChildren(LinkableWidget w) { EList<Widget> widgets = null; if (w instanceof Group && w.getChildren().isEmpty()) { widgets = getDynamicGroupChildren((Group) w); } else { widgets = w.getChildren(); } EList<Widget> result = new BasicEList<Widget>(); for (Widget widget : widgets) { Widget resolvedWidget = resolveDefault(widget); if (resolvedWidget != null) { result.add(resolvedWidget); } } return result; }
@Override public EList<Widget> getChildren(LinkableWidget w) { EList<Widget> widgets = null; if (w instanceof Group && w.getChildren().isEmpty()) { widgets = getDynamicGroupChildren((Group) w); } else { widgets = w.getChildren(); } EList<Widget> result = new BasicEList<Widget>(); for (Widget widget : widgets) { Widget resolvedWidget = resolveDefault(widget); if (resolvedWidget != null) { result.add(resolvedWidget); } } return result; }
for (int i = 2; i < id.length(); i += 2) { int childWidgetID = Integer.valueOf(id.substring(i, i + 2)); if (childWidgetID < ((LinkableWidget) w).getChildren().size()) { w = ((LinkableWidget) w).getChildren().get(childWidgetID);
for (int i = 2; i < id.length(); i += 2) { int childWidgetID = Integer.valueOf(id.substring(i, i + 2)); if (childWidgetID < ((LinkableWidget) w).getChildren().size()) { w = ((LinkableWidget) w).getChildren().get(childWidgetID);
@Check public void checkFramesInWidgetList(final LinkableWidget widget) { if ((widget instanceof Frame)) { return; } boolean containsFrames = false; boolean containsOtherWidgets = false; EList<Widget> _children = widget.getChildren(); for (final Widget w : _children) { { if ((w instanceof Frame)) { containsFrames = true; } else { containsOtherWidgets = true; } if ((containsFrames && containsOtherWidgets)) { this.error("Linkable widget should contain either only frames or none at all", SitemapPackage.Literals.FRAME.getEStructuralFeature(SitemapPackage.LINKABLE_WIDGET__CHILDREN)); return; } } } }
@Check public void checkFramesInWidgetList(final LinkableWidget widget) { if ((widget instanceof Frame)) { return; } boolean containsFrames = false; boolean containsOtherWidgets = false; EList<Widget> _children = widget.getChildren(); for (final Widget w : _children) { { if ((w instanceof Frame)) { containsFrames = true; } else { containsOtherWidgets = true; } if ((containsFrames && containsOtherWidgets)) { EStructuralFeature _eStructuralFeature = SitemapPackage.Literals.FRAME.getEStructuralFeature(SitemapPackage.LINKABLE_WIDGET__CHILDREN); this.error("Linkable widget should contain either only frames or none at all", _eStructuralFeature); return; } } } } }
while (w.eContainer() instanceof Widget) { Widget parent = (Widget) w.eContainer(); String index = String.valueOf(((LinkableWidget) parent).getChildren().indexOf(w)); if (index.length() == 1) { index = "0" + index; // make it two digits
while (w.eContainer() instanceof Widget) { Widget parent = (Widget) w.eContainer(); String index = String.valueOf(((LinkableWidget) parent).getChildren().indexOf(w)); if (index.length() == 1) { index = "0" + index; // make it two digits