*/
private List<String> getPorts(IFile sourceFile, String[] portTypes) {
// refinement graph
GenericGraphParser parser = new GenericGraphParser(GraphitiModelPlugin
.getDefault().getConfigurations());
Graph graph = null;
try {
graph = parser.parse(sourceFile);
} catch (IncompatibleConfigurationFile e) {
System.out.println(e.getMessage());
}
// get ports from graph
if (graph == null) {
return new ArrayList<String>();
} else {
Set<Vertex> vertices = graph.vertexSet();
List<String> ports = new ArrayList<String>();
for (Vertex vertex : vertices) {
// check the vertex type against all accepted port types.
for (String portType : portTypes) {
if (vertex.getType().getName().equals(portType)) {