Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 201677 Details for
Bug 183164
[Implementation for] Display of Complex Expressions Containing Bidirectional Text
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Tests after passing ISTextExpert instance as argument to STextTypeHandler methods, and other various changes
patch_bidi_tests_20110817.txt (text/plain), 9.63 KB, created by
Matitiahu Allouche
on 2011-08-17 17:33:43 EDT
(
hide
)
Description:
Tests after passing ISTextExpert instance as argument to STextTypeHandler methods, and other various changes
Filename:
MIME Type:
Creator:
Matitiahu Allouche
Created:
2011-08-17 17:33:43 EDT
Size:
9.63 KB
patch
obsolete
>diff --git src/org/eclipse/equinox/bidi/internal/tests/STextFullToLeanTest.java src/org/eclipse/equinox/bidi/internal/tests/STextFullToLeanTest.java >index ee6edc8..bed6e1f 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/STextFullToLeanTest.java >+++ src/org/eclipse/equinox/bidi/internal/tests/STextFullToLeanTest.java >@@ -68,14 +68,14 @@ > data = "update \"AB_CDE\" set \"COL1\"@='01', \"COL2\"@='02' /* GH IJK"; > text = toUT16(data); > ISTextExpert expertLTR = STextExpertFactory.getPrivateExpert(type, envLTR); >- expertLTR.resetState(); >+ expertLTR.clearState(); > lean = expertLTR.fullToLeanText(text); > > state1 = expertLTR.getState(); > model = "update \"AB_CDE\" set \"COL1\"='01', \"COL2\"='02' /* GH IJK"; > assertEquals(msg + "LTR lean", model, toPseudo(lean)); > ISTextExpert expertLTR2 = STextExpertFactory.getPrivateExpert(type, envLTR); >- expertLTR2.resetState(); >+ expertLTR2.clearState(); > full = expertLTR2.leanToFullText(lean); > > assertEquals(msg + "LTR full", data, toPseudo(full)); >diff --git src/org/eclipse/equinox/bidi/internal/tests/STextMethodsTest.java src/org/eclipse/equinox/bidi/internal/tests/STextMethodsTest.java >index 3429077..9172024 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/STextMethodsTest.java >+++ src/org/eclipse/equinox/bidi/internal/tests/STextMethodsTest.java >@@ -165,13 +165,13 @@ > String data, lean, full, model; > int dirA, dirH; > ISTextExpert expertRL = STextExpertFactory.getExpert("test.MyCommaRL"); >- dirA = expertRL.getCurDirection(toUT16("###")); >- dirH = expertRL.getCurDirection(toUT16("ABC")); >+ dirA = expertRL.getTextDirection(toUT16("###")); >+ dirH = expertRL.getTextDirection(toUT16("ABC")); > assertTrue("TestDirection #1", dirA == RTL && dirH == LTR); > > ISTextExpert expertRR = STextExpertFactory.getExpert("test.MyCommaRR"); >- dirA = expertRR.getCurDirection(toUT16("###")); >- dirH = expertRR.getCurDirection(toUT16("ABC")); >+ dirA = expertRR.getTextDirection(toUT16("###")); >+ dirH = expertRR.getTextDirection(toUT16("ABC")); > assertTrue("TestDirection #2", dirA == RTL && dirH == RTL); > > ISTextExpert expertLL = STextExpertFactory.getExpert("test.MyCommaLL"); >@@ -186,8 +186,8 @@ > > STextEnvironment environment = new STextEnvironment(null, true, STextEnvironment.ORIENT_LTR); > ISTextExpert expert = STextExpertFactory.getExpert("test.MyCommaRL", environment); >- dirA = expert.getCurDirection(toUT16("###")); >- dirH = expert.getCurDirection(toUT16("ABC")); >+ dirA = expert.getTextDirection(toUT16("###")); >+ dirH = expert.getTextDirection(toUT16("ABC")); > assertTrue("TestDirection #10.5", dirA == RTL && dirH == LTR); > > lean = toUT16("ABC,#DEF,HOST,com"); >@@ -231,7 +231,7 @@ > full = expert.leanToFullText(lean); > model = "ABc,|#DEF,HOST,com"; > assertEquals("TestDirection #17 full", model, toPseudo(full)); >- int dir = expert.getCurDirection(lean); >+ int dir = expert.getTextDirection(lean); > assertEquals("Test curDirection", RTL, dir); > } > >diff --git src/org/eclipse/equinox/bidi/internal/tests/STextProcessorTest.java src/org/eclipse/equinox/bidi/internal/tests/STextProcessorTest.java >index abdae5c..3bbec2d 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/STextProcessorTest.java >+++ src/org/eclipse/equinox/bidi/internal/tests/STextProcessorTest.java >@@ -12,9 +12,8 @@ > package org.eclipse.equinox.bidi.internal.tests; > > import java.util.Locale; >+import org.eclipse.equinox.bidi.STextProcessor; > import org.eclipse.equinox.bidi.STextTypeHandlerFactory; >-import org.eclipse.equinox.bidi.STextProcessor; >-import org.eclipse.equinox.bidi.custom.STextTypeHandler; > > /** > * Tests methods in BidiComplexUtil >@@ -84,10 +83,9 @@ > } > > private void doTest3(String msg, String data, String result, String resLean) { >- STextTypeHandler handler = STextTypeHandlerFactory.getHandler(STextTypeHandlerFactory.COMMA_DELIMITED); >- String full = STextProcessor.process(toUT16(data), handler); >+ String full = STextProcessor.processTyped(toUT16(data), STextTypeHandlerFactory.COMMA_DELIMITED); > assertEquals(msg + "full", result, toPseudo(full)); >- String lean = STextProcessor.deprocess(full, handler); >+ String lean = STextProcessor.deprocessTyped(full, STextTypeHandlerFactory.COMMA_DELIMITED); > assertEquals(msg + "lean", resLean, toPseudo(lean)); > } > >@@ -98,7 +96,7 @@ > assertEquals(txt, result, toPseudo(full)); > } > >- public void testBidiComplexUtil() { >+ public void testSTextProcessor() { > > // Test process() and deprocess() with default delimiters > doTest1("ABC/DEF/G", ">@ABC@/DEF@/G@^"); >diff --git src/org/eclipse/equinox/bidi/internal/tests/TestHandler1.java src/org/eclipse/equinox/bidi/internal/tests/TestHandler1.java >index 0e2fff2..d89881a 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/TestHandler1.java >+++ src/org/eclipse/equinox/bidi/internal/tests/TestHandler1.java >@@ -11,20 +11,19 @@ > package org.eclipse.equinox.bidi.internal.tests; > > import org.eclipse.equinox.bidi.advanced.ISTextExpert; >-import org.eclipse.equinox.bidi.advanced.STextEnvironment; > import org.eclipse.equinox.bidi.custom.*; > > public class TestHandler1 extends STextTypeHandler { > >- public int getSpecialsCount(STextEnvironment env) { >+ public int getSpecialsCount(ISTextExpert expert) { > return 1; > } > >- public int indexOfSpecial(STextEnvironment env, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int fromIndex) { >+ public int indexOfSpecial(ISTextExpert expert, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int fromIndex) { > return fromIndex; > } > >- public int processSpecial(ISTextExpert expert, STextEnvironment env, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int separLocation) { >+ public int processSpecial(ISTextExpert expert, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int separLocation) { > int len = text.length(); > for (int i = len - 1; i >= 0; i--) { > STextTypeHandler.insertMark(text, charTypes, offsets, i); >diff --git src/org/eclipse/equinox/bidi/internal/tests/TestHandler2.java src/org/eclipse/equinox/bidi/internal/tests/TestHandler2.java >index acf1f8a..a115631 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/TestHandler2.java >+++ src/org/eclipse/equinox/bidi/internal/tests/TestHandler2.java >@@ -10,12 +10,12 @@ > ******************************************************************************/ > package org.eclipse.equinox.bidi.internal.tests; > >-import org.eclipse.equinox.bidi.advanced.STextEnvironment; >+import org.eclipse.equinox.bidi.advanced.ISTextExpert; > import org.eclipse.equinox.bidi.custom.STextTypeHandler; > > public class TestHandler2 extends STextTypeHandler { > >- public int getSpecialsCount(STextEnvironment env) { >+ public int getSpecialsCount(ISTextExpert expert) { > return 1; > } > >diff --git src/org/eclipse/equinox/bidi/internal/tests/TestHandler3.java src/org/eclipse/equinox/bidi/internal/tests/TestHandler3.java >index 354a8c9..06729b5 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/TestHandler3.java >+++ src/org/eclipse/equinox/bidi/internal/tests/TestHandler3.java >@@ -10,16 +10,16 @@ > ******************************************************************************/ > package org.eclipse.equinox.bidi.internal.tests; > >-import org.eclipse.equinox.bidi.advanced.STextEnvironment; >+import org.eclipse.equinox.bidi.advanced.ISTextExpert; > import org.eclipse.equinox.bidi.custom.*; > > public class TestHandler3 extends STextTypeHandler { > >- public int getSpecialsCount(STextEnvironment env) { >+ public int getSpecialsCount(ISTextExpert expert) { > return 1; > } > >- public int indexOfSpecial(STextEnvironment env, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int fromIndex) { >+ public int indexOfSpecial(ISTextExpert expert, String text, STextCharTypes charTypes, STextOffsets offsets, int caseNumber, int fromIndex) { > return fromIndex; > } > } >diff --git src/org/eclipse/equinox/bidi/internal/tests/TestHandlerMyComma.java src/org/eclipse/equinox/bidi/internal/tests/TestHandlerMyComma.java >index 89688a0..5e06038 100644 >--- src/org/eclipse/equinox/bidi/internal/tests/TestHandlerMyComma.java >+++ src/org/eclipse/equinox/bidi/internal/tests/TestHandlerMyComma.java >@@ -11,7 +11,7 @@ > package org.eclipse.equinox.bidi.internal.tests; > > import org.eclipse.equinox.bidi.STextDirection; >-import org.eclipse.equinox.bidi.advanced.STextEnvironment; >+import org.eclipse.equinox.bidi.advanced.ISTextExpert; > import org.eclipse.equinox.bidi.custom.STextCharTypes; > import org.eclipse.equinox.bidi.custom.STextTypeHandler; > >@@ -29,22 +29,22 @@ > this.dirHebrew = dirHebrew; > } > >- public String getSeparators(STextEnvironment environment) { >+ public String getSeparators(ISTextExpert expert) { > return ","; //$NON-NLS-1$ > } > >- public boolean skipProcessing(STextEnvironment environment, String text, STextCharTypes charTypes) { >+ public boolean skipProcessing(ISTextExpert expert, String text, STextCharTypes charTypes) { > byte charType = charTypes.getBidiTypeAt(0); > if (charType == AL) > return true; > return false; > } > >- public int getDirection(STextEnvironment environment, String text) { >- return getDirection(environment, text, new STextCharTypes(this, environment, text)); >+ public int getDirection(ISTextExpert expert, String text) { >+ return getDirection(expert, text, new STextCharTypes(expert, text)); > } > >- public int getDirection(STextEnvironment environment, String text, STextCharTypes charTypes) { >+ public int getDirection(ISTextExpert expert, String text, STextCharTypes charTypes) { > for (int i = 0; i < text.length(); i++) { > byte charType = charTypes.getBidiTypeAt(i); > if (charType == AL)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ob1.eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 183164
:
148967
|
157821
|
158092
|
158531
|
160015
|
160017
|
160081
|
160698
|
160858
|
162228
|
162229
|
164476
|
186038
|
186054
|
186488
|
186490
|
188406
|
188407
|
188408
|
188627
|
194078
|
194079
|
195082
|
195084
|
196575
|
196576
|
199068
|
199070
|
199113
|
199855
|
200008
|
200389
|
200629
|
200630
|
200631
|
200742
|
200743
|
200803
|
200805
|
200905
|
200907
|
201464
|
201465
|
201467
|
201468
|
201469
|
201470
|
201676
| 201677 |
201785
|
201787
|
202172
|
202173
|
205767
|
205768
|
206588
|
210657