1010 */
1111package org .eclipse .angularjs .internal .ui .handlers ;
1212
13- import java .io .IOException ;
13+ import java .util .ArrayList ;
14+ import java .util .Arrays ;
15+ import java .util .List ;
1416
1517import org .eclipse .angularjs .internal .ui .AngularUIMessages ;
16- import org .eclipse .angularjs .internal .ui .Trace ;
17- import org .eclipse .core .commands .AbstractHandler ;
18- import org .eclipse .core .commands .ExecutionEvent ;
19- import org .eclipse .core .commands .ExecutionException ;
2018import org .eclipse .core .resources .IProject ;
21- import org .eclipse .core .resources .ResourcesPlugin ;
22- import org .eclipse .core .resources .WorkspaceJob ;
23- import org .eclipse .core .runtime .CoreException ;
24- import org .eclipse .core .runtime .IProgressMonitor ;
25- import org .eclipse .core .runtime .IStatus ;
26- import org .eclipse .core .runtime .Platform ;
27- import org .eclipse .core .runtime .Status ;
2819import org .eclipse .core .runtime .preferences .IScopeContext ;
29- import org .eclipse .jface .viewers .ISelection ;
30- import org .eclipse .jface .viewers .IStructuredSelection ;
3120import org .eclipse .osgi .util .NLS ;
32- import org .eclipse .ui .handlers .HandlerUtil ;
3321
34- import tern .eclipse .ide .core .IIDETernProject ;
35- import tern .eclipse .ide .core .TernCorePlugin ;
3622import tern .eclipse .ide .ui .handlers .AbstractConvertProjectCommandHandler ;
37- import tern .server .ITernDef ;
38- import tern .server .ITernPlugin ;
23+ import tern .server .ITernModule ;
3924import tern .server .TernDef ;
4025import tern .server .TernPlugin ;
4126
@@ -54,13 +39,18 @@ protected String getConvertingProjectJobTitle(IProject project) {
5439 }
5540
5641 @ Override
57- protected ITernPlugin [] getPlugins (IScopeContext [] fLookupOrder ) {
58- return new ITernPlugin [] { TernPlugin .angular };
42+ protected ITernModule [] getModules (IScopeContext [] fLookupOrder ) {
43+ List <ITernModule > modules = new ArrayList <ITernModule >(
44+ Arrays .asList (super .getModules (fLookupOrder )));
45+ if (!modules .contains (TernDef .ecma5 )) {
46+ modules .add (TernDef .ecma5 );
47+ }
48+ if (!modules .contains (TernDef .browser )) {
49+ modules .add (TernDef .browser );
50+ }
51+ if (!modules .contains (TernPlugin .angular )) {
52+ modules .add (TernPlugin .angular );
53+ }
54+ return modules .toArray (ITernModule .EMPTY_MODULE );
5955 }
60-
61- @ Override
62- protected ITernDef [] getDefs (IScopeContext [] fLookupOrder ) {
63- return new ITernDef [] { TernDef .browser , TernDef .ecma5 };
64- }
65-
6656}
0 commit comments