mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-10 18:45:26 +02:00
Make a message cloneable
This commit is contained in:
parent
c923ecb2cc
commit
ea4e43aff4
1 changed files with 13 additions and 0 deletions
|
@ -474,4 +474,17 @@ public class SystemMessage
|
||||||
return sub.toString();
|
return sub.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new message with the same component, subcomponent, number, level 1 and level 2 text as this message.
|
||||||
|
* @see java.lang.Object#clone()
|
||||||
|
*/
|
||||||
|
protected Object clone() throws CloneNotSupportedException {
|
||||||
|
|
||||||
|
try {
|
||||||
|
return new SystemMessage(component, subComponent, messageNumber, indicator, level1NS, level2NS);
|
||||||
|
}
|
||||||
|
catch (IndicatorException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue