@Override public void dispose() { super.dispose(); if (fLauchConfigurationModel != null) { for (int i= 0, size= fLauchConfigurationModel.size(); i < size; i++) { LaunchConfigurationElement element= fLauchConfigurationModel.get(i); element.dispose(); } } }
private void createLaunchConfigSelectionGroup(Composite parent) { fLaunchConfigurationCombo= new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); SWTUtil.setDefaultVisibleItemCount(fLaunchConfigurationCombo); fLaunchConfigurationCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fLauchConfigurationModel.addAll(Arrays.asList(getLaunchConfigurations())); String[] names= new String[fLauchConfigurationModel.size()]; for (int i= 0, size= fLauchConfigurationModel.size(); i < size; i++) { LaunchConfigurationElement element= fLauchConfigurationModel.get(i); names[i]= element.getLaunchConfigurationName(); } fLaunchConfigurationCombo.setItems(names); fLaunchConfigurationCombo.addListener(SWT.Selection, this); fLaunchConfigurationCombo.addListener(SWT.Modify, this); }
public void exportAntScript(MultiStatus status) { if (!fAntScriptSaveCheckbox.getSelection()) return; if (canCreateAntScript(getShell())) { LaunchConfigurationElement element= fLauchConfigurationModel.get(fLaunchConfigurationCombo.getSelectionIndex()); Assert.isNotNull(element); FatJarAntExporter antExporter= getLibraryHandler().getAntExporter(fAntScriptLocation, fJarPackage.getAbsoluteJarLocation(), element.getLaunchConfiguration()); try { antExporter.run(status); } catch (CoreException e) { status.add(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, FatJarPackagerMessages.FatJarPackageWizardPage_error_ant_script_generation_failed, e)); } } }
private void createLaunchConfigSelectionGroup(Composite parent) { fLaunchConfigurationCombo= new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY); SWTUtil.setDefaultVisibleItemCount(fLaunchConfigurationCombo); fLaunchConfigurationCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fLauchConfigurationModel.addAll(Arrays.asList(getLaunchConfigurations())); String[] names= new String[fLauchConfigurationModel.size()]; for (int i= 0, size= fLauchConfigurationModel.size(); i < size; i++) { LaunchConfigurationElement element= fLauchConfigurationModel.get(i); names[i]= element.getLaunchConfigurationName(); } fLaunchConfigurationCombo.setItems(names); fLaunchConfigurationCombo.addListener(SWT.Selection, this); fLaunchConfigurationCombo.addListener(SWT.Modify, this); }
public void exportAntScript(MultiStatus status) { if (!fAntScriptSaveCheckbox.getSelection()) return; if (canCreateAntScript(getShell())) { LaunchConfigurationElement element= fLauchConfigurationModel.get(fLaunchConfigurationCombo.getSelectionIndex()); Assert.isNotNull(element); FatJarAntExporter antExporter= getLibraryHandler().getAntExporter(fAntScriptLocation, fJarPackage.getAbsoluteJarLocation(), element.getLaunchConfiguration()); try { antExporter.run(status); } catch (CoreException e) { status.add(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, FatJarPackagerMessages.FatJarPackageWizardPage_error_ant_script_generation_failed, e)); } } }
private boolean validateLaunchConfigurationGroup() { int index= fLaunchConfigurationCombo.getSelectionIndex(); if (index == -1) return false; LaunchConfigurationElement element= fLauchConfigurationModel.get(index); if (element.hasProgramArguments()) setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs); if (element.hasVMArguments()) setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsVMArgs); return true; }
public Object[] getSelectedElementsWithoutContainedChildren(MultiStatus status) { try { LaunchConfigurationElement element= fLauchConfigurationModel.get(fLaunchConfigurationCombo.getSelectionIndex()); ILaunchConfiguration launchconfig= element.getLaunchConfiguration(); fJarPackage.setLaunchConfigurationName(element.getLaunchConfigurationName()); return getSelectedElementsWithoutContainedChildren(launchconfig, fJarPackage, getContainer(), status); } catch (CoreException e) { JavaPlugin.log(e); return new Object[0]; } }
private boolean validateLaunchConfigurationGroup() { int index= fLaunchConfigurationCombo.getSelectionIndex(); if (index == -1) return false; LaunchConfigurationElement element= fLauchConfigurationModel.get(index); if (element.hasProgramArguments()) setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsProgramArgs); if (element.hasVMArguments()) setWarningMessage(FatJarPackagerMessages.FatJarPackageWizardPage_warning_launchConfigContainsVMArgs); return true; }
@Override public void dispose() { super.dispose(); if (fLauchConfigurationModel != null) { for (int i= 0, size= fLauchConfigurationModel.size(); i < size; i++) { LaunchConfigurationElement element= fLauchConfigurationModel.get(i); element.dispose(); } } }
public Object[] getSelectedElementsWithoutContainedChildren(MultiStatus status) { try { LaunchConfigurationElement element= fLauchConfigurationModel.get(fLaunchConfigurationCombo.getSelectionIndex()); ILaunchConfiguration launchconfig= element.getLaunchConfiguration(); fJarPackage.setLaunchConfigurationName(element.getLaunchConfigurationName()); return getSelectedElementsWithoutContainedChildren(launchconfig, fJarPackage, getContainer(), status); } catch (CoreException e) { JavaPlugin.log(e); return new Object[0]; } }