Skip to content

Commit

Permalink
доработки
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSergey committed Aug 23, 2022
1 parent 7a7df81 commit 122c258
Show file tree
Hide file tree
Showing 59 changed files with 9,509 additions and 5,707 deletions.
17 changes: 17 additions & 0 deletions clusterAdminApplication/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,22 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion clusterAdminApplication/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/logs/
/bin/
/config.json
/config*.json
/target/
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
Expand Down
16 changes: 0 additions & 16 deletions clusterAdminApplication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@
<finalName>OneS_ClusterAdmin-${project.version}-macOS</finalName>
</build>
</profile>
<profile>
<id>windows-x86</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<clusterAdminLibrary.artifactId>ru.yanygin.clusterAdminLibrary.windows_x86</clusterAdminLibrary.artifactId>
<swt.artifactId>org.eclipse.swt.win32.win32.x86</swt.artifactId>
</properties>
<build>
<finalName>OneS_ClusterAdmin-${project.version}-windows-x86</finalName>
</build>
</profile>
<profile>
<id>windows-x86_64</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ClusterAdmin {
public static void main(String[] args) {

try {
ClusterViewer window = new ClusterViewer();
ClusterViewer window = new ClusterViewer(null);
window.setBlockOnOpen(true);
window.open();
Display.getCurrent().dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import ru.yanygin.clusterAdminLibrary.ClusterProvider;
import ru.yanygin.clusterAdminLibrary.Config;
import ru.yanygin.clusterAdminLibraryUI.ViewerArea;

/** Application window class. */
Expand All @@ -20,20 +21,26 @@ public class ClusterViewer extends ApplicationWindow {
Composite mainForm;

ClusterProvider clusterProvider = new ClusterProvider();
Config config;

/** Create the application window. */
public ClusterViewer() {
/**
* Create the application window.
*
* @param configPath - путь к файлу конфигурации
*/
public ClusterViewer(String configPath) {
super(null);
createActions();
addToolBar(SWT.FLAT | SWT.WRAP);
addMenuBar();
addStatusLine();

this.config = Config.readConfig(configPath);
}

@Override
public boolean close() {
clusterProvider.close();
config.close();
return super.close();
}

Expand All @@ -50,7 +57,7 @@ protected Control createContents(Composite parent) {

Menu menu = this.getMenuBarManager().getMenu();

ViewerArea container = new ViewerArea(parent, SWT.NONE, menu, toolBar, clusterProvider);
ViewerArea container = new ViewerArea(parent, SWT.NONE, menu, toolBar, clusterProvider, config);

return container;
}
Expand Down
23 changes: 23 additions & 0 deletions clusterAdminLibrary/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,28 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions clusterAdminLibrary/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/logs/
/bin/
/target/
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ encoding//src/main/java/ru/yanygin/clusterAdminLibrary=UTF-8
encoding//src/main/java/ru/yanygin/clusterAdminLibraryUI=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
1 change: 1 addition & 0 deletions clusterAdminLibrary/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
Expand Down
68 changes: 47 additions & 21 deletions clusterAdminLibrary/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@
<finalName>ru.yanygin.clusterAdminLibrary.macOS-${project.version}</finalName>
</build>
</profile>
<profile>
<id>windows-x86</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<artifactId>ru.yanygin.clusterAdminLibrary.windows_x86</artifactId>
<swt.artifactId>org.eclipse.swt.win32.win32.x86</swt.artifactId>
</properties>
<build>
<finalName>ru.yanygin.clusterAdminLibrary.windows_x86-${project.version}</finalName>
</build>
</profile>
<profile>
<id>windows-x86_64</id>
<activation>
Expand Down Expand Up @@ -113,11 +97,12 @@
<version>3.116.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
Expand Down Expand Up @@ -225,7 +210,28 @@
<artifactId>com._1c.v8.swp</artifactId>
<version>1.0.3-SNAPSHOT</version>
</dependency>


<!-- https://mvnrepository.com/artifact/org.apache.maven/maven-model -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.8.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220320</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/fluent-hc -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.5.13</version>
</dependency>

</dependencies>

<build>
Expand All @@ -236,6 +242,7 @@
</resource>
<resource>
<directory>${basedir}/src/main/java/ru/yanygin/clusterAdminLibrary</directory>
<filtering>true</filtering>
<targetPath>/ru/yanygin/clusterAdminLibrary</targetPath>
<includes>
<include>**/*.properties</include>
Expand Down Expand Up @@ -395,6 +402,25 @@
</executions>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0-M1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0-M1</version>
</dependency>
</dependencies>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,4 @@ public static void dispose() {
disposeFonts();
disposeCursors();
}

public static Color getWhiteColor() {
return getColor(255, 255, 255);
}

public static Color getPinkColor() {
return getColor(255, 204, 204);
}

public static Color getLightGreenColor() {
return getColor(128, 255, 128);
}

}
Loading

0 comments on commit 122c258

Please sign in to comment.