コード例 #1
0
 protected void handleServerButtonSelected() {
   final Server newServer = getServerFromWizard();
   if (newServer != null) {
     Display.getDefault()
         .asyncExec(
             new Runnable() {
               public void run() {
                 servers.add(newServer);
                 serverCombo.add(newServer.getName());
                 serverCombo.select(serverCombo.indexOf(newServer.getName()));
                 handleServerSelection();
               }
             });
   }
 }
コード例 #2
0
 private void deleteLaunchConfiguration(final ILaunchConfiguration launchConfig)
     throws CoreException {
   Display.getDefault()
       .asyncExec(
           new Runnable() {
             public void run() {
               ILaunchConfiguration config = launchConfig;
               try {
                 if (config instanceof ILaunchConfigurationWorkingCopy) {
                   config = ((ILaunchConfigurationWorkingCopy) config).getOriginal();
                 }
                 if (config != null) {
                   config.delete();
                 }
               } catch (CoreException ce) {
                 // Ignore
               }
             }
           });
 }