1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 12:25:35 +02:00

Warnings elimination

This commit is contained in:
Oleg Krasilnikov 2007-02-21 17:03:21 +00:00
parent abc95e03d4
commit 3cae7720cf
2 changed files with 13 additions and 10 deletions

View file

@ -13,8 +13,6 @@ package org.eclipse.cdt.managedbuilder.ui.actions;
import java.util.HashMap;
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.IManagedBuildInfo;
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.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
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.Shell;
public class ConvertTargetDialog extends StatusDialog {
public class ConvertTargetDialog extends Dialog {
final private String title;
protected List convertersList;
@ -168,13 +168,9 @@ public class ConvertTargetDialog extends StatusDialog {
}
private void validateState() {
StatusInfo status= new StatusInfo();
if ( convertersList.getSelectionIndex() == -1 ) {
// No error, just disable 'Ok' button
status.setError(""); //$NON-NLS-1$
}
updateStatus(status);
return;
Button b = getButton(IDialogConstants.OK_ID);
if (b != null)
b.setEnabled(convertersList.getSelectionIndex() != -1);
}
private Map getConversionElements() {

View file

@ -572,6 +572,7 @@ public class NewVarDialog extends Dialog {
}
fContainer.layout(true,true);
}
/*
* updates the state of the dialog controls
@ -580,6 +581,12 @@ public class NewVarDialog extends Dialog {
if(!fTotalSizeCalculated)
return;
handleTypeModified();
Button b = getButton(IDialogConstants.OK_ID);
if (b != null) {
String name = getSelectedVarName();
b.setEnabled(!EMPTY_STRING.equals(name));
}
}
protected Point getInitialSize() {