'Eclipse'에 해당되는 글 13건


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.

Posted by zennken

TabItem의 Focus이동

Eclipse/SWT 2009. 2. 19. 21:52
TabFolder.setSelection(tabItemIndex);
TabFolder.setFocus();
출처: http://dev.eclipse.org/newslists/news.eclipse.tools/msg37643.html
 
Posted by zennken

출처: http://www.ibm.com/developerworks/kr/library/os-eclipse-custwiz/

문제: Child method에서 발생하는 메세지 다이얼로그를 열 수가 없다. 이유는 Thread.
핵심: InvocationTargetException을 이용하여 수행하고자 하는 메서드에서 던지는 Exception을 받아서 처리한다.


    /**
     * This method is called when 'Finish' button is pressed in
     * the wizard. We will create an operation and run it
     * using wizard as execution context.
     */
    public boolean performFinish() {
        final String containerName = page.getContainerName();
        final String fileName = page.getFileName();
        IRunnableWithProgress op = new IRunnableWithProgress() {
            public void run(IProgressMonitor monitor) throws InvocationTargetException {
                try {
                    doFinish(containerName, fileName, monitor);
                } catch (CoreException e) {
                    throw new InvocationTargetException(e);
                } finally {
                    monitor.done();
                }
            }
        };
        try {
            getContainer().run(true, false, op);
        } catch (InterruptedException e) {
            return false;
        } catch (InvocationTargetException e) {
            Throwable realException = e.getTargetException();
            MessageDialog.openError(getShell(), "Error", realException.getMessage());
            return false;
        }
        return true;
    }
Posted by zennken
12

zennken

달력