mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
autotools: Creating default config doesn't need project.
AutotoolsConfigurationManager.createDefaultConfiguration doesn't need the project as parameter, that's why it's default one :). Change-Id: I55f39edf5867f874e38524042572329bc7e34f66 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
6c750f9289
commit
e11035409f
2 changed files with 5 additions and 6 deletions
|
@ -96,7 +96,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized IAConfiguration createDefaultConfiguration(IProject project, String id) {
|
public synchronized IAConfiguration createDefaultConfiguration(String id) {
|
||||||
return new AutotoolsConfiguration(id);
|
return new AutotoolsConfiguration(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||||
public synchronized IAConfiguration getConfiguration(IProject p, String cfgId, boolean persist) {
|
public synchronized IAConfiguration getConfiguration(IProject p, String cfgId, boolean persist) {
|
||||||
IAConfiguration cfg = findCfg(p, cfgId);
|
IAConfiguration cfg = findCfg(p, cfgId);
|
||||||
if (cfg == null) {
|
if (cfg == null) {
|
||||||
cfg = createDefaultConfiguration(p, cfgId);
|
cfg = createDefaultConfiguration(cfgId);
|
||||||
if (persist) {
|
if (persist) {
|
||||||
addConfiguration(p, cfg);
|
addConfiguration(p, cfg);
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||||
String id = cfgd.getId();
|
String id = cfgd.getId();
|
||||||
IAConfiguration cfg = cfgs.get(id);
|
IAConfiguration cfg = cfgs.get(id);
|
||||||
if (cfg == null) {
|
if (cfg == null) {
|
||||||
cfg = createDefaultConfiguration(project, id);
|
cfg = createDefaultConfiguration(id);
|
||||||
}
|
}
|
||||||
p.println("<configuration id=\"" + cfg.getId() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
p.println("<configuration id=\"" + cfg.getId() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
for (int j = 0; j < optionList.length; ++j) {
|
for (int j = 0; j < optionList.length; ++j) {
|
||||||
|
@ -625,7 +625,7 @@ public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||||
|
|
||||||
// Get set of configuration options and convert to set of IAutotoolOptions
|
// Get set of configuration options and convert to set of IAutotoolOptions
|
||||||
Map<String, IConfigureOption> cfgOptions = cfg.getOptions();
|
Map<String, IConfigureOption> cfgOptions = cfg.getOptions();
|
||||||
IAConfiguration dummyCfg = createDefaultConfiguration(project, createDummyId());
|
IAConfiguration dummyCfg = createDefaultConfiguration(createDummyId());
|
||||||
for (Iterator<Entry<String, IConfigureOption>> i = cfgOptions.entrySet().iterator(); i.hasNext();) {
|
for (Iterator<Entry<String, IConfigureOption>> i = cfgOptions.entrySet().iterator(); i.hasNext();) {
|
||||||
Map.Entry<String, IConfigureOption> entry = i.next();
|
Map.Entry<String, IConfigureOption> entry = i.next();
|
||||||
String name = entry.getKey();
|
String name = entry.getKey();
|
||||||
|
|
|
@ -117,8 +117,7 @@ public class AutotoolsConfigurePropertyTab extends AbstractAutotoolsCPropertyTab
|
||||||
fTree.addSelectionChangedListener(event -> handleOptionSelection());
|
fTree.addSelectionChangedListener(event -> handleOptionSelection());
|
||||||
fTree.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
|
fTree.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
// Create a temporary default AutotoolsConfiguration to use for label info
|
// Create a temporary default AutotoolsConfiguration to use for label info
|
||||||
IAConfiguration tmp = AutotoolsConfigurationManager.getInstance().createDefaultConfiguration(page.getProject(),
|
IAConfiguration tmp = AutotoolsConfigurationManager.getInstance().createDefaultConfiguration("");
|
||||||
"");
|
|
||||||
fTree.setLabelProvider(new ToolListLabelProvider(tmp));
|
fTree.setLabelProvider(new ToolListLabelProvider(tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue