'분류 전체보기'에 해당되는 글 71건
- 2009.12.08 AIX Debugging
- 2009.09.17 NumberFormat for Integer with default locale
- 2009.09.16 java.util.ConcurrentModificationException
- 2009.07.31 Eclipse Remote Debugging
- 2009.07.30 Eclipse RCP에 Help System 사용하기 (3.4 Ganymede)
- 2009.03.30 Plugin에 Help 추가하기
- 2009.02.26 Java Date Time
- 2009.02.25 Invoking the garbage collector
- 2009.02.23 Jface table inline edit
- 2009.02.20 JFace TreeViewer DoubleClickListener
String -> Integer with default locale
NumberFormat.getIntegerInstance().format(Integer.valueOf(aString).intValue());
Collection내의 데이터 무결성에 의하여 발생하는 에러. 예를 들어 Collection을 참조하고 있는 iter를 이용하여 remove를 하게 되면 데이터 무결성을 지키기 위하여 발생시키는 에러
해결법: Snapshot iterator를 사용
에러 발생가능한 코드
Snapshot iterator를 이용한 코드
해결법: Snapshot iterator를 사용
에러 발생가능한 코드
for(AbstractNode node:mEntries)
{
if (node instanceof AbstractNodeCollection)
{
((AbstractNodeCollection)node).removeChildren();
}
mEntries.remove(node);
}
{
if (node instanceof AbstractNodeCollection)
{
((AbstractNodeCollection)node).removeChildren();
}
mEntries.remove(node);
}
Snapshot iterator를 이용한 코드
AbstractNode node;
Iterator<AbstractNode> iter = new ArrayList<AbstractNode>(mEntries).iterator();
while(iter.hasNext())
{
node = iter.next();
if (node instanceof AbstractNodeCollection)
{
((AbstractNodeCollection)node).removeChildren();
}
mEntries.remove(node);
}
Iterator<AbstractNode> iter = new ArrayList<AbstractNode>(mEntries).iterator();
while(iter.hasNext())
{
node = iter.next();
if (node instanceof AbstractNodeCollection)
{
((AbstractNodeCollection)node).removeChildren();
}
mEntries.remove(node);
}
Debugging Target
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 -jar xxx.jar
Eclipse
Debug as Remote Server
참조: http://www.eclipsezone.com/eclipse/forums/t53459.html
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 -jar xxx.jar
Eclipse
Debug as Remote Server
참조: http://www.eclipsezone.com/eclipse/forums/t53459.html
Run Configuration 기반에서 확인하기
1. 해당 프로젝트의 Run As -> Run Configuration-> Plug-ins에서 다음의 플러그인을 추가
org.eclipse.help.webapp
org.eclipse.help.ui
2. 같은 화면에서 Add Required Plug-ins를 실행한 후, Validate Plug-ins를 수행하여 필요한 플러그인들이 전부 들어 있는지 확인한다.
3. Eclipse내에서 Run Configuration기반으로 실행하여 (Ctrl + F11) 필요한 플러그인들이 모두 추가 되었는지 확인한다.
Product 기반에서 확인하기
4. 해당 프로젝트의 product화면에서 'Testing'항목에서 Synchronize를 시킨 후, Lauch an Eclipse application을 실행하여 빠진 플러그인이 없는 지 확인한다.
5. 빠진 플러그인들이 있으면 feature 프로젝트의 feature.xml-> Plug-ins에 추가한뒤, Dependencies화면에서 'Compute'를 수행한다.
6. 4번항목을 다시 수행하여 문제가 있으면 5번을 다시 반복한다. 문제가 없으면 Product를 Export시킨다.
1. 해당 프로젝트의 Run As -> Run Configuration-> Plug-ins에서 다음의 플러그인을 추가
org.eclipse.help.webapp
org.eclipse.help.ui
2. 같은 화면에서 Add Required Plug-ins를 실행한 후, Validate Plug-ins를 수행하여 필요한 플러그인들이 전부 들어 있는지 확인한다.
3. Eclipse내에서 Run Configuration기반으로 실행하여 (Ctrl + F11) 필요한 플러그인들이 모두 추가 되었는지 확인한다.
Product 기반에서 확인하기
4. 해당 프로젝트의 product화면에서 'Testing'항목에서 Synchronize를 시킨 후, Lauch an Eclipse application을 실행하여 빠진 플러그인이 없는 지 확인한다.
5. 빠진 플러그인들이 있으면 feature 프로젝트의 feature.xml-> Plug-ins에 추가한뒤, Dependencies화면에서 'Compute'를 수행한다.
6. 4번항목을 다시 수행하여 문제가 있으면 5번을 다시 반복한다. 문제가 없으면 Product를 Export시킨다.
RCP에 추가되는 Plugin에 Help를 추가
1. Pluing.xml -> Extensions -> "Add" -> Extension Wizards -> Help Content -> Primary 선택
2. Plugin.xml -> Build -> html & help관련 xml들을 추가한다.
1. Pluing.xml -> Extensions -> "Add" -> Extension Wizards -> Help Content -> Primary 선택
2. Plugin.xml -> Build -> html & help관련 xml들을 추가한다.
참조: http://docstore.mik.ua/orelly/java-ent/jnut/ch04_04.htm
Runtime r = Runtime.getRuntime();
r.gc();
참조: http://www.devdaily.com/java/edu/pj/pj010008/pj010008.shtml
r.gc();
참조: http://www.devdaily.com/java/edu/pj/pj010008/pj010008.shtml
Snippet007FullSelection
Demonstrates how you can use a use inline editing in tables with multiple columns which requires to use SWT.FULL_SELECTION but hiding the selection from the user.
JFace TreeViewer에서 item을 더블클릭했을 때, 열고 닫기
public class NodeDoubleClickListener implements IDoubleClickListener {
@Override
public void doubleClick(DoubleClickEvent event)
{
TreeViewer viewer = (TreeViewer) event.getViewer();
Object obj = ((IStructuredSelection) event.getSelection()).getFirstElement();
if (viewer.getExpandedState(obj))
{
viewer.collapseToLevel(obj, 1);
}
else
{//하위 전체를 열기
viewer.expandToLevel(obj, AbstractTreeViewer.ALL_LEVELS);
}
}
}