Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-01-06 17:00:27 +0000
committerLars Vogel2020-01-10 17:26:00 +0000
commit63b8675b50a5094edf7ad9afda0d0d870c3143af (patch)
tree752b1bdda8b7462a72750b56fb25ca5bee6ff01b
parent0b9aa5167dcea73caedd6a87b4ba9b9d4884a218 (diff)
downloadeclipse.platform.text-63b8675b50a5094edf7ad9afda0d0d870c3143af.tar.gz
eclipse.platform.text-63b8675b50a5094edf7ad9afda0d0d870c3143af.tar.xz
eclipse.platform.text-63b8675b50a5094edf7ad9afda0d0d870c3143af.zip
Removes unnecessary whitespace from text repositoryI20200113-0130I20200112-1800I20200111-1800
Change-Id: Ie5da7fb237e8ae43d872c0cb77c6b87dd547e5ce Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextPresentationTest.java2
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AbstractContentAssistTest.java10
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationPresenterTest.java12
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationTest.java64
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/DocumentLineDifferTest.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java8
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java32
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapPageTest.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapWidgetTest.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/revisions/ChangeRegionTest.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/DAGTest.java4
12 files changed, 72 insertions, 72 deletions
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextPresentationTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextPresentationTest.java
index 8e70ca0c0..11471da79 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextPresentationTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextPresentationTest.java
@@ -1252,7 +1252,7 @@ public class TextPresentationTest {
shell.dispose();
}
}
-
+
@Test
public void testIterator() {
// Test read over iterator end
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AbstractContentAssistTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AbstractContentAssistTest.java
index dbdc27034..797553414 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AbstractContentAssistTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/AbstractContentAssistTest.java
@@ -51,7 +51,7 @@ public class AbstractContentAssistTest {
private SourceViewer viewer;
private ContentAssistant assistant;
private Document document;
-
+
private Button button;
@@ -71,21 +71,21 @@ public class AbstractContentAssistTest {
shell= new Shell();
shell.setSize(500, 280);
shell.setLayout(new GridLayout());
-
+
viewer= new SourceViewer(shell, null, SWT.NONE);
viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
assistant= contentAssistant;
viewer.configure(createSourceViewerConfiguration());
-
+
document= new Document();
if (initialText != null) {
document.set(initialText);
}
viewer.setDocument(document);
-
+
button= new Button(shell, SWT.PUSH);
button.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
+
shell.open();
Assert.assertTrue(new DisplayHelper() {
@Override
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationPresenterTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationPresenterTest.java
index 31fa47066..3d69a7ba6 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationPresenterTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationPresenterTest.java
@@ -51,7 +51,7 @@ public class ContextInformationPresenterTest extends AbstractContentAssistTest {
if (info == null) { // Ignore unknown information
return false;
}
-
+
int begin= info.getContextInformationPosition();
int end= begin + info.getContextDisplayString().length();
boolean style= (offset >= begin && offset <= end);
@@ -88,22 +88,22 @@ public class ContextInformationPresenterTest extends AbstractContentAssistTest {
@Test
public void testContextInfo_withStyledTextPresentation() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL);
-
+
final List<Shell> beforeShells= getCurrentShells();
-
+
postSourceViewerKeyEvent(SWT.ARROW_RIGHT, 0, SWT.KeyDown);
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
assertArrayEquals(new StyleRange[] {
new StyleRange(0, 3, null, null, SWT.BOLD)
}, getInfoStyleRanges(this.infoShell));
-
+
emulatePressArrowKey(SWT.ARROW_RIGHT);
-
+
assertEquals("idx= 0", getInfoText(this.infoShell));
assertArrayEquals(new StyleRange[] {
}, getInfoStyleRanges(this.infoShell));
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationTest.java
index 27a1f96c7..ce0d04f72 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/contentassist/ContextInformationTest.java
@@ -47,19 +47,19 @@ public class ContextInformationTest extends AbstractContentAssistTest {
@Test
public void testContextInfo() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL);
-
+
final List<Shell> beforeShells= getCurrentShells();
-
+
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
selectAndReveal(8, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 1", getInfoText(this.infoShell));
@@ -68,47 +68,47 @@ public class ContextInformationTest extends AbstractContentAssistTest {
@Test
public void testContextInfo_hide_Bug512251() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL);
-
+
final List<Shell> beforeShells= getCurrentShells();
-
+
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
-
+
selectAndReveal(8, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
-
+
// ITextEditorActionConstants.DELETE_LINE
getDocument().set("");
-
+
new Accessor(getContentAssistant(), ContentAssistant.class).invoke("hide", new Object[0]);
}
@Test
public void testContextInfo_hide_focusOut() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL);
-
+
final List<Shell> beforeShells = getCurrentShells();
-
+
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
selectAndReveal(8, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 1", getInfoText(this.infoShell));
-
+
// Hide all
getButton().setFocus();
processEvents();
@@ -118,28 +118,28 @@ public class ContextInformationTest extends AbstractContentAssistTest {
@Test
public void testContextInfo_hide_keyEsc() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL);
-
+
final List<Shell> beforeShells = getCurrentShells();
-
+
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
selectAndReveal(8, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 1", getInfoText(this.infoShell));
-
+
emulatePressEscKey();
processEvents();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
emulatePressEscKey();
processEvents();
assertTrue(this.infoShell.isDisposed() || !this.infoShell.isVisible());
@@ -148,28 +148,28 @@ public class ContextInformationTest extends AbstractContentAssistTest {
@Test
public void testContextInfo_hide_validRange() throws Exception {
setupSourceViewer(createBarContentAssist(), BarContentAssistProcessor.PROPOSAL + '\n');
-
+
final List<Shell> beforeShells = getCurrentShells();
-
+
selectAndReveal(4, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
selectAndReveal(8, 0);
processEvents();
-
+
triggerContextInformation();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 1", getInfoText(this.infoShell));
-
+
emulatePressArrowKey(SWT.ARROW_LEFT);
processEvents();
this.infoShell= findNewShell(beforeShells);
assertEquals("idx= 0", getInfoText(this.infoShell));
-
+
emulatePressArrowKey(SWT.ARROW_DOWN);
processEvents();
assertTrue(this.infoShell.isDisposed() || !this.infoShell.isVisible());
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
index ab7d959ef..068a8d769 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
@@ -119,7 +119,7 @@ public abstract class TemplateContext implements IAdaptable {
* in this context, <code>false</code> otherwise
*/
public abstract boolean canEvaluate(Template template);
-
+
/**
* Default implementation does nothing, clients can override to provide adapters.
* {@inheritDoc}
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/DocumentLineDifferTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/DocumentLineDifferTest.java
index 69d4b1ca0..ad366014d 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/DocumentLineDifferTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/DocumentLineDifferTest.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
-*
+*
* Contributors:
* Etienne Reichenbach - initial implementation
*******************************************************************************/
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
index 4289df859..0cef0d632 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
@@ -191,7 +191,7 @@ public class FindReplaceDialogTest {
event.doit= true;
findField.traverse(SWT.TRAVERSE_RETURN, event);
runEventQueue();
-
+
Shell shell= ((Shell)fFindReplaceDialog.get("fActiveShell"));
if (shell == null && Util.isGtk()) {
if (ScreenshotTest.isRunByGerritHudsonJob()) {
@@ -200,7 +200,7 @@ public class FindReplaceDialogTest {
} else
fail("this test does not work on GTK unless the runtime workbench has focus. Screenshot: " + takeScreenshot());
}
-
+
if (Util.isMac())
/* On the Mac, checkboxes only take focus if "Full Keyboard Access" is enabled in the System Preferences.
* Let's not assume that someone pressed Ctrl+F7 on every test machine... */
@@ -231,7 +231,7 @@ public class FindReplaceDialogTest {
public void testFocusNotChangedWhenButtonMnemonicPressed() {
if (Util.isMac())
return; // Mac doesn't support mnemonics.
-
+
openTextViewerAndFindReplaceDialog();
Combo findField= (Combo)fFindReplaceDialog.get("fFindField");
@@ -246,7 +246,7 @@ public class FindReplaceDialogTest {
return;
} else
fail("this test does not work on GTK unless the runtime workbench has focus. Screenshot: " + takeScreenshot());
-
+
Button wrapSearchBox= (Button)fFindReplaceDialog.get("fWrapCheckBox");
wrapSearchBox.setFocus();
event.detail= SWT.TRAVERSE_MNEMONIC;
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
index 34dfad097..c38345e45 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
@@ -51,9 +51,9 @@ public class ScreenshotTest {
public void testWindowsTaskManagerScreenshots() throws Exception {
if (! Util.isWindows())
return;
-
+
Display display= Display.getDefault();
-
+
Event event= new Event();
event.type= SWT.KeyDown;
event.keyCode= SWT.CTRL;
@@ -63,7 +63,7 @@ public class ScreenshotTest {
event.character= SWT.ESC;
event.keyCode= SWT.ESC;
System.out.println("* ESC " + display.post(event));
-
+
event.type= SWT.KeyUp;
System.out.println("* ESC up " + display.post(event));
event.character= 0;
@@ -71,33 +71,33 @@ public class ScreenshotTest {
System.out.println("* SHIFT up " + display.post(event));
event.keyCode= SWT.CTRL;
System.out.println("* CTRL up " + display.post(event));
-
+
runEventQueue();
takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 2, System.out);
-
+
event.type= SWT.KeyDown;
event.character= SWT.ESC;
event.keyCode= SWT.ESC;
System.out.println("* ESC " + display.post(event));
event.type= SWT.KeyUp;
System.out.println("* ESC up " + display.post(event));
-
+
runEventQueue();
takeScreenshot(ScreenshotTest.class, testName.getMethodName() + 3, System.out);
}
-
+
/**
* Takes a screenshot and dumps other debugging information to the given stream.
- *
+ *
* <p>
* Workaround for missing {@link junit.framework.TestCase#getName()} in JUnit 4:
* </p>
- *
+ *
* <pre>
* &#64;Rule
* public TestName testName = new TestName();
* </pre>
- *
+ *
* @param testClass test class that takes the screenshot
* @param name screenshot identifier (e.g. test name)
* @param out print stream to use for diagnostics.
@@ -105,7 +105,7 @@ public class ScreenshotTest {
*/
public static String takeScreenshot(Class<?> testClass, String name, PrintStream out) {
File resultsHtmlDir= getJunitReportOutput(); // ends up in testresults/linux.gtk.x86_6.0/<class>.<test>.png
-
+
if (resultsHtmlDir == null) { // Fallback. Warning: uses same file location on all test platforms:
File eclipseDir= new File("").getAbsoluteFile(); // eclipse-testing/test-eclipse/eclipse
if (isRunByGerritHudsonJob())
@@ -113,12 +113,12 @@ public class ScreenshotTest {
else
resultsHtmlDir= new File(eclipseDir, "../../results/html/").getAbsoluteFile(); // ends up in testresults/html/<class>.<test>.png
}
-
+
Display display= PlatformUI.getWorkbench().getDisplay();
-
+
// Dump focus control, parents, and shells:
dumpDisplayState(display, System.out);
-
+
// Take a screenshot:
GC gc = new GC(display);
Rectangle displayBounds= display.getBounds();
@@ -129,7 +129,7 @@ public class ScreenshotTest {
resultsHtmlDir.mkdirs();
String filename = new File(
- resultsHtmlDir.getAbsolutePath(),
+ resultsHtmlDir.getAbsolutePath(),
testClass.getName() + "." + name + ".png").getAbsolutePath();
ImageLoader loader = new ImageLoader();
loader.data = new ImageData[] { image.getImageData() };
@@ -173,7 +173,7 @@ public class ScreenshotTest {
} while (control != null);
}
}
-
+
private static File getJunitReportOutput() {
String[] args= Platform.getCommandLineArgs();
for (int i= 0; i < args.length - 1; i++) {
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapPageTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapPageTest.java
index 9844fd90c..0c9f94ad3 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapPageTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapPageTest.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.texteditor.StatusTextEditor;
/**
* Test create of Minimap page which is possible only if {@link ITextViewer} can be get from the
* {@link ITextEditor}.
- *
+ *
* @since 3.11
*/
public class MinimapPageTest {
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapWidgetTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapWidgetTest.java
index 60b307660..8c302236f 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapWidgetTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/minimap/MinimapWidgetTest.java
@@ -32,14 +32,14 @@ import org.eclipse.ui.internal.views.minimap.MinimapWidget;
/**
* Minimap widget tests to check that changed of {@link ITextViewer} of the editor update the
* {@link StyledText} of the Minimap:
- *
+ *
* <ul>
* <li>check that {@link StyledText} content of minimap is synchronized with the text of the
* {@link ITextViewer} of the editor.</li>
* <li>check that {@link StyledText} styles of minimap is synchronized with the styles of the
* {@link ITextViewer} of the editor.</li>
* </ul>
- *
+ *
* @since 3.11
*/
public class MinimapWidgetTest {
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/revisions/ChangeRegionTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/revisions/ChangeRegionTest.java
index 0ce4d0b21..6fbff8400 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/revisions/ChangeRegionTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/revisions/ChangeRegionTest.java
@@ -240,7 +240,7 @@ public class ChangeRegionTest {
RangeUtil.assertEqualSingleRange(new LineRange(12, 5), r.getAdjustedRanges());
RangeUtil.assertEqualRange(new LineRange(12, 5), r.getAdjustedCoverage());
}
-
+
@Test
public void testHunkOverStart() throws Exception {
ChangeRegion r;
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/DAGTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/DAGTest.java
index 5f5763053..0e4e0348b 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/DAGTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/rulers/DAGTest.java
@@ -48,7 +48,7 @@ public class DAGTest {
assertTrue(fDag.getSources().isEmpty());
assertTrue(fDag.getSinks().isEmpty());
}
-
+
@Test
public void testIllegal() throws Exception {
assertFalse(fDag.addEdge(A, A));
@@ -73,7 +73,7 @@ public class DAGTest {
} catch (RuntimeException x) {
}
}
-
+
@Test
public void testDag() throws Exception {
assertTrue(fDag.addEdge(A, B));

Back to the top