# HG changeset patch
# User Frank Benoit
+ * Most users don't have to worry about Platform's lifecycle. However, if your
+ * code can call methods of this class when Platform is not running, it becomes
+ * necessary to check {@link #isRunning()} before making the call. A runtime
+ * exception might be thrown or incorrect result might be returned if a method
+ * from this class is called while Platform is not running.
+ *
+// * This value can be used by all components to customize features to suit the
+// * speed of the user's machine. The platform job manager uses this value to make
+// * scheduling decisions about background jobs.
+// *
+// * The preference value must be an integer between the constant values
+// * MIN_PERFORMANCE and MAX_PERFORMANCE
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Note this constant has been moved from the deprecated
+// * dwtx.core.boot.BootLoader class and its value has not changed.
+// *
+// * Once registered, a listener starts receiving notification as entries
+// * are added to plug-in logs via
+// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it for
+// * the command-line arguments.
+// *
+// * Clients are also able to acquire the {@link IContentTypeManager} service.
+// *
+ * Clients are also able to acquire the {@link DebugOptions} service
+ * and query it for debug options.
+ *
+// * Callers of this method should consider using
+// * Alternatively, instead of calling
+// * It is recommended not to keep this value, as the log location may vary when an instance
+// * location is being set.
+// * Note: it is very important that users of this method do not leave the log
+// * file open for extended periods of time. Doing so may prevent others
+// * from writing to the log file, which could result in important error messages
+// * being lost. It is strongly recommended that clients wanting to read the
+// * log file for extended periods should copy the log file contents elsewhere,
+// * and immediately close the original file.
+// * Note: This method is only able to find and return plug-in
+// * objects for plug-ins described using plugin.xml according to the
+// * traditional Eclipse conventions. Eclipse 3.0 permits plug-ins to be
+// * described in manifest.mf files and to define their own bundle
+// * activators. Such plug-ins cannot be discovered by this method.
+// * The plug-in state area is a file directory within the
+// * platform's metadata area where a plug-in is free to create files.
+// * The content and structure of this area is defined by the plug-in,
+// * and the particular plug-in is solely responsible for any files
+// * it puts there. It is recommended for plug-in preference settings.
+// *
+// * If the specified URL is not a plug-in-relative URL, it is returned
+// * as is. If the specified URL is a plug-in-relative URL, this method
+// * attempts to reduce the given URL to one which is native to the Java
+// * class library (eg. file, http, etc).
+// *
+// * Note however that users of this API should not assume too much about the
+// * results of this method. While it may consistently return a file: URL in certain
+// * installation configurations, others may result in jar: or http: URLs.
+// *
+// * find looks for this path in given bundle and any attached fragments.
+// *
+// * The following arguments may also be used
+// *
+ *
+ * dwtx.core.runtime
")
+// * of the Core Runtime (pseudo-) plug-in.
+// */
+// public static final String PI_RUNTIME = "dwtx.core.runtime"; //$NON-NLS-1$
+//
+// /**
+// * The simple identifier constant (value "applications
") of
+// * the extension point of the Core Runtime plug-in where plug-ins declare
+// * the existence of runnable applications. A plug-in may define any
+// * number of applications; however, the platform is only capable
+// * of running one application at a time.
+// *
+// */
+// public static final String PT_APPLICATIONS = "applications"; //$NON-NLS-1$
+//
+// /**
+// * The simple identifier constant (value "adapters
") of
+// * the extension point of the Core Runtime plug-in where plug-ins declare
+// * the existence of adapter factories. A plug-in may define any
+// * number of adapters.
+// *
+// * @see IAdapterManager#hasAdapter(Object, String)
+// * @since 3.0
+// */
+// public static final String PT_ADAPTERS = "adapters"; //$NON-NLS-1$
+//
+// /**
+// * The simple identifier constant (value "preferences
") of
+// * the extension point of the Core Runtime plug-in where plug-ins declare
+// * extensions to the preference facility. A plug-in may define any number
+// * of preference extensions.
+// *
+// * @see #getPreferencesService()
+// * @since 3.0
+// */
+// public static final String PT_PREFERENCES = Preferences.PT_PREFERENCES;
+//
+// /**
+// * The simple identifier constant (value "products
") of
+// * the extension point of the Core Runtime plug-in where plug-ins declare
+// * the existence of a product. A plug-in may define any
+// * number of products; however, the platform is only capable
+// * of running one product at a time.
+// *
+// * @see #getProduct()
+// * @since 3.0
+// */
+// public static final String PT_PRODUCT = "products"; //$NON-NLS-1$
+//
+// /**
+// * Debug option value denoting the time at which the platform runtime
+// * was started. This constant can be used in conjunction with
+// * getDebugOption
to find the string value of
+// * System.currentTimeMillis()
when the platform was started.
+// */
+// public static final String OPTION_STARTTIME = PI_RUNTIME + "/starttime"; //$NON-NLS-1$
+//
+// /**
+// * Name of a preference for configuring the performance level for this system.
+// *
+// * PREF_PLATFORM_PERFORMANCE
preference setting.
+// * @since 3.0
+// */
+// public static final int MIN_PERFORMANCE = 1;
+//
+// /**
+// * Constant (value 5) indicating the maximum allowed value for the
+// * PREF_PLATFORM_PERFORMANCE
preference setting.
+// * @since 3.0
+// */
+// public static final int MAX_PERFORMANCE = 5;
+//
+// /**
+// * Status code constant (value 1) indicating a problem in a plug-in
+// * manifest (plugin.xml
) file.
+// */
+// public static final int PARSE_PROBLEM = 1;
+//
+// /**
+// * Status code constant (value 2) indicating an error occurred while running a plug-in.
+// */
+// public static final int PLUGIN_ERROR = 2;
+//
+// /**
+// * Status code constant (value 3) indicating an error internal to the
+// * platform has occurred.
+// */
+// public static final int INTERNAL_ERROR = 3;
+//
+// /**
+// * Status code constant (value 4) indicating the platform could not read
+// * some of its metadata.
+// */
+// public static final int FAILED_READ_METADATA = 4;
+//
+// /**
+// * Status code constant (value 5) indicating the platform could not write
+// * some of its metadata.
+// */
+// public static final int FAILED_WRITE_METADATA = 5;
+//
+// /**
+// * Status code constant (value 6) indicating the platform could not delete
+// * some of its metadata.
+// */
+// public static final int FAILED_DELETE_METADATA = 6;
+//
+// /**
+// * Constant string (value "win32") indicating the platform is running on a
+// * Window 32-bit operating system (e.g., Windows 98, NT, 2000).
+// * ARCH_X86_64
instead. Note the values
+// * has been changed to be the value of the ARCH_X86_64
constant.
+// */
+// public static final String ARCH_AMD64 = ARCH_X86_64;
+//
+// /**
+// * Constant string (value "ia64") indicating the platform is running on an
+// * IA64-based architecture.
+// *
+// * @since 3.0
+// */
+// public static final String ARCH_IA64 = "ia64"; //$NON-NLS-1$
+//
+// /**
+// * Constant string (value "ia64_32") indicating the platform is running on an
+// * IA64 32bit-based architecture.
+// *
+// * @since 3.1
+// */
+// public static final String ARCH_IA64_32 = "ia64_32";//$NON-NLS-1$
+//
+// /**
+// * Constant string (value "win32") indicating the platform is running on a
+// * machine using the Windows windowing system.
+// * Map
+// * of String
to String
and typically
+// * contains information such as user names and passwords.
+// *
+// * @param serverUrl the URL identifying the server for this authorization
+// * information. For example, "http://www.example.com/".
+// * @param realm the subsection of the given server to which this
+// * authorization information applies. For example,
+// * "realm1@example.com" or "" for no realm.
+// * @param authScheme the scheme for which this authorization information
+// * applies. For example, "Basic" or "" for no authorization scheme
+// * @param info a Map
containing authorization information
+// * such as user names and passwords (key type : String
,
+// * value type : String
)
+// * @exception CoreException if there are problems setting the
+// * authorization information. Reasons include:
+// *
+// *
+// * @deprecated Authorization database is superseded by the Equinox secure storage.
+// * Use dwtx.equinox.security.storage.SecurePreferencesFactory
+// * to obtain secure preferences and dwtx.equinox.security.storage.ISecurePreferences
+// * for data access and modifications.
+// * Consider using ISecurePreferences#put(String, String, bool)
as a replacement of this method.
+// */
+// public static void addAuthorizationInfo(URL serverUrl, String realm, String authScheme, Map info) throws CoreException {
+// try {
+// AuthorizationHandler.addAuthorizationInfo(serverUrl, realm, authScheme, info);
+// } catch (NoClassDefFoundError e) {
+// // The authorization code is not available so just log and continue
+// logAuthNotAvailable(e);
+// }
+// }
+//
+// /**
+// * Adds the given log listener to the notification list of the platform.
+// * ILog.log()
. The listener continues to
+// * receive notifications until it is replaced or removed.
+// *
+// *
+// * @deprecated Authorization database is superseded by the Equinox secure storage.
+// * Use dwtx.equinox.security.storage.SecurePreferencesFactory
+// * to obtain secure preferences and dwtx.equinox.security.storage.ISecurePreferences
+// * for data access and modifications.
+// */
+// public static void addProtectionSpace(URL resourceUrl, String realm) throws CoreException {
+// try {
+// AuthorizationHandler.addProtectionSpace(resourceUrl, realm);
+// } catch (NoClassDefFoundError e) {
+// // The authorization code is not available so just log and continue
+// logAuthNotAvailable(e);
+// }
+// }
+//
+// /**
+// * Returns a URL that is the local equivalent of the
+// * supplied URL. This method is expected to be used with the
+// * plug-in-relative URLs returned by IPluginDescriptor, Bundle.getEntry()
+// * and Platform.find().
+// * If the specified URL is not a plug-in-relative URL, it
+// * is returned as is. If the specified URL is a plug-in-relative
+// * URL of a file (including .jar archive), it is returned as
+// * a locally accessible URL using "file:" protocol
+// * (extracting/caching the file locally, if required). If the specified URL
+// * is a plug-in-relative URL of a directory, the directory and any files and directories
+// * under it are made locally accessible likewise.
+// *
+// * @param url original plug-in-relative URL.
+// * @return the resolved URL
+// * @exception IOException if unable to resolve URL
+// * @see #resolve(URL)
+// * @see #find(Bundle, IPath)
+// * @see Bundle#getEntry(String)
+// * @deprecated use {@link FileLocator#toFileURL(URL)} instead
+// */
+// public static URL asLocalURL(URL url) throws IOException {
+// return FileLocator.toFileURL(url);
+// }
+//
+// /**
+// * Takes down the splash screen if one was put up.
+// * XXX this is application life cycle. Need to have the appropriate method on IApplication.
+// */
+// public static void endSplash() {
+// InternalPlatform.getDefault().endSplash();
+// }
+//
+// /**
+// * Removes the authorization information for the specified protection
+// * space and given authorization scheme. The protection space is defined
+// * by the given server URL and realm.
+// *
+// * @param serverUrl the URL identifying the server to remove the
+// * authorization information for. For example,
+// * "http://www.example.com/".
+// * @param realm the subsection of the given server to remove the
+// * authorization information for. For example,
+// * "realm1@example.com" or "" for no realm.
+// * @param authScheme the scheme for which the authorization information
+// * to remove applies. For example, "Basic" or "" for no
+// * authorization scheme.
+// * @exception CoreException if there are problems removing the
+// * authorization information. Reasons include:
+// *
+// *
+// * @deprecated Authorization database is superseded by the Equinox secure storage.
+// * Use dwtx.equinox.security.storage.SecurePreferencesFactory
+// * to obtain secure preferences and dwtx.equinox.security.storage.ISecurePreferences
+// * for data access and modifications.
+// * Consider using ISecurePreferences#clear()
as a replacement of this method.
+// */
+// public static void flushAuthorizationInfo(URL serverUrl, String realm, String authScheme) throws CoreException {
+// try {
+// AuthorizationHandler.flushAuthorizationInfo(serverUrl, realm, authScheme);
+// } catch (NoClassDefFoundError e) {
+// // The authorization code is not available so just log and continue
+// logAuthNotAvailable(e);
+// }
+// }
+//
+// private static void logAuthNotAvailable(Throwable e) {
+// InternalPlatform.getDefault().log(new Status(IStatus.WARNING, Platform.PI_RUNTIME, 0, Messages.auth_notAvailable, null));
+// }
+//
+// /**
+// * Returns the adapter manager used for extending
+// * IAdaptable
objects.
+// *
+// * @return the adapter manager for this platform
+// * @see IAdapterManager
+// * XXX register as a service (same pattern than Jobs)
+// * Do we want to make it available as a singleton?
+// */
+// public static IAdapterManager getAdapterManager() {
+// return InternalPlatform.getDefault().getAdapterManager();
+// }
+//
+// /**
+// * Returns the authorization information for the specified protection
+// * space and given authorization scheme. The protection space is defined
+// * by the given server URL and realm. Returns null
if no
+// * such information exists.
+// *
+// * @param serverUrl the URL identifying the server for the authorization
+// * information. For example, "http://www.example.com/".
+// * @param realm the subsection of the given server to which the
+// * authorization information applies. For example,
+// * "realm1@example.com" or "" for no realm.
+// * @param authScheme the scheme for which the authorization information
+// * applies. For example, "Basic" or "" for no authorization scheme
+// * @return the authorization information for the specified protection
+// * space and given authorization scheme, or null
if no
+// * such information exists
+// * @deprecated Authorization database is superseded by the Equinox secure storage.
+// * Use dwtx.equinox.security.storage.SecurePreferencesFactory
+// * to obtain secure preferences and dwtx.equinox.security.storage.ISecurePreferences
+// * for data access and modifications.
+// * Consider using ISecurePreferences#get(String, String)
as a replacement of this method.
+// */
+// public static Map getAuthorizationInfo(URL serverUrl, String realm, String authScheme) {
+// try {
+// return AuthorizationHandler.getAuthorizationInfo(serverUrl, realm, authScheme);
+// } catch (NoClassDefFoundError e) {
+// // The authorization code is not available so just log and continue
+// logAuthNotAvailable(e);
+// }
+// return null;
+// }
+//
+// /**
+// * Returns the command line args provided to the Eclipse runtime layer when it was first run.
+// * The returned value does not include arguments consumed by the lower levels of Eclipse
+// * (e.g., OSGi or the launcher).
+// * Note that individual platform runnables may be provided with different arguments
+// * if they are being run individually rather than with Platform.run()
.
+// * null
+ * is returned if no such option is found. Options are specified
+ * in the general form <plug-in id>/<option-path>.
+ * For example, dwtx.core.runtime/debug
+ * null
+ */
+ public static String getDebugOption(String option) {
+ return true;
+// DWT FIXME: impl
+// return InternalPlatform.getDefault().getOption(option);
+ }
+
+// /**
+// * Returns the location of the platform working directory.
+// * getInstanceLocation
+// * instead. In various, typically non IDE-related configurations of Eclipse, the platform
+// * working directory may not be on the local file system. As such, the more general
+// * form of this location is as a URL.
+// * getInstanceLocation
clients are
+// * able to acquire the {@link Location} service (with the type {@link Location#INSTANCE_FILTER})
+// * and then change the resulting URL to a path. See the javadoc for getInstanceLocation
+// * for more details.
+// * null
if no such plug-in can be found. If
+// * the plug-in is defined but not yet activated, the plug-in will
+// * be activated before being returned.
+// * "com.example.acme"
).
+// * @return the plug-in runtime object, or null
+// * @deprecated
+// * This method only works if the compatibility layer is installed and must not be used otherwise.
+// * See the comments on {@link IPluginDescriptor#getPlugin()} for details.
+// */
+// public static Plugin getPlugin(String id) {
+// try {
+// IPluginRegistry registry = getPluginRegistry();
+// if (registry is null)
+// throw new IllegalStateException();
+// IPluginDescriptor pd = registry.getPluginDescriptor(id);
+// if (pd is null)
+// return null;
+// return pd.getPlugin();
+// } catch (CoreException e) {
+// // TODO log the exception
+// }
+// return null;
+// }
+//
+// /**
+// * Returns the plug-in registry for this platform.
+// *
+// * @return the plug-in registry
+// * @see IPluginRegistry
+// * @deprecated IPluginRegistry
was refactored in Eclipse 3.0.
+// * This method only works if the compatibility layer is installed and must not be used otherwise.
+// * See the comments on {@link IPluginRegistry} and its methods for details.
+// */
+// public static IPluginRegistry getPluginRegistry() {
+// Bundle compatibility = InternalPlatform.getDefault().getBundle(CompatibilityHelper.PI_RUNTIME_COMPATIBILITY);
+// if (compatibility is null)
+// throw new IllegalStateException();
+//
+// Class oldInternalPlatform = null;
+// try {
+// oldInternalPlatform = compatibility.loadClass("dwtx.core.internal.plugins.InternalPlatform"); //$NON-NLS-1$
+// Method getPluginRegistry = oldInternalPlatform.getMethod("getPluginRegistry", null); //$NON-NLS-1$
+// return (IPluginRegistry) getPluginRegistry.invoke(oldInternalPlatform, null);
+// } catch (Exception e) {
+// //Ignore the exceptions, return null
+// }
+// return null;
+//
+// }
+//
+// /**
+// * Returns the location in the local file system of the plug-in
+// * state area for the given plug-in.
+// * The platform must be running.
+// * getStateLocation
instead
+// */
+// public static IPath getPluginStateLocation(Plugin plugin) {
+// return plugin.getStateLocation();
+// }
+//
+// /**
+// * Returns the protection space (realm) for the specified resource, or
+// * null
if the realm is unknown.
+// *
+// * @param resourceUrl the URL of the resource whose protection space is
+// * returned. For example, "http://www.example.com/folder/".
+// * @return the protection space (realm) for the specified resource, or
+// * null
if the realm is unknown
+// * @deprecated Authorization database is superseded by the Equinox secure storage.
+// * Use dwtx.equinox.security.storage.SecurePreferencesFactory
+// * to obtain secure preferences and dwtx.equinox.security.storage.ISecurePreferences
+// * for data access and modifications.
+// */
+// public static String getProtectionSpace(URL resourceUrl) {
+// try {
+// return AuthorizationHandler.getProtectionSpace(resourceUrl);
+// } catch (NoClassDefFoundError e) {
+// // The authorization code is not available so just log and continue
+// logAuthNotAvailable(e);
+// }
+// return null;
+// }
+//
+// /**
+// * Removes the indicated (identical) log listener from the notification list
+// * of the platform. If no such listener exists, no action is taken.
+// *
+// * @param listener the listener to de-register
+// * @see ILog#removeLogListener(ILogListener)
+// * @see #addLogListener(ILogListener)
+// * XXX Use the LogMgr service.
+// */
+// public static void removeLogListener(ILogListener listener) {
+// InternalPlatform.getDefault().removeLogListener(listener);
+// }
+//
+// /**
+// * Returns a URL which is the resolved equivalent of the
+// * supplied URL. This method is expected to be used with the
+// * plug-in-relative URLs returned by IPluginDescriptor, Bundle.getEntry()
+// * and Platform.find().
+// * SafeRunner#run
instead
+// */
+// public static void run(ISafeRunnable runnable) {
+// SafeRunner.run(runnable);
+// }
+//
+// /**
+// * Returns the platform job manager.
+// *
+// * @return the platform's job manager
+// * @since 3.0
+// * @deprecated The method {@link Job#getJobManager()} should be used instead.
+// */
+// public static IJobManager getJobManager() {
+// return Job.getJobManager();
+// }
+//
+// /**
+// * Returns the extension registry for this platform.
+// *
+// * @return the extension registry
+// * @see IExtensionRegistry
+// * @since 3.0
+// */
+// public static IExtensionRegistry getExtensionRegistry() {
+// return InternalPlatform.getDefault().getRegistry();
+// }
+//
+// /**
+// * Returns a URL for the given path in the given bundle. Returns null
if the URL
+// * could not be computed or created.
+// *
+// * @param bundle the bundle in which to search
+// * @param path path relative to plug-in installation location
+// * @return a URL for the given path or null
. The actual form
+// * of the returned URL is not specified.
+// * @see #find(Bundle, IPath, Map)
+// * @see #resolve(URL)
+// * @see #asLocalURL(URL)
+// * @since 3.0
+// * @deprecated use {@link FileLocator#find(Bundle, IPath, Map)}
+// */
+// public static URL find(Bundle bundle, IPath path) {
+// return FileLocator.find(bundle, path, null);
+// }
+//
+// /**
+// * Returns a URL for the given path in the given bundle. Returns null
if the URL
+// * could not be computed or created.
+// * null
is returned if no such entry is found. Note that
+// * there is no specific order to the fragments.
+// *
+// * $nl$ - for language specific information
+// * $os$ - for operating system specific information
+// * $ws$ - for windowing system specific information
+// *
+// *
+// * A path of $nl$/about.properties in an environment with a default +// * locale of en_CA will return a URL corresponding to the first place +// * about.properties is found according to the following order: +// *
+// * plugin root/nl/en/CA/about.properties +// * fragment1 root/nl/en/CA/about.properties +// * fragment2 root/nl/en/CA/about.properties +// * ... +// * plugin root/nl/en/about.properties +// * fragment1 root/nl/en/about.properties +// * fragment2 root/nl/en/about.properties +// * ... +// * plugin root/about.properties +// * fragment1 root/about.properties +// * fragment2 root/about.properties +// * ... +// *+// *
+// * The current environment variable values can be overridden using +// * the override map argument. +// *
+// * +// * @param bundle the bundle in which to search +// * @param path file path relative to plug-in installation location +// * @param override map of override substitution arguments to be used for +// * any $arg$ path elements. The map keys correspond to the substitution +// * arguments (eg. "$nl$" or "$os$"). The resulting +// * values must be of type java.lang.String. If the map isnull
,
+// * or does not contain the required substitution argument, the default
+// * is used.
+// * @return a URL for the given path or null
. The actual form
+// * of the returned URL is not specified.
+// * @see #resolve(URL)
+// * @see #asLocalURL(URL)
+// * @since 3.0
+// * @deprecated use {@link FileLocator#find(Bundle, IPath, Map)} instead
+// */
+// public static URL find(Bundle bundle, IPath path, Map override) {
+// return FileLocator.find(bundle, path, override);
+// }
+//
+// /**
+// * Returns the location in the local file system of the
+// * plug-in state area for the given bundle.
+// * If the plug-in state area did not exist prior to this call,
+// * it is created.
+// * +// * The plug-in state area is a file directory within the +// * platform's metadata area where a plug-in is free to create files. +// * The content and structure of this area is defined by the plug-in, +// * and the particular plug-in is solely responsible for any files +// * it puts there. It is recommended for plug-in preference settings and +// * other configuration parameters. +// *
+// * +// * @param bundle the bundle whose state location if returned +// * @return a local file system path +// * @since 3.0 +// * XXX Investigate the usage of a service factory +// */ +// public static IPath getStateLocation(Bundle bundle) { +// return InternalPlatform.getDefault().getStateLocation(bundle); +// } +// +// /** +// * Returns a number that changes whenever the set of installed plug-ins +// * changes. This can be used for invalidating caches that are based on +// * the set of currently installed plug-ins. (e.g. extensions) +// *+// * Clients are also able to acquire the {@link PlatformAdmin} service +// * and get the timestamp from its state object. +// *
+// * @return a number related to the set of installed plug-ins +// * @since 3.1 +// */ +// public static long getStateStamp() { +// return InternalPlatform.getDefault().getStateTimeStamp(); +// } +// +// /** +// * Returns the log for the given bundle. If no such log exists, one is created. +// * +// * @param bundle the bundle whose log is returned +// * @return the log for the given bundle +// * @since 3.0 +// * XXX change this into a LogMgr service that would keep track of the map. See if it can be a service factory. +// * It would contain all the methods that are here. +// * Relate to RuntimeLog if appropriate. +// * The system log listener needs to be optional: turned on or off. What about a system property? :-) +// */ +// public static ILog getLog(Bundle bundle) { +// return InternalPlatform.getDefault().getLog(bundle); +// } +// +// /** +// * Returns the given bundle's resource bundle for the current locale. +// *+// * This resource bundle is typically stored as the plugin.properties file +// * in the plug-in itself, and contains any translatable strings used in the +// * plug-in manifest file (plugin.xml). +// *
+// *+// * This mechanism is intended only for +// * externalizing strings found in the plug-in manifest file. Using this +// * method for externalizing strings in your code may result in degraded +// * memory performance. +// *
+// * +// * @param bundle the bundle whose resource bundle is being queried +// * @return the resource bundle +// * @exception MissingResourceException if the resource bundle was not found +// * @since 3.0 +// * XXX this is deprecated. use NLS or BundleFinder.find() +// */ +// public static ResourceBundle getResourceBundle(Bundle bundle) throws MissingResourceException { +// return InternalPlatform.getDefault().getResourceBundle(bundle); +// } +// +// /** +// * Returns a resource string corresponding to the given argument value. +// * If the argument value specifies a resource key, the string +// * is looked up in the default resource bundle for the given runtime bundle. If the argument does not +// * specify a valid key, the argument itself is returned as the +// * resource string. The key lookup is performed in the +// * file referenced in the Bundle-Localization header of the bundle manifest. If a resource string +// * corresponding to the key is not found in the resource bundle +// * the key value, or any default text following the key in the +// * argument value is returned as the resource string. +// * A key is identified as a string beginning with the "%" character. +// * Note, that the "%" character is stripped off prior to lookup +// * in the resource bundle. +// *
+// * Equivalent to getResourceString(bundle, value, getResourceBundle())
+// *
+// * For example, assume resource bundle plugin.properties contains +// * name = Project Name +// *
+// * getResourceString("Hello World") returns "Hello World" +// * getResourceString("%name") returns "Project Name" +// * getResourceString("%name Hello World") returns "Project Name" +// * getResourceString("%abcd Hello World") returns "Hello World" +// * getResourceString("%abcd") returns "%abcd" +// * getResourceString("%%name") returns "%name" +// *+// * +// * +// * @param bundle the bundle whose resource bundle is being queried +// * @param value the value +// * @param resourceBundle the resource bundle to query +// * @return the resource string +// * @see #getResourceBundle(Bundle) +// * @since 3.0 +// * XXX this is deprecated. use NLS or BundleFinder.find() +// */ +// public static String getResourceString(Bundle bundle, String value, ResourceBundle resourceBundle) { +// return InternalPlatform.getDefault().getResourceString(bundle, value, resourceBundle); +// } +// +// /** +// * Returns the string name of the current system architecture. +// * The value is a user-defined string if the architecture is +// * specified on the command line, otherwise it is the value +// * returned by
java.lang.System.getProperty("os.arch")
.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it for +// * the operating-system architecture. +// *
+// * @return the string name of the current system architecture +// * @since 3.0 +// */ +// public static String getOSArch() { +// return InternalPlatform.getDefault().getOSArch(); +// } +// +// /** +// * Returns the string name of the current locale for use in finding files +// * whose path starts with$nl$
.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it for +// * the NL. +// *
+// * @return the string name of the current locale +// * @since 3.0 +// */ +// public static String getNL() { +// return InternalPlatform.getDefault().getNL(); +// } +// +// /** +// * Returns the string name of the current operating system for use in finding +// * files whose path starts with$os$
. OS_UNKNOWN
is
+// * returned if the operating system cannot be determined.
+// * The value may indicate one of the operating systems known to the platform
+// * (as specified in knownOSValues
) or a user-defined string if
+// * the operating system name is specified on the command line.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it for +// * the operating-system. +// *
+// * @return the string name of the current operating system +// * @since 3.0 +// */ +// public static String getOS() { +// return InternalPlatform.getDefault().getOS(); +// } +// +// /** +// * Returns the string name of the current window system for use in finding files +// * whose path starts with$ws$
. null
is returned
+// * if the window system cannot be determined.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it for +// * the windowing system. +// *
+// * @return the string name of the current window system ornull
+// * @since 3.0
+// */
+// public static String getWS() {
+// return InternalPlatform.getDefault().getWS();
+// }
+//
+// /**
+// * Returns the arguments not consumed by the framework implementation itself. Which
+// * arguments are consumed is implementation specific. These arguments are available
+// * for use by the application.
+// *
+// * @return the array of command line arguments not consumed by the framework.
+// * @since 3.0
+// * XXX Use the Environment info service. Need to see how to set the value of the app args.
+// */
+// public static String[] getApplicationArgs() {
+// return InternalPlatform.getDefault().getApplicationArgs();
+// }
+//
+// /**
+// * Returns the platform administrator for this running Eclipse.
+// * +// * Note: This is an internal method and must not +// * be used by clients which are not part of the Eclipse Platform. +// * This method allows access to classes which are not Eclipse +// * Platform API but are part of the OSGi runtime that the Eclipse +// * Platform is built on. Even as the Eclipse Platform evolves +// * in compatible ways from release to release, the details of +// * the OSGi implementation might not. +// *
+// * Clients can also acquire the {@link PlatformAdmin} service +// * to retrieve this object. +// *
+// * @return the platform admin for this instance of Eclipse +// * @since 3.0 +// */ +// public static PlatformAdmin getPlatformAdmin() { +// return InternalPlatform.getDefault().getPlatformAdmin(); +// } +// +// /** +// * Returns the location of the platform's working directory (also known as the instance data area). +// *null
is returned if the platform is running without an instance location.
+// *
+// * This method is equivalent to acquiring the dwtx.osgi.service.datalocation.Location
+// * service with the property "type" equal to {@link Location#INSTANCE_FILTER}.
+// *
null
if none
+// * @since 3.0
+// * @see Location#INSTANCE_FILTER
+// */
+// public static Location getInstanceLocation() {
+// return InternalPlatform.getDefault().getInstanceLocation();
+// }
+//
+// /**
+// * Returns the currently registered bundle group providers.
+// * +// * Clients are also able to acquire the {@link IBundleGroupProvider} service and query it for +// * the registered bundle group providers. +// *
+// * @return the currently registered bundle group providers +// * @since 3.0 +// */ +// public static IBundleGroupProvider[] getBundleGroupProviders() { +// return InternalPlatform.getDefault().getBundleGroupProviders(); +// } +// +// /** +// * Return the interface into the preference mechanism. The returned +// * object can be used for such operations as searching for preference +// * values across multiple scopes and preference import/export. +// *+// * Clients are also able to acquire the {@link IPreferencesService} service via +// * OSGi mechanisms and use it for preference functions. +// *
+// * @return an object to interface into the preference mechanism +// * @since 3.0 +// */ +// public static IPreferencesService getPreferencesService() { +// return InternalPlatform.getDefault().getPreferencesService(); +// } +// +// /** +// * Returns the product which was selected when running this Eclipse instance +// * ornull
if none
+// * @return the current product or null
if none
+// * @since 3.0
+// * XXX move this into the app model.
+// */
+// public static IProduct getProduct() {
+// return InternalPlatform.getDefault().getProduct();
+// }
+//
+// /**
+// * Registers the given bundle group provider with the platform.
+// * +// * Clients are also able to use the {@link IBundleGroupProvider} service to +// * register themselves as a bundle group provider. +// *
+// * @param provider a provider to register +// * @since 3.0 +// */ +// public static void registerBundleGroupProvider(IBundleGroupProvider provider) { +// InternalPlatform.getDefault().registerBundleGroupProvider(provider); +// } +// +// /** +// * De-registers the given bundle group provider with the platform. +// *+// * Clients are also able to use the {@link IBundleGroupProvider} service mechanism +// * for unregistering themselves. +// *
+// * @param provider a provider to de-register +// * @since 3.0 +// * @see #registerBundleGroupProvider(IBundleGroupProvider) +// */ +// public static void unregisterBundleGroupProvider(IBundleGroupProvider provider) { +// InternalPlatform.getDefault().unregisterBundleGroupProvider(provider); +// } +// +// /** +// * Returns the location of the configuration information +// * used to run this instance of Eclipse. The configuration area typically +// * contains the list of plug-ins available for use, various settings +// * (those shared across different instances of the same configuration) +// * and any other such data needed by plug-ins. +// *null
is returned if the platform is running without a configuration location.
+// *
+// * This method is equivalent to acquiring the dwtx.osgi.service.datalocation.Location
+// * service with the property "type" equal to {@link Location#CONFIGURATION_FILTER}.
+// *
null
if none
+// * @since 3.0
+// * @see Location#CONFIGURATION_FILTER
+// */
+// public static Location getConfigurationLocation() {
+// return InternalPlatform.getDefault().getConfigurationLocation();
+// }
+//
+// /**
+// * Returns the location of the platform's user data area. The user data area is a location on the system
+// * which is specific to the system's current user. By default it is located relative to the
+// * location given by the System property "user.home".
+// * null
is returned if the platform is running without an user location.
+// *
+// * This method is equivalent to acquiring the dwtx.osgi.service.datalocation.Location
+// * service with the property "type" equal to {@link Location#USER_FILTER}.
+// *
null
if none
+// * @since 3.0
+// * @see Location#USER_FILTER
+// */
+// public static Location getUserLocation() {
+// return InternalPlatform.getDefault().getUserLocation();
+// }
+//
+// /**
+// * Returns the location of the base installation for the running platform
+// * null
is returned if the platform is running without a configuration location.
+// *
+// * This method is equivalent to acquiring the dwtx.osgi.service.datalocation.Location
+// * service with the property "type" equal to {@link Location#INSTALL_FILTER}.
+// *
null
if none
+// * @since 3.0
+// * @see Location#INSTALL_FILTER
+// */
+// public static Location getInstallLocation() {
+// return InternalPlatform.getDefault().getInstallLocation();
+// }
+//
+// /**
+// * Checks if the specified bundle is a fragment bundle.
+// * +// * Clients are also able to acquire the {@link PackageAdmin} service +// * to query if the given bundle is a fragment by asking for the bundle type +// * and checking against constants on the service interface. +// *
+// * @param bundle the bundle to query +// * @return true if the specified bundle is a fragment bundle; otherwise false is returned. +// * @since 3.0 +// */ +// public static bool isFragment(Bundle bundle) { +// return InternalPlatform.getDefault().isFragment(bundle); +// } +// +// /** +// * Returns an array of attached fragment bundles for the specified bundle. If the +// * specified bundle is a fragment then null is returned. If no fragments are +// * attached to the specified bundle then null is returned. +// *+// * Clients are also able to acquire the {@link PackageAdmin} service and query +// * it for the fragments of the given bundle. +// *
+// * @param bundle the bundle to get the attached fragment bundles for. +// * @return an array of fragment bundles or null if the bundle does not +// * have any attached fragment bundles. +// * @since 3.0 +// */ +// public static Bundle[] getFragments(Bundle bundle) { +// return InternalPlatform.getDefault().getFragments(bundle); +// } +// +// /** +// * Returns the resolved bundle with the specified symbolic name that has the +// * highest version. If no resolved bundles are installed that have the +// * specified symbolic name then null is returned. +// *+// * Clients are also able to acquire the {@link PackageAdmin} service and query +// * it for the bundle with the specified symbolic name. Clients can ask the +// * service for all bundles with that particular name and then determine the +// * one with the highest version. Note that clients may want to filter +// * the results based on the state of the bundles. +// *
+// * @param symbolicName the symbolic name of the bundle to be returned. +// * @return the bundle that has the specified symbolic name with the +// * highest version, or null if no bundle is found. +// * @since 3.0 +// */ +// public static Bundle getBundle(String symbolicName) { +// return InternalPlatform.getDefault().getBundle(symbolicName); +// } +// +// /** +// * Returns all bundles with the specified symbolic name. If no resolved bundles +// * with the specified symbolic name can be found, null is returned. +// * If the version argument is not null then only the Bundles that have +// * the specified symbolic name and a version greater than or equal to the +// * specified version are returned. The returned bundles are ordered in +// * descending bundle version order. +// *+// * Clients are also able to acquire the {@link PackageAdmin} service and query +// * it for all bundle versions with the given symbolic name, after turning the +// * specific version into a version range. Note that clients may want to filter +// * the results based on the state of the bundles. +// *
+// * @param symbolicName the symbolic name of the bundles that are to be returned. +// * @param version the version that the return bundle versions must match, +// * or null if no version matching is to be done. +// * @return the array of Bundles with the specified name that match the +// * specified version and match rule, or null if no bundles are found. +// */ +// public static Bundle[] getBundles(String symbolicName, String version) { +// return InternalPlatform.getDefault().getBundles(symbolicName, version); +// } +// +// /** +// * Returns an array of host bundles that the specified fragment bundle is +// * attached to or null if the specified bundle is not attached to a host. +// * If the bundle is not a fragment bundle then null is returned. +// *+// * Clients are also able to acquire the {@link PackageAdmin} service and query +// * it for the hosts for the given bundle. +// *
+// * @param bundle the bundle to get the host bundles for. +// * @return an array of host bundles or null if the bundle does not have any +// * host bundles. +// * @since 3.0 +// */ +// public static Bundle[] getHosts(Bundle bundle) { +// return InternalPlatform.getDefault().getHosts(bundle); +// } +// +// /** +// * Returns whether the platform is running. +// * +// * @returntrue
if the platform is running,
+// * and false
otherwise
+// *@since 3.0
+// *XXX do what you want to do. track osgi, track runtime, or whatever.
+// */
+// public static bool isRunning() {
+// return InternalPlatform.getDefault().isRunning();
+// }
+//
+// /**
+// * Returns a list of known system architectures.
+// *
+// * Note that this list is not authoritative; there may be legal values
+// * not included in this list. Indeed, the value returned by
+// * getOSArch
may not be in this list. Also, this list may
+// * change over time as Eclipse comes to run on more operating environments.
+// *
+// * Note that this list is not authoritative; there may be legal values
+// * not included in this list. Indeed, the value returned by
+// * getOS
may not be in this list. Also, this list may
+// * change over time as Eclipse comes to run on more operating environments.
+// *
+// * Note that this list is not authoritative; there may be legal values
+// * not included in this list. Indeed, the value returned by
+// * getWS
may not be in this list. Also, this list may
+// * change over time as Eclipse comes to run on more operating environments.
+// *
true
if the platform is currently running in
+// * debug mode. The platform is typically put in debug mode using the
+// * "-debug" command line argument.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it +// * to see if they are in debug mode. +// *
+// * @return whether or not the platform is running in debug mode +// * @since 3.0 +// */ +// public static bool inDebugMode() { +// return PlatformActivator.getContext().getProperty("osgi.debug") !is null; //$NON-NLS-1$ +// } +// +// /** +// * Returnstrue
if the platform is currently running in
+// * development mode. That is, if special procedures are to be
+// * taken when defining plug-in class paths. The platform is typically put in
+// * development mode using the "-dev" command line argument.
+// * +// * Clients are also able to acquire the {@link EnvironmentInfo} service and query it +// * to see if they are in development mode. +// *
+// * @return whether or not the platform is running in development mode +// * @since 3.0 +// */ +// public static bool inDevelopmentMode() { +// return PlatformActivator.getContext().getProperty("osgi.dev") !is null; //$NON-NLS-1$ +// } +} diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/BufferedReader.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/BufferedReader.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,9 @@ +module dwtx.dwtxhelper.BufferedReader; + +import dwt.dwthelper.utils; + +class BufferedReader { +} + + + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/CharacterIterator.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/CharacterIterator.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,17 @@ +module dwtx.dwtxhelper.CharacterIterator; + +interface CharacterIterator { + static const char DONE = '\u00FF'; + Object clone(); + char current(); + char first(); + int getBeginIndex(); + int getEndIndex(); + int getIndex(); + char last(); + char next(); + char previous(); + char setIndex(int position); +} + + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/Date.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/Date.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,6 @@ +module dwtx.dwthelper.Date; + +class Date { +} + + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/MalformedURLException.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/MalformedURLException.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,4 @@ +module dwtx.dwtxhelper.MalformedURLException; + +class MalformedURLException { +} diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/MessageFormat.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/MessageFormat.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,20 @@ +module dwtx.dwtxhelper.MessageFormat; + +import dwt.dwthelper.utils; +import tango.text.convert.Format; + +class MessageFormat { + public static String format( String frmt, Object[] args... ){ + switch( args.length ){ + case 0: return Format(frmt); + case 1: return Format(frmt, args[0]); + case 2: return Format(frmt, args[0], args[1]); + case 3: return Format(frmt, args[0], args[1], args[2]); + case 4: return Format(frmt, args[0], args[1], args[2], args[3]); + case 5: return Format(frmt, args[0], args[1], args[2], args[3], args[4]); + default: + implMissing(__FILE__, __LINE__ ); + } + } +} + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/PushbackReader.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/PushbackReader.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,5 @@ +module dwtx.dwtxhelper.PushbackReader; + +class PushbackReader{ +} + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/StringReader.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/StringReader.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,5 @@ +module dwtx.dwtxhelper.StringReader; + +class StringReader { +} + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/StringTokenizer.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/StringTokenizer.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,4 @@ +module dwtx.dwtxhelper.StringTokenizer; + +class StringTokenizer { +} diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/dwtxhelper/URL.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/dwtxhelper/URL.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,5 @@ +module dwtx.dwtxhelper.URL; + +class URL { +} + diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/contentassist/IContentAssistSubjectControl.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/contentassist/IContentAssistSubjectControl.d Tue Aug 26 02:46:34 2008 +0200 @@ -0,0 +1,271 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit
+ * Note: This content assist subject control may not support appending a verify
+ * listener, in which case false
will be returned. If this
+ * content assist subject control only supports addVerifyKeyListener
+ * then this method can be used but prependVerifyKeyListener
+ * must return false
.
+ *
true
if the listener was added
+ */
+ bool appendVerifyKeyListener(VerifyKeyListener verifyKeyListener);
+
+ /**
+ * If supported, inserts the verify key listener at the beginning of this content assist
+ * subject's list of verify key listeners. If the listener is already
+ * registered with the viewer this call moves the listener to the beginning
+ * of the list.
+ *
+ * Note: This content assist subject control may not support prepending a verify
+ * listener, in which case false
will be returned. However,
+ * {@link #appendVerifyKeyListener(VerifyKeyListener)} might work.
+ *
true
if the listener was added
+ */
+ bool prependVerifyKeyListener(VerifyKeyListener verifyKeyListener);
+
+ /**
+ * Removes the verify key listener from this content assist subject control's
+ * list of verify key listeners. If the listener is not registered, this
+ * call has no effect.
+ *
+ * @param verifyKeyListener the listener to be removed
+ */
+ void removeVerifyKeyListener(VerifyKeyListener verifyKeyListener);
+
+ /**
+ * Tests whether a verify key listener can be added either using prependVerifyKeyListener
+ * or {@link #appendVerifyKeyListener(VerifyKeyListener)}.
+ *
+ * @return true
if adding verify key listeners is supported
+ */
+ bool supportsVerifyKeyListener();
+
+ /**
+ * Adds the listener to the collection of listeners who will be notified
+ * when keys are pressed and released on the system keyboard, by sending it
+ * one of the messages defined in the {@link KeyListener} interface.
+ *
+ * @param keyListener the listener which should be notified
+ * @exception IllegalArgumentException if the listener is null
+ * @exception dwt.DWTException
+ * null
+ * is a valid argument.
+ */
+ void setEventConsumer(IEventConsumer eventConsumer);
+
+ /**
+ * Removes the specified selection listener.
+ * + * + * @param selectionListener the listener + * @exception dwt.DWTException
null
+ */
+ void removeSelectionListener(SelectionListener selectionListener);
+
+ /**
+ * If supported, adds a selection listener. A Selection event is sent by the widget when the
+ * selection has changed.
+ *
+ *
+ * @param selectionListener the listener
+ * @return true
if adding a selection listener is supported
+ *
null
+ */
+ bool addSelectionListener(SelectionListener selectionListener);
+}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/contentassist/ISubjectControlContentAssistProcessor.d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwtx/jface/contentassist/ISubjectControlContentAssistProcessor.d Tue Aug 26 02:46:34 2008 +0200
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ * Frank Benoit null
if no
+ * proposals are possible
+ */
+ ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset);
+
+ /**
+ * Returns information about possible contexts based on the specified
+ * location within the document that corresponds to the current cursor
+ * position within the content assist subject control.
+ *
+ * @param contentAssistSubjectControl the content assist subject control whose
+ * document is used to compute the possible contexts
+ * @param documentOffset an offset within the document for which context
+ * information should be computed
+ * @return an array of context information objects or null
+ * if no context could be found
+ */
+ IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubjectControl, int documentOffset);
+}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/contentassist/ISubjectControlContentAssistant.d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwtx/jface/contentassist/ISubjectControlContentAssistant.d Tue Aug 26 02:46:34 2008 +0200
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ * Frank Benoit
* Moved into this package from dwtx.jface.internal.text.revisions
.
* Moved into this package from dwtx.jface.internal.text.revisions
.
true
if auto activation context
* @return an error message or null
in case of no error
*/
- public String showProposals(final bool autoActivated) {
+ public String showProposals(bool autoActivated) {
if (fKeyListener is null) {
fKeyListener= new class() KeyListener {
@@ -381,7 +381,7 @@
* @param offset the offset
* @since 2.1
*/
- private void insertProposal(ICompletionProposal p, char trigger, int stateMask, final int offset) {
+ private void insertProposal(ICompletionProposal p, char trigger, int stateMask, int offset) {
fInserting= true;
IRewriteTarget target= null;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/link/contentassist/ContentAssistMessages.d
--- a/dwtx/jface/internal/text/link/contentassist/ContentAssistMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContentAssistMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -26,8 +26,7 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/**
@@ -37,7 +36,7 @@
*/
class ContentAssistMessages {
-// private static const String RESOURCE_BUNDLE= ContentAssistMessages.class.getName();
+// private static const String RESOURCE_BUNDLE= ContentAssistMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d
--- a/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d Tue Aug 26 02:46:34 2008 +0200
@@ -22,14 +22,9 @@
import dwtx.jface.internal.text.link.contentassist.IContentAssistListener2; // packageimport
import dwtx.jface.internal.text.link.contentassist.AdditionalInfoController2; // packageimport
-
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
-
-
-
+import tango.core.Thread;
import dwt.DWT;
import dwt.DWTError;
@@ -248,7 +243,8 @@
protected void start(int showStyle) {
fShowStyle= showStyle;
- fThread= new Thread(this, ContentAssistMessages.getString("ContentAssistant.assist_delay_timer_name")); //$NON-NLS-1$
+ fThread= new Thread(&run);
+ fThread.name = ContentAssistMessages.getString("ContentAssistant.assist_delay_timer_name"); //$NON-NLS-1$
fThread.start();
}
@@ -326,7 +322,7 @@
start(showStyle);
}
- protected void showAssist(final int showStyle) {
+ protected void showAssist(int showStyle) {
Control control= fViewer.getTextWidget();
Display d= control.getDisplay();
if (d !is null) {
@@ -636,7 +632,7 @@
* @see VerifyKeyListener#verifyKey(dwt.events.VerifyEvent)
*/
public void verifyKey(VerifyEvent e) {
- IContentAssistListener2[] listeners= (IContentAssistListener2[]) fListeners.clone();
+ IContentAssistListener2[] listeners= arraycast!(IContentAssistListener2)( fListeners.clone());
for (int i= 0; i < listeners.length; i++) {
if (listeners[i] !is null) {
if (!listeners[i].verifyKey(e) || !e.doit)
@@ -652,7 +648,7 @@
installKeyListener();
- IContentAssistListener2[] listeners= (IContentAssistListener2[])fListeners.clone();
+ IContentAssistListener2[] listeners= arraycast!(IContentAssistListener2)(fListeners.clone());
for (int i= 0; i < listeners.length; i++) {
if (listeners[i] !is null) {
listeners[i].processEvent(event);
@@ -710,13 +706,13 @@
private String[] fProposalStrings;
private ICompletionProposal[] fProposals;
private const List fProposalListeners= new ArrayList();
-
+
/**
* Tells whether colored label support is enabled.
* @since 3.4
*/
private bool fIsColoredLabelsSupportEnabled= false;
-
+
/**
* Creates a new content assistant. The content assistant is not automatically activated,
@@ -1573,10 +1569,10 @@
public void addProposalListener(IProposalListener listener) {
fProposalListeners.add(listener);
}
-
+
/**
* Tells whether the support for colored labels is enabled.
- *
+ *
* @return true
if the support for colored labels is enabled, false
otherwise
* @since 3.4
*/
@@ -1588,7 +1584,7 @@
* Enables the support for colored labels in the proposal popup.
* Completion proposals can implement {@link ICompletionProposalExtension6} * to provide colored proposal labels.
- * + * * @param isEnabled iftrue
the support for colored labels is enabled in the proposal popup
* @since 3.4
*/
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d
--- a/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d Tue Aug 26 02:46:34 2008 +0200
@@ -118,36 +118,33 @@
* @param autoActivated true
if auto activated
* @return a potential error message or null
in case of no error
*/
- public String showContextProposals(final bool autoActivated) {
+ public String showContextProposals(bool autoActivated) {
final StyledText styledText= fViewer.getTextWidget();
- BusyIndicator.showWhile(styledText.getDisplay(), new class() Runnable {
- public void run() {
-
- int position= fViewer.getSelectedRange().x;
+ BusyIndicator.showWhile(styledText.getDisplay(), dgRunnable( (bool autoActivated_, StyledText styledText_ ) {
+ int position= fViewer.getSelectedRange().x;
- IContextInformation[] contexts= computeContextInformation(position);
- int count = (contexts is null ? 0 : contexts.length);
- if (count is 1) {
+ IContextInformation[] contexts= computeContextInformation(position);
+ int count = (contexts is null ? 0 : contexts.length);
+ if (count is 1) {
- // Show context information directly
- internalShowContextInfo(contexts[0], position);
+ // Show context information directly
+ internalShowContextInfo(contexts[0], position);
- } else if (count > 0) {
- // Precise context must be selected
+ } else if (count > 0) {
+ // Precise context must be selected
- if (fLineDelimiter is null)
- fLineDelimiter= styledText.getLineDelimiter();
+ if (fLineDelimiter is null)
+ fLineDelimiter= styledText_.getLineDelimiter();
- createContextSelector();
- setContexts(contexts);
- displayContextSelector();
- hideContextInfoPopup();
+ createContextSelector();
+ setContexts(contexts);
+ displayContextSelector();
+ hideContextInfoPopup();
- } else if (!autoActivated) {
- styledText.getDisplay().beep();
- }
+ } else if (!autoActivated_) {
+ styledText_.getDisplay().beep();
}
- });
+ }, autoActivated, styledText ));
return getErrorMessage();
}
@@ -159,14 +156,12 @@
* @param position the offset
* @since 2.0
*/
- public void showContextInformation(final IContextInformation info, final int position) {
+ public void showContextInformation(IContextInformation info, int position) {
Control control= fViewer.getTextWidget();
- BusyIndicator.showWhile(control.getDisplay(), new class() Runnable {
- public void run() {
- internalShowContextInfo(info, position);
- hideContextSelector();
- }
- });
+ BusyIndicator.showWhile(control.getDisplay(), dgRunnable( (IContextInformation info_, int position_) {
+ internalShowContextInfo(info_, position_);
+ hideContextSelector();
+ }, info, position));
}
/**
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/link/contentassist/LineBreakingReader.d
--- a/dwtx/jface/internal/text/link/contentassist/LineBreakingReader.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/LineBreakingReader.d Tue Aug 26 02:46:34 2008 +0200
@@ -24,13 +24,8 @@
import dwt.dwthelper.utils;
-
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.Reader;
-
-import com.ibm.icu.text.BreakIterator;
+import dwtx.dwtxhelper.BufferedReader;
+import dwtx.dwtxhelper.mangoicu.UBreakIterator;
import dwt.graphics.GC;
@@ -46,12 +41,12 @@
private String fLine;
private int fOffset;
- private BreakIterator fLineBreakIterator;
+ private UBreakIterator fLineBreakIterator;
private bool fBreakWords;
/**
* Creates a reader that breaks an input text to fit in a given width.
- *
+ *
* @param reader Reader of the input text
* @param gc The graphic context that defines the currently used font sizes
* @param maxLineWidth The max width (pixels) where the text has to fit in
@@ -62,7 +57,7 @@
fMaxWidth= maxLineWidth;
fOffset= 0;
fLine= null;
- fLineBreakIterator= BreakIterator.getLineInstance();
+ fLineBreakIterator= UBreakIterator.getLineInstance();
fBreakWords= true;
}
@@ -73,9 +68,9 @@
/**
* Reads the next line. The lengths of the line will not exceed the given maximum
* width.
- *
- * @return the next line
- * @throws IOException
+ *
+ * @return the next line
+ * @throws IOException
*/
public String readLine() {
if (fLine is null) {
@@ -93,7 +88,7 @@
}
int breakOffset= findNextBreakOffset(fOffset);
String res;
- if (breakOffset !is BreakIterator.DONE) {
+ if (breakOffset !is UBreakIterator.DONE) {
res= fLine.substring(fOffset, breakOffset);
fOffset= findWordBegin(breakOffset);
if (fOffset is fLine.length()) {
@@ -109,7 +104,7 @@
private int findNextBreakOffset(int currOffset) {
int currWidth= 0;
int nextOffset= fLineBreakIterator.following(currOffset);
- while (nextOffset !is BreakIterator.DONE) {
+ while (nextOffset !is UBreakIterator.DONE) {
String word= fLine.substring(currOffset, nextOffset);
int wordWidth= fGC.textExtent(word).x;
int nextWidth= wordWidth + currWidth;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/link/contentassist/PopupCloser2.d
--- a/dwtx/jface/internal/text/link/contentassist/PopupCloser2.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/PopupCloser2.d Tue Aug 26 02:46:34 2008 +0200
@@ -117,15 +117,13 @@
/*
* @see dwt.events.FocusListener#focusLost(dwt.events.FocusEvent)
*/
- public void focusLost(final FocusEvent e) {
+ public void focusLost(FocusEvent e) {
fScrollbarClicked= false;
Display d= fTable.getDisplay();
- d.asyncExec(new class() Runnable {
- public void run() {
- if (Helper2.okToUse(fTable) && !fTable.isFocusControl() && !fScrollbarClicked && fContentAssistant !is null)
- fContentAssistant.popupFocusLost(e);
- }
- });
+ d.asyncExec(dgRunnable((FocusEvent e_) {
+ if (Helper2.okToUse(fTable) && !fTable.isFocusControl() && !fScrollbarClicked && fContentAssistant !is null)
+ fContentAssistant.popupFocusLost(e_);
+ }, e ));
}
/*
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/revisions/Colors.d
--- a/dwtx/jface/internal/text/revisions/Colors.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/Colors.d Tue Aug 26 02:46:34 2008 +0200
@@ -246,7 +246,7 @@
* @return a color hue in [0°, 360°)
* @see RGB#RGB(float, float, float)
*/
- public static float computeHue(final int index) {
+ public static float computeHue(int index) {
Assert.isLegal(index >= 0);
/*
* Base 3 gives a nice partitioning for RGB colors with red, green, blue being the colors
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/revisions/HunkComputer.d
--- a/dwtx/jface/internal/text/revisions/HunkComputer.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/HunkComputer.d Tue Aug 26 02:46:34 2008 +0200
@@ -32,14 +32,14 @@
/**
* Computes the diff hunks from an {@link ILineDiffer}.
- *
+ *
* @since 3.3
*/
public final class HunkComputer {
/**
* Converts the line-based information of {@link ILineDiffer} into {@link Hunk}s, grouping
* contiguous blocks of lines that are changed (added, deleted).
- *
+ *
* @param differ the line differ to query
* @param lines the number of lines to query
* @return the corresponding {@link Hunk} information
@@ -82,8 +82,8 @@
changed= 0;
}
}
-
- return (Hunk[]) hunks.toArray(new Hunk[hunks.size()]);
+
+ return arraycast!(Hunk)( hunks.toArray());
}
private this() {
}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/internal/text/revisions/RevisionPainter.d
--- a/dwtx/jface/internal/text/revisions/RevisionPainter.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/RevisionPainter.d Tue Aug 26 02:46:34 2008 +0200
@@ -20,19 +20,9 @@
import dwtx.jface.internal.text.revisions.Range; // packageimport
import dwtx.jface.internal.text.revisions.RevisionSelectionProvider; // packageimport
-
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
-
-
-
-
-
-
-
import dwt.DWT;
import dwt.custom.StyledText;
import dwt.events.DisposeEvent;
@@ -77,7 +67,7 @@
import dwtx.jface.text.revisions.RevisionEvent;
import dwtx.jface.text.revisions.RevisionInformation;
import dwtx.jface.text.revisions.RevisionRange;
-import dwtx.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode;
+import dwtx.jface.text.revisions.IRevisionRulerColumnExtension;
import dwtx.jface.text.source.Annotation;
import dwtx.jface.text.source.CompositeRuler;
import dwtx.jface.text.source.IAnnotationHover;
@@ -599,7 +589,7 @@
/**
* The revision rendering mode.
*/
- private RenderingMode fRenderingMode= IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE;
+ private IRevisionRulerColumnExtension.RenderingMode fRenderingMode= IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE;
/**
* The required with in characters.
* @since 3.3
@@ -670,7 +660,7 @@
* @param renderingMode the rendering mode
* @since 3.3
*/
- public void setRenderingMode(RenderingMode renderingMode) {
+ public void setRenderingMode(IRevisionRulerColumnExtension.RenderingMode renderingMode) {
Assert.isLegal(renderingMode !is null);
if (fRenderingMode !is renderingMode) {
fRenderingMode= renderingMode;
@@ -1132,7 +1122,7 @@
if ( cast(IAnnotationModelExtension)fAnnotationModel ) {
IAnnotationModelExtension ext= cast(IAnnotationModelExtension) fAnnotationModel;
- ext.replaceAnnotations((Annotation[]) fAnnotations.toArray(new Annotation[fAnnotations.size()]), added);
+ ext.replaceAnnotations(arraycast!(Annotation)( fAnnotations.toArray()), added);
} else {
for (Iterator it= fAnnotations.iterator(); it.hasNext();) {
Annotation annotation= cast(Annotation) it.next();
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/AbstractDocument.d
--- a/dwtx/jface/text/AbstractDocument.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/AbstractDocument.d Tue Aug 26 02:46:34 2008 +0200
@@ -156,15 +156,9 @@
import dwtx.jface.text.ITypedRegion; // packageimport
import dwt.dwthelper.utils;
-
-
import dwtx.dwtxhelper.Collection;
-
-
-
-
-import java.util.regex.PatternSyntaxException;
+// import java.util.regex.PatternSyntaxException;
import dwtx.core.runtime.Assert;
import dwtx.core.runtime.ListenerList;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/DefaultInformationControl.d
--- a/dwtx/jface/text/DefaultInformationControl.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/DefaultInformationControl.d Tue Aug 26 02:46:34 2008 +0200
@@ -175,18 +175,6 @@
import dwtx.jface.resource.JFaceResources;
import dwtx.jface.util.Geometry;
-
-/**
- * Default implementation of {@link dwtx.jface.text.IInformationControl}.
- *
- * Displays textual information in a {@link dwt.custom.StyledText}
- * widget. Before displaying, the information set to this information control is
- * processed by an IInformationPresenter
.
- *
- * @since 2.0
- */
-public class DefaultInformationControl : AbstractInformationControl , DisposeListener {
-
/**
* An information presenter determines the style presentation
* of information displayed in the default information control.
@@ -213,7 +201,7 @@
*/
String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight);
}
-
+ alias IInformationPresenter DefaultInformationControl_IInformationPresenter;
/**
* An information presenter determines the style presentation
@@ -245,8 +233,20 @@
*/
String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight);
}
+ alias IInformationPresenterExtension DefaultInformationControl_IInformationPresenterExtension;
+/**
+ * Default implementation of {@link dwtx.jface.text.IInformationControl}.
+ *
+ * Displays textual information in a {@link dwt.custom.StyledText}
+ * widget. Before displaying, the information set to this information control is
+ * processed by an IInformationPresenter
.
+ *
+ * @since 2.0
+ */
+public class DefaultInformationControl : AbstractInformationControl , DisposeListener {
+
/**
* Inner border thickness in pixels.
* @since 3.1
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/DefaultTextDoubleClickStrategy.d
--- a/dwtx/jface/text/DefaultTextDoubleClickStrategy.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/DefaultTextDoubleClickStrategy.d Tue Aug 26 02:46:34 2008 +0200
@@ -157,21 +157,21 @@
import dwt.dwthelper.utils;
-import java.text.CharacterIterator;
+import dwtx.dwtxhelper.CharacterIterator;
-import com.ibm.icu.text.BreakIterator;
+import dwtx.dwtxhelper.mangoicu.UBreakIterator;
/**
* Standard implementation of
* {@link dwtx.jface.text.ITextDoubleClickStrategy}.
*
- * Selects words using java.text.BreakIterator
for the default
+ * Selects words using java.text.UBreakIterator
for the default
* locale.
* This class is not intended to be subclassed. *
* - * @see java.text.BreakIterator + * @see java.text.UBreakIterator * @noextend This class is not intended to be subclassed by clients. */ public class DefaultTextDoubleClickStrategy : ITextDoubleClickStrategy { @@ -343,15 +343,15 @@ fDocIter.setDocument(document, line); - BreakIterator breakIter= BreakIterator.getWordInstance(); + UBreakIterator breakIter= UBreakIterator.getWordInstance(); breakIter.setText(fDocIter); int start= breakIter.preceding(position); - if (start is BreakIterator.DONE) + if (start is UBreakIterator.DONE) start= line.getOffset(); int end= breakIter.following(position); - if (end is BreakIterator.DONE) + if (end is UBreakIterator.DONE) end= line.getOffset() + line.getLength(); if (breakIter.isBoundary(position)) { diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/DocumentCommand.d --- a/dwtx/jface/text/DocumentCommand.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/DocumentCommand.d Tue Aug 26 02:46:34 2008 +0200 @@ -156,15 +156,8 @@ import dwtx.jface.text.ITypedRegion; // packageimport import dwt.dwthelper.utils; - - import dwtx.dwtxhelper.Collection; - - - -import java.util.NoSuchElementException; - import dwt.events.VerifyEvent; import dwtx.core.runtime.Assert; diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/ListLineTracker.d --- a/dwtx/jface/text/ListLineTracker.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/ListLineTracker.d Tue Aug 26 02:46:34 2008 +0200 @@ -153,13 +153,10 @@ import dwtx.jface.text.ITextViewerExtension4; // packageimport import dwtx.jface.text.ITypedRegion; // packageimport - import dwt.dwthelper.utils; - import dwtx.dwtxhelper.Collection; - -import dwtx.jface.text.AbstractLineTracker.DelimiterInfo; +import dwtx.jface.text.AbstractLineTracker; /** * Abstract, read-only implementation ofILineTracker
. It lets the definition of
@@ -174,7 +171,7 @@
* null
*/
- protected abstract DelimiterInfo nextDelimiterInfo(String text, int offset);
+ protected abstract AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset);
/**
* Creates the line structure for the given text. Newly created lines are inserted into the line
* structure starting at the given position. Returns the number of newly created lines.
- *
+ *
* @param text the text for which to create a line structure
* @param insertPosition the position at which the newly created lines are inserted into the
* tracker's line structure
@@ -445,7 +442,7 @@
int count= 0;
int start= 0;
- DelimiterInfo delimiterInfo= nextDelimiterInfo(text, 0);
+ AbstractLineTracker.DelimiterInfo delimiterInfo= nextDelimiterInfo(text, 0);
while (delimiterInfo !is null && delimiterInfo.delimiterIndex > -1) {
@@ -498,7 +495,7 @@
/**
* Returns the internal data structure, a {@link List} of {@link Line}s. Used only by
* {@link TreeLineTracker#TreeLineTracker(ListLineTracker)}.
- *
+ *
* @return the internal list of lines.
*/
final List getLines() {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/Position.d
--- a/dwtx/jface/text/Position.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/Position.d Tue Aug 26 02:46:34 2008 +0200
@@ -187,7 +187,7 @@
/** The length of the position */
public int length;
/** Indicates whether the position has been deleted */
- public bool isDeleted;
+ public bool isDeleted_;
/**
* Creates a new position with the given offset and length 0.
@@ -221,7 +221,7 @@
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
- int deleted= isDeleted ? 0 : 1;
+ int deleted= isDeleted_ ? 0 : 1;
return (offset << 24) | (length << 16) | deleted;
}
@@ -229,7 +229,7 @@
* Marks this position as deleted.
*/
public void delete_() {
- isDeleted= true;
+ isDeleted_= true;
}
/**
@@ -238,7 +238,7 @@
* @since 2.0
*/
public void undelete() {
- isDeleted= false;
+ isDeleted_= false;
}
/*
@@ -279,7 +279,7 @@
*/
public bool includes(int index) {
- if (isDeleted)
+ if (isDeleted_)
return false;
return (this.offset <= index) && (index < this.offset + length);
@@ -296,7 +296,7 @@
*/
public bool overlapsWith(int rangeOffset, int rangeLength) {
- if (isDeleted)
+ if (isDeleted_)
return false;
int end= rangeOffset + rangeLength;
@@ -319,7 +319,7 @@
* @return true
if position has been deleted
*/
public bool isDeleted() {
- return isDeleted;
+ return isDeleted_;
}
/**
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/RegExMessages.d
--- a/dwtx/jface/text/RegExMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/RegExMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -168,7 +168,7 @@
*/
final class RegExMessages {
- //private static const String RESOURCE_BUNDLE= RegExMessages.class.getName();
+ //private static const String RESOURCE_BUNDLE= RegExMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
static this() {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/TextMessages.d
--- a/dwtx/jface/text/TextMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/TextMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -157,8 +157,7 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/**
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/TextPresentation.d
--- a/dwtx/jface/text/TextPresentation.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/TextPresentation.d Tue Aug 26 02:46:34 2008 +0200
@@ -153,13 +153,9 @@
import dwtx.jface.text.ITextViewerExtension4; // packageimport
import dwtx.jface.text.ITypedRegion; // packageimport
-
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-import java.util.NoSuchElementException;
-
import dwt.DWT;
import dwt.custom.StyleRange;
import dwt.custom.StyledText;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/TreeLineTracker.d
--- a/dwtx/jface/text/TreeLineTracker.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/TreeLineTracker.d Tue Aug 26 02:46:34 2008 +0200
@@ -153,16 +153,11 @@
import dwtx.jface.text.ITextViewerExtension4; // packageimport
import dwtx.jface.text.ITypedRegion; // packageimport
-
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
-
-
import dwtx.core.runtime.Assert;
-import dwtx.jface.text.AbstractLineTracker.DelimiterInfo;
+import dwtx.jface.text.AbstractLineTracker;
/**
* Abstract implementation of ILineTracker
. It lets the definition of line
@@ -803,7 +798,7 @@
private void replaceInternal(Node node, String text, int length, int firstLineDelta) {
// 1) modification on a single line
- DelimiterInfo info= text is null ? null : nextDelimiterInfo(text, 0);
+ AbstractLineTracker.DelimiterInfo info= text is null ? null : nextDelimiterInfo(text, 0);
if (info is null || info.delimiter is null) {
// a) trivial case: insert into a single node, no line mangling
@@ -860,7 +855,7 @@
updateLength(toDelete, -toDelete.length);
}
- DelimiterInfo info= text is null ? null : nextDelimiterInfo(text, 0);
+ AbstractLineTracker.DelimiterInfo info= text is null ? null : nextDelimiterInfo(text, 0);
if (info is null || info.delimiter is null) {
int added= text is null ? 0 : text.length();
@@ -1215,7 +1210,7 @@
* @param offset the offset in the given text
* @return the information of the first found delimiter or null
*/
- protected abstract DelimiterInfo nextDelimiterInfo(String text, int offset);
+ protected abstract AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset);
/*
* @see dwtx.jface.text.ILineTracker#getLineDelimiter(int)
@@ -1231,7 +1226,7 @@
public final int computeNumberOfLines(String text) {
int count= 0;
int start= 0;
- DelimiterInfo delimiterInfo= nextDelimiterInfo(text, start);
+ AbstractLineTracker.DelimiterInfo delimiterInfo= nextDelimiterInfo(text, start);
while (delimiterInfo !is null && delimiterInfo.delimiterIndex > -1) {
++count;
start= delimiterInfo.delimiterIndex + delimiterInfo.delimiterLength;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/CompletionProposalPopup.d
--- a/dwtx/jface/text/contentassist/CompletionProposalPopup.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/CompletionProposalPopup.d Tue Aug 26 02:46:34 2008 +0200
@@ -111,7 +111,7 @@
import dwtx.jface.text.ITextViewer;
import dwtx.jface.text.ITextViewerExtension;
import dwtx.jface.text.TextUtilities;
-import dwtx.jface.text.AbstractInformationControlManager.Anchor;
+import dwtx.jface.text.AbstractInformationControlManager;
import dwtx.jface.util.Geometry;
import dwtx.jface.viewers.StyledString;
@@ -498,7 +498,7 @@
* @param autoActivated true
if auto activation context
* @return an error message or null
in case of no error
*/
- public String showProposals(final bool autoActivated) {
+ public String showProposals(bool autoActivated) {
if (fKeyListener is null)
fKeyListener= new ProposalSelectionListener();
@@ -510,28 +510,26 @@
// when the user types fast.
fContentAssistSubjectControlAdapter.addKeyListener(fKeyListener);
- BusyIndicator.showWhile(control.getDisplay(), new class() Runnable {
- public void run() {
+ BusyIndicator.showWhile(control.getDisplay(), dgRunnable((bool autoActivated_) {
- fInvocationOffset= fContentAssistSubjectControlAdapter.getSelectedRange().x;
- fFilterOffset= fInvocationOffset;
- fLastCompletionOffset= fFilterOffset;
- fComputedProposals= computeProposals(fInvocationOffset);
+ fInvocationOffset= fContentAssistSubjectControlAdapter.getSelectedRange().x;
+ fFilterOffset= fInvocationOffset;
+ fLastCompletionOffset= fFilterOffset;
+ fComputedProposals= computeProposals(fInvocationOffset);
- int count= (fComputedProposals is null ? 0 : fComputedProposals.length);
- if (count is 0 && hideWhenNoProposals(autoActivated))
- return;
+ int count= (fComputedProposals is null ? 0 : fComputedProposals.length);
+ if (count is 0 && hideWhenNoProposals(autoActivated_))
+ return;
- if (count is 1 && !autoActivated && canAutoInsert(fComputedProposals[0])) {
- insertProposal(fComputedProposals[0], cast(wchar) 0, 0, fInvocationOffset);
- hide();
- } else {
- createProposalSelector();
- setProposals(fComputedProposals, false);
- displayProposals();
- }
+ if (count is 1 && !autoActivated_ && canAutoInsert(fComputedProposals[0])) {
+ insertProposal(fComputedProposals[0], cast(wchar) 0, 0, fInvocationOffset);
+ hide();
+ } else {
+ createProposalSelector();
+ setProposals(fComputedProposals, false);
+ displayProposals();
}
- });
+ }, autoActivated ));
} else {
fLastCompletionOffset= fFilterOffset;
handleRepeatedInvocation();
@@ -725,31 +723,41 @@
* @param control the control to watch for focus
* @since 3.2
*/
- private void addCommandSupport(final Control control) {
+ private void addCommandSupport(Control control) {
final KeySequence commandSequence= fContentAssistant.getRepeatedInvocationKeySequence();
if (commandSequence !is null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
- control.addFocusListener(new class() FocusListener {
+ control.addFocusListener(new class(control,commandSequence) FocusListener {
+ Control control_;
+ KeySequence commandSequence_;
+ this(Control a, KeySequence b){
+ control_=a;
+ commandSequence_=b;
+ }
private CommandKeyListener fCommandKeyListener;
public void focusGained(FocusEvent e) {
- if (Helper.okToUse(control)) {
+ if (Helper.okToUse(control_)) {
if (fCommandKeyListener is null) {
- fCommandKeyListener= new CommandKeyListener(commandSequence);
+ fCommandKeyListener= new CommandKeyListener(commandSequence_);
fProposalTable.addKeyListener(fCommandKeyListener);
}
}
}
public void focusLost(FocusEvent e) {
if (fCommandKeyListener !is null) {
- control.removeKeyListener(fCommandKeyListener);
+ control_.removeKeyListener(fCommandKeyListener);
fCommandKeyListener= null;
}
}
});
}
- control.addFocusListener(new class() FocusListener {
+ control.addFocusListener(new class(control) FocusListener {
+ Control control_;
private TraverseListener fTraverseListener;
+ this(Control a){
+ control_=a;
+ }
public void focusGained(FocusEvent e) {
- if (Helper.okToUse(control)) {
+ if (Helper.okToUse(control_)) {
if (fTraverseListener is null) {
fTraverseListener= new class() TraverseListener {
public void keyTraversed(TraverseEvent event) {
@@ -768,7 +776,7 @@
}
public void focusLost(FocusEvent e) {
if (fTraverseListener !is null) {
- control.removeTraverseListener(fTraverseListener);
+ control_.removeTraverseListener(fTraverseListener);
fTraverseListener= null;
}
}
@@ -918,14 +926,17 @@
* @param offset the offset
* @since 2.1
*/
- private void insertProposal(ICompletionProposal p, char trigger, int stateMask, final int offset) {
+ private void insertProposal(ICompletionProposal p, char trigger, int stateMask, int offset) {
fInserting= true;
IRewriteTarget target= null;
- IEditingSupport helper= new class() IEditingSupport {
-
+ IEditingSupport helper= new class(offset) IEditingSupport {
+ int offset_;
+ this(int a){
+ offset_=a;
+ }
public bool isOriginator(DocumentEvent event, IRegion focus) {
- return focus.getOffset() <= offset && focus.getOffset() + focus.getLength() >= offset;
+ return focus.getOffset() <= offset_ && focus.getOffset() + focus.getLength() >= offset_;
}
public bool ownsFocusShell() {
@@ -1505,7 +1516,7 @@
}
}
- return (ICompletionProposal[]) filtered.toArray(new ICompletionProposal[filtered.size()]);
+ return arraycast!(ICompletionProposal)( filtered.toArray());
}
/**
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d
--- a/dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d Tue Aug 26 02:46:34 2008 +0200
@@ -65,7 +65,7 @@
import dwtx.jface.text.IEventConsumer;
import dwtx.jface.text.ITextViewer;
import dwtx.jface.text.ITextViewerExtension;
-import dwtx.jface.text.contentassist.ContextInformationPopup.ContextFrame;
+import dwtx.jface.text.contentassist.ContextInformationPopup;
/**
@@ -391,7 +391,7 @@
*
* @param frame the context frame
*/
- public void installValidator(ContextFrame frame) {
+ public void installValidator(ContextInformationPopup_ContextFrame frame) {
if (fContentAssistSubjectControl !is null) {
if (cast(ISubjectControlContextInformationValidator)frame.fValidator )
(cast(ISubjectControlContextInformationValidator)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fOffset);
@@ -404,7 +404,7 @@
*
* @param frame the context frame
*/
- public void installContextInformationPresenter(ContextFrame frame) {
+ public void installContextInformationPresenter(ContextInformationPopup_ContextFrame frame) {
if (fContentAssistSubjectControl !is null) {
if (cast(ISubjectControlContextInformationPresenter)frame.fPresenter )
(cast(ISubjectControlContextInformationPresenter)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fBeginOffset);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/ContentAssistant.d
--- a/dwtx/jface/text/contentassist/ContentAssistant.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContentAssistant.d Tue Aug 26 02:46:34 2008 +0200
@@ -46,13 +46,9 @@
import dwtx.jface.text.contentassist.IContentAssistantExtension; // packageimport
import dwtx.jface.text.contentassist.JFaceTextMessages; // packageimport
-
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
-
-
+import tango.core.Thread;
import dwt.DWT;
import dwt.DWTError;
@@ -109,22 +105,22 @@
* instantiate this class and configure it before using it.
*/
public class ContentAssistant : IContentAssistant, IContentAssistantExtension, IContentAssistantExtension2, IContentAssistantExtension3, IContentAssistantExtension4, IWidgetTokenKeeper, IWidgetTokenKeeperExtension {
-
-
-
+
+
+
/**
* Content assist command identifier for 'select next proposal'.
- *
+ *
* @since 3.4
*/
public static const String SELECT_NEXT_PROPOSAL_COMMAND_ID= "dwtx.ui.edit.text.contentAssist.selectNextProposal"; //$NON-NLS-1$
/**
* Content assist command identifier for 'select previous proposal'.
- *
+ *
* @since 3.4
*/
public static const String SELECT_PREVIOUS_PROPOSAL_COMMAND_ID= "dwtx.ui.edit.text.contentAssist.selectPreviousProposal"; //$NON-NLS-1$
-
+
/**
* A generic closer class used to monitor various interface events in order to determine whether
@@ -275,7 +271,7 @@
* implementation utilizes a thread to watch for input characters matching the activation
* characters specified by the content assist processor, and if detected, will wait the
* indicated delay interval before activating the content assistant.
- *
+ *
* @since 3.4 protected, was added in 2.1 as private class
*/
protected class AutoAssistListener : KeyAdapter , KeyListener, Runnable, VerifyKeyListener {
@@ -293,7 +289,8 @@
protected void start(int showStyle) {
fShowStyle= showStyle;
- fThread= new Thread(this, JFaceTextMessages.getString("ContentAssistant.assist_delay_timer_name")); //$NON-NLS-1$
+ fThread= new Thread(&run);
+ fThread.name = JFaceTextMessages.getString("ContentAssistant.assist_delay_timer_name"); //$NON-NLS-1$
fThread.start();
}
@@ -344,10 +341,10 @@
// Only act on typed characters and ignore modifier-only events
if (e.character is 0 && (e.keyCode & DWT.KEYCODE_BIT) is 0)
return;
-
+
if (e.character !is 0 && (e.stateMask is DWT.ALT))
return;
-
+
// Only act on characters that are trigger candidates. This
// avoids computing the model selection on every keystroke
if (computeAllAutoActivationTriggers().indexOf(e.character) < 0) {
@@ -386,24 +383,24 @@
keyPressed(event);
}
- protected void showAssist(final int showStyle) {
+ protected void showAssist(int showStyle) {
final Control control= fContentAssistSubjectControlAdapter.getControl();
if (control is null)
return;
-
+
final Display d= control.getDisplay();
if (d is null)
return;
-
+
try {
d.syncExec(new class() Runnable {
public void run() {
if (isProposalPopupActive())
return;
-
+
if (control.isDisposed() || !control.isFocusControl())
return;
-
+
if (showStyle is SHOW_PROPOSALS) {
if (!prepareToShowCompletions(true))
return;
@@ -510,7 +507,7 @@
/**
* Layouts the popup defined by type
at the given widget offset.
- *
+ *
* @param type the kind of popup to layout
* @param offset the widget offset
*/
@@ -623,7 +620,7 @@
/**
* Moves point
such that rectangle
does not bleed outside of
* bounds
. All coordinates must have the same reference.
- *
+ *
* @param point the point to move if needed
* @param shellSize the size of the shell that may be moved
* @param bounds the bounds
@@ -635,10 +632,10 @@
if (point.x < bounds.x)
point.x= bounds.x;
-
+
if (point.y + shellSize.y > bounds.y + bounds.height)
point.y= bounds.y + bounds.height - shellSize.y;
-
+
if (point.y < bounds.y)
point.y= bounds.y;
}
@@ -647,20 +644,20 @@
// clip width
if (rect.width > bounds.width)
rect.width= bounds.width;
-
+
if (rect.x + rect.width > bounds.x + bounds.width)
rect.x= bounds.x + bounds.width - rect.width;
if (rect.x < bounds.x)
rect.x= bounds.x;
-
+
return rect;
}
-
+
/**
* Returns the display bounds for shell
such that it appears right above
* offset
, or below it if above is not suitable. The returned bounds lie
* within the monitor at the caret location and never overlap with the caret line.
- *
+ *
* @param shell the shell to compute the placement for
* @param preferred the preferred size for shell
* @param offset the caret offset in the subject control
@@ -674,7 +671,7 @@
Monitor monitor= getClosestMonitor(display, caret);
Rectangle bounds= monitor.getClientArea();
Geometry.moveInside(caret, bounds);
-
+
int spaceAbove= caret.y - bounds.y;
int caretLowerY= caret.y + caret.height;
int spaceBelow= bounds.y + bounds.height - caretLowerY;
@@ -688,7 +685,7 @@
rect= new Rectangle(caret.x, bounds.y, preferred.x, spaceAbove);
else
rect= new Rectangle(caret.x, caretLowerY, preferred.x, spaceBelow);
-
+
return constrainHorizontally(rect, bounds);
}
@@ -696,7 +693,7 @@
* Returns the display bounds for shell
such that it appears right below
* offset
, or above it if below is not suitable. The returned bounds lie
* within the monitor at the caret location and never overlap with the caret line.
- *
+ *
* @param shell the shell to compute the placement for
* @param preferred the preferred size for shell
* @param offset the caret offset in the subject control
@@ -732,10 +729,10 @@
rect= new Rectangle(caret.x, bounds.y, preferred.x, spaceAbove);
switched= true;
}
-
+
if (popup !is null)
popup.switchedPositionToAbove(switched);
-
+
return constrainHorizontally(rect, bounds);
}
@@ -748,7 +745,7 @@
Rectangle subjectRectangle= new Rectangle(location.x, location.y, 1, fContentAssistSubjectControlAdapter.getLineHeight());
return subjectRectangle;
}
-
+
protected Point getStackedLocation(Shell shell, Shell parent) {
Point p= parent.getLocation();
Point size= parent.getSize();
@@ -782,14 +779,14 @@
break;
}
}
-
+
/**
* Copied from dwtx.jface.window.Window.
* Returns the monitor whose client area contains the given point. If no
* monitor contains the point, returns the monitor that is closest to the
* point. If this is ever made public, it should be moved into a separate
* utility class.
- *
+ *
* @param toSearch
* point to find (display coordinates)
* @param rectangle
@@ -837,7 +834,7 @@
* @see VerifyKeyListener#verifyKey(dwt.events.VerifyEvent)
*/
public void verifyKey(VerifyEvent e) {
- IContentAssistListener[] listeners= (IContentAssistListener[]) fListeners.clone();
+ IContentAssistListener[] listeners= arraycast!(IContentAssistListener)( fListeners.clone() );
for (int i= 0; i < listeners.length; i++) {
if (listeners[i] !is null) {
if (!listeners[i].verifyKey(e) || !e.doit)
@@ -855,7 +852,7 @@
installKeyListener();
- IContentAssistListener[] listeners= (IContentAssistListener[]) fListeners.clone();
+ IContentAssistListener[] listeners= arraycast!(IContentAssistListener)( fListeners.clone() );
for (int i= 0; i < listeners.length; i++) {
if (listeners[i] !is null) {
listeners[i].processEvent(event);
@@ -996,7 +993,7 @@
private bool fIsStatusLineVisible;
/**
* The last system time when auto activation performed.
- *
+ *
* @since 3.2
*/
private long fLastAutoActivation= Long.MIN_VALUE;
@@ -1006,17 +1003,17 @@
* @since 3.2
*/
private KeySequence fRepeatedInvocationKeySequence;
-
+
/**
* Maps handler to command identifiers.
- *
+ *
* @since 3.4
*/
private Map fHandlers;
-
+
/**
* Tells whether colored labels support is enabled.
- *
+ *
* @since 3.4
*/
private bool fIsColoredLabelsSupportEnabled= false;
@@ -1171,7 +1168,7 @@
/**
* This method allows subclasses to provide their own {@link AutoAssistListener}.
- *
+ *
* @return a new auto assist listener
* @since 3.4
*/
@@ -1192,7 +1189,7 @@
/**
* Gets the delay after which the content assistant is automatically invoked if the cursor is
* behind an auto activation character.
- *
+ *
* @return the auto activation delay
* @since 3.4
*/
@@ -1272,7 +1269,7 @@
/**
* Returns the foreground of the context information popup.
- *
+ *
*
* @return the foreground of the context information popup
* @since 2.0
@@ -1439,7 +1436,7 @@
public void uninstall() {
hide();
manageAutoActivation(false);
-
+
if (fHandlers !is null) {
fHandlers.clear();
fHandlers= null;
@@ -1488,10 +1485,10 @@
void layout(int type, int visibleOffset) {
fLayoutManager.layout(type, visibleOffset);
}
-
+
/**
* Returns the layout manager.
- *
+ *
* @return the layout manager
* @since 3.3
*/
@@ -1710,7 +1707,7 @@
/**
* Prepares to show content assist proposals. It returns false if auto activation has kicked in
* recently.
- *
+ *
* @param isAutoActivated whether completion was triggered by auto activation
* @return true
if the caller should continue and show the proposals,
* false
otherwise.
@@ -1721,7 +1718,7 @@
int gracePeriod= Math.max(fAutoActivationDelay, 200);
if (current < fLastAutoActivation + gracePeriod)
return false;
-
+
promoteKeyListener();
fireSessionBeginEvent(isAutoActivated);
return true;
@@ -2197,10 +2194,10 @@
public void enablePrefixCompletion(bool enabled) {
fIsPrefixCompletionEnabled= enabled;
}
-
+
/**
* Returns the prefix completion state.
- *
+ *
* @return true
if prefix completion is enabled, false
otherwise
* @since 3.2
*/
@@ -2237,7 +2234,7 @@
/**
* Fires a session begin event to all registered {@link ICompletionListener}s.
- *
+ *
* @param isAutoActivated true
if this session was triggered by auto activation
* @since 3.2
*/
@@ -2252,7 +2249,7 @@
}
}
}
-
+
/**
* Fires a session restart event to all registered {@link ICompletionListener}s.
*
@@ -2406,17 +2403,17 @@
/**
* Returns the repeated invocation key sequence.
- *
+ *
* @return the repeated invocation key sequence or null
, if none
* @since 3.2
*/
KeySequence getRepeatedInvocationKeySequence() {
return fRepeatedInvocationKeySequence;
}
-
+
/**
* Returns whether proposal popup is active.
- *
+ *
* @return true
if the proposal popup is active, false
otherwise
* @since 3.4
*/
@@ -2426,7 +2423,7 @@
/**
* Returns whether the context information popup is active.
- *
+ *
* @return true
if the context information popup is active, false
otherwise
* @since 3.4
*/
@@ -2436,7 +2433,7 @@
/**
* {@inheritDoc}
- *
+ *
* @since 3.4
*/
public final IHandler getHandler(String commandId) {
@@ -2446,14 +2443,14 @@
IHandler handler= cast(IHandler)fHandlers.get(commandId);
if (handler !is null)
return handler;
-
+
Assert.isLegal(false);
return null;
}
/**
* Registers the given handler under the given command identifier.
- *
+ *
* @param commandId the command identifier
* @param handler the handler
* @since 3.4
@@ -2466,7 +2463,7 @@
/**
* Tells whether the support for colored labels is enabled.
- *
+ *
* @return true
if the support for colored labels is enabled, false
otherwise
* @since 3.4
*/
@@ -2478,7 +2475,7 @@
* Enables the support for colored labels in the proposal popup.
* Completion proposals can implement {@link ICompletionProposalExtension6} * to provide colored proposal labels.
- * + * * @param isEnabled iftrue
the support for colored labels is enabled in the proposal popup
* @since 3.4
*/
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/ContextInformationPopup.d
--- a/dwtx/jface/text/contentassist/ContextInformationPopup.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContextInformationPopup.d Tue Aug 26 02:46:34 2008 +0200
@@ -72,25 +72,6 @@
import dwtx.jface.text.ITextViewer;
import dwtx.jface.text.TextPresentation;
-
-/**
- * This class is used to present context information to the user.
- * If multiple contexts are valid at the current cursor location,
- * a list is presented from which the user may choose one context.
- * Once the user makes their choice, or if there was only a single
- * possible context, the context information is shown in a tool tip like popup. - * If the tool tip is visible and the user wants to see context information of - * a context embedded into the one for which context information is displayed, - * context information for the embedded context is shown. As soon as the - * cursor leaves the embedded context area, the context information for - * the embedding context is shown again. - * - * @see IContextInformation - * @see IContextInformationValidator - */ -class ContextInformationPopup : IContentAssistListener { - - /** * Represents the state necessary for embedding contexts. * @@ -138,6 +119,26 @@ } } + alias ContextFrame ContextInformationPopup_ContextFrame; +/** + * This class is used to present context information to the user. + * If multiple contexts are valid at the current cursor location, + * a list is presented from which the user may choose one context. + * Once the user makes their choice, or if there was only a single + * possible context, the context information is shown in a tool tip like popup.
+ * If the tool tip is visible and the user wants to see context information of
+ * a context embedded into the one for which context information is displayed,
+ * context information for the embedded context is shown. As soon as the
+ * cursor leaves the embedded context area, the context information for
+ * the embedding context is shown again.
+ *
+ * @see IContextInformation
+ * @see IContextInformationValidator
+ */
+class ContextInformationPopup : IContentAssistListener {
+
+
+
private ITextViewer fViewer;
private ContentAssistant fContentAssistant;
@@ -212,66 +213,63 @@
* @param autoActivated true
if auto activated
* @return a potential error message or null
in case of no error
*/
- public String showContextProposals(final bool autoActivated) {
+ public String showContextProposals(bool autoActivated) {
final Control control= fContentAssistSubjectControlAdapter.getControl();
- BusyIndicator.showWhile(control.getDisplay(), new class() Runnable {
- public void run() {
+ BusyIndicator.showWhile(control.getDisplay(), dgRunnable( {
+ int offset= fContentAssistSubjectControlAdapter.getSelectedRange().x;
- int offset= fContentAssistSubjectControlAdapter.getSelectedRange().x;
+ IContextInformation[] contexts= computeContextInformation(offset);
+ int count = (contexts is null ? 0 : contexts.length);
+ if (count is 1) {
- IContextInformation[] contexts= computeContextInformation(offset);
- int count = (contexts is null ? 0 : contexts.length);
- if (count is 1) {
+ ContextFrame frame= createContextFrame(contexts[0], offset);
+ if (isDuplicate(frame))
+ validateContextInformation();
+ else
+ // Show context information directly
+ internalShowContextInfo(frame);
+
+ } else if (count > 0) {
- ContextFrame frame= createContextFrame(contexts[0], offset);
- if (isDuplicate(frame))
+ // if any of the proposed context matches any of the contexts on the stack,
+ // assume that one (so, if context info is invoked repeatedly, the current
+ // info is kept)
+ for (int i= 0; i < contexts.length; i++) {
+ IContextInformation info= contexts[i];
+ ContextFrame frame= createContextFrame(info, offset);
+
+ // check top of stack and stored context
+ if (isDuplicate(frame)) {
validateContextInformation();
- else
- // Show context information directly
- internalShowContextInfo(frame);
-
- } else if (count > 0) {
+ return;
+ }
- // if any of the proposed context matches any of the contexts on the stack,
- // assume that one (so, if context info is invoked repeatedly, the current
- // info is kept)
- for (int i= 0; i < contexts.length; i++) {
- IContextInformation info= contexts[i];
- ContextFrame frame= createContextFrame(info, offset);
+ if (isLastFrame(frame)) {
+ internalShowContextInfo(frame);
+ return;
+ }
- // check top of stack and stored context
- if (isDuplicate(frame)) {
+ // also check all other contexts
+ for (Iterator it= fContextFrameStack.iterator(); it.hasNext(); ) {
+ ContextFrame stackFrame= cast(ContextFrame) it.next();
+ if (stackFrame.equals(frame)) {
validateContextInformation();
return;
}
+ }
+ }
- if (isLastFrame(frame)) {
- internalShowContextInfo(frame);
- return;
- }
+ // otherwise:
+ // Precise context must be selected
- // also check all other contexts
- for (Iterator it= fContextFrameStack.iterator(); it.hasNext(); ) {
- ContextFrame stackFrame= cast(ContextFrame) it.next();
- if (stackFrame.equals(frame)) {
- validateContextInformation();
- return;
- }
- }
- }
+ if (fLineDelimiter is null)
+ fLineDelimiter= fContentAssistSubjectControlAdapter.getLineDelimiter();
- // otherwise:
- // Precise context must be selected
-
- if (fLineDelimiter is null)
- fLineDelimiter= fContentAssistSubjectControlAdapter.getLineDelimiter();
-
- createContextSelector();
- setContexts(contexts);
- displayContextSelector();
- }
+ createContextSelector();
+ setContexts(contexts);
+ displayContextSelector();
}
- });
+ }));
return getErrorMessage();
}
@@ -283,22 +281,20 @@
* @param offset the offset
* @since 2.0
*/
- public void showContextInformation(final IContextInformation info, final int offset) {
+ public void showContextInformation(IContextInformation info, int offset) {
Control control= fContentAssistSubjectControlAdapter.getControl();
- BusyIndicator.showWhile(control.getDisplay(), new class() Runnable {
- public void run() {
- if (info is null)
+ BusyIndicator.showWhile(control.getDisplay(), dgRunnable( {
+ if (info_ is null)
+ validateContextInformation();
+ else {
+ ContextFrame frame= createContextFrame(info_, offset_);
+ if (isDuplicate(frame))
validateContextInformation();
- else {
- ContextFrame frame= createContextFrame(info, offset);
- if (isDuplicate(frame))
- validateContextInformation();
- else
- internalShowContextInfo(frame);
- hideContextSelector();
- }
+ else
+ internalShowContextInfo(frame);
+ hideContextSelector();
}
- });
+ }, info, offset ));
}
/**
@@ -476,7 +472,7 @@
if (bounds.width < size.x)
// we don't fit on the screen - try again and wrap
size= fContextInfoText.computeSize(bounds.width - PAD, DWT.DEFAULT, true);
-
+
size.x += TEXT_PAD;
fContextInfoText.setSize(size);
fContextInfoText.setLocation(1,1);
@@ -579,7 +575,7 @@
/**
* Returns the minimal required height for the popup, may return 0 if the popup has not been
* created yet.
- *
+ *
* @return the minimal height
* @since 3.3
*/
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/JFaceTextMessages.d
--- a/dwtx/jface/text/contentassist/JFaceTextMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/JFaceTextMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -54,7 +54,7 @@
*/
class JFaceTextMessages {
-// private static const String RESOURCE_BUNDLE= JFaceTextMessages.class.getName();
+// private static const String RESOURCE_BUNDLE= JFaceTextMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/contentassist/PopupCloser.d
--- a/dwtx/jface/text/contentassist/PopupCloser.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/contentassist/PopupCloser.d Tue Aug 26 02:46:34 2008 +0200
@@ -190,15 +190,13 @@
/*
* @see dwt.events.FocusListener#focusLost(dwt.events.FocusEvent)
*/
- public void focusLost(final FocusEvent e) {
+ public void focusLost(FocusEvent e) {
fScrollbarClicked= false;
Display d= fTable.getDisplay();
- d.asyncExec(new class() Runnable {
- public void run() {
- if (Helper.okToUse(fTable) && !fTable.isFocusControl() && !fScrollbarClicked && fContentAssistant !is null)
- fContentAssistant.popupFocusLost(e);
- }
- });
+ d.asyncExec(dgRunnable((FocusEvent e_) {
+ if (Helper.okToUse(fTable) && !fTable.isFocusControl() && !fScrollbarClicked && fContentAssistant !is null)
+ fContentAssistant.popupFocusLost(e_);
+ }, e ));
}
/*
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d
--- a/dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d Tue Aug 26 02:46:34 2008 +0200
@@ -62,14 +62,14 @@
/*
* @see dwtx.jface.text.formatter.IFormattingStrategyExtension#formatterStarts(dwtx.jface.text.formatter.IFormattingContext)
*/
- public void formatterStarts(final IFormattingContext context) {
+ public void formatterStarts(IFormattingContext context) {
fPreferences.addLast(context.getProperty(FormattingContextProperties.CONTEXT_PREFERENCES));
}
/*
* @see IFormattingStrategy#formatterStarts(String)
*/
- public void formatterStarts(final String indentation) {
+ public void formatterStarts(String indentation) {
// Do nothing
}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/formatter/MultiPassContentFormatter.d
--- a/dwtx/jface/text/formatter/MultiPassContentFormatter.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/formatter/MultiPassContentFormatter.d Tue Aug 26 02:46:34 2008 +0200
@@ -25,10 +25,8 @@
import dwtx.jface.text.formatter.IFormattingContext; // packageimport
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
import dwtx.core.runtime.Assert;
import dwtx.jface.text.BadLocationException;
import dwtx.jface.text.DefaultPositionUpdater;
@@ -73,7 +71,7 @@
*
* @param category The position category to update its positions
*/
- public this(final String category) {
+ public this(String category) {
super(category);
}
@@ -128,7 +126,7 @@
* @param partitioning the document partitioning for this formatter
* @param type the default content type
*/
- public this(final String partitioning, final String type) {
+ public this(String partitioning, String type) {
fPartitioning= partitioning;
fType= type;
}
@@ -136,7 +134,7 @@
/*
* @see dwtx.jface.text.formatter.IContentFormatterExtension#format(dwtx.jface.text.IDocument, dwtx.jface.text.formatter.IFormattingContext)
*/
- public final void format(final IDocument medium, final IFormattingContext context) {
+ public final void format(IDocument medium, IFormattingContext context) {
context.setProperty(FormattingContextProperties.CONTEXT_MEDIUM, medium);
@@ -163,7 +161,7 @@
/*
* @see dwtx.jface.text.formatter.IContentFormatter#format(dwtx.jface.text.IDocument, dwtx.jface.text.IRegion)
*/
- public final void format(final IDocument medium, final IRegion region) {
+ public final void format(IDocument medium, IRegion region) {
final FormattingContext context= new FormattingContext();
@@ -187,7 +185,7 @@
* @param offset The offset of the region to format
* @param length The length of the region to format
*/
- protected void formatMaster(final IFormattingContext context, final IDocument document, int offset, int length) {
+ protected void formatMaster(IFormattingContext context, IDocument document, int offset, int length) {
try {
@@ -224,7 +222,7 @@
* @param length The length of the region to format
* @param type The content type of the region to format
*/
- protected void formatSlave(final IFormattingContext context, final IDocument document, final int offset, final int length, final String type) {
+ protected void formatSlave(IFormattingContext context, IDocument document, int offset, int length, String type) {
final IFormattingStrategyExtension strategy= cast(IFormattingStrategyExtension)fSlaves.get(type);
if (strategy !is null) {
@@ -252,7 +250,7 @@
* @param offset The offset of the region to format
* @param length The length of the region to format
*/
- protected void formatSlaves(final IFormattingContext context, final IDocument document, final int offset, final int length) {
+ protected void formatSlaves(IFormattingContext context, IDocument document, int offset, int length) {
Map partitioners= new HashMap(0);
try {
@@ -292,7 +290,7 @@
/*
* @see dwtx.jface.text.formatter.IContentFormatter#getFormattingStrategy(java.lang.String)
*/
- public final IFormattingStrategy getFormattingStrategy(final String type) {
+ public final IFormattingStrategy getFormattingStrategy(String type) {
return null;
}
@@ -307,7 +305,7 @@
* @param strategy The master formatting strategy, must implement
* {@link IFormattingStrategyExtension}
*/
- public final void setMasterStrategy(final IFormattingStrategy strategy) {
+ public final void setMasterStrategy(IFormattingStrategy strategy) {
Assert.isTrue( cast(IFormattingStrategyExtension)strategy );
fMaster= cast(IFormattingStrategyExtension) strategy;
}
@@ -325,7 +323,7 @@
* @param type The content type to register this strategy with,
* must implement {@link IFormattingStrategyExtension}
*/
- public final void setSlaveStrategy(final IFormattingStrategy strategy, final String type) {
+ public final void setSlaveStrategy(IFormattingStrategy strategy, String type) {
Assert.isTrue( cast(IFormattingStrategyExtension)strategy );
if (!fType.equals(type))
fSlaves.put(type, strategy);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/hyperlink/AbstractHyperlinkDetector.d
--- a/dwtx/jface/text/hyperlink/AbstractHyperlinkDetector.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/hyperlink/AbstractHyperlinkDetector.d Tue Aug 26 02:46:34 2008 +0200
@@ -80,7 +80,7 @@
* or null
if this object does not
* have an adapter for the given class
*/
- protected final Object getAdapter(Class adapterClass) {
+ protected final Object getAdapter(ClassInfo adapterClass) {
Assert.isLegal(adapterClass !is null);
if (fContext !is null)
return fContext.getAdapter(adapterClass);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/hyperlink/HyperlinkMessages.d
--- a/dwtx/jface/text/hyperlink/HyperlinkMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/hyperlink/HyperlinkMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -37,7 +37,7 @@
* @since 3.4
*/
class HyperlinkMessages {
-// private static const String BUNDLE_NAME= HyperlinkMessages.class.getName();
+// private static const String BUNDLE_NAME= HyperlinkMessages.classinfo.getName();
private static const ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d
--- a/dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d Tue Aug 26 02:46:34 2008 +0200
@@ -25,10 +25,8 @@
import dwtx.jface.text.hyperlink.HyperlinkMessages; // packageimport
import dwtx.jface.text.hyperlink.IHyperlink; // packageimport
-
import dwt.dwthelper.utils;
-
import dwt.DWT;
import dwt.events.KeyAdapter;
import dwt.events.KeyEvent;
@@ -95,7 +93,7 @@
* @see dwtx.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
public Object[] getElements(Object inputElement) {
- return (Object[]) inputElement;
+ return arrayFromObject!(Object)( inputElement);
}
/*
@@ -161,7 +159,7 @@
* @see dwtx.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
*/
public void setInput(Object input) {
- fInput= (IHyperlink[]) input;
+ fInput= arrayFromObject!(IHyperlink)( input);
deferredCreateContent(fParent);
}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/hyperlink/URLHyperlink.d
--- a/dwtx/jface/text/hyperlink/URLHyperlink.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/hyperlink/URLHyperlink.d Tue Aug 26 02:46:34 2008 +0200
@@ -27,8 +27,7 @@
import dwt.dwthelper.utils;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
import dwt.program.Program;
import dwtx.core.runtime.Assert;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/hyperlink/URLHyperlinkDetector.d
--- a/dwtx/jface/text/hyperlink/URLHyperlinkDetector.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/hyperlink/URLHyperlinkDetector.d Tue Aug 26 02:46:34 2008 +0200
@@ -26,12 +26,11 @@
import dwtx.jface.text.hyperlink.HyperlinkMessages; // packageimport
import dwtx.jface.text.hyperlink.IHyperlink; // packageimport
-
import dwt.dwthelper.utils;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.StringTokenizer;
+import dwtx.dwtxhelper.MalformedURLException;
+import dwtx.dwtxhelper.URL;
+import dwtx.dwtxhelper.StringTokenizer;
import dwtx.jface.text.BadLocationException;
import dwtx.jface.text.IDocument;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/projection/Segment.d
--- a/dwtx/jface/text/projection/Segment.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/projection/Segment.d Tue Aug 26 02:46:34 2008 +0200
@@ -45,9 +45,9 @@
/** The corresponding fragment for this segment. */
public Fragment fragment;
/** A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries. */
- public bool isMarkedForStretch;
+ public bool isMarkedForStretch_;
/** A flag indicating that the segment updater should shift this segment when a change happens at its boundaries. */
- public bool isMarkedForShift;
+ public bool isMarkedForShift_;
/**
* Creates a new segment covering the given range.
@@ -63,7 +63,7 @@
* Sets the stretching flag.
*/
public void markForStretch() {
- isMarkedForStretch= true;
+ isMarkedForStretch_= true;
}
/**
@@ -71,14 +71,18 @@
* @return true
if the stretching flag is set, false
otherwise
*/
public bool isMarkedForStretch() {
- return isMarkedForStretch;
+ return isMarkedForStretch_;
+ }
+ public bool isMarkedForStretch(bool v) {
+ isMarkedForStretch_ = v;
+ return isMarkedForStretch();
}
/**
* Sets the shifting flag.
*/
public void markForShift() {
- isMarkedForShift= true;
+ isMarkedForShift_= true;
}
/**
@@ -86,14 +90,18 @@
* @return true
if the shifting flag is set, false
otherwise
*/
public bool isMarkedForShift() {
- return isMarkedForShift;
+ return isMarkedForShift_;
+ }
+ public bool isMarkedForShift(bool v) {
+ isMarkedForShift_ = v;
+ return isMarkedForShift();
}
/**
* Clears the shifting and the stretching flag.
*/
public void clearMark() {
- isMarkedForStretch= false;
- isMarkedForShift= false;
+ isMarkedForStretch_= false;
+ isMarkedForShift_= false;
}
}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/reconciler/AbstractReconcileStep.d
--- a/dwtx/jface/text/reconciler/AbstractReconcileStep.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/reconciler/AbstractReconcileStep.d Tue Aug 26 02:46:34 2008 +0200
@@ -157,7 +157,7 @@
// XXX: not yet performance optimized
Collection collection= new ArrayList(Arrays.asList(results1));
collection.addAll(Arrays.asList(results2));
- return (IReconcileResult[])collection.toArray(new IReconcileResult[collection.size()]);
+ return arraycast!(IReconcileResult)(collection.toArray());
}
/*
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/reconciler/AbstractReconciler.d
--- a/dwtx/jface/text/reconciler/AbstractReconciler.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/reconciler/AbstractReconciler.d Tue Aug 26 02:46:34 2008 +0200
@@ -27,7 +27,7 @@
import dwt.dwthelper.utils;
-
+import tango.core.Thread;
import dwtx.core.runtime.Assert;
import dwtx.core.runtime.IProgressMonitor;
@@ -68,7 +68,8 @@
/**
* Background thread for the reconciling activity.
*/
- class BackgroundThread : Thread {
+ class BackgroundThread {
+ Thread thread;
/** Has the reconciler been canceled. */
private bool fCanceled= false;
@@ -86,9 +87,14 @@
* @param name the thread's name
*/
public this(String name) {
- super(name);
- setPriority(Thread.MIN_PRIORITY);
- setDaemon(true);
+ thread = new Thread( &run );
+ thread.name = name;
+ thread.priority = Thread.MIN_PRIORITY;
+ thread.isDaemon(true);
+ }
+
+ public void start(){
+ thread.start();
}
/**
@@ -398,7 +404,7 @@
public void setIsIncrementalReconciler(bool isIncremental) {
fIsIncrementalReconciler= isIncremental;
}
-
+
/**
* Tells the reconciler whether it is allowed to change the document
* inside its reconciler thread.
@@ -527,11 +533,11 @@
if (e.getLength() is 0 && e.getText() !is null) {
// Insert
fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getText().length(), DirtyRegion.INSERT, e.getText()));
-
+
} else if (e.getText() is null || e.getText().length() is 0) {
// Remove
fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getLength(), DirtyRegion.REMOVE, null));
-
+
} else {
// Replace (Remove + Insert)
fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getLength(), DirtyRegion.REMOVE, null));
@@ -572,7 +578,7 @@
if (fThread.isActive())
fProgressMonitor.setCanceled(true);
-
+
if (fIsIncrementalReconciler) {
DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), fDocument.get());
createDirtyRegion(e);
@@ -609,11 +615,11 @@
*/
protected void reconcilerReset() {
}
-
+
/**
* Tells whether the code is running in this reconciler's
* background thread.
- *
+ *
* @return true
if running in this reconciler's background thread
* @since 3.4
*/
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/revisions/IRevisionRulerColumnExtension.d
--- a/dwtx/jface/text/revisions/IRevisionRulerColumnExtension.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/revisions/IRevisionRulerColumnExtension.d Tue Aug 26 02:46:34 2008 +0200
@@ -26,6 +26,11 @@
import dwtx.core.runtime.Assert;
import dwtx.jface.viewers.ISelectionProvider;
+ static this(){
+ IRevisionRulerColumnExtension.AUTHOR= new IRevisionRulerColumnExtension.RenderingMode("Author"); //$NON-NLS-1$
+ IRevisionRulerColumnExtension.AGE= new IRevisionRulerColumnExtension.RenderingMode("Age"); //$NON-NLS-1$
+ IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE= new IRevisionRulerColumnExtension.RenderingMode("Both"); //$NON-NLS-1$
+ }
/**
* Extension interface for {@link IRevisionRulerColumn}.
@@ -33,12 +38,12 @@
* Introduces the ability to register a selection listener on revisions and configurable rendering
* modes.
*
@@ -68,58 +73,58 @@ * The coloring scheme can change in future releases. *
*/ - RenderingMode AGE= new RenderingMode("Age"); //$NON-NLS-1$ + static const RenderingMode AGE; /** * Rendering mode that assigns unique colors per revision author and - * uses different color intensity depending on the age. + * uses different color intensity depending on the age. ** Currently it selects lighter colors for older revisions and more intense * colors for more recent revisions. * The coloring scheme can change in future releases. *
*/ - RenderingMode AUTHOR_SHADED_BY_AGE= new RenderingMode("Both"); //$NON-NLS-1$ + static const RenderingMode AUTHOR_SHADED_BY_AGE; /** * Changes the rendering mode and triggers redrawing if needed. - * + * * @param mode the rendering mode */ void setRevisionRenderingMode(RenderingMode mode); - + /** * Enables showing the revision id. - * + * * @param showtrue
to show the revision, false
to hide it
*/
void showRevisionId(bool show);
-
+
/**
* Enables showing the revision author.
- *
+ *
* @param show true
to show the author, false
to hide it
*/
void showRevisionAuthor(bool show);
-
+
/**
* Returns the revision selection provider.
- *
+ *
* @return the revision selection provider
*/
ISelectionProvider getRevisionSelectionProvider();
-
+
/**
* Adds a revision listener that will be notified when the displayed revision information
* changes.
- *
+ *
* @param listener the listener to add
*/
void addRevisionListener(IRevisionListener listener);
-
+
/**
* Removes a previously registered revision listener; nothing happens if listener
* was not registered with the receiver.
- *
+ *
* @param listener the listener to remove
*/
void removeRevisionListener(IRevisionListener listener);
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/revisions/Revision.d
--- a/dwtx/jface/text/revisions/Revision.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/revisions/Revision.d Tue Aug 26 02:46:34 2008 +0200
@@ -21,12 +21,8 @@
import dwt.dwthelper.utils;
-
import dwtx.dwtxhelper.Collection;
-
-import java.util.Date;
-
-
+import dwtx.dwtxhelper.Date;
import dwt.graphics.RGB;
import dwtx.jface.internal.text.revisions.ChangeRegion;
@@ -39,7 +35,7 @@
* * Clients may subclass. *
- * + * * @since 3.2 */ public abstract class Revision { @@ -48,7 +44,7 @@ /** * The cached list of adjusted ranges, element type: {@link RevisionRange}.null
* if the list must be re-computed. Unmodifiable.
- *
+ *
* @since 3.3
*/
private List fRanges= null;
@@ -62,7 +58,7 @@
/**
* Adds a line range to this revision. The range must be non-empty and have a legal start line
* (not -1).
- *
+ *
* @param range a line range that was changed with this revision
* @throws IndexOutOfBoundsException if the line range is empty or has a negative start line
*/
@@ -74,7 +70,7 @@
* Returns the contained {@link RevisionRange}s adapted to the current diff state. The returned
* information is only valid at the moment it is returned, and may change as the annotated
* document is modified.
- *
+ *
* @return an unmodifiable view of the contained ranges (element type: {@link RevisionRange})
*/
public final List getRegions() {
@@ -95,7 +91,7 @@
/**
* Adjusts the revision information to the given diff information. Any previous diff information
* is discarded.
- *
+ *
* @param hunks the diff hunks to adjust the revision information to
* @since 3.3
*/
@@ -119,7 +115,7 @@
* must be able process the given object. If the default information control creator is used
* the supported format is simple text, full HTML or an HTML fragment.
*
- *
+ *
* @return the hover information for this revision or null
for no hover
* @see RevisionInformation#setHoverControlCreator(IInformationControlCreator)
*/
@@ -131,7 +127,7 @@
* * Revisions from the same author must return the same color and revisions from different authors * must return distinct colors.
- * + * * @return the RGB color for this revision's author */ public abstract RGB getColor(); @@ -139,14 +135,14 @@ /** * Returns the unique (within the document) id of this revision. This may be the version string * or a different identifier. - * + * * @return the id of this revision */ public abstract String getId(); /** * Returns the modification date of this revision. - * + * * @return the modification date of this revision */ public abstract Date getDate(); @@ -163,7 +159,7 @@ ** Subclasses should replace - the default implementation returns the empty string. *
- * + * * @return the author name * @since 3.3 */ diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/revisions/RevisionInformation.d --- a/dwtx/jface/text/revisions/RevisionInformation.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/revisions/RevisionInformation.d Tue Aug 26 02:46:34 2008 +0200 @@ -39,30 +39,30 @@ ** Clients may instantiate. *
- * + * * @since 3.2 * @see Revision */ public final class RevisionInformation : ITextHoverExtension, IInformationProviderExtension2 { /** The revisions, element type: {@link Revision}. */ - private const List fRevisions= new ArrayList(); + private const List fRevisions; /** A unmodifiable view offRevisions
. */
- private const List fRORevisions= Collections.unmodifiableList(fRevisions);
+ private const List fRORevisions;
/**
* The flattened list of {@link RevisionRange}s, unmodifiable. null
if the list
* must be re-computed.
- *
+ *
* @since 3.3
*/
private List fRanges= null;
-
+
/**
* The hover control creator. Can be null
.
*
* @since 3.3
*/
private IInformationControlCreator fHoverControlCreator;
-
+
/**
* The information presenter control creator. Can be null
.
*
@@ -74,11 +74,13 @@
* Creates a new revision information model.
*/
public this() {
+ fRevisions= new ArrayList();
+ fRORevisions= Collections.unmodifiableList(fRevisions);
}
/**
* Adds a revision.
- *
+ *
* @param revision a revision
*/
public void addRevision(Revision revision) {
@@ -88,7 +90,7 @@
/**
* Returns the contained revisions.
- *
+ *
* @return an unmodifiable view of the contained revisions (element type: {@link Revision})
*/
public List getRevisions() {
@@ -100,7 +102,7 @@
* at the moment it is returned, and may change as the annotated document is modified. See
* {@link IRevisionListener} for a way to be informed when the revision information changes. The
* returned list is sorted by document offset.
- *
+ *
* @return an unmodifiable view of the line ranges (element type: {@link RevisionRange})
* @see IRevisionListener
* @since 3.3
@@ -130,7 +132,7 @@
/**
* Adjusts the revision information to the given diff information. Any previous diff information is discarded. Note: This is an internal framework method and must not be called by clients.
- *
+ *
* @param hunks the diff hunks to adjust the revision information to
* @since 3.3
* @noreference This method is not intended to be referenced by clients.
@@ -157,14 +159,14 @@
public IInformationControlCreator getInformationPresenterControlCreator() {
return fInformationPresenterControlCreator;
}
-
+
/**
* Sets the hover control creator.
* * Note: The created information control must be able to display the object * returned by the concrete implementation of {@link Revision#getHoverInfo()}. *
- * + * * @param creator the control creator * @since 3.3 */ @@ -174,7 +176,7 @@ /** * Sets the information presenter control creator. - * + * * @param creator the control creator * @since 3.3 */ diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/AnnotationModel.d --- a/dwtx/jface/text/source/AnnotationModel.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/AnnotationModel.d Tue Aug 26 02:46:34 2008 +0200 @@ -74,17 +74,9 @@ import dwtx.jface.text.source.OverviewRuler; // packageimport import dwtx.jface.text.source.OverviewRulerHoverManager; // packageimport - import dwt.dwthelper.utils; - import dwtx.dwtxhelper.Collection; - - - - -import java.util.NoSuchElementException; - import dwtx.core.runtime.Assert; import dwtx.jface.text.AbstractDocument; import dwtx.jface.text.BadLocationException; diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/AnnotationPainter.d --- a/dwtx/jface/text/source/AnnotationPainter.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/AnnotationPainter.d Tue Aug 26 02:46:34 2008 +0200 @@ -118,21 +118,6 @@ import dwtx.jface.text.TextPresentation; -/** - * Paints decorations for annotations provided by an annotation model and/or - * highlights them in the associated source viewer. - *- * The annotation painter can be configured with drawing strategies. A drawing - * strategy defines the visual presentation of a particular type of annotation - * decoration.
- *- * Clients usually instantiate and configure objects of this class.
- * - * @since 2.1 - */ -public class AnnotationPainter : IPainter, PaintListener, IAnnotationModelListener, IAnnotationModelListenerExtension, ITextPresentationListener { - - /** * A drawing strategy draws the decoration for an annotation onto the text widget. * @@ -163,6 +148,22 @@ void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color); } + alias IDrawingStrategy AnnotationPainter_IDrawingStrategy; + +/** + * Paints decorations for annotations provided by an annotation model and/or + * highlights them in the associated source viewer. + *+ * The annotation painter can be configured with drawing strategies. A drawing + * strategy defines the visual presentation of a particular type of annotation + * decoration.
+ *+ * Clients usually instantiate and configure objects of this class.
+ * + * @since 2.1 + */ +public class AnnotationPainter : IPainter, PaintListener, IAnnotationModelListener, IAnnotationModelListenerExtension, ITextPresentationListener { + /** * Squiggles drawing strategy. * @@ -931,7 +932,7 @@ * @return the annotation painter * @since 3.0 */ - private Object getPaintingStrategy(final String type) { + private Object getPaintingStrategy(String type) { Object strategy= fCachedAnnotationType2PaintingStrategy.get(type); if (strategy !is null) return strategy; @@ -966,7 +967,7 @@ * @return the color * @since 3.0 */ - private Color getColor(final Object annotationType) { + private Color getColor(Object annotationType) { Color color= cast(Color)fCachedAnnotationType2Color.get(annotationType); if (color !is null) return color; @@ -1091,7 +1092,7 @@ /* * @see dwtx.jface.text.source.IAnnotationModelListener#modelChanged(dwtx.jface.text.source.IAnnotationModel) */ - public synchronized void modelChanged(final IAnnotationModel model) { + public synchronized void modelChanged(IAnnotationModel model) { if (DEBUG) System.err.println("AP: OLD API of AnnotationModelListener called"); //$NON-NLS-1$ @@ -1101,7 +1102,7 @@ /* * @see dwtx.jface.text.source.IAnnotationModelListenerExtension#modelChanged(dwtx.jface.text.source.AnnotationModelEvent) */ - public void modelChanged(final AnnotationModelEvent event) { + public void modelChanged(AnnotationModelEvent event) { Display textWidgetDisplay; try { StyledText textWidget= fTextWidget; @@ -1136,12 +1137,10 @@ // changes any more. If the document gets modified between // now and running the posted runnable, the position information // is not accurate any longer. - textWidgetDisplay.asyncExec(new class() Runnable { - public void run() { - if (fTextWidget !is null && !fTextWidget.isDisposed()) - updatePainting(event); - } - }); + textWidgetDisplay.asyncExec( dgRunnable( (Event event_){ + if (fTextWidget !is null && !fTextWidget.isDisposed()) + updatePainting(event_); + }, event )); } } diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/CompositeRuler.d --- a/dwtx/jface/text/source/CompositeRuler.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/CompositeRuler.d Tue Aug 26 02:46:34 2008 +0200 @@ -74,16 +74,8 @@ import dwtx.jface.text.source.OverviewRuler; // packageimport import dwtx.jface.text.source.OverviewRulerHoverManager; // packageimport - import dwt.dwthelper.utils; - - import dwtx.dwtxhelper.Collection; -import java.util.EventListener; - - - - import dwt.DWT; import dwt.custom.StyledText; @@ -190,7 +182,7 @@ * Keeps the information for which event type a listener object has been added. */ static class ListenerInfo { - Class fClass; + ClassInfo fClass; EventListener fListener; } @@ -239,7 +231,7 @@ * @param control the control to add the listener to * @param listener the listener to be added */ - private void addListener(Class clazz, Control control, EventListener listener) { + private void addListener(ClassInfo clazz, Control control, EventListener listener) { if (ControlListener.classinfo.opEquals(clazz)) { control. addControlListener(cast(ControlListener) listener); return; @@ -290,7 +282,7 @@ * @param control the control to remove the listener from * @param listener the listener to be removed */ - private void removeListener(Class clazz, Control control, EventListener listener) { + private void removeListener(ClassInfo clazz, Control control, EventListener listener) { if (ControlListener.classinfo.opEquals(clazz)) { control. removeControlListener(cast(ControlListener) listener); return; @@ -340,7 +332,7 @@ * @param clazz the listener type * @param listener the listener object */ - private void addListener(Class clazz, EventListener listener) { + private void addListener(ClassInfo clazz, EventListener listener) { Control[] children= getChildren(); for (int i= 0; i < children.length; i++) { if (children[i] !is null && !children[i].isDisposed()) @@ -360,7 +352,7 @@ * @param clazz the listener type * @param listener the listener object */ - private void removeListener(Class clazz, EventListener listener) { + private void removeListener(ClassInfo clazz, EventListener listener) { int length= fCachedListeners.size(); for (int i= 0; i < length; i++) { ListenerInfo info= cast(ListenerInfo) fCachedListeners.get(i); diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/ICharacterPairMatcher.d --- a/dwtx/jface/text/source/ICharacterPairMatcher.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/ICharacterPairMatcher.d Tue Aug 26 02:46:34 2008 +0200 @@ -97,11 +97,11 @@ /** * Indicates the anchor value "right". */ - int RIGHT= 0; + static const int RIGHT= 0; /** * Indicates the anchor value "left". */ - int LEFT= 1; + static const int LEFT= 1; /** diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/ISourceViewer.d --- a/dwtx/jface/text/source/ISourceViewer.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/ISourceViewer.d Tue Aug 26 02:46:34 2008 +0200 @@ -130,36 +130,36 @@ * Text operation code for requesting content assist to show completion * proposals for the current insert position. */ - int CONTENTASSIST_PROPOSALS= ITextOperationTarget.STRIP_PREFIX + 1; + static const int CONTENTASSIST_PROPOSALS= ITextOperationTarget.STRIP_PREFIX + 1; /** * Text operation code for requesting content assist to show * the content information for the current insert position. */ - int CONTENTASSIST_CONTEXT_INFORMATION= ITextOperationTarget.STRIP_PREFIX + 2; + static const int CONTENTASSIST_CONTEXT_INFORMATION= ITextOperationTarget.STRIP_PREFIX + 2; /** * Text operation code for formatting the selected text or complete document * of this viewer if the selection is empty. */ - int FORMAT= ITextOperationTarget.STRIP_PREFIX + 3; + static const int FORMAT= ITextOperationTarget.STRIP_PREFIX + 3; /** * Text operation code for requesting information at the current insertion position. * @since 2.0 */ - int INFORMATION= ITextOperationTarget.STRIP_PREFIX + 4; + static const int INFORMATION= ITextOperationTarget.STRIP_PREFIX + 4; /* * XXX: Cannot continue numbering due to operation codes used in ProjectionViewer - */ + */ /** * Text operation code for requesting quick assist. This will normally * show quick assist and quick fix proposals for the current position. * @since 3.2 */ - int QUICK_ASSIST= ITextOperationTarget.STRIP_PREFIX + 10; + static const int QUICK_ASSIST= ITextOperationTarget.STRIP_PREFIX + 10; /** * Configures the source viewer using the given configuration. Prior to 3.0 this diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/JFaceTextMessages.d --- a/dwtx/jface/text/source/JFaceTextMessages.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/text/source/JFaceTextMessages.d Tue Aug 26 02:46:34 2008 +0200 @@ -79,8 +79,7 @@ import dwt.dwthelper.utils; import dwt.dwthelper.ResourceBundle; - -import com.ibm.icu.text.MessageFormat; +import dwtx.dwtxhelper.MessageFormat; /** * Accessor for theJFaceTextMessages.properties
file in
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/SourceViewerConfiguration.d
--- a/dwtx/jface/text/source/SourceViewerConfiguration.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/source/SourceViewerConfiguration.d Tue Aug 26 02:46:34 2008 +0200
@@ -411,7 +411,7 @@
* @return an information presenter null
if no information presenter should be installed
* @since 2.0
*/
- public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
+ public dwtx.jface.text.information.IInformationPresenter.IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
return null;
}
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/projection/ProjectionSummary.d
--- a/dwtx/jface/text/source/projection/ProjectionSummary.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionSummary.d Tue Aug 26 02:46:34 2008 +0200
@@ -25,7 +25,7 @@
import dwt.dwthelper.utils;
-
+import tango.core.Thread;
import dwtx.dwtxhelper.Collection;
@@ -53,17 +53,19 @@
*/
class ProjectionSummary {
- private class Summarizer : Thread {
+ private class Summarizer {
+ Thread thread;
private bool fReset= true;
/**
* Creates a new thread.
*/
public this() {
+ thread = new Thread( &run );
fProgressMonitor= new NullProgressMonitor(); // might be given by client in the future
- setDaemon(true);
- start();
+ thread.isDaemon(true);
+ thread.start();
}
/**
@@ -182,7 +184,7 @@
removeSummaries(monitor);
-
+
if (isCanceled(monitor))
return;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/projection/ProjectionSupport.d
--- a/dwtx/jface/text/source/projection/ProjectionSupport.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionSupport.d Tue Aug 26 02:46:34 2008 +0200
@@ -97,7 +97,7 @@
}
}
- private static class ProjectionDrawingStrategy : AnnotationPainter.IDrawingStrategy {
+ private static class ProjectionDrawingStrategy : AnnotationPainter_IDrawingStrategy {
/*
* @see dwtx.jface.text.source.AnnotationPainter.IDrawingStrategy#draw(dwt.graphics.GC, dwt.custom.StyledText, int, int, dwt.graphics.Color)
*/
@@ -178,7 +178,7 @@
/**
* @since 3.1
*/
- private AnnotationPainter.IDrawingStrategy fDrawingStrategy;
+ private AnnotationPainter_IDrawingStrategy fDrawingStrategy;
/**
* Creates new projection support for the given projection viewer. Initially,
@@ -266,7 +266,7 @@
* strategy to the default
* @since 3.1
*/
- public void setAnnotationPainterDrawingStrategy(AnnotationPainter.IDrawingStrategy strategy) {
+ public void setAnnotationPainterDrawingStrategy(AnnotationPainter_IDrawingStrategy strategy) {
fDrawingStrategy= strategy;
}
@@ -276,7 +276,7 @@
* @return the drawing strategy to be used by the support's annotation painter
* @since 3.1
*/
- private AnnotationPainter.IDrawingStrategy getDrawingStrategy() {
+ private AnnotationPainter_IDrawingStrategy getDrawingStrategy() {
if (fDrawingStrategy is null)
fDrawingStrategy= new ProjectionDrawingStrategy();
return fDrawingStrategy;
@@ -371,7 +371,7 @@
* @return the adapter or null
*
*/
- public Object getAdapter(ISourceViewer viewer, Class required) {
+ public Object getAdapter(ISourceViewer viewer, ClassInfo required) {
if (ProjectionAnnotationModel.classinfo ==/*eq*/ required) {
if ( cast(ProjectionViewer)viewer ) {
ProjectionViewer projectionViewer= cast(ProjectionViewer) viewer;
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/source/projection/ProjectionViewer.d
--- a/dwtx/jface/text/source/projection/ProjectionViewer.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionViewer.d Tue Aug 26 02:46:34 2008 +0200
@@ -898,7 +898,7 @@
*
* @param event the annotation model event
*/
- protected final void postCatchupRequest(final AnnotationModelEvent event) {
+ protected final void postCatchupRequest(AnnotationModelEvent event) {
synchronized (fLock) {
fPendingRequests.add(event);
if (fPendingRequests.size() is 1) {
@@ -1717,7 +1717,7 @@
if (position !is null && position.overlapsWith(modelSelection.getOffset(), modelSelection.getLength()) && modelRange2WidgetRange(position) !is null)
positions.add(position);
}
- return (Position[]) positions.toArray(new Position[positions.size()]);
+ return arraycast!(Position)( positions.toArray());
}
/*
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/templates/JFaceTextTemplateMessages.d
--- a/dwtx/jface/text/templates/JFaceTextTemplateMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/templates/JFaceTextTemplateMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -35,15 +35,14 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/**
* @since 3.0
*/
class JFaceTextTemplateMessages {
-// private static const String RESOURCE_BUNDLE= JFaceTextTemplateMessages.class.getName();
+// private static const String RESOURCE_BUNDLE= JFaceTextTemplateMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
static this() {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/templates/TextTemplateMessages.d
--- a/dwtx/jface/text/templates/TextTemplateMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/templates/TextTemplateMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -35,15 +35,14 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/*
* @since 3.0
*/
class TextTemplateMessages {
-// private static const String RESOURCE_BUNDLE= TextTemplateMessages.class.getName();
+// private static const String RESOURCE_BUNDLE= TextTemplateMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
static this() {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/jface/text/templates/persistence/TemplatePersistenceMessages.d
--- a/dwtx/jface/text/templates/persistence/TemplatePersistenceMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplatePersistenceMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -20,15 +20,14 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/**
* @since 3.0
*/
class TemplatePersistenceMessages {
-// private static const String RESOURCE_BUNDLE= TemplatePersistenceMessages.class.getName();
+// private static const String RESOURCE_BUNDLE= TemplatePersistenceMessages.classinfo.getName();
private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
static this() {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/text/edits/TextEditMessages.d
--- a/dwtx/text/edits/TextEditMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/text/edits/TextEditMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -38,8 +38,7 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
class TextEditMessages {
diff -r 7f75eaa8103a -r 25f1f92fa3df dwtx/text/undo/UndoMessages.d
--- a/dwtx/text/undo/UndoMessages.d Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/text/undo/UndoMessages.d Tue Aug 26 02:46:34 2008 +0200
@@ -22,8 +22,7 @@
import dwt.dwthelper.utils;
import dwt.dwthelper.ResourceBundle;
-
-import com.ibm.icu.text.MessageFormat;
+import dwtx.dwtxhelper.MessageFormat;
/**
* Helper class to get NLSed messages.