package com.sensia.tools.client.swetools.editors.sensorml.panels.rng;

import com.sensia.relaxNG.RNGChoice;
import com.sensia.relaxNG.RNGTag;
import com.sensia.tools.client.swetools.editors.sensorml.panels.AbstractPanel;
import com.sensia.tools.client.swetools.editors.sensorml.panels.IPanel;

public class RNGZeroOrMorePanel extends AbstractPanel<RNGChoice>{

	public RNGZeroOrMorePanel(RNGChoice tag) {
		super(tag);
	}
	
	@Override
	public String getName() {
		return "";
	}

	@Override
	protected void addInnerElement(IPanel<? extends RNGTag> element) {
		container.add(element.getPanel());
		
	}

	@Override
	protected AbstractPanel<RNGChoice> newInstance() {
		// TODO Auto-generated method stub
		return null;
	}

}

@@ -64,16 +64,197 @@
 s.rng;%0A%0A
+import com.google.gwt.core.shared.GWT;%0Aimport com.google.gwt.user.client.ui.HorizontalPanel;%0Aimport com.google.gwt.user.client.ui.Label;%0Aimport com.google.gwt.user.client.ui.Panel;%0A
 import c
@@ -274,22 +274,19 @@
 axNG.RNG
-Choice
+Tag
 ;%0Aimport
@@ -300,35 +300,42 @@
 nsia.relaxNG.RNG
-Tag
+ZeroOrMore
 ;%0Aimport com.sen
@@ -470,16 +470,86 @@
 .IPanel;
+%0Aimport com.sensia.tools.client.swetools.editors.sensorml.utils.Utils;
 %0A%0Apublic
@@ -599,21 +599,25 @@
 anel%3CRNG
-Choic
+ZeroOrMor
 e%3E%7B%0A%0A%09pu
@@ -643,21 +643,25 @@
 anel(RNG
-Choic
+ZeroOrMor
 e tag) %7B
@@ -675,16 +675,271 @@
 r(tag);%0A
+%09%09%0A%09%09final String label = Utils.findLabel(tag);%0A%09%09Label addButton = new Label();%0A%09%09addButton.addStyleName(%22rng-optional-select%22);%0A%09%09Panel hPanel = new HorizontalPanel();%0A%09%09hPanel.add(addButton);%0A%09%09hPanel.add(new Label(label));%0A%09%09%0A%09%09container.add(hPanel);%0A
 %09%7D%0A%09%0A%09@O
@@ -1106,19 +1106,16 @@
 nel());%0A
-%09%09%0A
 %09%7D%0A%0A%09@Ov
@@ -1153,13 +1153,17 @@
 %3CRNG
-Choic
+ZeroOrMor
 e%3E n

fix ZeroOrMore label