cas = CasCreationUtils.createCas((AnalysisEngineDescription) descriptor);
styleMapFile = getStyleMapFile((AnalysisEngineDescription) descriptor, descriptorFile
.getPath());
} else if (descriptor instanceof TypeSystemDescription) {
TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;
tsDesc.resolveImports();
cas = CasCreationUtils.createCas(tsDesc, null, new FsIndexDescription[0]);
styleMapFile = getStyleMapFile((TypeSystemDescription) descriptor, descriptorFile.getPath());
} else {
displayError("Invalid Descriptor File \"" + descriptorFile.getPath() + "\""
+ "Must be either an AnalysisEngine or TypeSystem descriptor.");