Community
Participate
Working Groups
I20100425-2000 "Preferences > Linked Resources": The "New..." and "Edit..." dialogs should not show the "Variable..." button. When I select a variable, the "New Variable" dialog show an error (Path must be absolute.), and when I try to click "Extend...", nothing happens.
Created attachment 166946 [details] Patch Szymon, can you review it for me please? Thanks
Build id: I20100509-0800 I think that the fix introduces an inconsistency. On 'Preferences > Linked Resources', I can't add variables made of other variables, even if they are resolved to an absolute location. E.g. I created a variable 'temp' pointing at 'c:/temp'. I wanted to create a variable 'tempD' pointing at 'c:/temp/d' using a location 'temp/d'. I couldn't. It looks like I am able to do this using 'the NewFile wizard > Advanced > Variables' though. One more issue, probably not related to this one. Steps: 1) Open the NewFolder wizard 2) Go to 'Advanced' and check 'Linked Folder' 3) Type "c:/" I'm getting an exception org.eclipse.core.runtime.CoreException: No file system is defined for scheme: c at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSystemCore.java:65) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:107) at org.eclipse.core.filesystem.EFS.getStore(EFS.java:470) at org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils.getFileStore(IDEResourceInfoUtils.java:211) at org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils.getFileInfo(IDEResourceInfoUtils.java:184) at org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup.validateLinkLocation(CreateLinkedResourceGroup.java:695) at org.eclipse.ui.dialogs.WizardNewFolderMainPage.validateLinkedResource(WizardNewFolderMainPage.java:726) at org.eclipse.ui.dialogs.WizardNewFolderMainPage.validatePage(WizardNewFolderMainPage.java:773) at org.eclipse.ui.dialogs.WizardNewFolderMainPage$2.handleEvent(WizardNewFolderMainPage.java:184) at org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup$2.modifyText(CreateLinkedResourceGroup.java:291) I couldn't see the problem on 3.5. Another issue: Steps: 1) Open the 'NewFolder' wizard 2) 'Advanced > Linked Folder > Variables' 3) Click 'New' to open the 'New Variable' dialog 3b) Add a new variable and press 'Ok', the variable SHOULD be saved at this point 4) On the 'Select Path Variable' dialog click 'Cancel' 5) The variable is not set as the location in the 'NewFolder' wizard, it's ok 6) Open 'Variables' again, you can't see the added variable, but you should Feel free to open separate bugs for described issues. However they all should be addressed for 3.6.
(In reply to comment #2) You could look at the 'Run Configurations' dialog. 1) Create a launch configuration, go to 'Main > Workspace Data' 2) Click variables and try to edit, add or remove some of them 3) Notice that changes are stored, no matter 'Ok' or 'Cancel' is pressed
(In reply to comment #2) > Build id: I20100509-0800 > > I think that the fix introduces an inconsistency. > > On 'Preferences > Linked Resources', I can't add variables made of other > variables, even if they are resolved to an absolute location. > E.g. I created a variable 'temp' pointing at 'c:/temp'. I wanted to create a > variable 'tempD' pointing at 'c:/temp/d' using a location 'temp/d'. I couldn't. > It looks like I am able to do this using 'the NewFile wizard > Advanced > > Variables' though. > The New file wizard > Advanced > Variables uses the Project Path Variable Manager (because you're trying to create a file in a project), as opposed to the preferences one that uses the legacy workspace path variable manager. The workspace path variable manager didn't support variables, only absolute paths, and its capabilities haven't changed: it still doesn't support variables. The workspace path variable manager doesn't support the built-int path variables either (PROJECT_LOC, etc...). The existing workspace path variable manager was left un-touched and left alone for compatibility reasons. > One more issue, probably not related to this one. > Steps: > 1) Open the NewFolder wizard > 2) Go to 'Advanced' and check 'Linked Folder' > 3) Type "c:/" > > I'm getting an exception > > org.eclipse.core.runtime.CoreException: No file system is defined for scheme: c > at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) > at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50) > at > org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSystemCore.java:65) > at > org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:107) > at org.eclipse.core.filesystem.EFS.getStore(EFS.java:470) > at > org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils.getFileStore(IDEResourceInfoUtils.java:211) > at > org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils.getFileInfo(IDEResourceInfoUtils.java:184) > at > org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup.validateLinkLocation(CreateLinkedResourceGroup.java:695) > at > org.eclipse.ui.dialogs.WizardNewFolderMainPage.validateLinkedResource(WizardNewFolderMainPage.java:726) > at > org.eclipse.ui.dialogs.WizardNewFolderMainPage.validatePage(WizardNewFolderMainPage.java:773) > at > org.eclipse.ui.dialogs.WizardNewFolderMainPage$2.handleEvent(WizardNewFolderMainPage.java:184) > at > org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup$2.modifyText(CreateLinkedResourceGroup.java:291) > > I couldn't see the problem on 3.5. > With the new patch, putting "c:/" now generates a wizard error, so it prevents the 'Finish' button to be clicked - the same behavior as 3.5. Also, putting something like "c:/foo", where "foo" doesn't exist is interpreted as an absolute path, rather than a URI (scheme:/path), even though it is undistinguishable from the URI syntax. This is done by verifying if the scheme exist, and if it doesn't, interpret the string as an absolute path with the wrote slash orientation. > Another issue: > Steps: > 1) Open the 'NewFolder' wizard > 2) 'Advanced > Linked Folder > Variables' > 3) Click 'New' to open the 'New Variable' dialog > 3b) Add a new variable and press 'Ok', the variable SHOULD be saved at this > point > 4) On the 'Select Path Variable' dialog click 'Cancel' > 5) The variable is not set as the location in the 'NewFolder' wizard, it's ok > 6) Open 'Variables' again, you can't see the added variable, but you should > Ok, so that means that when the user will have the variable list in a selection dialog, all add, remove, and edits will be effective right away, even though the user presses cancel, is that right? If so, this is now effective with the latest patch.
Created attachment 168162 [details] Latest Patch
(In reply to comment #5) > Created an attachment (id=168162) > Latest Patch Sorry, but I'm not able to apply the patch. Could you update it?
(In reply to comment #4) > The New file wizard > Advanced > Variables uses the Project Path Variable > Manager (because you're trying to create a file in a project), as opposed to the > preferences one that uses the legacy workspace path variable manager. > > The workspace path variable manager didn't support variables, only absolute > paths, and its capabilities haven't changed: it still doesn't support > variables. Right, this is the inconsistency I'm talking about. The user is not aware of implementation details and the fact that we have different implementations for projects and workspace. It's too late to work on it in 3.6, but I hope you will look at it during 3.7. Could you raise a bug against that? > The workspace path variable manager doesn't support the built-int path variables > either (PROJECT_LOC, etc...). There is Bug 311520 for the empty workspace variable list. > With the new patch, putting "c:/" now generates a wizard error, so it prevents > the 'Finish' button to be clicked - the same behavior as 3.5. > > Also, putting something like "c:/foo", where "foo" doesn't exist is interpreted > as an absolute path, rather than a URI (scheme:/path), even though it is > undistinguishable from the URI syntax. > > This is done by verifying if the scheme exist, and if it doesn't, interpret the > string as an absolute path with the wrote slash orientation. Ok. But writing and exception to the console is bad, right? We should not write an exception, if everyting works fine. Could you raise a bug for that and investigate? > Ok, so that means that when the user will have the variable list in a selection > dialog, all add, remove, and edits will be effective right away, even though the > user presses cancel, is that right? Yes. I'll look at the patch when it's updated. Please raise separate bugs for described issues. Thanks :)
Created attachment 168358 [details] Patch Patch wtih updated sources from trunk as of now.
Created attachment 168524 [details] Minor changes to the Serge patch Moreover I would open a separate bug for fixes in CreateLinkedResourcesGroup. I found more cases when exceptions are written down to the console. For instance, try to type 'file://c:'
(In reply to comment #9) > Moreover I would open a separate bug for fixes in CreateLinkedResourcesGroup. I > found more cases when exceptions are written down to the console. For instance, > try to type 'file://c:' I opened bug 312888.
(In reply to comment #10) > (In reply to comment #9) > > Moreover I would open a separate bug for fixes in CreateLinkedResourcesGroup. I > > found more cases when exceptions are written down to the console. For instance, > > try to type 'file://c:' > > I opened bug 312888. Ok, thanks.
Created attachment 168887 [details] Patch Merging Szymon's patch
Created attachment 168888 [details] Patch Pulling out the CreateLinkedResourceGroup.java changes (now in bug 312888). Can you please review the changes? I believe they address all concerns raised in this bug (minus the 312888 ones) Thanks,
The patch looks good. I found one issue though. I can't reproduce it without the patch. Steps: 1) Go to "Preferences > General > Linked Resources" 2) Click "New" 3) In the "New variable" provide the name and the location As the location I tried to enter "c:/home" and I got NPEs.
Created attachment 168906 [details] Patch now addresses the NPE reported by Szymon
Serge, the patch looks good. I don't like the layout with "File..." and "Folder..." buttons. It's even worse if "Variable..." is present because the location field is so short. This is not related to the patch though.
Thanks! Now fixed on head.