/** * handles the shared radio button being selected */ private void handleSharedRadioButtonSelected() { setSharedEnabled(isShared()); updateLaunchConfigurationDialog(); }
/** * validates the local shared config file location * @return true if the local shared file exists, false otherwise */ private boolean validateLocalShared() { if (isShared()) { String path = fSharedLocationText.getText().trim(); IContainer container = getContainer(path); if (container == null || container.equals(ResourcesPlugin.getWorkspace().getRoot())) { setErrorMessage(LaunchConfigurationsMessages.CommonTab_Invalid_shared_configuration_location_14); return false; } else if (!container.getProject().isOpen()) { setErrorMessage(LaunchConfigurationsMessages.CommonTab_Cannot_save_launch_configuration_in_a_closed_project__1); return false; } } return true; }
/** * Updates the configuration form the local shared config working copy * @param config the local shared config working copy */ private void updateConfigFromLocalShared(ILaunchConfigurationWorkingCopy config) { if (isShared()) { String containerPathString = fSharedLocationText.getText(); IContainer container = getContainer(containerPathString); if(container == null) { //we need to force an attribute to allow the invalid container path to be revertable config.setAttribute(BAD_CONTAINER, containerPathString); } else { config.setContainer(container); } } else { config.setContainer(null); } }