Platinum Partner

Idea plugin - using DataSource

Because i haven't found better solution, if there is any pls help me out. No one helped this poor guy:

http://devnet.jetbrains.com/message/5202001#5202001

So I guess there is non. 

And for the guys from JetBrains, it's easy to use connection from data source when making plugin for NetBeans IDE.

import com.intellij.javaee.dataSource.DataSource;
import com.intellij.javaee.dataSource.DataSourceManager;
import com.intellij.javaee.dataSource.ServerInstance;
import com.intellij.openapi.project.Project;
import java.lang.reflect.Method;
import java.sql.Connection;
...

DataSourceManager dataSourceManager = 
DataSourceManager.getInstance(e.getProject());
DataSource dataSource = 
dataSourceManager.getDataSourceByName("BB21_TST"); 
Method getConnectionMethod  = 
dataSource.getClass().getDeclaredMethod("getConnection", Project.class, ServerInstance.class);
getConnectionMethod.setAccessible(true);
Connection conn =
 (Connection) getConnectionMethod.invoke(dataSource, p, null);
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}