mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-17 22:15:23 +02:00
[216252] SimpleSystemMessage.clone()
This commit is contained in:
parent
da6667f889
commit
1ac741f109
1 changed files with 13 additions and 2 deletions
|
@ -25,6 +25,8 @@ public class SimpleSystemMessage extends SystemMessage {
|
||||||
*/
|
*/
|
||||||
private String _pluginId;
|
private String _pluginId;
|
||||||
|
|
||||||
|
private int _severity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for messages that use explicit strings and severities rather than
|
* Constructor for messages that use explicit strings and severities rather than
|
||||||
* parsing a message file. This is part of the work to migrate away from the message
|
* parsing a message file. This is part of the work to migrate away from the message
|
||||||
|
@ -52,6 +54,7 @@ public class SimpleSystemMessage extends SystemMessage {
|
||||||
super("RSE", "G", "-", severityToIndicator(severity), msg, msgDetails); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
|
super("RSE", "G", "-", severityToIndicator(severity), msg, msgDetails); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
|
||||||
|
|
||||||
_pluginId = pluginId;
|
_pluginId = pluginId;
|
||||||
|
_severity = severity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +70,7 @@ public class SimpleSystemMessage extends SystemMessage {
|
||||||
public SimpleSystemMessage(String pluginId, int severity, String msg, Throwable e) {
|
public SimpleSystemMessage(String pluginId, int severity, String msg, Throwable e) {
|
||||||
super("RSE", "G", "-", severityToIndicator(severity), msg, throwableToDetails(e)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
super("RSE", "G", "-", severityToIndicator(severity), msg, throwableToDetails(e)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
_pluginId = pluginId;
|
_pluginId = pluginId;
|
||||||
|
_severity = severity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String throwableToDetails(Throwable e){
|
private static String throwableToDetails(Throwable e){
|
||||||
|
@ -101,7 +104,15 @@ public class SimpleSystemMessage extends SystemMessage {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullMessageID() {
|
public String getFullMessageID() {
|
||||||
return _pluginId + ":" + getIndicator();
|
return _pluginId + ":" + getIndicator(); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
return new SimpleSystemMessage(_pluginId, _severity, getLevelOneText(), getLevelTwoText());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue