bugKawa - Bugs: bug #33140, ant task jemacs-swt-classes does...

 
 

bug #33140: ant task jemacs-swt-classes does not build successfully

Submitted by:  Shad Gregory <shadgregory>
Submitted on:  Thu 21 Apr 2011 08:39:27 PM UTC  
 
Category: JEmacsSeverity: 3 - Normal
Item Group: Problem building KawaStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 01 May 2011 04:50:14 PM UTC, comment #7:

I checked in the patch. Thanks!

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sun 01 May 2011 03:56:22 AM UTC, comment #6:

The last patch looks good.

Shad Gregory <shadgregory>
Sat 30 Apr 2011 06:10:38 AM UTC, comment #5:

Could you try the attached swt3.patch?

(file #23327)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 27 Apr 2011 07:14:23 PM UTC, comment #4:

Ah, I see. Well, here's the error message from ant just in case:

jemacs-swt-classes:
[javac] Compiling 2 source files to /home/shad/mysrc/kawa
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtBuffer.java:108: cannot find symbol
[javac] symbol : variable n
[javac] location: class gnu.jemacs.swt.SwtBuffer
[javac] String str = Marker.repeatChar(ch, n);
[javac] ^
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtBuffer.java:108: non-static method repeatChar(int,int) cannot be referenced from a static context
[javac] String str = Marker.repeatChar(ch, n);
[javac] ^
[javac] Note: /home/shad/mysrc/kawa/gnu/jemacs/buffer/Marker.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors

Shad Gregory <shadgregory>
Wed 27 Apr 2011 07:02:29 PM UTC, comment #3:

Actually, I mean to make Marker.repeatChar a static method.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 27 Apr 2011 06:56:22 PM UTC, comment #2:

I did have a problem building SwtBuffer.java. Did you mean to do something like this?

public void insertChar(int ch, int count, Object style)
{
// TODO: Handle styles !
String str = pointMarker.repeatChar(ch, count);
bufferContent.replaceTextRange(getDot(), 0, str);
setDot(getDot() + 1);
}

The other changes worked fine.

Shad Gregory <shadgregory>
Wed 27 Apr 2011 07:12:30 AM UTC, comment #1:

Thanks! I checked in the SwtFrame.java fix.

I think the SwtCharBuffer.java fix is wrong.
I've added an new attachment swt2.patch - could you try it?

The SwtBuffer.java fix is OK, but it doesn't handle characters whose value is >= 0x10000. I know there are lots of ways such characters won't work, but there is code Marker#insertChar to handle this case using surrogate pairs, so I figured might as well reuse that code.

So please try out the attached patch and let me know how it works.

(file #23311)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 21 Apr 2011 08:39:27 PM UTC, original submission:

Running the jemacs-swt-classes produces the following error:
jemacs-swt-classes:

[javac] Compiling 3 source files to /home/shad/mysrc/kawa
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtBuffer.java:112: possible loss of precision
[javac] found : int
[javac] required: char
[javac] charr[i] = ch;
[javac] ^
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtCharBuffer.java:81: gapReserve(int) in gnu.jemacs.swt.SwtCharBuffer cannot override gapReserve(int) in gnu.lists.GapVector; overridden method is final
[javac] protected void gapReserve(int size)
[javac] ^
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtFrame.java:62: cannot find symbol
[javac] symbol : variable MessageDialog
[javac] location: class gnu.jemacs.swt.SwtFrame
[javac] MessageDialog.openInformation(shell, "Information", aboutMessage());
[javac] ^
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtFrame.java:116: car has protected access in gnu.lists.Pair
[javac] CharSequence menuName = (CharSequence) ((Pair) o).car;
[javac] ^
[javac] /home/shad/mysrc/kawa/gnu/jemacs/swt/SwtFrame.java:119: cdr has protected access in gnu.lists.Pair
[javac] setMenuHelper(subMenu, (LList) ((Pair) o).cdr);
[javac] ^
[javac] 5 errors

It looks like the swt code is a victim of bit rot. I have attached a diff that will allow the code to compile successfully.

Shad Gregory <shadgregory>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #23327:  swt3.patch added by bothner (2KiB - text/x-patch)
file #23311:  swt2.patch added by bothner (2KiB - text/x-patch)
file #23285:  swt.diff added by shadgregory (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Updated the item)
  • -unavailable- added by shadgregory (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 01 May 2011 04:50:14 PM UTCbothnerStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sat 30 Apr 2011 06:10:38 AM UTCbothnerAttached File-=>Added swt3.patch, #23327
    Wed 27 Apr 2011 07:12:30 AM UTCbothnerAttached File-=>Added swt2.patch, #23311
      StatusNone=>In Progress
      Assigned toNone=>bothner
    Thu 21 Apr 2011 08:39:27 PM UTCshadgregoryAttached File-=>Added swt.diff, #23285

    Back to the top


    Powered by Savane 3.1-cleanup1