Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 17:05:03 +0000
committerPaul Pazderski2019-06-14 22:34:53 +0000
commit7051049221c9d3b99ff179f167fa09a6e02138ee (patch)
tree21704e08b4c470f16f4fece637154f86fce96cc8 /bundles/org.eclipse.swt.tools
parenta1b9b9e1accf9dfece07675d7919a6f4e6561891 (diff)
downloadeclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.tar.gz
eclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.tar.xz
eclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.zip
Bug 547304 - [cleanup] Fix wrong space/tab indentation
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: Ib7b260691acee06845cc580dd8cb859de0da8bf1
Diffstat (limited to 'bundles/org.eclipse.swt.tools')
-rw-r--r--bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java26
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java4
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java2
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java4
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java4
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java78
6 files changed, 59 insertions, 59 deletions
diff --git a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
index 547a8dc03e..27e488390b 100644
--- a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
+++ b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
@@ -28,11 +28,11 @@ import org.eclipse.swt.*;
*/
public class IconExe {
- /**
+ /**
* Replace the Desktop icons provided in the Windows executable program
* with matching icons provided by the user.
*
- * Takes 2 arguments
+ * Takes 2 arguments
* argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
* argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
*
@@ -258,7 +258,7 @@ void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffse
}
}
}
- }
+ }
}
static ImageData parseIcon(RandomAccessFile raf, int offset) throws IOException {
@@ -2616,13 +2616,13 @@ static class LEDataInputStream extends InputStream {
}
/**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
+ * Reads at most <code>length</code> bytes from this LEDataInputStream and
+ * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+ * <p>
+ * Answer the number of bytes actually read or -1 if no bytes were read and
+ * end of stream was encountered. This implementation reads bytes from
+ * the pushback buffer first, then the target stream if more bytes are required
+ * to satisfy <code>count</code>.
* </p>
* @param buffer the byte array in which to store the read bytes.
* @param offset the offset in <code>buffer</code> to store the read bytes.
@@ -2635,9 +2635,9 @@ static class LEDataInputStream extends InputStream {
private int readData(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) throw new IOException();
if (offset < 0 || offset > buffer.length ||
- length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
+ length < 0 || (length > buffer.length - offset)) {
+ throw new ArrayIndexOutOfBoundsException();
+ }
int cacheCopied = 0;
int newOffset = offset;
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
index 43a9e7035e..d582f8f1b0 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
@@ -37,8 +37,8 @@ String[] getArgNames(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
String[] names = new String[n_args];
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
index 19f1147190..d065dbd5e5 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
@@ -27,7 +27,7 @@ String getFieldValue(JNIField field) {
int equalsIndex = classSource.indexOf("=", index);
if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) {
int semiIndex = classSource.indexOf(";", equalsIndex);
- return classSource.substring(equalsIndex + 1, semiIndex).trim();
+ return classSource.substring(equalsIndex + 1, semiIndex).trim();
}
}
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
index e70a747a6f..c0157d9d08 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
@@ -35,8 +35,8 @@ String getParams(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
return params;
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
index b027247330..9a20291627 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
@@ -200,8 +200,8 @@ String getParamName(Node param, int i) {
if (swtName != null) {
paramName = swtName.getNodeValue();
} else {
- Node node = paramAttributes.getNamedItem("name");
- if (node != null) paramName = node.getNodeValue();
+ Node node = paramAttributes.getNamedItem("name");
+ if (node != null) paramName = node.getNodeValue();
}
if (paramName.length() == 0) {
Node node = paramAttributes.getNamedItem("index");
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
index 918d05bb35..f371d127fc 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
@@ -68,25 +68,25 @@ public class MacGeneratorUI {
}
void checkPath(TreeItem item, boolean checked, boolean grayed) {
- if (item == null) return;
- if (grayed) {
- checked = true;
- } else {
- int index = 0;
- TreeItem[] items = item.getItems();
- while (index < items.length) {
- TreeItem child = items[index];
- if (child.getGrayed() || checked != child.getChecked()) {
- checked = grayed = true;
- break;
- }
- index++;
- }
- }
- item.setChecked(checked);
- item.setGrayed(grayed);
- updateGenAttribute(item);
- checkPath(item.getParentItem(), checked, grayed);
+ if (item == null) return;
+ if (grayed) {
+ checked = true;
+ } else {
+ int index = 0;
+ TreeItem[] items = item.getItems();
+ while (index < items.length) {
+ TreeItem child = items[index];
+ if (child.getGrayed() || checked != child.getChecked()) {
+ checked = grayed = true;
+ break;
+ }
+ index++;
+ }
+ }
+ item.setChecked(checked);
+ item.setGrayed(grayed);
+ updateGenAttribute(item);
+ checkPath(item.getParentItem(), checked, grayed);
}
void checkItem(Node node, TreeItem item) {
@@ -139,22 +139,22 @@ public class MacGeneratorUI {
}
void checkItems(TreeItem item, boolean checked) {
- item.setGrayed(false);
- item.setChecked(checked);
- updateGenAttribute(item);
- TreeItem[] items = item.getItems();
- if (items.length == 1 && items[0].getData() == null) {
- /* Update model only if view is not created */
+ item.setGrayed(false);
+ item.setChecked(checked);
+ updateGenAttribute(item);
+ TreeItem[] items = item.getItems();
+ if (items.length == 1 && items[0].getData() == null) {
+ /* Update model only if view is not created */
Node node = (Node)item.getData();
NodeList childNodes = node.getChildNodes();
for (int i = 0, length = childNodes.getLength(); i < length; i++) {
checkNodes(childNodes.item(i), checked);
}
- } else {
- for (int i = 0; i < items.length; i++) {
- checkItems(items[i], checked);
- }
- }
+ } else {
+ for (int i = 0; i < items.length; i++) {
+ checkItems(items[i], checked);
+ }
+ }
}
void checkNodes(Node node, boolean checked) {
@@ -209,9 +209,9 @@ public class MacGeneratorUI {
}
boolean checked = item.getChecked();
item.getParent().setRedraw(false);
- checkItems(item, checked);
- checkPath(item.getParentItem(), checked, false);
- item.getParent().setRedraw(true);
+ checkItems(item, checked);
+ checkPath(item.getParentItem(), checked, false);
+ item.getParent().setRedraw(true);
});
nodesTree.addListener(SWT.Expand, event -> checkChildren((TreeItem)event.item));
@@ -403,8 +403,8 @@ public class MacGeneratorUI {
}
Document[] documents = gen.getDocuments();
if (node == null && documents.length > 0) {
- int index = 0;
- while (index < documents.length && (node = documents[index]) == null) index++;
+ int index = 0;
+ while (index < documents.length && (node = documents[index]) == null) index++;
}
if (flatNodes == null) {
flatNodes = new ArrayList<>();
@@ -564,10 +564,10 @@ public class MacGeneratorUI {
gen.setXmls(null);
flatNodes = null;
nodesTree.getDisplay().asyncExec(() -> {
- if (nodesTree == null || nodesTree.isDisposed()) return;
- nodesTree.removeAll();
- attribTable.removeAll();
- updateNodes();
+ if (nodesTree == null || nodesTree.isDisposed()) return;
+ nodesTree.removeAll();
+ attribTable.removeAll();
+ updateNodes();
});
}

Back to the top