Bug 308975 Can't recover from 'invalid' path variable
If a path variable is 'corrupted', the user is unable to recover. Steps to reproduce: 1) new path variable: PROJ_UP = ${PROJECT_LOC}/../ 2) You end up with this in your .project file: <variableList> <variable> <name>PROJ_UP</name> <value>$%7BPARENT-1-PROJECT_LOC%7D</value> </variable> </variableList> In e4 this was a more human readable: <variableList> <variable> <name>PROJ_UP</name> <value>${PARENT-1-PROJECT_LOC}</value> </variable> </variableList> If you change the .project file to contain the above, the Linked Resource property page is no longer accessible, and there's no indication of what went wrong. java.lang.IllegalArgumentException at java.net.URI.create(URI.java:842) at org.eclipse.core.internal.resources.ProjectPathVariableManager.getURIValue(ProjectPathVariableManager.java:123) at org.eclipse.ui.internal.ide.dialogs.PathVariablesGroup.initTemporaryState(PathVariablesGroup.java:542) at org.eclipse.ui.internal.ide.dialogs.PathVariablesGroup.setResource(PathVariablesGroup.java:727) at org.eclipse.ui.internal.ide.dialogs.ProjectLinkedResourcePage.createContents(ProjectLinkedResourcePage.java:66) at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232) at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501) at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1258) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java
tableStyle |= SWT.MULTI;
        }
        
		Composite tableComposite = new Composite(pageComponent, SWT.NONE);
		data = new GridData(SWT.FILL, SWT.FILL, true, true);
		data.grabExcessHorizontalSpace = true;
		data.grabExcessVerticalSpace = true;
		tableComposite.setLayoutData(data);
		variableTable = new TableViewer(tableComposite, tableStyle);
        variableTable.getTable().addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                updateEnabledState();
                if (selectionListener != null) {
					selectionListener.handleEvent(new Event());
				}
            }
        });
        
		ColumnViewerToolTipSupport.enableFor(variableTable, ToolTip.NO_RECREATE);
		TableViewerColumn nameColumn = new TableViewerColumn(variableTable, SWT.NONE);
		nameColumn.setLabelProvider(new NameLabelProvider());
		nameColumn.getColumn().setText(IDEWorkbenchMessages.PathVariablesBlock_nameColumn);
        TableViewerColumn valueColumn = new TableViewerColumn(variableTable, SWT.NONE);
        valueColumn.setLabelProvider(new ValueLabelProvider());
        valueColumn.getColumn().setText(IDEWorkbenchMessages.PathVariablesBlock_valueColumn);
        
        TableColumnLayout tableLayout = new TableColumnLayout();
		tableComposite.setLayout( tableLayout );
		tableLayout.setColumnData(nameColumn.getColumn(), new ColumnWeightData(150));
		tableLayout.setColumnData(valueColumn.getColumn(), new ColumnWeightData(280));