use of com.intellij.lang.javascript.psi.JSExpressionCodeFragment in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureDefaultValueCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureDefaultValueCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createDefaultValueCellFragment("", createFakeClass());
String[] included = DEFALUT_VALUES;
// TODO classes should be removed from completion list
included = ArrayUtil.mergeArrays(included, "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher");
String[] excluded = new String[] { "public", "function", "while" };
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.psi.JSExpressionCodeFragment in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureInitializerCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureInitializerCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createInitializerCellFragment("", createFakeClass());
String[] included = DEFALUT_VALUES;
// TODO classes should be removed from completion list
included = ArrayUtil.mergeArrays(included, "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher");
String[] excluded = new String[] { "public", "function", "while" };
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.psi.JSExpressionCodeFragment in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureParameterTypeCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureParameterTypeCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createParameterTypeCellFragment("", myProject);
String[] included = new String[] { "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher", "void", "*" };
String[] excluded = ArrayUtil.mergeArrays(DEFALUT_VALUES, "public", "function", "while");
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.psi.JSExpressionCodeFragment in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureReturnType.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureReturnType() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSFunction function = createFakeFunction();
JSExpressionCodeFragment fragment = JSChangeSignatureDialog.createReturnTypeCodeFragment(new JSMethodDescriptor(function, false).getReturnType(), function, JavaScriptSupportLoader.ECMA_SCRIPT_L4);
String[] included = new String[] { "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher", "void", "*" };
String[] excluded = ArrayUtil.mergeArrays(DEFALUT_VALUES, "public", "function", "while");
checkTextFieldCompletion(fragment, included, excluded, "Z111", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.psi.JSExpressionCodeFragment in project intellij-plugins by JetBrains.
the class FlexCompletionInUmlTextFieldsTest method testCreateUmlFieldInitializer.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testCreateUmlFieldInitializer() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSCreateFieldDialog.createInitializerCodeFragment(createFakeClass());
String[] included = DEFALUT_VALUES;
// TODO classes should be removed from completion list
included = ArrayUtil.mergeArrays(included, "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher");
String[] excluded = new String[] { "public", "function", "while" };
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
Aggregations