Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello All,
I'm trying to develop a custom widget. After my code changes, I use to import the extension file into TWX Composer and test it.
This process takes time for each minor change.
Is there any other option to run in Eclipse IDE level and test it?
-MK
Solved! Go to Solution.
You could potentially do this, but you'd need to have a very good separation of your widget code from code that could run independently. Even then, you wouldn't be able to fully test your widget since the parts that depend on the Thingworx runtime won't run outside of it - just the parts that don't directly depend on Thingworx.
Alternatively, you could consider using a build script such as the one used by this widget which contains a task that increments the extension version, creates the zip package and uploads the extension to Thingworx. This way you could just assign that task to a build shortcut (e.g. ctrl+b) and use it to quickly deploy your changes to the Thingworx server for testing. Additionally this would let you use a different javascript ide if you prefer, such as visual studio code.
Another option, though more complex, would be to use a template such as demo webpack widget that has a series of tasks predefined but is a completely different way of building widgets that is not supported by PTC.
Hello @MM_10109894 ,
pls check the below given link of the thread having same issue:
Kindly revert back if you have any further queries.
Regards
Bhawna
Hello,
If you are using Ant to build the JAR, you can try to update Ant file in order to include:
It is still not testable inside Eclipse but you will gain a lot of time.
Hope it helps.
You could potentially do this, but you'd need to have a very good separation of your widget code from code that could run independently. Even then, you wouldn't be able to fully test your widget since the parts that depend on the Thingworx runtime won't run outside of it - just the parts that don't directly depend on Thingworx.
Alternatively, you could consider using a build script such as the one used by this widget which contains a task that increments the extension version, creates the zip package and uploads the extension to Thingworx. This way you could just assign that task to a build shortcut (e.g. ctrl+b) and use it to quickly deploy your changes to the Thingworx server for testing. Additionally this would let you use a different javascript ide if you prefer, such as visual studio code.
Another option, though more complex, would be to use a template such as demo webpack widget that has a series of tasks predefined but is a completely different way of building widgets that is not supported by PTC.
I am doing it very similar to how BogdanM suggested.
I added in my ANT task dependency chain 2 tasks that increment the version, then, after packaging, it uploads the widget to ThingWorx.