I am trying to retrieve the direction of a Proxy Port in my Java code but all I get is null. Here is my code.
- Code: Select all
protected static String getPortDirection(Port port) throws Exception {
Profile sysMLProfile = StereotypesHelper.getProfile(Application.getInstance().getProject(), "SysML");
final Stereotype portStereotype = StereotypesHelper.getStereotype(Application.getInstance().getProject(), "ProxyPort", sysMLProfile);
Object directionObj = StereotypesHelper.getStereotypePropertyFirst(port, portStereotype, "direction");
}
Can you please tell me if I am doing it wrong? If yes, can you guide me how to get the direction of a Proxy Port Programmatically?
Kind Regards,
Praveen B