Commit fb4cee26 authored by Aurelien Pupier's avatar Aurelien Pupier

Merge pull request #331 from bonitasoft/fix/BS-14585_legacy_preview_for_temapltes

BS-14585 Legacy Form Preview with Templates
parents 96b025cf 9b9ce78d
......@@ -213,20 +213,23 @@ public class FormPreviewPropertiesView extends ViewPart {
if (advancedFormPreview != null) {
advancedFormPreview.setForm(form);
}
//webBrowserCombo.setSelection(new StructuredSelection(BrowserManager.getInstance().getCurrentWebBrowser()));
}
private ApplicationLookNFeelFileStore getCurrentLookNFeel() {
if (getSite().getPage().getActiveEditor() instanceof FormDiagramEditor) {
final String themeId = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
.getString(BonitaPreferenceConstants.DEFAULT_APPLICATION_THEME);
final Form form = (Form) ((FormDiagramEditor) getSite().getPage().getActiveEditor()).getDiagramEditPart().resolveSemanticElement();
final AbstractProcess process = ModelHelper.getParentProcess(form);
ApplicationLookNFeelFileStore lnfStore = (ApplicationLookNFeelFileStore) repositoryStore.getChild(process.getBasedOnLookAndFeel());
if (lnfStore == null) {
final String themeId = BonitaStudioPreferencesPlugin.getDefault().getPreferenceStore()
.getString(BonitaPreferenceConstants.DEFAULT_APPLICATION_THEME);
lnfStore = (ApplicationLookNFeelFileStore) repositoryStore.getChild(themeId);
if (process != null) {
ApplicationLookNFeelFileStore lnfStore = (ApplicationLookNFeelFileStore) repositoryStore.getChild(process.getBasedOnLookAndFeel());
if (lnfStore == null) {
lnfStore = (ApplicationLookNFeelFileStore) repositoryStore.getChild(themeId);
}
return lnfStore;
}
return lnfStore;
return (ApplicationLookNFeelFileStore) repositoryStore.getChild(themeId);
}
return null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment