mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
[api][171530] Add a setEditable to the SystemFilterStringEditPane hierarchy.
This commit is contained in:
parent
9710d904bf
commit
3a0efdabdc
6 changed files with 95 additions and 16 deletions
|
@ -99,6 +99,7 @@ public class DeveloperFilterStringEditPane extends SystemFilterStringEditPane {
|
|||
}
|
||||
}
|
||||
);
|
||||
setEditable(editable);
|
||||
return composite_prompts;
|
||||
}
|
||||
|
||||
|
@ -134,7 +135,17 @@ public class DeveloperFilterStringEditPane extends SystemFilterStringEditPane {
|
|||
textDevr.setText(inputFilterString.substring(idx+1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
|
||||
*/
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
enable(textDevr, editable);
|
||||
enable(textTeam, editable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Override of parent method.
|
||||
* This is called in the change filter dialog when the user selects "new", or selects another string.
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.eclipse.rse.files.ui;
|
|||
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.jface.viewers.CheckboxTableViewer;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||
import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
|
||||
|
@ -64,11 +65,13 @@ public class SystemFileFilterStringEditPane
|
|||
{
|
||||
// GUI widgets
|
||||
protected Button filesOnlyCheckBox;
|
||||
//protected Button testButton;
|
||||
protected Button subsetByFileNameRadioButton, subsetByFileTypesRadioButton;
|
||||
protected Button subsetByFileNameRadioButton;
|
||||
protected Button subsetByFileTypesRadioButton;
|
||||
protected Button selectTypesButton;
|
||||
protected Label labelFile, labelTypes;
|
||||
protected Text textFile, textTypes;
|
||||
protected Label labelFile;
|
||||
protected Label labelTypes;
|
||||
protected Text textFile;
|
||||
protected Text textTypes;
|
||||
protected SystemRemoteFolderCombo folderCombo;
|
||||
// limits
|
||||
protected int filterFileLength = 256;
|
||||
|
@ -150,6 +153,23 @@ public class SystemFileFilterStringEditPane
|
|||
if (folderCombo != null)
|
||||
folderCombo.setTextLimit(max);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
|
||||
*/
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
enable(filesOnlyCheckBox, editable);
|
||||
enable(subsetByFileNameRadioButton, editable);
|
||||
enable(selectTypesButton, editable);
|
||||
enable(labelFile, editable);
|
||||
enable(textFile, editable);
|
||||
enable(folderCombo, editable);
|
||||
enable(subsetByFileTypesRadioButton, editable);
|
||||
enable(labelTypes, editable);
|
||||
enable(textTypes, editable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Existing strings are used to aid in uniqueness validation.
|
||||
*/
|
||||
|
@ -304,6 +324,7 @@ public class SystemFileFilterStringEditPane
|
|||
selectTypesButton.addSelectionListener(this);
|
||||
filesOnlyCheckBox.addSelectionListener(this);
|
||||
|
||||
setEditable(editable);
|
||||
return composite_prompts;
|
||||
}
|
||||
private void updateGridData(Control widget, int gridColumns)
|
||||
|
|
|
@ -271,6 +271,7 @@ public class SystemRemoteFolderCombo extends Composite implements ISystemCombo
|
|||
*/
|
||||
public void setEnabled(boolean enabled)
|
||||
{
|
||||
folderLabel.setEnabled(enabled);
|
||||
folderCombo.setEnabled(enabled);
|
||||
browseButton.setEnabled(enabled);
|
||||
}
|
||||
|
|
|
@ -111,6 +111,25 @@ public class SystemProcessFilterStringEditPane extends
|
|||
// INPUT/CONFIGURATION METHODS...
|
||||
// ------------------------------
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
|
||||
*/
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
enable(lblStatus, editable);
|
||||
enable(lblExeName, editable);
|
||||
enable(lblUserName, editable);
|
||||
enable(lblGid, editable);
|
||||
enable(txtExeName, editable);
|
||||
enable(txtUserName, editable);
|
||||
enable(txtGid, editable);
|
||||
enable(lblMinVM, editable);
|
||||
enable(lblMaxVM, editable);
|
||||
enable(txtMinVM, editable);
|
||||
enable(txtMaxVM, editable);
|
||||
enable(chkBoxUnlimitedVM, editable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to override the text limit for the filter name, from the default of 256.
|
||||
*/
|
||||
|
@ -289,6 +308,7 @@ public class SystemProcessFilterStringEditPane extends
|
|||
|
||||
chkBoxUnlimitedVM.addSelectionListener(this);
|
||||
|
||||
setEditable(editable);
|
||||
return composite_prompts;
|
||||
}
|
||||
|
||||
|
|
|
@ -565,8 +565,8 @@ public class SystemChangeFilterPane extends SystemBaseForm
|
|||
listView.setEnabled(false);
|
||||
if (strings.length > 0)
|
||||
editpane.setFilterString(strings[0], 0);
|
||||
editPaneComposite.setEnabled(false);
|
||||
//editpane.setEditable(false);
|
||||
// editPaneComposite.setEnabled(false);
|
||||
editpane.setEditable(false);
|
||||
setPageComplete(true);
|
||||
}
|
||||
else if (!getSupportsMultipleStrings())
|
||||
|
|
|
@ -83,16 +83,18 @@ public class SystemFilterStringEditPane implements SelectionListener
|
|||
protected boolean newMode = true;
|
||||
protected boolean changeFilterMode = false;
|
||||
protected boolean ignoreChanges;
|
||||
//protected boolean editable = true;
|
||||
protected boolean editable = true;
|
||||
|
||||
// default GUI
|
||||
protected Label labelString;
|
||||
protected Text textString;
|
||||
protected Button dlgTestButton;
|
||||
|
||||
// state
|
||||
protected SystemMessage errorMessage;
|
||||
protected boolean skipEventFiring;
|
||||
protected int currentSelectionIndex;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for SystemFilterStringEditPane.
|
||||
|
@ -328,20 +330,43 @@ public class SystemFilterStringEditPane implements SelectionListener
|
|||
System.out.println("Someone forgot to override processTest in SystemFilterStringEditPane!"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/*
|
||||
* Set if the edit pane is not to be editable
|
||||
*
|
||||
public void setEditable(boolean editable)
|
||||
{
|
||||
/**
|
||||
* Sets whether or not the edit pane is not to be editable. May be invoked
|
||||
* atany time prior or after the creation of the controls.
|
||||
* Subclasses should override and enable their own controls appropriately.
|
||||
* <p>
|
||||
* Subclasses should call super to ensure that the "editable" flag is
|
||||
* set properly. Controls which are not instantiated in this call will be ignored.
|
||||
* @param editable true if the controls in this pane are to be editable.
|
||||
* Usually set to true, but if the filter is not modifiable it will be
|
||||
* set to false.
|
||||
*/
|
||||
public void setEditable(boolean editable) {
|
||||
this.editable = editable;
|
||||
}*/
|
||||
enable(labelString, editable);
|
||||
enable(textString, editable);
|
||||
enable(dlgTestButton, editable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the enabled state of a particular control.
|
||||
* @param control the control of which to set the state
|
||||
* @param enabled the enabled state
|
||||
*/
|
||||
protected void enable(Control control, boolean enabled) {
|
||||
if (!(control == null || control.isDisposed())) {
|
||||
control.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether the edit pane is editable, as set by {@link #setEditable(boolean)}
|
||||
*
|
||||
*/
|
||||
public boolean getEditable()
|
||||
{
|
||||
return editable;
|
||||
}*/
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
// DATA EXTRACTION METHODS
|
||||
|
@ -447,7 +472,8 @@ public class SystemFilterStringEditPane implements SelectionListener
|
|||
validateStringInput();
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
setEditable(editable);
|
||||
return composite_prompts;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue