Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Could EASE helper modules have only a static public interface?

Hi

On 25.11.2014 19:39, Paul D. Fernhout wrote:
> org.eclipse.ease.modules.platform.UIModule.setClipboard("hello");

Java class "org.eclipse.ease.modules.platform.UIModule" has no public instance field or method named "setClipboard".

> org.eclipse.ease.modules.platform.UIModule().setClipboard("hello");

    [null]

First I was not aware that you may skip the "new" keyword in js, thanks for showing me a new trick :)

For the functions: some methods require access to the running script engine. Eg resources need it to resolve relative files. Same applies for UIModule.executeUI(). Does not work for static methods as we need engine specific information here. As multiple engines might run concurrently, we cannot use statics here.

Some other methods could be static, so we can think of changing them. Question is, if this helps, because your first example of accessing methods would only work for some methods, while the latter would work for any method.

--
Christian


Back to the top