I developed a solution, which is not ideal, but for now it helped me. I'm going to post it like this, I hope someone gets inspired and improves the solution:
First, I found the json file for the form in question, in my case it's C:\Users\rubens.marcelo\Iris\workspaces\Tiberio\sacAtendimento\forms\desktop\AppGroup\viewSolicitacao.sm\viewSolicitacao.json.
In it I found the key, breakpointinfo, which is the record of the breakpoints created for the form. "breakpointInfo": {
"b1": {
"width": 1280
},
"b2": {
"width": 1024
},
"b3": {
"width": 640
},
"b4": {
"width": 1920
}
},
note that for each screen size, there is an identifier, the ones that interest me now are b4 and b2, I want to clone b4 to b2 and thus take advantage of what has already been done.
Well, if you open other json files in the same folder you will notice that some (or all) of them will have the following record:
"responsiveData": {
"b2": {
"centerX": {
"type": "string",
"value": "50%"
},
"centerY": {
"type": "string",
"value": "50%"
},
"height": {
"type": "string",
"value": "315dp"
},
"isVisible": false,
"layoutType": 4,
"left": {
"type": "string",
"value": "0dp"
},
"skin": "s7445825c0a14223ba18c87f9d3787c2",
"top": {
"type": "string",
"value": "0dp"
},
"width": {
"type": "string",
"value": "800dp"
}
},
"b3": {
"centerX": {
"type": "string",
"value": "50%"
},
"centerY": {
"type": "string",
"value": "50%"
},
"height": {
"type": "string",
"value": "475dp"
},
"isVisible": false,
"layoutType": 4,
"skin": "s7445825c0a14223ba18c87f9d3787c2",
"width": {
"type": "string",
"value": "400dp"
}
},
"b4": {
"centerX": {
"type": "string",
"value": "50%"
},
"centerY": {
"type": "string",
"value": "50%"
},
"height": {
"type": "string",
"value": "590dp"
},
"isVisible": false,
"layoutType": 2,
"skin": "s7445825c0a14223ba18c87f9d3787c2",
"top": {
"type": "string",
"value": "170dp"
},
"width": {
"type": "string",
"value": "80%"
}
}
}
You can check that for the FlexContainer divAnexos, we have the settings for each BreakPoint, then the work should be just to clone the key b4 to b1. Since there are sooooo many files to do this, I created a little program in C# for this:
namespace JsonKeyModify;
using Newtonsoft.Json.Linq;
using System;
using System.IO;
class Program
{
static void Main()
{
string directoryPath = @"C:\Users\rubens.marcelo\Iris\workspaces\Tiberio\sacAtendimento\forms\desktop\AppGroup\viewSolicitacao.sm"; // Change to the desired path
foreach (string file in Directory.GetFiles(directoryPath, "*.json"))
{
try
{
string jsonContent = File.ReadAllText(file);
JObject jsonObj = JObject.Parse(jsonContent);
if (jsonObj["responsiveData"]?["b4"] != null)
{
// Create a copy of the key "b4" and rename it to "b1"
jsonObj["responsiveData"]["b1"] = jsonObj["responsiveData"]["b4"].DeepClone();
// Save the changes back to the JSON file
File.WriteAllText(file, jsonObj.ToString());
Console.WriteLine($"Modified: {file}");
}
}
catch (Exception ex)
{
Console.WriteLine($"Error processing {file}: {ex.Message}");
}
}
Console.WriteLine("Processing completed.");
}
}
Please feel free to improve the solution!