no message
This commit is contained in:
143
src/_VisualDVM/Visual/Windows/AnalysisForm.form
Normal file
143
src/_VisualDVM/Visual/Windows/AnalysisForm.form
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.AnalysisForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="744" height="530"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="da14d" binding="SCX">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerSize value="0"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5d21" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="250"/>
|
||||
<minimumSize width="-1" height="250"/>
|
||||
<preferredSize width="-1" height="250"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="15930" class="javax.swing.JLabel" binding="l_lines">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/Lines.png"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="63feb" class="javax.swing.JLabel" binding="l_loops">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<icon value="icons/Loop.png"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="aa1a6" class="javax.swing.JLabel" binding="l_arrays">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<icon value="icons/Arrays.png"/>
|
||||
<text value=" Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a2d2e" class="javax.swing.JLabel" binding="l_functions">
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<icon value="icons/Function.png"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6500d" class="javax.swing.JLabel" binding="l_spf_dirs">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<icon value="icons/Menu/Privates.png"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="375fa" class="javax.swing.JLabel" binding="l_dvm_dirs">
|
||||
<constraints>
|
||||
<grid row="7" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<icon value="icons/Menu/Dvm.png"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="acfc" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="1" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="18" style="1"/>
|
||||
<text value="Данные по проекту"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="c6963" class="javax.swing.JLabel" binding="l_maxdim">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/Dimensions.png"/>
|
||||
<text value="Наибольшая размерность DVM-шаблона:"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="aa66b" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b285f" binding="regionsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
65
src/_VisualDVM/Visual/Windows/AnalysisForm.java
Normal file
65
src/_VisualDVM/Visual/Windows/AnalysisForm.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Visual.Interface.AnalysisWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
public class AnalysisForm implements AnalysisWindow {
|
||||
private JSplitPane SCX;
|
||||
private JPanel content;
|
||||
private JLabel l_lines;
|
||||
private JLabel l_loops;
|
||||
private JLabel l_arrays;
|
||||
private JLabel l_functions;
|
||||
private JLabel l_spf_dirs;
|
||||
private JLabel l_dvm_dirs;
|
||||
private JLabel l_maxdim;
|
||||
private JPanel regionsPanel;
|
||||
public AnalysisForm() {
|
||||
LoadSplitters();
|
||||
Current.getProject().parallelRegions.mountUI(regionsPanel);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectMaxDim() {
|
||||
l_maxdim.setText("Наибольшая размерность DVM-шаблона: " + Current.getProject().maxdim);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProjectMaxDim() {
|
||||
l_maxdim.setText("Наибольшая размерность DVM-шаблона: ?");
|
||||
}
|
||||
@Override
|
||||
public void ShowMetrics() {
|
||||
l_lines.setText("Общее количество строк кода: " + Current.getProject().LinesCount());
|
||||
l_spf_dirs.setText("Всего объявлено SPF директив: " + Current.getProject().SPFCount());
|
||||
l_dvm_dirs.setText("Всего объявлено DVM директив: " + Current.getProject().DVMCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowNoMetrics() {
|
||||
l_lines.setText("Общее количество строк кода: ?");
|
||||
l_spf_dirs.setText("Всего объявлено SPF директив: ?");
|
||||
l_dvm_dirs.setText("Всего объявлено DVM директив: ?");
|
||||
}
|
||||
@Override
|
||||
public void ShowRegions() {
|
||||
Current.getProject().parallelRegions.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoRegions() {
|
||||
Current.getProject().parallelRegions.ClearUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowLoopsCount() {
|
||||
l_loops.setText("Общее количество циклов: " + Current.getProject().LoopsCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowFunctionsCount() {
|
||||
l_functions.setText("Всего объявлено процедур: " + Current.getProject().FunctionsCount());
|
||||
}
|
||||
@Override
|
||||
public void ShowArraysCount() {
|
||||
l_arrays.setText(" Всего объявлено массивов: " + Current.getProject().ArraysCount());
|
||||
}
|
||||
}
|
||||
166
src/_VisualDVM/Visual/Windows/ArraysForm.form
Normal file
166
src/_VisualDVM/Visual/Windows/ArraysForm.form
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.ArraysForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="723" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="7e722">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="821d4" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="имя "/>
|
||||
<toolTipText value="по имени"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9113a" class="javax.swing.JTextField" binding="filterName" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
<text value=""/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6c0cc" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="обл. описания "/>
|
||||
<toolTipText value="по области описания"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="8e8ac" class="javax.swing.JTextField" binding="filterLocationName" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d8df6" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" : "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5c030" class="javax.swing.JTextField" binding="filterLocation" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d0c01" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="файл "/>
|
||||
<toolTipText value="по файлу объявления"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7e2df" class="javax.swing.JTextField" binding="filterFile" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f7cde" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="обл. распараллеливания"/>
|
||||
<toolTipText value="по области распаралеливания"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5ddd8" class="javax.swing.JTextField" binding="filterRegion" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="611ac" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="f86e7" binding="SC8">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="29e5b" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2a8de" binding="arraysPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="6e1c1" binding="savedArraysBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="150"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="1ca4e" binding="savedArraysPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
134
src/_VisualDVM/Visual/Windows/ArraysForm.java
Normal file
134
src/_VisualDVM/Visual/Windows/ArraysForm.java
Normal file
@@ -0,0 +1,134 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.Visual.Interface.ArraysWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
public class ArraysForm implements ArraysWindow {
|
||||
private JPanel content;
|
||||
private JPanel arraysPanel;
|
||||
private JPanel savedArraysPanel;
|
||||
public JSplitPane SC8;
|
||||
private JTextField filterName;
|
||||
private JLabel arraysMatchesLabel;
|
||||
private JTextField filterLocationName;
|
||||
private JTextField filterLocation;
|
||||
private JTextField filterFile;
|
||||
private JTextField filterRegion;
|
||||
private JPanel savedArraysBackground;
|
||||
public ArraysForm(){
|
||||
LoadSplitters();
|
||||
Current.getProject().declaratedArrays.mountUI(arraysPanel);
|
||||
Current.getProject().db.savedArrays.mountUI(savedArraysPanel);
|
||||
//--
|
||||
filterName.setText(ProjectArray.filterName);
|
||||
filterName.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterName = filterName.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterName = filterName.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//-
|
||||
filterLocation.setText(ProjectArray.filterLocation);
|
||||
filterLocation.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterLocation = filterLocation.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterLocation = filterLocation.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//-
|
||||
filterLocationName.setText(ProjectArray.filterLocationName);
|
||||
filterLocationName.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterLocationName = filterLocationName.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterLocationName = filterLocationName.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//-
|
||||
filterFile.setText(ProjectArray.filterFile);
|
||||
filterFile.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterFile = filterFile.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterFile = filterFile.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//-
|
||||
filterRegion.setText(ProjectArray.filterRegion);
|
||||
filterRegion.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterRegion = filterRegion.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
ProjectArray.filterRegion = filterRegion.getText();
|
||||
ShowArrays();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
}); }
|
||||
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void ShowArrays() {
|
||||
Current.getProject().declaratedArrays.ShowUI();
|
||||
Current.getProject().db.savedArrays.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoArrays() {
|
||||
Current.getProject().declaratedArrays.ClearUI();
|
||||
Current.getProject().db.savedArrays.ClearUI();
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
filterName = new StyledTextField();
|
||||
filterLocationName = new StyledTextField();
|
||||
filterLocation = new StyledTextField();
|
||||
filterFile = new StyledTextField();
|
||||
filterRegion = new StyledTextField();
|
||||
}
|
||||
}
|
||||
459
src/_VisualDVM/Visual/Windows/CallbackForm.form
Normal file
459
src/_VisualDVM/Visual/Windows/CallbackForm.form
Normal file
@@ -0,0 +1,459 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.CallbackForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1360" height="574"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="b57af" binding="accountTools">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
<maximumSize width="396" height="30"/>
|
||||
<minimumSize width="396" height="30"/>
|
||||
<preferredSize width="396" height="30"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="7f6d2" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" имя пользователя: "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="65fb1" class="javax.swing.JLabel" binding="lAccountName">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="18" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="20df1" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="13b74" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="адрес: "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9bf2f" class="javax.swing.JLabel" binding="lAccountMail">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="18" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="dc662" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="20d68" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="роль: "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="db256" class="javax.swing.JLabel" binding="lAccountRole">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="18" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="ac02f" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a77b0" class="javax.swing.JLabel" binding="adminLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="управление сервером "/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="3838e" binding="accountPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="11d1a" binding="SC10">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4c636" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="6b542" binding="SCX">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="30"/>
|
||||
<dividerSize value="0"/>
|
||||
<enabled value="true"/>
|
||||
<oneTouchExpandable value="false"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="a8d9e" binding="filterFormPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="41213">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="c248" class="javax.swing.JCheckBox" binding="BugReportsMyOnlyFilter">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="65" height="30"/>
|
||||
<minimumSize width="65" height="30"/>
|
||||
<preferredSize width="65" height="30"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="свои"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f2af4" class="javax.swing.JCheckBox" binding="BugReportsOpenedOnly">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="100" height="30"/>
|
||||
<minimumSize width="100" height="30"/>
|
||||
<preferredSize width="100" height="30"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="открытые"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="94f20" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="bug_"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a9e5" class="javax.swing.JTextField" binding="BugReportsKeyFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b937b" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="автор"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="4587b" class="javax.swing.JTextField" binding="BugReportsSenderNameFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f7f29" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="описание"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="26dad" class="javax.swing.JTextField" binding="BugReportsDescriptionFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f9296" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="проект"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="4c6c3" class="javax.swing.JTextField" binding="BugReportsVersionFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="fd9e5" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="исполн."/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="de2e4" class="javax.swing.JTextField" binding="BugReportsExecutorFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d5478" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="коммент."/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="344dc" class="javax.swing.JTextField" binding="BugReportsCommentFilter" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="0"/>
|
||||
<maximumSize width="75" height="25"/>
|
||||
<minimumSize width="75" height="25"/>
|
||||
<preferredSize width="75" height="25"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="2de34" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="24" height="75"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5155b" binding="bugReportsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="b15c4" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="200"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="b318" binding="currentBugReportTabs">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="9469" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Описание и комментарий"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="17145" binding="SC6">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="8ef9b" binding="descriptionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="3efc9" binding="commentPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="a54d" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Настройки"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="93e2c" binding="settingsTools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</toolbar>
|
||||
<scrollpane id="7db0c" binding="bugSettingsScroll" custom-create="true">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</scrollpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="df141" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Адресаты и исполнитель"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="14cc5" binding="SC67">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="400"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d6557" binding="subscribersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="73357" binding="workspacesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
631
src/_VisualDVM/Visual/Windows/CallbackForm.java
Normal file
631
src/_VisualDVM/Visual/Windows/CallbackForm.java
Normal file
@@ -0,0 +1,631 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Editor.BaseEditor;
|
||||
import _VisualDVM.Visual.Editor.Viewer;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import Repository.BugReport.BugReport;
|
||||
import Repository.BugReport.BugReportInterface;
|
||||
import Repository.BugReport.BugReportState;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.CallbackWindow;
|
||||
import _VisualDVM.Visual.Interface.CommentInterface;
|
||||
import _VisualDVM.Visual.Interface.DescriptionInterface;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
private final JScrollPane bugCommentScroll;
|
||||
private final JScrollPane bugReportCommentAdditionScroll;
|
||||
private final BaseEditor BugReportComment;
|
||||
private final BaseEditor BugReportCommentAddition;
|
||||
//-------------------------------------------
|
||||
private final JScrollPane bugDescriptionScroll;
|
||||
private final JScrollPane bugReportDescriptionAdditionScroll;
|
||||
private final BaseEditor BugReportDescription;
|
||||
private final BaseEditor BugReportDescriptionAddition;
|
||||
private JPanel content;
|
||||
public JSplitPane SC10;
|
||||
public DescriptionInterface descriptionInterface;
|
||||
public CommentInterface commentInterface;
|
||||
DocumentListener descriptionAdditionListener = new DocumentListener() {
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().descriptionAdditionDraft =
|
||||
BugReportDescriptionAddition.getText();
|
||||
}
|
||||
};
|
||||
DocumentListener commentAdditionListener = new DocumentListener() {
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (!Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().commentAdditionDraft = BugReportCommentAddition.getText();
|
||||
}
|
||||
};
|
||||
DocumentListener descriptionListener = new DocumentListener() {
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().description =
|
||||
BugReportDescription.getText();
|
||||
Global.componentsServer.db.bugReports.RefreshUI();
|
||||
}
|
||||
};
|
||||
DocumentListener commentListener = new DocumentListener() {
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
if (Current.getBugReport().state.equals(BugReportState.draft))
|
||||
Current.getBugReport().comment = BugReportComment.getText();
|
||||
}
|
||||
};
|
||||
//-
|
||||
private JToolBar accountTools;
|
||||
private JLabel lAccountName;
|
||||
private JLabel lAccountMail;
|
||||
private JLabel lAccountRole;
|
||||
private JPanel accountPanel;
|
||||
private JPanel bugReportsPanel;
|
||||
private JPanel filterFormPanel;
|
||||
private JPanel subscribersPanel;
|
||||
private JTabbedPane currentBugReportTabs;
|
||||
private JScrollPane bugSettingsScroll;
|
||||
private JCheckBox BugReportsMyOnlyFilter;
|
||||
private JCheckBox BugReportsOpenedOnly;
|
||||
private JToolBar bugsTools;
|
||||
private JToolBar settingsTools;
|
||||
private JToolBar descriptionTools;
|
||||
private JToolBar commentTools;
|
||||
private JToolBar descriptionAdditionTools;
|
||||
private JToolBar commentAdditionTools;
|
||||
private JPanel descriptionPanel;
|
||||
private JPanel commentPanel;
|
||||
private JSplitPane SCX;
|
||||
public JSplitPane SC6;
|
||||
private JTextField BugReportsKeyFilter;
|
||||
private JTextField BugReportsSenderNameFilter;
|
||||
private JTextField BugReportsDescriptionFilter;
|
||||
private JTextField BugReportsVersionFilter;
|
||||
private JTextField BugReportsExecutorFilter;
|
||||
private JTextField BugReportsCommentFilter;
|
||||
public JSplitPane SC67;
|
||||
private JPanel workspacesPanel;
|
||||
private JLabel adminLabel;
|
||||
private Viewer BugReportSettings;
|
||||
public void LockMyOnly() {
|
||||
if (!BugReportsMyOnlyFilter.isSelected()) {
|
||||
BugReportsMyOnlyFilter.doClick();
|
||||
}
|
||||
BugReportsMyOnlyFilter.setEnabled(false);
|
||||
}
|
||||
public void UnlockMyOnly() {
|
||||
BugReportsMyOnlyFilter.setEnabled(true);
|
||||
if (BugReportsMyOnlyFilter.isSelected()) {
|
||||
BugReportsMyOnlyFilter.doClick();
|
||||
}
|
||||
}
|
||||
public CallbackForm() {
|
||||
LoadSplitters();
|
||||
//---------------------------------
|
||||
//чтобы не было индусятины, лучше создать контролы здесь
|
||||
BugReportDescription = new BaseEditor();
|
||||
BugReportDescription.setLineWrap(true);
|
||||
bugDescriptionScroll = new JScrollPane(BugReportDescription);
|
||||
//----------------------------------------------
|
||||
BugReportDescriptionAddition = new BaseEditor();
|
||||
BugReportDescriptionAddition.setLineWrap(true);
|
||||
bugReportDescriptionAdditionScroll = new JScrollPane(BugReportDescriptionAddition);
|
||||
BugReportDescription.setWrapStyleWord(true);
|
||||
BugReportDescriptionAddition.setWrapStyleWord(true);
|
||||
//---------------------------------------------
|
||||
//-
|
||||
BugReportComment = new BaseEditor();
|
||||
BugReportComment.setLineWrap(true);
|
||||
bugCommentScroll = new JScrollPane(BugReportComment);
|
||||
//-
|
||||
BugReportCommentAddition = new BaseEditor();
|
||||
BugReportCommentAddition.setLineWrap(true);
|
||||
bugReportCommentAdditionScroll = new JScrollPane(BugReportCommentAddition);
|
||||
BugReportComment.setWrapStyleWord(true);
|
||||
BugReportCommentAddition.setWrapStyleWord(true);
|
||||
//----------------------------------------------
|
||||
//тут развилка на то вкладки или поля.
|
||||
SwitchScreen(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.SmallScreen).toBoolean());
|
||||
//-
|
||||
Global.componentsServer.db.bugReports.mountUI(bugReportsPanel);
|
||||
Global.componentsServer.db.subscribers.mountUI(subscribersPanel);
|
||||
Global.componentsServer.db.workspaces.mountUI(workspacesPanel);
|
||||
settingsTools.add(Pass_2021.passes.get(PassCode_2021.ApplyBugReportSettings).createButton());
|
||||
//-
|
||||
if (!Pass_2021.passes.get(PassCode_2021.CheckAccount).isDone()) {
|
||||
accountTools.add(Pass_2021.passes.get(PassCode_2021.CheckAccount).createButton());
|
||||
}
|
||||
//--
|
||||
BugReportsKeyFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterKey = BugReportsKeyFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterKey = BugReportsKeyFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
BugReportsSenderNameFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterSenderName = BugReportsSenderNameFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterSenderName = BugReportsSenderNameFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
BugReportsDescriptionFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterDescription = BugReportsDescriptionFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterDescription = BugReportsDescriptionFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//------->>>
|
||||
BugReportsCommentFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterComment = BugReportsCommentFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterComment = BugReportsCommentFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
BugReportsExecutorFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterExecutor = BugReportsExecutorFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterExecutor = BugReportsExecutorFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
BugReportsVersionFilter.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterVersion = BugReportsVersionFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
BugReportInterface.filterVersion = BugReportsVersionFilter.getText();
|
||||
ShowBugReports();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
//--------
|
||||
BugReportsMyOnlyFilter.addActionListener(e -> {
|
||||
BugReportInterface.filterMyOnly = BugReportsMyOnlyFilter.isSelected();
|
||||
ShowBugReports();
|
||||
});
|
||||
BugReportsOpenedOnly.addActionListener(e -> {
|
||||
BugReportInterface.filterOpenedOnly = BugReportsOpenedOnly.isSelected();
|
||||
ShowBugReports();
|
||||
});
|
||||
//-
|
||||
accountTools.addSeparator();
|
||||
accountTools.add(Pass_2021.passes.get(PassCode_2021.StartComponentsServer).createButton());
|
||||
accountTools.add(Pass_2021.passes.get(PassCode_2021.ShutdownComponentsServer).createButton());
|
||||
accountTools.add(Pass_2021.passes.get(PassCode_2021.PublishComponentsServer).createButton());
|
||||
}
|
||||
//-------------------------------------------
|
||||
DescriptionTabs descriptionTabs = new DescriptionTabs();
|
||||
DescriptionFields descriptionFields = new DescriptionFields();
|
||||
CommentTabs commentTabs = new CommentTabs();
|
||||
CommentFields commentFields = new CommentFields();
|
||||
@Override
|
||||
public void SwitchScreen(boolean small) {
|
||||
CommonUI.Clear(descriptionPanel);
|
||||
//------------------------------------------------------------------
|
||||
descriptionInterface = small ? descriptionTabs : descriptionFields;
|
||||
descriptionInterface.setEditorScroll(bugDescriptionScroll);
|
||||
descriptionInterface.setAdditionScroll(bugReportDescriptionAdditionScroll);
|
||||
descriptionPanel.add(descriptionInterface.getContent());
|
||||
//----------
|
||||
descriptionPanel.revalidate();
|
||||
descriptionPanel.repaint();
|
||||
//---------
|
||||
CommonUI.Clear(commentPanel);
|
||||
//------------------------------------------------------------------
|
||||
commentInterface = small ? commentTabs : commentFields;
|
||||
commentInterface.setEditorScroll(bugCommentScroll);
|
||||
commentInterface.setAdditionScroll(bugReportCommentAdditionScroll);
|
||||
commentPanel.add(commentInterface.getContent());
|
||||
//----------
|
||||
commentPanel.revalidate();
|
||||
commentPanel.repaint();
|
||||
}
|
||||
@Override
|
||||
public void SaveSplitters() {
|
||||
FormWithSplitters.super.SaveSplitters();
|
||||
descriptionInterface.SaveSplitters();
|
||||
commentInterface.SaveSplitters();
|
||||
}
|
||||
@Override
|
||||
public String getBugReportDescriptionText() {
|
||||
return BugReportDescription.getText();
|
||||
}
|
||||
@Override
|
||||
public String getBugReportDescriptionAdditionText() {
|
||||
return BugReportDescriptionAddition.getText();
|
||||
}
|
||||
@Override
|
||||
public String getBugReportCommentText() {
|
||||
return BugReportComment.getText();
|
||||
}
|
||||
@Override
|
||||
public String getBugReportCommentAdditionText() {
|
||||
return BugReportCommentAddition.getText();
|
||||
}
|
||||
@Override
|
||||
public void ClearBugReportDescriptionAdditionText() {
|
||||
BugReportDescriptionAddition.setText("");
|
||||
}
|
||||
@Override
|
||||
public void ClearBugReportCommentAdditionText() {
|
||||
BugReportCommentAddition.setText("");
|
||||
}
|
||||
@Override
|
||||
public void FocusRecipients() {
|
||||
currentBugReportTabs.setSelectedIndex(2);
|
||||
}
|
||||
public void SwitchListeners(boolean on) {
|
||||
if (on) {
|
||||
BugReportDescriptionAddition.getDocument().addDocumentListener(descriptionAdditionListener);
|
||||
BugReportCommentAddition.getDocument().addDocumentListener(commentAdditionListener);
|
||||
BugReportDescription.getDocument().addDocumentListener(descriptionListener);
|
||||
BugReportComment.getDocument().addDocumentListener(commentListener);
|
||||
} else {
|
||||
BugReportDescriptionAddition.getDocument().removeDocumentListener(descriptionAdditionListener);
|
||||
BugReportCommentAddition.getDocument().removeDocumentListener(commentAdditionListener);
|
||||
BugReportDescription.getDocument().removeDocumentListener(descriptionListener);
|
||||
BugReportComment.getDocument().removeDocumentListener(commentListener);
|
||||
}
|
||||
}
|
||||
private void createUIComponents() {
|
||||
BugReportSettings = new Viewer();
|
||||
bugSettingsScroll = new JScrollPane(BugReportSettings);
|
||||
//--
|
||||
BugReportsKeyFilter = new StyledTextField();
|
||||
BugReportsSenderNameFilter = new StyledTextField();
|
||||
BugReportsDescriptionFilter = new StyledTextField();
|
||||
BugReportsCommentFilter = new StyledTextField();
|
||||
BugReportsExecutorFilter = new StyledTextField();
|
||||
BugReportsVersionFilter = new StyledTextField();
|
||||
settingsTools = new VisualiserMenuBar();
|
||||
}
|
||||
public void EnableBugreports() {
|
||||
CommonUI.Clear(accountPanel);
|
||||
accountPanel.add(SC10);
|
||||
UI.getMainWindow().SwitchTestingTabs(true);
|
||||
}
|
||||
@Override
|
||||
public void setUserRights() {
|
||||
LockMyOnly();
|
||||
Pass_2021.passes.get(PassCode_2021.AddSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.EditSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DownloadAllBugReportsArchives).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriberWorkspace).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.CompileServerSapfor).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteServerSapfor).setControlsVisible(false);
|
||||
//
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownComponentsServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.StartComponentsServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishComponentsServer).setControlsVisible(false);
|
||||
//
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownTestingServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.StartTestingServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishTestingServer).setControlsVisible(false);
|
||||
UI.testingBar.showServerAdminLabel(false);
|
||||
adminLabel.setVisible(false);
|
||||
}
|
||||
private void setDeveloperRights() {
|
||||
UnlockMyOnly();
|
||||
Pass_2021.passes.get(PassCode_2021.AddSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.EditSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriber).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DownloadAllBugReportsArchives).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriberWorkspace).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.CompileServerSapfor).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteServerSapfor).setControlsVisible(false);
|
||||
//
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownComponentsServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.StartComponentsServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishComponentsServer).setControlsVisible(false);
|
||||
//
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownTestingServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.StartTestingServer).setControlsVisible(false);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishTestingServer).setControlsVisible(false);
|
||||
UI.testingBar.showServerAdminLabel(false);
|
||||
adminLabel.setVisible(false);
|
||||
}
|
||||
@Override
|
||||
public void setAdminRights() {
|
||||
UnlockMyOnly();
|
||||
Pass_2021.passes.get(PassCode_2021.AddSubscriber).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.EditSubscriber).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriber).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.DownloadAllBugReportsArchives).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteSubscriberWorkspace).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.CompileServerSapfor).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.DeleteServerSapfor).setControlsVisible(true);
|
||||
//
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownComponentsServer).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.StartComponentsServer).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishComponentsServer).setControlsVisible(true);
|
||||
//--
|
||||
Pass_2021.passes.get(PassCode_2021.ShutdownTestingServer).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.StartTestingServer).setControlsVisible(true);
|
||||
Pass_2021.passes.get(PassCode_2021.PublishTestingServer).setControlsVisible(true);
|
||||
//--
|
||||
UI.testingBar.showServerAdminLabel(true);
|
||||
adminLabel.setVisible(true);
|
||||
}
|
||||
@Override
|
||||
public void ShowAccount() {
|
||||
lAccountName.setText(CommonUtils.Brackets(Current.getAccount().name));
|
||||
lAccountMail.setText(CommonUtils.Brackets(Current.getAccount().email));
|
||||
lAccountRole.setText(CommonUtils.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
case Undefined:
|
||||
/// UI.Clear(accountPanel);
|
||||
// accountPanel.add(new CallbackWelcomeForm().content);
|
||||
// UI.getMainWindow().SwitchTestingTabs(false);
|
||||
// break;
|
||||
case User:
|
||||
//видит только свои баги.
|
||||
// EnableBugreports();
|
||||
// setUserRights();
|
||||
// break;
|
||||
case Developer:
|
||||
EnableBugreports();
|
||||
setDeveloperRights();
|
||||
break;
|
||||
case Admin:
|
||||
EnableBugreports();
|
||||
setAdminRights();
|
||||
break;
|
||||
default:
|
||||
EnableBugreports();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void ShowBugReports() {
|
||||
Global.componentsServer.db.bugReports.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoBugReports() {
|
||||
Global.componentsServer.db.bugReports.ClearUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowSubscribers() {
|
||||
Global.componentsServer.db.subscribers.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoSubscribers() {
|
||||
Global.componentsServer.db.subscribers.ClearUI();
|
||||
}
|
||||
private void ShowDraft() {
|
||||
Pass_2021.setPassesControlsVisible(true,
|
||||
PassCode_2021.PublishBugReport,
|
||||
PassCode_2021.SaveBugReportRecipients,
|
||||
PassCode_2021.SaveBugReportExecutor,
|
||||
PassCode_2021.DeleteBugReport
|
||||
);
|
||||
Pass_2021.setPassesControlsVisible(false,
|
||||
PassCode_2021.AppendBugReportDescription,
|
||||
PassCode_2021.AppendBugReportComment,
|
||||
PassCode_2021.SaveBugReportDescription,
|
||||
PassCode_2021.SaveBugReportComment,
|
||||
PassCode_2021.OpenBugReport,
|
||||
PassCode_2021.CloseBugReport,
|
||||
PassCode_2021.OpenBugReportTestProject,
|
||||
PassCode_2021.UpdateBugReportProgress
|
||||
);
|
||||
}
|
||||
private void ShowUserExecutor() {
|
||||
Pass_2021.setPassesControlsVisible(true,
|
||||
PassCode_2021.AppendBugReportComment,
|
||||
PassCode_2021.UpdateBugReportProgress,
|
||||
PassCode_2021.OpenBugReportTestProject
|
||||
);
|
||||
Pass_2021.setPassesControlsVisible(false,
|
||||
PassCode_2021.PublishBugReport,
|
||||
PassCode_2021.SaveBugReportRecipients,
|
||||
PassCode_2021.SaveBugReportExecutor,
|
||||
PassCode_2021.SaveBugReportDescription,
|
||||
PassCode_2021.SaveBugReportComment,
|
||||
PassCode_2021.AppendBugReportDescription,
|
||||
PassCode_2021.OpenBugReport,
|
||||
PassCode_2021.CloseBugReport,
|
||||
PassCode_2021.DeleteBugReport
|
||||
);
|
||||
}
|
||||
private void ShowSender() {
|
||||
Pass_2021.setPassesControlsVisible(true,
|
||||
PassCode_2021.AppendBugReportComment,
|
||||
PassCode_2021.UpdateBugReportProgress,
|
||||
PassCode_2021.OpenBugReportTestProject,
|
||||
PassCode_2021.SaveBugReportRecipients,
|
||||
PassCode_2021.SaveBugReportExecutor,
|
||||
PassCode_2021.SaveBugReportDescription,
|
||||
PassCode_2021.SaveBugReportComment,
|
||||
PassCode_2021.AppendBugReportDescription,
|
||||
PassCode_2021.OpenBugReport,
|
||||
PassCode_2021.CloseBugReport,
|
||||
PassCode_2021.DeleteBugReport
|
||||
);
|
||||
Pass_2021.setPassesControlsVisible(false,
|
||||
PassCode_2021.PublishBugReport
|
||||
);
|
||||
}
|
||||
private void ShowUser() {
|
||||
Pass_2021.setPassesControlsVisible(false,
|
||||
PassCode_2021.PublishBugReport,
|
||||
PassCode_2021.SaveBugReportRecipients,
|
||||
PassCode_2021.SaveBugReportExecutor,
|
||||
PassCode_2021.SaveBugReportDescription,
|
||||
PassCode_2021.SaveBugReportComment,
|
||||
PassCode_2021.AppendBugReportDescription,
|
||||
PassCode_2021.OpenBugReport,
|
||||
PassCode_2021.CloseBugReport,
|
||||
PassCode_2021.DeleteBugReport,
|
||||
PassCode_2021.AppendBugReportComment,
|
||||
PassCode_2021.UpdateBugReportProgress,
|
||||
PassCode_2021.OpenBugReportTestProject
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentBugReport() {
|
||||
SwitchListeners(false);
|
||||
// currentBugReportTabs.setSelectedIndex(0);
|
||||
BugReport target = Current.getBugReport();
|
||||
BugReportInterface.CheckSubscribers(target);
|
||||
Global.componentsServer.db.subscribers.ShowUI();
|
||||
//-
|
||||
BugReportDescription.setText(target.description);
|
||||
BugReportDescription.ShowBegin();
|
||||
BugReportDescriptionAddition.setText(target.descriptionAdditionDraft);
|
||||
//-
|
||||
BugReportComment.setText(target.comment);
|
||||
BugReportComment.ShowBegin();
|
||||
BugReportCommentAddition.setText(target.commentAdditionDraft);
|
||||
BugReportSettings.setText(
|
||||
String.join("\n",
|
||||
("Версия SAPFOR: " + target.sapfor_version),
|
||||
("Версия визуализатора: " + target.visualiser_version),
|
||||
target.sapfor_settings
|
||||
)
|
||||
);
|
||||
Pass_2021.setPassesControlsVisible(true, PassCode_2021.ApplyBugReportSettings);
|
||||
//
|
||||
if (target.state.equals(BugReportState.draft)) {
|
||||
ShowDraft();
|
||||
} else {
|
||||
switch (Current.getAccount().role) {
|
||||
case User:
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.sender_address)) {
|
||||
ShowSender(); //отправитель.может делать с багом все.
|
||||
} else {
|
||||
if (Current.getAccount().email.equalsIgnoreCase(target.executor_address)) {
|
||||
ShowUserExecutor(); //исполнитель. может менять прогресс и дополнять комментарий.
|
||||
} else ShowUser(); //недоступно ничего. и баг ему невидим. но на всякий случай.
|
||||
}
|
||||
break;
|
||||
case Developer:
|
||||
case Admin:
|
||||
//разработчик может все то же что и админ. они равны по правам владельцу любого бага.
|
||||
ShowSender();
|
||||
break;
|
||||
}
|
||||
}
|
||||
SwitchListeners(true);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentBugReport() {
|
||||
SwitchListeners(false);
|
||||
Global.componentsServer.db.subscribers.ShowUI();
|
||||
//-
|
||||
BugReportDescription.setText("");
|
||||
BugReportComment.setText("");
|
||||
BugReportDescriptionAddition.setText("");
|
||||
BugReportCommentAddition.setText("");
|
||||
BugReportSettings.setText("");
|
||||
//-
|
||||
Pass_2021.setPassesControlsVisible(false, PassCode_2021.SaveBugReportExecutor,
|
||||
PassCode_2021.SaveBugReportRecipients,
|
||||
PassCode_2021.AppendBugReportDescription,
|
||||
PassCode_2021.SaveBugReportDescription,
|
||||
PassCode_2021.SaveBugReportComment,
|
||||
PassCode_2021.AppendBugReportComment,
|
||||
PassCode_2021.ApplyBugReportSettings,
|
||||
PassCode_2021.PublishBugReport,
|
||||
PassCode_2021.OpenBugReport,
|
||||
PassCode_2021.CloseBugReport,
|
||||
PassCode_2021.OpenBugReportTestProject,
|
||||
PassCode_2021.UpdateBugReportProgress,
|
||||
PassCode_2021.DeleteBugReport
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void ShowSubscription() {
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
21
src/_VisualDVM/Visual/Windows/CallbackWelcomeForm.form
Normal file
21
src/_VisualDVM/Visual/Windows/CallbackWelcomeForm.form
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.CallbackWelcomeForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="893" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="e8af5" class="javax.swing.JTextArea" binding="WelcomeText">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<editable value="false"/>
|
||||
<enabled value="true"/>
|
||||
<font name="Times New Roman" size="25" style="1"/>
|
||||
<text value=" 	Чтобы получить доступ к обратной связи, пройдите регистрацию"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
6
src/_VisualDVM/Visual/Windows/CallbackWelcomeForm.java
Normal file
6
src/_VisualDVM/Visual/Windows/CallbackWelcomeForm.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import javax.swing.*;
|
||||
public class CallbackWelcomeForm {
|
||||
public JPanel content;
|
||||
private JTextArea WelcomeText;
|
||||
}
|
||||
23
src/_VisualDVM/Visual/Windows/CombineFilesDialog.java
Normal file
23
src/_VisualDVM/Visual/Windows/CombineFilesDialog.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Windows.Dialog.Text.ComboTextDialog;
|
||||
import _VisualDVM.Utils;
|
||||
|
||||
import java.util.Vector;
|
||||
public class CombineFilesDialog extends ComboTextDialog {
|
||||
public CombineFilesDialog() {
|
||||
fields.setEditable(true);
|
||||
}
|
||||
@Override
|
||||
public void validateFields() {
|
||||
super.validateFields();
|
||||
if (Log.isEmpty()) {
|
||||
String fileName = (String) fields.getSelectedItem();
|
||||
// тут 2 случая. если имя файла совпадает с 1 из существующих, то все хорошо.
|
||||
//если нет. тогда проверяем отсуствие слешей и полная валидация имени одиночного файла.
|
||||
Vector<String> files_order = Current.getProject().files_order;
|
||||
if (!files_order.contains(fileName))
|
||||
Utils.validateFileShortNewName(fileName, Log);
|
||||
}
|
||||
}
|
||||
}
|
||||
96
src/_VisualDVM/Visual/Windows/CommentFields.form
Normal file
96
src/_VisualDVM/Visual/Windows/CommentFields.form
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.CommentFields">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="21cc1" binding="SC26">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="100"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f6bb7" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="ae65d" binding="commentTools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="ad5e0" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Комментарий"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="49216" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="217fe" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="5f4e8" binding="commentAdditionTools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="8669c" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Дополнение комментария"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="e4591" binding="additionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
37
src/_VisualDVM/Visual/Windows/CommentFields.java
Normal file
37
src/_VisualDVM/Visual/Windows/CommentFields.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.CommentInterface;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CommentFields implements CommentInterface {
|
||||
public JSplitPane SC26;
|
||||
private JPanel content;
|
||||
private JToolBar commentTools;
|
||||
private JToolBar commentAdditionTools;
|
||||
private JPanel editorPanel;
|
||||
private JPanel additionPanel;
|
||||
public CommentFields() {
|
||||
LoadSplitters();
|
||||
commentTools.add(Pass_2021.passes.get(PassCode_2021.SaveBugReportComment).createButton());
|
||||
commentAdditionTools.add(Pass_2021.passes.get(PassCode_2021.AppendBugReportComment).createButton());
|
||||
}
|
||||
@Override
|
||||
public void setEditorScroll(JScrollPane scroll_in) {
|
||||
editorPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public void setAdditionScroll(JScrollPane scroll_in) {
|
||||
additionPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
commentTools = new VisualiserMenuBar();
|
||||
commentAdditionTools = new VisualiserMenuBar();
|
||||
}
|
||||
}
|
||||
40
src/_VisualDVM/Visual/Windows/CommentTabs.form
Normal file
40
src/_VisualDVM/Visual/Windows/CommentTabs.form
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.CommentTabs">
|
||||
<grid id="27dc6" binding="comment" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="84c83" binding="tabs">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="bd63f" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Описание"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="8f344" binding="additionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Дополнение описания"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
38
src/_VisualDVM/Visual/Windows/CommentTabs.java
Normal file
38
src/_VisualDVM/Visual/Windows/CommentTabs.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import _VisualDVM.Visual.Interface.CommentInterface;
|
||||
|
||||
import javax.swing.*;
|
||||
public class CommentTabs implements CommentInterface {
|
||||
private JPanel comment;
|
||||
private JTabbedPane tabs;
|
||||
private JPanel editorPanel;
|
||||
private JPanel additionPanel;
|
||||
public CommentTabs() {
|
||||
|
||||
tabs.setTabComponentAt(0, new TabToolBar("Комментарий", PassCode_2021.SaveBugReportComment) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
tabs.setSelectedIndex(0);
|
||||
}
|
||||
});
|
||||
tabs.setTabComponentAt(1, new TabToolBar("Дополнение", PassCode_2021.AppendBugReportComment) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
tabs.setSelectedIndex(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void setEditorScroll(JScrollPane scroll_in) {
|
||||
editorPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public void setAdditionScroll(JScrollPane scroll_in) {
|
||||
additionPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return comment;
|
||||
}
|
||||
}
|
||||
99
src/_VisualDVM/Visual/Windows/ComparisonForm.form
Normal file
99
src/_VisualDVM/Visual/Windows/ComparisonForm.form
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.ComparisonForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="63a72" binding="tools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
<maximumSize width="32929" height="30"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="5992c" class="javax.swing.JLabel" binding="lObjectName" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="1"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="? "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d59fd" class="javax.swing.JButton" binding="bApplyObject">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Apply.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Назначить объект для сравнения"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="dd7b1" class="javax.swing.JButton" binding="bClose">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Close.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Открепить объект"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7a4ca" class="javax.swing.JSeparator">
|
||||
<constraints/>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="75549" class="javax.swing.JButton" binding="bPrevious">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Prev.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Перейти к предыдущему различию "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f8e56" class="javax.swing.JButton" binding="bNext">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Next.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Перейти к следующему различию"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="42c3c" class="javax.swing.JButton" binding="bCompare">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<icon value="icons/Menu/Undo.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Сравнить объекты"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="8b423" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
356
src/_VisualDVM/Visual/Windows/ComparisonForm.java
Normal file
356
src/_VisualDVM/Visual/Windows/ComparisonForm.java
Normal file
@@ -0,0 +1,356 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Visual.Editor.BaseEditor;
|
||||
import _VisualDVM.Visual.Controls.ShortLabel;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Utils;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import javafx.util.Pair;
|
||||
import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaHighlighter;
|
||||
import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public abstract class ComparisonForm<T> {
|
||||
public Class<T> t; //класс объектов.
|
||||
//-->>
|
||||
private JPanel content;
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
protected JToolBar tools;
|
||||
private JPanel editorPanel;
|
||||
protected JLabel lObjectName;
|
||||
protected JButton bApplyObject;
|
||||
private JButton bPrevious;
|
||||
private JButton bNext;
|
||||
private JButton bCompare;
|
||||
protected JButton bClose;
|
||||
//-->>
|
||||
ComparisonForm<T> this_ = null; //?
|
||||
ComparisonForm<T> slave = null;
|
||||
ComparisonForm<T> master = null;
|
||||
//-->>
|
||||
protected T object = null;
|
||||
//-->>
|
||||
protected BaseEditor Body;
|
||||
private RTextScrollPane Scroll;
|
||||
//-->>
|
||||
public Vector<String> lines = new Vector<>(); //строки с учетом/неучетом пробелов. для сравнения
|
||||
public Vector<String> visible_lines = new Vector<>(); //строки с нетронутыми пробелами. для отображения
|
||||
//подсветка.
|
||||
public LinkedHashMap<Integer, Pair<Integer, Boolean>> colors = new LinkedHashMap<>();
|
||||
public RSyntaxTextAreaHighlighter slave_highlighter = null; //погонщик рабов
|
||||
//-----
|
||||
private boolean events_on = false;//относится только к мастеру, отвечает за скроллы.
|
||||
private int current_diff_line = -1;
|
||||
//--->>
|
||||
public boolean isMaster() {
|
||||
return slave != null;
|
||||
}
|
||||
public boolean isSlave() {
|
||||
return master != null;
|
||||
}
|
||||
//--->>
|
||||
//неперегружаемые методы
|
||||
protected void RemoveObject() {
|
||||
object = null;
|
||||
removeObject();
|
||||
showNoObject();
|
||||
ClearText();
|
||||
/*
|
||||
if (isMaster())
|
||||
slave.ClearText();
|
||||
else if (isSlave())
|
||||
master.ClearText();
|
||||
*/
|
||||
}
|
||||
public void ApplyObject() {
|
||||
RemoveObject();
|
||||
TextLog log = new TextLog();
|
||||
if (CurrentAnchestor.Check(log, getCurrentObjectName())) {
|
||||
object = (T) CurrentAnchestor.get(getCurrentObjectName());
|
||||
applyObject();
|
||||
showObject();
|
||||
} else
|
||||
CommonUI.Info(log.toString());
|
||||
}
|
||||
public void ApplyObject(DBObject object_in){
|
||||
RemoveObject();
|
||||
object = (T)object_in;
|
||||
applyObject();
|
||||
showObject();
|
||||
}
|
||||
private void ShowCurrentDiff() {
|
||||
Body.gotoLine_(colors.get(current_diff_line).getKey());
|
||||
}
|
||||
private void getLines() {
|
||||
lines.clear();
|
||||
visible_lines.clear();
|
||||
//--
|
||||
Pair<Vector<String>, Vector<String>> p = Utils.getFortranLines(getText());
|
||||
lines = p.getKey();
|
||||
visible_lines = p.getValue();
|
||||
}
|
||||
protected void ClearText() {
|
||||
events_on = false;
|
||||
Body.setText("объект не назначен");
|
||||
}
|
||||
//предполагаем что оба объекта есть и мы можем получить с них текст.
|
||||
protected void Compare() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = CommonConstants.Nan;
|
||||
colors.clear();
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
slave.Body.setText("");
|
||||
int d = 0;
|
||||
getLines();
|
||||
slave.getLines();
|
||||
//--------------------------------------------------------------------
|
||||
Vector<String> t1 = new Vector<>();
|
||||
Vector<String> t2 = new Vector<>();
|
||||
//------
|
||||
int old_j = 0;
|
||||
int j = 0;
|
||||
for (int i = 0; i < lines.size(); ++i) {
|
||||
if (Utils.Contains(slave.lines, lines.get(i), old_j)) {
|
||||
for (int k = old_j; k < slave.lines.size(); ++k) {
|
||||
j = k;
|
||||
if (Utils.CompareLines(lines.get(i), slave.lines.get(k))) {
|
||||
j++;
|
||||
t1.add(visible_lines.get(i));
|
||||
t2.add(slave.visible_lines.get(k));
|
||||
break;
|
||||
} else {
|
||||
t1.add("+");
|
||||
t2.add("+ " + slave.visible_lines.get(k));
|
||||
colors.put(d, new Pair(t2.size() - 1, true));
|
||||
++d;
|
||||
}
|
||||
}
|
||||
old_j = j;
|
||||
} else {
|
||||
//строки гарантированно нет.
|
||||
t1.add("- " + visible_lines.get(i));
|
||||
t2.add("- " + visible_lines.get(i));
|
||||
colors.put(d, new Pair(t2.size() - 1, false));
|
||||
++d;
|
||||
}
|
||||
}
|
||||
//теперь граничное условие. если первый файл кончился а второй нет, его остаток это добавление.
|
||||
for (int i = j; i < slave.lines.size(); ++i) {
|
||||
t1.add("+");
|
||||
t2.add("+ " + slave.visible_lines.get(i));
|
||||
colors.put(d, new Pair(t2.size() - 1, true));
|
||||
++d;
|
||||
}
|
||||
///----------------
|
||||
Body.setText(String.join("\n", t1));
|
||||
slave.Body.setText(String.join("\n", t2));
|
||||
Body.setCaretPosition(0);
|
||||
slave.Body.setCaretPosition(0);
|
||||
//теперь покрас.
|
||||
for (Integer diff_num : colors.keySet()) {
|
||||
slave_highlighter.addHighlight(
|
||||
slave.Body.getLineStartOffset(colors.get(diff_num).getKey()),
|
||||
slave.Body.getLineEndOffset(colors.get(diff_num).getKey()),
|
||||
colors.get(diff_num).getValue() ? UI.GoodLoopPainter : UI.BadLoopPainter
|
||||
);
|
||||
}
|
||||
if (colors.size() > 0) current_diff_line = 0;
|
||||
events_on = true;
|
||||
}
|
||||
public void Show() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = CommonConstants.Nan;
|
||||
colors.clear();
|
||||
//----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
slave.Body.setText("");
|
||||
int d = 0;
|
||||
getLines();
|
||||
slave.getLines();
|
||||
//--------------------------------------------------------------------
|
||||
Vector<String> t1 = new Vector<>();
|
||||
Vector<String> t2 = new Vector<>();
|
||||
//------
|
||||
t1.addAll(visible_lines);
|
||||
t2.addAll(slave.visible_lines);
|
||||
//просто выясняем кто из них длиннее, и короткий дополняем пустыми строками.]
|
||||
int delta = Math.abs(t1.size() - t2.size());
|
||||
if (lines.size() > slave.lines.size()) {
|
||||
Utils.addEmptyLines(t2, delta);
|
||||
} else if (lines.size() < slave.lines.size()) {
|
||||
Utils.addEmptyLines(t1, delta);
|
||||
}
|
||||
///----------------
|
||||
Body.setText(String.join("\n", t1));
|
||||
slave.Body.setText(String.join("\n", t2));
|
||||
Body.setCaretPosition(0);
|
||||
slave.Body.setCaretPosition(0);
|
||||
events_on = true;
|
||||
}
|
||||
//Перегружаемые методы.
|
||||
//--->>
|
||||
protected abstract Current getCurrentObjectName();
|
||||
protected void showNoObject() {
|
||||
lObjectName.setText("?");
|
||||
lObjectName.setToolTipText("Объект не назначен.");
|
||||
}
|
||||
protected void showObject() {
|
||||
if (object instanceof DBObject) {
|
||||
DBObject dbObject = (DBObject) object;
|
||||
lObjectName.setText(dbObject.toString());
|
||||
lObjectName.setToolTipText(dbObject.toString());
|
||||
}
|
||||
}
|
||||
protected void removeObject() {
|
||||
}
|
||||
protected void applyObject() {
|
||||
}
|
||||
protected abstract String getText();
|
||||
protected boolean fortranWrapsOn() {
|
||||
return false;
|
||||
}
|
||||
//--->>
|
||||
// protected Object ownScrollModel = null;
|
||||
//---<<
|
||||
public ComparisonForm(Class<T> t_in, ComparisonForm<T> slave_in) {
|
||||
//-
|
||||
Body = new BaseEditor();
|
||||
Scroll = new RTextScrollPane(Body);
|
||||
editorPanel.add(Scroll);
|
||||
// ownScrollModel = Scroll.getVerticalScrollBar().getModel();
|
||||
//-
|
||||
t = t_in;
|
||||
this_ = this;
|
||||
slave = slave_in;
|
||||
bPrevious.setVisible(isMaster());
|
||||
bNext.setVisible(isMaster());
|
||||
Scroll.setLineNumbersEnabled(true);
|
||||
bApplyObject.addActionListener(e -> {
|
||||
ApplyObject();
|
||||
});
|
||||
//--->>>
|
||||
Body.setWhitespaceVisible(true);
|
||||
Body.setEditable(false);
|
||||
if (isMaster()) {
|
||||
//<editor-fold desc="синхронизация скроллов">
|
||||
slave.Scroll.getVerticalScrollBar().setModel(Scroll.getVerticalScrollBar().getModel());
|
||||
slave_highlighter = (RSyntaxTextAreaHighlighter) slave.Body.getHighlighter();
|
||||
//бяк быть не должно при условии что строк одинаковое количество. а это должно выполняться.
|
||||
Body.addCaretListener(e -> {
|
||||
if (events_on && isReady() && slave.isReady()) {
|
||||
try {
|
||||
int master_lineNum = Body.getCaretLineNumber();
|
||||
slave.Body.setCaretPosition(slave.Body.getLineStartOffset(master_lineNum));
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
//</editor-fold>
|
||||
slave.master = this;
|
||||
bPrevious.addActionListener(e -> {
|
||||
if (current_diff_line != CommonConstants.Nan) {
|
||||
if (current_diff_line > 0)
|
||||
current_diff_line--;
|
||||
else
|
||||
current_diff_line = colors.size() - 1;
|
||||
ShowCurrentDiff();
|
||||
}
|
||||
});
|
||||
bNext.addActionListener(e -> {
|
||||
if (current_diff_line != CommonConstants.Nan) {
|
||||
if (current_diff_line < colors.size() - 1)
|
||||
current_diff_line++;
|
||||
else
|
||||
current_diff_line = 0;
|
||||
ShowCurrentDiff();
|
||||
}
|
||||
});
|
||||
bCompare.addActionListener(e -> {
|
||||
DoComparePass(isReady() && slave.isReady());
|
||||
});
|
||||
} else {
|
||||
//рабу сравнивать не положено.
|
||||
bCompare.setVisible(false);
|
||||
}
|
||||
//--->>>
|
||||
bClose.addActionListener(e -> {
|
||||
onClose();
|
||||
});
|
||||
}
|
||||
//-->>
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
lObjectName = new ShortLabel(40);
|
||||
tools = new VisualiserMenuBar();
|
||||
}
|
||||
//для сравнения по кнопке.
|
||||
public boolean isReady() {
|
||||
return object != null;
|
||||
}
|
||||
public void onClose() {
|
||||
RemoveObject();
|
||||
}
|
||||
public void DoComparePass(boolean startCondition) {
|
||||
Pass_2021 pass = new Pass_2021() {
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Сравнение";
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return startCondition;
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Compare();
|
||||
}
|
||||
};
|
||||
pass.Do();
|
||||
}
|
||||
public void DoShowPass(boolean startCondition) {
|
||||
Pass_2021 pass = new Pass_2021() {
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Отображение";
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return startCondition;
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Show();
|
||||
}
|
||||
};
|
||||
pass.Do();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
public class CompilationTasksComparisonForm extends TasksComparisonForm<CompilationTask> {
|
||||
public CompilationTasksComparisonForm(ComparisonForm<CompilationTask> slave_in) {
|
||||
super(CompilationTask.class, slave_in);
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return Current.CompilationTask;
|
||||
}
|
||||
@Override
|
||||
protected String getTextByTab() {
|
||||
switch (status) {
|
||||
case CompilationOutput:
|
||||
return object.getOutput();
|
||||
case CompilationErrors:
|
||||
return object.getErrors();
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected TasksComparisonState[] getForbiddenStates() {
|
||||
return new TasksComparisonState[]{
|
||||
TasksComparisonState.RunOutput,
|
||||
TasksComparisonState.RunErrors,
|
||||
TasksComparisonState.Sts
|
||||
};
|
||||
}
|
||||
}
|
||||
29
src/_VisualDVM/Visual/Windows/DVMRunTasksComparisonForm.java
Normal file
29
src/_VisualDVM/Visual/Windows/DVMRunTasksComparisonForm.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import TestingSystem.DVM.DVMTasks.DVMRunTask;
|
||||
public class DVMRunTasksComparisonForm extends TasksComparisonForm<DVMRunTask> {
|
||||
public DVMRunTasksComparisonForm(ComparisonForm<DVMRunTask> slave_in) {
|
||||
super(DVMRunTask.class, slave_in);
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return Current.DVMRunTask;
|
||||
}
|
||||
@Override
|
||||
protected String getTextByTab() {
|
||||
switch (status) {
|
||||
case CompilationOutput:
|
||||
return object.getCompilationOutput();
|
||||
case CompilationErrors:
|
||||
return object.getCompilationErrors();
|
||||
case RunOutput:
|
||||
return object.getOutput();
|
||||
case RunErrors:
|
||||
return object.getErrors();
|
||||
case Sts:
|
||||
return object.getStatistic();
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
393
src/_VisualDVM/Visual/Windows/DebugForm.form
Normal file
393
src/_VisualDVM/Visual/Windows/DebugForm.form
Normal file
@@ -0,0 +1,393 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.DebugForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="853" height="600"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="d4095" binding="debugTabs">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5bc0d" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Компиляция">
|
||||
<tooltip value="Компиляция"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="66319" binding="SC51">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="26730" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="41f85" binding="SC40">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="197"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e9fb3" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b9fa8" binding="compilationTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="0" height="150"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="d0a9d" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c4387" binding="SC41">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="9f685" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="200" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="3d69e" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="200" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="b9033" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="600" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="6ed81" binding="SC20">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="548"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="daa4a" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="300" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="65ac6" binding="makefilesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="709a" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="300" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="361cf" binding="modulesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="1c08a" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Запуск">
|
||||
<tooltip value="Запуск"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="44d2e" binding="SC52">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="dfa38" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="78844" binding="SC42">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94509" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c578" binding="SC43">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="10b43" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="150" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="1c6f2" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="150" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="fadcf" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e03b4" binding="runTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="c389f" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="7d248" binding="SC21">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="450"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="c844d" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="350" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7070" binding="runConfigurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="0" height="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="2473c" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="500" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="6e137" binding="SC35">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="200" height="-1"/>
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f354" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="250" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="238e" binding="environmentsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="9f17d" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="250" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ce7e2" binding="dvmParametersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
97
src/_VisualDVM/Visual/Windows/DebugForm.java
Normal file
97
src/_VisualDVM/Visual/Windows/DebugForm.java
Normal file
@@ -0,0 +1,97 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Visual.Interface.DebugWindow;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
|
||||
import javax.swing.*;
|
||||
public class DebugForm implements DebugWindow, FormWithSplitters {
|
||||
private JPanel content;
|
||||
public JSplitPane SC51;
|
||||
public JSplitPane SC40;
|
||||
public JTabbedPane debugTabs;
|
||||
public JSplitPane SC41;
|
||||
public JSplitPane SC20;
|
||||
public JSplitPane SC52;
|
||||
public JSplitPane SC42;
|
||||
public JSplitPane SC43;
|
||||
public JSplitPane SC21;
|
||||
public JSplitPane SC35;
|
||||
private JPanel compilationTasksPanel;
|
||||
private JPanel makefilesPanel;
|
||||
private JPanel modulesPanel;
|
||||
private JPanel runTasksPanel;
|
||||
private JPanel runConfigurationsPanel;
|
||||
private JPanel environmentsPanel;
|
||||
private JPanel dvmParametersPanel;
|
||||
//--
|
||||
//-
|
||||
public RunTasksComparisonForm singleRunTaskMaster; // одиночные запуски
|
||||
public RunTasksComparisonForm singleRunTaskSlave;
|
||||
//
|
||||
public CompilationTasksComparisonForm singleCompilationTaskMaster; // одиночная компиляция
|
||||
public CompilationTasksComparisonForm singleCompilationTaskSlave;
|
||||
//--
|
||||
//--
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void DropRunTasksComparison() {
|
||||
singleRunTaskMaster.RemoveObject();
|
||||
singleRunTaskSlave.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void DropCompilationTasksComparison() {
|
||||
singleCompilationTaskMaster.RemoveObject();
|
||||
singleCompilationTaskSlave.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowLastCompilationTask() {
|
||||
singleCompilationTaskMaster.ApplyObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowLastRunTask() {
|
||||
singleRunTaskMaster.ApplyObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentRunTask() {
|
||||
// if (singleRunTaskMaster.isActive()) singleRunTaskMaster.ShowTask();
|
||||
// else singleRunTaskSlave.ShowTask();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentRunTask() {
|
||||
// if (singleRunTaskMaster.isActive()) singleRunTaskMaster.Clear();
|
||||
// else singleRunTaskSlave.Clear();
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.ShowUI();
|
||||
((GlobalDatabase)CommonUtils.db).compilationTasks.ShowUI(); //их видимость зависит от текущего проекта.
|
||||
((GlobalDatabase)CommonUtils.db).runTasks.ShowUI();
|
||||
}
|
||||
public DebugForm(){
|
||||
LoadSplitters();
|
||||
//--
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.mountUI(makefilesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).modules.mountUI(modulesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.mountUI(runConfigurationsPanel);
|
||||
((GlobalDatabase)CommonUtils.db).environmentValues.mountUI(environmentsPanel);
|
||||
((GlobalDatabase)CommonUtils.db).dvmParameters.mountUI(dvmParametersPanel);
|
||||
//-
|
||||
((GlobalDatabase)CommonUtils.db).compilationTasks.mountUI(compilationTasksPanel);
|
||||
((GlobalDatabase)CommonUtils.db).runTasks.mountUI(runTasksPanel);
|
||||
//--
|
||||
singleCompilationTaskMaster = new CompilationTasksComparisonForm(singleCompilationTaskSlave = new CompilationTasksComparisonForm(null));
|
||||
singleRunTaskMaster = new RunTasksComparisonForm(singleRunTaskSlave = new RunTasksComparisonForm(null));
|
||||
//--
|
||||
//-
|
||||
SC41.setLeftComponent(singleCompilationTaskMaster.getContent());
|
||||
SC41.setRightComponent(singleCompilationTaskSlave.getContent());
|
||||
SC43.setLeftComponent(singleRunTaskMaster.getContent());
|
||||
SC43.setRightComponent(singleRunTaskSlave.getContent());
|
||||
}
|
||||
}
|
||||
91
src/_VisualDVM/Visual/Windows/DescriptionFields.form
Normal file
91
src/_VisualDVM/Visual/Windows/DescriptionFields.form
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.DescriptionFields">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="5c980" binding="SC25">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="100"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e0641" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="db173" binding="descriptionTools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="45f1e" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Описание"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="c78b" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="893bb" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="c3176" binding="descriptionAdditionTools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="7d653" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="3"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="Дополнение описания"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="e6c00" binding="additionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
38
src/_VisualDVM/Visual/Windows/DescriptionFields.java
Normal file
38
src/_VisualDVM/Visual/Windows/DescriptionFields.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.DescriptionInterface;
|
||||
|
||||
import javax.swing.*;
|
||||
public class DescriptionFields implements DescriptionInterface {
|
||||
public JSplitPane SC25;
|
||||
private JPanel content;
|
||||
private JToolBar descriptionTools;
|
||||
private JToolBar descriptionAdditionTools;
|
||||
private JPanel editorPanel;
|
||||
private JPanel additionPanel;
|
||||
public DescriptionFields() {
|
||||
LoadSplitters();
|
||||
descriptionAdditionTools.add(Pass_2021.passes.get(PassCode_2021.AppendBugReportDescription).createButton());
|
||||
descriptionTools.add(Pass_2021.passes.get(PassCode_2021.SaveBugReportDescription).createButton());
|
||||
}
|
||||
//---------
|
||||
@Override
|
||||
public void setEditorScroll(JScrollPane scroll_in) {
|
||||
editorPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public void setAdditionScroll(JScrollPane scroll_in) {
|
||||
additionPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
descriptionTools = new VisualiserMenuBar();
|
||||
descriptionAdditionTools = new VisualiserMenuBar();
|
||||
}
|
||||
}
|
||||
40
src/_VisualDVM/Visual/Windows/DescriptionTabs.form
Normal file
40
src/_VisualDVM/Visual/Windows/DescriptionTabs.form
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.DescriptionTabs">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="c1d95" binding="tabs">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="8093b" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Описание"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="2f41a" binding="additionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Дополнение описания"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
37
src/_VisualDVM/Visual/Windows/DescriptionTabs.java
Normal file
37
src/_VisualDVM/Visual/Windows/DescriptionTabs.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import _VisualDVM.Visual.Interface.DescriptionInterface;
|
||||
|
||||
import javax.swing.*;
|
||||
public class DescriptionTabs implements DescriptionInterface {
|
||||
private JPanel content;
|
||||
private JTabbedPane tabs;
|
||||
private JPanel editorPanel;
|
||||
private JPanel additionPanel;
|
||||
public DescriptionTabs() {
|
||||
tabs.setTabComponentAt(0, new TabToolBar("Описание", PassCode_2021.SaveBugReportDescription) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
tabs.setSelectedIndex(0);
|
||||
}
|
||||
});
|
||||
tabs.setTabComponentAt(1, new TabToolBar("Дополнение", PassCode_2021.AppendBugReportDescription) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
tabs.setSelectedIndex(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void setEditorScroll(JScrollPane scroll_in) {
|
||||
editorPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public void setAdditionScroll(JScrollPane scroll_in) {
|
||||
additionPanel.add(scroll_in);
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
306
src/_VisualDVM/Visual/Windows/FileForm.form
Normal file
306
src/_VisualDVM/Visual/Windows/FileForm.form
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.FileForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1046" height="655"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c0fc1" binding="SC1">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="350"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="9272e" binding="messagesBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="200" height="100"/>
|
||||
<preferredSize width="200" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="2e27d" binding="messagesTabs">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<tabLayoutPolicy value="1"/>
|
||||
<toolTipText value=""/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="97642" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Примечания" icon="icons/Notes.png">
|
||||
<tooltip value="Примечания"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<toolTipText value=""/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="c43ed" binding="notesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="8ff87" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Предупреждения" icon="icons/Warnings.png">
|
||||
<tooltip value="Предупреждения"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<toolTipText value=""/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="3ea79" binding="warningsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e3e70" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Ошибки" icon="icons/Errors.png">
|
||||
<tooltip value="Ошибки"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<toolTipText value=""/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="894a8" binding="errorsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="59a3a" binding="recommendationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Рекомендации" icon="icons/Recomendations.png">
|
||||
<tooltip value="Рекомендации"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<toolTipText value="Рекоммендации"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="35438" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Компиляция" icon="icons/CompilationOutput.png">
|
||||
<tooltip value="Компиляция"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e0364" binding="compilation_out_panel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="907aa" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Запуск" icon="icons/RunOutput.png">
|
||||
<tooltip value="Запуск"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="6231d" binding="run_out_panel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="b52a6" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="GCOV" icon="icons/GCOV.PNG">
|
||||
<tooltip value="GCOV"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="cf888" binding="gcov_log_panel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="a0d95" binding="editorBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="9b595" binding="SC12">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="30351" binding="graphsBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="150" height="150"/>
|
||||
<preferredSize width="150" height="150"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="dfe2a" binding="graphsTabs">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<tabLayoutPolicy value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="cd053" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Loop.png">
|
||||
<tooltip value="Циклы"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f6da5" binding="loopsGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="bbf0" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Function.png">
|
||||
<tooltip value="Процедуры"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f80d0" binding="functionsGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="44976" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Arrays.png">
|
||||
<tooltip value="Массивы"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="1d5e4" binding="arraysGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="8202e" binding="editorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
397
src/_VisualDVM/Visual/Windows/FileForm.java
Normal file
397
src/_VisualDVM/Visual/Windows/FileForm.java
Normal file
@@ -0,0 +1,397 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Editor.Viewer;
|
||||
import _VisualDVM.Visual.Menus.FileMenuBar.FileMenuBar;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.UI.Editor.SPFEditor;
|
||||
import ProjectData.LanguageName;
|
||||
import ProjectData.Messages.Errors.MessageError;
|
||||
import ProjectData.Messages.Notes.MessageNote;
|
||||
import ProjectData.Messages.Warnings.MessageWarning;
|
||||
import ProjectData.SapforData.Arrays.UI.FileArraysTree;
|
||||
import ProjectData.SapforData.Functions.UI.FileFunctionsTree;
|
||||
import ProjectData.SapforData.Loops.UI.FileLoopsTree;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.FileWindow;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
import _VisualDVM.Visual.Interface.SPFEditorInterface;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//контролы в столбцах
|
||||
//https://stackoverflow.com/questions/7137786/how-can-i-put-a-control-in-the-jtableheader-of-a-jtable
|
||||
//todo _ временно
|
||||
public static int current_file_line = CommonConstants.Nan;
|
||||
private final Viewer compilationOutput;
|
||||
private final Viewer runOutput;
|
||||
private final Viewer gcovLog;
|
||||
private final DBProjectFile file;
|
||||
//-
|
||||
public JSplitPane SC1;
|
||||
public JSplitPane SC12;
|
||||
//-
|
||||
private JPanel content;
|
||||
@Description("IGNORE")
|
||||
protected boolean events_on = true;
|
||||
private JButton bClose;
|
||||
private JToolBar Tools;
|
||||
private JPanel editorPanel;
|
||||
private JTabbedPane messagesTabs;
|
||||
private JPanel notesPanel;
|
||||
private JPanel warningsPanel;
|
||||
private JPanel errorsPanel;
|
||||
private JTabbedPane graphsTabs;
|
||||
private JPanel loopsGraphPanel;
|
||||
private JPanel functionsGraphPanel;
|
||||
private JPanel arraysGraphPanel;
|
||||
private JPanel gcov_log_panel;
|
||||
private JPanel compilation_out_panel;
|
||||
private JPanel run_out_panel;
|
||||
//---------------->
|
||||
private JPanel recommendationsPanel;
|
||||
private JPanel graphsBackground;
|
||||
private JPanel messagesBackground;
|
||||
private JPanel editorBackground;
|
||||
//--------------->
|
||||
//-
|
||||
private TreeForm loopsForm; //рудиментарно. следует сделать интерфейс такой же как у таблиц
|
||||
private TreeForm functionsForm;
|
||||
private TreeForm arraysForm;
|
||||
//-
|
||||
private SPFEditor Body = null; //времянка? не очень красиво.
|
||||
//-
|
||||
public FileForm(DBProjectFile file_in) {
|
||||
LoadSplitters();
|
||||
//--
|
||||
MessageWarning.filterValue = "";
|
||||
MessageError.filterValue = "";
|
||||
MessageNote.filterValue = "";
|
||||
//-
|
||||
file = file_in;
|
||||
file.father.db.notes.mountUI(notesPanel);
|
||||
file.father.db.warnings.mountUI(warningsPanel);
|
||||
file.father.db.errors.mountUI(errorsPanel);
|
||||
file.father.db.recommendations.mountUI(recommendationsPanel);
|
||||
//---------------------------------------------------------------------------
|
||||
compilation_out_panel.add(new JScrollPane(compilationOutput = new Viewer()));
|
||||
run_out_panel.add(new JScrollPane(runOutput = new Viewer()));
|
||||
gcov_log_panel.add(new JScrollPane(gcovLog = new Viewer()));
|
||||
//----------------------------------------------------------------------------
|
||||
ShowText();
|
||||
ShowMessages();
|
||||
ShowGCOVLog();
|
||||
ShowAllAnalyses();
|
||||
Body.addCaretListener(ce -> ShowCaretInfo());
|
||||
editorPanel.add(UI.fileMenuBar = new FileMenuBar(Body), BorderLayout.NORTH);
|
||||
ShowCaretInfo();
|
||||
Body.requestFocus();
|
||||
RefreshTabsNames();
|
||||
UI.fileMenuBar.sToGo.addChangeListener(e -> Body.gotoLine((Integer) UI.fileMenuBar.sToGo.getValue()));
|
||||
ShowProperties();
|
||||
Pass_2021.passes.get(PassCode_2021.Save).setControlsEnabled(false);
|
||||
//-
|
||||
if (Global.properties.collapseFileGraphs)
|
||||
CollapseGraphs();
|
||||
//-
|
||||
if (Global.properties.collapseFileMessages)
|
||||
CollapseMessages();
|
||||
}
|
||||
@Override
|
||||
public void ShowLanguage() {
|
||||
Body.switching_language = true;
|
||||
if (file.languageName.equals(LanguageName.fortran)) {
|
||||
switch (file.style) {
|
||||
case fixed:
|
||||
case extended:
|
||||
case none:
|
||||
Body.setSyntaxEditingStyle("text/FortranSPF");
|
||||
break;
|
||||
case free:
|
||||
Body.setSyntaxEditingStyle("text/FreeFortranSPF");
|
||||
break;
|
||||
}
|
||||
} else
|
||||
Body.setSyntaxEditingStyle(file.languageName.getStyleKey());
|
||||
Body.setCodeFoldingEnabled(true);
|
||||
Body.switching_language = false;
|
||||
UI.fileMenuBar.ShowLanguage();
|
||||
}
|
||||
@Override
|
||||
public void ShowType() {
|
||||
UI.fileMenuBar.ShowType();
|
||||
}
|
||||
@Override
|
||||
public void ShowStyle() {
|
||||
Body.switching_language = true;
|
||||
int m = file.style.getMargin();
|
||||
Body.setMarginLineEnabled(true);
|
||||
Body.setMarginLinePosition(m);
|
||||
if (m <= 0)
|
||||
Body.setMarginLineEnabled(false);
|
||||
if (file.languageName.equals(LanguageName.fortran)) {
|
||||
switch (file.style) {
|
||||
case fixed:
|
||||
case extended:
|
||||
case none:
|
||||
Body.setSyntaxEditingStyle("text/FortranSPF");
|
||||
break;
|
||||
case free:
|
||||
Body.setSyntaxEditingStyle("text/FreeFortranSPF");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Body.switching_language = false;
|
||||
UI.fileMenuBar.ShowStyle();
|
||||
}
|
||||
@Override
|
||||
public SPFEditorInterface getEditor() {
|
||||
return Body;
|
||||
}
|
||||
@Override
|
||||
public void FocusLoops() {
|
||||
graphsTabs.setSelectedIndex(0);
|
||||
}
|
||||
@Override
|
||||
public void FocusFunctions() {
|
||||
graphsTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void FocusArrays() {
|
||||
graphsTabs.setSelectedIndex(2);
|
||||
}
|
||||
//----
|
||||
@Override
|
||||
public void ShowWarningsCount() {
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(1, (flag ? "Предупреждения: " : "") + file.father.db.warnings.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowErrorsCount() {
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(2, (flag ? "Ошибки: " : "") + file.father.db.errors.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowNotesCount() {
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(0, (flag ? "Примечания: " : "") + file.father.db.notes.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowRecommendationsCount() {
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(3, (flag ? "Рекомендации: " : "") + file.father.db.recommendations.getVisibleKeys().size());
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public void RefreshTabsNames() {
|
||||
UI.ShowTabsNames(graphsTabs);
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
//--
|
||||
ShowNotesCount();
|
||||
ShowWarningsCount();
|
||||
ShowErrorsCount();
|
||||
ShowRecommendationsCount();
|
||||
//--
|
||||
messagesTabs.setTitleAt(4, (flag ? "Компиляция" : ""));
|
||||
messagesTabs.setTitleAt(5, (flag ? "Запуск" : ""));
|
||||
messagesTabs.setTitleAt(6, (flag ? "Журнал GCOV" : ""));
|
||||
}
|
||||
@Override
|
||||
public void FocusCompilationOut() {
|
||||
messagesTabs.setSelectedIndex(4);
|
||||
}
|
||||
@Override
|
||||
public void FocusCompilationErrors() {
|
||||
messagesTabs.setSelectedIndex(5);
|
||||
}
|
||||
@Override
|
||||
public void ShowText() {
|
||||
CommonUI.Clear(editorPanel);
|
||||
editorPanel.add(new RTextScrollPane(Body = new SPFEditor(file)));
|
||||
UI.getSearchReplaceWindow().updateEditor(Body);
|
||||
}
|
||||
@Override
|
||||
public void ShowMessages() {
|
||||
file.father.db.notes.ShowUI();
|
||||
file.father.db.warnings.ShowUI();
|
||||
file.father.db.errors.ShowUI();
|
||||
file.father.db.recommendations.ShowUI();
|
||||
ShowNotesCount();
|
||||
ShowWarningsCount();
|
||||
ShowErrorsCount();
|
||||
ShowRecommendationsCount();
|
||||
//-
|
||||
FocusMessagesPriority();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoMessages() {
|
||||
boolean full_tiles = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
file.father.db.notes.ClearUI();
|
||||
file.father.db.warnings.ClearUI();
|
||||
file.father.db.errors.ClearUI();
|
||||
file.father.db.recommendations.ClearUI();
|
||||
messagesTabs.setTitleAt(0, (full_tiles ? "Примечания: " : "") + "-");
|
||||
messagesTabs.setTitleAt(1, (full_tiles ? "Предупреждения: " : "") + "-");
|
||||
messagesTabs.setTitleAt(2, (full_tiles ? "Ошибки: " : "") + "-");
|
||||
messagesTabs.setTitleAt(3, (full_tiles ? "Рекомендации: " : "") + "-");
|
||||
}
|
||||
@Override
|
||||
public void ShowLoops() {
|
||||
loopsForm.Show();
|
||||
Body.HighlightLoops();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoLoops() {
|
||||
loopsForm.Clear();
|
||||
Body.ClearLoopsHighLights();
|
||||
}
|
||||
@Override
|
||||
public void ShowGCOVLog() {
|
||||
gcovLog.setText(file.GCOVLog);
|
||||
}
|
||||
@Override
|
||||
public void ShowGCOV() {
|
||||
Body.HighlightGCOV();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoGCOVLog() {
|
||||
gcovLog.setText("");
|
||||
}
|
||||
@Override
|
||||
public void FocusGCOVLog() {
|
||||
messagesTabs.setSelectedIndex(6);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoGCOV() {
|
||||
Body.ClearGOCVHighlights();
|
||||
}
|
||||
@Override
|
||||
public void ShowFunctions() {
|
||||
functionsForm.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoFunctions() {
|
||||
functionsForm.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowArrays() {
|
||||
arraysForm.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoArrays() {
|
||||
arraysForm.Clear();
|
||||
}
|
||||
public void EventsOn() {
|
||||
events_on = true;
|
||||
}
|
||||
public void EventsOff() {
|
||||
events_on = false;
|
||||
}
|
||||
@Override
|
||||
public void ShowCaretInfo() {
|
||||
int new_current_line = Body.getCurrentLine();
|
||||
boolean line_changed = (new_current_line != current_file_line);
|
||||
current_file_line = new_current_line;
|
||||
UI.fileMenuBar.sToGo.setModel(new SpinnerNumberModel(current_file_line,
|
||||
1, Body.getLineCount(), 1
|
||||
));
|
||||
//-
|
||||
UI.fileMenuBar.ShowLinesCount();
|
||||
UI.fileMenuBar.CurrentSymbolLabel.setText(String.valueOf(Body.getCurrentSymbol()));
|
||||
//если выделяем строку из графа, то тоже надо отключиьт события.
|
||||
//чтобы по ней не начался поиск.
|
||||
if (events_on && line_changed) {
|
||||
if (loopsForm.getTree() != null)
|
||||
loopsForm.getTree().SelectNodeByCriteria(current_file_line);
|
||||
if (functionsForm.getTree() != null)
|
||||
functionsForm.getTree().SelectNodeByCriteria(current_file_line);
|
||||
if (arraysForm.getTree() != null)
|
||||
arraysForm.getTree().SelectNodeByCriteria(current_file_line);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void FocusMessagesPriority() {
|
||||
switch (file.state) {
|
||||
case HasErrors:
|
||||
messagesTabs.setSelectedIndex(2);
|
||||
break;
|
||||
case HasWarnings:
|
||||
messagesTabs.setSelectedIndex(1);
|
||||
break;
|
||||
default:
|
||||
messagesTabs.setSelectedIndex(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void ShowFirstError() {
|
||||
if (file.father.db.errors.ui_.control.getRowCount() > 0)
|
||||
file.father.db.errors.ui_.control.SelectRow(0);
|
||||
}
|
||||
@Override
|
||||
public void ShowCompilationOutput() {
|
||||
compilationOutput.setText(file.father.compilation_output);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCompilationOutput() {
|
||||
compilationOutput.setText("");
|
||||
}
|
||||
@Override
|
||||
public void ShowRunOutput() {
|
||||
runOutput.setText(file.father.run_output);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoRunOutput() {
|
||||
runOutput.setText("");
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
loopsGraphPanel = (loopsForm = new TreeForm(FileLoopsTree.class)).getContent();
|
||||
functionsGraphPanel = (functionsForm = new TreeForm(FileFunctionsTree.class)).getContent();
|
||||
arraysGraphPanel = (arraysForm = new TreeForm(FileArraysTree.class)).getContent();
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public void CollapseGraphs() {
|
||||
CommonUtils.db.splitters.get("SC12").position = SC12.getDividerLocation();
|
||||
CommonUI.Clear(editorBackground);
|
||||
editorBackground.add(editorPanel);
|
||||
}
|
||||
@Override
|
||||
public void ExpandGraphs() {
|
||||
CommonUI.Clear(editorBackground);
|
||||
SC12.setRightComponent(editorPanel);
|
||||
editorBackground.add(SC12);
|
||||
//--
|
||||
SC12.setDividerLocation(CommonUtils.db.splitters.get("SC12").position);
|
||||
SC12.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void CollapseMessages() {
|
||||
CommonUtils.db.splitters.get("SC1").position = SC1.getDividerLocation();
|
||||
CommonUI.Clear(content);
|
||||
content.add(editorBackground);
|
||||
}
|
||||
@Override
|
||||
public void ExpandMessages() {
|
||||
CommonUI.Clear(content);
|
||||
SC1.setLeftComponent(editorBackground);
|
||||
content.add(SC1);
|
||||
SC1.setDividerLocation(CommonUtils.db.splitters.get("SC1").position);
|
||||
SC1.updateUI();
|
||||
}
|
||||
}
|
||||
276
src/_VisualDVM/Visual/Windows/FunctionsForm.form
Normal file
276
src/_VisualDVM/Visual/Windows/FunctionsForm.form
Normal file
@@ -0,0 +1,276 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.FunctionsForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1142" height="539"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="c0a67" binding="tools">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="c7ef9" class="javax.swing.JButton" binding="bZoomIn">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Editor/Font+.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Приблизить граф"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="169ae" class="javax.swing.JButton" binding="bZoomOut">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Editor/Font-.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Отдалить граф"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="752bf" class="javax.swing.JButton" binding="bSaveGraphAsImage">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/ScreenShot.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Сохранить граф как изображение"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6e55b" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" итераций "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f28ef" class="javax.swing.JSpinner" binding="sIterations">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<maximumSize width="60" height="26"/>
|
||||
<minimumSize width="60" height="26"/>
|
||||
<preferredSize width="60" height="26"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9c7af" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" связность "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="db983" class="javax.swing.JSpinner" binding="sResistance">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<maximumSize width="60" height="26"/>
|
||||
<minimumSize width="60" height="26"/>
|
||||
<preferredSize width="60" height="26"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="ce20c" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" шкала экрана "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7c318" class="javax.swing.JSpinner" binding="sScreen">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="14" style="0"/>
|
||||
<maximumSize width="60" height="26"/>
|
||||
<minimumSize width="60" height="26"/>
|
||||
<preferredSize width="60" height="26"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="77a07" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="af12" binding="filtersBar">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
<font name="Times New Roman" size="10"/>
|
||||
<preferredSize width="0" height="30"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="14db3" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="по имени: "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="882a1" class="javax.swing.JTextField" binding="filterName" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12"/>
|
||||
<maximumSize width="150" height="30"/>
|
||||
<minimumSize width="150" height="30"/>
|
||||
<preferredSize width="150" height="30"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="8ac16" class="javax.swing.JCheckBox" binding="ShowStandardFilter">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="115" height="30"/>
|
||||
<minimumSize width="115" height="30"/>
|
||||
<preferredSize width="115" height="30"/>
|
||||
<selected value="true"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="стандартные"/>
|
||||
<toolTipText value="Отображать стандартные процедуры"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="1334f" class="javax.swing.JCheckBox" binding="ShowExternalFilter">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="85" height="30"/>
|
||||
<minimumSize width="85" height="30"/>
|
||||
<preferredSize width="85" height="30"/>
|
||||
<selected value="true"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="внешние"/>
|
||||
<toolTipText value="Отображать внешние процедуры"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="b366c" class="javax.swing.JCheckBox" binding="ShowUnreachableFilter">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="124" height="30"/>
|
||||
<minimumSize width="124" height="30"/>
|
||||
<preferredSize width="124" height="30"/>
|
||||
<selected value="true"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="недостижимые"/>
|
||||
<toolTipText value="Отображать недостижимые процедуры"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6b691" class="javax.swing.JCheckBox" binding="cbShowByCurrentFunction">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="154" height="30"/>
|
||||
<minimumSize width="154" height="30"/>
|
||||
<preferredSize width="154" height="30"/>
|
||||
<selected value="false"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="смежные c текущей: "/>
|
||||
<toolTipText value="будут отображены только процедуры смежные с текущей"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="abdcb" class="javax.swing.JLabel" binding="lCurrentFunction">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="? "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="61dd9" class="javax.swing.JLabel" binding="depthLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" глубина "/>
|
||||
<toolTipText value="глубина вызовов"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="30af9" class="javax.swing.JSpinner" binding="sDepth">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12"/>
|
||||
<maximumSize width="60" height="26"/>
|
||||
<minimumSize width="60" height="26"/>
|
||||
<preferredSize width="60" height="26"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="e180e" class="javax.swing.JCheckBox" binding="ShowIn">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="91" height="30"/>
|
||||
<minimumSize width="91" height="30"/>
|
||||
<preferredSize width="91" height="30"/>
|
||||
<selected value="true"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="входящие"/>
|
||||
<toolTipText value="Отображать входящие в текущую процедуру вызовы"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="fa7b2" class="javax.swing.JCheckBox" binding="ShowOut">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="12" style="2"/>
|
||||
<horizontalAlignment value="10"/>
|
||||
<icon value="icons/NotPick.png"/>
|
||||
<maximumSize width="97" height="30"/>
|
||||
<minimumSize width="97" height="30"/>
|
||||
<preferredSize width="97" height="30"/>
|
||||
<selected value="true"/>
|
||||
<selectedIcon value="icons/Pick.png"/>
|
||||
<text value="исходящие"/>
|
||||
<toolTipText value="Отображать исходящие из текущей процедуры вызовы"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="9d9dc" binding="functionsGraphPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<background color="-4144960"/>
|
||||
<font/>
|
||||
<foreground color="-10197916"/>
|
||||
<opaque value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
195
src/_VisualDVM/Visual/Windows/FunctionsForm.java
Normal file
195
src/_VisualDVM/Visual/Windows/FunctionsForm.java
Normal file
@@ -0,0 +1,195 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphForm;
|
||||
import ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphUI;
|
||||
import Visual_DVM_2021.Passes.All.SPF_GetGraphFunctionPositions;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.FunctionsWindow;
|
||||
import javafx.util.Pair;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
public class FunctionsForm implements FunctionsWindow {
|
||||
private JPanel content;
|
||||
private JButton bFitToScreen;
|
||||
private JButton bZoomIn;
|
||||
private JButton bZoomOut;
|
||||
private JButton bSaveGraphAsImage;
|
||||
private JSpinner sIterations;
|
||||
private JSpinner sResistance;
|
||||
private JSpinner sScreen;
|
||||
private JToolBar tools;
|
||||
private JTextField filterName;
|
||||
private JCheckBox ShowStandardFilter;
|
||||
private JCheckBox ShowExternalFilter;
|
||||
private JCheckBox ShowUnreachableFilter;
|
||||
private JSpinner sDepth;
|
||||
private JCheckBox ShowIn;
|
||||
private JCheckBox ShowOut;
|
||||
private JPanel functionsGraphPanel;
|
||||
private JCheckBox cbShowByCurrentFunction;
|
||||
private JLabel lCurrentFunction;
|
||||
private JToolBar filtersBar;
|
||||
private JLabel depthLabel;
|
||||
private JButton bSaveCoordinates;
|
||||
private JToolBar currentFunctionTools;
|
||||
private FunctionsGraphForm functionsGraphForm;
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public Pair<Integer, Integer> getFunctionsGraphPanelSizes() {
|
||||
return new Pair<>(functionsGraphPanel.getWidth(), functionsGraphPanel.getHeight());
|
||||
}
|
||||
@Override
|
||||
public FunctionsGraphForm getFunctionsGraphWindow() {
|
||||
return functionsGraphForm;
|
||||
}
|
||||
@Override
|
||||
public void ShowFunctions() {
|
||||
functionsGraphForm.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoFunctions() {
|
||||
functionsGraphForm.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentFunction() {
|
||||
lCurrentFunction.setText(Current.getFunction().funcName);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentFunction() {
|
||||
lCurrentFunction.setText("?");
|
||||
}
|
||||
public void ShowFunctionGraphSettings() {
|
||||
ShowStandardFilter.setSelected(SPF_GetGraphFunctionPositions.showStandardFunctions);
|
||||
ShowExternalFilter.setSelected(SPF_GetGraphFunctionPositions.showExternalFunctions);
|
||||
ShowUnreachableFilter.setSelected(SPF_GetGraphFunctionPositions.showUnreachableFunctions);
|
||||
//-
|
||||
sIterations.setValue(Current.getProject().fgIterations);
|
||||
sResistance.setValue(Current.getProject().fgResistance);
|
||||
sScreen.setValue(Current.getProject().fgScreen);
|
||||
//-
|
||||
cbShowByCurrentFunction.setSelected(SPF_GetGraphFunctionPositions.showByCurrentFunction);
|
||||
ShowIn.setSelected(SPF_GetGraphFunctionPositions.showIn);
|
||||
ShowOut.setSelected(SPF_GetGraphFunctionPositions.showOut);
|
||||
sDepth.setValue(SPF_GetGraphFunctionPositions.depth);
|
||||
}
|
||||
public FunctionsForm() {
|
||||
LoadSplitters();
|
||||
bZoomIn.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
functionsGraphForm.control.zoomIn();
|
||||
}
|
||||
});
|
||||
bZoomOut.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
functionsGraphForm.control.zoomOut();
|
||||
}
|
||||
});
|
||||
bSaveGraphAsImage.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Pass_2021.passes.get(PassCode_2021.SaveGraph).Do();
|
||||
}
|
||||
});
|
||||
sIterations.setModel(new SpinnerNumberModel(Current.getProject().fgIterations,
|
||||
100, 5000, 100
|
||||
));
|
||||
sResistance.setModel(new SpinnerNumberModel(Current.getProject().fgResistance,
|
||||
10, 5000, 50
|
||||
));
|
||||
sScreen.setModel(new SpinnerNumberModel(Current.getProject().fgScreen,
|
||||
0.25, 2.0, 0.05
|
||||
));
|
||||
sDepth.setModel(new SpinnerNumberModel(1,
|
||||
0, 64, 1
|
||||
));
|
||||
CommonUI.MakeSpinnerRapid(sIterations, e -> {
|
||||
Current.getProject().UpdatefgIterations((int) sIterations.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
CommonUI.MakeSpinnerRapid(sResistance, e -> {
|
||||
Current.getProject().UpdatefgResistance((int) sResistance.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
CommonUI.MakeSpinnerRapid(sScreen, e -> {
|
||||
Current.getProject().UpdatefgScreen((double) sScreen.getValue());
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
CommonUI.MakeSpinnerRapid(sDepth, e -> {
|
||||
SPF_GetGraphFunctionPositions.depth = (int) sDepth.getValue();
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
});
|
||||
//----фильтрация функций
|
||||
//<editor-fold desc="Фильтрация функций">
|
||||
FunctionsGraphUI.ffTimer.setRepeats(false);
|
||||
filterName.setText(SPF_GetGraphFunctionPositions.filterName);
|
||||
filterName.getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
SPF_GetGraphFunctionPositions.filterName = filterName.getText();
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
}
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
SPF_GetGraphFunctionPositions.filterName = filterName.getText();
|
||||
FunctionsGraphUI.ffTimer.restart();
|
||||
}
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
}
|
||||
});
|
||||
ShowFunctionGraphSettings();
|
||||
//-
|
||||
ShowStandardFilter.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showStandardFunctions = ShowStandardFilter.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
ShowExternalFilter.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showExternalFunctions = ShowExternalFilter.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
ShowUnreachableFilter.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showUnreachableFunctions = ShowUnreachableFilter.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
cbShowByCurrentFunction.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showByCurrentFunction = cbShowByCurrentFunction.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
ShowIn.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showIn = ShowIn.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
ShowOut.addActionListener(e -> {
|
||||
SPF_GetGraphFunctionPositions.showOut = ShowOut.isSelected();
|
||||
FunctionsGraphUI.ffTimer.stop();
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
});
|
||||
//---------------------------------------------------------
|
||||
filtersBar.add(Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).createButton(), 0);
|
||||
filtersBar.add(Pass_2021.passes.get(PassCode_2021.ApplyCurrentFunction).createButton(), 6);
|
||||
filtersBar.setPreferredSize(new Dimension(0,30));
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
functionsGraphPanel = (functionsGraphForm = new FunctionsGraphForm()).getContent();
|
||||
filterName = new StyledTextField();
|
||||
}
|
||||
}
|
||||
28
src/_VisualDVM/Visual/Windows/MainForm.form
Normal file
28
src/_VisualDVM/Visual/Windows/MainForm.form
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.MainForm">
|
||||
<grid id="27dc6" binding="Content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1105" height="424"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="cea1" binding="mainPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="7434f" binding="globalTabs">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
260
src/_VisualDVM/Visual/Windows/MainForm.java
Normal file
260
src/_VisualDVM/Visual/Windows/MainForm.java
Normal file
@@ -0,0 +1,260 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainWindow;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Visual.Windows.Form;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Vector;
|
||||
public class MainForm extends Form implements MainWindow {
|
||||
private final WelcomeForm welcomeForm = new WelcomeForm(); //заглушка когда проекта нет.
|
||||
int global_index = 0;
|
||||
//-----------------
|
||||
private ProjectForm projectForm;
|
||||
private CallbackForm callbackForm;
|
||||
private TestsForm testsForm;
|
||||
//---
|
||||
private TestingForm testingForm;
|
||||
//-----------------
|
||||
private JPanel Content;
|
||||
private JTabbedPane globalTabs;
|
||||
private JPanel mainPanel;
|
||||
@Override
|
||||
protected JPanel getMainPanel() {
|
||||
return Content;
|
||||
}
|
||||
@Override
|
||||
protected String getFormKey() {
|
||||
return "Main"; //можно было бы через имя класса
|
||||
}
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Sapfor.png";
|
||||
}
|
||||
@Override
|
||||
public String getWTitleText() {
|
||||
return "Visual Sapfor 3.0";
|
||||
}
|
||||
@Override
|
||||
public String getUTitleText() {
|
||||
return "Visual Sapfor 3.0";
|
||||
}
|
||||
@Override
|
||||
public void AfterClose() {
|
||||
Pass_2021.passes.get(PassCode_2021.CloseCurrentProject).Do();
|
||||
if (UI.getVersionsWindow() != null)
|
||||
((VersionsForm) UI.getVersionsWindow()).SaveSplitters();
|
||||
SaveCallbackPanel();
|
||||
SaveTestsPanel();
|
||||
SaveTestingPanel();
|
||||
//--
|
||||
if (UI.getDebugWindow() != null)
|
||||
((FormWithSplitters) UI.getDebugWindow()).SaveSplitters();
|
||||
//--
|
||||
((GlobalDatabase)CommonUtils.db).SaveCredentials();
|
||||
//--
|
||||
Global.FinishApplication();
|
||||
}
|
||||
public MainForm() {
|
||||
mainPanel.add(UI.mainMenuBar, BorderLayout.NORTH);
|
||||
InstallWelcomePanel();
|
||||
InstallCallbackPanel();
|
||||
InstallTestsPanel();
|
||||
InstallTestingPanel();
|
||||
ShowUpdatesIcon();
|
||||
//----------------------
|
||||
}
|
||||
private void InstallWelcomePanel() {
|
||||
globalTabs.insertTab("Начало работы",
|
||||
null,
|
||||
welcomeForm.content,
|
||||
"Для начала работы откройте проект с помощью верхней панели инструментов, или перетащите его сюда", 0
|
||||
);
|
||||
}
|
||||
private void InstallProjectPanel() {
|
||||
globalTabs.insertTab("", null,
|
||||
(projectForm = new ProjectForm()).content, Current.getProject().description, 0);
|
||||
globalTabs.setTabComponentAt(0,
|
||||
new TabToolBar("Проект: " + Current.getProject().name, PassCode_2021.CloseCurrentProject) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
globalTabs.setSelectedIndex(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
private void RemoveProjectPanel() {
|
||||
globalTabs.removeTabAt(0);
|
||||
if (projectForm != null) {
|
||||
projectForm.SaveSplitters();
|
||||
projectForm = null;
|
||||
}
|
||||
}
|
||||
private void InstallCallbackPanel() {
|
||||
globalTabs.insertTab("Обратная связь",
|
||||
CommonUtils.getIcon("/icons/Bug.png"),
|
||||
(callbackForm = new CallbackForm()).getContent(),
|
||||
"Журнал ошибок и связь с разработчиками", 1);
|
||||
}
|
||||
private void SaveCallbackPanel() {
|
||||
if (callbackForm != null) {
|
||||
callbackForm.SaveSplitters();
|
||||
callbackForm = null;
|
||||
}
|
||||
}
|
||||
private void InstallTestsPanel() {
|
||||
globalTabs.insertTab("Тесты",
|
||||
CommonUtils.getIcon("/icons/Library.PNG"),
|
||||
(testsForm = new TestsForm()).getContent(),
|
||||
"Библиотека тестов на сервере", 2);
|
||||
}
|
||||
private void SaveTestsPanel() {
|
||||
if (testsForm != null) {
|
||||
testsForm.SaveSplitters();
|
||||
testsForm = null;
|
||||
}
|
||||
}
|
||||
private void InstallTestingPanel() {
|
||||
testingForm = new TestingForm();
|
||||
globalTabs.insertTab("Тестирование",
|
||||
CommonUtils.getIcon("/icons/Session.png"),
|
||||
testingForm.getContent(),
|
||||
"Система тестирования", 3);
|
||||
}
|
||||
/*
|
||||
public void ShowCurrentCompiler() {
|
||||
String res = "";
|
||||
if (Current.HasMachine()) {
|
||||
res += "@" + Current.getMachine().getURL();
|
||||
if (Current.HasUser()) {
|
||||
res = Current.getUser().login + res;
|
||||
} else res = "?" + res;
|
||||
|
||||
if (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) {
|
||||
res += "DVM система: " + Current.getCompiler().description;
|
||||
} else {
|
||||
res += "DVM система: ?";
|
||||
}
|
||||
} else {
|
||||
res += "?@?";
|
||||
}
|
||||
globalTabs.setTitleAt(2, res);
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
public void ShowCheckedTestsCount() {
|
||||
int res = 0;
|
||||
for (Group group : Global.testingServer.db.groups.getCheckedItems()) {
|
||||
Vector<Test> selected_tests = new Vector<>();
|
||||
Vector<Test> group_tests = new Vector<>();
|
||||
for (Test test : Global.testingServer.db.tests.Data.values()) {
|
||||
if (test.group_id == group.id) {
|
||||
if (test.isSelected())
|
||||
selected_tests.add(test);
|
||||
else
|
||||
group_tests.add(test);
|
||||
}
|
||||
}
|
||||
//-
|
||||
if (selected_tests.isEmpty())
|
||||
res += group_tests.size();
|
||||
else
|
||||
res += selected_tests.size();
|
||||
}
|
||||
//--
|
||||
globalTabs.setTitleAt(2, "Тесты: " + res);
|
||||
}
|
||||
private void SaveTestingPanel() {
|
||||
if (testingForm != null) {
|
||||
testingForm.SaveSplitters();
|
||||
testingForm = null;
|
||||
}
|
||||
}
|
||||
private void saveGlobalTab() {
|
||||
global_index = globalTabs.getSelectedIndex();
|
||||
}
|
||||
private void restoreGlobalTab() {
|
||||
globalTabs.setSelectedIndex(global_index);
|
||||
}
|
||||
@Override
|
||||
public ProjectWindow getProjectWindow() {
|
||||
return projectForm;
|
||||
}
|
||||
@Override
|
||||
public CallbackWindow getCallbackWindow() {
|
||||
return callbackForm;
|
||||
}
|
||||
@Override
|
||||
public TestsWindow getTestsWindow() {
|
||||
return testsForm;
|
||||
}
|
||||
@Override
|
||||
public void ShowUpdatesIcon() {
|
||||
UI.mainMenuBar.ShowUpdatesIcon();
|
||||
}
|
||||
@Override
|
||||
public void FocusProject() {
|
||||
globalTabs.setSelectedIndex(0);
|
||||
}
|
||||
@Override
|
||||
public void FocusCallback() {
|
||||
globalTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void FocusTests() {
|
||||
globalTabs.setSelectedIndex(2);
|
||||
}
|
||||
@Override
|
||||
public void FocusTesting() {
|
||||
globalTabs.setSelectedIndex(3);
|
||||
}
|
||||
@Override
|
||||
public void SwitchTestingTabs(boolean flag) {
|
||||
globalTabs.setEnabledAt(2, flag);
|
||||
globalTabs.setEnabledAt(3, flag);
|
||||
// globalTabs.setEnabledAt(4, flag);
|
||||
}
|
||||
@Override
|
||||
public TestingWindow getTestingWindow() {
|
||||
return testingForm;
|
||||
}
|
||||
@Override
|
||||
public void Show() {
|
||||
//приходится идти на это только ПОСЛЕ создания главного окна.
|
||||
// иначе ссылка на главное окно в методах пустая.
|
||||
getCallbackWindow().ShowAll();
|
||||
getTestsWindow().ShowAll();
|
||||
if (getTestingWindow() != null)
|
||||
getTestingWindow().ShowAll();
|
||||
CommonUI.windowsStack.push(this);
|
||||
super.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowProject() {
|
||||
//-
|
||||
saveGlobalTab();
|
||||
RemoveProjectPanel();
|
||||
InstallProjectPanel();
|
||||
restoreGlobalTab();
|
||||
UI.getDebugWindow().DropCompilationTasksComparison();
|
||||
UI.mainMenuBar.ShowProject(true);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProject() {
|
||||
//-
|
||||
saveGlobalTab();
|
||||
RemoveProjectPanel();
|
||||
InstallWelcomePanel();
|
||||
restoreGlobalTab();
|
||||
UI.mainMenuBar.ShowProject(false);
|
||||
}
|
||||
}
|
||||
43
src/_VisualDVM/Visual/Windows/ProfilesFields.form
Normal file
43
src/_VisualDVM/Visual/Windows/ProfilesFields.form
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.ProfilesFields">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="67149" binding="SC61">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="100"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="84c7b" binding="profilesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="120"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="d663" binding="settingsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="120"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
22
src/_VisualDVM/Visual/Windows/ProfilesFields.java
Normal file
22
src/_VisualDVM/Visual/Windows/ProfilesFields.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class ProfilesFields implements DialogFields, FormWithSplitters {
|
||||
private JPanel content;
|
||||
public JSplitPane SC61;
|
||||
private JPanel profilesPanel;
|
||||
private JPanel settingsPanel;
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
public ProfilesFields(){
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.mountUI(profilesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfilesSettings.mountUI(settingsPanel);
|
||||
}
|
||||
}
|
||||
75
src/_VisualDVM/Visual/Windows/ProfilesForm.java
Normal file
75
src/_VisualDVM/Visual/Windows/ProfilesForm.java
Normal file
@@ -0,0 +1,75 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import Common.Database.Objects.DBForm.DBForm;
|
||||
import GlobalData.GlobalDatabase;
|
||||
//todo разобраться с DBform
|
||||
public class ProfilesForm extends Dialog<Object, ProfilesFields> {
|
||||
private DBForm info = null;
|
||||
public ProfilesForm() {
|
||||
super(ProfilesFields.class);
|
||||
}
|
||||
@Override
|
||||
public boolean NeedsScroll() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public void CreateButtons() {
|
||||
}
|
||||
@Override
|
||||
public void Init(Object... params) {
|
||||
if (((GlobalDatabase)CommonUtils.db).sapforProfiles.size() > 0) {
|
||||
for (Object key : ((GlobalDatabase)CommonUtils.db).sapforProfiles.Data.keySet()) {
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.ShowUI(key);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
((GlobalDatabase)CommonUtils.db).sapforProfiles.ShowUI();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public int getDefaultWidth() {
|
||||
return 400;
|
||||
}
|
||||
@Override
|
||||
public int getDefaultHeight() {
|
||||
return 300;
|
||||
}
|
||||
@Override
|
||||
public void CreateContent() {
|
||||
super.CreateContent();
|
||||
fields.LoadSplitters();
|
||||
try {
|
||||
LoadWindowParameters();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onClose() {
|
||||
fields.SaveSplitters();
|
||||
try {
|
||||
SaveWindowParameters();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
protected String getFormKey() {
|
||||
return "Profiles"; //можно было бы через имя класса
|
||||
}
|
||||
public void LoadWindowParameters() throws Exception {
|
||||
if (((GlobalDatabase)CommonUtils.db).forms.Data.containsKey(getFormKey())) {
|
||||
info = ((GlobalDatabase)CommonUtils.db).forms.Data.get(getFormKey());
|
||||
info.Apply(this);
|
||||
return;
|
||||
}
|
||||
setSize(getDefaultWidth(), getDefaultHeight());
|
||||
}
|
||||
public void SaveWindowParameters() throws Exception {
|
||||
if (info != null) {
|
||||
info.Init(this);
|
||||
CommonUtils.db.Update(info);
|
||||
} else
|
||||
CommonUtils.db.Insert(new DBForm(getFormKey(), this));
|
||||
}
|
||||
}
|
||||
184
src/_VisualDVM/Visual/Windows/ProjectForm.form
Normal file
184
src/_VisualDVM/Visual/Windows/ProjectForm.form
Normal file
@@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.ProjectForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1330" height="468"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="bf9cd" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="11ba1" binding="projectTabs">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<tabLayoutPolicy value="1"/>
|
||||
<tabPlacement value="1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7bb8d" binding="projectBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Файл: -" icon="icons/Generate.png">
|
||||
<tooltip value="Код"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="68abc" binding="SC3">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="650"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b29f8" binding="fileBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="550" height="250"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="45a5e" binding="projectTreesBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="250" height="250"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="12cee" binding="projectViewPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="0" height="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="c4ea6" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Arrays.png">
|
||||
<tooltip value="Массивы"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="143c4" binding="arraysFormPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="a4700" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Function.png">
|
||||
<tooltip value="Процедуры"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="a93f7" binding="functionsFormPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="3cb4d" binding="analysisFormPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Metrics.png">
|
||||
<tooltip value="Анализ"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="59473" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="" icon="icons/Log.png">
|
||||
<tooltip value="Журнал"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<scrollpane id="43580" binding="logScroll" custom-create="true">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</scrollpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
309
src/_VisualDVM/Visual/Windows/ProjectForm.java
Normal file
309
src/_VisualDVM/Visual/Windows/ProjectForm.java
Normal file
@@ -0,0 +1,309 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Editor.Viewer;
|
||||
import _VisualDVM.Visual.Menus.ProjectMenuBar.ProjectMenuBar;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.UI.FilesTree;
|
||||
import ProjectData.ProjectView;
|
||||
import ProjectData.SapforData.Functions.UI.InlineTree;
|
||||
import ProjectData.SapforData.Functions.UI.InlineTree2;
|
||||
import ProjectData.SapforData.Includes.UI.IncludesTree;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
import _VisualDVM.Visual.Interface.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
private final ArraysWindow arraysForm;
|
||||
private final FunctionsWindow functionsForm;
|
||||
private final AnalysisWindow analysisForm;
|
||||
public JSplitPane SC3;
|
||||
//</editor-fold>
|
||||
public JPanel content;
|
||||
public TreeForm includesForm;
|
||||
private JTabbedPane projectTabs;
|
||||
private TreeForm filesForm;
|
||||
private Viewer projectDescription = null;
|
||||
private JScrollPane logScroll;
|
||||
private JPanel inlinePanel2;
|
||||
private JPanel inlinePanel;
|
||||
private TreeForm inlineForm;
|
||||
private TreeForm inlineForm2;
|
||||
private Viewer logText;
|
||||
private JPanel includesPanel;
|
||||
private JPanel fileBackground;
|
||||
private JPanel arraysFormPanel;
|
||||
private JPanel functionsFormPanel;
|
||||
private JPanel analysisFormPanel;
|
||||
private final JScrollPane FastAccessScroll;
|
||||
private JPanel projectViewPanel;
|
||||
private JPanel projectTreesBackground;
|
||||
private JPanel projectBackground;
|
||||
ProjectMenuBar menuBar;
|
||||
//-
|
||||
@Override
|
||||
public ArraysWindow getArraysWindow() {
|
||||
return arraysForm;
|
||||
}
|
||||
@Override
|
||||
public FunctionsWindow getFunctionsWindow() {
|
||||
return functionsForm;
|
||||
}
|
||||
@Override
|
||||
public AnalysisWindow getAnalysisWindow() {
|
||||
return analysisForm;
|
||||
}
|
||||
public ProjectForm() {
|
||||
LoadSplitters();
|
||||
//-
|
||||
projectTreesBackground.add(menuBar = new ProjectMenuBar(), BorderLayout.NORTH);
|
||||
arraysFormPanel.add((arraysForm = new ArraysForm()).getContent());
|
||||
functionsFormPanel.add((functionsForm = new FunctionsForm()).getContent());
|
||||
analysisFormPanel.add((analysisForm = new AnalysisForm()).getContent());
|
||||
//-
|
||||
FastAccessScroll = new JScrollPane(UI.fastAccessMenuBar) {
|
||||
{
|
||||
getHorizontalScrollBar().setPreferredSize(new Dimension(0, 10));
|
||||
setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
|
||||
setPreferredSize(new Dimension(-1, 45));
|
||||
}
|
||||
};
|
||||
content.add(FastAccessScroll, BorderLayout.NORTH);
|
||||
//-
|
||||
filesForm.Show();
|
||||
InstallVersionsPanel();
|
||||
InstallDebugPanel();
|
||||
UI.getDebugWindow().ShowAll();
|
||||
ShowAllAnalyses();
|
||||
ShowProjectView();
|
||||
SwitchScreen(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.SmallScreen).toBoolean());
|
||||
RefreshTabsNames();
|
||||
//--
|
||||
if (Global.properties.collapseProjectTrees)
|
||||
CollapseProjectTrees();
|
||||
//--
|
||||
}
|
||||
@Override
|
||||
public void SaveSplitters() {
|
||||
FormWithSplitters.super.SaveSplitters();
|
||||
arraysForm.SaveSplitters();
|
||||
analysisForm.SaveSplitters();
|
||||
functionsForm.SaveSplitters();
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
filesForm = new TreeForm(FilesTree.class);
|
||||
projectDescription = new Viewer();
|
||||
logText = new Viewer();
|
||||
logScroll = new JScrollPane(logText);
|
||||
includesForm = new TreeForm(IncludesTree.class);
|
||||
inlineForm = new TreeForm(InlineTree.class);
|
||||
inlineForm2 = new TreeForm(InlineTree2.class);
|
||||
}
|
||||
@Override
|
||||
public void RefreshProjectFiles() {
|
||||
filesForm.Refresh();
|
||||
}
|
||||
@Override
|
||||
public void ShowSelectedDirectory() {
|
||||
}
|
||||
@Override
|
||||
public void ShowSelectedFile() {
|
||||
}
|
||||
@Override
|
||||
public void ShowNoSelectedFile() {
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectSapforLog() {
|
||||
logText.setText(Current.getProject().Log);
|
||||
logText.setCaretPosition(0);
|
||||
}
|
||||
@Override
|
||||
public void ShowFunctions() {
|
||||
functionsForm.ShowFunctions();
|
||||
inlineForm.Show();
|
||||
inlineForm2.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoFunctions() {
|
||||
functionsForm.ShowNoFunctions();
|
||||
inlineForm.Clear();
|
||||
inlineForm2.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoIncludes() {
|
||||
includesForm.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowIncludes() {
|
||||
includesForm.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowFile() {
|
||||
//пока текущий файл только один.
|
||||
//filesTabs.insertTab(null, null, (Current.getFile().form = new FileForm(Current.getFile())).content,
|
||||
// "текущий файл проекта", 0);
|
||||
//filesTabs.setTabComponentAt(0,
|
||||
// new TabToolBar(Current.getFile().name, PassCode_2021.CloseCurrentFile));
|
||||
// projectTabs.setTitleAt(0, "Файл: " + Current.getFile().name);
|
||||
fileBackground.add((Current.getFile().form = new FileForm(Current.getFile())).getContent());
|
||||
projectTabs.setTabComponentAt(0,
|
||||
new TabToolBar("Файл: " + Current.getFile().name, PassCode_2021.CloseCurrentFile) {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
projectTabs.setSelectedIndex(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void ShowNoFile() {
|
||||
// projectTabs.setTitleAt(0, "Файл: -");
|
||||
projectTabs.setTabComponentAt(0, new TabToolBar("Файл: -") {
|
||||
@Override
|
||||
public void leftMouseAction() {
|
||||
projectTabs.setSelectedIndex(0);
|
||||
}
|
||||
});
|
||||
CommonUI.Clear(fileBackground);
|
||||
//filesTabs.removeAll();
|
||||
}
|
||||
@Override
|
||||
public void GotoFile(String fileName, int line, boolean focus) {
|
||||
if (focus) FocusFile();
|
||||
if (Current.HasFile() && Current.getFile().name.equals(fileName))
|
||||
Current.getFile().form.getEditor().gotoLine(line);
|
||||
else if (Current.getProject().db.files.containsKey(fileName)) {
|
||||
DBProjectFile targetFile = Current.getProject().db.files.get(fileName);
|
||||
targetFile.UpdateLastLine(line);
|
||||
Pass_2021.passes.get(PassCode_2021.OpenCurrentFile).Do(targetFile);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void FocusFile() {
|
||||
projectTabs.setSelectedIndex(0);
|
||||
}
|
||||
@Override
|
||||
public void FocusFileTabs() {
|
||||
projectTabs.requestFocus();
|
||||
}
|
||||
@Override
|
||||
public void FocusDependencies() {
|
||||
FocusFile();
|
||||
menuBar.projectViewMenu.SelectView(ProjectView.Includes);
|
||||
}
|
||||
@Override
|
||||
public void FocusArrays() {
|
||||
projectTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void FocusFunctions() {
|
||||
projectTabs.setSelectedIndex(2);
|
||||
menuBar.projectViewMenu.SelectView(ProjectView.FunctionsHierarchy);
|
||||
}
|
||||
@Override
|
||||
public void FocusAnalysis() {
|
||||
projectTabs.setSelectedIndex(3);
|
||||
}
|
||||
@Override
|
||||
public void FocusHierarchy() {
|
||||
FocusFile();
|
||||
menuBar.projectViewMenu.SelectView(ProjectView.FunctionsHierarchy);
|
||||
}
|
||||
@Override
|
||||
public void FocusPoints() {
|
||||
FocusFile();
|
||||
menuBar.projectViewMenu.SelectView(ProjectView.FunctionsCallsPoints);
|
||||
}
|
||||
@Override
|
||||
public void RefreshTabsNames() {
|
||||
UI.ShowTabsNames(projectTabs, 1);
|
||||
}
|
||||
@Override
|
||||
public void RefreshProjectTreeAndMessages() {
|
||||
RefreshProjectFiles();
|
||||
DBProjectFile badFile = Current.getProject().getFirstBadFile();
|
||||
if (badFile != null) {
|
||||
Pass_2021.passes.get(PassCode_2021.OpenCurrentFile).Do(badFile);
|
||||
UI.getMainWindow().FocusProject();
|
||||
UI.getMainWindow().getProjectWindow().FocusFile();
|
||||
}
|
||||
//-
|
||||
if (Current.HasFile()) {
|
||||
Current.getFile().form.ShowMessages();
|
||||
if (badFile != null && badFile.equals(Current.getFile()))
|
||||
Current.getFile().form.ShowFirstError();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public TreeForm getFilesTreeForm() {
|
||||
return filesForm;
|
||||
}
|
||||
@Override
|
||||
public void SwitchScreen(boolean small) {
|
||||
FastAccessScroll.setVisible(!small);
|
||||
content.repaint();
|
||||
content.revalidate();
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectView() {
|
||||
CommonUI.Clear(projectViewPanel);
|
||||
ProjectView view = Current.getProjectView();
|
||||
menuBar.getProjectViewMenu().setToolTipText(view.getDescription());
|
||||
menuBar.getProjectViewMenu().setIcon(CommonUtils.getIcon(view.getIcon()));
|
||||
switch (view) {
|
||||
case Files:
|
||||
projectViewPanel.add(filesForm.getContent());
|
||||
break;
|
||||
case Includes:
|
||||
projectViewPanel.add(includesForm.getContent());
|
||||
break;
|
||||
case FunctionsHierarchy:
|
||||
projectViewPanel.add(inlineForm2.getContent());
|
||||
break;
|
||||
case FunctionsCallsPoints:
|
||||
projectViewPanel.add(inlineForm.getContent());
|
||||
break;
|
||||
}
|
||||
projectViewPanel.revalidate();
|
||||
}
|
||||
//-
|
||||
private void InstallVersionsPanel() {
|
||||
projectTabs.insertTab("",
|
||||
CommonUtils.getIcon("/icons/VersionsTree.png"),
|
||||
UI.getVersionsWindow().getContent(),
|
||||
"Версии", 5);
|
||||
}
|
||||
private void InstallDebugPanel() {
|
||||
projectTabs.insertTab("",
|
||||
CommonUtils.getIcon("/icons/Command.png"),
|
||||
UI.getDebugWindow().getContent(),
|
||||
"Компиляция и запуск", 6);
|
||||
}
|
||||
@Override
|
||||
public void FocusVersions() {
|
||||
projectTabs.setSelectedIndex(5);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public void CollapseProjectTrees() {
|
||||
CommonUtils.db.splitters.get("SC3").position = SC3.getDividerLocation();
|
||||
//---
|
||||
CommonUI.Clear(projectBackground);
|
||||
projectBackground.add(fileBackground);
|
||||
}
|
||||
@Override
|
||||
public void ExpandProjectTrees() {
|
||||
SC3.setLeftComponent(fileBackground);
|
||||
projectBackground.add(SC3);
|
||||
SC3.setDividerLocation(CommonUtils.db.splitters.get("SC3").position);
|
||||
SC3.updateUI();
|
||||
}
|
||||
}
|
||||
36
src/_VisualDVM/Visual/Windows/RunTasksComparisonForm.java
Normal file
36
src/_VisualDVM/Visual/Windows/RunTasksComparisonForm.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.Tasks.RunTask.RunTask;
|
||||
public class RunTasksComparisonForm extends TasksComparisonForm<RunTask> {
|
||||
public RunTasksComparisonForm(ComparisonForm<RunTask> slave_in) {
|
||||
super(RunTask.class, slave_in);
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return Current.RunTask;
|
||||
}
|
||||
@Override
|
||||
protected TasksComparisonState getFirstState() {
|
||||
return TasksComparisonState.RunOutput;
|
||||
}
|
||||
@Override
|
||||
protected TasksComparisonState[] getForbiddenStates() {
|
||||
return new TasksComparisonState[]{
|
||||
TasksComparisonState.CompilationOutput,
|
||||
TasksComparisonState.CompilationErrors
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected String getTextByTab() {
|
||||
switch (status) {
|
||||
case RunOutput:
|
||||
return object.getOutput();
|
||||
case RunErrors:
|
||||
return object.getErrors();
|
||||
case Sts:
|
||||
return object.getLocalStsText();
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
113
src/_VisualDVM/Visual/Windows/SapforPackagesComparisonForm.form
Normal file
113
src/_VisualDVM/Visual/Windows/SapforPackagesComparisonForm.form
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.SapforPackagesComparisonForm">
|
||||
<grid id="27dc6" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="90950" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="9400d" binding="tools" custom-create="true">
|
||||
<constraints border-constraint="North"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
<maximumSize width="32929" height="30"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="9e365" class="javax.swing.JLabel" binding="lObjectName" custom-create="true">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="1"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="? "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="d1041" class="javax.swing.JButton" binding="bApplyObject">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Apply.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Назначить объект для сравнения"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="c8651" class="javax.swing.JButton" binding="bClose">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Close.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Открепить объект"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="37251" class="javax.swing.JSeparator">
|
||||
<constraints/>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="335a7" class="javax.swing.JButton" binding="bPrevious">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Prev.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Перейти к предыдущему различию "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="1f666" class="javax.swing.JButton" binding="bNext">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<icon value="icons/Next.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Перейти к следующему различию"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="155b4" class="javax.swing.JButton" binding="bCompare">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<icon value="icons/Menu/Undo.png"/>
|
||||
<maximumSize width="30" height="30"/>
|
||||
<minimumSize width="30" height="30"/>
|
||||
<preferredSize width="30" height="30"/>
|
||||
<text value=""/>
|
||||
<toolTipText value="Сравнить объекты"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="69fc0" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="24e20" binding="treePanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
287
src/_VisualDVM/Visual/Windows/SapforPackagesComparisonForm.java
Normal file
287
src/_VisualDVM/Visual/Windows/SapforPackagesComparisonForm.java
Normal file
@@ -0,0 +1,287 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Visual.Controls.ShortLabel;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Utils.TextLog;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import TestingSystem.SAPFOR.SapforTask.SapforTask;
|
||||
import TestingSystem.SAPFOR.SapforTasksPackage.UI.SapforTasksPackageTree;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
public class SapforPackagesComparisonForm {
|
||||
public boolean comparisonMode = false;
|
||||
//-->>
|
||||
private JPanel content;
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
protected JToolBar tools;
|
||||
protected JLabel lObjectName;
|
||||
private JButton bApplyObject;
|
||||
private JButton bPrevious;
|
||||
private JButton bNext;
|
||||
private JButton bCompare;
|
||||
private JButton bClose;
|
||||
private JPanel treePanel;
|
||||
//-->>
|
||||
SapforPackagesComparisonForm this_ = null; //?
|
||||
SapforPackagesComparisonForm slave = null;
|
||||
SapforPackagesComparisonForm master = null;
|
||||
//-->>
|
||||
protected SapforPackage object = null;
|
||||
//-->>
|
||||
protected SapforTasksPackageTree Body;
|
||||
public JScrollPane treeScroll = null;
|
||||
//--->>
|
||||
public boolean isMaster() {
|
||||
return slave != null;
|
||||
}
|
||||
public boolean isSlave() {
|
||||
return master != null;
|
||||
}
|
||||
//--->>
|
||||
//неперегружаемые методы
|
||||
protected void RemoveObject() {
|
||||
object = null;
|
||||
showNoObject();
|
||||
//--
|
||||
if (comparisonMode) {
|
||||
comparisonMode = false;
|
||||
if (isMaster()) {
|
||||
slave.comparisonMode = false;
|
||||
slave.object = null;
|
||||
slave.showNoObject();
|
||||
} else {
|
||||
master.comparisonMode = false;
|
||||
master.object = null;
|
||||
master.showNoObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void ApplyObject() {
|
||||
//---Загрузка
|
||||
RemoveObject();
|
||||
//---
|
||||
TextLog log = new TextLog();
|
||||
if (CurrentAnchestor.Check(log, Current.SapforPackage)) {
|
||||
object = Current.getSapforPackage();
|
||||
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforPackage).Do(object))) {
|
||||
showObject();
|
||||
}
|
||||
} else
|
||||
CommonUI.Info(log.toString());
|
||||
}
|
||||
public void ApplyObject(DBObject object_in) {
|
||||
RemoveObject();
|
||||
object = (SapforPackage) object_in;
|
||||
if (object.isLoaded() || (Pass_2021.passes.get(PassCode_2021.DownloadSapforPackage).Do(object))) {
|
||||
showObject();
|
||||
}
|
||||
}
|
||||
public void Show() throws Exception {
|
||||
}
|
||||
public void showNoObject() {
|
||||
lObjectName.setText("?");
|
||||
lObjectName.setToolTipText("Объект не назначен.");
|
||||
showNoTree();
|
||||
if (isMaster()) {
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
} else {
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
}
|
||||
}
|
||||
//---
|
||||
public void showCommonTree() {
|
||||
//---
|
||||
treePanel.add(treeScroll = new JScrollPane(
|
||||
Body = new SapforTasksPackageTree(object.package_json.root,
|
||||
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
||||
)));
|
||||
treePanel.repaint();
|
||||
treePanel.revalidate();
|
||||
}
|
||||
public void showComparisonTree() {
|
||||
treePanel.add(treeScroll = new JScrollPane(
|
||||
Body = new SapforTasksPackageTree(object.package_json.comparison_root,
|
||||
isMaster() ? Current.SapforEtalonVersion : Current.SapforVersion
|
||||
)));
|
||||
treePanel.repaint();
|
||||
treePanel.revalidate();
|
||||
}
|
||||
//---
|
||||
public void showNoTree() {
|
||||
CommonUI.Clear(treePanel);
|
||||
}
|
||||
public void showObject() {
|
||||
lObjectName.setText(object.getPK().toString() + (isMaster() ? "(эталон)" : ""));
|
||||
lObjectName.setToolTipText(object.getPK().toString());
|
||||
//--
|
||||
if (object.package_json == null) {
|
||||
try {
|
||||
object.readJson();
|
||||
object.package_json.getVersionsFiles(object);
|
||||
object.package_json.buildTree(object);
|
||||
//---
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
object.package_json.DropComparison();
|
||||
//--
|
||||
showCommonTree();
|
||||
}
|
||||
protected String getText() {
|
||||
return "";
|
||||
}
|
||||
public SapforPackagesComparisonForm(SapforPackagesComparisonForm slave_in) {
|
||||
//-
|
||||
this_ = this;
|
||||
slave = slave_in;
|
||||
bPrevious.setVisible(isMaster());
|
||||
bNext.setVisible(isMaster());
|
||||
bApplyObject.addActionListener(e -> {
|
||||
ApplyObject();
|
||||
});
|
||||
//--->>>
|
||||
if (isMaster()) {
|
||||
slave.master = this;
|
||||
bPrevious.addActionListener(e -> {
|
||||
});
|
||||
bNext.addActionListener(e -> {
|
||||
});
|
||||
bCompare.addActionListener(e -> {
|
||||
DoComparePass();
|
||||
});
|
||||
} else {
|
||||
//рабу сравнивать не положено.
|
||||
bCompare.setVisible(false);
|
||||
}
|
||||
//--->>>
|
||||
bClose.addActionListener(e -> {
|
||||
onClose();
|
||||
});
|
||||
}
|
||||
//-->>
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
lObjectName = new ShortLabel(40);
|
||||
tools = new VisualiserMenuBar();
|
||||
}
|
||||
//для сравнения по кнопке.
|
||||
public boolean isReady() {
|
||||
return object != null;
|
||||
}
|
||||
public void onClose() {
|
||||
RemoveObject();
|
||||
}
|
||||
public void DoComparePass() {
|
||||
Pass_2021 pass = new Pass_2021() {
|
||||
SapforPackage package1;
|
||||
SapforPackage package2;
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Сравнение";
|
||||
}
|
||||
@Override
|
||||
protected boolean needsAnimation() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (isReady() && slave.isReady()) {
|
||||
//--
|
||||
package1 = object;
|
||||
package2 = slave.object;
|
||||
//--
|
||||
if (package1.package_json.tasks.size() != package2.package_json.tasks.size()) {
|
||||
Log.Writeln_("Количество задач в пакетах не совпадает!");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
//todo в дереве отображать пустые задачи заместо тех кого не хватает.
|
||||
for (SapforTask task1 : package1.package_json.tasks) {
|
||||
if (!package2.package_json.containsKey(task1.getUniqueKey()))
|
||||
Log.Writeln_("Задача эталона " + task1.getUniqueKey() + "не найдена в сравниваемом пакете!");
|
||||
}
|
||||
return Log.isEmpty();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
comparisonMode = false;
|
||||
slave.comparisonMode = false;
|
||||
//--
|
||||
treeScroll = null;
|
||||
slave.treeScroll = null;
|
||||
//--
|
||||
package1.package_json.DropComparison();
|
||||
package2.package_json.DropComparison();
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
showNoTree();
|
||||
slave.showNoTree();
|
||||
//--->>>
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersionEtalon();
|
||||
UI.getMainWindow().getTestingWindow().ShowNoSapforPackageVersion();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
//теперь сравниваем задачи
|
||||
int i = 1;
|
||||
for (SapforTask task1 : package1.package_json.tasks) {
|
||||
SapforTask task2 = package2.package_json.getTaskByKey(task1.getUniqueKey());
|
||||
task1.checkMatch(task2);
|
||||
//--
|
||||
++i;
|
||||
}
|
||||
//--
|
||||
for (SapforTask task1 : package1.package_json.tasks) {
|
||||
SapforTask task2 = package2.package_json.getTaskByKey(task1.getUniqueKey());
|
||||
}
|
||||
//---
|
||||
package1.package_json.buildComparisonTree(package1);
|
||||
package2.package_json.buildComparisonTree(package2);
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
return Log.isEmpty();
|
||||
}
|
||||
@Override
|
||||
protected void showFail() throws Exception {
|
||||
showCommonTree();
|
||||
slave.showCommonTree();
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
comparisonMode = true;
|
||||
slave.comparisonMode = true;
|
||||
//--
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
showComparisonTree();
|
||||
slave.showComparisonTree();
|
||||
// SynchronizeTrees();
|
||||
}
|
||||
};
|
||||
pass.Do();
|
||||
}
|
||||
public void SynchronizeTrees() {
|
||||
if (slave.Body != null) {
|
||||
Body.setSlaveTree(slave.Body);
|
||||
slave.treeScroll.getVerticalScrollBar().setModel(treeScroll.getVerticalScrollBar().getModel());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
public enum SapforVersionComparisonState {
|
||||
//названия только для изображений.
|
||||
CompilationOutput,
|
||||
CompilationErrors,
|
||||
RunOutput,
|
||||
RunErrors;
|
||||
public String getDescription(){
|
||||
switch (this){
|
||||
case CompilationOutput:
|
||||
return "Поток вывода парсера";
|
||||
case CompilationErrors:
|
||||
return "Поток ошибок парсера";
|
||||
case RunOutput:
|
||||
return "Поток вывода преобразования";
|
||||
case RunErrors:
|
||||
return "Поток ошибок преобразования";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
}
|
||||
175
src/_VisualDVM/Visual/Windows/SapforVersionsComparisonForm.java
Normal file
175
src/_VisualDVM/Visual/Windows/SapforVersionsComparisonForm.java
Normal file
@@ -0,0 +1,175 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import _VisualDVM.Utils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersion_json;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_json> {
|
||||
//--
|
||||
protected LinkedHashMap<SapforVersionComparisonState, JButton> buttons = null;
|
||||
//почти полный клон VersionsComparsionForm. В будущем нужен рефакторинг. Наверное.
|
||||
Current current;
|
||||
private final JComboBox<ProjectFile> cbFile;
|
||||
protected ProjectFile file = null;
|
||||
private SapforVersionsComparisonForm getMaster() {
|
||||
return (SapforVersionsComparisonForm) master;
|
||||
}
|
||||
private SapforVersionsComparisonForm getSlave() {
|
||||
return (SapforVersionsComparisonForm) slave;
|
||||
}
|
||||
public SapforVersionsComparisonForm(SapforVersionsComparisonForm slave_in, Current current_in) {
|
||||
super(SapforVersion_json.class, slave_in);
|
||||
current = current_in;
|
||||
bApplyObject.setVisible(false);
|
||||
bClose.setVisible(false);
|
||||
cbFile = new JComboBox<>();
|
||||
tools.add(Pass_2021.passes.get(
|
||||
(current.equals(Current.SapforEtalonVersion) ? PassCode_2021.OpenSapforEtalonVersion : PassCode_2021.OpenSapforVersion
|
||||
)).createButton(), 3);
|
||||
tools.add(cbFile, 4);
|
||||
//--
|
||||
cbFile.addActionListener(e -> {
|
||||
SelectFile(((cbFile.getSelectedItem() instanceof ProjectFile) ? ((ProjectFile) cbFile.getSelectedItem()) : null));
|
||||
});
|
||||
//--
|
||||
buttons = new LinkedHashMap<>();
|
||||
int i = 5;
|
||||
for (SapforVersionComparisonState state : SapforVersionComparisonState.values()) {
|
||||
MenuBarButton button = new MenuBarButton();
|
||||
button.setIcon("/icons/" + state.toString() + ".png");
|
||||
button.setToolTipText(state.getDescription());
|
||||
button.addActionListener(e -> {
|
||||
if (object != null) {
|
||||
ProjectFile projectFile = null;
|
||||
switch (state) {
|
||||
case CompilationOutput:
|
||||
projectFile = object.parse_out;
|
||||
break;
|
||||
case CompilationErrors:
|
||||
projectFile = object.parse_err;
|
||||
break;
|
||||
case RunOutput:
|
||||
projectFile = object.out;
|
||||
break;
|
||||
case RunErrors:
|
||||
projectFile = object.err;
|
||||
break;
|
||||
}
|
||||
SelectFile(projectFile);
|
||||
}
|
||||
});
|
||||
tools.add(button, i);
|
||||
buttons.put(state, button);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
public void SelectFile(ProjectFile file_in) {
|
||||
file = file_in;
|
||||
if (isMaster()) {
|
||||
if (isReady() && !getSlave().selectSameFile(file))
|
||||
DoShowPass(true);
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : CommonUtils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : CommonUtils.getFileNameWithoutExtension(file.file);
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
master.DoShowPass(true);
|
||||
} else {
|
||||
master.DoShowPass(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return current;
|
||||
}
|
||||
@Override
|
||||
protected String getText() {
|
||||
return isReady() ?
|
||||
(file.file.exists() ? Utils.ReadAllText(file.file) : "файл не найден")
|
||||
: "объект не назначен";
|
||||
}
|
||||
@Override
|
||||
public boolean isReady() {
|
||||
return super.isReady() && file != null;
|
||||
}
|
||||
@Override
|
||||
protected void showObject() {
|
||||
lObjectName.setText(object.toString());
|
||||
lObjectName.setToolTipText(object.Home.getName() + " : " + CommonUtils.Brackets(object.description));
|
||||
cbFile.removeAllItems();
|
||||
for (ProjectFile file : object.files.values())
|
||||
cbFile.addItem(file);
|
||||
}
|
||||
@Override
|
||||
protected void removeObject() {
|
||||
cbFile.removeAllItems();
|
||||
file = null;
|
||||
}
|
||||
public boolean selectSameFile(ProjectFile file_in) {
|
||||
file = null;
|
||||
Vector<String> data_names = new Vector<>(Arrays.asList(
|
||||
Constants.parse_out_file,
|
||||
Constants.parse_err_file,
|
||||
Constants.out_file,
|
||||
Constants.err_file));
|
||||
String file_name = file_in.file.getName();
|
||||
if (data_names.contains(file_name)) {
|
||||
SapforVersionComparisonState state = null;
|
||||
switch (file_name) {
|
||||
case Constants.parse_out_file:
|
||||
state = SapforVersionComparisonState.CompilationOutput;
|
||||
break;
|
||||
case Constants.parse_err_file:
|
||||
state = SapforVersionComparisonState.CompilationErrors;
|
||||
break;
|
||||
case Constants.out_file:
|
||||
state = SapforVersionComparisonState.RunOutput;
|
||||
break;
|
||||
case Constants.err_file:
|
||||
state = SapforVersionComparisonState.RunErrors;
|
||||
break;
|
||||
}
|
||||
if (state != null) {
|
||||
buttons.get(state).doClick();
|
||||
}
|
||||
return isReady();
|
||||
} else {
|
||||
cbFile.setSelectedIndex(-1);
|
||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
//если учитываем расширения, ищем полное совпадение
|
||||
if (projectFile.file.getName().equals(file_name)) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (CommonUtils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
CommonUtils.getNameWithoutExtension(file_name))) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (cbFile.getSelectedItem() != null) && (cbFile.getSelectedItem() instanceof ProjectFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
35
src/_VisualDVM/Visual/Windows/TabToolBar.java
Normal file
35
src/_VisualDVM/Visual/Windows/TabToolBar.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
public class TabToolBar extends VisualiserMenuBar {
|
||||
public TabToolBar(String titleText, PassCode_2021... passes) {
|
||||
setFloatable(false);
|
||||
setOpaque(false);
|
||||
//-
|
||||
JLabel title = new JLabel(titleText);
|
||||
title.setOpaque(false);
|
||||
add(title);
|
||||
addSeparator();
|
||||
//-
|
||||
for (PassCode_2021 code : passes)
|
||||
add(Pass_2021.passes.get(code).createTabButton());
|
||||
MouseAdapter adapter = new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
leftMouseAction();
|
||||
}
|
||||
};
|
||||
addMouseListener(adapter);
|
||||
title.addMouseListener(adapter);
|
||||
}
|
||||
public void leftMouseAction(){}
|
||||
@Override
|
||||
public void setSizeLimits() {
|
||||
// setPreferredSize(new Dimension(-1, 18));
|
||||
}
|
||||
}
|
||||
104
src/_VisualDVM/Visual/Windows/TasksComparisonForm.java
Normal file
104
src/_VisualDVM/Visual/Windows/TasksComparisonForm.java
Normal file
@@ -0,0 +1,104 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public abstract class TasksComparisonForm<T extends DBObject> extends ComparisonForm<T> {
|
||||
public TasksComparisonForm(Class<T> t_in, ComparisonForm<T> slave_in) {
|
||||
super(t_in, slave_in);
|
||||
buttons = new LinkedHashMap<>();
|
||||
int i = 3;
|
||||
status = getFirstState();
|
||||
Vector<TasksComparisonState> forbidden = new Vector(Arrays.asList(getForbiddenStates()));
|
||||
for (TasksComparisonState state : TasksComparisonState.values()) {
|
||||
if (!forbidden.contains(state)) {
|
||||
MenuBarButton button = new MenuBarButton();
|
||||
button.setIcon( "/icons/" + state.toString() + ".png");
|
||||
button.setToolTipText(state.getDescription());
|
||||
button.addActionListener(e -> {
|
||||
ChangeState(state);
|
||||
if (isMaster()) {
|
||||
TasksComparisonForm slave_ = (TasksComparisonForm) slave;
|
||||
slave_.ChangeState(state);
|
||||
//в отличие от комбо боксов, тут события нажатия на кнопку, нет.
|
||||
if (isReady()) {
|
||||
if (slave.isReady()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
DoComparePass(true);
|
||||
} else
|
||||
DoShowPass(true);
|
||||
} else {
|
||||
DoShowPass(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (master.isReady()) {
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
master.DoShowPass(true);
|
||||
} else {
|
||||
master.DoShowPass(true); //!!!
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
tools.add(button, i);
|
||||
buttons.put(state, button);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
protected TasksComparisonState status = TasksComparisonState.CompilationOutput;
|
||||
protected LinkedHashMap<TasksComparisonState, JButton> buttons = null;
|
||||
protected void DropTabsSelection() {
|
||||
for (JButton button : buttons.values()){
|
||||
button.setBorderPainted(false);
|
||||
button.repaint();
|
||||
button.revalidate();
|
||||
}
|
||||
|
||||
}
|
||||
public void ChangeState(TasksComparisonState status_in) {
|
||||
status = status_in;
|
||||
DropTabsSelection();
|
||||
ClearText();
|
||||
JButton button = buttons.get(status_in);
|
||||
button.setBorderPainted(false);
|
||||
button.repaint();
|
||||
button.revalidate();
|
||||
}
|
||||
@Override
|
||||
protected void showObject() {
|
||||
super.showObject();
|
||||
buttons.get(status).doClick();
|
||||
}
|
||||
@Override
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
if (isMaster())
|
||||
DoShowPass(true);
|
||||
else
|
||||
master.DoShowPass(true);
|
||||
}
|
||||
@Override
|
||||
protected String getText() {
|
||||
return isReady()?getTextByTab():"объект не назначен";
|
||||
}
|
||||
//-----------перегружаемые
|
||||
protected abstract String getTextByTab();
|
||||
protected TasksComparisonState[] getForbiddenStates() {
|
||||
return new TasksComparisonState[]{};
|
||||
}
|
||||
protected TasksComparisonState getFirstState() {
|
||||
return TasksComparisonState.CompilationOutput;
|
||||
}
|
||||
}
|
||||
25
src/_VisualDVM/Visual/Windows/TasksComparisonState.java
Normal file
25
src/_VisualDVM/Visual/Windows/TasksComparisonState.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
public enum TasksComparisonState {
|
||||
CompilationOutput,
|
||||
CompilationErrors,
|
||||
|
||||
RunOutput,
|
||||
RunErrors,
|
||||
Sts;
|
||||
public String getDescription(){
|
||||
switch (this){
|
||||
case CompilationOutput:
|
||||
return "Поток вывода компиляции";
|
||||
case CompilationErrors:
|
||||
return "Поток ошибок компиляции";
|
||||
case RunOutput:
|
||||
return "Поток вывода запуска";
|
||||
case RunErrors:
|
||||
return "Поток ошибок запуска";
|
||||
case Sts:
|
||||
return "DVM статистика запуска";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
}
|
||||
541
src/_VisualDVM/Visual/Windows/TestingForm.form
Normal file
541
src/_VisualDVM/Visual/Windows/TestingForm.form
Normal file
@@ -0,0 +1,541 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.TestingForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="1034" height="666"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="b7e30" binding="testingTabs">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ad5f9" binding="dvmPackagesTab" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Пакеты DVM" icon="icons/DVM.png">
|
||||
<tooltip value=""/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="28d90" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="5df89" binding="SC71">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f073a" binding="credentialsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="a68b8" binding="SC18">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="400"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5800e" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="450" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2e68e" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="250" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="7b7a8" binding="compilersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="db8ae" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="450" height="100"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="4a378" binding="SC19">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="197"/>
|
||||
<dividerSize value="3"/>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="300" height="100"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="20373" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="0"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d8430" binding="machinesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="eeb47" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="250" height="-1"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="15f9a" binding="usersPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="34404" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="aeb24" binding="SC72">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="6722c" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="17cb3" binding="dvmSettingsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="726a0" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c7883" binding="SC85">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="120"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="42875" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="4739d" binding="configurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="28479" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ff2c1" binding="dvmPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="1f9bd" binding="dvmComparisonTab" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Сравнение задач DVM" icon="icons/Comparsion.png">
|
||||
<tooltip value="Сравнение пакетов тестирования DVM"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5ae89" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="dc0b0" binding="SC74">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="300"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="41805" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5a561" binding="dvmRunTasksPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<minimumSize width="0" height="150"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="fe5cb" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="ba9b7" binding="SC50">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="abe81" binding="sapforPackagesTab" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Пакеты SAPFOR" icon="icons/Arrays/SpfPrivate.png">
|
||||
<tooltip value=""/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e46cf" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="1d6a4" binding="SC70">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="fcfe3" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="631e" binding="SC63">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b5296" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="6fa99" binding="serverSapforsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="20b29" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="a599d" binding="SC83">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="300"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="aacb9" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ded37" binding="sapforSettingsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e3fd8" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b5055" binding="sapforSettingsCommandsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="d07cf" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="df761" binding="SC80">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="30c24" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="6109f" binding="sapforConfigurationsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="1ee44" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="fd73e" binding="sapforPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="4f7f1" binding="sapforComparisonTab" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Сравнение пакетов SAPFOR" icon="icons/Comparsion.png">
|
||||
<tooltip value="Сравнение пакетов тестирования SAPFOR"/>
|
||||
</tabbedpane>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d9664" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="64e00" binding="SC64">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c569d" binding="SC65">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2c769" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
<splitpane id="5a374" binding="SC66">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="250"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="c0acb" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
334
src/_VisualDVM/Visual/Windows/TestingForm.java
Normal file
334
src/_VisualDVM/Visual/Windows/TestingForm.java
Normal file
@@ -0,0 +1,334 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Current;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import GlobalData.Compiler.CompilerType;
|
||||
import GlobalData.Credentials.Credentials;
|
||||
import TestingSystem.Common.TestingServer;
|
||||
import TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import TestingSystem.DVM.DVMTasks.DVMRunTask;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
import _VisualDVM.Visual.Interface.TestingWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
private JPanel content;
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
public JSplitPane SC50;
|
||||
public JSplitPane SC65;
|
||||
public JSplitPane SC66;
|
||||
public JSplitPane SC64;
|
||||
public JSplitPane SC70;
|
||||
public JSplitPane SC63;
|
||||
public JSplitPane SC71;
|
||||
public JSplitPane SC72;
|
||||
public JSplitPane SC74;
|
||||
public JSplitPane SC18;
|
||||
public JSplitPane SC19;
|
||||
public JSplitPane SC80;
|
||||
public JSplitPane SC83;
|
||||
public JSplitPane SC85;
|
||||
//---
|
||||
private JTabbedPane testingTabs;
|
||||
private JPanel dvmPackagesTab;
|
||||
private JPanel dvmComparisonTab;
|
||||
private JPanel sapforPackagesTab;
|
||||
private JPanel sapforComparisonTab;
|
||||
private JPanel dvmRunTasksPanel;
|
||||
private JToolBar testsResultsTools;
|
||||
private JButton bChangeKernels;
|
||||
private JTextField filterName;
|
||||
private JPanel configurationsPanel;
|
||||
private JPanel dvmPackagesPanel;
|
||||
private JButton bCompilationFilter;
|
||||
private JPanel packageVersionsPanel;
|
||||
private JPanel sapforConfigurationsPanel;
|
||||
private JLabel sapforConfigurationsLabel;
|
||||
private JLabel sapforConfigurationsCommandsLabel;
|
||||
private JPanel sapforScenariosPanel;
|
||||
private JPanel serverSapforsPanel;
|
||||
private JPanel sapforPackagesPanel;
|
||||
private JPanel compilersPanel;
|
||||
private JPanel machinesPanel;
|
||||
private JPanel usersPanel;
|
||||
private JPanel credentialsPanel;
|
||||
private JPanel sapforSettingsPanel;
|
||||
private JPanel sapforSettingsCommandsPanel;
|
||||
private JPanel dvmSettingsPanel;
|
||||
private JPanel testsRunTasksBackground;
|
||||
private JCheckBox filterFinished;
|
||||
private JButton bTest;
|
||||
private JButton bDownloadTestProject;
|
||||
//-
|
||||
private final DVMRunTasksComparisonForm dvmTestingRunMaster; //сравнение тестов двм системы.
|
||||
private final DVMRunTasksComparisonForm dvmTestingRunSlave;
|
||||
//-
|
||||
private final SapforPackagesComparisonForm sapforPackageTreeMaster; //сравнение деревьев пакетов SAPFOR.
|
||||
private final SapforPackagesComparisonForm sapforPackageTreeSlave;
|
||||
//--
|
||||
private final SapforVersionsComparisonForm sapforVersionMaster; //сравнение версий тестов SAPFOR.
|
||||
private final SapforVersionsComparisonForm sapforVersionSlave;
|
||||
private boolean events_on=true;
|
||||
private final PropertyChangeListener sc65Listener = new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if (events_on) {
|
||||
events_on=false;
|
||||
SC66.setDividerLocation(SC65.getDividerLocation());
|
||||
events_on=true;
|
||||
}
|
||||
}
|
||||
};
|
||||
private final PropertyChangeListener sc66Listener = new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if (events_on) {
|
||||
events_on=false;
|
||||
SC65.setDividerLocation(SC66.getDividerLocation());
|
||||
events_on=true;
|
||||
}
|
||||
}
|
||||
};
|
||||
//--
|
||||
public TestingForm() {
|
||||
content.add(UI.testingBar, BorderLayout.NORTH);
|
||||
LoadSplitters();
|
||||
//-
|
||||
dvmTestingRunMaster = new DVMRunTasksComparisonForm(dvmTestingRunSlave = new DVMRunTasksComparisonForm(null));
|
||||
sapforPackageTreeMaster = new SapforPackagesComparisonForm(sapforPackageTreeSlave = new SapforPackagesComparisonForm(null));
|
||||
sapforVersionMaster = new SapforVersionsComparisonForm(
|
||||
sapforVersionSlave = new SapforVersionsComparisonForm(null, Current.SapforVersion),
|
||||
Current.SapforEtalonVersion
|
||||
);
|
||||
//--->>>
|
||||
RefreshTabsNames();
|
||||
if (Global.properties.collapseCredentials)
|
||||
CollapseCredentials();
|
||||
//-
|
||||
SC50.setLeftComponent(dvmTestingRunMaster.getContent());
|
||||
SC50.setRightComponent(dvmTestingRunSlave.getContent());
|
||||
//-
|
||||
SC65.setLeftComponent(sapforPackageTreeMaster.getContent());
|
||||
SC66.setLeftComponent(sapforPackageTreeSlave.getContent());
|
||||
//-
|
||||
SC65.setRightComponent(sapforVersionMaster.getContent());
|
||||
SC66.setRightComponent(sapforVersionSlave.getContent());
|
||||
//--
|
||||
SC65.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc65Listener);
|
||||
SC66.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, sc66Listener);
|
||||
//-
|
||||
((GlobalDatabase)CommonUtils.db).machines.mountUI(machinesPanel);
|
||||
((GlobalDatabase)CommonUtils.db).users.mountUI(usersPanel);
|
||||
((GlobalDatabase)CommonUtils.db).compilers.mountUI(compilersPanel);
|
||||
//-
|
||||
Global.testingServer.db.dvm_configurations.mountUI(configurationsPanel);
|
||||
Global.testingServer.db.dvmPackages.mountUI(dvmPackagesPanel);
|
||||
Global.testingServer.db.dvmRunTasks.mountUI(dvmRunTasksPanel);
|
||||
Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel);
|
||||
Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel);
|
||||
Global.testingServer.db.sapforPackages.mountUI(sapforPackagesPanel);
|
||||
Global.testingServer.db.sapforSettings.mountUI(sapforSettingsPanel);
|
||||
Global.testingServer.db.sapforSettingsCommands.mountUI(sapforSettingsCommandsPanel);
|
||||
Global.testingServer.db.dvmSettings.mountUI(dvmSettingsPanel);
|
||||
//--
|
||||
if (Global.properties.collapseCredentials)
|
||||
CollapseCredentials();
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
((GlobalDatabase)CommonUtils.db).machines.ShowUI();
|
||||
Global.testingServer.db.dvm_configurations.ShowUI();
|
||||
Global.testingServer.db.dvmPackages.ShowUI();
|
||||
Global.testingServer.db.sapforPackages.ShowUI();
|
||||
//--
|
||||
Global.testingServer.db.serverSapfors.ShowUI();
|
||||
Global.testingServer.db.sapforConfigurations.ShowUI();
|
||||
Global.testingServer.db.dvmRunTasks.ShowUI();
|
||||
Global.testingServer.db.dvmSettings.ShowUI();
|
||||
Global.testingServer.db.sapforSettings.ShowUI();
|
||||
//---
|
||||
RestoreLastCredentials();
|
||||
//---
|
||||
if (Global.properties.AutoCheckTesting)
|
||||
TestingServer.TimerOn();
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public void ShowCurrentTestsPackage() {
|
||||
ShowCurrentTestRunTask();
|
||||
}
|
||||
@Override
|
||||
public void DropTestRunTasksComparison() {
|
||||
dvmTestingRunMaster.RemoveObject();
|
||||
dvmTestingRunSlave.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void DropSapforComparison() {
|
||||
sapforPackageTreeMaster.RemoveObject();
|
||||
sapforPackageTreeSlave.RemoveObject();
|
||||
sapforVersionMaster.RemoveObject();
|
||||
sapforVersionSlave.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentTestRunTask() {
|
||||
// if (dvmTestingRunMaster.isActive()) dvmTestingRunMaster.ShowTask();
|
||||
// else dvmTestingRunSlave.ShowTask();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoTestRunTask() {
|
||||
// dvmTestingRunMaster.Clear();
|
||||
// dvmTestingRunSlave.Clear();
|
||||
}
|
||||
@Override
|
||||
public void RefreshTabsNames() {
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
filterName = new StyledTextField();
|
||||
}
|
||||
@Override
|
||||
public void FocusTestingTasks() {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentSapforPackageVersionEtalon() {
|
||||
sapforVersionMaster.ApplyObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentSapforPackageVersion() {
|
||||
sapforVersionSlave.ApplyObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoSapforPackageVersionEtalon() {
|
||||
sapforVersionMaster.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoSapforPackageVersion() {
|
||||
sapforVersionSlave.RemoveObject();
|
||||
}
|
||||
@Override
|
||||
public void FocusSapforTesting() {
|
||||
testingTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentCompiler() {
|
||||
String title = (Current.HasCompiler() && Current.getCompiler().type.equals(CompilerType.dvm)) ?
|
||||
"DVM система: " + Current.getCompiler().description : "DVM система: ?";
|
||||
testingTabs.setTitleAt(0, title);
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentServerSapfor() {
|
||||
testingTabs.setTitleAt(2, "SAPFOR: " + Current.getServerSapfor().version);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoServerSapfor() {
|
||||
testingTabs.setTitleAt(2, "SAPFOR: ?");
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentDVMPackage() {
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCurrentDVMPackage() {
|
||||
}
|
||||
@Override
|
||||
public void ShowDVMRunTask(DVMRunTask master) {
|
||||
dvmTestingRunMaster.ApplyObject(master);
|
||||
testingTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void ShowSapforPackage(SapforPackage master) {
|
||||
sapforPackageTreeMaster.ApplyObject(master);
|
||||
testingTabs.setSelectedIndex(3);
|
||||
}
|
||||
public void ShowDVMPackage(DVMPackage master) {
|
||||
testingTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void CompareDVMRunTasks(DVMRunTask master, DVMRunTask slave) {
|
||||
dvmTestingRunMaster.ApplyObject(master);
|
||||
dvmTestingRunSlave.ApplyObject(slave);
|
||||
dvmTestingRunMaster.DoComparePass(true);
|
||||
// testingTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void CompareSapforPackages(SapforPackage master, SapforPackage slave) {
|
||||
sapforPackageTreeMaster.ApplyObject(master);
|
||||
sapforPackageTreeSlave.ApplyObject(slave);
|
||||
sapforPackageTreeMaster.DoComparePass();
|
||||
testingTabs.setSelectedIndex(3);
|
||||
}
|
||||
public void RestoreLastCredentials() {
|
||||
Credentials credentials = (Credentials) CurrentAnchestor.get(Current.Credentials);
|
||||
if (credentials.machine_id != CommonConstants.Nan) {
|
||||
if (((GlobalDatabase)CommonUtils.db).machines.containsKey(credentials.machine_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).machines.ShowUI(credentials.machine_id);
|
||||
if (((GlobalDatabase)CommonUtils.db).users.containsKey(credentials.user_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).users.ShowUI(credentials.user_id);
|
||||
} else {
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
if (((GlobalDatabase)CommonUtils.db).compilers.containsKey(credentials.compiler_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).compilers.ShowUI(credentials.compiler_id);
|
||||
} else {
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (((GlobalDatabase)CommonUtils.db).makefiles.containsKey(credentials.makefile_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).makefiles.ShowUI(credentials.makefile_id);
|
||||
} else {
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if (((GlobalDatabase)CommonUtils.db).runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
((GlobalDatabase)CommonUtils.db).runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
} else {
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
} else {
|
||||
credentials.machine_id = CommonConstants.Nan;
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
credentials.remotesapfor_id = CommonConstants.Nan;
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
((GlobalDatabase)CommonUtils.db).UpdateCredentials();
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void CollapseCredentials() {
|
||||
CommonUtils.db.splitters.get("SC71").position = SC71.getDividerLocation();
|
||||
CommonUI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(UI.credentialsBar);
|
||||
SC71.setDividerLocation(30);
|
||||
SC71.setDividerSize(0);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
@Override
|
||||
public void ExpandCredentials() {
|
||||
CommonUI.Clear(credentialsPanel);
|
||||
credentialsPanel.add(SC18);
|
||||
SC71.setDividerLocation(200);
|
||||
SC71.setDividerSize(3);
|
||||
credentialsPanel.revalidate();
|
||||
credentialsPanel.repaint();
|
||||
}
|
||||
}
|
||||
63
src/_VisualDVM/Visual/Windows/TestsForm.form
Normal file
63
src/_VisualDVM/Visual/Windows/TestsForm.form
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.TestsForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="653" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="35527" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="c3576" binding="SC45">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<dividerLocation value="700"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f7d57" binding="groupsBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="400" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94f2" binding="groupsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="2cfd" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="250" height="200"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="c642d" binding="testsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
26
src/_VisualDVM/Visual/Windows/TestsForm.java
Normal file
26
src/_VisualDVM/Visual/Windows/TestsForm.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
import _VisualDVM.Visual.Interface.TestsWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
public class TestsForm implements TestsWindow, FormWithSplitters {
|
||||
private JPanel content;
|
||||
public JSplitPane SC45;
|
||||
private JPanel groupsBackground;
|
||||
private JPanel groupsPanel;
|
||||
private JPanel testsPanel;
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void ShowAll() {
|
||||
Global.testingServer.db.groups.ShowUI();
|
||||
}
|
||||
public TestsForm(){
|
||||
LoadSplitters();
|
||||
Global.testingServer.db.groups.mountUI(groupsPanel);
|
||||
Global.testingServer.db.tests.mountUI(testsPanel);
|
||||
}
|
||||
}
|
||||
200
src/_VisualDVM/Visual/Windows/VariantsForm.form
Normal file
200
src/_VisualDVM/Visual/Windows/VariantsForm.form
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.VariantsForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="870" height="407"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="eea1" binding="SC4">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="200"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="1f7ed" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="200"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="4573f" binding="SC5">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="500"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="779b" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="50"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<toolbar id="9c35e" binding="variantsFilterTools1">
|
||||
<constraints border-constraint="South"/>
|
||||
<properties>
|
||||
<floatable value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="f436e" class="javax.swing.JButton" binding="BDistributed">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<font name="Courier New" size="14" style="2"/>
|
||||
<horizontalAlignment value="2"/>
|
||||
<maximumSize width="90" height="30"/>
|
||||
<minimumSize width="90" height="30"/>
|
||||
<preferredSize width="90" height="30"/>
|
||||
<text value="BLOCK"/>
|
||||
<toolTipText value="Фильтрация по распределённым измерениям "/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5de27" class="javax.swing.JButton" binding="bMultiplied">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<borderPainted value="false"/>
|
||||
<font name="Courier New" size="14" style="2"/>
|
||||
<horizontalAlignment value="2"/>
|
||||
<maximumSize width="90" height="30"/>
|
||||
<minimumSize width="90" height="30"/>
|
||||
<preferredSize width="90" height="30"/>
|
||||
<text value=" * "/>
|
||||
<toolTipText value="Фильтрация по размноженным измерениям "/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="0"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="2cbf5" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" соответствует фильтру "/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="1"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="dc7dd" class="javax.swing.JLabel" binding="VisibleVariantsCount">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="?"/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="1"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="64f66" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value=" | "/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="8d745" class="javax.swing.JLabel">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="возможных "/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="1"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="deeb8" class="javax.swing.JLabel" binding="TotalVariantsCount">
|
||||
<constraints/>
|
||||
<properties>
|
||||
<font style="0"/>
|
||||
<foreground color="-16777216"/>
|
||||
<text value="?"/>
|
||||
<verticalAlignment value="1"/>
|
||||
<verticalTextPosition value="1"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="c476f" binding="dimensionsPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="b1916" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="200"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d862" binding="distributionPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="ef6e3" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="-1" height="-1"/>
|
||||
<minimumSize width="200" height="200"/>
|
||||
<preferredSize width="-1" height="-1"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="11216" binding="variantsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
119
src/_VisualDVM/Visual/Windows/VariantsForm.java
Normal file
119
src/_VisualDVM/Visual/Windows/VariantsForm.java
Normal file
@@ -0,0 +1,119 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import ProjectData.SapforData.Arrays.UI.DimensionsTableForm;
|
||||
import ProjectData.SapforData.Arrays.UI.RulesTree;
|
||||
import _VisualDVM.Visual.Interface.VariantsWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
public class VariantsForm implements VariantsWindow {
|
||||
public JSplitPane SC4;
|
||||
public JSplitPane SC5;
|
||||
private JButton BDistributed;
|
||||
private JButton bMultiplied;
|
||||
private JPanel dimensionsPanel;
|
||||
private JPanel distributionPanel;
|
||||
// private JLabel SelectedVariantsCount;
|
||||
private JLabel VisibleVariantsCount;
|
||||
private JLabel TotalVariantsCount;
|
||||
private JPanel variantsPanel;
|
||||
private JPanel content;
|
||||
private JToolBar variantsFilterTools1;
|
||||
//--
|
||||
public TreeForm distributionForm1;
|
||||
private DimensionsTableForm dimensionsForm;
|
||||
//--
|
||||
public VariantsForm() {
|
||||
LoadSplitters();
|
||||
Current.getProject().parallelVariants.mountUI(variantsPanel);
|
||||
//-
|
||||
BDistributed.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Current.getProject().SwitchFilterDistributed();
|
||||
BDistributed.setIcon(CommonUtils.getIcon(Current.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
ShowVariantsFilter();
|
||||
ShowFilteredVariantsCount();
|
||||
}
|
||||
});
|
||||
bMultiplied.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Current.getProject().SwitchFilterMultiplied();
|
||||
bMultiplied.setIcon(CommonUtils.getIcon(Current.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
ShowVariantsFilter();
|
||||
ShowFilteredVariantsCount();
|
||||
}
|
||||
});
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
distributionPanel = (distributionForm1 = new TreeForm(RulesTree.class)).getContent();
|
||||
dimensionsPanel = (dimensionsForm = new DimensionsTableForm()).getContent();
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectDistribution() {
|
||||
distributionForm1.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProjectDistribution() {
|
||||
distributionForm1.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowVariantsFilterButtons() {
|
||||
BDistributed.setIcon(CommonUtils.getIcon(Current.getProject().f_distributed() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
bMultiplied.setIcon(CommonUtils.getIcon(Current.getProject().f_multiplied() ? "/icons/Pick.png" : "/icons/NotPick.png"));
|
||||
}
|
||||
@Override
|
||||
public void ShowVariantsFilter() {
|
||||
dimensionsForm.Show();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoVariantsFilter() {
|
||||
dimensionsForm.Clear();
|
||||
}
|
||||
@Override
|
||||
public void ShowFilteredVariantsCount() {
|
||||
VisibleVariantsCount.setText(String.valueOf(Current.getProject().getFilteredVariantsCount()));
|
||||
}
|
||||
@Override
|
||||
public void ShowTotalVariantsCount() {
|
||||
TotalVariantsCount.setText(String.valueOf(Current.getProject().getTotalVariantsCount()));
|
||||
}
|
||||
@Override
|
||||
public void ShowCheckedVariantsCount() {
|
||||
// SelectedVariantsCount.setText(Current.getProject().CheckedVariantsCounter.toString());
|
||||
}
|
||||
@Override
|
||||
public void ShowVariants() {
|
||||
Current.getProject().parallelVariants.ShowUI();
|
||||
}
|
||||
@Override
|
||||
public void RefreshVariants() {
|
||||
Current.getProject().parallelVariants.RefreshUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoVariants() {
|
||||
Current.getProject().parallelVariants.ClearUI();
|
||||
}
|
||||
@Override
|
||||
public void ShowNoCheckedVariantsCount() {
|
||||
|
||||
//SelectedVariantsCount.setText("0");
|
||||
}
|
||||
@Override
|
||||
public void ShowNoFilteredVariantsCount() {
|
||||
VisibleVariantsCount.setText("0");
|
||||
}
|
||||
@Override
|
||||
public void ShowNoTotalVariantsCount() {
|
||||
TotalVariantsCount.setText("0");
|
||||
}
|
||||
}
|
||||
111
src/_VisualDVM/Visual/Windows/VersionsComparisonForm.java
Normal file
111
src/_VisualDVM/Visual/Windows/VersionsComparisonForm.java
Normal file
@@ -0,0 +1,111 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Utils;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
import ProjectData.Project.db_project_info;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
||||
private final JComboBox<DBProjectFile> cbFile;
|
||||
protected DBProjectFile file = null;
|
||||
private VersionsComparisonForm getMaster() {
|
||||
return (VersionsComparisonForm) master;
|
||||
}
|
||||
private VersionsComparisonForm getSlave() {
|
||||
return (VersionsComparisonForm) slave;
|
||||
}
|
||||
public VersionsComparisonForm(VersionsComparisonForm slave_in) {
|
||||
super(db_project_info.class, slave_in);
|
||||
cbFile = new JComboBox<>();
|
||||
tools.add(cbFile, 3);
|
||||
file = (cbFile.getSelectedItem() instanceof DBProjectFile) ?
|
||||
((DBProjectFile) cbFile.getSelectedItem()) : null;
|
||||
cbFile.addActionListener(e -> {
|
||||
file = (cbFile.getSelectedItem() instanceof DBProjectFile) ?
|
||||
((DBProjectFile) cbFile.getSelectedItem()) : null;
|
||||
//-->>
|
||||
if (isMaster()) {
|
||||
if (isReady() && !getSlave().selectSameFile(file))
|
||||
DoShowPass(true);
|
||||
} else {
|
||||
if (isReady()) {
|
||||
if (getMaster().isReady()) {
|
||||
boolean ExtensionsOn = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean();
|
||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : CommonUtils.getFileNameWithoutExtension(getMaster().file.file);
|
||||
String name2 = ExtensionsOn ? file.file.getName() : CommonUtils.getFileNameWithoutExtension(file.file);
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ComparsionDiffMergeOn).toBoolean()) {
|
||||
if (name1.equalsIgnoreCase(name2))
|
||||
master.DoComparePass(true);
|
||||
} else
|
||||
master.DoShowPass(true);
|
||||
} else {
|
||||
master.DoShowPass(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected Current getCurrentObjectName() {
|
||||
return Current.Version;
|
||||
}
|
||||
@Override
|
||||
protected String getText() {
|
||||
return isReady() ? Utils.ReadAllText(file.file) : "объект не назначен";
|
||||
}
|
||||
@Override
|
||||
protected void removeObject() {
|
||||
cbFile.removeAllItems();
|
||||
file = null;
|
||||
}
|
||||
@Override
|
||||
public boolean isReady() {
|
||||
return super.isReady() && file != null;
|
||||
}
|
||||
@Override
|
||||
protected void showObject() {
|
||||
lObjectName.setText(object.name);
|
||||
lObjectName.setToolTipText(
|
||||
object.getVersionTooltip()
|
||||
);
|
||||
cbFile.removeAllItems();
|
||||
Vector<DBProjectFile> files = object.getFilesForComparsion();
|
||||
for (DBProjectFile file : files)
|
||||
cbFile.addItem(file);
|
||||
}
|
||||
public boolean selectSameFile(ProjectFile file_in) {
|
||||
file = null;
|
||||
cbFile.setSelectedIndex(-1);
|
||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ExtensionsOn).toBoolean()) {
|
||||
//если учитываем расширения, ищем полное совпадение
|
||||
if (projectFile.file.getName().equals(file_in.file.getName())) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (CommonUtils.getNameWithoutExtension(projectFile.file.getName()).equals(
|
||||
CommonUtils.getNameWithoutExtension(file_in.file.getName()))) {
|
||||
cbFile.setSelectedIndex(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (cbFile.getSelectedItem() != null) && (cbFile.getSelectedItem() instanceof ProjectFile);
|
||||
}
|
||||
public void CheckVersion(db_project_info version_in) {
|
||||
if ((object != null) && version_in.Home.equals(object.Home)) {
|
||||
RemoveObject();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected boolean fortranWrapsOn() {
|
||||
return ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FortranWrapsOn).toBoolean();
|
||||
}
|
||||
}
|
||||
118
src/_VisualDVM/Visual/Windows/VersionsForm.form
Normal file
118
src/_VisualDVM/Visual/Windows/VersionsForm.form
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.VersionsForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="917" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="56af8" binding="SC2">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="150"/>
|
||||
<dividerSize value="3"/>
|
||||
<orientation value="0"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="963f1" binding="versionsBackground" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="0" height="150"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="3dd9a" binding="versionsPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="3cdf1" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<minimumSize width="239" height="150"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<tabbedpane id="4762b" binding="versionsTabs">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5fc2b" binding="variantsFormPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<tabbedpane title="Параллельные варианты" icon="icons/ParallelVariants.png"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="377c4" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Сравнение версий" icon="icons/Comparsion.png"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<splitpane id="59ecc" binding="SC9">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<dividerLocation value="450"/>
|
||||
<dividerSize value="3"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="c6aa" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="left"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="ca9a1" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<splitpane position="right"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</splitpane>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
88
src/_VisualDVM/Visual/Windows/VersionsForm.java
Normal file
88
src/_VisualDVM/Visual/Windows/VersionsForm.java
Normal file
@@ -0,0 +1,88 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.Trees.TreeForm;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import ProjectData.Project.UI.VersionsTree;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.Visual.Interface.FormWithSplitters;
|
||||
import _VisualDVM.Visual.Interface.VariantsWindow;
|
||||
import _VisualDVM.Visual.Interface.VersionsWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class VersionsForm implements FormWithSplitters, VersionsWindow {
|
||||
private final db_project_info root;
|
||||
private JPanel content;
|
||||
//-
|
||||
public JSplitPane SC2;
|
||||
public JSplitPane SC9;
|
||||
public VersionsComparisonForm MasterComparsionForm;
|
||||
public VersionsComparisonForm SlaveComparsionForm;
|
||||
private JPanel versionsPanel;
|
||||
private JTabbedPane versionsTabs;
|
||||
private JPanel variantsFormPanel;
|
||||
private JPanel versionsBackground;
|
||||
private TreeForm versionsTreeForm;
|
||||
//-
|
||||
private VariantsWindow variantsForm = null;
|
||||
public VersionsForm(db_project_info root_in) {
|
||||
LoadSplitters();
|
||||
root = root_in;
|
||||
MasterComparsionForm = new VersionsComparisonForm(SlaveComparsionForm = new VersionsComparisonForm(null));
|
||||
SC9.setLeftComponent(MasterComparsionForm.getContent());
|
||||
SC9.setRightComponent(SlaveComparsionForm.getContent());
|
||||
versionsTreeForm.Show();
|
||||
//-
|
||||
versionsTabs.setEnabledAt(0, false);
|
||||
versionsPanel.add(UI.versionsMenuBar, BorderLayout.NORTH);
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
versionsPanel = (versionsTreeForm = new TreeForm(VersionsTree.class)).getContent();
|
||||
}
|
||||
@Override
|
||||
public VariantsWindow getVariantsWindow() {
|
||||
return variantsForm;
|
||||
}
|
||||
@Override
|
||||
public void ShowProjectVariants() {
|
||||
variantsFormPanel.add((variantsForm = new VariantsForm()).getContent());
|
||||
versionsTabs.setEnabledAt(0, true);
|
||||
}
|
||||
@Override
|
||||
public void ShowNoProjectVariants() {
|
||||
CommonUI.Clear(variantsFormPanel);
|
||||
versionsTabs.setEnabledAt(0, false);
|
||||
}
|
||||
@Override
|
||||
public void FocusDistribution() {
|
||||
versionsTabs.setSelectedIndex(0);
|
||||
}
|
||||
@Override
|
||||
public void BlockVariants() {
|
||||
versionsTabs.setEnabledAt(0, false);
|
||||
versionsTabs.setSelectedIndex(1);
|
||||
}
|
||||
@Override
|
||||
public void UnblockVariants() {
|
||||
versionsTabs.setEnabledAt(0, true);
|
||||
}
|
||||
@Override
|
||||
public void RemoveVersionFromComparison(db_project_info version) {
|
||||
MasterComparsionForm.CheckVersion(version);
|
||||
SlaveComparsionForm.CheckVersion(version);
|
||||
}
|
||||
@Override
|
||||
public TreeForm getVersionsForm() {
|
||||
return versionsTreeForm;
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void SaveSplitters() {
|
||||
FormWithSplitters.super.SaveSplitters();
|
||||
if (variantsForm != null) variantsForm.SaveSplitters();
|
||||
}
|
||||
}
|
||||
26
src/_VisualDVM/Visual/Windows/WelcomeForm.form
Normal file
26
src/_VisualDVM/Visual/Windows/WelcomeForm.form
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.WelcomeForm">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="753" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="2e242" class="javax.swing.JTextArea" binding="WelcomeText">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="50"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<editable value="false"/>
|
||||
<enabled value="true"/>
|
||||
<font name="Times New Roman" size="25" style="1"/>
|
||||
<text value=" 	Чтобы начать работу, создайте или откройте проект"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
18
src/_VisualDVM/Visual/Windows/WelcomeForm.java
Normal file
18
src/_VisualDVM/Visual/Windows/WelcomeForm.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.DragDrop.FileDrop;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
public class WelcomeForm {
|
||||
public JPanel content;
|
||||
private JTextArea WelcomeText;
|
||||
public WelcomeForm() {
|
||||
// end filesDropped
|
||||
new FileDrop(System.out, WelcomeText, files -> {
|
||||
if (files.length > 0) {
|
||||
Pass_2021.passes.get(PassCode_2021.OpenCurrentProject).Do(files[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
11
src/_VisualDVM/Visual/Windows/buffer_.form
Normal file
11
src/_VisualDVM/Visual/Windows/buffer_.form
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.buffer_">
|
||||
<grid id="27dc6" binding="panel1" default-binding="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="932" height="766"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</form>
|
||||
6
src/_VisualDVM/Visual/Windows/buffer_.java
Normal file
6
src/_VisualDVM/Visual/Windows/buffer_.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import javax.swing.*;
|
||||
public class buffer_ {
|
||||
private JPanel panel1;
|
||||
//Скачать пакет задач
|
||||
}
|
||||
Reference in New Issue
Block a user