[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] ToolReference refactor
|
In working on my prototype I came across a small refactor to managed
build I thought might be generally useful. It regards tool reference.
Currently the class
org.eclipse.cdt.managedbuilder.internal.core.ToolReference is used to
"wrap" a tool instance. Many of the methods are simple delegators, some
override the values based on the .cdtbuild file to reflect user
specified changes. What I did was make an abstract class in
managedbuilder.core that implements ITool and delegates all of its
methods to a wrapped ITool instance. I then changed the existing class
to extend this abstract class, and removed the simple delegators as they
are now unnecessary. I also extended the abstract class in my
prototype, but I'm not submitting that. This doesn't have any user
visible effect, it just makes it easier for people like me to make
customizations to managed build.
The main thing I'm not sure about is the names. I called my abstract
class org.eclipse.cdt.managedbuilder.core.ToolReference. I renamed the
existing ToolReference class to
org.eclipse.cdt.managedbuilder.internal.core.ConfigToolReference.
Sean (and anyone else interested in managed build), do you think this
refactoring is useful? If you want different names for the classes,
just let me know and I'll regenerate the patch. If you don't think this
is generally useful, so be it. I'll just withdraw the patch.
I'm having problems getting the test suite to run. I'll try and fix
that tomorrow, but I wanted to at least get this out there for review.
Jeremiah Lott
TimeSys Corporation
Attachment:
tool-reference-refactor.patch
Description: tool-reference-refactor.patch