} else if (datastore instanceof AccessDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(AccessDatastore.class, datastore).createInjector();
AccessDatastoreDialog dialog = injector.getInstance(AccessDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof ExcelDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(ExcelDatastore.class, datastore).createInjector();
ExcelDatastoreDialog dialog = injector.getInstance(ExcelDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof SasDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(SasDatastore.class, datastore).createInjector();
SasDatastoreDialog dialog = injector.getInstance(SasDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof XmlDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(XmlDatastore.class, datastore).createInjector();
XmlDatastoreDialog dialog = injector.getInstance(XmlDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof OdbDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(OdbDatastore.class, datastore).createInjector();
OdbDatastoreDialog dialog = injector.getInstance(OdbDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof FixedWidthDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(FixedWidthDatastore.class, datastore).createInjector();
FixedWidthDatastoreDialog dialog = injector.getInstance(FixedWidthDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof DbaseDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = _injectorBuilder.with(DbaseDatastore.class, datastore).createInjector();
DbaseDatastoreDialog dialog = injector.getInstance(DbaseDatastoreDialog.class);
dialog.setVisible(true);
}
});
} else if (datastore instanceof CompositeDatastore) {
editButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
CompositeDatastoreDialog dialog = new CompositeDatastoreDialog((CompositeDatastore) datastore,
_datastoreCatalog, _windowContext);
dialog.setVisible(true);
}
});
} else {
editButton.setEnabled(false);
}