Defining columntype while appending columns [message #2131] |
Thu, 15 February 2024 16:25 |
helloWorld22
Messages: 13 Registered: June 2022
|
Junior Member |
|
|
Hi,
In DW SDK, while I want to define a columntype after initializing new columns, it is throwing exception.
firstNewColumn = dwInterface.initializeNewColumns(result.get(t).toArray(new String[0]);
dwInterface.setColumnType(firstNewColumn, IPluginHelper.COLUMN_TYPE_STRUCTURE_FROM_SMILES);
The logic is to check if the new column added has a column header "SMILES", if so, then append the column as COLUMN_TYPE_STRUCTURE_FROM_SMILES.
It works fine when setColumnType is not used. But smiles are shown as String and not structure.
The exception occurs in line
dwInterface.setColumnType(firstNewColumn, IPluginHelper.COLUMN_TYPE_STRUCTURE_FROM_SMILES);
as nullpointer exception.
The exception occurs in com.actelion.research.datawarrior.plugin.PluginHelper line:
mCoordinateColumn[column] = mTargetTableModel.addNewColumns(1);
Since mCoordinateColumn is not set in initializeNewColumns, it is throwing nullpointer exception.
Is it possible to set up a column type while appending column?
[Updated on: Thu, 15 February 2024 18:16] Report message to a moderator
|
|
|