mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 531121 - Fix up/down buttons in toolchains preference
The content provider was overriding the change all the time. Change-Id: I6d406dd6dc903cd890bfc7f7788d76e4388ff905
This commit is contained in:
parent
c3aaf44022
commit
d4b3472cc9
1 changed files with 6 additions and 6 deletions
|
@ -44,6 +44,7 @@ import org.eclipse.swt.widgets.Group;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Table;
|
import org.eclipse.swt.widgets.Table;
|
||||||
import org.eclipse.swt.widgets.TableColumn;
|
import org.eclipse.swt.widgets.TableColumn;
|
||||||
|
import org.eclipse.tools.templates.ui.internal.Activator;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
|
||||||
|
@ -85,6 +86,11 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(IWorkbench workbench) {
|
public void init(IWorkbench workbench) {
|
||||||
|
try {
|
||||||
|
toolChains = new ArrayList<>(manager.getAllToolChains());
|
||||||
|
} catch (CoreException e) {
|
||||||
|
Activator.log(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
|
private static class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
|
||||||
|
@ -130,12 +136,6 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
availTable.setContentProvider(new IStructuredContentProvider() {
|
availTable.setContentProvider(new IStructuredContentProvider() {
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
toolChains = new ArrayList<IToolChain>();
|
|
||||||
try {
|
|
||||||
toolChains.addAll(manager.getAllToolChains());
|
|
||||||
} catch (CoreException e) {
|
|
||||||
CUIPlugin.log(e.getStatus());
|
|
||||||
}
|
|
||||||
return toolChains.toArray();
|
return toolChains.toArray();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue