Project: JDT
Bug 149440 [build path] Default src folder rendered as package in new project wizard
Reported: 2006-07-03 06:40:56 | Status: resolved fixed

I20060628-1135 1. New Java Project 2. Type in name 'P01' 3. Seperate src and output folder 4. Next> Is: default package is shown and 'src' is shown as a package Should: No default package and 'src' is a source folder Select "package" 'src' and 'Add package src to bp': org.eclipse.core.runtime.CoreException: The folder is already a source folder. at org.eclipse.jdt.internal.corext.buildpath.ClasspathModifier.validateAndAddEntry(ClasspathModifier.java:1952) at org.eclipse.jdt.internal.corext.buildpath.ClasspathModifier.setNewEntry(ClasspathModifier.java:1880) at org.eclipse.jdt.internal.corext.buildpath.ClasspathModifier.addToClasspath(ClasspathModifier.java:236) at org.eclipse.jdt.internal.corext.buildpath.AddSelectedSourceFolderOperation.run(AddSelectedSourceFolderOperation.java:72) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.internalRun(BusyIndicatorRunnableContext.java:113) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run(BusyIndicatorRunnableContext.java:80) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run(BusyIndicatorRunnableContext.java:126) at org.eclipse.jdt.internal.ui.wizards.buildpaths.newsourcepage.HintTextGroup$2.linkActivated(HintTextGroup.java:234) at org.eclipse.ui.forms.widgets.FormText.activateLink(FormText.java:1515) at org.eclipse.ui.forms.widgets.FormText.handleMouseClick(FormText.java:1330) at org.eclipse.ui.forms.widgets.FormText.access$16(FormText.java:1304) at org.eclipse.ui.forms.widgets.FormText$6.mouseUp(FormText.java:436) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3375) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2995) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.jdt.ui.actions.AbstractOpenWizardAction.run(AbstractOpenWizardAction.java:83) at org.eclipse.jdt.internal.ui.wizards.OpenJavaProjectWizardToolbarAction.run(OpenJavaProjectWizardToolbarAction.java:45) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3375) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2995) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) !SUBENTRY 1 org.eclipse.jdt.ui 4 4 2006-07-03 12:41:54.210 !MESSAGE The folder is already a source folder. Works fine in 3.2

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/BuildPathDialog.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/DialogPackageExplorer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/NewSourceContainerWorkbookPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavaCapabilityConfigurationPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPage.java