use of org.hibernate.eclipse.console.common.HibernateExtension in project jbosstools-hibernate by jbosstools.
the class StructuredTextViewerConfigurationUtil method getService.
public static IService getService(ISourceViewer sourceViewer) {
IJavaProject javaProject = findJavaProject(sourceViewer);
HibernateNature hibnat = HibernateNature.getHibernateNature(javaProject);
if (hibnat != null) {
ConsoleConfiguration cc = hibnat.getDefaultConsoleConfiguration();
if (cc != null) {
HibernateExtension extension = cc.getHibernateExtension();
if (extension != null) {
return extension.getHibernateService();
}
}
}
return ServiceLookup.getDefault();
}
Aggregations