Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 14:07:38 +0000
committerPaul Pazderski2019-05-19 23:54:17 +0000
commitde3c0c5ff08c928e6d1eb4fac2704bbb2d261669 (patch)
treede6e0a11c45731a312b5e239c22387afe93fe19c /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
parent5e9e26b1abe5bd1df37faa91fde2d87fd79ed06b (diff)
downloadeclipse.platform.team-933129a7b39c84397793d4b7c35dd300041ac743.tar.gz
eclipse.platform.team-933129a7b39c84397793d4b7c35dd300041ac743.tar.xz
eclipse.platform.team-933129a7b39c84397793d4b7c35dd300041ac743.zip
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I4149aaf4e48ccf7b49083f36d52e0c7a67433c7d
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java238
1 files changed, 119 insertions, 119 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
index 9085ea2c2..7b0f31291 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
@@ -37,64 +37,64 @@ import org.eclipse.ui.model.BaseWorkbenchContentProvider;
public class ResourceMappingSelectionArea extends DialogArea {
/**
- * Property constant used to indicate that the selected mapping has changed.
- * The object associated with the property is a <code>ResourceMapping</code>.
- */
- public static final String SELECTED_MAPPING = "SelectedMapping"; //$NON-NLS-1$
-
- /**
- * Property constant used to indicate that the checked mappings have changed.
- * The object associated with the property is a <code>ResourceMapping[]</code>
- * (i.e. an array of mappings).
- */
- public static final String CHECKED_MAPPINGS = "CheckedMappings"; //$NON-NLS-1$
-
- private ResourceMapping[] mappings;
- private TableViewer viewer;
- private ResourceMapping[] checkedMappings;
- private ResourceMapping selectedMapping;
- private String description;
+ * Property constant used to indicate that the selected mapping has changed.
+ * The object associated with the property is a <code>ResourceMapping</code>.
+ */
+ public static final String SELECTED_MAPPING = "SelectedMapping"; //$NON-NLS-1$
+
+ /**
+ * Property constant used to indicate that the checked mappings have changed.
+ * The object associated with the property is a <code>ResourceMapping[]</code>
+ * (i.e. an array of mappings).
+ */
+ public static final String CHECKED_MAPPINGS = "CheckedMappings"; //$NON-NLS-1$
+
+ private ResourceMapping[] mappings;
+ private TableViewer viewer;
+ private ResourceMapping[] checkedMappings;
+ private ResourceMapping selectedMapping;
+ private String description;
private boolean supportsChecking;
private boolean supportsSelection;
- public ResourceMappingSelectionArea(ResourceMapping[] mappings, boolean supportSelection, boolean supportChecking) {
- this.mappings = mappings;
- this.supportsChecking = supportChecking;
- this.supportsSelection = supportSelection;
- }
+ public ResourceMappingSelectionArea(ResourceMapping[] mappings, boolean supportSelection, boolean supportChecking) {
+ this.mappings = mappings;
+ this.supportsChecking = supportChecking;
+ this.supportsSelection = supportSelection;
+ }
- @Override
+ @Override
public void createArea(Composite parent) {
- Composite composite = createComposite(parent, 1, true);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- composite.setLayout(layout);
-
- if (description != null)
- createWrappingLabel(composite, description, 1);
-
- createViewer(composite);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 100;
- data.widthHint = 300;
- viewer.getControl().setLayoutData(data);
- viewer.setContentProvider(new BaseWorkbenchContentProvider());
- viewer.setLabelProvider(new ResourceMappingLabelProvider());
- viewer.setInput(new AdaptableList(mappings));
- if (isSupportsSelection()) {
- viewer.addSelectionChangedListener(event -> {
- ResourceMapping oldSelection = selectedMapping;
- selectedMapping = internalGetSelectedMapping();
- if (oldSelection != selectedMapping)
- firePropertyChangeChange(SELECTED_MAPPING, oldSelection, selectedMapping);
+ Composite composite = createComposite(parent, 1, true);
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.verticalSpacing = 0;
+ layout.horizontalSpacing = 0;
+ composite.setLayout(layout);
+
+ if (description != null)
+ createWrappingLabel(composite, description, 1);
+
+ createViewer(composite);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = 100;
+ data.widthHint = 300;
+ viewer.getControl().setLayoutData(data);
+ viewer.setContentProvider(new BaseWorkbenchContentProvider());
+ viewer.setLabelProvider(new ResourceMappingLabelProvider());
+ viewer.setInput(new AdaptableList(mappings));
+ if (isSupportsSelection()) {
+ viewer.addSelectionChangedListener(event -> {
+ ResourceMapping oldSelection = selectedMapping;
+ selectedMapping = internalGetSelectedMapping();
+ if (oldSelection != selectedMapping)
+ firePropertyChangeChange(SELECTED_MAPPING, oldSelection, selectedMapping);
});
- }
- if (isSupportsChecking())
- initializeCheckboxViewer(composite);
- }
+ }
+ if (isSupportsChecking())
+ initializeCheckboxViewer(composite);
+ }
private void initializeCheckboxViewer(Composite composite) {
final CheckboxTableViewer checkboxViewer = getCheckboxTableViewer();
@@ -105,29 +105,29 @@ public class ResourceMappingSelectionArea extends DialogArea {
firePropertyChangeChange(CHECKED_MAPPINGS, oldMappings, checkedMappings);
});
checkboxViewer.setCheckedElements(mappings);
- checkedMappings = mappings;
+ checkedMappings = mappings;
- Composite buttons = createEmbeddedButtonComposite(composite);
+ Composite buttons = createEmbeddedButtonComposite(composite);
- Button selectAll = new Button(buttons, SWT.PUSH);
- selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
- selectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAll.addSelectionListener(new SelectionAdapter() {
- @Override
+ Button selectAll = new Button(buttons, SWT.PUSH);
+ selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
+ selectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
+ selectAll.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- checkboxViewer.setAllChecked(true);
- }
- });
-
- Button deselectAll = new Button(buttons, SWT.PUSH);
- deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
- deselectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
- deselectAll.addSelectionListener(new SelectionAdapter() {
- @Override
+ checkboxViewer.setAllChecked(true);
+ }
+ });
+
+ Button deselectAll = new Button(buttons, SWT.PUSH);
+ deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
+ deselectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
+ deselectAll.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- checkboxViewer.setAllChecked(false);
- }
- });
+ checkboxViewer.setAllChecked(false);
+ }
+ });
}
private void createViewer(Composite composite) {
@@ -144,54 +144,54 @@ public class ResourceMappingSelectionArea extends DialogArea {
return style;
}
- /* private */ ResourceMapping[] internalGetCheckedMappings() {
- Object[] checked = getCheckboxTableViewer().getCheckedElements();
- ResourceMapping[] mappings = new ResourceMapping[checked.length];
- for (int i = 0; i < checked.length; i++) {
- Object object = checked[i];
- mappings[i] = (ResourceMapping)object;
- }
- return mappings;
- }
-
- private Composite createEmbeddedButtonComposite(Composite composite) {
- GridData data;
- Composite buttons = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2; // this is incremented by createButton
- layout.makeColumnsEqualWidth = true;
- layout.marginWidth = 0;
- buttons.setLayout(layout);
- data = new GridData(GridData.HORIZONTAL_ALIGN_END
- | GridData.VERTICAL_ALIGN_CENTER);
- buttons.setLayoutData(data);
- return buttons;
- }
-
- /* private */ ResourceMapping internalGetSelectedMapping() {
- ISelection selection = viewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Object firstElement = ss.getFirstElement();
- if (firstElement instanceof ResourceMapping)
- return (ResourceMapping)firstElement;
- }
- return null;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
- public ResourceMapping[] getCheckedMappings() {
- return checkedMappings;
- }
- public ResourceMapping getSelectedMapping() {
- return selectedMapping;
- }
-
- private CheckboxTableViewer getCheckboxTableViewer() {
- return (CheckboxTableViewer)viewer;
- }
+ /* private */ ResourceMapping[] internalGetCheckedMappings() {
+ Object[] checked = getCheckboxTableViewer().getCheckedElements();
+ ResourceMapping[] mappings = new ResourceMapping[checked.length];
+ for (int i = 0; i < checked.length; i++) {
+ Object object = checked[i];
+ mappings[i] = (ResourceMapping)object;
+ }
+ return mappings;
+ }
+
+ private Composite createEmbeddedButtonComposite(Composite composite) {
+ GridData data;
+ Composite buttons = new Composite(composite, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2; // this is incremented by createButton
+ layout.makeColumnsEqualWidth = true;
+ layout.marginWidth = 0;
+ buttons.setLayout(layout);
+ data = new GridData(GridData.HORIZONTAL_ALIGN_END
+ | GridData.VERTICAL_ALIGN_CENTER);
+ buttons.setLayoutData(data);
+ return buttons;
+ }
+
+ /* private */ ResourceMapping internalGetSelectedMapping() {
+ ISelection selection = viewer.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection) selection;
+ Object firstElement = ss.getFirstElement();
+ if (firstElement instanceof ResourceMapping)
+ return (ResourceMapping)firstElement;
+ }
+ return null;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public ResourceMapping[] getCheckedMappings() {
+ return checkedMappings;
+ }
+ public ResourceMapping getSelectedMapping() {
+ return selectedMapping;
+ }
+
+ private CheckboxTableViewer getCheckboxTableViewer() {
+ return (CheckboxTableViewer)viewer;
+ }
public boolean isSupportsChecking() {
return supportsChecking;

Back to the top