Skip to content

Commit

Permalink
v4.9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
herve91 committed Apr 26, 2023
1 parent ec58385 commit 046efde
Show file tree
Hide file tree
Showing 30 changed files with 321 additions and 136 deletions.
14 changes: 7 additions & 7 deletions sources/.classpath
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/neo4j-jdbc-driver-4.0.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/sqlite-jdbc-3.39.3.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/postgresql-42.5.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/orai18n-21.7.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ojdbc11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mysql-connector-j-8.0.31.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mssql-jdbc-11.2.0.jre11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
<classpathentry exported="true" kind="lib" path="lib/orai18n.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.48.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mssql-jdbc-8.2.2.jre11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/sqlite-jdbc-3.30.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/postgresql-42.2.12.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ojdbc10.jar"/>
<classpathentry exported="true" kind="lib" path="lib/neo4j-jdbc-driver-4.0.0.jar"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
Expand Down
16 changes: 8 additions & 8 deletions sources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Database export / import plugin for Archimate Tool
Bundle-SymbolicName: org.archicontribs.database;singleton:=true
Bundle-Version: 4.9.5
Bundle-Version: 4.9.6
Bundle-Vendor: Herve Jouin
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
lib/neo4j-jdbc-driver-4.0.5.jar,
lib/json-simple-1.1.1.jar,
lib/log4j-1.2.17.jar,
lib/lombok.jar,
lib/mssql-jdbc-8.2.2.jre11.jar,
lib/mysql-connector-java-5.1.48.jar,
lib/neo4j-jdbc-driver-4.0.0.jar,
lib/ojdbc10.jar,
lib/orai18n.jar,
lib/postgresql-42.2.12.jar,
lib/sqlite-jdbc-3.30.1.jar
lib/mssql-jdbc-11.2.0.jre11.jar,
lib/mysql-connector-j-8.0.31.jar,
lib/ojdbc11.jar,
lib/orai18n-21.7.0.0.jar,
lib/postgresql-42.5.0.jar,
lib/sqlite-jdbc-3.39.3.0.jar
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.archicontribs.database.DBPlugin
Require-Bundle: org.eclipse.core.runtime,
Expand Down
Binary file added sources/lib/mssql-jdbc-11.2.0.jre11.jar
Binary file not shown.
Binary file removed sources/lib/mssql-jdbc-8.2.2.jre11.jar
Binary file not shown.
Binary file added sources/lib/mysql-connector-j-8.0.31.jar
Binary file not shown.
Binary file removed sources/lib/mysql-connector-java-5.1.48.jar
Binary file not shown.
Binary file not shown.
Binary file removed sources/lib/ojdbc10.jar
Binary file not shown.
Binary file added sources/lib/ojdbc11.jar
Binary file not shown.
Binary file not shown.
Binary file removed sources/lib/postgresql-42.2.12.jar
Binary file not shown.
Binary file added sources/lib/postgresql-42.5.0.jar
Binary file not shown.
Binary file removed sources/lib/sqlite-jdbc-3.30.1.jar
Binary file not shown.
Binary file added sources/lib/sqlite-jdbc-3.39.3.0.jar
Binary file not shown.
12 changes: 7 additions & 5 deletions sources/src/org/archicontribs/database/DBDatabaseEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public String getDriverClass() throws SQLException {
switch (this.getDriver()) {
case "postgresql": return "org.postgresql.Driver";
case "ms-sql": return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
case "mysql": return "com.mysql.jdbc.Driver";
case "mysql": return "com.mysql.cj.jdbc.Driver";
case "neo4j": return "org.neo4j.jdbc.Driver";
case "oracle": return "oracle.jdbc.driver.OracleDriver";
case "sqlite": return "org.sqlite.JDBC";
Expand Down Expand Up @@ -270,11 +270,13 @@ public String getJdbcConnectionString() {
break;
case "ms-sql":
this.jdbcConnectionString = "jdbc:sqlserver://" + this.getServer() + ":" + this.getPort() + ";databaseName=" + this.getDatabase();
try {
if ( DBPlugin.isEmpty(this.getUsername()) && DBPlugin.isEmpty(this.getDecryptedPassword()) )
this.jdbcConnectionString += ";integratedSecurity=true";
try {
if ( DBPlugin.isEmpty(this.getUsername()) && DBPlugin.isEmpty(this.getDecryptedPassword()) )
this.jdbcConnectionString += ";integratedSecurity=true";
// we enable SSL encryption
this.jdbcConnectionString+=";encrypt=true;trustServerCertificate=true";
} catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException | NoSuchAlgorithmException | NoSuchPaddingException e) {
DBGuiUtils.popup(Level.ERROR, "Failed to decrypt password.", e);
DBGuiUtils.popup(Level.ERROR, "Database: "+this.database+"\n\nFailed to decrypt the password. Did you change your network configuration since passwords have been registered ?", e);
this.jdbcConnectionString = "";
}
break;
Expand Down
16 changes: 16 additions & 0 deletions sources/src/org/archicontribs/database/DBPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@
* Fix specialization SQL failures when using PostGreSQL database
* Fix canvas import as single component
* Fix count images during import model check process
*
* v4.9.6 25/10/2022
* Update databases drivers
* MySQL: from 5.1.8.4 to 8.0.30
* PostGreSQL: from 42.2.12 to 42.5.0
* SQLite: from 3.3.0.1 to 3.39.3.0
* Sql Server: from 8.22 to 11.2.0 (with SSL encryption activated)
* Oracle: from 10 to 11
* Neo4J: from 4.0.0 to 4.5.0
* Fix procedure that checks if a model needs to be exported
* Fix count images to import that was wrong when specializations did not have any attached image
* Fix Neo4J request that caused failures during export
* Fix nested folders import that could lead to components beeing imported in wrong parent
* Change folders checksum calculation as it could change if two objects have got the same name
* Update plugin windows position to center them from Archi main window
* Add stacktrace in error popup in case of exception
*
* -----------------------------------------------------------------------------------------
*
Expand Down
22 changes: 17 additions & 5 deletions sources/src/org/archicontribs/database/GUI/DBGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package org.archicontribs.database.GUI;

import java.awt.Toolkit;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -43,6 +44,7 @@
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageLoader;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
Expand Down Expand Up @@ -229,7 +231,8 @@ protected DBGui(String title) {

this.dialog = new Shell(display, SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL | SWT.RESIZE);
this.dialog.setText(DBPlugin.pluginTitle + " - " + title);
this.dialog.setMinimumSize(1280, 850);
this.dialog.setSize(1280, 900);
this.dialog.setMinimumSize(1280, 900);

/**
* Calculate the default height of a Label widget
Expand All @@ -238,10 +241,19 @@ protected DBGui(String title) {
label.setText("Test");
this.defaultLabelHeight = label.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
label.dispose();

// we center the dialog on the screen
int locationX = (display.getBounds().width - this.dialog.getSize().x)/2;
int locationY = (display.getBounds().height - this.dialog.getSize().y)/2;

// Use the active shell, if available, to determine the new window placing
int locationX = 0;
int locationY = 0;
Shell parent = display.getActiveShell();
if (parent!=null) {
Rectangle parentSize = parent.getBounds();
locationX = (parentSize.width - 1280)/2+parentSize.x;
locationY = (parentSize.height - 850)/2+parentSize.y;
} else {
locationX = (Toolkit.getDefaultToolkit().getScreenSize().width - 500) / 4;
locationY = (Toolkit.getDefaultToolkit().getScreenSize().height - 70) / 4;
}

this.dialog.setLocation(new Point(locationX, locationY));

Expand Down
Loading

0 comments on commit 046efde

Please sign in to comment.