[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[imp-dev] Re: [imp-commit] r20437 - org.eclipse.imp.runtime/trunk/src/org/eclipse/imp/builder
|
Hi Stan,
I think rather than adding a concrete method that throws an exception,
it would be better to make this an abstract class, even if that seems to
break backward compatibility. As it is, they'll still have to modify
their
builder class to avoid the run-time exception, and they won't know
until run-time that there's a problem.
Remember, all other things considered equal, compile-time errors
are greatly preferable to run-time errors.
On Oct 9, 2008, at 4:41 PM, genie@xxxxxxxxxxx wrote:
Author: ssutton
Date: 2008-10-09 16:41:42 -0400 (Thu, 09 Oct 2008)
New Revision: 20437
Modified:
org.eclipse.imp.runtime/trunk/src/org/eclipse/imp/builder/
BuilderBase.java
Log:
Added a concrete but unimplemented method getBuilderID(). Also
changed "field" to "resource" and "resource" to "field" in various
places to better match associated types.
Modified: org.eclipse.imp.runtime/trunk/src/org/eclipse/imp/builder/
BuilderBase.java
===================================================================
--- org.eclipse.imp.runtime/trunk/src/org/eclipse/imp/builder/
BuilderBase.java 2008-10-09 20:26:32 UTC (rev 20436)
+++ org.eclipse.imp.runtime/trunk/src/org/eclipse/imp/builder/
BuilderBase.java 2008-10-09 20:41:42 UTC (rev 20437)
@@ -34,6 +34,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.imp.runtime.PluginBase;
import org.eclipse.imp.runtime.RuntimePlugin;
+import org.eclipse.imp.utils.UnimplementedError;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
@@ -49,9 +50,16 @@
protected abstract PluginBase getPlugin();
/**
+ * @return the extension ID of this builder
+ */
+ public String getBuilderID() {
+ throw new UnimplementedError("Not implemented for builder for
plug-in " + getPlugin().getID());
+ }
+
_______________________________________________
imp-commit mailing list
imp-commit@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/imp-commit
Cheers,
- Bob