PDA

View Full Version : Configure location of ExtJS workspace



PhilippG
22 Feb 2016, 3:32 AM
Hi,

i'm just evaluating SenchaEclipsePlugin for our company.

Where can i configure the Ext workspace in an Eclipse project, that only contains the application code (I can work with the application code, but not with the code delivered in the Ext packages)?

Kind regards,
Philipp

PhilippG
23 Feb 2016, 12:30 AM
Just for others that faces the same issue:

In each Eclipse Projekt, where the Sencha Natur has been added, a .sencha-ide-config File is present, that has the following structure:



{
"include": [
"/Absolute/Path/To/ExtJS/packages/core/src",
"/Absolute/Path/To/ExtJS/classic/classic/src",
"./Relative/Path/To/Company/Package",
]
...
}


In this file i was able to configure external code resources, that are available inside the project (i.e. for auto completion). This works really fine for the core ExtJS commands (like Ext.create, ...) and packages, that where created by our company, (and of course the application code itself) but we still miss often used classes like (Ext.panel.Panel, Ext.window.Window, ...).

Which includes should i specify, if i want to have auto completion for Ext.panel.Panel in my project?

PhilippG
23 Feb 2016, 1:43 AM
Okay, now i think it is working using following configuration in File .sencha-ide-config:



// include common packages:
"include": [
"./Relative/Path/to/Custom/package1"
],


// setup APP structure:
"apps": [
{
"name": "APP_NAME",
"path": "./Relative/Path/to/app/folder",
"toolkit": "classic",
"sdk": {
"path": "/Absolut/Path/to/extjs/sdk",
"version": "6.0.1",
"framework": "extjs"
}
}
]


If the toolkit (and i guess the framework) is not specified, only the universal resources can be looked up.
Update: Okay it seems, that if your resource is deposited somewhere in folder classic, Panel is again available in case toolkit is set to universal.


Okay, so the basic steps to add ExtJS support (to a specific projekt only) are:
Install Sencha Eclipse Plugin
Enable Sencha nature on specific project
Adapt .sencha-ide-config as shown previously

Kevin Jackson
25 Feb 2016, 9:56 AM
You are correct. The editor introspects the code and uses that to be aware of the framework and the completion code.

iver25
5 Apr 2016, 2:18 AM
I'm also having trouble getting code completion for Ext code in the plugin

I have tried changing the .sencha-ide-config like above, but it has no effect.

The workspace is created using the plugin, and the app is created using Sencha Cmd

I'm running windows, and my project structure looks like this:

Project root

.sencha-ide-config.json
workspace

apps

app

ext


I have tried to include the Ext src like this:


"include": [
"workspace/ext/packages/core/src"
],


And I have tried to add the project like this:


"apps": [
{
"name": "SN",
"path": "workspace/apps/app",
"toolkit": "classic",
"sdk": {
"path": "workspace/ext/packages/core/src",
"version": "6.0.1",
"framework": "extjs"
}
}
]


If I try to type Ext. and hit Ctrl + space, I get this error: Tern Error Response Status: HTTP/1.1 500 Internal Server Error

I would appreciate any help on this!