提交 d8d3a183 编写于 作者: S serge-rider

#10 Core services refactoring


Former-commit-id: f9bed361
上级 30ee67fd
......@@ -13,7 +13,6 @@ Export-Package: org.jkiss.dbeaver,
org.jkiss.dbeaver.registry,
org.jkiss.dbeaver.registry.datatype,
org.jkiss.dbeaver.registry.driver,
org.jkiss.dbeaver.registry.formatter,
org.jkiss.dbeaver.registry.tools,
org.jkiss.dbeaver.registry.updater,
org.jkiss.dbeaver.runtime,
......
......@@ -2,16 +2,13 @@
Bundle-Vendor = JKISS
Bundle-Name = DBeaver Core Plug-in
extension-point.org.jkiss.dbeaver.pluginService.name = Plugin service
extension-point.org.jkiss.dbeaver.mavenRepository.name = Maven repositories config
extension-point.org.jkiss.dbeaver.dataSourceProvider.name = DataSource provider
extension-point.org.jkiss.dbeaver.dataSourceView.name = DataSource views
extension-point.org.jkiss.dbeaver.databaseEditor.name = Custom Entity Editor
extension-point.org.jkiss.dbeaver.dataTypeProvider.name = DataType provider
extension-point.org.jkiss.dbeaver.dataManager.name = Data value managers
extension-point.org.jkiss.dbeaver.dataFormatter.name = Data value formatters
extension-point.org.jkiss.dbeaver.objectManager.name = Database object managers
extension-point.org.jkiss.dbeaver.aggregateFunction.name = Aggregate Functions
extension-point.org.jkiss.dbeaver.sqlCommand.name = SQL script commands
extension-point.org.jkiss.dbeaver.sqlFormatter.name = SQL formatters
extension-point.org.jkiss.dbeaver.resourceHandler.name = Resource Handlers
......@@ -322,38 +319,6 @@ command.org.jkiss.dbeaver.core.process.stop.description=Terminates running proce
command.org.jkiss.dbeaver.ui.editors.text.content.format.name=Content Format
command.org.jkiss.dbeaver.ui.editors.text.content.format.description=Format text
DateFormatter.date.label=Date
DateFormatter.date.general.label=General
DateFormatter.date.general.pattern.label=Pattern
DateFormatter.date.general.pattern.description=Date pattern
DateFormatter.time.label=Time
DateFormatter.time.general.label=General
DateFormatter.time.general.pattern.label=Pattern
DateFormatter.time.general.pattern.description=Time pattern
DateFormatter.timestamp.label=Timestamp
DateFormatter.timestamp.general.label=General
DateFormatter.timestamp.general.pattern.label=Pattern
DateFormatter.timestamp.general.pattern.description=Timestamp pattern
DateFormatter.number.label=Numbers
DateFormatter.number.general.label=General
DateFormatter.number.general.grouping.label=Use Grouping
DateFormatter.number.general.grouping.description=Tells grouping is used in this format
DateFormatter.number.general.maxIntDigits.label=Maximum integer digits
DateFormatter.number.general.maxIntDigits.description=Maximum integer digits
DateFormatter.number.general.minIntDigits.label=Minimum integer digits
DateFormatter.number.general.minIntDigits.description=Minimum integer digits
DateFormatter.number.general.maxFractDigits.label=Maximum fraction digits
DateFormatter.number.general.maxFractDigits.description=Maximum fraction digits
DateFormatter.number.general.minFractDigits.label=Minimum fraction digits
DateFormatter.number.general.minFractDigits.description=Minimum fraction digits
DateFormatter.number.general.useTypeScale.label=Use data type scale for fraction digits
DateFormatter.number.general.useTypeScale.description=Use column/attribute data type scale as minimum fraction digits number
DateFormatter.number.general.roundingMode.label=Rounding mode
DateFormatter.number.general.roundingMode.description=Rounding mode
menu.navigate=Navigate
menu.search=Se&arch
menu.database=&Database
......
......@@ -3,35 +3,6 @@
# Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
# Copyright (C) 2016 Karl Griesser (fullref@gmail.com)
DateFormatter.date.general.label = Allgemein
DateFormatter.date.general.pattern.description = Datumsmuster
DateFormatter.date.general.pattern.label = Muster
DateFormatter.date.label = Datum
DateFormatter.number.general.grouping.description = Gruppierung wird bei diesem Format verwendet
DateFormatter.number.general.grouping.label = Gruppierung verwenden
DateFormatter.number.general.label = Allgemein
DateFormatter.number.general.maxFractDigits.description = Maximale Anzahl an Nachkommastellen
DateFormatter.number.general.maxFractDigits.label = Maximale Anzahl an Nachkommastellen
DateFormatter.number.general.maxIntDigits.description = Maximale Anzahl an Vorkommastellen
DateFormatter.number.general.maxIntDigits.label = Maximale Anzahl an Vorkommastellen
DateFormatter.number.general.minFractDigits.description = Minimale Anzahl an Nachkommastellen
DateFormatter.number.general.minFractDigits.label = Minimale Anzahl an Nachkommastellen
DateFormatter.number.general.minIntDigits.description = Minimale Anzahl an Vorkommastellen
DateFormatter.number.general.minIntDigits.label = Minimale Anzahl an Vorkommastellen
DateFormatter.number.general.roundingMode.description = Rundungsmodus
DateFormatter.number.general.roundingMode.label = Rundungsmodus
DateFormatter.number.general.useTypeScale.description = Verwendung der Spalten-/Attributdatentyp-Skala als minimale Bruchziffernanzahl
DateFormatter.number.general.useTypeScale.label = Datentypskala f\u00FCr Bruchziffern verwenden
DateFormatter.number.label = Zahlen
DateFormatter.time.general.label = Allgemein
DateFormatter.time.general.pattern.description = Zeitmuster
DateFormatter.time.general.pattern.label = Muster
DateFormatter.time.label = Zeit
DateFormatter.timestamp.general.label = Allgemein
DateFormatter.timestamp.general.pattern.description = Zeitstempelmuster
DateFormatter.timestamp.general.pattern.label = Muster
DateFormatter.timestamp.label = Zeitstempel
category.dbconnection.description = Datenbankverbindungsbefehle
category.dbconnection.name = Verbindung
category.dbnavigator.description = Datenbanknavigatorbefehle
......
......@@ -100,32 +100,7 @@ command.org.jkiss.dbeaver.core.process.stop.name = Terminar proceso
command.org.jkiss.dbeaver.core.process.stop.description = Terminar proceso en ejecuci\u0443n
command.org.jkiss.dbeaver.ui.editors.text.content.format.name = Formatear contenidp
command.org.jkiss.dbeaver.ui.editors.text.content.format.description = Formatear texto
DateFormatter.date.label = Fecha
DateFormatter.date.general.label = General
DateFormatter.date.general.pattern.label = Cadena de Formato
DateFormatter.date.general.pattern.description = Cadena de formato de las fechas
DateFormatter.time.label = Hora
DateFormatter.time.general.label = General
DateFormatter.time.general.pattern.label = Cadena de Formato
DateFormatter.time.general.pattern.description = Cadena de formato de las horas
DateFormatter.timestamp.label = Fecha/Hora
DateFormatter.timestamp.general.label = General
DateFormatter.timestamp.general.pattern.label = Cadena de formato de fecha/hora
DateFormatter.timestamp.general.pattern.description = Cadena de formato de fecha/hora
DateFormatter.number.label = N\u044Ameros
DateFormatter.number.general.label = General
DateFormatter.number.general.grouping.label = Usar agrupaci\u0443n
DateFormatter.number.general.grouping.description = Indica qu\u0439 agrupaci\u0443n se usa en el formato
DateFormatter.number.general.maxIntDigits.label = M\u0431ximas cifras enteras
DateFormatter.number.general.maxIntDigits.description = M\u0431ximas cifras enteras
DateFormatter.number.general.minIntDigits.label = M\u043Dnimas cifras enteras
DateFormatter.number.general.minIntDigits.description = M\u043Dnimas cifras enteras
DateFormatter.number.general.maxFractDigits.label = M\u0431ximas cifras decimales
DateFormatter.number.general.maxFractDigits.description = M\u0431ximas cifras decimales
DateFormatter.number.general.minFractDigits.label = M\u043Dximas cifras decimales
DateFormatter.number.general.minFractDigits.description = M\u043Dximas cifras decimales
DateFormatter.number.general.roundingMode.label = Modo de redondeo
DateFormatter.number.general.roundingMode.description = Modo de redondeo
menu.database = Base de Datos
menu.database.tools = Herramientas
menu.sqleditor = Editor SQL
......
......@@ -6,14 +6,11 @@ Bundle-Name = Extension Noyau DBeaver
extension.org.jkiss.dbeaver.DBeaverNature.name = DBeaver Nature
extension-point.org.jkiss.dbeaver.pluginService.name = Service d'extensions
extension-point.org.jkiss.dbeaver.mavenRepository.name = Config des d\u00E9p\u00F4ts Maven
extension-point.org.jkiss.dbeaver.dataSourceProvider.name = Fournisseur de Sources de donn\u00E9es
extension-point.org.jkiss.dbeaver.databaseEditor.name = Editeur d'entit\u00E9 personnalis\u00E9es
extension-point.org.jkiss.dbeaver.dataTypeProvider.name = Fournisseur de types de donn\u00E9es
extension-point.org.jkiss.dbeaver.dataManager.name = Gestionnaires de donn\u00E9es
extension-point.org.jkiss.dbeaver.dataFormatter.name = Formateurs de donn\u00E9es
extension-point.org.jkiss.dbeaver.aggregateFunction.name = Fonctions d'aggr\u00E9gation
extension-point.org.jkiss.dbeaver.sqlCommand.name = Commandes de scripts SQL
extension-point.org.jkiss.dbeaver.sqlFormatter.name = Formateurs SQL
extension-point.org.jkiss.dbeaver.resourceHandler.name = Handlers de ressources
......@@ -33,35 +30,6 @@ view.shell.process.title = Processus
view.database.output.title=Sortie
view.sql.results.title=Donn\u00E9es
DateFormatter.date.general.label = G\u00E9n\u00E9ral
DateFormatter.date.general.pattern.description = Mod\u00E8le de date
DateFormatter.date.general.pattern.label = Mod\u00E8le
DateFormatter.date.label = Date
DateFormatter.number.general.grouping.description = Indique un regroupement dans ce format
DateFormatter.number.general.grouping.label = Regrouper
DateFormatter.number.general.label = G\u00E9n\u00E9ral
DateFormatter.number.general.maxFractDigits.description = Nombre maximal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.maxFractDigits.label = Nombre maximal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.maxIntDigits.description = Nombre maximal de chiffres entiers
DateFormatter.number.general.maxIntDigits.label = Nombre maximal de chiffres entiers
DateFormatter.number.general.minFractDigits.description = Nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.minFractDigits.label = Nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.minIntDigits.description = Nombre minimal de chiffres entiers
DateFormatter.number.general.minIntDigits.label = Nombre minimal de chiffres entiers
DateFormatter.number.general.useTypeScale.label = Utiliser l'\u00E9chelle du type de donne\u00E9s pour les chiffres \u00E0 virgules
DateFormatter.number.general.useTypeScale.description = Utiliser la colonne/attribut d'\u00E9chelle du type de donne\u00E9s comme nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.roundingMode.description = R\u00E8gle d'arrondissement
DateFormatter.number.general.roundingMode.label = R\u00E8gle d'arrondissement
DateFormatter.number.label = Nombre
DateFormatter.time.general.label = G\u00E9n\u00E9ral
DateFormatter.time.general.pattern.description = Mod\u00E8le de date/heure
DateFormatter.time.general.pattern.label = Mod\u00E8le
DateFormatter.time.label = Date/heure
DateFormatter.timestamp.general.label = G\u00E9n\u00E9ral
DateFormatter.timestamp.general.pattern.description = Mod\u00E8le d'horodatage
DateFormatter.timestamp.general.pattern.label = Mod\u00E8le
DateFormatter.timestamp.label = Horodatage
category.dbconnection.description = Connexion \u00E0 une base de donn\u00E9es
category.dbconnection.name = Connexion
category.dbnavigator.description = Navigateur de bases de donn\u00E9es
......
......@@ -98,32 +98,7 @@ command.org.jkiss.dbeaver.core.process.stop.name = Termina processo
command.org.jkiss.dbeaver.core.process.stop.description = Termina processo in esecuzione
command.org.jkiss.dbeaver.ui.editors.text.content.format.name = Formatta contenuto
command.org.jkiss.dbeaver.ui.editors.text.content.format.description = Formatta testo
DateFormatter.date.label = Data
DateFormatter.date.general.label = Generale
DateFormatter.date.general.pattern.label = Formato
DateFormatter.date.general.pattern.description = Formato Data
DateFormatter.time.label = Ora
DateFormatter.time.general.label = Generale
DateFormatter.time.general.pattern.label = Formato
DateFormatter.time.general.pattern.description = Formato Ora
DateFormatter.timestamp.label = Data/Oa
DateFormatter.timestamp.general.label = Generale
DateFormatter.timestamp.general.pattern.label = Formato
DateFormatter.timestamp.general.pattern.description = Formato Data/Ora
DateFormatter.number.label = Numeri
DateFormatter.number.general.label = Generale
DateFormatter.number.general.grouping.label = Usa il Raggruppamento
DateFormatter.number.general.grouping.description = Segnala quale raggruppamento \u00E8 usato in questo formato
DateFormatter.number.general.maxIntDigits.label = Massimo intero per le cifre
DateFormatter.number.general.maxIntDigits.description = Massimo intero per le cifre
DateFormatter.number.general.minIntDigits.label = Minimo intero per le cifre
DateFormatter.number.general.minIntDigits.description = Minimo intero per le cifre
DateFormatter.number.general.maxFractDigits.label = Massima frazione per le cifre
DateFormatter.number.general.maxFractDigits.description = Massima frazione per le cifre
DateFormatter.number.general.minFractDigits.label = Minima frazione per le cifre
DateFormatter.number.general.minFractDigits.description = Minima frazione per le cifre
DateFormatter.number.general.roundingMode.label = Modalit\u00E0 di arrotondamento
DateFormatter.number.general.roundingMode.description = Modalit\u00E0 di arrotondamento
menu.database = Database
menu.database.tools = Strumenti
menu.sqleditor = Editor SQL
......
Bundle-Name =DBeaver\u30B3\u30A2\u30D7\u30E9\u30B0\u30A4\u30F3
extension-point.org.jkiss.dbeaver.pluginService.name =\u30D7\u30E9\u30B0\u30A4\u30F3\u30B5\u30FC\u30D3\u30B9
extension-point.org.jkiss.dbeaver.mavenRepository.name =Maven\u30EA\u30DD\u30B8\u30C8\u30EA\u8A2D\u5B9A
extension-point.org.jkiss.dbeaver.dataSourceProvider.name =\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30D7\u30ED\u30D0\u30A4\u30C0
extension-point.org.jkiss.dbeaver.databaseEditor.name =\u30AB\u30B9\u30BF\u30E0\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30A8\u30C7\u30A3\u30BF
extension-point.org.jkiss.dbeaver.dataTypeProvider.name =\u30C7\u30FC\u30BF\u578B\u30D7\u30ED\u30D0\u30A4\u30C0
extension-point.org.jkiss.dbeaver.dataManager.name =\u30C7\u30FC\u30BF\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC
extension-point.org.jkiss.dbeaver.dataFormatter.name =\u30C7\u30FC\u30BF\u30D5\u30A9\u30FC\u30DE\u30C3\u30BF
extension-point.org.jkiss.dbeaver.aggregateFunction.name =\u96C6\u8A08\u95A2\u6570
extension-point.org.jkiss.dbeaver.sqlCommand.name =SQL\u30B9\u30AF\u30EA\u30D7\u30C8\u30B3\u30DE\u30F3\u30C9
extension-point.org.jkiss.dbeaver.sqlFormatter.name =SQL\u30D5\u30A9\u30FC\u30DE\u30C3\u30BF
extension-point.org.jkiss.dbeaver.resourceHandler.name =\u30EA\u30BD\u30FC\u30B9\u30CF\u30F3\u30C9\u30E9
......@@ -301,38 +298,6 @@ command.org.jkiss.dbeaver.core.process.stop.description=\u5B9F\u884C\u30D7\u30ED
command.org.jkiss.dbeaver.ui.editors.text.content.format.name=\u30B3\u30F3\u30C6\u30F3\u30C4\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8
command.org.jkiss.dbeaver.ui.editors.text.content.format.description=\u30C6\u30AD\u30B9\u30C8\u306E\u66F8\u5F0F\u8A2D\u5B9A
DateFormatter.date.label=\u65E5\u4ED8
DateFormatter.date.general.label=\u4E00\u822C
DateFormatter.date.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.date.general.pattern.description=\u65E5\u4ED8\u30D1\u30BF\u30FC\u30F3
DateFormatter.time.label=\u6642\u9593
DateFormatter.time.general.label=\u4E00\u822C
DateFormatter.time.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.time.general.pattern.description=\u6642\u9593\u30D1\u30BF\u30FC\u30F3
DateFormatter.timestamp.label=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7
DateFormatter.timestamp.general.label=\u4E00\u822C
DateFormatter.timestamp.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.timestamp.general.pattern.description=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u30D1\u30BF\u30FC\u30F3
DateFormatter.number.label=\u6570\u5B57
DateFormatter.number.general.label=\u4E00\u822C
DateFormatter.number.general.grouping.label=\u30B0\u30EB\u30FC\u30D7\u5316\u306E\u4F7F\u7528
DateFormatter.number.general.grouping.description=\u30B0\u30EB\u30FC\u30D7\u5316\u304C\u3053\u306E\u5F62\u5F0F\u3067\u4F7F\u7528\u3055\u308C\u308B\u3053\u3068\u3092\u4F1D\u3048\u308B
DateFormatter.number.general.maxIntDigits.label=\u6700\u5927\u6574\u6570\u6841
DateFormatter.number.general.maxIntDigits.description=\u6700\u5927\u6574\u6570\u6841
DateFormatter.number.general.minIntDigits.label=\u6700\u5C0F\u6574\u6570\u6841
DateFormatter.number.general.minIntDigits.description=\u6700\u5C0F\u6574\u6570\u6841
DateFormatter.number.general.maxFractDigits.label=\u6700\u5927\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.maxFractDigits.description=\u6700\u5927\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.minFractDigits.label=\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.minFractDigits.description=\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.useTypeScale.label=\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u306B\u306F\u30C7\u30FC\u30BF\u578B\u5C3A\u5EA6\u3092\u4F7F\u7528\u3059\u308B
DateFormatter.number.general.useTypeScale.description=\u5217/\u5C5E\u6027\u306E\u30C7\u30FC\u30BF\u578B\u306E\u30B9\u30B1\u30FC\u30EB\u3092\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B
DateFormatter.number.general.roundingMode.label=\u4E38\u3081\u30E2\u30FC\u30C9
DateFormatter.number.general.roundingMode.description=\u4E38\u3081\u30E2\u30FC\u30C9
menu.database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9
menu.database.tools=\u30C4\u30FC\u30EB
menu.database.sql.generate=SQL\u306E\u751F\u6210
......
......@@ -4,35 +4,6 @@
Bundle-Name = DBeaver \u041F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430
Bundle-Vendor = JKISS
DateFormatter.date.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.date.general.pattern.description = \u0428\u0430\u0431\u043B\u043E\u043D \u0434\u0430\u0442\u044B
DateFormatter.date.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.date.label = \u0414\u0430\u0442\u0430
DateFormatter.number.general.grouping.description = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0443 \u0432 \u044D\u0442\u043E\u043C \u0444\u043E\u0440\u043C\u0430\u0442\u0435
DateFormatter.number.general.grouping.label = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0443
DateFormatter.number.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.number.general.maxFractDigits.description = Maximum fraction digits
DateFormatter.number.general.maxFractDigits.label = Maximum fraction digits
DateFormatter.number.general.maxIntDigits.description = Maximum integer digits
DateFormatter.number.general.maxIntDigits.label = \u041C\u0430\u043A\u0441. \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0446\u0438\u0444\u0440 \u0432 \u0447\u0438\u0441\u043B\u0435
DateFormatter.number.general.minFractDigits.description = Minimum fraction digits
DateFormatter.number.general.minFractDigits.label = Minimum fraction digits
DateFormatter.number.general.minIntDigits.description = Minimum integer digits
DateFormatter.number.general.minIntDigits.label = Minimum integer digits
DateFormatter.number.general.roundingMode.description = \u0420\u0435\u0436\u0438\u043C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F
DateFormatter.number.general.roundingMode.label = \u0420\u0435\u0436\u0438\u043C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F
DateFormatter.number.label = \u0427\u0438\u0441\u043B\u0430
DateFormatter.time.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.time.general.pattern.description = \u0428\u0430\u0431\u043B\u043E\u043D \u0432\u0440\u0435\u043C\u0435\u043D\u0438
DateFormatter.time.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.time.label = \u0412\u0440\u0435\u043C\u044F
DateFormatter.timestamp.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.timestamp.general.pattern.description = Timestamp pattern
DateFormatter.timestamp.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.timestamp.label = Timestamp
category.dbconnection.description = \u041A\u043E\u043C\u0430\u043D\u0434\u044B \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u0441 \u0411\u0414
category.dbconnection.name = \u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435
category.dbnavigator.description = \u041A\u043E\u043C\u0430\u043D\u0434\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0411\u0414
......
......@@ -5,37 +5,6 @@
Bundle-Name = DBeaver \u6838\u5FC3\u63D2\u4EF6
Bundle-Vendor = JKISS
DateFormatter.date.general.label = \u5E38\u89C4
DateFormatter.date.general.pattern.description = \u65E5\u671F\u6A21\u5F0F
DateFormatter.date.general.pattern.label = \u6A21\u5F0F
DateFormatter.date.label = \u65E5\u671F
DateFormatter.number.general.grouping.description = \u5728\u8BE5\u683C\u5F0F\u4E2D\u4F7F\u7528\u5206\u7EC4
DateFormatter.number.general.grouping.label = \u5206\u7EC4
DateFormatter.number.general.label = \u5E38\u89C4
DateFormatter.number.general.maxFractDigits.description = \u6700\u591A\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.maxFractDigits.label = \u6700\u591A\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.maxIntDigits.description = \u6700\u5927\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.maxIntDigits.label = \u6700\u5927\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.minFractDigits.description = \u6700\u5C11\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.minFractDigits.label = \u6700\u5C11\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.minIntDigits.description = \u6700\u5C0F\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.minIntDigits.label = \u6700\u5C0F\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.roundingMode.description = \u53D6\u6574\u6A21\u5F0F
DateFormatter.number.general.roundingMode.label = \u53D6\u6574\u6A21\u5F0F
DateFormatter.number.general.useTypeScale.description = \u4F7F\u7528\u5217\u6216\u5C5E\u6027\u6570\u636E\u7C7B\u578B\u7684\u5C0F\u6570\u4F4D\u6570\u4F5C\u4E3A\u6700\u5C0F\u7684\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.useTypeScale.label = \u4F7F\u7528\u6570\u636E\u7C7B\u578B\u7684\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.label = \u6570\u5B57
DateFormatter.time.general.label = \u5E38\u89C4
DateFormatter.time.general.pattern.description = \u65F6\u95F4\u6A21\u5F0F
DateFormatter.time.general.pattern.label = \u6A21\u5F0F
DateFormatter.time.label = \u65F6\u95F4
DateFormatter.timestamp.general.label = \u5E38\u89C4
DateFormatter.timestamp.general.pattern.description = \u65F6\u95F4\u6233\u6A21\u5F0F
DateFormatter.timestamp.general.pattern.label = \u6A21\u5F0F
DateFormatter.timestamp.label = \u65F6\u95F4\u6233
category.dbconnection.description = \u6570\u636E\u5E93\u8FDE\u63A5\u547D\u4EE4
category.dbconnection.name = \u8FDE\u63A5
category.dbnavigator.description = \u6570\u636E\u5E93\u5BFC\u822A\u547D\u4EE4
......@@ -385,8 +354,6 @@ editor.folder.name = \u6587\u4EF6\u5939\u7F16\u8F91\u5668
editor.lob.name = \u5927\u578B\u5BF9\u8C61\u7F16\u8F91\u5668
editor.sql.name = SQL \u7F16\u8F91\u5668
extension-point.org.jkiss.dbeaver.aggregateFunction.name = \u805A\u96C6\u51FD\u6570
extension-point.org.jkiss.dbeaver.dataFormatter.name = \u6570\u636E\u683C\u5F0F\u5668
extension-point.org.jkiss.dbeaver.dataManager.name = \u6570\u636E\u7BA1\u7406\u5668
extension-point.org.jkiss.dbeaver.dataSourceProvider.name = \u6570\u636E\u6E90\u63D0\u4F9B\u8005
extension-point.org.jkiss.dbeaver.dataSourceView.name = \u6570\u636E\u6E90\u67E5\u770B\u5668
......@@ -395,7 +362,6 @@ extension-point.org.jkiss.dbeaver.databaseEditor.name = \u81EA\u5B9A\u4
extension-point.org.jkiss.dbeaver.language.name = \u8BED\u8A00
extension-point.org.jkiss.dbeaver.mavenRepository.name = Maven \u4ED3\u5E93\u914D\u7F6E
extension-point.org.jkiss.dbeaver.networkHandler.name = \u7F51\u7EDC\u5904\u7406\u5668
extension-point.org.jkiss.dbeaver.pluginService.name = \u63D2\u4EF6\u670D\u52A1
extension-point.org.jkiss.dbeaver.product.bundles.name = \u4EA7\u54C1\u5305
extension-point.org.jkiss.dbeaver.resourceHandler.name = \u8D44\u6E90\u5904\u7406\u7A0B\u5E8F
extension-point.org.jkiss.dbeaver.resources.name = \u8D44\u6E90
......
......@@ -25,7 +25,6 @@
<extension-point id="org.jkiss.dbeaver.mavenRepository" name="%extension-point.org.jkiss.dbeaver.mavenRepository.name" schema="schema/org.jkiss.dbeaver.mavenRepository.exsd"/>
<extension-point id="org.jkiss.dbeaver.dataTypeProvider" name="%extension-point.org.jkiss.dbeaver.dataTypeProvider.name" schema="schema/org.jkiss.dbeaver.dataTypeProvider.exsd"/>
<extension-point id="org.jkiss.dbeaver.dataSourceProvider" name="%extension-point.org.jkiss.dbeaver.dataSourceProvider.name" schema="schema/org.jkiss.dbeaver.dataSourceProvider.exsd"/>
<extension-point id="org.jkiss.dbeaver.dataFormatter" name="%extension-point.org.jkiss.dbeaver.dataFormatter.name" schema="schema/org.jkiss.dbeaver.dataFormatter.exsd"/>
<extension-point id="org.jkiss.dbeaver.objectManager" name="%extension-point.org.jkiss.dbeaver.objectManager.name" schema="schema/org.jkiss.dbeaver.objectManager.exsd"/>
<extension-point id="org.jkiss.dbeaver.aggregateFunction" name="%extension-point.org.jkiss.dbeaver.aggregateFunction.name" schema="schema/org.jkiss.dbeaver.aggregateFunction.exsd"/>
<extension-point id="org.jkiss.dbeaver.resourceHandler" name="%extension-point.org.jkiss.dbeaver.resourceHandler.name" schema="schema/org.jkiss.dbeaver.resourceHandler.exsd"/>
......@@ -3524,46 +3523,6 @@
</extension>
<extension point="org.jkiss.dbeaver.dataFormatter">
<formatter id="date" label="%DateFormatter.date.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.DateFormatSample">
<propertyGroup label="%DateFormatter.date.general.label">
<property id="pattern" label="%DateFormatter.date.general.pattern.label" type="string" description="%DateFormatter.date.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="time" label="%DateFormatter.time.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.TimeFormatSample">
<propertyGroup label="%DateFormatter.time.general.label">
<property id="pattern" label="%DateFormatter.time.general.pattern.label" type="string" description="%DateFormatter.time.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="timestamp" label="%DateFormatter.timestamp.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.TimestampFormatSample">
<propertyGroup label="%DateFormatter.timestamp.general.label">
<property id="pattern" label="%DateFormatter.timestamp.general.pattern.label" type="string" description="%DateFormatter.timestamp.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="number" label="%DateFormatter.number.label" class="org.jkiss.dbeaver.model.impl.data.formatters.NumberDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.NumberFormatSample">
<propertyGroup label="%DateFormatter.number.general.label">
<property id="useGrouping" label="%DateFormatter.number.general.grouping.label" type="boolean" description="%DateFormatter.number.general.grouping.description"/>
<property id="maxIntegerDigits" label="%DateFormatter.number.general.maxIntDigits.label" type="integer" description="%DateFormatter.number.general.maxIntDigits.description"/>
<property id="minIntegerDigits" label="%DateFormatter.number.general.minIntDigits.label" type="integer" description="%DateFormatter.number.general.minIntDigits.description"/>
<property id="maxFractionDigits" label="%DateFormatter.number.general.maxFractDigits.label" type="integer" description="%DateFormatter.number.general.maxFractDigits.description"/>
<property id="minFractionDigits" label="%DateFormatter.number.general.minFractDigits.label" type="integer" description="%DateFormatter.number.general.minFractDigits.description"/>
<property id="useTypeScale" label="%DateFormatter.number.general.useTypeScale.label" type="boolean" description="%DateFormatter.number.general.useTypeScale.description"/>
<property id="roundingMode" label="%DateFormatter.number.general.roundingMode.label" type="string" description="%DateFormatter.number.general.roundingMode.description" validValues="UP,DOWN,CEILING,FLOOR,HALF_UP,HALF_DOWN,HALF_EVEN,UNNECESSARY"/>
</propertyGroup>
</formatter>
</extension>
<extension point="org.jkiss.dbeaver.aggregateFunction">
<function id="count" class="org.jkiss.dbeaver.model.data.aggregate.FunctionCount" type="simple" label="Count" description="Value count" default="true"/>
<function id="countDistinct" class="org.jkiss.dbeaver.model.data.aggregate.FunctionCountDistinct" type="simple" label="Count Distinct" description="Value count" default="true"/>
<function id="sum" class="org.jkiss.dbeaver.model.data.aggregate.FunctionSum" type="simple" label="Sum" description="Sum of numbers"/>
<function id="avg" class="org.jkiss.dbeaver.model.data.aggregate.FunctionAvg" type="simple" label="Average" description="Arithmetic mean"/>
<function id="min" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMin" type="simple" label="Minimum" description="Minimum value"/>
<function id="max" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMax" type="simple" label="Maximum" description="Maximum value"/>
<function id="median" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMedian" type="simple" label="Median" description="Median (middle) value"/>
<function id="mode" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMode" type="simple" label="Mode" description="Mode (most frequent) value"/>
</extension>
<extension point="org.jkiss.dbeaver.sqlCommand">
<command id="set" class="org.jkiss.dbeaver.runtime.sql.commands.SQLCommandSet" label="Set" description="Sets variable/parameter value"/>
<command id="echo" class="org.jkiss.dbeaver.runtime.sql.commands.SQLCommandEcho" label="Echo" description="Prints string to Output log"/>
......
......@@ -65,6 +65,7 @@ Export-Package: org.jkiss.dbeaver,
org.jkiss.dbeaver.model.struct,
org.jkiss.dbeaver.model.struct.rdb,
org.jkiss.dbeaver.model.virtual,
org.jkiss.dbeaver.registry.formatter,
org.jkiss.dbeaver.runtime,
org.jkiss.dbeaver.runtime.encode,
org.jkiss.dbeaver.runtime.jobs,
......
......@@ -4,6 +4,41 @@ Bundle-Vendor = JKISS
Bundle-Name = DBeaver Model
extension-point.org.jkiss.dbeaver.application.name = DBeaver applications
extension-point.org.jkiss.dbeaver.pluginService.name = Plugin service
extension-point.org.jkiss.dbeaver.dataFormatter.name = Data value formatters
extension-point.org.jkiss.dbeaver.aggregateFunction.name = Aggregate Functions
DateFormatter.date.label=Date
DateFormatter.date.general.label=General
DateFormatter.date.general.pattern.label=Pattern
DateFormatter.date.general.pattern.description=Date pattern
DateFormatter.time.label=Time
DateFormatter.time.general.label=General
DateFormatter.time.general.pattern.label=Pattern
DateFormatter.time.general.pattern.description=Time pattern
DateFormatter.timestamp.label=Timestamp
DateFormatter.timestamp.general.label=General
DateFormatter.timestamp.general.pattern.label=Pattern
DateFormatter.timestamp.general.pattern.description=Timestamp pattern
DateFormatter.number.label=Numbers
DateFormatter.number.general.label=General
DateFormatter.number.general.grouping.label=Use Grouping
DateFormatter.number.general.grouping.description=Tells grouping is used in this format
DateFormatter.number.general.maxIntDigits.label=Maximum integer digits
DateFormatter.number.general.maxIntDigits.description=Maximum integer digits
DateFormatter.number.general.minIntDigits.label=Minimum integer digits
DateFormatter.number.general.minIntDigits.description=Minimum integer digits
DateFormatter.number.general.maxFractDigits.label=Maximum fraction digits
DateFormatter.number.general.maxFractDigits.description=Maximum fraction digits
DateFormatter.number.general.minFractDigits.label=Minimum fraction digits
DateFormatter.number.general.minFractDigits.description=Minimum fraction digits
DateFormatter.number.general.useTypeScale.label=Use data type scale for fraction digits
DateFormatter.number.general.useTypeScale.description=Use column/attribute data type scale as minimum fraction digits number
DateFormatter.number.general.roundingMode.label=Rounding mode
DateFormatter.number.general.roundingMode.description=Rounding mode
meta.org.jkiss.dbeaver.model.DBPNamedObject.name.name=Name
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name=Table
......
......@@ -2,10 +2,37 @@
Bundle-Name = DBeaver Model
Bundle-Vendor = JKISS
extension-point.org.jkiss.dbeaver.application.name = DBeaver Anwendungen
DateFormatter.date.general.label = Allgemein
DateFormatter.date.general.pattern.description = Datumsmuster
DateFormatter.date.general.pattern.label = Muster
DateFormatter.date.label = Datum
DateFormatter.number.general.grouping.description = Gruppierung wird bei diesem Format verwendet
DateFormatter.number.general.grouping.label = Gruppierung verwenden
DateFormatter.number.general.label = Allgemein
DateFormatter.number.general.maxFractDigits.description = Maximale Anzahl an Nachkommastellen
DateFormatter.number.general.maxFractDigits.label = Maximale Anzahl an Nachkommastellen
DateFormatter.number.general.maxIntDigits.description = Maximale Anzahl an Vorkommastellen
DateFormatter.number.general.maxIntDigits.label = Maximale Anzahl an Vorkommastellen
DateFormatter.number.general.minFractDigits.description = Minimale Anzahl an Nachkommastellen
DateFormatter.number.general.minFractDigits.label = Minimale Anzahl an Nachkommastellen
DateFormatter.number.general.minIntDigits.description = Minimale Anzahl an Vorkommastellen
DateFormatter.number.general.minIntDigits.label = Minimale Anzahl an Vorkommastellen
DateFormatter.number.general.roundingMode.description = Rundungsmodus
DateFormatter.number.general.roundingMode.label = Rundungsmodus
DateFormatter.number.general.useTypeScale.description = Verwendung der Spalten-/Attributdatentyp-Skala als minimale Bruchziffernanzahl
DateFormatter.number.general.useTypeScale.label = Datentypskala f\u00FCr Bruchziffern verwenden
DateFormatter.number.label = Zahlen
DateFormatter.time.general.label = Allgemein
DateFormatter.time.general.pattern.description = Zeitmuster
DateFormatter.time.general.pattern.label = Muster
DateFormatter.time.label = Zeit
DateFormatter.timestamp.general.label = Allgemein
DateFormatter.timestamp.general.pattern.description = Zeitstempelmuster
DateFormatter.timestamp.general.pattern.label = Muster
DateFormatter.timestamp.label = Zeitstempel
meta.org.jkiss.dbeaver.model.DBPNamedObject.name.name = Name
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name = Tabelle
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.uniqueKey.name = Schl\u00FCssel
......
DateFormatter.date.label = Fecha
DateFormatter.date.general.label = General
DateFormatter.date.general.pattern.label = Cadena de Formato
DateFormatter.date.general.pattern.description = Cadena de formato de las fechas
DateFormatter.time.label = Hora
DateFormatter.time.general.label = General
DateFormatter.time.general.pattern.label = Cadena de Formato
DateFormatter.time.general.pattern.description = Cadena de formato de las horas
DateFormatter.timestamp.label = Fecha/Hora
DateFormatter.timestamp.general.label = General
DateFormatter.timestamp.general.pattern.label = Cadena de formato de fecha/hora
DateFormatter.timestamp.general.pattern.description = Cadena de formato de fecha/hora
DateFormatter.number.label = N\u044Ameros
DateFormatter.number.general.label = General
DateFormatter.number.general.grouping.label = Usar agrupaci\u0443n
DateFormatter.number.general.grouping.description = Indica qu\u0439 agrupaci\u0443n se usa en el formato
DateFormatter.number.general.maxIntDigits.label = M\u0431ximas cifras enteras
DateFormatter.number.general.maxIntDigits.description = M\u0431ximas cifras enteras
DateFormatter.number.general.minIntDigits.label = M\u043Dnimas cifras enteras
DateFormatter.number.general.minIntDigits.description = M\u043Dnimas cifras enteras
DateFormatter.number.general.maxFractDigits.label = M\u0431ximas cifras decimales
DateFormatter.number.general.maxFractDigits.description = M\u0431ximas cifras decimales
DateFormatter.number.general.minFractDigits.label = M\u043Dximas cifras decimales
DateFormatter.number.general.minFractDigits.description = M\u043Dximas cifras decimales
DateFormatter.number.general.roundingMode.label = Modo de redondeo
DateFormatter.number.general.roundingMode.description = Modo de redondeo
# Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
extension-point.org.jkiss.dbeaver.application.name = DBeaver applications
extension-point.org.jkiss.dbeaver.pluginService.name = Service d'extensions
extension-point.org.jkiss.dbeaver.dataFormatter.name = Formateurs de donn\u00E9es
extension-point.org.jkiss.dbeaver.aggregateFunction.name = Fonctions d'aggr\u00E9gation
DateFormatter.date.general.label = G\u00E9n\u00E9ral
DateFormatter.date.general.pattern.description = Mod\u00E8le de date
DateFormatter.date.general.pattern.label = Mod\u00E8le
DateFormatter.date.label = Date
DateFormatter.number.general.grouping.description = Indique un regroupement dans ce format
DateFormatter.number.general.grouping.label = Regrouper
DateFormatter.number.general.label = G\u00E9n\u00E9ral
DateFormatter.number.general.maxFractDigits.description = Nombre maximal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.maxFractDigits.label = Nombre maximal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.maxIntDigits.description = Nombre maximal de chiffres entiers
DateFormatter.number.general.maxIntDigits.label = Nombre maximal de chiffres entiers
DateFormatter.number.general.minFractDigits.description = Nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.minFractDigits.label = Nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.minIntDigits.description = Nombre minimal de chiffres entiers
DateFormatter.number.general.minIntDigits.label = Nombre minimal de chiffres entiers
DateFormatter.number.general.useTypeScale.label = Utiliser l'\u00E9chelle du type de donne\u00E9s pour les chiffres \u00E0 virgules
DateFormatter.number.general.useTypeScale.description = Utiliser la colonne/attribut d'\u00E9chelle du type de donne\u00E9s comme nombre minimal de chiffres apr\u00E8s la virgule
DateFormatter.number.general.roundingMode.description = R\u00E8gle d'arrondissement
DateFormatter.number.general.roundingMode.label = R\u00E8gle d'arrondissement
DateFormatter.number.label = Nombre
DateFormatter.time.general.label = G\u00E9n\u00E9ral
DateFormatter.time.general.pattern.description = Mod\u00E8le de date/heure
DateFormatter.time.general.pattern.label = Mod\u00E8le
DateFormatter.time.label = Date/heure
DateFormatter.timestamp.general.label = G\u00E9n\u00E9ral
DateFormatter.timestamp.general.pattern.description = Mod\u00E8le d'horodatage
DateFormatter.timestamp.general.pattern.label = Mod\u00E8le
DateFormatter.timestamp.label = Horodatage
meta.org.jkiss.dbeaver.model.DBPNamedObject.name.name=Nom
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name=Table
......
DateFormatter.date.label = Data
DateFormatter.date.general.label = Generale
DateFormatter.date.general.pattern.label = Formato
DateFormatter.date.general.pattern.description = Formato Data
DateFormatter.time.label = Ora
DateFormatter.time.general.label = Generale
DateFormatter.time.general.pattern.label = Formato
DateFormatter.time.general.pattern.description = Formato Ora
DateFormatter.timestamp.label = Data/Oa
DateFormatter.timestamp.general.label = Generale
DateFormatter.timestamp.general.pattern.label = Formato
DateFormatter.timestamp.general.pattern.description = Formato Data/Ora
DateFormatter.number.label = Numeri
DateFormatter.number.general.label = Generale
DateFormatter.number.general.grouping.label = Usa il Raggruppamento
DateFormatter.number.general.grouping.description = Segnala quale raggruppamento \u00E8 usato in questo formato
DateFormatter.number.general.maxIntDigits.label = Massimo intero per le cifre
DateFormatter.number.general.maxIntDigits.description = Massimo intero per le cifre
DateFormatter.number.general.minIntDigits.label = Minimo intero per le cifre
DateFormatter.number.general.minIntDigits.description = Minimo intero per le cifre
DateFormatter.number.general.maxFractDigits.label = Massima frazione per le cifre
DateFormatter.number.general.maxFractDigits.description = Massima frazione per le cifre
DateFormatter.number.general.minFractDigits.label = Minima frazione per le cifre
DateFormatter.number.general.minFractDigits.description = Minima frazione per le cifre
DateFormatter.number.general.roundingMode.label = Modalit\u00E0 di arrotondamento
DateFormatter.number.general.roundingMode.description = Modalit\u00E0 di arrotondamento
# Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
extension-point.org.jkiss.dbeaver.application.name =DBeaver\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3
extension-point.org.jkiss.dbeaver.pluginService.name =\u30D7\u30E9\u30B0\u30A4\u30F3\u30B5\u30FC\u30D3\u30B9
extension-point.org.jkiss.dbeaver.dataFormatter.name =\u30C7\u30FC\u30BF\u30D5\u30A9\u30FC\u30DE\u30C3\u30BF
extension-point.org.jkiss.dbeaver.aggregateFunction.name =\u96C6\u8A08\u95A2\u6570
DateFormatter.date.label=\u65E5\u4ED8
DateFormatter.date.general.label=\u4E00\u822C
DateFormatter.date.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.date.general.pattern.description=\u65E5\u4ED8\u30D1\u30BF\u30FC\u30F3
DateFormatter.time.label=\u6642\u9593
DateFormatter.time.general.label=\u4E00\u822C
DateFormatter.time.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.time.general.pattern.description=\u6642\u9593\u30D1\u30BF\u30FC\u30F3
DateFormatter.timestamp.label=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7
DateFormatter.timestamp.general.label=\u4E00\u822C
DateFormatter.timestamp.general.pattern.label=\u30D1\u30BF\u30FC\u30F3
DateFormatter.timestamp.general.pattern.description=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u30D1\u30BF\u30FC\u30F3
DateFormatter.number.label=\u6570\u5B57
DateFormatter.number.general.label=\u4E00\u822C
DateFormatter.number.general.grouping.label=\u30B0\u30EB\u30FC\u30D7\u5316\u306E\u4F7F\u7528
DateFormatter.number.general.grouping.description=\u30B0\u30EB\u30FC\u30D7\u5316\u304C\u3053\u306E\u5F62\u5F0F\u3067\u4F7F\u7528\u3055\u308C\u308B\u3053\u3068\u3092\u4F1D\u3048\u308B
DateFormatter.number.general.maxIntDigits.label=\u6700\u5927\u6574\u6570\u6841
DateFormatter.number.general.maxIntDigits.description=\u6700\u5927\u6574\u6570\u6841
DateFormatter.number.general.minIntDigits.label=\u6700\u5C0F\u6574\u6570\u6841
DateFormatter.number.general.minIntDigits.description=\u6700\u5C0F\u6574\u6570\u6841
DateFormatter.number.general.maxFractDigits.label=\u6700\u5927\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.maxFractDigits.description=\u6700\u5927\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.minFractDigits.label=\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.minFractDigits.description=\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570
DateFormatter.number.general.useTypeScale.label=\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u306B\u306F\u30C7\u30FC\u30BF\u578B\u5C3A\u5EA6\u3092\u4F7F\u7528\u3059\u308B
DateFormatter.number.general.useTypeScale.description=\u5217/\u5C5E\u6027\u306E\u30C7\u30FC\u30BF\u578B\u306E\u30B9\u30B1\u30FC\u30EB\u3092\u6700\u5C0F\u5C0F\u6570\u70B9\u4EE5\u4E0B\u306E\u6841\u6570\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B
DateFormatter.number.general.roundingMode.label=\u4E38\u3081\u30E2\u30FC\u30C9
DateFormatter.number.general.roundingMode.description=\u4E38\u3081\u30E2\u30FC\u30C9
meta.org.jkiss.dbeaver.model.DBPNamedObject.name.name=\u540D\u524D
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name=\u8868
......
# Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
Bundle-Vendor = JKISS
Bundle-Name = DBeaver Model
DateFormatter.date.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.date.general.pattern.description = \u0428\u0430\u0431\u043B\u043E\u043D \u0434\u0430\u0442\u044B
DateFormatter.date.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.date.label = \u0414\u0430\u0442\u0430
DateFormatter.number.general.grouping.description = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0443 \u0432 \u044D\u0442\u043E\u043C \u0444\u043E\u0440\u043C\u0430\u0442\u0435
DateFormatter.number.general.grouping.label = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0443
DateFormatter.number.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.number.general.maxFractDigits.description = Maximum fraction digits
DateFormatter.number.general.maxFractDigits.label = Maximum fraction digits
DateFormatter.number.general.maxIntDigits.description = Maximum integer digits
DateFormatter.number.general.maxIntDigits.label = \u041C\u0430\u043A\u0441. \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0446\u0438\u0444\u0440 \u0432 \u0447\u0438\u0441\u043B\u0435
DateFormatter.number.general.minFractDigits.description = Minimum fraction digits
DateFormatter.number.general.minFractDigits.label = Minimum fraction digits
DateFormatter.number.general.minIntDigits.description = Minimum integer digits
DateFormatter.number.general.minIntDigits.label = Minimum integer digits
DateFormatter.number.general.roundingMode.description = \u0420\u0435\u0436\u0438\u043C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F
DateFormatter.number.general.roundingMode.label = \u0420\u0435\u0436\u0438\u043C \u043E\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u0438\u044F
DateFormatter.number.label = \u0427\u0438\u0441\u043B\u0430
DateFormatter.time.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.time.general.pattern.description = \u0428\u0430\u0431\u043B\u043E\u043D \u0432\u0440\u0435\u043C\u0435\u043D\u0438
DateFormatter.time.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.time.label = \u0412\u0440\u0435\u043C\u044F
DateFormatter.timestamp.general.label = \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
DateFormatter.timestamp.general.pattern.description = Timestamp pattern
DateFormatter.timestamp.general.pattern.label = \u0428\u0430\u0431\u043B\u043E\u043D
DateFormatter.timestamp.label = Timestamp
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name=\u0422\u0430\u0431\u043B\u0438\u0446\u0430
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.uniqueKey.name=\u041A\u043B\u044E\u0447
......
# Copyright (C) 2017 Liu, Yuanyuan (liuyuanyuan@highgo.com)
extension-point.org.jkiss.dbeaver.application.name = DBeaver \u5E94\u7528\u7A0B\u5E8F
extension-point.org.jkiss.dbeaver.pluginService.name = \u63D2\u4EF6\u670D\u52A1
extension-point.org.jkiss.dbeaver.aggregateFunction.name = \u805A\u96C6\u51FD\u6570
extension-point.org.jkiss.dbeaver.dataFormatter.name = \u6570\u636E\u683C\u5F0F\u5668
DateFormatter.date.general.label = \u5E38\u89C4
DateFormatter.date.general.pattern.description = \u65E5\u671F\u6A21\u5F0F
DateFormatter.date.general.pattern.label = \u6A21\u5F0F
DateFormatter.date.label = \u65E5\u671F
DateFormatter.number.general.grouping.description = \u5728\u8BE5\u683C\u5F0F\u4E2D\u4F7F\u7528\u5206\u7EC4
DateFormatter.number.general.grouping.label = \u5206\u7EC4
DateFormatter.number.general.label = \u5E38\u89C4
DateFormatter.number.general.maxFractDigits.description = \u6700\u591A\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.maxFractDigits.label = \u6700\u591A\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.maxIntDigits.description = \u6700\u5927\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.maxIntDigits.label = \u6700\u5927\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.minFractDigits.description = \u6700\u5C11\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.minFractDigits.label = \u6700\u5C11\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.minIntDigits.description = \u6700\u5C0F\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.minIntDigits.label = \u6700\u5C0F\u6574\u6570\u4F4D\u6570
DateFormatter.number.general.roundingMode.description = \u53D6\u6574\u6A21\u5F0F
DateFormatter.number.general.roundingMode.label = \u53D6\u6574\u6A21\u5F0F
DateFormatter.number.general.useTypeScale.description = \u4F7F\u7528\u5217\u6216\u5C5E\u6027\u6570\u636E\u7C7B\u578B\u7684\u5C0F\u6570\u4F4D\u6570\u4F5C\u4E3A\u6700\u5C0F\u7684\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.general.useTypeScale.label = \u4F7F\u7528\u6570\u636E\u7C7B\u578B\u7684\u5C0F\u6570\u4F4D\u6570
DateFormatter.number.label = \u6570\u5B57
DateFormatter.time.general.label = \u5E38\u89C4
DateFormatter.time.general.pattern.description = \u65F6\u95F4\u6A21\u5F0F
DateFormatter.time.general.pattern.label = \u6A21\u5F0F
DateFormatter.time.label = \u65F6\u95F4
DateFormatter.timestamp.general.label = \u5E38\u89C4
DateFormatter.timestamp.general.pattern.description = \u65F6\u95F4\u6233\u6A21\u5F0F
DateFormatter.timestamp.general.pattern.label = \u6A21\u5F0F
DateFormatter.timestamp.label = \u65F6\u95F4\u6233
meta.org.jkiss.dbeaver.model.DBPNamedObject.name.name = \u540D\u79F0
meta.org.jkiss.dbeaver.model.data.DBDValueLocator.entity.name = \u8868
......
......@@ -21,6 +21,36 @@
<extension-point id="org.jkiss.dbeaver.service" name="%extension-point.org.jkiss.dbeaver.service.name" schema="schema/org.jkiss.dbeaver.service.exsd"/>
<extension-point id="org.jkiss.dbeaver.application" name="%extension-point.org.jkiss.dbeaver.application.name" schema="schema/org.jkiss.dbeaver.application.exsd"/>
<extension-point id="org.jkiss.dbeaver.dataFormatter" name="%extension-point.org.jkiss.dbeaver.dataFormatter.name" schema="schema/org.jkiss.dbeaver.dataFormatter.exsd"/>
<extension point="org.jkiss.dbeaver.dataFormatter">
<formatter id="date" label="%DateFormatter.date.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.DateFormatSample">
<propertyGroup label="%DateFormatter.date.general.label">
<property id="pattern" label="%DateFormatter.date.general.pattern.label" type="string" description="%DateFormatter.date.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="time" label="%DateFormatter.time.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.TimeFormatSample">
<propertyGroup label="%DateFormatter.time.general.label">
<property id="pattern" label="%DateFormatter.time.general.pattern.label" type="string" description="%DateFormatter.time.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="timestamp" label="%DateFormatter.timestamp.label" class="org.jkiss.dbeaver.model.impl.data.formatters.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.TimestampFormatSample">
<propertyGroup label="%DateFormatter.timestamp.general.label">
<property id="pattern" label="%DateFormatter.timestamp.general.pattern.label" type="string" description="%DateFormatter.timestamp.general.pattern.description" required="true"/>
</propertyGroup>
</formatter>
<formatter id="number" label="%DateFormatter.number.label" class="org.jkiss.dbeaver.model.impl.data.formatters.NumberDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.formatters.NumberFormatSample">
<propertyGroup label="%DateFormatter.number.general.label">
<property id="useGrouping" label="%DateFormatter.number.general.grouping.label" type="boolean" description="%DateFormatter.number.general.grouping.description"/>
<property id="maxIntegerDigits" label="%DateFormatter.number.general.maxIntDigits.label" type="integer" description="%DateFormatter.number.general.maxIntDigits.description"/>
<property id="minIntegerDigits" label="%DateFormatter.number.general.minIntDigits.label" type="integer" description="%DateFormatter.number.general.minIntDigits.description"/>
<property id="maxFractionDigits" label="%DateFormatter.number.general.maxFractDigits.label" type="integer" description="%DateFormatter.number.general.maxFractDigits.description"/>
<property id="minFractionDigits" label="%DateFormatter.number.general.minFractDigits.label" type="integer" description="%DateFormatter.number.general.minFractDigits.description"/>
<property id="useTypeScale" label="%DateFormatter.number.general.useTypeScale.label" type="boolean" description="%DateFormatter.number.general.useTypeScale.description"/>
<property id="roundingMode" label="%DateFormatter.number.general.roundingMode.label" type="string" description="%DateFormatter.number.general.roundingMode.description" validValues="UP,DOWN,CEILING,FLOOR,HALF_UP,HALF_DOWN,HALF_EVEN,UNNECESSARY"/>
</propertyGroup>
</formatter>
</extension>
</plugin>
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.jkiss.dbeaver.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
<meta.schema plugin="org.jkiss.dbeaver.core" id="org.jkiss.dbeaver.dataFormatter" name="Data Formatters"/>
</appInfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appInfo>
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="formatter" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="formatter">
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="identifier"/>
</appInfo>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn=":org.jkiss.dbeaver.model.data.DBDDataFormatter"/>
</appInfo>
</annotation>
</attribute>
<attribute name="sampleClass" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn=":org.jkiss.dbeaver.model.data.DBDDataFormatterSample"/>
</appInfo>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="description" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="property">
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="description" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="type" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="required" type="boolean">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="defaultValue" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="validValues" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="propertyGroup">
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="property"/>
</sequence>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiinfo"/>
</appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.jkiss.dbeaver.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
<meta.schema plugin="org.jkiss.dbeaver.core" id="org.jkiss.dbeaver.dataFormatter" name="Data Formatters"/>
</appInfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appInfo>
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="formatter" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="formatter">
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="identifier"/>
</appInfo>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn=":org.jkiss.dbeaver.model.data.DBDDataFormatter"/>
</appInfo>
</annotation>
</attribute>
<attribute name="sampleClass" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn=":org.jkiss.dbeaver.model.data.DBDDataFormatterSample"/>
</appInfo>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="description" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="property">
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="description" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
<attribute name="type" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="required" type="boolean">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="defaultValue" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="validValues" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="propertyGroup">
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="property"/>
</sequence>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiinfo"/>
</appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.eclipse.core.runtime.IConfigurationElement;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
import org.jkiss.dbeaver.model.impl.AbstractDescriptor;
import org.jkiss.dbeaver.model.impl.PropertyDescriptor;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import org.jkiss.dbeaver.registry.RegistryConstants;
import java.util.ArrayList;
import java.util.List;
/**
* DataFormatterDescriptor
*/
public class DataFormatterDescriptor extends AbstractDescriptor
{
private static final Log log = Log.getLog(DataFormatterDescriptor.class);
public static final String EXTENSION_ID = "org.jkiss.dbeaver.dataFormatter"; //$NON-NLS-1$
private String id;
private String name;
private String description;
private List<DBPPropertyDescriptor> properties = new ArrayList<>();
private DBDDataFormatterSample sample;
private ObjectType formatterType;
public DataFormatterDescriptor(IConfigurationElement config)
{
super(config);
this.id = config.getAttribute(RegistryConstants.ATTR_ID);
this.formatterType = new ObjectType(config.getAttribute(RegistryConstants.ATTR_CLASS));
this.name = config.getAttribute(RegistryConstants.ATTR_LABEL);
this.description = config.getAttribute(RegistryConstants.ATTR_DESCRIPTION);
IConfigurationElement[] propElements = config.getChildren(PropertyDescriptor.TAG_PROPERTY_GROUP);
for (IConfigurationElement prop : propElements) {
properties.addAll(PropertyDescriptor.extractProperties(prop));
}
Class<?> objectClass = getObjectClass(config.getAttribute(RegistryConstants.ATTR_SAMPLE_CLASS));
try {
sample = (DBDDataFormatterSample)objectClass.newInstance();
} catch (Exception e) {
log.error("Can't instantiate data formatter '" + getId() + "' sample");
}
}
public String getId()
{
return id;
}
public String getName()
{
return name;
}
public String getDescription()
{
return description;
}
public DBDDataFormatterSample getSample()
{
return sample;
}
public List<DBPPropertyDescriptor> getProperties() {
return properties;
}
public DBDDataFormatter createFormatter() throws IllegalAccessException, InstantiationException
{
Class<? extends DBDDataFormatter> clazz = formatterType.getObjectClass(DBDDataFormatter.class);
if (clazz == null) {
return null;
}
return clazz.newInstance();
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.eclipse.core.runtime.IConfigurationElement;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
import org.jkiss.dbeaver.model.impl.AbstractDescriptor;
import org.jkiss.dbeaver.model.impl.PropertyDescriptor;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import java.util.ArrayList;
import java.util.List;
/**
* DataFormatterDescriptor
*/
public class DataFormatterDescriptor extends AbstractDescriptor
{
private static final Log log = Log.getLog(DataFormatterDescriptor.class);
public static final String EXTENSION_ID = "org.jkiss.dbeaver.dataFormatter"; //$NON-NLS-1$
private String id;
private String name;
private String description;
private List<DBPPropertyDescriptor> properties = new ArrayList<>();
private DBDDataFormatterSample sample;
private ObjectType formatterType;
public DataFormatterDescriptor(IConfigurationElement config)
{
super(config);
this.id = config.getAttribute("id");
this.formatterType = new ObjectType(config.getAttribute("class"));
this.name = config.getAttribute("label");
this.description = config.getAttribute("description");
IConfigurationElement[] propElements = config.getChildren(PropertyDescriptor.TAG_PROPERTY_GROUP);
for (IConfigurationElement prop : propElements) {
properties.addAll(PropertyDescriptor.extractProperties(prop));
}
Class<?> objectClass = getObjectClass(config.getAttribute("sampleClass"));
try {
sample = (DBDDataFormatterSample)objectClass.newInstance();
} catch (Exception e) {
log.error("Can't instantiate data formatter '" + getId() + "' sample");
}
}
public String getId()
{
return id;
}
public String getName()
{
return name;
}
public String getDescription()
{
return description;
}
public DBDDataFormatterSample getSample()
{
return sample;
}
public List<DBPPropertyDescriptor> getProperties() {
return properties;
}
public DBDDataFormatter createFormatter() throws IllegalAccessException, InstantiationException
{
Class<? extends DBDDataFormatter> clazz = formatterType.getObjectClass(DBDDataFormatter.class);
if (clazz == null) {
return null;
}
return clazz.newInstance();
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatterProfile;
import org.jkiss.dbeaver.model.impl.preferences.SimplePreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceListener;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
import org.jkiss.dbeaver.utils.PrefUtils;
import org.jkiss.utils.CommonUtils;
import java.io.IOException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* DataFormatterProfile
*/
public class DataFormatterProfile implements DBDDataFormatterProfile, DBPPreferenceListener {
private static final String PROP_LANGUAGE = "dataformat.profile.language"; //$NON-NLS-1$
private static final String PROP_COUNTRY = "dataformat.profile.country"; //$NON-NLS-1$
private static final String PROP_VARIANT = "dataformat.profile.variant"; //$NON-NLS-1$
public static final String DATAFORMAT_PREFIX = "dataformat."; //$NON-NLS-1$
public static final String DATAFORMAT_TYPE_PREFIX = DATAFORMAT_PREFIX + "type."; //$NON-NLS-1$
private DBPPreferenceStore store;
private String name;
private Locale locale;
public DataFormatterProfile(String profileName, DBPPreferenceStore store)
{
this.name = profileName;
this.store = store;
loadProfile();
}
private void loadProfile()
{
{
String language = store.getString(PROP_LANGUAGE);
String country = store.getString(PROP_COUNTRY);
String variant = store.getString(PROP_VARIANT);
if (CommonUtils.isEmpty(language)) {
this.locale = Locale.getDefault();
} else if (CommonUtils.isEmpty(country)) {
this.locale = new Locale(language);
} else if (CommonUtils.isEmpty(variant)) {
this.locale = new Locale(language, country);
} else {
this.locale = new Locale(language, country, variant);
}
}
}
@Override
public void saveProfile() throws IOException
{
store.setValue(PROP_LANGUAGE, locale.getLanguage());
store.setValue(PROP_COUNTRY, locale.getCountry());
store.setValue(PROP_VARIANT, locale.getVariant());
PrefUtils.savePreferenceStore(store);
}
@Override
public DBPPreferenceStore getPreferenceStore()
{
return store;
}
@Override
public String getProfileName()
{
return name;
}
@Override
public void setProfileName(String name)
{
this.name = name;
}
@Override
public Locale getLocale()
{
return locale;
}
@Override
public void setLocale(Locale locale)
{
this.locale = locale;
}
@Override
public Map<Object, Object> getFormatterProperties(String typeId)
{
DataFormatterDescriptor formatter = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
Map<Object, Object> defaultProperties = formatter.getSample().getDefaultProperties(locale);
Map<Object, Object> formatterProps = new HashMap<>();
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object defaultValue = defaultProperties.get(prop.getId());
Object propValue = PrefUtils.getPreferenceValue(
store,
DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), prop.getDataType());
if (propValue != null && !CommonUtils.equalObjects(defaultValue, propValue)) {
formatterProps.put(prop.getId(), propValue);
}
}
return formatterProps;
}
@Override
public void setFormatterProperties(String typeId, Map<Object, Object> formatterProps)
{
DataFormatterDescriptor formatter = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object propValue = formatterProps == null ? null : formatterProps.get(prop.getId());
if (propValue != null) {
PrefUtils.setPreferenceValue(store, DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), propValue);
} else {
store.setToDefault(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId());
}
}
}
@Override
public boolean isOverridesParent()
{
if (store instanceof SimplePreferenceStore) {
SimplePreferenceStore prefStore = (SimplePreferenceStore) store;
if (prefStore.isSet(PROP_LANGUAGE) || prefStore.isSet(PROP_COUNTRY) || prefStore.isSet(PROP_VARIANT)) {
return true;
}
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
if (prefStore.isSet(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId())) {
return true;
}
}
}
return false;
}
return true;
}
@Override
public void reset()
{
if (store instanceof SimplePreferenceStore) {
// Set all formatter properties to default
store.setToDefault(PROP_LANGUAGE);
store.setToDefault(PROP_COUNTRY);
store.setToDefault(PROP_VARIANT);
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
store.setToDefault(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId());
}
}
}
loadProfile();
}
@Override
public DBDDataFormatter createFormatter(String typeId, DBSTypedObject type)
throws IllegalAccessException, InstantiationException, IllegalArgumentException
{
DataFormatterDescriptor descriptor = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
if (descriptor == null) {
throw new IllegalArgumentException("Formatter '" + typeId + "' not found");
}
DBDDataFormatter formatter = descriptor.createFormatter();
Map<Object, Object> defProps = descriptor.getSample().getDefaultProperties(locale);
Map<Object, Object> props = getFormatterProperties(typeId);
Map<Object, Object> formatterProps = new HashMap<>();
if (defProps != null && !defProps.isEmpty()) {
formatterProps.putAll(defProps);
}
if (props != null && !props.isEmpty()) {
formatterProps.putAll(props);
}
formatter.init(type, locale, formatterProps);
return formatter;
}
public static void initDefaultPreferences(DBPPreferenceStore store, Locale locale)
{
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
Map<Object, Object> defaultProperties = formatter.getSample().getDefaultProperties(locale);
Map<Object, Object> formatterProps = new HashMap<>();
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object defaultValue = defaultProperties.get(prop.getId());
if (defaultValue != null) {
PrefUtils.setPreferenceDefaultValue(store, DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), defaultValue);
}
}
}
}
@Override
public void preferenceChange(PreferenceChangeEvent event) {
if (event.getProperty() != null && event.getProperty().startsWith(DATAFORMAT_PREFIX)) {
// Reload this profile
loadProfile();
}
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
import org.jkiss.dbeaver.model.data.DBDDataFormatterProfile;
import org.jkiss.dbeaver.model.impl.preferences.SimplePreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceListener;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
import org.jkiss.dbeaver.utils.PrefUtils;
import org.jkiss.utils.CommonUtils;
import java.io.IOException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* DataFormatterProfile
*/
public class DataFormatterProfile implements DBDDataFormatterProfile, DBPPreferenceListener {
private static final String PROP_LANGUAGE = "dataformat.profile.language"; //$NON-NLS-1$
private static final String PROP_COUNTRY = "dataformat.profile.country"; //$NON-NLS-1$
private static final String PROP_VARIANT = "dataformat.profile.variant"; //$NON-NLS-1$
public static final String DATAFORMAT_PREFIX = "dataformat."; //$NON-NLS-1$
public static final String DATAFORMAT_TYPE_PREFIX = DATAFORMAT_PREFIX + "type."; //$NON-NLS-1$
private DBPPreferenceStore store;
private String name;
private Locale locale;
public DataFormatterProfile(String profileName, DBPPreferenceStore store)
{
this.name = profileName;
this.store = store;
loadProfile();
}
private void loadProfile()
{
{
String language = store.getString(PROP_LANGUAGE);
String country = store.getString(PROP_COUNTRY);
String variant = store.getString(PROP_VARIANT);
if (CommonUtils.isEmpty(language)) {
this.locale = Locale.getDefault();
} else if (CommonUtils.isEmpty(country)) {
this.locale = new Locale(language);
} else if (CommonUtils.isEmpty(variant)) {
this.locale = new Locale(language, country);
} else {
this.locale = new Locale(language, country, variant);
}
}
}
@Override
public void saveProfile() throws IOException
{
store.setValue(PROP_LANGUAGE, locale.getLanguage());
store.setValue(PROP_COUNTRY, locale.getCountry());
store.setValue(PROP_VARIANT, locale.getVariant());
PrefUtils.savePreferenceStore(store);
}
@Override
public DBPPreferenceStore getPreferenceStore()
{
return store;
}
@Override
public String getProfileName()
{
return name;
}
@Override
public void setProfileName(String name)
{
this.name = name;
}
@Override
public Locale getLocale()
{
return locale;
}
@Override
public void setLocale(Locale locale)
{
this.locale = locale;
}
@Override
public Map<Object, Object> getFormatterProperties(String typeId)
{
DataFormatterDescriptor formatter = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
Map<Object, Object> defaultProperties = formatter.getSample().getDefaultProperties(locale);
Map<Object, Object> formatterProps = new HashMap<>();
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object defaultValue = defaultProperties.get(prop.getId());
Object propValue = PrefUtils.getPreferenceValue(
store,
DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), prop.getDataType());
if (propValue != null && !CommonUtils.equalObjects(defaultValue, propValue)) {
formatterProps.put(prop.getId(), propValue);
}
}
return formatterProps;
}
@Override
public void setFormatterProperties(String typeId, Map<Object, Object> formatterProps)
{
DataFormatterDescriptor formatter = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object propValue = formatterProps == null ? null : formatterProps.get(prop.getId());
if (propValue != null) {
PrefUtils.setPreferenceValue(store, DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), propValue);
} else {
store.setToDefault(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId());
}
}
}
@Override
public boolean isOverridesParent()
{
if (store instanceof SimplePreferenceStore) {
SimplePreferenceStore prefStore = (SimplePreferenceStore) store;
if (prefStore.isSet(PROP_LANGUAGE) || prefStore.isSet(PROP_COUNTRY) || prefStore.isSet(PROP_VARIANT)) {
return true;
}
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
if (prefStore.isSet(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId())) {
return true;
}
}
}
return false;
}
return true;
}
@Override
public void reset()
{
if (store instanceof SimplePreferenceStore) {
// Set all formatter properties to default
store.setToDefault(PROP_LANGUAGE);
store.setToDefault(PROP_COUNTRY);
store.setToDefault(PROP_VARIANT);
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
store.setToDefault(DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId());
}
}
}
loadProfile();
}
@Override
public DBDDataFormatter createFormatter(String typeId, DBSTypedObject type)
throws IllegalAccessException, InstantiationException, IllegalArgumentException
{
DataFormatterDescriptor descriptor = DataFormatterRegistry.getInstance().getDataFormatter(typeId);
if (descriptor == null) {
throw new IllegalArgumentException("Formatter '" + typeId + "' not found");
}
DBDDataFormatter formatter = descriptor.createFormatter();
Map<Object, Object> defProps = descriptor.getSample().getDefaultProperties(locale);
Map<Object, Object> props = getFormatterProperties(typeId);
Map<Object, Object> formatterProps = new HashMap<>();
if (defProps != null && !defProps.isEmpty()) {
formatterProps.putAll(defProps);
}
if (props != null && !props.isEmpty()) {
formatterProps.putAll(props);
}
formatter.init(type, locale, formatterProps);
return formatter;
}
public static void initDefaultPreferences(DBPPreferenceStore store, Locale locale)
{
for (DataFormatterDescriptor formatter : DataFormatterRegistry.getInstance().getDataFormatters()) {
Map<Object, Object> defaultProperties = formatter.getSample().getDefaultProperties(locale);
Map<Object, Object> formatterProps = new HashMap<>();
for (DBPPropertyDescriptor prop : formatter.getProperties()) {
Object defaultValue = defaultProperties.get(prop.getId());
if (defaultValue != null) {
PrefUtils.setPreferenceDefaultValue(store, DATAFORMAT_TYPE_PREFIX + formatter.getId() + "." + prop.getId(), defaultValue);
}
}
}
}
@Override
public void preferenceChange(PreferenceChangeEvent event) {
if (event.getProperty() != null && event.getProperty().startsWith(DATAFORMAT_PREFIX)) {
// Reload this profile
loadProfile();
}
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.core.DBeaverActivator;
import org.jkiss.dbeaver.model.app.DBPDataFormatterRegistry;
import org.jkiss.dbeaver.model.data.DBDDataFormatterProfile;
import org.jkiss.dbeaver.model.impl.preferences.SimplePreferenceStore;
import org.jkiss.dbeaver.registry.RegistryConstants;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.xml.SAXListener;
import org.jkiss.utils.xml.SAXReader;
import org.jkiss.utils.xml.XMLBuilder;
import org.jkiss.utils.xml.XMLException;
import org.xml.sax.Attributes;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DataFormatterRegistry implements DBPDataFormatterRegistry
{
private static final Log log = Log.getLog(DataFormatterRegistry.class);
public static final String CONFIG_FILE_NAME = "dataformat-profiles.xml"; //$NON-NLS-1$
private static DataFormatterRegistry instance = null;
public synchronized static DataFormatterRegistry getInstance()
{
if (instance == null) {
instance = new DataFormatterRegistry(Platform.getExtensionRegistry());
}
return instance;
}
private final List<DataFormatterDescriptor> dataFormatterList = new ArrayList<>();
private final Map<String, DataFormatterDescriptor> dataFormatterMap = new HashMap<>();
private DBDDataFormatterProfile globalProfile;
private List<DBDDataFormatterProfile> customProfiles = null;
private DataFormatterRegistry(IExtensionRegistry registry)
{
// Load data formatters from external plugins
{
IConfigurationElement[] extElements = registry.getConfigurationElementsFor(DataFormatterDescriptor.EXTENSION_ID);
for (IConfigurationElement ext : extElements) {
DataFormatterDescriptor formatterDescriptor = new DataFormatterDescriptor(ext);
dataFormatterList.add(formatterDescriptor);
dataFormatterMap.put(formatterDescriptor.getId(), formatterDescriptor);
}
}
}
public void dispose()
{
this.dataFormatterList.clear();
this.dataFormatterMap.clear();
this.globalProfile = null;
}
////////////////////////////////////////////////////
// Data formatters
public List<DataFormatterDescriptor> getDataFormatters()
{
return dataFormatterList;
}
public DataFormatterDescriptor getDataFormatter(String typeId)
{
return dataFormatterMap.get(typeId);
}
@Override
public synchronized DBDDataFormatterProfile getGlobalProfile()
{
if (globalProfile == null) {
globalProfile = new DataFormatterProfile(
"Global",
DBWorkbench.getPlatform().getPreferenceStore());
}
return globalProfile;
}
@Override
@Nullable
public DBDDataFormatterProfile getCustomProfile(String name)
{
for (DBDDataFormatterProfile profile : getCustomProfiles()) {
if (profile.getProfileName().equals(name)) {
return profile;
}
}
return null;
}
@Override
public synchronized List<DBDDataFormatterProfile> getCustomProfiles()
{
if (customProfiles == null) {
loadProfiles();
}
return customProfiles;
}
private void loadProfiles()
{
customProfiles = new ArrayList<>();
File storeFile = DBeaverActivator.getConfigurationFile(CONFIG_FILE_NAME);
if (!storeFile.exists()) {
return;
}
try {
try (InputStream is = new FileInputStream(storeFile)) {
SAXReader parser = new SAXReader(is);
try {
parser.parse(new FormattersParser());
} catch (XMLException ex) {
throw new DBException("Datasource config parse error", ex);
}
} catch (DBException ex) {
log.warn("Can't load profiles config from " + storeFile.getPath(), ex);
}
}
catch (IOException ex) {
log.warn("IO error", ex);
}
}
private void saveProfiles()
{
if (customProfiles == null) {
return;
}
File storeFile = DBeaverActivator.getConfigurationFile(CONFIG_FILE_NAME);
try (OutputStream os = new FileOutputStream(storeFile)) {
XMLBuilder xml = new XMLBuilder(os, GeneralUtils.UTF8_ENCODING);
xml.setButify(true);
xml.startElement(RegistryConstants.TAG_PROFILES);
for (DBDDataFormatterProfile profile : customProfiles) {
xml.startElement(RegistryConstants.TAG_PROFILE);
xml.addAttribute(RegistryConstants.ATTR_NAME, profile.getProfileName());
SimplePreferenceStore store = (SimplePreferenceStore) profile.getPreferenceStore();
Map<String, String> props = store.getProperties();
if (props != null) {
for (Map.Entry<String,String> entry : props.entrySet()) {
xml.startElement(RegistryConstants.TAG_PROPERTY);
xml.addAttribute(RegistryConstants.ATTR_NAME, entry.getKey());
xml.addAttribute(RegistryConstants.ATTR_VALUE, entry.getValue());
xml.endElement();
}
}
xml.endElement();
}
xml.endElement();
xml.flush();
}
catch (IOException ex) {
log.warn("IO error", ex);
}
}
public DBDDataFormatterProfile createCustomProfile(String profileName)
{
getCustomProfiles();
DBDDataFormatterProfile profile = new DataFormatterProfile(profileName, new CustomProfileStore());
customProfiles.add(profile);
saveProfiles();
return profile;
}
public void deleteCustomProfile(DBDDataFormatterProfile profile)
{
getCustomProfiles();
if (customProfiles.remove(profile)) {
saveProfiles();
}
}
private class CustomProfileStore extends SimplePreferenceStore {
private CustomProfileStore()
{
super(DBWorkbench.getPlatform().getPreferenceStore());
}
@Override
public void save() throws IOException
{
saveProfiles();
}
}
private class FormattersParser extends SAXListener.BaseListener
{
private String profileName;
private SimplePreferenceStore curStore;
@Override
public void saxStartElement(SAXReader reader, String namespaceURI, String localName, Attributes atts)
throws XMLException
{
if (localName.equals(RegistryConstants.TAG_PROFILE)) {
curStore = new CustomProfileStore();
profileName = atts.getValue(RegistryConstants.ATTR_NAME);
} else if (localName.equals(RegistryConstants.TAG_PROPERTY)) {
if (curStore != null) {
curStore.setValue(
atts.getValue(RegistryConstants.ATTR_NAME),
atts.getValue(RegistryConstants.ATTR_VALUE));
}
}
}
@Override
public void saxEndElement(SAXReader reader, String namespaceURI, String localName)
throws XMLException
{
if (localName.equals(RegistryConstants.TAG_PROFILE)) {
if (!CommonUtils.isEmpty(profileName)) {
DataFormatterProfile profile = new DataFormatterProfile(profileName, curStore);
customProfiles.add(profile);
}
}
}
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.registry.formatter;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.app.DBPDataFormatterRegistry;
import org.jkiss.dbeaver.model.data.DBDDataFormatterProfile;
import org.jkiss.dbeaver.model.impl.preferences.SimplePreferenceStore;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.xml.SAXListener;
import org.jkiss.utils.xml.SAXReader;
import org.jkiss.utils.xml.XMLBuilder;
import org.jkiss.utils.xml.XMLException;
import org.xml.sax.Attributes;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DataFormatterRegistry implements DBPDataFormatterRegistry
{
private static final Log log = Log.getLog(DataFormatterRegistry.class);
public static final String CONFIG_FILE_NAME = "dataformat-profiles.xml"; //$NON-NLS-1$
private static DataFormatterRegistry instance = null;
public synchronized static DataFormatterRegistry getInstance()
{
if (instance == null) {
instance = new DataFormatterRegistry(Platform.getExtensionRegistry());
}
return instance;
}
private final List<DataFormatterDescriptor> dataFormatterList = new ArrayList<>();
private final Map<String, DataFormatterDescriptor> dataFormatterMap = new HashMap<>();
private DBDDataFormatterProfile globalProfile;
private List<DBDDataFormatterProfile> customProfiles = null;
private DataFormatterRegistry(IExtensionRegistry registry)
{
// Load data formatters from external plugins
{
IConfigurationElement[] extElements = registry.getConfigurationElementsFor(DataFormatterDescriptor.EXTENSION_ID);
for (IConfigurationElement ext : extElements) {
DataFormatterDescriptor formatterDescriptor = new DataFormatterDescriptor(ext);
dataFormatterList.add(formatterDescriptor);
dataFormatterMap.put(formatterDescriptor.getId(), formatterDescriptor);
}
}
}
public void dispose()
{
this.dataFormatterList.clear();
this.dataFormatterMap.clear();
this.globalProfile = null;
}
////////////////////////////////////////////////////
// Data formatters
public List<DataFormatterDescriptor> getDataFormatters()
{
return dataFormatterList;
}
public DataFormatterDescriptor getDataFormatter(String typeId)
{
return dataFormatterMap.get(typeId);
}
@Override
public synchronized DBDDataFormatterProfile getGlobalProfile()
{
if (globalProfile == null) {
globalProfile = new DataFormatterProfile(
"Global",
DBWorkbench.getPlatform().getPreferenceStore());
}
return globalProfile;
}
@Override
@Nullable
public DBDDataFormatterProfile getCustomProfile(String name)
{
for (DBDDataFormatterProfile profile : getCustomProfiles()) {
if (profile.getProfileName().equals(name)) {
return profile;
}
}
return null;
}
@Override
public synchronized List<DBDDataFormatterProfile> getCustomProfiles()
{
if (customProfiles == null) {
loadProfiles();
}
return customProfiles;
}
private void loadProfiles()
{
customProfiles = new ArrayList<>();
File storeFile = DBWorkbench.getPlatform().getConfigurationFile(CONFIG_FILE_NAME);
if (!storeFile.exists()) {
return;
}
try {
try (InputStream is = new FileInputStream(storeFile)) {
SAXReader parser = new SAXReader(is);
try {
parser.parse(new FormattersParser());
} catch (XMLException ex) {
throw new DBException("Datasource config parse error", ex);
}
} catch (DBException ex) {
log.warn("Can't load profiles config from " + storeFile.getPath(), ex);
}
}
catch (IOException ex) {
log.warn("IO error", ex);
}
}
private void saveProfiles()
{
if (customProfiles == null) {
return;
}
File storeFile = DBWorkbench.getPlatform().getConfigurationFile(CONFIG_FILE_NAME);
try (OutputStream os = new FileOutputStream(storeFile)) {
XMLBuilder xml = new XMLBuilder(os, GeneralUtils.UTF8_ENCODING);
xml.setButify(true);
xml.startElement("profiles");
for (DBDDataFormatterProfile profile : customProfiles) {
xml.startElement("profile");
xml.addAttribute("name", profile.getProfileName());
SimplePreferenceStore store = (SimplePreferenceStore) profile.getPreferenceStore();
Map<String, String> props = store.getProperties();
if (props != null) {
for (Map.Entry<String,String> entry : props.entrySet()) {
xml.startElement("property");
xml.addAttribute("name", entry.getKey());
xml.addAttribute("value", entry.getValue());
xml.endElement();
}
}
xml.endElement();
}
xml.endElement();
xml.flush();
}
catch (IOException ex) {
log.warn("IO error", ex);
}
}
public DBDDataFormatterProfile createCustomProfile(String profileName)
{
getCustomProfiles();
DBDDataFormatterProfile profile = new DataFormatterProfile(profileName, new CustomProfileStore());
customProfiles.add(profile);
saveProfiles();
return profile;
}
public void deleteCustomProfile(DBDDataFormatterProfile profile)
{
getCustomProfiles();
if (customProfiles.remove(profile)) {
saveProfiles();
}
}
private class CustomProfileStore extends SimplePreferenceStore {
private CustomProfileStore()
{
super(DBWorkbench.getPlatform().getPreferenceStore());
}
@Override
public void save() throws IOException
{
saveProfiles();
}
}
private class FormattersParser extends SAXListener.BaseListener
{
private String profileName;
private SimplePreferenceStore curStore;
@Override
public void saxStartElement(SAXReader reader, String namespaceURI, String localName, Attributes atts)
throws XMLException
{
if (localName.equals("profile")) {
curStore = new CustomProfileStore();
profileName = atts.getValue("name");
} else if (localName.equals("property")) {
if (curStore != null) {
curStore.setValue(
atts.getValue("name"),
atts.getValue("value"));
}
}
}
@Override
public void saxEndElement(SAXReader reader, String namespaceURI, String localName)
throws XMLException
{
if (localName.equals("profile")) {
if (!CommonUtils.isEmpty(profileName)) {
DataFormatterProfile profile = new DataFormatterProfile(profileName, curStore);
customProfiles.add(profile);
}
}
}
}
}
......@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.jkiss.dbeaver.ui.editors.base,
org.jkiss.dbeaver.ui.navigator
Bundle-ClassPath: .
Export-Package: org.jkiss.dbeaver.ui.controls,
Export-Package: org.jkiss.dbeaver.registry.functions,
org.jkiss.dbeaver.ui.controls,
org.jkiss.dbeaver.ui.controls.lightgrid,
org.jkiss.dbeaver.ui.data,
org.jkiss.dbeaver.ui.data.managers,
......
......@@ -3,4 +3,5 @@ output.. = target/classes/
bin.includes = .,\
META-INF/,\
OSGI-INF/,\
schema/,\
plugin.xml
......@@ -8,5 +8,15 @@
description="Plain text" icon="platform:/plugin/org.jkiss.dbeaver.model/icons/types/text.png"/>
</extension>
<extension point="org.jkiss.dbeaver.aggregateFunction">
<function id="count" class="org.jkiss.dbeaver.model.data.aggregate.FunctionCount" type="simple" label="Count" description="Value count" default="true"/>
<function id="countDistinct" class="org.jkiss.dbeaver.model.data.aggregate.FunctionCountDistinct" type="simple" label="Count Distinct" description="Value count" default="true"/>
<function id="sum" class="org.jkiss.dbeaver.model.data.aggregate.FunctionSum" type="simple" label="Sum" description="Sum of numbers"/>
<function id="avg" class="org.jkiss.dbeaver.model.data.aggregate.FunctionAvg" type="simple" label="Average" description="Arithmetic mean"/>
<function id="min" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMin" type="simple" label="Minimum" description="Minimum value"/>
<function id="max" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMax" type="simple" label="Maximum" description="Maximum value"/>
<function id="median" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMedian" type="simple" label="Median" description="Median (middle) value"/>
<function id="mode" class="org.jkiss.dbeaver.model.data.aggregate.FunctionMode" type="simple" label="Mode" description="Mode (most frequent) value"/>
</extension>
</plugin>
......@@ -22,7 +22,6 @@ import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPImage;
import org.jkiss.dbeaver.model.data.aggregate.IAggregateFunction;
import org.jkiss.dbeaver.model.impl.AbstractContextDescriptor;
import org.jkiss.dbeaver.registry.RegistryConstants;
import org.jkiss.utils.CommonUtils;
/**
......@@ -43,13 +42,13 @@ public class AggregateFunctionDescriptor extends AbstractContextDescriptor {
public AggregateFunctionDescriptor(IConfigurationElement config)
{
super(config);
this.id = config.getAttribute(RegistryConstants.ATTR_ID);
this.label = config.getAttribute(RegistryConstants.ATTR_LABEL);
this.description = config.getAttribute(RegistryConstants.ATTR_DESCRIPTION);
this.implClass = new ObjectType(config.getAttribute(RegistryConstants.ATTR_CLASS));
this.icon = iconToImage(config.getAttribute(RegistryConstants.ATTR_ICON));
this.type = config.getAttribute(RegistryConstants.ATTR_TYPE);
this.isDefault = CommonUtils.toBoolean(config.getAttribute(RegistryConstants.ATTR_DEFAULT));
this.id = config.getAttribute("id");
this.label = config.getAttribute("label");
this.description = config.getAttribute("description");
this.implClass = new ObjectType(config.getAttribute("class"));
this.icon = iconToImage(config.getAttribute("icon"));
this.type = config.getAttribute("type");
this.isDefault = CommonUtils.toBoolean(config.getAttribute("default"));
}
public String getId() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册