+
+ /**
+ * @return
+ */
+ private ArrayDefinition createStringArray() {
+ StringDeclaration strDecl = new StringDeclaration();
+ StringDefinition[] defs = createDefs();
+ ArrayDefinition temp = setUpDeclaration(strDecl, defs);
+ return temp;
+ }
+ /**
+ * @param decl
+ * @param defs
+ * @return
+ */
+ private ArrayDefinition setUpDeclaration(IDeclaration decl,
+ Definition[] defs) {
+ ArrayDeclaration ad = new ArrayDeclaration(0, decl);
+ ArrayDefinition temp = new ArrayDefinition(ad , this.trace , "Testx"); //$NON-NLS-1$
+ temp.setDefinitions(defs);
+ return temp;
+ }
+ /**
+ * @param size
+ * @param bits
+ * @return
+ */
+ private static IntegerDefinition[] createIntDefs(int size, int bits) {
+ IntegerDefinition[] defs = new IntegerDefinition[size];
+ for (int i = 0; i < size; i++) {
+
+ String content = "test" + i; //$NON-NLS-1$
+ defs[i] = new IntegerDefinition(new IntegerDeclaration(bits, false,
+ 16, ByteOrder.LITTLE_ENDIAN, Encoding.UTF8, content, 24), null, content);
+ defs[i].setValue(i);
+ }
+ return defs;
+ }