mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Warnings elimination
This commit is contained in:
parent
abc95e03d4
commit
3cae7720cf
2 changed files with 13 additions and 10 deletions
|
@ -13,8 +13,6 @@ package org.eclipse.cdt.managedbuilder.ui.actions;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusDialog;
|
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
|
import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
||||||
|
@ -24,12 +22,14 @@ import org.eclipse.cdt.ui.newui.NewUIMessages;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.DisposeEvent;
|
import org.eclipse.swt.events.DisposeEvent;
|
||||||
import org.eclipse.swt.events.DisposeListener;
|
import org.eclipse.swt.events.DisposeListener;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Event;
|
import org.eclipse.swt.widgets.Event;
|
||||||
|
@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.List;
|
||||||
import org.eclipse.swt.widgets.Listener;
|
import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
public class ConvertTargetDialog extends StatusDialog {
|
public class ConvertTargetDialog extends Dialog {
|
||||||
|
|
||||||
final private String title;
|
final private String title;
|
||||||
protected List convertersList;
|
protected List convertersList;
|
||||||
|
@ -168,13 +168,9 @@ public class ConvertTargetDialog extends StatusDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateState() {
|
private void validateState() {
|
||||||
StatusInfo status= new StatusInfo();
|
Button b = getButton(IDialogConstants.OK_ID);
|
||||||
if ( convertersList.getSelectionIndex() == -1 ) {
|
if (b != null)
|
||||||
// No error, just disable 'Ok' button
|
b.setEnabled(convertersList.getSelectionIndex() != -1);
|
||||||
status.setError(""); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
updateStatus(status);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map getConversionElements() {
|
private Map getConversionElements() {
|
||||||
|
|
|
@ -572,6 +572,7 @@ public class NewVarDialog extends Dialog {
|
||||||
}
|
}
|
||||||
fContainer.layout(true,true);
|
fContainer.layout(true,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* updates the state of the dialog controls
|
* updates the state of the dialog controls
|
||||||
|
@ -580,6 +581,12 @@ public class NewVarDialog extends Dialog {
|
||||||
if(!fTotalSizeCalculated)
|
if(!fTotalSizeCalculated)
|
||||||
return;
|
return;
|
||||||
handleTypeModified();
|
handleTypeModified();
|
||||||
|
|
||||||
|
Button b = getButton(IDialogConstants.OK_ID);
|
||||||
|
if (b != null) {
|
||||||
|
String name = getSelectedVarName();
|
||||||
|
b.setEnabled(!EMPTY_STRING.equals(name));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Point getInitialSize() {
|
protected Point getInitialSize() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue