mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
Warnings elimination
This commit is contained in:
parent
b64327fc60
commit
e0bd923f4f
6 changed files with 7 additions and 13 deletions
|
@ -120,7 +120,6 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
|
|||
optionSelector.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
String oldValue = selected;
|
||||
String name = optionSelector.getText();
|
||||
int index = optionSelector.getSelectionIndex();
|
||||
selected = index == -1 ? new String() : optionSelector.getItem(index);
|
||||
setPresentsDefaultValue(false);
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
|
|||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
||||
import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
|
@ -205,7 +204,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
// Write the preference store values back to the build model
|
||||
|
||||
Object[][] clonedOptions;
|
||||
IResourceConfiguration realRcCfg = null;
|
||||
// IResourceConfiguration realRcCfg = null;
|
||||
IConfiguration realCfg = null;
|
||||
IBuildObject handler = null;
|
||||
|
||||
|
@ -371,7 +370,6 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
Object source = event.getSource();
|
||||
IOption changedOption = null;
|
||||
IHoldsOptions changedHolder = null;
|
||||
IOption newOption = null;
|
||||
String id = null;
|
||||
|
||||
if(source instanceof FieldEditor){
|
||||
|
@ -389,20 +387,20 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
case IOption.STRING:
|
||||
if(fe instanceof StringFieldEditor){
|
||||
String val = ((StringFieldEditor)fe).getStringValue();
|
||||
newOption = ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,val);
|
||||
ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,val);
|
||||
}
|
||||
break;
|
||||
case IOption.BOOLEAN:
|
||||
if(fe instanceof BooleanFieldEditor){
|
||||
boolean val = ((BooleanFieldEditor)fe).getBooleanValue();
|
||||
newOption = ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,val);
|
||||
ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,val);
|
||||
}
|
||||
break;
|
||||
case IOption.ENUMERATED:
|
||||
if(fe instanceof BuildOptionComboFieldEditor){
|
||||
String name = ((BuildOptionComboFieldEditor)fe).getSelection();
|
||||
String enumId = changedOption.getEnumeratedId(name);
|
||||
newOption = ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,
|
||||
ManagedBuildManager.setOption(fInfo,changedHolder,changedOption,
|
||||
(enumId != null && enumId.length() > 0) ? enumId : name);
|
||||
|
||||
}
|
||||
|
@ -418,7 +416,7 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
|||
case IOption.MACRO_FILES:
|
||||
if(fe instanceof FileListControlFieldEditor){
|
||||
String val[] =((FileListControlFieldEditor)fe).getStringListValue();
|
||||
newOption = ManagedBuildManager.setOption(fInfo, changedHolder, changedOption, val);
|
||||
ManagedBuildManager.setOption(fInfo, changedHolder, changedOption, val);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -52,7 +52,6 @@ public class NewVarDialog extends StatusDialog {
|
|||
// String constants
|
||||
private static final String PREFIX = "NewBuildMacroDialog"; //$NON-NLS-1$
|
||||
private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$
|
||||
private static final String ZNAME = LABEL + ".name"; //$NON-NLS-1$
|
||||
private static final String VALUE = LABEL + ".value"; //$NON-NLS-1$
|
||||
|
||||
private static final String TYPE = LABEL + ".type"; //$NON-NLS-1$
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.ui.newui.NewUIMessages;
|
|||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.resource.ResourceManager;
|
||||
import org.eclipse.jface.util.Assert;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Display;
|
|||
public class ToolListLabelProvider extends LabelProvider {
|
||||
private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL);
|
||||
private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT);
|
||||
private static final String TREE_LABEL = "BuildPropertyPage.label.ToolTree"; //$NON-NLS-1$
|
||||
private static final String ERROR_UNKNOWN_ELEMENT = "BuildPropertyPage.error.Unknown_tree_element"; //$NON-NLS-1$
|
||||
|
||||
private ImageDescriptor descriptor = null;
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor;
|
|||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.jface.util.ListenerList;
|
||||
import org.eclipse.core.runtime.ListenerList;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
||||
public class ToolSettingsPrefStore implements IPreferenceStore {
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
|||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
||||
import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
|
||||
|
|
Loading…
Add table
Reference in a new issue