Bug 102972 - IllegalArgumentException when: Build-tab -> remove default "." entry, try to add "."
Summary: IllegalArgumentException when: Build-tab -> remove default "." entry, try to ...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Konrad Kolosowski CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
: 103255 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-06 23:05 EDT by Max Mueller CLA Friend
Modified: 2005-08-01 18:34 EDT (History)
1 user (show)

See Also:


Attachments
102972 RuntimeInfoSection patch.txt (896 bytes, text/plain)
2005-07-26 18:48 EDT, Konrad Kolosowski CLA Friend
no flags Details
102972 pde.ui patch2.txt (2.39 KB, text/plain)
2005-08-01 18:34 EDT, Konrad Kolosowski CLA Friend
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Mueller CLA Friend 2005-07-06 23:05:18 EDT
Reproduce:
1) activate Build tab (Build Configuration)
2) Remove default "." Library (RuntimeIinformation)
3) Add "." Library
4) Click on the added Library

And the Error Log contains a new IllegalArgumentException (every time I click on
it - see below).

The added Library is added as "./".
I am able to manually solve the problem by modifying build.properties.

Here is the exception
java.lang.IllegalArgumentException: Path must include project and resource name:
/theprojectname/
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1560)
	at org.eclipse.core.internal.resources.Container.getFile(Container.java:118)
	at
org.eclipse.pde.internal.ui.editor.build.RuntimeInfoSection.isJarIncluded(RuntimeInfoSection.java:696)
	at
org.eclipse.pde.internal.ui.editor.build.RuntimeInfoSection.selectionChanged(RuntimeInfoSection.java:674)
	at
org.eclipse.pde.internal.ui.editor.build.RuntimeInfoSection$PartAdapter.selectionChanged(RuntimeInfoSection.java:79)
	at
org.eclipse.pde.internal.ui.parts.TablePart$1.selectionChanged(TablePart.java:49)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
	at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1784)
	at
org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1027)
	at
org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1053)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:209)
	at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:364)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	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:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)
Comment 1 Wassim Melhem CLA Friend 2005-07-10 00:50:22 EDT
*** Bug 103255 has been marked as a duplicate of this bug. ***
Comment 2 Wassim Melhem CLA Friend 2005-07-10 00:51:00 EDT
Konrad, please investigate for 3.1.1
Comment 3 Konrad Kolosowski CLA Friend 2005-07-26 18:46:02 EDT
Fixed, but I was only able to reproduce by renaming the library (what Bob 
did), not by adding a new one as described below.
Please verify in tomorrow's 3.1.1 maintenance build or 3.2 nightly build.
Comment 4 Konrad Kolosowski CLA Friend 2005-07-26 18:48:11 EDT
Created attachment 25335 [details]
102972 RuntimeInfoSection patch.txt

For reference, attached is the code change.
Comment 5 Max Mueller CLA Friend 2005-07-30 12:04:29 EDT
If I was meant to verify it...
In M20050727-1200 I could verify that it did not add it as "./" anymore.
I also did add/rename it to "./" and were able to rename it back to "."... but
in that case I got the dialog box with the previous error message at least two
times. One time for selecting it and another time when opening the context menu.
Fortuantelly the context menu is still accessible when the [second] dialog box
is open (else I would probably not be able to rename it).

Not a tragedy though, less people will probably do that.

Thanks
Comment 6 Konrad Kolosowski CLA Friend 2005-08-01 18:34:21 EDT
Created attachment 25539 [details]
102972 pde.ui patch2.txt

Yes the previous change only made the editor not generate "./" but would not
prevent the exception if it was already in build.properties.  I released
another change (as in the patch).  This should prevent the exception when
build.properties is incorrect.