提交 ea872559 编写于 作者: J jurgen

Cassandra value handlers.

Formatters model refactoring

Former-commit-id: aa5aaf75
上级 cadb04ab
......@@ -28,6 +28,8 @@ Export-Package: org.apache.commons.logging,
org.jkiss.dbeaver.model.exec.plan,
org.jkiss.dbeaver.model.impl,
org.jkiss.dbeaver.model.impl.data,
org.jkiss.dbeaver.model.impl.data.editors,
org.jkiss.dbeaver.model.impl.data.formatters,
org.jkiss.dbeaver.model.impl.edit,
org.jkiss.dbeaver.model.impl.jdbc,
org.jkiss.dbeaver.model.impl.jdbc.cache,
......
......@@ -2152,22 +2152,22 @@
</extension>
<extension point="org.jkiss.dbeaver.dataFormatter">
<formatter id="date" label="%DateFormatter.date.label" class="org.jkiss.dbeaver.model.impl.data.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.DateFormatSample">
<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.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.TimeFormatSample">
<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.DateTimeDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.TimestampFormatSample">
<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.NumberDataFormatter" sampleClass="org.jkiss.dbeaver.model.impl.data.NumberFormatSample">
<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"/>
......
......@@ -18,9 +18,9 @@
*/
package org.jkiss.dbeaver.model.data;
import org.jkiss.dbeaver.model.impl.data.BinaryFormatterBase64;
import org.jkiss.dbeaver.model.impl.data.BinaryFormatterHex;
import org.jkiss.dbeaver.model.impl.data.BinaryFormatterString;
import org.jkiss.dbeaver.model.impl.data.formatters.BinaryFormatterBase64;
import org.jkiss.dbeaver.model.impl.data.formatters.BinaryFormatterHex;
import org.jkiss.dbeaver.model.impl.data.formatters.BinaryFormatterString;
/**
* Binary content presentation
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDBinaryFormatter;
import org.jkiss.utils.Base64;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDBinaryFormatter;
import org.jkiss.dbeaver.ui.editors.binary.HexUtils;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDBinaryFormatter;
import org.jkiss.dbeaver.utils.ContentUtils;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
import org.jkiss.utils.CommonUtils;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.data.DBDDataFormatter;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
......
......@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.impl.data;
package org.jkiss.dbeaver.model.impl.data.formatters;
import org.jkiss.dbeaver.model.data.DBDDataFormatterSample;
......
......@@ -33,7 +33,7 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import org.jkiss.dbeaver.model.impl.data.editors.DateTimeEditorHelper;
import org.jkiss.dbeaver.model.impl.data.editors.DateTimeInlineEditor;
import org.jkiss.dbeaver.model.impl.data.editors.DateTimeStandaloneEditor;
import org.jkiss.dbeaver.model.impl.data.DefaultDataFormatter;
import org.jkiss.dbeaver.model.impl.data.formatters.DefaultDataFormatter;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
import org.jkiss.dbeaver.ui.properties.PropertySourceAbstract;
......
......@@ -30,7 +30,7 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import org.jkiss.dbeaver.model.impl.data.editors.BitInlineEditor;
import org.jkiss.dbeaver.model.impl.data.DefaultDataFormatter;
import org.jkiss.dbeaver.model.impl.data.formatters.DefaultDataFormatter;
import org.jkiss.dbeaver.model.impl.data.editors.NumberEditorHelper;
import org.jkiss.dbeaver.model.impl.data.editors.NumberInlineEditor;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
......
......@@ -125,8 +125,8 @@ public class DatabaseEditorInputFactory implements IElementFactory
DBNNode node = DBeaverCore.getInstance().getNavigatorModel().getNodeByPath(monitor, nodePath);
if (node != null) {
Class<?> aClass = Class.forName(inputClass);
Constructor<?> constructor ;
for (Class nodeType = node.getClass(); ; nodeType = nodeType.getSuperclass()) {
Constructor<?> constructor = null;
for (Class nodeType = node.getClass(); nodeType != null; nodeType = nodeType.getSuperclass()) {
try {
constructor = aClass.getConstructor(nodeType);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册