use of com.amalto.workbench.editors.DataModelMainPage in project tmdm-studio-se by Talend.
the class Util method getXSDSchemaOfDirtyEditor.
public static XSDSchema getXSDSchemaOfDirtyEditor(String dataModelName) {
XSDSchema xsd = null;
IEditorPart[] editors = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getDirtyEditors();
if (null != editors) {
for (IEditorPart editorpart : editors) {
if (editorpart instanceof XSDEditor) {
XSDEditor xeditor = (XSDEditor) editorpart;
DataModelMainPage mainPage = xeditor.getdMainPage();
if (mainPage.getDataModel().getName().equals(dataModelName)) {
xsd = mainPage.getXSDSchema();
break;
}
}
}
}
return xsd;
}
Aggregations