/** * Sets a property associated with this extension into the standard BlueJ property repository. The * property name does not need to be fully qualified since a prefix will be prepended to it. * * @param property The name of the required global property * @param value the required value of that property. */ public void setExtensionPropertyString(String property, String value) { if (!myWrapper.isValid()) throw new ExtensionUnloadedException(); String thisKey = myWrapper.getSettingsString(property); Config.putPropString(thisKey, value); }
/** * Return a property associated with this extension from the standard BlueJ property repository. * You must use the setExtensionPropertyString to write any property that you want stored. You can * then come back and retrieve it using this function. * * @param property The name of the required global property. * @param def The default value to use if the property cannot be found. * @return the value of that property. */ public String getExtensionPropertyString(String property, String def) { if (!myWrapper.isValid()) throw new ExtensionUnloadedException(); String thisKey = myWrapper.getSettingsString(property); return Config.getPropString(thisKey, def); }