if (m_editMode) { m_fileText.setText(m_file.getAbsolutePath()); m_intervalText.setText(Integer.toString(m_interval));  if (m_numLines == 0) { m_wholeFileButton.setSelection(true); m_numLinesText.setText(Integer.toString(DEFAULT_NUMLINES));  m_numLinesLabel.setEnabled(false); m_numLinesText.setEnabled(false); } else { m_wholeFileButton.setSelection(false); m_numLinesText.setText(Integer.toString(m_numLines));  m_numLinesLabel.setEnabled(true); m_numLinesText.setEnabled(true); }  }
handleEditMode();
	protected Control createDialogArea(Composite parent)	{		Composite composite = (Composite) super.createDialogArea(parent);		GridData gridData;				GridLayout layout = new GridLayout();		layout.numColumns = 3;		layout.horizontalSpacing = 10;		composite.setLayout(layout);				//		// File row		//		new Label(composite, SWT.NONE).setText("Select a file to watch:");		m_fileText = new Text(composite, SWT.BORDER);		m_fileText.setTextLimit(200);		gridData = new GridData();		gridData.widthHint = 200;		m_fileText.setLayoutData(gridData);		Button chooserButton = new Button(composite, SWT.PUSH);		chooserButton.setText("Browse...");		if (m_editMode) {		    m_fileText.setEnabled(false);		    chooserButton.setEnabled(false);		}		        //        // Refresh interval row        //        new Label(composite, SWT.NONE).setText("Refresh interval (in seconds):");        m_intervalText = new Text(composite, SWT.BORDER);        m_intervalText.setTextLimit(4);        gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);        gridData.horizontalSpan = 2;        gridData.widthHint = 40;        m_intervalText.setLayoutData(gridData);                // Number of lines to show        //        createNumLinesGUI(composite);                //        // Filters        //        createFilterGUI(composite);        		// Register the browse button callback, now that all widgets have been created.		chooserButton.addSelectionListener(new SelectionAdapter() {			public void widgetSelected(SelectionEvent evt)			{				FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);				dialog.open();				if (dialog.getFileName().length() > 0) {					m_fileText.setText(dialog.getFilterPath() + java.io.File.separator + dialog.getFileName());			                    int defaultInterval = DEFAULT_INTERVAL;                    int defaultNumLines = DEFAULT_NUMLINES;										// Pre-fill the interval and num lines					try {						defaultInterval = m_settings.getInt("interval-" + dialog.getFileName());						defaultNumLines = m_settings.getInt("numLines-" + dialog.getFileName());					}					catch (NumberFormatException ignore) {						// There are no settings for this file. Use the defaults.					}													m_intervalText.setText(Integer.toString(defaultInterval));					m_intervalText.setSelection(0);					                    if (defaultNumLines == 0)                    {                        m_wholeFileButton.setSelection(true);                        m_numLinesText.setText(Integer.toString(DEFAULT_NUMLINES));                        // Disable the fields                        m_numLinesLabel.setEnabled(false);                        m_numLinesText.setEnabled(false);                    }                    else                    {                        m_wholeFileButton.setSelection(false);                        // Enable fields                        m_numLinesLabel.setEnabled(true);                        m_numLinesText.setEnabled(true);                        // Set text                        m_numLinesText.setText(Integer.toString(defaultNumLines));                        m_numLinesText.setSelection(0);                    }				}			}		});				// Edit mode handling        //		if (m_editMode) {            m_fileText.setText(m_file.getAbsolutePath());            m_intervalText.setText(Integer.toString(m_interval));                        if (m_numLines == 0)            {                m_wholeFileButton.setSelection(true);                m_numLinesText.setText(Integer.toString(DEFAULT_NUMLINES));                // Disable fields                m_numLinesLabel.setEnabled(false);                m_numLinesText.setEnabled(false);            }            else            {                m_wholeFileButton.setSelection(false);                m_numLinesText.setText(Integer.toString(m_numLines));                // Enable fields                m_numLinesLabel.setEnabled(true);                m_numLinesText.setEnabled(true);            }              		}				return composite;	}