- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
baselink = "../"; } else { baselink = "../../" + coordinate.getArtifactId() + "/"; baselink = "../"; } else { baselink = "../../" + coordinate.getArtifactId() + "/";
String artifactId = attributes.getValue(new Attributes.Name("Maven-Artifact-Id")); String version = attributes.getValue(new Attributes.Name("Maven-Version")); return new Coordinate(groupId, artifactId, version); return new Coordinate(null, null, null);
assertEquals("`link:type[ResolvableType]`", s); assertEquals(1, resolved.size()); assertEquals("foo", resolved.get(0).getGroupId()); assertEquals("bar", resolved.get(0).getArtifactId()); assertEquals("1.2.3", resolved.get(0).getVersion());
@Override public String resolveTypeLink(TypeElement elt, Coordinate coordinate) { TypeInfo type = null; try { type = factory.create(elt.asType()); } catch (Exception e) { System.out.println("Could not resolve doc link for type " + elt.getQualifiedName()); return null; } if (type.getKind().equals(ClassKind.ENUM) && ((EnumTypeInfo)type).isGen()) { String baselink = null; if (coordinate == null) baselink = "../"; else baselink = "../../" + coordinate.getArtifactId() + "/"; return baselink + "enums.html#" + elt.getSimpleName().toString(); } if (type.getKind().equals(ClassKind.DATA_OBJECT)) { String baselink = null; if (coordinate == null) baselink = "../"; else baselink = "../../" + coordinate.getArtifactId() + "/"; return baselink + "dataobjects.html#" + elt.getSimpleName().toString(); } if (type.getKind().equals(ClassKind.API)) { ApiTypeInfo api = (ApiTypeInfo)type.getRaw(); return "../../scaladocs/" + api.translateName("scala").replace('.', '/') + ".html"; } return null; }