[Minor] Allow to create locator even if parent is missing

This commit is contained in:
Robert von Burg 2016-09-01 10:06:32 +02:00
parent 62794e8e59
commit 916f927ccd
4 changed files with 10 additions and 6 deletions

View File

@ -51,6 +51,7 @@ public class ParameterBag extends ParameterizedElement {
@Override
public void fillLocator(LocatorBuilder lb) {
if (this.parent != null)
this.parent.fillLocator(lb);
lb.append(Tags.BAG);
lb.append(this.id);

View File

@ -211,6 +211,7 @@ public class Action extends GroupedParameterizedElement implements IActivityElem
@Override
public Locator getLocator() {
LocatorBuilder lb = new LocatorBuilder();
if (this.parent != null)
this.parent.fillLocator(lb);
fillLocator(lb);
return lb.build();

View File

@ -138,6 +138,7 @@ public abstract class AbstractParameter<T> extends AbstractStrolchElement implem
@Override
public Locator getLocator() {
LocatorBuilder lb = new LocatorBuilder();
if (this.parent != null)
this.parent.fillLocator(lb);
fillLocator(lb);
return lb.build();

View File

@ -37,8 +37,8 @@ import li.strolch.utils.helper.StringHelper;
* @author Robert von Burg <eitch@eitchnet.ch>
*/
@SuppressWarnings("rawtypes")
public abstract class AbstractStrolchTimedState<T extends IValue> extends AbstractStrolchElement implements
StrolchTimedState<T> {
public abstract class AbstractStrolchTimedState<T extends IValue> extends AbstractStrolchElement
implements StrolchTimedState<T> {
private static final long serialVersionUID = 1L;
@ -161,6 +161,7 @@ public abstract class AbstractStrolchTimedState<T extends IValue> extends Abstra
@Override
public Locator getLocator() {
LocatorBuilder lb = new LocatorBuilder();
if (this.parent != null)
this.parent.fillLocator(lb);
fillLocator(lb);
return lb.build();