Bug 21173 - Can't create new Project because empty string in "New Project" Preference [2.0.1]
Summary: Can't create new Project because empty string in "New Project" Preference [2....
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-01 18:30 EDT by Carter Brooking CLA
Modified: 2002-08-22 11:23 EDT (History)
1 user (show)

See Also:


Attachments
patch (57.66 KB, patch)
2002-08-06 12:54 EDT, Martin Aeschlimann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carter Brooking CLA 2002-07-01 18:30:10 EDT
In the Java->New Project tab of Preferences I chose the folders radio button and leave the Source 
folder name empty, and the output location name to be "output". My intent is to have my source come 
off the main tree with an initial branch to be output. Like this:

myProject (root)
   -- com
      -- 
ibm
         ...
   -- output
      -- com
         -- ibm
         ...

Then when I try to create a New Java Project, I can enter a 
project name, but when I click Next nothing happnes, and when I'm forced to click Finish, I get an 
error message that reads: "An Error occured while creating the Java project. Path must include 
project and resource name."

This bug is reproducible, but after I got to playing with the 
folder names, it went away when I setup the same conditions that caused it the first time. I just did 
a fresh extract of Eclipse (I'm using the final 2.0 release from June 28th) and was able to recreate 
it. So somehow by putting values in those fields and then taking them away, I've been able to make 
the bug go away.

This bug may seem minor, but it's very frustrating and caused me to curse one of 
the mileston builds when I saw it (I didn't report it at the time because I thought I saw a bug that was 
to fix it). The correlation between a setting in the new project tab and actually creating a new 
project is quite small as I might set that tab up in the first week of using eclipse and not create a 
new project for weeks.

Perhaps I'm misunderstanding the intent of those folder names, but I 
don't think I am. If I am, their intent should be better documented in the panel. If I'm correct as to 
their intent, then there is some wierd initial setting on the source folder name that is empty 
which later causes projects to not be created (with a confusing message to boot).

This is my 
first bug submission to eclipse so my apologies if I've filed it on the wrong component.
Comment 1 Nick Edgar CLA 2002-07-03 15:07:34 EDT
Did you have anything in the .log file (in the .metadata folder)?
Comment 2 Carter Brooking CLA 2002-07-03 15:10:27 EDT
Here's the content of my .log:

!SESSION Jul 01, 2002 17:23:28.900 ---------------------------------------------
java.version=1.3.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -install 
file:C:/temp/eclipse/eclipse/
!ENTRY org.eclipse.ui 4 4 Jul 01, 2002 17:23:28.900
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Jul 01, 2002 17:23:28.916
!MESSAGE Path must include project and resource name.
!STACK 0
java.lang.IllegalArgumentException: Path must include project and resource name.
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:55)
	at org.eclipse.core.internal.resources.Workspace.newResource
(Workspace.java:1195)
	at org.eclipse.core.internal.resources.Container.getFolder
(Container.java:131)
	at 
org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.getDefaultClassPa
th(BuildPathsBlock.java:424)
	at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.init
(BuildPathsBlock.java:296)
	at org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.init
(JavaCapabilityConfigurationPage.java:106)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.update
(NewProjectCreationWizardPage.java:83)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.setVisible
(NewProjectCreationWizardPage.java:119)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:888)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed
(WizardDialog.java:653)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:308)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:87)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:557)
	at org.eclipse.jface.window.Window.open(Window.java:537)
	at org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction.run
(AbstractOpenWizardAction.java:152)
	at org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction.run
(AbstractOpenWizardAction.java:170)
	at org.eclipse.ui.internal.PluginAction.runWithEvent
(PluginAction.java:210)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent
(WWinPluginAction.java:175)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
	at org.eclipse.core.launcher.Main.run(Main.java:698)
	at org.eclipse.core.launcher.Main.main(Main.java:534)
!ENTRY org.eclipse.jdt.ui 4 1 Jul 01, 2002 17:23:40.56
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException: 
java.lang.IllegalArgumentException: Path must include project and resource name.
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:55)
	at org.eclipse.core.internal.resources.Workspace.newResource
(Workspace.java:1195)
	at org.eclipse.core.internal.resources.Container.getFolder
(Container.java:131)
	at 
org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.getDefaultClassPa
th(BuildPathsBlock.java:424)
	at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.init
(BuildPathsBlock.java:296)
	at org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.init
(JavaCapabilityConfigurationPage.java:106)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.initFromExistin
gStructures(NewProjectCreationWizardPage.java:210)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.access$1
(NewProjectCreationWizardPage.java:165)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage$2.run
(NewProjectCreationWizardPage.java:144)
	at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute
(WorkspaceModifyDelegatingOperation.java:39)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:64)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1361)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:299)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:720)
	at 
org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.performFinish
(NewProjectCreationWizard.java:57)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:577)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:312)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:87)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:557)
	at org.eclipse.jface.window.Window.open(Window.java:537)
	at org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction.run
(AbstractOpenWizardAction.java:152)
	at org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction.run
(AbstractOpenWizardAction.java:170)
	at org.eclipse.ui.internal.PluginAction.runWithEvent
(PluginAction.java:210)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent
(WWinPluginAction.java:175)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
	at org.eclipse.core.launcher.Main.run(Main.java:698)
	at org.eclipse.core.launcher.Main.main(Main.java:534)
Comment 3 Martin Aeschlimann CLA 2002-07-25 08:30:39 EDT
check for empty string missing. trivial fix.
Comment 4 Dirk Baeumer CLA 2002-08-06 06:04:24 EDT
2.0.1 candidate
Comment 5 Martin Aeschlimann CLA 2002-08-06 12:54:25 EDT
Created attachment 1802 [details]
patch
Comment 6 Martin Aeschlimann CLA 2002-08-07 05:40:56 EDT
reviewed by DB
Comment 7 Martin Aeschlimann CLA 2002-08-07 06:15:24 EDT
reviewed by CK and released to 2.0.1
Comment 8 Martin Aeschlimann CLA 2002-08-12 06:04:30 EDT
released to 2.1
Comment 9 Dani Megert CLA 2002-08-22 11:23:36 EDT
Verified against 2.0.1 build I-20020821