[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [jdt-core-dev] extension point for initializing unbound classpath variables
|
Actually, on the second point, after looking at the proposal, I have a
doubt.
How can a Java UI contribute a general solution for dealing with
unitialized variables (as opposed to initializing some well-known
variables like PDE_HOME, JRE_LIB). If someone did use a variable named
'Foo', then no plugin might recognize it as its, and thus no default value
will be provided for it.
There should be a fallback in the JavaUI intercepting this scenario and
come up with some mechanism to handle it (open a dialog...).
I could suggest the API would actually be changed to deal with it.
package org.eclipse.jdt.core;
/**
* Abstract base implementation of all classpath variable initializers.
* Classpath variable initializers are used in conjunction with the
* "org.eclipse.jdt.core.classpathVariableInitializer" extension point.
* <p>
* Clients should subclass this class to implement a specific classpath
* variable initializer. The subclass must have a public 0-argument
* constructor and a concrete implementation of <code>initialize</code>.
* </p>
*/
public abstract class ClasspathVariableInitializer {
/**
* Creates a new classpath variable initializer.
*/
protected ClasspathVariableInitializer() {
}
/**
* Answers true able to bind a value to the workspace classpath
variable with the given name,
* or answers false if it failed to do so.
*
* @param variable the name of the workspace classpath variable
* that requires a binding
* @see JavaCore#setClasspathVariable
*/
protected abstract boolean initialize(String variable);
}
In order to deal with the case where a custom variable isn't defined,
there should be a way to contribute a generic variable initializer (the
fallback one). Maybe using the variable name "*" in the extension
declaration ?
<extension
point = "org.eclipse.jdt.core.classpathVariableInitializer">
<classpathVariableInitializer
variable="*"
class="org.eclipse.jdt.internal.ui.DefaultVariableInitializer"/>
</extension>
Philippe Mulet
11/20/2001 11:50 AM
To: jdt-core-dev@xxxxxxxxxxx
cc:
Subject: RE: [jdt-core-dev] extension point for initializing unbound classpath
variables
This would indeed be useful features. Currently, variable values are
persisted in xml format (and recorded inside Eclipse resource persistent
properties), turning them into a separate file would be quite easy.
Now for the second point, the extension point would allow an external
plugin (like Java UI) to jump in and request the definition of a
particular variable value. So this one should be taken care of.
"Scott Stanchfield" <scott@xxxxxxxxxxxx>
Sent by: jdt-core-dev-admin@xxxxxxxxxxx
11/19/2001 09:06 PM
Please respond to jdt-core-dev
To: <jdt-core-dev@xxxxxxxxxxx>
cc:
Subject: RE: [jdt-core-dev] extension point for initializing unbound classpath
variables
Along these lines
1) Can we have an export/import on the Classpath variable definitions? It
would be nice to be able to export my values for a teammate to start with.
2) Can we set up the Java builder to ask for definition of a classpath
variable if not present but listed in the classpath of the project? (So
when
I checkin a project and someone else checks it out, it asks them for
values)
TIA,
-- Scott
==============================================================
Scott Stanchfield FGM, Inc. scott@xxxxxxx
Home Page: http://javadude.com scott@xxxxxxxxxxxx
Lead author of "Effective VisualAge for Java, Version 3"
http://javadude.com/evaj
VisualAge for Java Tips and Tricks http://javadude.com/vaj
AWT & Swing FAQ Manager, jGuru.com
Visit for Java Enlightenment! http://www.jguru.com
==============================================================
> -----Original Message-----
> From: jdt-core-dev-admin@xxxxxxxxxxx
> [mailto:jdt-core-dev-admin@xxxxxxxxxxx]On Behalf Of Jim des
> Rivieres/OTT/OTI
> Sent: Monday, November 19, 2001 11:57 AM
> To: jdt-core-dev@xxxxxxxxxxx
> Subject: [jdt-core-dev] extension point for initializing unbound
> classpath variables
>
>
>
> Attached is a proposal for a new JDT core extension point that would
allow
> a plug-in to
> declare that it is responsible for initializing a particular classpath
> variable.
>
>
>
> Doc for the new API class and extension point:
>
>
>
> Please send comments and questions to this mailing list.
>
> ---jeem
> (See attached file: ClasspathVariableInitializer.java)
> (See attached file: classpathVariableInitializer.html)
> (See attached file: uninit-classpath-vars.html)
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev