Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Some inconsistent changes found in SWT repository
Some inconsistent changes found in SWT repository [message #832103] Thu, 29 March 2012 19:25 Go to next message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
I'm recently doing some research on systematic editing--making similar changes
in different places within the whole project. As part of my research, I have
checked SWT version history and found some interesting experiment results.
Please help me check whether the following information is correct or just false
positives of my tool.
*******************************
In version-14361, org.eclipse.swt.graphics.FontData defined under win32 folder
has the constructor FontData(String) changed. The code snippet
int height = 0;
try{
height = Integer.parseInt(string.substring(start, end));
}...
is changed to
float height = 0;
try{
height = Float.parseFloat(string.substring(start, end));
}...

In version 14362, we found the identical changes happen to the constructor
FontData(String) defined in org.eclipse.swt.graphics.FontData under motif
folder.
The changes repeat themselves in version 14362 under gtk folder, version 14363
under carbon folder. But the same changes have not happened to the constructor
defined under photon folder up till now.

My question is: should that constructor defined under the photon folder be
changed as well or not?
***********************************
In version 11299, org.eclipse.swt.graphics.GC defined under win32 folder has
setBackgroundPattern(Pattern) changed. In the following version, the same
method defined in gtk folder is changed as well. Besides, method
setForegroundPattern(Pattern) defined in the same class is also changed.
The repetitive changes reoccur in motif folder in version 11300, in carbon
folder in version 11300. But they do not occur in photon folder. After checking
all successive versions of the project, I still cannot find the changes.

My question is : should the two methods defined in photon be changed similarly
as well or not?
Re: Some inconsistent changes found in SWT repository [message #832721 is a reply to message #832103] Fri, 30 March 2012 13:56 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The changes were not made to the Photon implementations because
development on the Photon port had stopped. If it was still alive at
the time of the changes then the changes likely would have been made for
Photon as well.

Grant


On 3/29/2012 3:25 PM, Na Mising name wrote:
> I'm recently doing some research on systematic editing--making similar
> changes
> in different places within the whole project. As part of my research, I
> have
> checked SWT version history and found some interesting experiment results.
> Please help me check whether the following information is correct or
> just false
> positives of my tool. *******************************
> In version-14361, org.eclipse.swt.graphics.FontData defined under win32
> folder
> has the constructor FontData(String) changed. The code snippet
> int height = 0;
> try{
> height = Integer.parseInt(string.substring(start, end));
> }...
> is changed to float height = 0;
> try{
> height = Float.parseFloat(string.substring(start, end));
> }...
>
> In version 14362, we found the identical changes happen to the constructor
> FontData(String) defined in org.eclipse.swt.graphics.FontData under motif
> folder.
> The changes repeat themselves in version 14362 under gtk folder, version
> 14363
> under carbon folder. But the same changes have not happened to the
> constructor
> defined under photon folder up till now.
> My question is: should that constructor defined under the photon folder be
> changed as well or not?
> ***********************************
> In version 11299, org.eclipse.swt.graphics.GC defined under win32 folder
> has
> setBackgroundPattern(Pattern) changed. In the following version, the same
> method defined in gtk folder is changed as well. Besides, method
> setForegroundPattern(Pattern) defined in the same class is also changed.
> The repetitive changes reoccur in motif folder in version 11300, in carbon
> folder in version 11300. But they do not occur in photon folder. After
> checking
> all successive versions of the project, I still cannot find the changes.
> My question is : should the two methods defined in photon be changed
> similarly
> as well or not?
Re: Some inconsistent changes found in SWT repository [message #838139 is a reply to message #832721] Fri, 06 April 2012 16:21 Go to previous messageGo to next message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
Hi Grant,

Thanks for your response. The information is helpful. Photon was alive at the time of the changes mentioned above since it has been systematically updated for other changes in versions after that.

But since you mentioned that the project has been stopped anyway, it does not matter if these changes were not made to it.

Thank you very much!

Na
Re: Some inconsistent changes found in SWT repository [message #839449 is a reply to message #838139] Sun, 08 April 2012 18:46 Go to previous messageGo to next message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
Hi Grant,

I have another question concerning similar changes in different products. In version 11459 of swt, I observed that org.eclipse.swt.graphics.GC.java defined in win32, gtk, motif, has several functions updated: such as setAntialias(int), setInterpolation(int), setTextAntialias(int). They all have one if-statement inserted like the following:

if(handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+if(data.v$0 == 0 && v$1 == SWT.DEFAULT)return; (v$0, v$1 are abstract identifiers, which can be replaced with concrete identifiers in each method)
... ...

But similar insertion does not happen to carbon or photon. Should it be inserted as well? I know that photon is not updated maybe because its maintenance activities have stopped. However, why carbon is not updated similarly?

Re: Some inconsistent changes found in SWT repository [message #840805 is a reply to message #839449] Tue, 10 April 2012 14:29 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The carbon port is dead too. If it was active and if the same pattern applied there too then the change would have been made there when doing the pass across the platforms.

Grant
Re: Some inconsistent changes found in SWT repository [message #855275 is a reply to message #840805] Tue, 24 April 2012 17:04 Go to previous message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
OK. I see. Thanks a lot, Grant!
Previous Topic:How to align text to the right
Next Topic:Detect a control is visible and skip drawing
Goto Forum:
  


Current Time: Fri Apr 19 18:52:20 GMT 2024

Powered by FUDForum. Page generated in 0.03678 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top