protected String[] getConfigurationStrings(Collection<IConfigAdvice> configAdvice) { String configurationData = ""; //$NON-NLS-1$ String unconfigurationData = ""; //$NON-NLS-1$ Set<String> properties = new HashSet<String>(); for (IConfigAdvice advice : configAdvice) { for (Entry<String, String> aProperty : advice.getProperties().entrySet()) { String key = aProperty.getKey(); if (shouldPublishProperty(key) && !properties.contains(key)) { properties.add(key); Map<String, String> parameters = new LinkedHashMap<String, String>(); parameters.put("propName", key); //$NON-NLS-1$ parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$ unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ } } } return new String[] {configurationData, unconfigurationData}; }
touchpointParameters.clear(); touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$ touchpointParameters.clear(); touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$ } else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
touchpointParameters.clear(); touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$ touchpointParameters.clear(); touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$ } else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
touchpointParameters.clear(); touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$ touchpointParameters.clear(); touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$ } else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
parameters.put("propName", key); //$NON-NLS-1$ parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$ unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ parameters.put("location", repo.getLocation().toString()); //$NON-NLS-1$ parameters.put("enabled", Boolean.toString((repo.getOptions() & IRepository.ENABLED) == IRepository.ENABLED)); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addRepository", parameters); //$NON-NLS-1$ parameters.remove("enabled"); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeRepository", parameters);//$NON-NLS-1$
parameters.put("propName", key); //$NON-NLS-1$ parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$ unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$ parameters.put("location", repo.getLocation().toString()); //$NON-NLS-1$ parameters.put("enabled", Boolean.toString((repo.getOptions() & IRepository.ENABLED) == IRepository.ENABLED)); //$NON-NLS-1$ configurationData += TouchpointInstruction.encodeAction("addRepository", parameters); //$NON-NLS-1$ parameters.remove("enabled"); //$NON-NLS-1$ unconfigurationData += TouchpointInstruction.encodeAction("removeRepository", parameters);//$NON-NLS-1$