Display.getDefault().syncExec(new Runnable() { public void run() { Shell sh= shell != null ? shell : JavaPlugin.getActiveWorkbenchShell(); ExclusionInclusionDialog dialog= new ExclusionInclusionDialog(sh, element, focusOnExcluded); result[0]= dialog.open() == Window.OK; inclusionPattern[0]= dialog.getInclusionPattern(); exclusionPattern[0]= dialog.getExclusionPattern(); } }); return result[0]; }
final boolean[] result= { false }; Display.getDefault().syncExec(new Runnable() { public void run() { Shell sh= shell != null ? shell : JavaPlugin.getActiveWorkbenchShell(); ExclusionInclusionDialog dialog= new ExclusionInclusionDialog(sh, element, focusOnExcluded); result[0]= dialog.open() == Window.OK; fInclusionPattern= dialog.getInclusionPattern(); fExclusionPattern= dialog.getExclusionPattern(); } }); return result[0]; }
            public boolean doQuery(final CPListElement element, final boolean focusOnExcluded) {                Display.getDefault().syncExec(new Runnable() {                    public void run() {                        Shell sh= shell != null ? shell : JavaPlugin.getActiveWorkbenchShell();                        ExclusionInclusionDialog dialog= new ExclusionInclusionDialog(sh, element, focusOnExcluded);                        result[0]= dialog.open() == Window.OK;                        inclusionPattern[0]= dialog.getInclusionPattern();                        exclusionPattern[0]= dialog.getExclusionPattern();                    }                });                return result[0];            }