use of org.netxms.ui.eclipse.datacollection.dialogs.SelectDciDialog in project netxms by netxms.
the class DataSources method addItem.
/**
* Add new item
*/
private void addItem() {
SelectDciDialog dlg = new SelectDciDialog(getShell(), 0);
if (dlg.open() == Window.OK) {
List<DciValue> selection = dlg.getSelection();
List<ChartDciConfig> select = new ArrayList<ChartDciConfig>();
for (DciValue item : selection) {
ChartDciConfig dci = new ChartDciConfig(item);
labelProvider.addCacheEntry(dci.nodeId, dci.dciId, dci.name);
select.add(dci);
dciList.add(dci);
}
viewer.setInput(dciList.toArray());
viewer.setSelection(new StructuredSelection(select));
}
}
use of org.netxms.ui.eclipse.datacollection.dialogs.SelectDciDialog in project netxms by netxms.
the class TemplateDataSources method importItem.
/**
* Import new item
*/
private void importItem() {
SelectDciDialog dlg = new SelectDciDialog(getShell(), 0);
if (dlg.open() == Window.OK) {
List<DciValue> selection = dlg.getSelection();
List<ChartDciConfig> select = new ArrayList<ChartDciConfig>();
for (DciValue item : selection) {
ChartDciConfig dci = new ChartDciConfig(item);
select.add(dci);
dciList.add(dci);
}
viewer.setInput(dciList.toArray());
viewer.setSelection(new StructuredSelection(select));
}
}
use of org.netxms.ui.eclipse.datacollection.dialogs.SelectDciDialog in project netxms by netxms.
the class LinkDataSources method addItem.
/**
* Add new item
*/
private void addItem() {
SelectDciDialog dlg = new SelectDciDialog(getShell(), 0);
if (dlg.open() == Window.OK) {
List<DciValue> selection = dlg.getSelection();
List<SingleDciConfig> select = new ArrayList<SingleDciConfig>();
for (DciValue item : selection) {
SingleDciConfig dci = new SingleDciConfig(item);
select.add(dci);
labelProvider.addCacheEntry(dci.getNodeId(), dci.dciId, dci.name);
dciList.add(dci);
}
viewer.setInput(dciList.toArray());
viewer.setSelection(new StructuredSelection(select));
}
}
use of org.netxms.ui.eclipse.datacollection.dialogs.SelectDciDialog in project netxms by netxms.
the class SummaryTableGeneral method selectDci.
private void selectDci() {
SelectDciDialog dlg = new SelectDciDialog(getShell(), 0);
dlg.setDcObjectType(2);
dlg.setSingleSelection(true);
if (dlg.open() == Window.OK) {
table.setTableDciName(dlg.getSelection().get(0).getName());
dciName.setText(table.getTableDciName());
}
}
Aggregations