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 /org.eclipse.jface.text.tests
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>
Diffstat (limited to 'org.eclipse.jface.text.tests')
-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
4 files changed, 44 insertions, 44 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 8e70ca0c028..11471da7937 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 dbdc2703459..79755341478 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 31fa47066ab..3d69a7ba675 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 27a1f96c79d..ce0d04f72e6 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());

Back to the top