ProfileSettings { public <ValueType> MutableProperty<ValueType> getProperty( PropertyDef<?, ValueType> propertyDef) { return new DomTrackingProperty<>(propertyDef); } ProfileSettings(); static boolean isEventThread(); void loadFromFile(Path xmlFile); void loadFromStream(InputStream xmlSource); ConfigTree getContentSnapshot(); void saveToFile(Path xmlFile, ConfigSaveOptions saveOptions); void clearSettings(); Collection<DomElementKey> getAuxConfigKeys(); Element getAuxConfigValue(DomElementKey key); boolean setAuxConfigValue(DomElementKey key, Element value); MutableProperty<ValueType> getProperty(
            PropertyDef<?, ValueType> propertyDef);  }
@Ignore @Test public void testIntersectingMultiNodeProperties() throws IOException { ProfileSettings settings = new ProfileSettings(); readFromSettings1(settings); List<ConfigPath> configPaths1 = Arrays.asList( getConfigPath("target-platform-name"), getConfigPath("target-platform")); List<ConfigPath> configPaths2 = Arrays.asList( getConfigPath("target-platform-name"), getConfigPath("source-level")); MutableProperty<PlatformId> property1 = settings.getProperty(getTargetPlatformProfileDef(configPaths1)); MutableProperty<PlatformId> property2 = settings.getProperty(getTargetPlatformProfileDef(configPaths2)); PlatformId propert1Initial = new PlatformId("j2se", "1.7"); PlatformId propert2Initial = propert1Initial; assertEquals(propert1Initial, property1.getValue()); assertEquals(propert2Initial, property2.getValue()); property1.setValue(new PlatformId("j2me", "1.5")); assertEquals(new PlatformId("j2me", "1.7"), property2.getValue()); }
@Test public void testLicenseHeaderInfoInSettings1() throws IOException { ProfileSettings settings = new ProfileSettings(); readFromSettings1(settings); MutableProperty<LicenseHeaderInfo> license = settings.getProperty(LicenseHeaderInfoProperty.PROPERTY_DEF); LicenseHeaderInfo value = license.getValue(); assertNotNull("LicenseHeaderInfo", value); assertEquals("LicenseName", "my-license", value.getLicenseName()); assertEquals("organization", Collections.singletonMap("organization", "MyCompany"), value.getProperties()); assertEquals("FileName", "license2.txt", value.getLicenseTemplateFile().getFileName().toString()); license.setValue(null); assertNull("LicenseHeaderInfo", license.getValue()); }