View Full Version : Minimum Eclipse Project configuration and nature required to make Sencha plugin work?

12 Jan 2016, 6:46 AM
G'Day folks

Is there a minimum (or recommended) Eclipse project configuration required to make the Sencha Eclipse plugin function?

Every Eclipse project has a ".project" file on the project root folder. In that file, the project's natures and build specs are defined. I see that when you add a "Sencha Nature" to the project, it adds "com.sencha.eclipse.plugin.senchaNature" to the list of project natures. But is that all that is required?

It would seem that merely adding a Sencha Nature to a blank project is not enough. The reason that I say that is because this is because a blank project with a Sencha Nature would still not have any build specs. It is my understanding (although I could be wrong here), that an Eclipse project must have a buildspec in order to utilize "Build Automatically" and montior the project. Is that true in Sencha projects?

12 Jan 2016, 8:19 AM
This is a good discussion. You're correct, typical Eclipse projects often need to have build configurations since Eclipse will be the one building and creating the project.

However, since our Sencha Eclipse Plugin does not rely on Eclipse's JSDT tooling for JavaScript, you can create a simple "Project", add the Sencha Nature, and you'll still get the full plugin's functionality. We rely on our background process to manage this, you then 'build' your code using Sencha Cmd through a custom Run Configuration or command line.

Mind you, this is the absolute minimum needed for getting Sencha Ext JS plugin functionality (code completion, documentation lookup, open definition, etc). There might be other project types that can assist you further.

For example, a JavaScript project which uses Eclipse's JSDT parsing and validation. This might find syntax issues with your code that the Sencha plugin doesn't yet provide. Such as you type the "function" keyword wrong. A 'simple' project would not have that functionality.

Note: If you use the JavaScript project (or anything using Eclipse's JSDT), we recommend you remove the Ext JS SDKs from Eclipse's parsing (http://docs.sencha.com/ide_plugins/eclipse_ide_plugin.html#Excluding_Ext_JS_SDK_from_Eclipse_s_JavaScript__optional_) since it will get stuck validating while "Building workspace," as we have very large/complex .js files in our SDK.

As far as project recommendations, it's difficult to suggest one specific route since Eclipse allows for so many different options. Our Sencha Plugin should work with any project type, so it depends on what you want to do. A Java Web Application vs a JavaScript app, or even a PHP application. There's no 'one size fits all' solution in Eclipse, so we tried to make the plugin as flexible as possible.