DWT package mapping?
brunodomedeiros+spam at com.gmail
Fri Oct 24 10:00:24 PDT 2008
Ary Borenszweig wrote:
> Frank Benoit wrote:
>> At the moment there are these mappings
>> org.eclipse.swt -> dwt
>> org.eclipse -> dwtx
>> SWT -> DWT
>> SWTError -> DWTError
>> SWTException -> DWTException
>> But there are more candidates for the dwt project.
>> com.novocode -> ??
>> com.ibm.icu -> ??
>> org.osgi -> ??
>> Where to put them?
>> And the rule for renaming should be consistent and open to new packages.
>> But why do renaming anyway? Is it really that hard to type? Can IDEs and
>> collective imports help?
>> What also is bad about the renaming, is that it must be done all over
>> again. That is time consuming when preparing Java source.
>> So I think... What about changing all the renaming back to the original?
>> Would that work? What do you think?
> I find that when porting stuff, renaming is not a good option. Take for
> instance Descent. It kept all the names of JDT unchanged, and that makes
> it very easy to add new code, make plugins work almost out of the box, etc.
> When I started Descent, I thought about renaming stuff like IJavaProject
> to IDeeProject, or something similar, but I asked the PHPEclipse guys
> what did they do, since they also used JDT's code base. They replied to
> me saying that they renamed IJavaProject to IPhpProject, things like
> that, big mistake, and that they were having a bad time getting updates
> from newer JDT releases, and that I should not do the same as they did.
> So my advice is to just keep the original names. Anyway, the S in SWT
> means Standard, so SWT for D is not bad. :-P
Yup, if the port/change was to be made only once, it would probably not
be a problem, but if one wants to integrate the future updates and
patches, it gets complicated.
Still, I think it still might be reasonable to maintain changes for the
*package* names. They barely change, and are referenced probably only in
import statements at the top of a file, so that should not make the task
of merging new SWT updates significantly harder.
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
More information about the Digitalmars-d-dwt