diff options
author | Henrik Rentz-Reichert | 2012-01-12 15:23:16 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2012-01-12 15:23:16 +0000 |
commit | 21d6f788b26ab86df0ee80ba78b5c4371fc7996a (patch) | |
tree | a1358714111d36f555fa4171bf234ae184925e6a /plugins | |
parent | 9b85a9a9621f6fd1b2fb38c36f657b5174c853e9 (diff) | |
download | org.eclipse.etrice-21d6f788b26ab86df0ee80ba78b5c4371fc7996a.tar.gz org.eclipse.etrice-21d6f788b26ab86df0ee80ba78b5c4371fc7996a.tar.xz org.eclipse.etrice-21d6f788b26ab86df0ee80ba78b5c4371fc7996a.zip |
{core.room] improved LabelProvider
Diffstat (limited to 'plugins')
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/icons/OperationMsg.gif b/plugins/org.eclipse.etrice.core.room.ui/icons/OperationMsg.gif Binary files differnew file mode 100644 index 000000000..d50ec0d80 --- /dev/null +++ b/plugins/org.eclipse.etrice.core.room.ui/icons/OperationMsg.gif diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java index bacfe5d2a..f8f036d9b 100644 --- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java +++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/labeling/RoomLabelProvider.java @@ -291,12 +291,17 @@ public class RoomLabelProvider extends DefaultEObjectLabelProvider { return "Attr "+attr.getName()+type+value;
}
- String text(Operation op) {
+ StyledString text(Operation op) {
String rt = op.getReturntype()!=null? ": "+op.getReturntype().getName():"";
String signature = RoomHelpers.getSignature(op);
if (op instanceof PortOperation && ((PortOperation) op).getSendsMsg()!=null)
rt = " sends "+((PortOperation) op).getSendsMsg().getName();
- return op.getName()+signature+rt;
+ StyledString result = new StyledString(op.getName()+signature+rt);
+ int pos = result.toString().indexOf(" sends ");
+ if (pos>=0)
+ result.setStyle(pos+1, 5, getKeywordStyler());
+
+ return result;
}
String text(Message m) {
|