[jbosstools-dev] Create a new Drools 5 Runtime programmatically
Vlado Pakan
vpakan at redhat.com
Wed Apr 7 08:45:24 EDT 2010
Hi Kris,
Now it works. Thanks a lot for your help.
Vlado.
Kris Verlaenen wrote:
> Vlado,
>
> If you also need to create a new Drools runtime, simply use
> DroolsRuntimeManager.createDefaultRuntime(String location). Note that
> this only creates the runtime, you still need to register the runtime
> after that as I showed before.
>
> Kris
>
> Vlado Pakan wrote:
>> Hi Kris,
>>
>> It's not working as I need. Runtime is added to Drools preferences
>> but is not created. I need to accomplish exactly the same situation
>> as when user choose button Create a new Drools 5 Runtime.
>>
>> It has to create new Drools Runtime and copy all needed jar files to
>> specified location and make this Drools runtime possible to use as
>> runtime for newly created Drools project.
>>
>> I don't install any additional Drools runtime.
>>
>> Can you help me with this please?
>>
>> Thanks, Vlado.
>>
>> Kris Verlaenen wrote:
>>> Vlado,
>>>
>>> The runtimes setting is just a preference in the Eclipse preference
>>> store. You can use
>>> DroolsRuntimeManager.setDroolsRuntimes(DroolsRuntime[] runtimes) for
>>> creating that.
>>> http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/util/DroolsRuntimeManager.java
>>>
>>>
>>> You should create a DroolsRuntime with:
>>> - name: just give it some name
>>> - path: the (top-level) directory that contains the Drools runtime jars
>>> - default: set this to true if you only have one, you should always
>>> have one default runtime
>>> - jars: the list of jars that have been detected, best to leave this
>>> null and then call DroolsRuntimeManager.recognizejars(DroolsRuntime
>>> runtime) to populate the list
>>>
>>> Hope this helps.
>>>
>>> Kris
>>>
>>> Andersen Max wrote:
>>>> please start using jbosstools-dev for such dev related questions.
>>>>
>>>> Kris and/or Snjezana should be able to help you with this.
>>>>
>>>> /max
>>>>
>>>> On Apr 7, 2010, at 12:22, Vlado Pakan wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I need to test Drools Tools using SWTBot.
>>>>>
>>>>> To accomplish this I need to Create a new Drools 5 Runtime. User
>>>>> can Create new Drools runtime choosing menu Window > Preferences >
>>>>> Drools > Installed Drools Runtimes > Add... > Create a new Drools
>>>>> 5 Runtime. This open native dialog for new runtime directory
>>>>> selection.
>>>>>
>>>>> Unfortunately SWTBot is not able to handle native dialogs so I'm
>>>>> not able to use SWTBot to create this runtime but I need this it
>>>>> for following SWTBot tests.
>>>>>
>>>>> Can somebody give me instructions how to create Drools Runtime
>>>>> programmatically from the test plugin?
>>>>>
>>>>> Any help appreciated.
>>>>>
>>>>> Thanks, Vlado.
>>>>>
>>>>>
>>>>
>>>>
More information about the jbosstools-dev
mailing list