13
src/Visual_DVM_2021/UI/Interface/AnalysisWindow.java
Normal file
13
src/Visual_DVM_2021/UI/Interface/AnalysisWindow.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface AnalysisWindow extends FormWithSplitters, VisualizerForm{
|
||||
void ShowProjectMaxDim();
|
||||
void ShowNoProjectMaxDim();
|
||||
|
||||
void ShowMetrics();
|
||||
void ShowNoMetrics();
|
||||
void ShowRegions();
|
||||
void ShowNoRegions();
|
||||
void ShowLoopsCount();
|
||||
void ShowFunctionsCount();
|
||||
void ShowArraysCount();
|
||||
}
|
||||
5
src/Visual_DVM_2021/UI/Interface/ArraysWindow.java
Normal file
5
src/Visual_DVM_2021/UI/Interface/ArraysWindow.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface ArraysWindow extends VisualizerForm, FormWithSplitters{
|
||||
void ShowArrays();
|
||||
void ShowNoArrays();
|
||||
}
|
||||
28
src/Visual_DVM_2021/UI/Interface/CallbackWindow.java
Normal file
28
src/Visual_DVM_2021/UI/Interface/CallbackWindow.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface CallbackWindow extends VisualizerForm {
|
||||
void ShowAccount();
|
||||
void ShowBugReports();
|
||||
void ShowNoBugReports();
|
||||
void ShowSubscribers();
|
||||
void ShowNoSubscribers();
|
||||
void ShowCurrentBugReport();
|
||||
void ShowNoCurrentBugReport();
|
||||
void ShowSubscription();
|
||||
//-
|
||||
default void ShowAll() {
|
||||
ShowAccount();
|
||||
ShowSubscription();
|
||||
ShowBugReports();
|
||||
ShowSubscribers();
|
||||
}
|
||||
String getBugReportDescriptionText();
|
||||
String getBugReportDescriptionAdditionText();
|
||||
String getBugReportCommentText();
|
||||
String getBugReportCommentAdditionText();
|
||||
void ClearBugReportDescriptionAdditionText();
|
||||
void ClearBugReportCommentAdditionText();
|
||||
void FocusRecipients();
|
||||
void SwitchScreen(boolean small);
|
||||
void setUserRights();
|
||||
void setAdminRights();
|
||||
}
|
||||
6
src/Visual_DVM_2021/UI/Interface/CommentInterface.java
Normal file
6
src/Visual_DVM_2021/UI/Interface/CommentInterface.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface CommentInterface extends VisualizerForm, FormWithSplitters {
|
||||
void setEditorScroll(JScrollPane scroll_in);
|
||||
void setAdditionScroll(JScrollPane scroll_in);
|
||||
}
|
||||
7
src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java
Normal file
7
src/Visual_DVM_2021/UI/Interface/CredentialsWindow.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface CredentialsWindow {
|
||||
JPanel getContent();
|
||||
void ShowAll();
|
||||
void RestoreLastCredentials();
|
||||
}
|
||||
13
src/Visual_DVM_2021/UI/Interface/DebugWindow.java
Normal file
13
src/Visual_DVM_2021/UI/Interface/DebugWindow.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface DebugWindow {
|
||||
JPanel getContent();
|
||||
void ShowAll();
|
||||
//--
|
||||
void DropRunTasksComparison();
|
||||
void DropCompilationTasksComparison();
|
||||
void ShowLastCompilationTask();
|
||||
void ShowCurrentRunTask();
|
||||
void ShowLastRunTask();
|
||||
void ShowNoCurrentRunTask();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface DescriptionInterface extends VisualizerForm,FormWithSplitters {
|
||||
void setEditorScroll(JScrollPane scroll_in);
|
||||
void setAdditionScroll(JScrollPane scroll_in);
|
||||
}
|
||||
60
src/Visual_DVM_2021/UI/Interface/FileWindow.java
Normal file
60
src/Visual_DVM_2021/UI/Interface/FileWindow.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface FileWindow extends VisualizerForm{
|
||||
void ShowText();
|
||||
void ShowLanguage();
|
||||
void ShowType();
|
||||
void ShowStyle();
|
||||
default void ShowProperties() {
|
||||
ShowLanguage();
|
||||
ShowType();
|
||||
ShowStyle();
|
||||
}
|
||||
void ShowMessages();
|
||||
void ShowNoMessages();
|
||||
void ShowLoops();
|
||||
void ShowNoLoops();
|
||||
void ShowGCOV();
|
||||
void ShowNoGCOV();
|
||||
void ShowFunctions();
|
||||
void ShowNoFunctions();
|
||||
void ShowArrays();
|
||||
void ShowNoArrays();
|
||||
void ShowCaretInfo();
|
||||
void FocusMessagesPriority();
|
||||
void ShowFirstError();
|
||||
//-
|
||||
void ShowCompilationOutput();
|
||||
void ShowNoCompilationOutput();
|
||||
void ShowRunOutput();
|
||||
void ShowNoRunOutput();
|
||||
void ShowGCOVLog();
|
||||
void ShowNoGCOVLog();
|
||||
void FocusGCOVLog();
|
||||
SPFEditorInterface getEditor();
|
||||
default void ShowAllAnalyses() {
|
||||
ShowLoops();
|
||||
ShowFunctions();
|
||||
ShowArrays();
|
||||
ShowGCOV();
|
||||
ShowCompilationOutput();
|
||||
ShowRunOutput();
|
||||
}
|
||||
default void ShowNoAnalyses() {
|
||||
ShowNoLoops();
|
||||
ShowNoFunctions();
|
||||
ShowNoArrays();
|
||||
ShowNoGCOV();
|
||||
ShowNoCompilationOutput();
|
||||
ShowNoRunOutput();
|
||||
}
|
||||
void FocusLoops();
|
||||
void FocusFunctions();
|
||||
void FocusArrays();
|
||||
void RefreshTabsNames();
|
||||
void FocusCompilationOut();
|
||||
//--
|
||||
void ShowWarningsCount();
|
||||
void ShowErrorsCount();
|
||||
void ShowNotesCount();
|
||||
void ShowRecommendationsCount();
|
||||
}
|
||||
7
src/Visual_DVM_2021/UI/Interface/FilterWindow.java
Normal file
7
src/Visual_DVM_2021/UI/Interface/FilterWindow.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface FilterWindow extends VisualizerForm {
|
||||
void ShowMatchesCount(int count);
|
||||
default void ShowNoMatches() {
|
||||
ShowMatchesCount(0);
|
||||
}
|
||||
}
|
||||
10
src/Visual_DVM_2021/UI/Interface/FormWithSplitters.java
Normal file
10
src/Visual_DVM_2021/UI/Interface/FormWithSplitters.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.Global;
|
||||
public interface FormWithSplitters {
|
||||
default void LoadSplitters() {
|
||||
Global.db.splitters.Load(this);
|
||||
}
|
||||
default void SaveSplitters() {
|
||||
Global.db.splitters.Save(this);
|
||||
}
|
||||
}
|
||||
11
src/Visual_DVM_2021/UI/Interface/FunctionsWindow.java
Normal file
11
src/Visual_DVM_2021/UI/Interface/FunctionsWindow.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphForm;
|
||||
import javafx.util.Pair;
|
||||
public interface FunctionsWindow extends VisualizerForm, FormWithSplitters {
|
||||
void ShowFunctions();
|
||||
void ShowNoFunctions();
|
||||
void ShowCurrentFunction();
|
||||
void ShowNoCurrentFunction();
|
||||
Pair<Integer, Integer> getFunctionsGraphPanelSizes();
|
||||
FunctionsGraphForm getFunctionsGraphWindow();
|
||||
}
|
||||
48
src/Visual_DVM_2021/UI/Interface/Loggable.java
Normal file
48
src/Visual_DVM_2021/UI/Interface/Loggable.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.Current;
|
||||
import Common.UI.DebugPrintLevel;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Date;
|
||||
public interface Loggable {
|
||||
String getLogHomePath();
|
||||
String getLogName();
|
||||
default File getLogFile() {
|
||||
return Paths.get(getLogHomePath(), (getLogName() + "_log.txt")).toFile();
|
||||
}
|
||||
default void ClearLog() {
|
||||
try {
|
||||
Utils.forceDeleteWithCheck(getLogFile());
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
default void Print(String message) {
|
||||
try {
|
||||
FileWriter Log = new FileWriter(getLogFile(), true);
|
||||
String datedMessage = Utils.Brackets(new Date()) + " " + message;
|
||||
Log.write(datedMessage + "\n");
|
||||
Log.close();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
default void Print(DebugPrintLevel level, String message) {
|
||||
if (level.isEnabled())
|
||||
Print(Utils.Brackets(level.getDescription()) + " " + message);
|
||||
}
|
||||
default void PrintException(Exception ex) {
|
||||
StringWriter out = new StringWriter();
|
||||
PrintWriter writer = new PrintWriter(out);
|
||||
ex.printStackTrace(writer);
|
||||
writer.flush();
|
||||
Print(out.toString());
|
||||
if (Current.hasUI())
|
||||
UI.Error("Возникло исключение. Подробности в файле журнала\n" +
|
||||
Utils.Brackets(getLogFile().getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
80
src/Visual_DVM_2021/UI/Interface/ProjectWindow.java
Normal file
80
src/Visual_DVM_2021/UI/Interface/ProjectWindow.java
Normal file
@@ -0,0 +1,80 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.UI.Trees.TreeForm;
|
||||
import Common.UI.UI;
|
||||
public interface ProjectWindow {
|
||||
//-
|
||||
ArraysWindow getArraysWindow();
|
||||
FunctionsWindow getFunctionsWindow();
|
||||
AnalysisWindow getAnalysisWindow();
|
||||
//-
|
||||
void RefreshProjectFiles();
|
||||
void ShowSelectedDirectory();
|
||||
void ShowSelectedFile();
|
||||
void ShowNoSelectedFile();
|
||||
void ShowProjectSapforLog();
|
||||
void ShowIncludes();
|
||||
void ShowNoIncludes();
|
||||
void ShowFunctions();
|
||||
void ShowNoFunctions();
|
||||
void RefreshProjectTreeAndMessages();
|
||||
TreeForm getFilesTreeForm();
|
||||
//-
|
||||
void SwitchScreen(boolean small);
|
||||
void ShowProjectView();
|
||||
//-
|
||||
default void ShowAllAnalyses() {
|
||||
ShowProjectSapforLog();
|
||||
ShowIncludes();
|
||||
ShowFunctions();
|
||||
getArraysWindow().ShowArrays();
|
||||
//------------------------------>>
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariantsFilterButtons();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowTotalVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowCheckedVariantsCount();
|
||||
//----------------------------->>
|
||||
getAnalysisWindow().ShowMetrics();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
getAnalysisWindow().ShowFunctionsCount();
|
||||
getAnalysisWindow().ShowArraysCount();
|
||||
getAnalysisWindow().ShowRegions();
|
||||
getAnalysisWindow().ShowProjectMaxDim();
|
||||
}
|
||||
default void ShowNoAnalyses() {
|
||||
ShowNoIncludes();
|
||||
ShowNoFunctions();
|
||||
getFunctionsWindow().ShowNoCurrentFunction();
|
||||
getArraysWindow().ShowNoArrays();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoProjectDistribution();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariants();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoVariantsFilter();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoTotalVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoFilteredVariantsCount();
|
||||
UI.getVersionsWindow().getVariantsWindow().ShowNoCheckedVariantsCount();
|
||||
getAnalysisWindow().ShowNoMetrics();
|
||||
getAnalysisWindow().ShowNoRegions();
|
||||
getAnalysisWindow().ShowLoopsCount();
|
||||
getAnalysisWindow().ShowFunctionsCount();
|
||||
getAnalysisWindow().ShowArraysCount();
|
||||
getAnalysisWindow().ShowNoProjectMaxDim();
|
||||
}
|
||||
//---
|
||||
void ShowFile();
|
||||
void ShowNoFile();
|
||||
//---
|
||||
void GotoFile(String fileName, int line, boolean focus);
|
||||
void FocusFile();
|
||||
void FocusFileTabs();
|
||||
//-
|
||||
void FocusDependencies();
|
||||
void FocusArrays();
|
||||
void FocusFunctions();
|
||||
void FocusAnalysis();
|
||||
void FocusHierarchy();
|
||||
void FocusPoints();
|
||||
//-
|
||||
void RefreshTabsNames();
|
||||
void FocusVersions();
|
||||
}
|
||||
16
src/Visual_DVM_2021/UI/Interface/SPFEditorInterface.java
Normal file
16
src/Visual_DVM_2021/UI/Interface/SPFEditorInterface.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface SPFEditorInterface {
|
||||
//-----------------------------------
|
||||
void ClearHighlights();
|
||||
//---------------->>
|
||||
void ClearLoopsHighLights();
|
||||
void ClearGOCVHighlights();
|
||||
//----------------->>
|
||||
void HighlightLoops();
|
||||
void HighlightGCOV();
|
||||
//------------------------------------
|
||||
void gotoLine(int num);
|
||||
int getCurrentLine();
|
||||
int getCaretPosition();
|
||||
String getText();
|
||||
}
|
||||
7
src/Visual_DVM_2021/UI/Interface/ScenariosWindow.java
Normal file
7
src/Visual_DVM_2021/UI/Interface/ScenariosWindow.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface ScenariosWindow extends FormWithSplitters, VisualizerForm{
|
||||
void ShowAll();
|
||||
void FocusSapforTasksPackages();
|
||||
void ShowCurrentSapforTasksPackage();
|
||||
void ShowNoSapforTasksPackage();
|
||||
}
|
||||
4
src/Visual_DVM_2021/UI/Interface/StatisticsWindow.java
Normal file
4
src/Visual_DVM_2021/UI/Interface/StatisticsWindow.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface StatisticsWindow extends VisualizerForm{
|
||||
void ShowAll();
|
||||
}
|
||||
22
src/Visual_DVM_2021/UI/Interface/TestingWindow.java
Normal file
22
src/Visual_DVM_2021/UI/Interface/TestingWindow.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface TestingWindow extends VisualizerForm {
|
||||
void ShowAll();
|
||||
//-
|
||||
void ShowCurrentTestsPackage();
|
||||
void DropTestRunTasksComparison();
|
||||
void DropSapforComparison();
|
||||
void ShowCurrentTestRunTask();
|
||||
void ShowNoTestRunTask();
|
||||
//-
|
||||
void RefreshTabsNames();
|
||||
void FocusTestingSystem();
|
||||
|
||||
void RemountTestTable();
|
||||
//-
|
||||
void FocusTestingTasks();
|
||||
void ShowCurrentSapforPackageVersionEtalon();
|
||||
void ShowCurrentSapforPackageVersion();
|
||||
void ShowNoSapforPackageVersionEtalon();
|
||||
void ShowNoSapforPackageVersion();
|
||||
void FocusSapforTesting();
|
||||
}
|
||||
6
src/Visual_DVM_2021/UI/Interface/TestsWindow.java
Normal file
6
src/Visual_DVM_2021/UI/Interface/TestsWindow.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface TestsWindow {
|
||||
void ShowAll();
|
||||
JPanel getContent();
|
||||
}
|
||||
17
src/Visual_DVM_2021/UI/Interface/VariantsWindow.java
Normal file
17
src/Visual_DVM_2021/UI/Interface/VariantsWindow.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
public interface VariantsWindow extends VisualizerForm, FormWithSplitters {
|
||||
void ShowProjectDistribution();
|
||||
void ShowNoProjectDistribution();
|
||||
void ShowVariantsFilterButtons();
|
||||
void ShowVariantsFilter();
|
||||
void ShowNoVariantsFilter();
|
||||
void ShowTotalVariantsCount();
|
||||
void ShowFilteredVariantsCount();
|
||||
void ShowCheckedVariantsCount();
|
||||
void ShowNoCheckedVariantsCount();
|
||||
void ShowNoFilteredVariantsCount();
|
||||
void ShowNoTotalVariantsCount();
|
||||
void ShowVariants();
|
||||
void RefreshVariants();
|
||||
void ShowNoVariants();
|
||||
}
|
||||
13
src/Visual_DVM_2021/UI/Interface/VersionsWindow.java
Normal file
13
src/Visual_DVM_2021/UI/Interface/VersionsWindow.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.UI.Trees.TreeForm;
|
||||
import ProjectData.Project.db_project_info;
|
||||
public interface VersionsWindow extends VisualizerForm {
|
||||
VariantsWindow getVariantsWindow();
|
||||
void ShowProjectVariants();
|
||||
void ShowNoProjectVariants();
|
||||
void FocusDistribution();
|
||||
void BlockVariants();
|
||||
void UnblockVariants();
|
||||
void RemoveVersionFromComparison(db_project_info version);
|
||||
TreeForm getVersionsForm();
|
||||
}
|
||||
9
src/Visual_DVM_2021/UI/Interface/VisualizerForm.java
Normal file
9
src/Visual_DVM_2021/UI/Interface/VisualizerForm.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import javax.swing.*;
|
||||
public interface VisualizerForm {
|
||||
//просто некая панель, на которой может быть все что угодно. монтируется на панель родителя,
|
||||
//при условии что она BorderLayout
|
||||
default JPanel getContent() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user