/** * @return The Configuration element for the given {@link DatatypeDefinition} or null if none is * configured. */ public static ProrPresentationConfiguration getPresentationConfiguration(DatatypeDefinition dd) { ReqIF reqif = ReqIF10Util.getReqIF(dd); if (reqif == null) return null; ProrToolExtension prorToolExtension = getProrToolExtension(reqif); if (prorToolExtension == null) return null; ProrPresentationConfigurations extensions = prorToolExtension.getPresentationConfigurations(); if (extensions == null) return null; for (ProrPresentationConfiguration config : extensions.getPresentationConfigurations()) { if (dd.equals(config.getDatatype())) return config; } return null; }
/** * @return the {@link ProrPresentationConfigurations} for the given {@link ReqIf} and {@link * EditingDomain}. */ public static ProrPresentationConfigurations getPresentationConfigurations(ReqIF reqif) { ProrToolExtension uiExtension = ConfigurationUtil.getProrToolExtension(reqif); return uiExtension == null ? null : uiExtension.getPresentationConfigurations(); }