@Override public void readExternal(Element element) throws InvalidDataException { PathMacroManager.getInstance(getProject()).expandPaths(element); super.readExternal(element); readModule(element); vmParams = JDOMExternalizer.readString(element, "vmparams"); cmdLine = JDOMExternalizer.readString(element, "cmdLine"); String sPassParentEnviroment = JDOMExternalizer.readString(element, "passParentEnv"); passParentEnv = StringUtil.isEmpty(sPassParentEnviroment) || Boolean.parseBoolean(sPassParentEnviroment); envs.clear(); JDOMExternalizer.readMap(element, envs, null, "env"); JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element); depsClasspath = !"false".equals(JDOMExternalizer.readString(element, "depsClasspath")); }
@Override public void readExternal(Element element) throws InvalidDataException { PathMacroManager.getInstance(getProject()).expandPaths(element); super.readExternal(element); readModule(element); scriptPath = ExternalizablePath.localPathValue(JDOMExternalizer.readString(element, "path")); vmParams = JDOMExternalizer.readString(element, "vmparams"); scriptParams = JDOMExternalizer.readString(element, "params"); final String wrk = JDOMExternalizer.readString(element, "workDir"); if (!".".equals(wrk)) { workDir = ExternalizablePath.localPathValue(wrk); } isDebugEnabled = Boolean.parseBoolean(JDOMExternalizer.readString(element, "debug")); envs.clear(); JDOMExternalizer.readMap(element, envs, null, "env"); }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); if (runSettings == null){ try { readExternal(element); } catch (InvalidDataException ex){ //TODO: Not doing this at the moment anyways. } } JDOMExternalizer.write(element, "additionalArguments", runSettings.getAdditionalArguments()); JDOMExternalizer.write(element, "testFilePath", runSettings.getTestFilePath()); JDOMExternalizer.write(element, "directory", runSettings.getDirectory()); JDOMExternalizer.write(element, "configFile", runSettings.getConfigFile()); JDOMExternalizer.write(element, "optionsFile", runSettings.getOptionsFile()); JDOMExternalizer.write(element, "rsaKey", runSettings.getRsaKey()); JDOMExternalizer.write(element, "useLatestPreserved", runSettings.getUseLatestPreserved()); }
@Override public void readExternal(Element element) throws InvalidDataException { super.readExternal(element); environment = JDOMExternalizer.readString(element, "environment"); specsToExecute = JDOMExternalizer.readString(element, "specsToExecute"); tags = JDOMExternalizer.readString(element, "tags"); parallelNodes = JDOMExternalizer.readString(element, "parallelNodes"); execInParallel = JDOMExternalizer.readBoolean(element, "execInParallel"); programParameters.setProgramParameters(JDOMExternalizer.readString(element, "programParameters")); programParameters.setWorkingDirectory(JDOMExternalizer.readString(element, "workingDirectory")); this.moduleName = JDOMExternalizer.readString(element, "moduleName"); HashMap<String, String> envMap = new HashMap<>(); JDOMExternalizer.readMap(element, envMap, "envMap", "envMap"); programParameters.setEnvs(envMap); rowsRange = JDOMExternalizer.readString(element, "rowsRange"); }
private void readOldFormat(final Element e) { final JDOMExternalizableStringList list = new JDOMExternalizableStringList(); try { list.readExternal(e); } catch (InvalidDataException e1) { // nothing } if (list.isEmpty()) return; final boolean[] selection = new boolean[list.size()]; for (int i = 0; i < list.size(); i++) { selection[i] = Boolean.parseBoolean(list.get(i)); } final String methodSignature = fixSignature(JDOMExternalizer.readString(e, "METHOD"), false); myParameterMap.put(methodSignature, new MethodInfo(methodSignature, selection, false)); }
public void readExternal(Element element) throws InvalidDataException { PathMacroManager.getInstance(getProject()).expandPaths(element); super.readExternal(element); readModule(element); vmParams = JDOMExternalizer.readString(element, "vmparams"); cmdLine = JDOMExternalizer.readString(element, "cmdLine"); String sPassParentEnviroment = JDOMExternalizer.readString(element, "passParentEnv"); passParentEnv = StringUtil.isEmpty(sPassParentEnviroment) ? true : Boolean.parseBoolean(sPassParentEnviroment); envs.clear(); JDOMExternalizer.readMap(element, envs, null, "env"); JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element); depsClasspath = !"false".equals(JDOMExternalizer.readString(element, "depsClasspath")); }
public void readExternal(Element element) throws InvalidDataException { dataSourceName = JDOMExternalizer.readString(element, "datasourceName"); sqlMapSuffix = JDOMExternalizer.readString(element, "sqlMapSuffix"); sqlMapPackage = JDOMExternalizer.readString(element, "sqlMapPackage"); beanPackage = JDOMExternalizer.readString(element, "beanPackage"); selectKeyTemplate = JDOMExternalizer.readString(element, "selectKeyTemplate"); String temp = JDOMExternalizer.readString(element, "selectKeyType"); if(null == temp || temp.trim().length() == 0){ selectKeyType = SelectKeyType.none; }else{ selectKeyType = SelectKeyType.valueOf(temp); } insertTemplate = JDOMExternalizer.readString(element, "insertTemplate"); selectTemplate = JDOMExternalizer.readString(element, "selectTemplate"); updateTemplate = JDOMExternalizer.readString(element, "updateTemplate"); deleteTemplate = JDOMExternalizer.readString(element, "deleteTemplate"); injectCreatedSqlMap = JDOMExternalizer.readBoolean(element, "injectCreatedSqlMap"); generateCrudOperations = JDOMExternalizer.readBoolean(element, "generateCrudOperations"); }
public static Color readColor(Element root, String name, Color defaultValue) { String colorValue = JDOMExternalizer.readString(root, name); if (colorValue != null) { try { return new Color(Integer.parseInt(colorValue, 16)); } catch (NumberFormatException e) { // Ignore } } return defaultValue; }
protected void readExternalImpl(Element e) { if (e.getAttribute("injector-id") == null) { setClassName(JDOMExternalizer.readString(e, "CLASS")); //setApplyInHierarchy(JDOMExternalizer.readBoolean(e, "APPLY_IN_HIERARCHY")); readOldFormat(e); final THashMap<String, String> map = new THashMap<String, String>(); JDOMExternalizer.readMap(e, map, null, "SIGNATURES"); for (String s : map.keySet()) { final String fixedSignature = fixSignature(s, false); myParameterMap.put(fixedSignature, new MethodInfo(fixedSignature, map.get(s))); } } }
private void readOldFormat(final Element e) { final JDOMExternalizableStringList list = new JDOMExternalizableStringList(); try { list.readExternal(e); } catch (IllegalDataException ignored) { } if (list.isEmpty()) return; final boolean[] selection = new boolean[list.size()]; for (int i = 0; i < list.size(); i++) { selection[i] = Boolean.parseBoolean(list.get(i)); } final String methodSignature = fixSignature(JDOMExternalizer.readString(e, "METHOD"), false); myParameterMap.put(methodSignature, new MethodInfo(methodSignature, selection, false)); }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); writeModule(element); JDOMExternalizer.write(element, "vmparams", vmParams); JDOMExternalizer.write(element, "cmdLine", cmdLine); JDOMExternalizer.write(element, "depsClasspath", depsClasspath); JDOMExternalizer.writeMap(element, envs, null, "env"); JDOMExternalizer.write(element, "passParentEnv", passParentEnv); JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element); }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); writeModule(element); JDOMExternalizer.write(element, "path", ExternalizablePath.urlValue(scriptPath)); JDOMExternalizer.write(element, "vmparams", vmParams); JDOMExternalizer.write(element, "params", scriptParams); JDOMExternalizer.write(element, "workDir", ExternalizablePath.urlValue(workDir)); JDOMExternalizer.write(element, "debug", isDebugEnabled); JDOMExternalizer.writeMap(element, envs, null, "env"); }
@Override public void readExternal(Element element) throws InvalidDataException { super.readExternal(element); BeakerRunSettings settings = new BeakerRunSettings(); settings.setAdditionalArguments(JDOMExternalizer.readString(element, "additionalArguments")); settings.setTestFilePath(JDOMExternalizer.readString(element, "testFilePath")); settings.setDirectory(JDOMExternalizer.readString(element, "directory")); settings.setConfigFile(JDOMExternalizer.readString(element, "configFile")); settings.setOptionsFile(JDOMExternalizer.readString(element, "optionsFile")); settings.setRsaKey(JDOMExternalizer.readString(element, "rsaKey")); settings.setUseLatestPreserved(JDOMExternalizer.readBoolean(element, "useLatestPreserved")); setRunSettings(settings); }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); JDOMExternalizer.write(element, "environment", environment); JDOMExternalizer.write(element, "specsToExecute", specsToExecute); JDOMExternalizer.write(element, "tags", tags); JDOMExternalizer.write(element, "parallelNodes", parallelNodes); JDOMExternalizer.write(element, "execInParallel", execInParallel); JDOMExternalizer.write(element, "programParameters", programParameters.getProgramParameters()); JDOMExternalizer.write(element, "workingDirectory", programParameters.getWorkingDirectory()); JDOMExternalizer.write(element, "moduleName", moduleName); JDOMExternalizer.writeMap(element, programParameters.getEnvs(), "envMap", "envMap"); JDOMExternalizer.write(element, "rowsRange", rowsRange); }
public void loadState(Element element) { final PatternCompiler<PsiElement> helper = getCompiler(); final Element e = element.getChild(getClass().getSimpleName()); if (e != null) { myInjectedLanguageId = JDOMExternalizer.readString(e, "LANGUAGE"); myPrefix = JDOMExternalizer.readString(e, "PREFIX"); mySuffix = JDOMExternalizer.readString(e, "SUFFIX"); setValuePattern(JDOMExternalizer.readString(e, "VALUE_PATTERN")); mySingleFile = JDOMExternalizer.readBoolean(e, "SINGLE_FILE"); readExternalImpl(e); } else { myDisplayName = StringUtil.notNullize(element.getChildText("display-name")); myInjectedLanguageId = StringUtil.notNullize(element.getAttributeValue("language")); myPrefix = StringUtil.notNullize(element.getChildText("prefix")); mySuffix = StringUtil.notNullize(element.getChildText("suffix")); setValuePattern(element.getChildText("value-pattern")); mySingleFile = element.getChild("single-file") != null; readExternalImpl(element); final List<Element> placeElements = element.getChildren("place"); myPlaces = InjectionPlace.ARRAY_FACTORY.create(placeElements.size()); for (int i = 0, placeElementsSize = placeElements.size(); i < placeElementsSize; i++) { Element placeElement = placeElements.get(i); final boolean enabled = !Boolean.parseBoolean(placeElement.getAttributeValue("disabled")); final String text = placeElement.getText(); myPlaces[i] = new InjectionPlace(helper.createElementPattern(text, getDisplayName()), enabled); } } if (myPlaces.length == 0) { generatePlaces(); } }
protected void readExternalImpl(Element e) { if (e.getAttribute("injector-id") == null) { setTagName(JDOMExternalizer.readString(e, "TAGNAME")); setTagNamespace(JDOMExternalizer.readString(e, "TAGNAMESPACE")); setXPathCondition(JDOMExternalizer.readString(e, "XPATH_CONDITION")); myApplyToSubTagTexts = JDOMExternalizer.readBoolean(e, "APPLY_TO_SUBTAGS"); } else { setXPathCondition(e.getChildText("xpath-condition")); myApplyToSubTagTexts = e.getChild("apply-to-subtags") != null; } }
protected void readExternalImpl(Element e) { super.readExternalImpl(e); if (e.getAttribute("injector-id") == null) { setAttributeName(JDOMExternalizer.readString(e, "ATT_NAME")); setAttributeNamespace(JDOMExternalizer.readString(e, "ATT_NAMESPACE")); } }
public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); writeModule(element); JDOMExternalizer.write(element, "vmparams", vmParams); JDOMExternalizer.write(element, "cmdLine", cmdLine); JDOMExternalizer.write(element, "depsClasspath", depsClasspath); JDOMExternalizer.writeMap(element, envs, null, "env"); JDOMExternalizer.write(element, "passParentEnv", passParentEnv); JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element); PathMacroManager.getInstance(getProject()).collapsePathsRecursively(element); }
public void readExternal(Element element) throws InvalidDataException { PathMacroManager.getInstance(getProject()).expandPaths(element); super.readExternal(element); readModule(element); scriptPath = ExternalizablePath.localPathValue(JDOMExternalizer.readString(element, "path")); vmParams = JDOMExternalizer.readString(element, "vmparams"); scriptParams = JDOMExternalizer.readString(element, "params"); final String wrk = JDOMExternalizer.readString(element, "workDir"); if (!".".equals(wrk)) { workDir = ExternalizablePath.localPathValue(wrk); } isDebugEnabled = Boolean.parseBoolean(JDOMExternalizer.readString(element, "debug")); envs.clear(); JDOMExternalizer.readMap(element, envs, null, "env"); }
public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); writeModule(element); JDOMExternalizer.write(element, "path", ExternalizablePath.urlValue(scriptPath)); JDOMExternalizer.write(element, "vmparams", vmParams); JDOMExternalizer.write(element, "params", scriptParams); JDOMExternalizer.write(element, "workDir", ExternalizablePath.urlValue(workDir)); JDOMExternalizer.write(element, "debug", isDebugEnabled); JDOMExternalizer.writeMap(element, envs, null, "env"); PathMacroManager.getInstance(getProject()).collapsePathsRecursively(element); }
@Override public void readExternal(Element element) throws InvalidDataException { PathMacroManager.getInstance(getProject()).expandPaths(element); super.readExternal(element); scriptPath = JDOMExternalizer.readString(element, "path"); shellParameters = JDOMExternalizer.readString(element, "shellParams"); // serverConfiguration = JDOMExternalizer.readBoolean(element, "serverConfiguration"); }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); JDOMExternalizer.write(element, "path", scriptPath); JDOMExternalizer.write(element, "shellParams", shellParameters); // JDOMExternalizer.write(element, "serverConfiguration", serverConfiguration); PathMacroManager.getInstance(getProject()).collapsePathsRecursively(element); }
public void writeExternal(Element element) throws WriteExternalException { JDOMExternalizer.write(element, "datasourceName", dataSourceName); JDOMExternalizer.write(element, "sqlMapSuffix", sqlMapSuffix); JDOMExternalizer.write(element, "sqlMapPackage", sqlMapPackage); JDOMExternalizer.write(element, "beanPackage", beanPackage); JDOMExternalizer.write(element, "selectKeyTemplate", selectKeyTemplate); JDOMExternalizer.write(element, "selectKeyType", selectKeyType.name()); JDOMExternalizer.write(element, "insertTemplate", insertTemplate); JDOMExternalizer.write(element, "selectTemplate", selectTemplate); JDOMExternalizer.write(element, "updateTemplate", updateTemplate); JDOMExternalizer.write(element, "deleteTemplate", deleteTemplate); JDOMExternalizer.write(element, "generateCrudOperations", generateCrudOperations); JDOMExternalizer.write(element, "injectCreatedSqlMap", injectCreatedSqlMap); }
@Override public void readExternal(Element element) throws InvalidDataException { super.readExternal(element); readModule(element); settingsFile = JDOMExternalizer.readString(element, "settingsFile"); serverAddress = JDOMExternalizer.readString(element, "serverAddress"); String serverTypeStr = JDOMExternalizer.readString(element, "serverType"); if (serverTypeStr != null) { serverType = ServerType.valueOf(serverTypeStr); } }
@Override public void writeExternal(Element element) throws WriteExternalException { super.writeExternal(element); writeModule(element); JDOMExternalizer.write(element, "settingsFile", settingsFile); JDOMExternalizer.write(element, "serverAddress", serverAddress); if (serverType != null) { JDOMExternalizer.write(element, "serverType", serverType.name()); } }
@Override public void writeSettings(@NotNull Element node) throws WriteExternalException { mySettings.writeSettings(node); if(myIgnoreFields) { JDOMExternalizer.write(node, "ignoreFields", true); } }
public void readExternal(Element element) { setWheelZooming(JDOMExternalizer.readBoolean(element, ATTR_WHEEL_ZOOMING)); setSmartZooming(JDOMExternalizer.readBoolean(element, ATTR_SMART_ZOOMING)); setPrefferedWidth(JDOMExternalizer.readInteger(element, ATTR_PREFFERED_WIDTH, DEFAULT_PREFFERED_SIZE.width)); setPrefferedHeight(JDOMExternalizer.readInteger(element, ATTR_PREFFERED_HEIGHT, DEFAULT_PREFFERED_SIZE.height)); }
public void writeExternal(Element element) { JDOMExternalizer.write(element, ATTR_WHEEL_ZOOMING, wheelZooming); JDOMExternalizer.write(element, ATTR_SMART_ZOOMING, smartZooming); JDOMExternalizer.write(element, ATTR_PREFFERED_WIDTH, prefferedWidth); JDOMExternalizer.write(element, ATTR_PREFFERED_HEIGHT, prefferedHeight); }
public void readExternal(Element element) { executablePath = JDOMExternalizer.readString(element, ATTR_EXECUTABLE_PATH); }
public void writeExternal(Element element) { JDOMExternalizer.write(element, ATTR_EXECUTABLE_PATH, executablePath); }
public static void write(Element root, String name, Color value) { if (value != null) { JDOMExternalizer.write(root, name, Integer.toString(value.getRGB() & 0xFFFFFF, 16)); } }
public void readExternal(Element element) { setShowDefault(JDOMExternalizer.readBoolean(element, ATTR_SHOW_DEFAULT)); setCellSize(JDOMExternalizer.readInteger(element, ATTR_CELL_SIZE, DEFAULT_CELL_SIZE)); setWhiteColor(JDOMExternalizerEx.readColor(element, ATTR_WHITE_COLOR, DEFAULT_WHITE_COLOR)); setBlackColor(JDOMExternalizerEx.readColor(element, ATTR_BLACK_COLOR, DEFAULT_BLACK_COLOR)); }
public void writeExternal(Element element) { JDOMExternalizer.write(element, ATTR_SHOW_DEFAULT, showDefault); JDOMExternalizer.write(element, ATTR_CELL_SIZE, cellSize); JDOMExternalizerEx.write(element, ATTR_WHITE_COLOR, whiteColor); JDOMExternalizerEx.write(element, ATTR_BLACK_COLOR, blackColor); }
public void readExternal(Element element) { showDefault = JDOMExternalizer.readBoolean(element, ATTR_SHOW_DEFAULT); lineMinZoomFactor = JDOMExternalizer.readInteger(element, ATTR_LINE_ZOOM_FACTOR, DEFAULT_LINE_ZOOM_FACTOR); lineSpan = JDOMExternalizer.readInteger(element, ATTR_LINE_SPAN, DEFAULT_LINE_SPAN); lineColor = JDOMExternalizerEx.readColor(element, ATTR_LINE_COLOR, DEFAULT_LINE_COLOR); }