mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[234045] [ftp] Errors while changing file permissions are not displayed to the user
This commit is contained in:
parent
6389cecf6c
commit
df7def8369
1 changed files with 31 additions and 10 deletions
|
@ -37,6 +37,8 @@ import org.eclipse.rse.ui.SystemBasePlugin;
|
||||||
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
import org.eclipse.rse.ui.SystemWidgetHelpers;
|
||||||
import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
|
import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
|
import org.eclipse.swt.events.SelectionListener;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -50,7 +52,7 @@ import org.eclipse.swt.widgets.Text;
|
||||||
* Property page for viewing and changing the user, group and permissions
|
* Property page for viewing and changing the user, group and permissions
|
||||||
* for a particular file.
|
* for a particular file.
|
||||||
* */
|
* */
|
||||||
public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage implements SelectionListener {
|
||||||
|
|
||||||
private Button _userRead;
|
private Button _userRead;
|
||||||
private Button _userWrite;
|
private Button _userWrite;
|
||||||
|
@ -128,50 +130,59 @@ public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_userRead.setLayoutData(data);
|
_userRead.setLayoutData(data);
|
||||||
|
_userRead.addSelectionListener(this);
|
||||||
|
|
||||||
_userWrite = new Button(permissionsGroup, SWT.CHECK);
|
_userWrite = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_userWrite.setLayoutData(data);
|
_userWrite.setLayoutData(data);
|
||||||
|
_userWrite.addSelectionListener(this);
|
||||||
|
|
||||||
_userExecute = new Button(permissionsGroup, SWT.CHECK);
|
_userExecute = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_userExecute.setLayoutData(data);
|
_userExecute.setLayoutData(data);
|
||||||
|
_userExecute.addSelectionListener(this);
|
||||||
|
|
||||||
Label groupLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
|
Label groupLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
|
||||||
|
|
||||||
_groupRead = new Button(permissionsGroup, SWT.CHECK);
|
_groupRead = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_groupRead.setLayoutData(data);
|
_groupRead.setLayoutData(data);
|
||||||
|
_groupRead.addSelectionListener(this);
|
||||||
|
|
||||||
_groupWrite = new Button(permissionsGroup, SWT.CHECK);
|
_groupWrite = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_groupWrite.setLayoutData(data);
|
_groupWrite.setLayoutData(data);
|
||||||
|
_groupWrite.addSelectionListener(this);
|
||||||
|
|
||||||
_groupExecute = new Button(permissionsGroup, SWT.CHECK);
|
_groupExecute = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_groupExecute.setLayoutData(data);
|
_groupExecute.setLayoutData(data);
|
||||||
|
_groupExecute.addSelectionListener(this);
|
||||||
|
|
||||||
Label otherLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_OTHERS_LABEL);
|
Label otherLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_OTHERS_LABEL);
|
||||||
_otherRead = new Button(permissionsGroup, SWT.CHECK);
|
_otherRead = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_otherRead.setLayoutData(data);
|
_otherRead.setLayoutData(data);
|
||||||
|
_otherRead.addSelectionListener(this);
|
||||||
|
|
||||||
_otherWrite = new Button(permissionsGroup, SWT.CHECK);
|
_otherWrite = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_otherWrite.setLayoutData(data);
|
_otherWrite.setLayoutData(data);
|
||||||
|
_otherWrite.addSelectionListener(this);
|
||||||
|
|
||||||
_otherExecute = new Button(permissionsGroup, SWT.CHECK);
|
_otherExecute = new Button(permissionsGroup, SWT.CHECK);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalIndent = 20;
|
data.horizontalIndent = 20;
|
||||||
_otherExecute.setLayoutData(data);
|
_otherExecute.setLayoutData(data);
|
||||||
|
_otherExecute.addSelectionListener(this);
|
||||||
|
|
||||||
Group ownerGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, FileResources.RESID_PREF_PERMISSIONS_OWNERSHIP_LABEL);
|
Group ownerGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, FileResources.RESID_PREF_PERMISSIONS_OWNERSHIP_LABEL);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalSpan = 1;
|
data.horizontalSpan = 1;
|
||||||
|
@ -188,13 +199,13 @@ public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
||||||
data.widthHint = 100;
|
data.widthHint = 100;
|
||||||
_userEntry.setLayoutData(data);
|
_userEntry.setLayoutData(data);
|
||||||
|
|
||||||
|
|
||||||
Label groupOwnerLabel = SystemWidgetHelpers.createLabel(ownerGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
|
Label groupOwnerLabel = SystemWidgetHelpers.createLabel(ownerGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
|
||||||
_groupEntry = new Text(ownerGroup, SWT.BORDER);
|
_groupEntry = new Text(ownerGroup, SWT.BORDER);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.widthHint = 100;
|
data.widthHint = 100;
|
||||||
_groupEntry.setLayoutData(data);
|
_groupEntry.setLayoutData(data);
|
||||||
|
|
||||||
|
|
||||||
initFields();
|
initFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +319,7 @@ public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
{
|
{
|
||||||
setMessage(e.getSystemMessage());
|
setErrorMessage(e.getSystemMessage());
|
||||||
}
|
}
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
@ -413,11 +424,12 @@ public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e){
|
catch (SystemMessageException e){
|
||||||
setMessage(e.getSystemMessage());
|
setErrorMessage(e.getSystemMessage());
|
||||||
|
performDefaults();
|
||||||
}
|
}
|
||||||
catch (CloneNotSupportedException e){
|
catch (CloneNotSupportedException e){
|
||||||
// unexpected, not showing but logging
|
// unexpected, not showing but logging
|
||||||
SystemBasePlugin.logError(e.getMessage());
|
SystemBasePlugin.logError(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,4 +483,13 @@ public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
|
||||||
}
|
}
|
||||||
super.setVisible(visible);
|
super.setVisible(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
clearErrorMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue