<commit_before>/*******************************************************************************
 * Copyright (c) 2014 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     <NAME> - initial version 
 *******************************************************************************/

package ilg.gnuarmeclipse.debug.gdbjtag.viewmodel.peripheral;

import java.math.BigInteger;

import org.eclipse.debug.core.DebugException;

import ilg.gnuarmeclipse.debug.gdbjtag.datamodel.SvdDMNode;

public class PeripheralRegisterArrayVMNode extends PeripheralGroupVMNode {

	// ------------------------------------------------------------------------

	public PeripheralRegisterArrayVMNode(PeripheralTreeVMNode parent, SvdDMNode dmNode) {

		super(parent, dmNode);

	}

	// ------------------------------------------------------------------------

	@Override
	public String getDisplayNodeType() {
		return "Register array";
	}

	@Override
	public String getImageName() {
		return "registergroup_obj";
	}

	@Override
	public String getDisplaySize() {
		int dim = fDMNode.getArrayDim();
		if (dim != 0) {
			return dim + " elements";
		}

		return null;
	}

	@Override
	public BigInteger getBigAbsoluteAddress() {

		BigInteger base;
		try {
			base = ((PeripheralGroupVMNode) getRegisterGroup()).getBigAbsoluteAddress();
		} catch (DebugException e) {
			base = BigInteger.ZERO;
		}
		BigInteger offset;
		offset = fDMNode.getBigAddressOffset();

		return base.add(offset);
	}

	// ------------------------------------------------------------------------
}<commit_msg>debug.gdbjtag: register array address<commit_after>/*******************************************************************************
 * Copyright (c) 2014 <NAME>.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     <NAME> - initial version 
 *******************************************************************************/

package ilg.gnuarmeclipse.debug.gdbjtag.viewmodel.peripheral;

import ilg.gnuarmeclipse.debug.gdbjtag.datamodel.SvdDMNode;

public class PeripheralRegisterArrayVMNode extends PeripheralGroupVMNode {

	// ------------------------------------------------------------------------

	public PeripheralRegisterArrayVMNode(PeripheralTreeVMNode parent, SvdDMNode dmNode) {

		super(parent, dmNode);

	}

	// ------------------------------------------------------------------------

	@Override
	public String getDisplayNodeType() {
		return "Register array";
	}

	@Override
	public String getImageName() {
		return "registergroup_obj";
	}

	@Override
	public String getDisplaySize() {
		int dim = fDMNode.getArrayDim();
		if (dim != 0) {
			return dim + " elements";
		}

		return null;
	}

	// ------------------------------------------------------------------------
}
{'fraction_non_alphanumeric': 0.3121859296482412, 'fraction_numerical': 0.005653266331658292, 'mean_word_length': 2.4732824427480917, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7065738', 'n_tokens_mistral': 879, 'n_tokens_neox': 775, 'n_words': 194}