Community
Participate
Working Groups
When creating a Java Application launch configuration without a proper selection, the following exception is thrown due to a missing project name: java.lang.IllegalArgumentException: Path for project must have only one segment. at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:184) at org.eclipse.objectteams.otdt.internal.debug.adaptor.launching.OTREBlock.hasOTJProject(OTREBlock.java:116) at org.eclipse.objectteams.otdt.internal.debug.adaptor.launching.OTREBlock.initializeFrom(OTREBlock.java:96) at org.eclipse.objectteams.otdt.internal.debug.adaptor.launching.JDTDebugUILaunchingAdaptor._OT$JavaJRETab$initializeFrom$initializeFrom(JDTDebugUILaunchingAdaptor.java:70) at org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab._OT$initializeFrom$chain(JavaJRETab.java) at org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab.initializeFrom(JavaJRETab.java) Apparently the project name isn't null but "". This exception is quite annoying because it keeps popping at your face until a valid project name has been entered or the launch config deleted.
Created attachment 197361 [details] simple fix This should fix the issue by also testing Path.isValidSegment(projectName), which is the declared precondition of getProject(String).
The exception is ugly, the fix is simple, safe and well localized. Releasing for RC4.
Verified using build 20110607730