Some inconsistent changes found in SWT repository [message #832103] |
Thu, 29 March 2012 19:25 |
Na Mising name 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 |
Grant Gayed 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 #839449 is a reply to message #838139] |
Sun, 08 April 2012 18:46 |
Na Mising name 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?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03678 seconds