parentProfile = Activator.getSysMLProfile();
} else if (profileQualifiedName.startsWith("Standard")) {
parentProfile = Activator.getStandardProfile();
}
Package profilePackage = parentProfile;
final String[] profiles = profileQualifiedName.split(":{2}");
// search the profile in the package hierarchy
for (int index = 1; index < profiles.length - 1; index++) {
profilePackage = profilePackage.getNestedPackage(profiles[index]);
}
Profile profile = (Profile)profilePackage;
if (profileQualifiedName.startsWith("SysML")) {
profile = (Profile)profilePackage.getNestedPackage(profiles[profiles.length - 1]);
}
if (profile == null) {
final String message = "Can't apply the profile " + profileQualifiedName + " on "
+ p.getQualifiedName();