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 160015 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]
Minor additions/changes to the API and corresponding code changes
patch_bidi_20100224.txt (text/plain), 6.44 KB, created by
Matitiahu Allouche
on 2010-02-23 19:07:19 EST
(
hide
)
Description:
Minor additions/changes to the API and corresponding code changes
Filename:
MIME Type:
Creator:
Matitiahu Allouche
Created:
2010-02-23 19:07:19 EST
Size:
6.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.bidi >Index: src/org/eclipse/equinox/bidi/complexp/IComplExpProcessor.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/components/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/complexp/IComplExpProcessor.java,v >retrieving revision 1.2 >diff -u -r1.2 IComplExpProcessor.java >--- src/org/eclipse/equinox/bidi/complexp/IComplExpProcessor.java 3 Feb 2010 20:00:59 -0000 1.2 >+++ src/org/eclipse/equinox/bidi/complexp/IComplExpProcessor.java 23 Feb 2010 23:27:09 -0000 >@@ -366,6 +366,22 @@ > */ > public int fullToLeanPos(int pos); > >+ /** Set the operators which separate a complex expression into tokens. >+ * >+ * @param operators is a string where each character is an operator. >+ * >+ * @see #getOperators >+ */ >+ public void setOperators(String operators); >+ >+ /** Get the operators which separate a complex expression into tokens. >+ * >+ * @return a string where each character is an operator. >+ * >+ * @see #getOperators >+ */ >+ public String getOperators(); >+ > /** Specify whether the GUI where the complex expression will be displayed > * is mirrored (is laid out from right to left). The value specified in > * this method overrides the default assumed for all complex expressions >@@ -430,7 +446,7 @@ > * {@link #leanToFullText leanToFullText} does not add any directional > * formatting characters as either prefix or suffix of the <i>full</i> text. > * >- * @param desiredOrientation orientation of the GUI component where the >+ * @param componentOrientation orientation of the GUI component where the > * complex expression will be displayed. It must be one of the > * values {@link #ORIENT_LTR}, {@link #ORIENT_RTL}, > * {@link #ORIENT_CONTEXTUAL_LTR}, {@link #ORIENT_CONTEXTUAL_RTL}, >@@ -438,7 +454,7 @@ > * > * @see #recallOrientation > */ >- public void assumeOrientation(int desiredOrientation); >+ public void assumeOrientation(int componentOrientation); > > /** Retrieve the value currently assumed for the orientation. > * >Index: src/org/eclipse/equinox/bidi/internal/complexp/ComplExpBasic.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/components/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/complexp/ComplExpBasic.java,v >retrieving revision 1.1 >diff -u -r1.1 ComplExpBasic.java >--- src/org/eclipse/equinox/bidi/internal/complexp/ComplExpBasic.java 3 Feb 2010 20:01:02 -0000 1.1 >+++ src/org/eclipse/equinox/bidi/internal/complexp/ComplExpBasic.java 23 Feb 2010 23:27:09 -0000 >@@ -69,7 +69,7 @@ > * Type of the complex expression processor specified when calling > * {@link ComplExpUtil#create} > */ >- protected int type; >+ protected String type; > > /** > * Base direction of the complex expression. This is an array such that >@@ -187,8 +187,14 @@ > locations = new int[operCount]; > } > >- public void setType(int expressionType) { >- type = expressionType; >+ public void setOperators(String operators) { >+ this.operators = operators.toCharArray(); >+ operCount = this.operators.length; >+ locations = new int[operCount + specialsCount]; >+ } >+ >+ public String getOperators() { >+ return new String(operators); > } > > /** >@@ -285,7 +291,8 @@ > * of this number is internal to the class implementing > * <code>indexOfSpecial</code>. > * >- * @param text text of the complex expression. >+ * @param leanText text of the complex expression before addition of any >+ * directional formatting characters. > * > * @param fromIndex the index within <code>leanText</code> to start > * the search from. >@@ -302,7 +309,7 @@ > * In <code>ComplExpBasic</code> this method always returns -1. > * > */ >- protected int indexOfSpecial(int whichSpecial, String text, int fromIndex) { >+ protected int indexOfSpecial(int whichSpecial, String leanText, int fromIndex) { > // This method must be overridden by all subclasses with special cases. > return -1; > } >@@ -866,7 +873,7 @@ > if (dirProp == L || dirProp == R || dirProp == AL || dirProp == EN || dirProp == AN) > index = offset - 1; > else >- // if the current char is a neutral, we change its own dirProp >+ // if the current char is a neutral, we change its own dirProp > index = offset; > setMarkAndFixes(); > setDirProp(index, curStrong); >@@ -931,10 +938,11 @@ > return mirrored; > } > >- public void assumeOrientation(int desiredOrientation) { >- if (desiredOrientation < ORIENT_LTR || desiredOrientation > ORIENT_IGNORE) >+ public void assumeOrientation(int componentOrientation) { >+ if (componentOrientation < ORIENT_LTR || componentOrientation > ORIENT_IGNORE) > orientation = ORIENT_UNKNOWN; // TBD should throw new IllegalArgumentException()? >- orientation = desiredOrientation; >+ else >+ orientation = componentOrientation; > } > > public int recallOrientation() { >Index: src/org/eclipse/equinox/bidi/internal/complexp/ComplExpDoNothing.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/components/bundles/org.eclipse.equinox.bidi/src/org/eclipse/equinox/bidi/internal/complexp/ComplExpDoNothing.java,v >retrieving revision 1.1 >diff -u -r1.1 ComplExpDoNothing.java >--- src/org/eclipse/equinox/bidi/internal/complexp/ComplExpDoNothing.java 3 Feb 2010 20:01:02 -0000 1.1 >+++ src/org/eclipse/equinox/bidi/internal/complexp/ComplExpDoNothing.java 23 Feb 2010 23:27:09 -0000 >@@ -25,6 +25,7 @@ > // TBD is this needed? > public class ComplExpDoNothing implements IComplExpProcessor { > >+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$ > private static final int[] EMPTY_INT_ARRAY = new int[0]; > private static final int[][] ALL_LTR = new int[][] { {DIRECTION_LTR, DIRECTION_LTR}, {DIRECTION_LTR, DIRECTION_LTR}}; > >@@ -42,6 +43,22 @@ > * For class <code>ComplExpDoNothing</code> > * this method does nothing. > */ >+ public void setOperators(String operators) { >+ // empty >+ } >+ >+ /** >+ * For class <code>ComplExpDoNothing</code> >+ * this method returns a zero-length string. >+ */ >+ public String getOperators() { >+ return EMPTY_STRING; >+ } >+ >+ /** >+ * For class <code>ComplExpDoNothing</code> >+ * this method does nothing. >+ */ > public void selectBidiScript(boolean arabic, boolean hebrew) { > // empty > }
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