очистка отладочной печати. тоже кое-что накопилось.
This commit is contained in:
18
.idea/workspace.xml
generated
18
.idea/workspace.xml
generated
@@ -6,7 +6,23 @@
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="" />
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Passes/Pass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Passes/Pass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Utils_.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils_.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetOldBugReports.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetOldBugReports.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/SapforProperties.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryClient.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ServerObjectsCache/VisualCaches.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ServerObjectsCache/VisualCaches.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/RemoteDVMTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/RemoteDVMTestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"Workspace": "E:\\Tests",
|
||||
"ProjectsSearchDirectory": "C:\\Users\\misha\\Documents\\visual_sapfor_2023\\Downloads\\bugreport_1732787997\\reg_detect_titan\\v7",
|
||||
"ProjectsSearchDirectory": "C:\\Users\\misha\\Documents\\visual_sapfor_2023\\Downloads\\nyav3d_1738002328\\nyav3d\\v1\\v1\\v1",
|
||||
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
||||
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
||||
"Visualizer_2Path": "C:\\Users\\misha\\Documents",
|
||||
|
||||
@@ -364,17 +364,15 @@ public class Pass<T> {
|
||||
form.fields.ProgressBar.setValue((data.length > 1) ? Integer.parseInt(data[1]) : 0);
|
||||
break;
|
||||
}
|
||||
} else System.out.println(Utils_.Brackets(message));
|
||||
}
|
||||
}
|
||||
public void ShowMessage1(String message) {
|
||||
if (form != null)
|
||||
form.fields.Label1.setText((message.length() > 1) ? message : "");
|
||||
else System.out.println(Utils_.Brackets(message));
|
||||
}
|
||||
public void ShowMessage2(String message) {
|
||||
if (form != null)
|
||||
form.fields.Label2.setText((message.isEmpty() ? "" : message));
|
||||
else System.out.println(Utils_.Brackets(message));
|
||||
}
|
||||
public void ShowProgress(int total, int current, boolean auto) {
|
||||
if (form != null) {
|
||||
|
||||
@@ -69,7 +69,6 @@ public class Utils_ {
|
||||
public static JsonObject getPropertiesAsJsonObject() throws Exception {
|
||||
File propertiesFile = new File(System.getProperty("user.dir"), "properties");
|
||||
if (!propertiesFile.exists()) {
|
||||
System.out.println("Файл properties не найден!");
|
||||
return null;
|
||||
}
|
||||
String packed = FileUtils.readFileToString(propertiesFile, Charset.defaultCharset());
|
||||
|
||||
@@ -30,7 +30,6 @@ public class GetOldBugReports extends Pass<DirInfosDataSet> {
|
||||
c.setTimeInMillis(System.currentTimeMillis());
|
||||
c.add(Calendar.MONTH, -Global.normalProperties.BugReportsAgeLimit);
|
||||
Date date = c.getTime();
|
||||
System.out.println(date);
|
||||
long border = date.getTime();
|
||||
//--
|
||||
for (File file : files) {
|
||||
|
||||
@@ -29,7 +29,6 @@ public class UpdateProperty extends Pass<Object> {
|
||||
VDirectoryChooser directoryChooser = new VDirectoryChooser("");
|
||||
VFileChooser fileChooser = new VFileChooser("", "exe");
|
||||
//-
|
||||
System.out.println(Utils_.Brackets(name));
|
||||
if (args.length==1){
|
||||
if (oldValue instanceof Boolean){
|
||||
newValue=!(Boolean)oldValue;
|
||||
|
||||
@@ -150,27 +150,21 @@ public class db_project_info extends DBObject {
|
||||
DBLastProject info = null; //обновляется при открытии проекта.
|
||||
public SapforProperties sapforProperties=null;
|
||||
public void SynchronizeSapforProperties() throws Exception{
|
||||
System.out.println("Syncronize Sapfor Properties...");
|
||||
if (sapforProperties==null) {
|
||||
File propertiesFile = getPropertiesFile();
|
||||
System.out.println("propertiesFile="+propertiesFile.getAbsolutePath());
|
||||
if (propertiesFile.exists()) {
|
||||
System.out.println("properties file found.");
|
||||
sapforProperties = Utils_.ReadProperties(propertiesFile,SapforProperties.class);
|
||||
} else {
|
||||
System.out.println("properties file not found. try get default profile..");
|
||||
SapforProfile defaultProfile = Global.mainModule.getDb().getDefaultSapforProfile();
|
||||
if (defaultProfile == null) {
|
||||
System.out.println("Default profile not found!");
|
||||
sapforProperties = new SapforProperties(propertiesFile);
|
||||
Utils_.jsonToFile(sapforProperties, propertiesFile);
|
||||
} else {
|
||||
System.out.println("Default profile is " + defaultProfile.description);
|
||||
sapforProperties = new SapforProperties(getPropertiesFile());
|
||||
sapforProperties.applyProfile(Global.mainModule.getDb().getVectorByFK(defaultProfile, SapforProfileSetting.class));
|
||||
}
|
||||
}
|
||||
}else System.out.println("properties object found");
|
||||
}
|
||||
}
|
||||
public File getPropertiesFile(){
|
||||
return new File(getDataDirectory(), "properties");
|
||||
@@ -826,7 +820,7 @@ public class db_project_info extends DBObject {
|
||||
res.add(node);
|
||||
funcCallH.calls.add((FuncCallH) node.getUserObject());
|
||||
}
|
||||
} else System.out.println("RECURSION " + String.join("->", chain) + "->" + call.funcName);
|
||||
} //else System.out.println("RECURSION " + String.join("->", chain) + "->" + call.funcName);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,6 @@ public class SapforProperties extends Properties {
|
||||
Vector<String> changedFields = new Vector<>();
|
||||
try {
|
||||
for (VisualiserSettingJson setting : settings.array) {
|
||||
System.out.println(setting.name + "=" + Utils_.Brackets(setting.value));
|
||||
Field field = null;
|
||||
try {
|
||||
field = getClass().getField(setting.name);
|
||||
@@ -227,7 +226,6 @@ public class SapforProperties extends Properties {
|
||||
Vector<String> changedFields = new Vector<>();
|
||||
try {
|
||||
for (SapforProfileSetting setting : settings) {
|
||||
System.out.println(setting.name + "=" + Utils_.Brackets(setting.value));
|
||||
Field field = null;
|
||||
try {
|
||||
field = getClass().getField(setting.name);
|
||||
|
||||
@@ -132,10 +132,8 @@ public class BugReport extends rDBObject {
|
||||
);
|
||||
if (!project_version.isEmpty()) {
|
||||
if (visualiser_version < 1134) {
|
||||
System.out.println("old bug");
|
||||
res.add(getSettingsJson().getSummary());
|
||||
} else {
|
||||
System.out.println("new bug");
|
||||
res.add(getPropertiesJson().getSummary());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ public abstract class RepositoryClient {
|
||||
if (isPrintOn()) {
|
||||
FileWriter testLog = new FileWriter(getClass().getSimpleName() + "_Log.txt", true);
|
||||
String dmessage = Utils_.Brackets(new Date()) + " " + message;
|
||||
System.out.println(dmessage);
|
||||
testLog.write(dmessage + "\n");
|
||||
testLog.close();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Vector;
|
||||
public abstract class RepositoryServer<D extends Database> {
|
||||
public final static String separator = "----------------------------------";
|
||||
protected static FileWriter Log;
|
||||
protected static boolean printOn = false;
|
||||
protected static boolean printOn = true;
|
||||
//-
|
||||
public D db;
|
||||
protected Socket clientSocket; //сокет для общения
|
||||
@@ -48,12 +48,22 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
return null;
|
||||
});
|
||||
Class<D> d_class;
|
||||
//-----------
|
||||
//-----------RECURSION ->
|
||||
SignalHandler signalHandler = signal -> {
|
||||
};
|
||||
public RepositoryServer(Class<D> d_class_in) {
|
||||
d_class = d_class_in;
|
||||
}
|
||||
protected static void ResetLog(){
|
||||
if (printOn){
|
||||
try {
|
||||
Log = new FileWriter("Log.txt", false);
|
||||
Log.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected static void Print(String message) {
|
||||
if (printOn) {
|
||||
try {
|
||||
@@ -167,11 +177,11 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
interruptThread.start();
|
||||
startAdditionalThreads();
|
||||
server = new ServerSocket(getPort());
|
||||
Print("Сервер запущен!");
|
||||
StartAction();
|
||||
while (true) {
|
||||
try {
|
||||
clientSocket = server.accept();
|
||||
ResetLog();
|
||||
Print((count++) + " клиент присоединился, IP=" + clientSocket.getInetAddress());
|
||||
code = ServerCode.Undefined;
|
||||
out = new ObjectOutputStream(clientSocket.getOutputStream());
|
||||
@@ -181,7 +191,7 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
DBObject dbObject = null;
|
||||
Pair<Class, Object> p = null;
|
||||
Print("Ожидание команды от клиента...");
|
||||
Object transport = in.readObject();
|
||||
Object transport = in.readObject(); //может висеть!!!!
|
||||
Print("Команда прочитана.");
|
||||
if (transport instanceof ServerExchangeUnit_2021) {
|
||||
request = (ServerExchangeUnit_2021) transport;
|
||||
|
||||
@@ -35,18 +35,14 @@ public class VisualCaches {
|
||||
VisualCache res = null;
|
||||
LinkedHashMap<Object, VisualCache> data = getDataForClass(object.getClass());
|
||||
if (!data.containsKey(object.getPK())) {
|
||||
// System.out.println("get visual cache for " + object.getPK()+" "+object.getClass());
|
||||
// System.out.println("cache not found, creating...");
|
||||
data.put(object.getPK(), res = createCache(object));
|
||||
} else {
|
||||
// System.out.println("cache found");
|
||||
res = data.get(object.getPK());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//Принудительно удалить старый и записать новый.
|
||||
public static void RefreshCache(DBObject object) {
|
||||
// System.out.println("refresh cache for " + object.getPK()+" "+object.getClass().getSimpleName());
|
||||
LinkedHashMap<Object, VisualCache> data = getDataForClass(object.getClass());
|
||||
//--
|
||||
if (data.containsKey(object.getPK())) {
|
||||
@@ -58,7 +54,6 @@ public class VisualCaches {
|
||||
DeleteCache(object.getClass(), object.getPK());
|
||||
}
|
||||
public static void DeleteCache(Class class_, Object pk) {
|
||||
// System.out.println("Delete cache for " + pk+" "+class_);
|
||||
LinkedHashMap<Object, VisualCache> data = getDataForClass(class_);
|
||||
if (data.containsKey(pk)) data.remove(pk);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,6 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
ServerCommand(ServerCode.DeleteObjectByPK, new Pair(TestingPackageToKill.class, ptk_id));
|
||||
} else {
|
||||
//--
|
||||
System.out.println(testingPackage.id + ":" + testingPackage.state.getDescription());
|
||||
switch (testingPackage.state) {
|
||||
case TestsSynchronize:
|
||||
TestsSynchronize();
|
||||
|
||||
@@ -47,27 +47,21 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
|
||||
//----
|
||||
@Override
|
||||
protected void TestsSynchronize() throws Exception {
|
||||
System.out.println("--");
|
||||
testingPackage.readJson();
|
||||
System.out.println("+");
|
||||
LinkedHashMap<Integer, File> tests = getTestsFromJson();
|
||||
//синхронизировать их.
|
||||
for (int test_id : tests.keySet()) {
|
||||
System.out.println("test=" + test_id);
|
||||
File test = tests.get(test_id);
|
||||
RemoteFile test_dst = new RemoteFile(testingPackage.user_workspace + "/projects/" + test_id, true);
|
||||
user.connection.MKDIR(test_dst);
|
||||
user.connection.SynchronizeSubDirsR(test, test_dst);
|
||||
}
|
||||
System.out.println("++");
|
||||
}
|
||||
@Override
|
||||
protected void PackageWorkspaceCreation() throws Exception {
|
||||
System.out.println("package workspace creation");
|
||||
if (!CheckModules()) {
|
||||
return;
|
||||
}
|
||||
System.out.println("modules checked");
|
||||
//--
|
||||
testingPackage.readJson();
|
||||
//--
|
||||
|
||||
@@ -90,7 +90,7 @@ public class Utils {
|
||||
InputStream i = u.openStream();
|
||||
Files.copy(i, dst.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
//просто дать объект под файл с сгенерированным именем
|
||||
//просто дать объект под файл с сгенерированным именем System.out.println
|
||||
public static File CreateTempFile(String name, String text) throws IOException {
|
||||
File res = getTempFileName(name);
|
||||
WriteToFile(res, text);
|
||||
@@ -169,7 +169,6 @@ public class Utils {
|
||||
float rad = inner ? r : R;
|
||||
System.out.println("x=" + (x0 + rad * Math.cos(phi + Math.PI * i / n)));
|
||||
System.out.println("y=" + (y0 + rad * Math.sin(phi + Math.PI * i / n)));
|
||||
System.out.println("--");
|
||||
inner = !inner;
|
||||
}
|
||||
}
|
||||
@@ -772,7 +771,6 @@ public class Utils {
|
||||
if (dates.isEmpty()) {
|
||||
dates.add(dir.lastModified());
|
||||
}
|
||||
System.out.println(new Date(dates.lastElement()));
|
||||
return dates.firstElement();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user