3
는 최근에 나는 종종 다음과 같은 자바 코드를 읽을 수 있습니다Java IDE에서 소스 코드의 유형 정의를 축소 할 수 있습니까?
LinkedHashMap<String, Integer> totals = new LinkedHashMap<String, Integer>(listOfRows.get(0))
for (LinkedHashMap<String, Integer> row : (ArrayList<LinkedHashMap<String,Integer>>) table.getValue()) {
for(Entry<String, Integer> elem : row.entrySet()) {
String colName=elem.getKey();
int Value=elem.getValue();
int oldValue=totals.get(colName);
int sum = Value + oldValue;
totals.put(colName, sum);
}
}
인해 길고 중첩 된 유형 정의에 간단한 알고리즘은 매우 가려진된다. 그래서 나는 제거하거나 같은 종류없이 자바 코드를 볼 수 내 IDE와 유형 정의를 축소 할 수달라고 : 유형 정의를 축소하는 것입니다 물론
totals = new (listOfRows.get(0))
for (row : table.getValue()) {
for(elem : row.entrySet()) {
colName=elem.getKey();
Value=elem.getValue();
oldValue=totals.get(colName);
sum = Value + oldValue;
totals.put(colName, sum);
}
}
가장 좋은 방법,하지만 위에 마우스를 이동할 때 variable은 유형을 툴팁으로 표시합니다. 이 작업을 수행 할 수있는 IDE 용 Java IDE 또는 플러그인이 있습니까?
.NET (비주얼 스튜디오)이 기능을, 그들은 그것을 호출 "지역"을 가지고있다. 몇 달 전 이클립스에서이 기능을 찾으려고했으나 아무 것도 발견하지 못했습니다. :( –