mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
bug 305041: compilation warnings
This commit is contained in:
parent
7bd8acff99
commit
d6c4fd9d5f
1 changed files with 21 additions and 9 deletions
|
@ -33,7 +33,6 @@ import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.MultiResourceInfo;
|
import org.eclipse.cdt.managedbuilder.internal.core.MultiResourceInfo;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
|
||||||
import org.eclipse.cdt.ui.newui.AbstractPage;
|
import org.eclipse.cdt.ui.newui.AbstractPage;
|
||||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||||
import org.eclipse.jface.preference.DirectoryFieldEditor;
|
import org.eclipse.jface.preference.DirectoryFieldEditor;
|
||||||
|
@ -55,6 +54,9 @@ import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Option settings page in project properties Build Settings under Tool Settings tab.
|
||||||
|
*/
|
||||||
public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
private Map<String, FieldEditor> fieldsMap =
|
private Map<String, FieldEditor> fieldsMap =
|
||||||
new HashMap<String, FieldEditor>();
|
new HashMap<String, FieldEditor>();
|
||||||
|
@ -96,14 +98,22 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param page - parent page
|
||||||
|
* @param info - resource info
|
||||||
|
* @param optionHolder - option holder (i.e. tool)
|
||||||
|
* @param cat - option category
|
||||||
|
* @param displayFixedTip - {@code true} if tooltips for the option are
|
||||||
|
* displayed at fixed area on the bottom of the dialog or
|
||||||
|
* {@code false} as a regular tooltip hover
|
||||||
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
public BuildOptionSettingsUI(AbstractCBuildPropertyTab page,
|
public BuildOptionSettingsUI(AbstractCBuildPropertyTab page,
|
||||||
IResourceInfo info, IHoldsOptions optionHolder,
|
IResourceInfo info, IHoldsOptions optionHolder,
|
||||||
IOptionCategory _category, boolean _displayFixedTip) {
|
IOptionCategory cat, boolean displayFixedTip) {
|
||||||
super(info);
|
super(info);
|
||||||
this.category = _category;
|
this.category = cat;
|
||||||
this.displayFixedTip = _displayFixedTip;
|
this.displayFixedTip = displayFixedTip;
|
||||||
this.optionHolder = optionHolder;
|
this.optionHolder = optionHolder;
|
||||||
buildPropPage = page;
|
buildPropPage = page;
|
||||||
if (info instanceof MultiItemsHolder) {
|
if (info instanceof MultiItemsHolder) {
|
||||||
|
@ -360,7 +370,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
@Override
|
@Override
|
||||||
public boolean isFor(Object holder, Object cat) {
|
public boolean isFor(Object holder, Object cat) {
|
||||||
if (holder instanceof IHoldsOptions && cat != null && cat instanceof IOptionCategory) {
|
if (holder instanceof IHoldsOptions && cat != null && cat instanceof IOptionCategory) {
|
||||||
if (this.optionHolder == optionHolder && cat.equals(this.category))
|
if (holder == this.optionHolder && cat.equals(this.category))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -675,7 +685,11 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param optionHolder - option holder such as {@link ITool}
|
||||||
|
* @param category - option category
|
||||||
|
*
|
||||||
* @return true if the page needs to have the tool tip box.
|
* @return true if the page needs to have the tool tip box.
|
||||||
|
*
|
||||||
* @since 7.0
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
protected boolean needToolTipBox(IHoldsOptions optionHolder, IOptionCategory category) {
|
protected boolean needToolTipBox(IHoldsOptions optionHolder, IOptionCategory category) {
|
||||||
|
@ -806,9 +820,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void valueChanged(boolean oldValue, boolean newValue) {
|
protected void valueChanged(boolean oldValue, boolean newValue) {
|
||||||
// TODO: uncomment before M5
|
button.setGrayed(false);
|
||||||
//if (button.getGrayed())
|
|
||||||
AbstractCPropertyTab.setGrayed(button, false);
|
|
||||||
super.valueChanged(!newValue, newValue);
|
super.valueChanged(!newValue, newValue);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
@ -834,7 +846,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
if (vals[0] > 0)
|
if (vals[0] > 0)
|
||||||
gray = true;
|
gray = true;
|
||||||
}
|
}
|
||||||
AbstractCPropertyTab.setGrayed(button, gray);
|
button.setGrayed(gray);
|
||||||
button.setSelection(value);
|
button.setSelection(value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue