public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { String projectName = getSelectedJavaProjectName(); configuration .setAttribute(MeposeConstants.ID_PROJECT_NAME, projectName);
  public void setDefaults(ILaunchConfigurationWorkingCopy configuration)  {    String projectName = getSelectedJavaProjectName();    IProject project = null;    if(projectName != null && projectName.length() != 0) {        project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);    }    MeposeModel model = null;    if(project != null) {        model = MeposePlugin.getDefault().getMeposeModelManager().getModel(project);    }    IPath workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().findMember("/").getLocation();    configuration.setAttribute(MeposeConstants.ID_PROJECT_NAME, projectName);    configuration.setAttribute(MIDletLauncherConstants.WORKSPACE, workspaceLocation.toOSString());    configuration.setAttribute(MIDletLauncherConstants.JAD_FILE, "/path/to/file.jar");        String polishHomePath = null;    if(model != null) {        polishHomePath = model.getPolishHome().getAbsolutePath();    }    if(polishHomePath == null || polishHomePath.length() == 0) {        polishHomePath = MeposePlugin.getDefault().getPluginPreferences().getString(MeposeConstants.ID_PROJECT_NAME);    }    if(polishHomePath == null || polishHomePath.length() == 0) {        polishHomePath = "/path/to/polish/home";    }    configuration.setAttribute(MeposeConstants.ID_POLISH_HOME, polishHomePath);        String wtkHomePath = null;    if(model != null) {        wtkHomePath = model.getWTKHome().getAbsolutePath();    }    if(wtkHomePath == null || wtkHomePath.length() == 0) {        wtkHomePath = MeposePlugin.getDefault().getPluginPreferences().getString(MIDletLauncherConstants.WTK_HOME);    }    if(wtkHomePath == null || wtkHomePath.length() == 0) {        wtkHomePath = "/path/to/wtk/home";    }    configuration.setAttribute(MeposeConstants.ID_WTK_HOME, wtkHomePath);    HashMap attrMap = new HashMap();    attrMap.put("hostname", "localhost");    attrMap.put("port", "8000");    configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, attrMap);  }