Проверка на скобку

This commit is contained in:
2024-01-20 01:02:26 +06:00
parent af02be6a6d
commit d3e46d79e4
4 changed files with 19 additions and 5 deletions

View File

@ -5,4 +5,4 @@ do.jlink=false
javac.debug=true
javadoc.preview=true
jlink.strip=false
user.properties.file=C:\\Users\\ivanov.i\\AppData\\Roaming\\NetBeans\\17\\build.properties
user.properties.file=C:\\Users\\ivanov.i\\AppData\\Roaming\\NetBeans\\20\\build.properties

View File

@ -2,6 +2,9 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
<group>
<file>file:/O:/projects/Workspace_Java/GettextDB/src/tools/Download2.java</file>
<file>file:/O:/projects/Workspace_Java/GettextDB/src/potoxml/NewJFrame.java</file>
</group>
</open-files>
</project-private>

View File

@ -1,5 +1,5 @@
[main]
db_url = jdbc\:postgresql\://10.1.7.74\:5432/pilot
db_url = jdbc\:postgresql\://10.101.1.6\:5432/transit
db_user = translate
db_password = translate
@ -10,3 +10,10 @@ extensions = (.*\\.php$)||(.*\\.xml$)||(.*\\.js$)
pattern = [0-9|a-z|A-Z|_]+
type = 5
[path1]
path = O:\\projects\\Workspace_PHP\\jwt.local
check = trt(
extensions = (.*\\.php$)||(.*\\.xml$)||(.*\\.js$)
pattern = [0-9|a-z|A-Z|_]+
type = 7

View File

@ -351,7 +351,11 @@ public class NewJFrame extends javax.swing.JFrame
if(s>=0)
{
from=s+check.length();
to=line.indexOf(")", from);
String bracket=")";
if(check.charAt(check.length() - 1)=='[') bracket="]"; //Если открывающая скобка квадратная
to=line.indexOf(bracket, from);
//int e=-1;
//if(line.charAt(s+check.length()) == '"') { e=line.indexOf("\")", from); }
//if(line.charAt(s+check.length()) == '\'') { e = line.indexOf("')", from); }
@ -389,7 +393,7 @@ public class NewJFrame extends javax.swing.JFrame
try (Statement stmt = conn.createStatement()) {
ResultSet rs = stmt.executeQuery("select main._update_translation_identifier('"+text+"',"+type+");");
} catch (SQLException e) {
textArea1.append("Error write to DB\n");
textArea1.append("Error write to DB\n "+e.getMessage());
}
}
}else{