diff options
author | Ralf Mollik | 2018-02-23 14:35:59 +0000 |
---|---|---|
committer | Ralf Mollik | 2018-02-23 14:35:59 +0000 |
commit | 5db1e738da4e0d2624267637f904be9d383938f0 (patch) | |
tree | 5ee98b446715332906ba05bad37b7ea25d1d6566 | |
parent | f63e4cf01c4ccfa92fa15bba37415958d2053abc (diff) | |
download | org.eclipse.osbp.preferences-5db1e738da4e0d2624267637f904be9d383938f0.tar.gz org.eclipse.osbp.preferences-5db1e738da4e0d2624267637f904be9d383938f0.tar.xz org.eclipse.osbp.preferences-5db1e738da4e0d2624267637f904be9d383938f0.zip |
catch up with dev
59 files changed, 1240 insertions, 3010 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9f0a46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +**/bin/ +**/target/ +**._trace +**git.properties +**/target/ +**/.metadata/ + +**/emf-gen/**/.gitignore +**/src-gen/**/.gitignore +**/git.properties +**/*.java._trace +**/*.log +**/*.log.properties + +**/bin/ +**/build/ +*.class +*.ctrl +**/Debug/ +.DS_Store +*.ear +*.war + +**/*.actionbin +**/*.blipbin +**/*.chartbin +**/*.cubebin +**/*.datatypebin +**/*.dtobin +**/*.entitybin +**/*.servicebin +**/*.tablebin +**/*.uibin +**/*.uisemanticbin +**/*.xtendbin +**/*.xtextbin + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.osbp.preferences.feature/.gitignore b/org.eclipse.osbp.preferences.feature/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/org.eclipse.osbp.preferences.feature/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 0000000..0933f8c --- /dev/null +++ b/org.eclipse.osbp.preferences.feature/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,10 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +eclipse.preferences.version=1 +is_project_specific=true +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.sourceFolder.emf-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/org.eclipse.osbp.preferences.feature/feature.xml b/org.eclipse.osbp.preferences.feature/feature.xml index 0dbda50..c34eb09 100644 --- a/org.eclipse.osbp.preferences.feature/feature.xml +++ b/org.eclipse.osbp.preferences.feature/feature.xml @@ -14,7 +14,8 @@ id="org.eclipse.osbp.preferences.feature" label="%featureName" version="0.9.0.qualifier" - provider-name="%providerName"> + provider-name="%providerName" + plugin="org.eclipse.osbp.preferences"> <description> %description diff --git a/org.eclipse.osbp.preferences.feature/pom.xml b/org.eclipse.osbp.preferences.feature/pom.xml index e506597..12d89be 100644 --- a/org.eclipse.osbp.preferences.feature/pom.xml +++ b/org.eclipse.osbp.preferences.feature/pom.xml @@ -71,17 +71,14 @@ </plugins> </build> + <dependencies> <dependency> - <groupId>org.eclipse.osbp.preferences</groupId> - <artifactId>org.eclipse.osbp.preferences</artifactId> - <version>0.9.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.eclipse.osbp.preferences</groupId> - <artifactId>org.eclipse.osbp.preferences.ui.page</artifactId> - <version>0.9.0-SNAPSHOT</version> + <groupId>org.eclipse.osbp.dependencies</groupId> + <artifactId> + org.eclipse.osbp.dependencies.bundle.activemq.all.osgi + </artifactId> + <version>5.14.5-SNAPSHOT</version> </dependency> </dependencies> - </project> diff --git a/org.eclipse.osbp.preferences.ui.page/.classpath b/org.eclipse.osbp.preferences.ui.page/.classpath new file mode 100644 index 0000000..43b9862 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/org.eclipse.osbp.preferences.ui.page/.gitignore b/org.eclipse.osbp.preferences.ui.page/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/org.eclipse.osbp.preferences.ui.page/.project b/org.eclipse.osbp.preferences.ui.page/.project index d3691bd..116f451 100644 --- a/org.eclipse.osbp.preferences.ui.page/.project +++ b/org.eclipse.osbp.preferences.ui.page/.project @@ -31,12 +31,12 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.m2e.core.maven2Builder</name> + <name>org.sonarlint.eclipse.core.sonarlintBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> - <name>org.sonarlint.eclipse.core.sonarlintBuilder</name> + <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> </arguments> </buildCommand> diff --git a/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.pde.core.prefs b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000..f29e940 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 0000000..19e3115 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,11 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +is_project_specific=true +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.sourceFolder.emf-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/org.eclipse.osbp.preferences.ui.page/META-INF/MANIFEST.MF b/org.eclipse.osbp.preferences.ui.page/META-INF/MANIFEST.MF index c984204..c46f643 100644 --- a/org.eclipse.osbp.preferences.ui.page/META-INF/MANIFEST.MF +++ b/org.eclipse.osbp.preferences.ui.page/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Require-Bundle: org.slf4j.api;bundle-version="1.7.2", org.eclipse.jdt.core, org.eclipse.jface, org.eclipse.ui, - org.eclipse.xtext.ui;bundle-version="[2.7.3,2.8.0)", + org.eclipse.xtext.ui;bundle-version="[2.11.0,2.12.0)", org.eclipse.osbp.preferences;bundle-version="[0.9.0,0.10.0)", org.eclipse.osbp.webserver.messagequeue;bundle-version="[0.9.0,0.10.0)", org.eclipse.osbp.gitinfo;bundle-version="[0.9.0,0.10.0)", diff --git a/org.eclipse.osbp.preferences.ui.page/pom.xml b/org.eclipse.osbp.preferences.ui.page/pom.xml index 93654c3..7b40975 100644 --- a/org.eclipse.osbp.preferences.ui.page/pom.xml +++ b/org.eclipse.osbp.preferences.ui.page/pom.xml @@ -18,7 +18,6 @@ <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> @@ -33,4 +32,13 @@ <relativePath>..</relativePath> </parent> <packaging>eclipse-plugin</packaging> + <dependencies> + <dependency> + <groupId>org.eclipse.osbp.dependencies</groupId> + <artifactId> + org.eclipse.osbp.dependencies.bundle.activemq.all.osgi + </artifactId> + <version>5.14.5-SNAPSHOT</version> + </dependency> + </dependencies> </project> diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/APreferencePage.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/APreferencePage.java index 9ebfa77..78789f2 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/APreferencePage.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/APreferencePage.java @@ -45,7 +45,7 @@ import org.eclipse.xtext.ui.editor.preferences.fields.LabelFieldEditor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -abstract public class APreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IWorkbenchPropertyPage, IPreferenceCheckStateProvider { +public abstract class APreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IWorkbenchPropertyPage, IPreferenceCheckStateProvider { protected enum PageType { PREFENCE, @@ -70,7 +70,7 @@ abstract public class APreferencePage extends FieldEditorPreferencePage implemen private PageType fPageType; private IAdaptable fAdaptable; - public final static String DEFAULT_VALUE_NO = "message_info.gif";//"defaultvalue-no.png"; + public final static String DEFAULT_VALUE_NO = "message_info.gif"; public final static String DEFAULT_VALUE_YES = "defaultvalue-yes.png"; public final static String STATUS_TODO = "open.gif"; diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ATableTreeFieldEditor.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ATreeFieldEditor.java index 805c08e..d4513ee 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ATableTreeFieldEditor.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ATreeFieldEditor.java @@ -12,6 +12,9 @@ */ package org.eclipse.osbp.preferences.ui.component; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.Map; import org.eclipse.jface.dialogs.IDialogConstants; @@ -21,10 +24,9 @@ import org.eclipse.osbp.preferences.EnumDatabaseVendor; import org.eclipse.osbp.preferences.ItemDescription; import org.eclipse.osbp.preferences.Preference; import org.eclipse.osbp.preferences.ProductConfigurationPrefs.DDL_GENERATION; +import org.eclipse.osbp.preferences.ui.constants.LicenseConstants; import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.TableTree; -import org.eclipse.swt.custom.TableTreeEditor; -import org.eclipse.swt.custom.TableTreeItem; +import org.eclipse.swt.custom.TreeEditor; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; @@ -34,13 +36,21 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; +import org.eclipse.swt.widgets.TreeDescribedItem; +import org.eclipse.swt.widgets.TreeItem; -public abstract class ATableTreeFieldEditor extends FieldEditor { +import com.google.common.collect.ImmutableList; + +public abstract class ATreeFieldEditor extends FieldEditor { private final static String DEFAULT_ADD_LABEL = "duplicate"; private final static String DEFAULT_REMOVE_LABEL = "remove"; @@ -48,9 +58,9 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { // The top-level control for the field editor. private Composite top; // The list of selected tags. - protected TableTree tableTree; - TableTreeEditor editor; - private Table innerTable; + public Tree tree; + TreeEditor editor; +// private Table innerTable; // The button for adding the contents of // the available list to the selected list. private Button add; @@ -59,7 +69,7 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { private final ItemDescription fItemDescription; protected Label label; - public ATableTreeFieldEditor( + public ATreeFieldEditor( String name, String labelText, Composite parent, @@ -68,7 +78,7 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { fItemDescription = itemDescription; } - protected ItemDescription getItemDescription() { + public ItemDescription getItemDescription() { return fItemDescription; } @@ -91,41 +101,42 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { labelData.horizontalSpan = numColumns; label.setLayoutData(labelData); - tableTree = new TableTree(top, SWT.BORDER | SWT.V_SCROLL | SWT.FILL); + tree = new Tree(top, SWT.BORDER | SWT.V_SCROLL | SWT.FILL); GridData tableTreeData = new GridData(GridData.FILL_HORIZONTAL); tableTreeData.horizontalSpan = numColumns; tableTreeData.heightHint = buttonHeight * 15; - tableTree.setLayoutData(tableTreeData); - tableTree.addSelectionListener(new SelectionAdapter() { + tree.setLayoutData(tableTreeData); + tree.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { selectionChanged(); } }); - editor = new TableTreeEditor(tableTree); + editor = new TreeEditor(tree); //The editor must have the same size as the cell and must //not be any smaller than 50 pixels. editor.horizontalAlignment = SWT.LEFT; editor.grabHorizontal = true; editor.minimumWidth = 50; // editing the second column - final int EDITABLECOLUMN = TableTreeDescribedItem.VALUE; + final int EDITABLECOLUMN = TreeDescribedItem.VALUE; - tableTree.addSelectionListener(new SelectionAdapter() { + tree.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { // Clean up any previous editor control Control oldEditor = editor.getEditor(); if (oldEditor != null) oldEditor.dispose(); // Identify the selected row - TableTreeItem item = (TableTreeItem)e.item; + TreeItem item = (TreeItem)e.item; if (item == null) return; // The control that will be the editor must be a child of the Table Control newEditor; - if ((ATableTreeFieldEditor.this instanceof DataSourcesFieldEditor) && + if ((ATreeFieldEditor.this instanceof DataSourcesFieldEditor) && (item.getText(0).toLowerCase().contains("type"))) { - final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); +// final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); + final Combo comboEditor = new Combo(tree, SWT.DROP_DOWN | SWT.READ_ONLY); newEditor = comboEditor; String selection = item.getText(EDITABLECOLUMN); int index = 0; @@ -143,9 +154,10 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { } }); } - else if ((ATableTreeFieldEditor.this instanceof PersistenceUnitsFieldEditor) && + else if ((ATreeFieldEditor.this instanceof PersistenceUnitsFieldEditor) && (item.getText(0).toLowerCase().contains("source"))) { - final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); +// final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); + final Combo comboEditor = new Combo(tree, SWT.DROP_DOWN | SWT.READ_ONLY); newEditor = comboEditor; String selection = item.getText(EDITABLECOLUMN); int index = 0; @@ -161,13 +173,34 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { } comboEditor.addListener(SWT.Modify, new Listener() { public void handleEvent(Event e) { + if (LicenseConstants.LICENSED_DATABASE_VENDORS.contains(comboEditor.getText())){ + Display display = Display.getDefault(); + Shell shell = display.getActiveShell(); + if (shell != null){ + int actions = SWT.ICON_WARNING | SWT.OK; + MessageBox messageBox = new MessageBox( + shell, + actions ); + messageBox.setMessage(LicenseConstants.LICENSE_MESSAGE_TEXT.replace(LicenseConstants.DATABASE_VENDOR, comboEditor.getText())); + messageBox.setText(LicenseConstants.LICENSE_TITLE_TEXT); + messageBox.open(); +// messageBox.setMessage( +// translator.getDocumentation(this,"checkDataSourceConfigured.text").replace("%%DATASOURCE%%", dataSource) +// +question); +// messageBox.setText( +// translator.getDocumentation(this,"checkDataSourceConfigured.title").replace("%%DATASOURCE%%", dataSource) +// ); + } +// + } editor.getItem().setText(EDITABLECOLUMN, comboEditor.getText()); } }); } - else if ((ATableTreeFieldEditor.this instanceof PersistenceUnitsFieldEditor) && + else if ((ATreeFieldEditor.this instanceof PersistenceUnitsFieldEditor) && (item.getText(0).toLowerCase().contains("ddl"))) { - final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); +// final Combo comboEditor = new Combo(innerTable, SWT.DROP_DOWN | SWT.READ_ONLY); + final Combo comboEditor = new Combo(tree, SWT.DROP_DOWN | SWT.READ_ONLY); newEditor = comboEditor; String selection = item.getText(EDITABLECOLUMN); int index = 0; @@ -186,7 +219,8 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { }); } else { - final Text textEditor = new Text(innerTable, SWT.NONE); +// final Text textEditor = new Text(innerTable, SWT.NONE); + final Text textEditor = new Text(tree, SWT.NONE); newEditor = textEditor; textEditor.setText(item.getText(EDITABLECOLUMN)); textEditor.addModifyListener(new ModifyListener() { @@ -201,17 +235,23 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { } }); - // Create the TableTree and set some attributes on the underlying table - innerTable = tableTree.getTable(); - innerTable.setHeaderVisible(false); - innerTable.setLinesVisible(false); - GridData innerTableData = new GridData(GridData.FILL_BOTH); - innerTable.setLayoutData(innerTable); + // Create the Tree and set some attributes on the underlying table +// innerTable = tree.getTable(); +// innerTable.setHeaderVisible(false); +// innerTable.setLinesVisible(false); +// GridData innerTableData = new GridData(GridData.FILL_BOTH); +// innerTable.setLayoutData(innerTable); + tree.setHeaderVisible(false); + tree.setHeaderVisible(false); // Create the columns, passing the underlying table - (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText("Attribute"); - (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText("Value"); - (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText(""); +// (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText("Attribute"); +// (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText("Value"); +// (new org.eclipse.swt.widgets.TableColumn(innerTable, SWT.FILL)).setText(""); + + (new org.eclipse.swt.widgets.TreeColumn(tree, SWT.FILL)).setText("Attribute"); + (new org.eclipse.swt.widgets.TreeColumn(tree, SWT.FILL)).setText("Value"); + (new org.eclipse.swt.widgets.TreeColumn(tree, SWT.FILL)).setText(""); // Create the remove button. if (hasRemoveButton()) { @@ -264,12 +304,13 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { } private void doLoad(String value) { - tableTree.removeAll(); + tree.removeAll(); _doLoad(value, getPreferenceStore().getDefaultString(getPreferenceName())); - org.eclipse.swt.widgets.TableColumn[] columns = innerTable.getColumns(); +// org.eclipse.swt.widgets.TableColumn[] columns = innerTable.getColumns(); + TreeColumn[] columns = tree.getColumns(); for (int i = 0, n = 3; i < n; i++) { columns[i].pack(); - if (i == TableTreeDescribedItem.HINT) { + if (i == TreeDescribedItem.HINT) { columns[i].setWidth(30); } else { @@ -310,13 +351,13 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { // Adds the string in the text field to the list. private void add() { - if (tableTree.getSelectionCount() == 1) { - TableTreeItem source = tableTree.getSelection()[0]; + if (tree.getSelectionCount() == 1) { + TreeItem source = tree.getSelection()[0]; while ((source != null) && (source.getParentItem() != null)) { source = source.getParentItem(); } if (source != null) { - TableTreeDescribedItem.clone(source, "Copy"); + TreeDescribedItem.clone(source, "Copy"); Control oldEditor = editor.getEditor(); if (oldEditor != null) oldEditor.dispose(); } @@ -325,8 +366,8 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { } private void remove() { - if (tableTree.getSelectionCount() == 1) { - TableTreeItem selected = tableTree.getSelection()[0]; + if (tree.getSelectionCount() == 1) { + TreeItem selected = tree.getSelection()[0]; while ((selected != null) && (selected.getParentItem() != null)) { selected = selected.getParentItem(); } @@ -362,12 +403,13 @@ public abstract class ATableTreeFieldEditor extends FieldEditor { // Sets the enablement of the remove button depending // on the selection in the list. private void selectionChanged() { - int index = tableTree.getSelectionCount(); + TreeItem[] treeItem = tree.getSelection(); + int index = tree.getSelectionCount(); if (add != null) { add.setEnabled(index == 1); } if (remove != null) { - remove.setEnabled((index == 1) && (tableTree.getItemCount() > 1)); + remove.setEnabled((index == 1) && (tree.getItemCount() > 1)); } } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/DataSourcesFieldEditor.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/DataSourcesFieldEditor.java index 6e13924..80eff33 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/DataSourcesFieldEditor.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/DataSourcesFieldEditor.java @@ -15,18 +15,16 @@ package org.eclipse.osbp.preferences.ui.component; import java.util.Map; import java.util.TreeMap; -import org.eclipse.swt.custom.TableTreeItem; -import org.eclipse.swt.widgets.Composite; - import org.eclipse.osbp.preferences.DataSourceConfiguration; +import org.eclipse.osbp.preferences.DataSourceConfiguration.DataSourceItemDescription; import org.eclipse.osbp.preferences.EnumDatabaseVendor; import org.eclipse.osbp.preferences.IItemDescribed; import org.eclipse.osbp.preferences.ItemDescription; -import org.eclipse.osbp.preferences.PersistenceUnitConfiguration; -import org.eclipse.osbp.preferences.DataSourceConfiguration.DataSourceItemDescription; -import org.eclipse.osbp.preferences.PersistenceUnitConfiguration.PersistenceUnitItemDescription; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.TreeDescribedItem; +import org.eclipse.swt.widgets.TreeItem; -public class DataSourcesFieldEditor extends ATableTreeFieldEditor { +public class DataSourcesFieldEditor extends ATreeFieldEditor { public DataSourcesFieldEditor(String name, String labelText, Composite parent) { @@ -40,14 +38,14 @@ public class DataSourcesFieldEditor extends ATableTreeFieldEditor { Map<String, DataSourceConfiguration> dataItems = DataSourceConfiguration.deserialize(value); Map<String, DataSourceConfiguration> defaultItems = DataSourceConfiguration.deserialize(defaults); for (DataSourceConfiguration dataItem : dataItems.values()) { - new TableTreeDescribedItem(this, dataItem, defaultItems.get(dataItem.getName())); + new TreeDescribedItem(this, dataItem, defaultItems.get(dataItem.getName())); } } @Override protected String _doStore() { Map<String, DataSourceConfiguration> dataItems = new TreeMap<String, DataSourceConfiguration>(); - for (TableTreeItem treeItem : tableTree.getItems()) { + for (TreeItem treeItem : tree.getItems()) { if (treeItem instanceof IItemDescribed) { IItemDescribed describedItem = (IItemDescribed) treeItem; DataSourceConfiguration dataItem = new DataSourceConfiguration( diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/PersistenceUnitsFieldEditor.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/PersistenceUnitsFieldEditor.java index 9aeec03..e13db33 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/PersistenceUnitsFieldEditor.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/PersistenceUnitsFieldEditor.java @@ -19,10 +19,11 @@ import org.eclipse.osbp.preferences.IItemDescribed; import org.eclipse.osbp.preferences.ItemDescription; import org.eclipse.osbp.preferences.PersistenceUnitConfiguration; import org.eclipse.osbp.preferences.PersistenceUnitConfiguration.PersistenceUnitItemDescription; -import org.eclipse.swt.custom.TableTreeItem; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.TreeDescribedItem; +import org.eclipse.swt.widgets.TreeItem; -public class PersistenceUnitsFieldEditor extends ATableTreeFieldEditor { +public class PersistenceUnitsFieldEditor extends ATreeFieldEditor { public PersistenceUnitsFieldEditor(String name, String labelText, Composite parent) { @@ -36,14 +37,14 @@ public class PersistenceUnitsFieldEditor extends ATableTreeFieldEditor { Map<String, PersistenceUnitConfiguration> dataItems = PersistenceUnitConfiguration.deserialize(value); Map<String, PersistenceUnitConfiguration> defaultItems = PersistenceUnitConfiguration.deserialize(defaults); for (PersistenceUnitConfiguration dataItem : dataItems.values()) { - new TableTreeDescribedItem(this, dataItem, defaultItems.get(dataItem.getName())); + new TreeDescribedItem(this, dataItem, defaultItems.get(dataItem.getName())); } } @Override protected String _doStore() { Map<String, PersistenceUnitConfiguration> dataItems = new TreeMap<String, PersistenceUnitConfiguration>(); - for (TableTreeItem treeItem : tableTree.getItems()) { + for (TreeItem treeItem : tree.getItems()) { if (treeItem instanceof IItemDescribed) { IItemDescribed describedItem = (IItemDescribed) treeItem; PersistenceUnitConfiguration dataItem = new PersistenceUnitConfiguration( diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ProductConfigurationFieldEditor.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ProductConfigurationFieldEditor.java index 01eb75c..559b0d4 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ProductConfigurationFieldEditor.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/ProductConfigurationFieldEditor.java @@ -18,8 +18,9 @@ import org.eclipse.osbp.preferences.ui.utils.ApplicationProjectInspector; import org.eclipse.osbp.preferences.ui.utils.ConfigurationFileVerifier.ConfigurationFileDescription; import org.eclipse.osbp.preferences.ui.utils.ManifestFileVerifier; import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.TreeDescribedItem; -public class ProductConfigurationFieldEditor extends ATableTreeFieldEditor { +public class ProductConfigurationFieldEditor extends ATreeFieldEditor { public ProductConfigurationFieldEditor(String name, String labelText, Composite parent) { super(name, labelText, parent, ConfigurationFileDescription.INSTANCE); @@ -32,11 +33,11 @@ public class ProductConfigurationFieldEditor extends ATableTreeFieldEditor { if ((productProject != null) && !productFileName.isEmpty()) { ApplicationProjectInspector inspector = new ApplicationProjectInspector(productProject, productFileName); if (inspector.isApplicationProject()) { - new TableTreeDescribedItem(this, inspector.getProductConfigurations(), null); - new TableTreeDescribedItem(this, inspector.getProductPlugins(), null); - new TableTreeDescribedItem(this, inspector.getProductManifest(), null); + new TreeDescribedItem(this, inspector.getProductConfigurations(), null); + new TreeDescribedItem(this, inspector.getProductPlugins(), null); + new TreeDescribedItem(this, inspector.getProductManifest(), null); for (ManifestFileVerifier bundle : inspector.getManifestVerifiers()) { - new TableTreeDescribedItem(this, bundle, null); + new TreeDescribedItem(this, bundle, null); } } } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/constants/LicenseConstants.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/constants/LicenseConstants.java new file mode 100644 index 0000000..9d580a5 --- /dev/null +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/constants/LicenseConstants.java @@ -0,0 +1,14 @@ +package org.eclipse.osbp.preferences.ui.constants; + +import java.util.List; + +import org.eclipse.osbp.preferences.EnumDatabaseVendor; + +import com.google.common.collect.ImmutableList; + +public interface LicenseConstants { + final List<String> LICENSED_DATABASE_VENDORS = ImmutableList.of(EnumDatabaseVendor.ORACLE.getDriverVendor(), EnumDatabaseVendor.MYSQL.getDriverVendor()); + final String DATABASE_VENDOR = "{$DATABASE_VENDOR}"; + final String LICENSE_TITLE_TEXT = "LICENSE"; + final String LICENSE_MESSAGE_TEXT = DATABASE_VENDOR + " LICENSE!"; +} diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductConfigurationStore.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductConfigurationStore.java index bfb55f2..857d9e9 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductConfigurationStore.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductConfigurationStore.java @@ -22,9 +22,11 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Locale; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; +import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.io.IOUtils; @@ -32,7 +34,6 @@ import org.apache.commons.lang3.StringUtils; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; @@ -50,6 +51,9 @@ import org.slf4j.LoggerFactory; public class ProductConfigurationStore implements IPreferenceStore { + private static final String PRODUCT = ".product"; + private static final String CASE_NOT_IMPLEMENTED = "case not implemented"; + private static final String NOT_IMPLEMENTED = "not implemented"; private static final Logger LOGGER = LoggerFactory.getLogger(ProductConfigurationStore.class); private static ProductConfigurationStore sInstance; private static Map<String,IProject> osbpProductProjects = new TreeMap<>(); @@ -107,14 +111,6 @@ public class ProductConfigurationStore implements IPreferenceStore { return prefs.getProject(); } - private boolean showLanguageSelectInRespectiveLocaleOnPages() { - return false; // showLanguageSelectInRespectiveLocale(); - } - - public void sortLocalesOnDisplayNameOnPages(Locale[] locales) { - LocaleUtils.sortLocalesOnDisplayName(locales, showLanguageSelectInRespectiveLocaleOnPages()); - } - private void setProductConfigurationPrefs(ProductConfigurationPrefs prefs) { LOGGER.error(prefs.getInformation()+" # now actual product configuration"); this.prefs = prefs; @@ -130,9 +126,6 @@ public class ProductConfigurationStore implements IPreferenceStore { public void removeProductConfigurationPrefsChangedListener(APreferencePage listener) { prefsChangedListener.remove(listener); - if (prefsChangedListener.isEmpty()) { - sInstance = null; - } } public final boolean isWorkspaceSelected() { @@ -157,25 +150,25 @@ public class ProductConfigurationStore implements IPreferenceStore { public final void selectOsbpProductProject(String name) { IProject project = osbpProductProjects.get(name); IScopeContext scopeContext = null; - ProductConfigurationPrefs prefs = null; + ProductConfigurationPrefs newPrefs = null; if (project != null) { scopeContext = new ProductProjectScope(project); } if (scopeContext instanceof ProductProjectScope) { - prefs = new ProductConfigurationPrefs(name, scopeContext, project); + newPrefs = new ProductConfigurationPrefs(name, scopeContext, project); } else if (scopeContext != null) { - prefs = new ProductConfigurationPrefs(name, scopeContext); + newPrefs = new ProductConfigurationPrefs(name, scopeContext); } - if (prefs != null) { - setProductConfigurationPrefs(prefs); + if (newPrefs != null) { + setProductConfigurationPrefs(newPrefs); } else { setProductConfigurationPrefs(ProductConfiguration.prefs()); } } - public final static ProductConfigurationStore instance() { + public static final ProductConfigurationStore instance() { getProjectNames(); if (sInstance == null) { sInstance = new ProductConfigurationStore(ProductConfiguration.prefs()); @@ -206,7 +199,6 @@ public class ProductConfigurationStore implements IPreferenceStore { private boolean getBoolean(IProductConfigurationPrefs prefsUsed, String name) { switch (Preference.by(name)) { case LOCALIZATION_AUTOCREATE: return prefsUsed.willLanguagesAutocreate(); -// case LOCALIZATION_AUTOTRANSLATE: return prefsUsed.isLanguagesAutotranslate(); case LOCALIZATION_SHOW_SELECT_IN_RESPECTIVE_LOCALE: return prefsUsed.showLanguageSelectInRespectiveLocale(); case AUTHENTICATION_AUTOLOGIN: return prefsUsed.hasAutoLogin(); case AUTHENTICATION_ENCRYPT_PASSWORDS: return prefsUsed.hasEncryptPasswords(); @@ -220,8 +212,10 @@ public class ProductConfigurationStore implements IPreferenceStore { case PROJECT_WIZARD_ABSOLUTE_LOCATION: return prefsUsed.projectWizardUsesAbsoluteLocation(); case BPM_ENGINE_HIBERNATE_SHOW_SQL: return prefsUsed.isBpmEngineHibernateShowSql(); case BPM_ENGINE_HIBERNATE_FORMAT_SQL: return prefsUsed.isBpmEngineHibernateFormatSql(); + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); } - LOGGER.error("no Product Configuration boolean attribute "+name+" found"); + LOGGER.error("no Product Configuration boolean attribute {} found", name); return false; } @@ -229,7 +223,6 @@ public class ProductConfigurationStore implements IPreferenceStore { public void setValue(String name, boolean value) { switch (Preference.by(name)) { case LOCALIZATION_AUTOCREATE: prefs.setLanguagesAutocreate(value); return; -// case LOCALIZATION_AUTOTRANSLATE: prefs.setLanguagesAutotranslate(value);return; case LOCALIZATION_SHOW_SELECT_IN_RESPECTIVE_LOCALE: prefs.setShowLanguageSelectInRespectiveLocale(value); return; case AUTHENTICATION_AUTOLOGIN: prefs.setAutoLogin(value); return; case AUTHENTICATION_ENCRYPT_PASSWORDS: prefs.setEncryptPasswords(value); return; @@ -243,8 +236,10 @@ public class ProductConfigurationStore implements IPreferenceStore { case PROJECT_WIZARD_ABSOLUTE_LOCATION: prefs.setProjectWizardUsingAbsoluteLocation(value); return; case BPM_ENGINE_HIBERNATE_SHOW_SQL: prefs.setBpmEngineHibernateShowSql(value); return; case BPM_ENGINE_HIBERNATE_FORMAT_SQL: prefs.setBpmEngineHibernateFormatSql(value); return; + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); } - LOGGER.error("no Product Configuration boolean attribute "+name+" found, could not set "+value); + LOGGER.error("no Product Configuration boolean attribute {} found, could not set {}", name, value); } @Override @@ -265,8 +260,10 @@ public class ProductConfigurationStore implements IPreferenceStore { case HYBRID_REFRESH_PERSPECTIVE_ACTIVE: return prefsUsed.getHybridRefresherMilliSecsActive(); case HYBRID_REFRESH_PERSPECTIVE_INACTIVE: return prefsUsed.getHybridRefresherMilliSecsInactive(); case BPM_ENGINE_HIBERNATE_MAX_FETCH_DEPTH: return prefsUsed.getBpmEngineHibernateMaxFetchDepth(); + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); } - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration integer attribute {} found", name); return 0; } @@ -284,8 +281,10 @@ public class ProductConfigurationStore implements IPreferenceStore { case HYBRID_REFRESH_PERSPECTIVE_ACTIVE: prefs.setHybridRefresherMilliSecsActive(value); return; case HYBRID_REFRESH_PERSPECTIVE_INACTIVE: prefs.setHybridRefresherMilliSecsInactive(value); return; case BPM_ENGINE_HIBERNATE_MAX_FETCH_DEPTH: prefs.setBpmEngineHibernateMaxFetchDepth(value); return; + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); } - LOGGER.error("no Product Configuration integer attribute "+name+" found, could not set "+value); + LOGGER.error("no Product Configuration integer attribute {} found, could not set {}", name, value); } public String getString(Preference preference) { @@ -298,49 +297,47 @@ public class ProductConfigurationStore implements IPreferenceStore { } private String getDesktopUrlPath(String businessBundleClassName) { + if(businessBundleClassName.isEmpty()) { + return ""; + } return getUrlPath(businessBundleClassName, false); } private String getMobileUrlPath(String businessBundleClassName) { + if(businessBundleClassName.isEmpty()) { + return ""; + } return getUrlPath(businessBundleClassName, true); } - private final static String JETTY_PARAMETER_PORT = "-Dorg.eclipse.osbp.ecview.jetty.port="; - private final static String JETTY_PARAMETER_PATH = "-Dorg.eclipse.osbp.ecview.jetty.contextpath="; + private static final String JETTY_PARAMETER_PORT = "-Dorg.eclipse.osbp.ecview.jetty.port="; + private static final String JETTY_PARAMETER_PATH = "-Dorg.eclipse.osbp.ecview.jetty.contextpath="; private String getUrlPath(String businessBundleClassName, boolean asMobile) { String urlPath = ""; - if ((businessBundleClassName != null) && !businessBundleClassName.isEmpty()) { - IPath path = prefs.getProjectPath(); - if (path != null) { - path = path.append(businessBundleClassName+".product"); - File file = path.toFile(); - if (file.exists() && file.isFile()) { - try { - String content; - InputStream fisSourceFile = new FileInputStream(file); - content = IOUtils.toString(fisSourceFile, "UTF-8"); - if (content != null) { - content = content.replace("\r", " "); - content = content.replace("\n", " "); - content = content.replace("\n", " "); - String portNo = ""; - String baseUrl = ""; - if (content.contains(JETTY_PARAMETER_PORT)) { - portNo = content.substring(content.indexOf(JETTY_PARAMETER_PORT)+JETTY_PARAMETER_PORT.length()).split(" ")[0]; - } - if (content.contains(JETTY_PARAMETER_PATH)) { - baseUrl = content.substring(content.indexOf(JETTY_PARAMETER_PATH)+JETTY_PARAMETER_PATH.length()).split(" ")[0]; - } - if (!portNo.isEmpty() && !baseUrl.isEmpty()) { - urlPath = "localhost:"+portNo+baseUrl; - } - } - } - catch (Exception e) {} + File file = prefs.getProjectPath().append(businessBundleClassName+PRODUCT).toFile(); + try { + String content; + InputStream fisSourceFile = new FileInputStream(file); + content = IOUtils.toString(fisSourceFile, "UTF-8"); + if (content != null) { + content = content.replace("\r", " "); + content = content.replace("\n", " "); + content = content.replace("\n", " "); + String portNo = ""; + String baseUrl = ""; + if (content.contains(JETTY_PARAMETER_PORT)) { + portNo = content.substring(content.indexOf(JETTY_PARAMETER_PORT)+JETTY_PARAMETER_PORT.length()).split(" ")[0]; + } + if (content.contains(JETTY_PARAMETER_PATH)) { + baseUrl = content.substring(content.indexOf(JETTY_PARAMETER_PATH)+JETTY_PARAMETER_PATH.length()).split(" ")[0]; + } + if (!portNo.isEmpty() && !baseUrl.isEmpty()) { + urlPath = "localhost:"+portNo+baseUrl; } } } + catch (Exception e) {} //NOSONAR if (!urlPath.isEmpty() && asMobile) { urlPath += "mobile"; } @@ -350,7 +347,7 @@ public class ProductConfigurationStore implements IPreferenceStore { public String getProductFileName() { String businessBundleClassName = prefs.getBusinessBundleClassNameReadOnly(); if (!businessBundleClassName.isEmpty()) { - businessBundleClassName += ".product"; + businessBundleClassName += PRODUCT; } return businessBundleClassName; } @@ -360,18 +357,11 @@ public class ProductConfigurationStore implements IPreferenceStore { case FILE_LOCATION: return prefs.getPreferencesFile(); case FILE_EDITOR: return prefs.getPreferencesFile(); case FILE_NAME: return ProductConfigurationPrefs.PRODUCT_PREFERENCES; - case PRODUCT_FILE: { - String businessBundleClassName = prefs.getBusinessBundleClassNameReadOnly(); - if (!businessBundleClassName.isEmpty()) { - businessBundleClassName += ".product"; - } - return businessBundleClassName; - } + case PRODUCT_FILE: return getProductFile(); case DESKTOP_URL_PATH: return getDesktopUrlPath(prefs.getBusinessBundleClassNameReadOnly()); case MOBILE_URL_PATH: return getMobileUrlPath(prefs.getBusinessBundleClassNameReadOnly()); case SHOW_PRODUCT_CONFIGURATION: return prefs.getName(); case SELECT_PRODUCT_CONFIGURATION: return prefs.getName(); - // case ACTIVEMQ_BROKER_SERVER: return prefsUsed.getActiveMqBrokerServerName(); case BPM_ENGINE_SERVER: return prefsUsed.getBpmServerIp(); case BPM_ENGINE_HIBERNATE_SCHEMA_NAME: return prefsUsed.getBpmEngineHibernateSchemaName(prefsUsed.getBpmEnginePersistenceUnit()); @@ -380,73 +370,62 @@ public class ProductConfigurationStore implements IPreferenceStore { case AUTHENTICATION_ADMIN_USERNAME: return prefsUsed.getAdminEmailUsername(); case AUTHENTICATION_ADMIN_PASSWORD: return prefsUsed.getAdminEmailPassword(); case AUTHENTICATION_ORGANIZATION_ID: return prefsUsed.getAuthenticationOrganizationId(); -// case DATASOURCE_AUTHENTICATION: return prefsUsed.getDataSourceNameForAuthentication(); -// case DATASOURCE_BLOB: return prefsUsed.getDataSourceNameForBLOB(); -// case DATASOURCE_BPM: return prefsUsed.getDataSourceNameForBPM(); -// case DATASOURCE_BUSINESSDATA: return prefsUsed.getDataSourceNameForBusinessData(); case EXCHANGE_RATES_EURO_BASED_DAILY: return prefsUsed.getEuroXRefRatesURLDaily(); case EXCHANGE_RATES_EURO_BASED_PREVIOUS: return prefsUsed.getEuroXRefRatesURLPrevious(); case JAVA_POS_CONFIGURATION: return prefsUsed.getJavaPosConfiguration(); - case FILE_CONTENT: { - Stream<String> lines=null; - try { - lines = Files.lines(Paths.get(getString(Preference.FILE_LOCATION), ".settings", getString(Preference.FILE_NAME)+".prefs")); - return StringUtils.join(lines.toArray(), "\r\n"); - } catch (IOException e) { - return ""; - } finally { - if( lines != null) - lines.close(); - } - } -// case LOCALIZATION_GOOGLE_API_KEY: return prefsUsed.getLanguagesGoogleApiKey(); -// case LOCALIZATION_GOOGLE_HTTP_REFERRER: return prefsUsed.getLanguagesGoogleHttpReferrer(); - case LOCALIZATION_SUPPORTED_LANGUAGES: { - HashSet<Locale> helper = new HashSet<>(); - for (Locale locale : prefsUsed.getLanguages().values()) { - if (locale != null) { - helper.add(locale); - } - } - Locale[] locales = helper.toArray(new Locale[0]); - sortLocalesOnDisplayNameOnPages(locales); - String retcode = null; - for (Locale locale : locales) { - if (locale != null) { - if (retcode == null) { - retcode = getLanguageDisplayName(locale, showLanguageSelectInRespectiveLocaleOnPages()); - } - else { - retcode += CONFIGURATION_ITEM_SEPARATOR+getLanguageDisplayName(locale, showLanguageSelectInRespectiveLocaleOnPages()); - } - } - } - return retcode; - } + case DATAINTERCHANGE_CONFIGURATION: return prefsUsed.getDatainterchangeConfiguration(); + case FILE_CONTENT: return getFileContent(); + case LOCALIZATION_SUPPORTED_LANGUAGES: return getSupportedLanguages(prefsUsed); case DATASOURCES: return DataSourceConfiguration.serialize(prefsUsed.getDataSources()); case PERSISTENCE_UNITS: return PersistenceUnitConfiguration.serialize(prefsUsed.getPersistenceUnits()); case LDAP_CONTEXT_FACTORY_URL: return prefsUsed.getLdapContextFactoryUrl(); case LDAP_USER_DN_TEMPLATE: return prefsUsed.getLdapUserDnTemplate(); + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); } - LOGGER.error("no Product Configuration string attribute "+name+" found"); + LOGGER.error("no Product Configuration string attribute {} found", name); return ""; } - public final String getLanguageDisplayName(Locale locale) { - return getLanguageDisplayName(locale, prefs.showLanguageSelectInRespectiveLocale()); + private String getSupportedLanguages(IProductConfigurationPrefs prefsUsed) { + return prefsUsed.getLanguages().values().stream().filter(Objects::nonNull) + .sorted((l1, l2) -> l1.getDisplayName().compareTo(l2.getDisplayName())) + .map(l -> getLanguageDisplayName(l)).collect(Collectors.joining(CONFIGURATION_ITEM_SEPARATOR)); + } + + private String getFileContent() { + Stream<String> lines = null; + try { + lines = Files.lines(Paths.get(getString(Preference.FILE_LOCATION), ".settings", + getString(Preference.FILE_NAME) + ".prefs")); + return StringUtils.join(lines.toArray(), "\r\n"); + } catch (IOException e) { + return ""; + } finally { + if (lines != null) + lines.close(); + } } - public final String getLanguageDisplayName(Locale locale, boolean showLanguageSelectInRespectiveLocale) { - return LocaleUtils.getDisplayName(locale, showLanguageSelectInRespectiveLocale)+" "+LANGUAGE_DESCRIPTION_SEPARATOR+" "+locale.toString(); + private String getProductFile() { + String businessBundleClassName = prefs.getBusinessBundleClassNameReadOnly(); + if (!businessBundleClassName.isEmpty()) { + businessBundleClassName += PRODUCT; + } + return businessBundleClassName; + } + + public final String getLanguageDisplayName(Locale locale) { + return LocaleUtils.getDisplayName(locale)+" "+LANGUAGE_DESCRIPTION_SEPARATOR+" "+locale.toString(); } - public final static String CONFIGURATION_ITEM_SEPARATOR = ";"; - public final static String LANGUAGE_DESCRIPTION_SEPARATOR = "="; + public static final String CONFIGURATION_ITEM_SEPARATOR = ";"; + public static final String LANGUAGE_DESCRIPTION_SEPARATOR = "="; @Override public void setValue(String name, String value) { switch (Preference.by(name)) { - case SHOW_PRODUCT_CONFIGURATION: /* NOOP */ return; + case SHOW_PRODUCT_CONFIGURATION: return; case SELECT_PRODUCT_CONFIGURATION: selectOsbpProductProject(value); return; case ACTIVEMQ_BROKER_SERVER: prefs.setActiveMqBrokerServerName(value); return; case BPM_ENGINE_SERVER: prefs.setBpmServerIp(value); return; @@ -456,67 +435,64 @@ public class ProductConfigurationStore implements IPreferenceStore { case AUTHENTICATION_ADMIN_USERNAME: prefs.setAdminEmailUsername(value); return; case AUTHENTICATION_ADMIN_PASSWORD: prefs.setAdminEmailPassword(value); return; case AUTHENTICATION_ORGANIZATION_ID: prefs.setAuthenticationOrganizationId(value); return; - //case AUTHENTICATION_LDAP_DN_TEMPLATE: break; - //case AUTHENTICATION_LDAP_SERVER: break; -// case DATASOURCE_AUTHENTICATION: prefs.setDataSourceForAuthentication(value); return; -// case DATASOURCE_BLOB: prefs.setDataSourceForBLOB(value); return; -// case DATASOURCE_BPM: prefs.setDataSourceForBPM(value); return; -// case DATASOURCE_BUSINESSDATA: prefs.setDataSourceForBusinessData(value); return; + case AUTHENTICATION_LDAP_DN_TEMPLATE: + case AUTHENTICATION_LDAP_SERVER: break; case EXCHANGE_RATES_EURO_BASED_DAILY: prefs.setEuroForeignExchangeReferenceRatesURLDaily(value); return; case EXCHANGE_RATES_EURO_BASED_PREVIOUS: prefs.setEuroForeignExchangeReferenceRatesURLPrevious(value); return; case JAVA_POS_CONFIGURATION: prefs.setJavaPosConfiguration(value); return; + case DATAINTERCHANGE_CONFIGURATION: prefs.setDatainterchangeConfiguration(value); return; case FILE_CONTENT: return; case FILE_LOCATION: return; case FILE_NAME: return; -// case LOCALIZATION_GOOGLE_API_KEY: prefs.setLanguagesGoogleApiKey(value); return; -// case LOCALIZATION_GOOGLE_HTTP_REFERRER: prefs.setLanguagesGoogleHttpReferrer(value); return; - case LOCALIZATION_SUPPORTED_LANGUAGES: { - Map<String, Locale> locales = new HashMap<String, Locale>(); - String[] localesISO = value.split(CONFIGURATION_ITEM_SEPARATOR); - for(String localeISO : localesISO) { - try { - Locale locale = null; - String[] lParts = localeISO.split(LANGUAGE_DESCRIPTION_SEPARATOR)[1].trim().split("_"); - if (lParts.length == 1) { - locale = new Locale(lParts[0]); - } else if (lParts.length == 2) { - locale = new Locale(lParts[0], lParts[1]); - } else if (lParts.length == 3) { - locale = new Locale(lParts[0], lParts[1], lParts[2]); - } - locales.put(localeISO, locale); - } - catch (Exception e) { - LOGGER.error("could not set lanuage "+localeISO, e); - } - } - prefs.setLanguages(locales); - return; - } + case LOCALIZATION_SUPPORTED_LANGUAGES: setSupportedLanguages(value); return; case DATASOURCES: prefs.setDataSources(DataSourceConfiguration.deserialize(value)); return; case PERSISTENCE_UNITS: prefs.setPersistenceUnits(PersistenceUnitConfiguration.deserialize(value)); return; case LDAP_CONTEXT_FACTORY_URL: prefs.setLdapContextFactoryUrl(value); return; case LDAP_USER_DN_TEMPLATE: prefs.setLdapUserDnTemplate(value); return; + default: + LOGGER.error(CASE_NOT_IMPLEMENTED); + } + LOGGER.error("no Product Configuration string attribute {} found, could not set {}", name, value); + } + + private void setSupportedLanguages(String value) { + Map<String, Locale> locales = new HashMap<>(); + String[] localesISO = value.split(CONFIGURATION_ITEM_SEPARATOR); + for(String localeISO : localesISO) { + try { + Locale locale = null; + String[] lParts = localeISO.split(LANGUAGE_DESCRIPTION_SEPARATOR)[1].trim().split("_"); + if (lParts.length == 1) { + locale = new Locale(lParts[0]); + } else if (lParts.length == 2) { + locale = new Locale(lParts[0], lParts[1]); + } else if (lParts.length == 3) { + locale = new Locale(lParts[0], lParts[1], lParts[2]); + } + locales.put(localeISO, locale); + } + catch (Exception e) { + LOGGER.error("could not set lanuage "+localeISO, e); + } } - LOGGER.error("no Product Configuration string attribute "+name+" found, could not set "+value); + prefs.setLanguages(locales); } // --- unused methods --- @Override public void addPropertyChangeListener(IPropertyChangeListener listener) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public boolean contains(String name) { - // TODO Auto-generated method stub return false; } @Override public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override @@ -526,13 +502,13 @@ public class ProductConfigurationStore implements IPreferenceStore { @Override public double getDefaultDouble(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration double attribute {} found", name); return 0; } @Override public float getDefaultFloat(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration float attribute {} found", name); return 0; } @@ -543,7 +519,7 @@ public class ProductConfigurationStore implements IPreferenceStore { @Override public long getDefaultLong(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration long attribute {} found", name); return 0; } @@ -554,19 +530,19 @@ public class ProductConfigurationStore implements IPreferenceStore { @Override public double getDouble(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration double attribute {} found", name); return 0; } @Override public float getFloat(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration float attribute {} found", name); return 0; } @Override public long getLong(String name) { - LOGGER.error("no Product Configuration integer attribute "+name+" found"); + LOGGER.error("no Product Configuration long attribute {} found", name); return 0; } @@ -582,61 +558,61 @@ public class ProductConfigurationStore implements IPreferenceStore { @Override public void putValue(String name, String value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void removePropertyChangeListener(IPropertyChangeListener listener) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, double value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, float value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, int value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, long value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, String defaultObject) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setDefault(String name, boolean value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setToDefault(String name) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setValue(String name, double value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setValue(String name, float value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } @Override public void setValue(String name, long value) { - // TODO Auto-generated method stub + LOGGER.error(NOT_IMPLEMENTED); } } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductProjectScope.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductProjectScope.java index 65bb024..bb75b11 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductProjectScope.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/data/ProductProjectScope.java @@ -25,12 +25,12 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.osbp.preferences.ProductConfigurationPrefs; import org.osgi.service.prefs.BackingStoreException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.osbp.preferences.ProductConfigurationPrefs; - +@SuppressWarnings("restriction") public final class ProductProjectScope implements IScopeContext { private static final Logger LOGGER = LoggerFactory.getLogger(ProductProjectScope.class); @@ -61,7 +61,7 @@ public final class ProductProjectScope implements IScopeContext { * @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation() */ public IPath getLocation() { - IProject project = ((IResource) context).getProject(); + IProject project = context.getProject(); IResource resource = ProductConfigurationPrefs.getPrefsFile(project); if (resource == null) { IPath location = project.getLocation(); @@ -95,7 +95,7 @@ public final class ProductProjectScope implements IScopeContext { Class<?> preferenceClass = preference.getClass(); Method getLoadLevel = preferenceClass.getDeclaredMethod("getLoadLevel"); getLoadLevel.setAccessible(true); - ProjectPreferences loadLevelInstance = (ProjectPreferences) getLoadLevel.invoke(preference); + ProjectPreferences loadLevelInstance = (ProjectPreferences) getLoadLevel.invoke(preference); Class<?>loadLevelClass = loadLevelInstance.getClass(); Field fileField = loadLevelClass.getDeclaredField("file"); fileField.setAccessible(true); @@ -103,7 +103,8 @@ public final class ProductProjectScope implements IScopeContext { if ((activeFile == null) || !activeFile.getFullPath().toOSString().equals(prefsFile.getFullPath().toOSString())) { fileField.set(loadLevelInstance, prefsFile); preference.sync(); - LOGGER.info("set preference file to: "+prefsFile.getFullPath().toOSString()); + String msg = prefsFile.getFullPath().toOSString(); + LOGGER.info("set preference file to: {}", msg); } } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException | BackingStoreException | NoSuchMethodException | SecurityException | InvocationTargetException x) { diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageExternalDataSources.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageExternalDataSources.java index 5189717..26eba21 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageExternalDataSources.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageExternalDataSources.java @@ -38,8 +38,12 @@ public class PreferencePageExternalDataSources extends APreferencePage { new Item("URL for external XML file provider for Euro based exchange rates"), new Item(Type.TEXT, Preference.EXCHANGE_RATES_EURO_BASED_PREVIOUS, "All historic"), new Item(Type.TEXT, Preference.EXCHANGE_RATES_EURO_BASED_DAILY, "Actual day"), - new Item("JavaPOS"), - new Item(Type.TEXT, Preference.JAVA_POS_CONFIGURATION, "Configuration"), + new Item(""), + new Item("JavaPOS Settings"), + new Item(Type.TEXT, Preference.JAVA_POS_CONFIGURATION, "Configuration file"), + new Item(""), + new Item("DataInterchange Settings"), + new Item(Type.TEXT, Preference.DATAINTERCHANGE_CONFIGURATION, "Configuration file"), }; } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageLocalization.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageLocalization.java index bb02599..dd16e3c 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageLocalization.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/page/PreferencePageLocalization.java @@ -15,6 +15,7 @@ package org.eclipse.osbp.preferences.ui.page; import java.util.HashSet; import java.util.Locale; +import org.eclipse.osbp.preferences.LocaleUtils; import org.eclipse.osbp.preferences.Preference; import org.eclipse.osbp.preferences.ProductConfiguration; import org.eclipse.osbp.preferences.ui.component.APreferencePage; @@ -47,20 +48,13 @@ public class PreferencePageLocalization extends APreferencePage { locales = helper.toArray(new Locale[0]); } String[][] retcode = new String[locales.length][2]; - // --- sort by display name used in the respective locale, if it is configured --- - store.sortLocalesOnDisplayNameOnPages(locales); + LocaleUtils.sortLocalesOnDisplayName(locales); int idx = 0; for (Locale locale : locales) { -// String loc = locale.getLanguage(); -// if (locale.getCountry().length() > 0) { -// loc += "_" + locale.getCountry(); -// } else if (locale.getVariant().length() > 0) { -// loc += "_" + locale.getVariant(); -// } String loc = locale.toString(); if (!loc.isEmpty()) { retcode[idx][0] = loc; - retcode[idx][1] = store.getLanguageDisplayName(locale, false); + retcode[idx][1] = store.getLanguageDisplayName(locale); } idx++; } @@ -82,12 +76,9 @@ public class PreferencePageLocalization extends APreferencePage { new Item(Type.TEXT, Preference.SHOW_PRODUCT_CONFIGURATION, "Product Configuration", false), new Item(""), new Item(Type.BOOLEAN, Preference.LOCALIZATION_AUTOCREATE, "Extract I18N Properties"), - // new Item(Type.BOOLEAN, Preference.LOCALIZATION_AUTOTRANSLATE, "Use Google Translator"), new Item(Type.BOOLEAN, Preference.LOCALIZATION_SHOW_SELECT_IN_RESPECTIVE_LOCALE, "Display locale selection in respective locale"), - // new Item(Type.TEXT, Preference.LOCALIZATION_GOOGLE_API_KEY, "Google API Key"), - // new Item(Type.TEXT, Preference.LOCALIZATION_GOOGLE_HTTP_REFERRER, "Google HTTP Referrer"), new Item(""), - new Item(Type.LIST_ADD_REMOVE, Preference.LOCALIZATION_SUPPORTED_LANGUAGES, "Supported Languages", getAvailableLanguages(), ProductConfigurationStore.CONFIGURATION_ITEM_SEPARATOR), + new Item(Type.LIST_ADD_REMOVE, Preference.LOCALIZATION_SUPPORTED_LANGUAGES, "Supported Languages", getAvailableLanguages(), ProductConfigurationStore.CONFIGURATION_ITEM_SEPARATOR) }; } } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ApplicationProjectInspector.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ApplicationProjectInspector.java index d6cf647..4ffc897 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ApplicationProjectInspector.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ApplicationProjectInspector.java @@ -34,7 +34,7 @@ public class ApplicationProjectInspector { private final IProject applicationProject; private final String applicationFileName; - private ProductFilePluginsVerifier productPlugins = null; + private ProductFileFeaturesPluginsVerifier productPlugins = null; private ProductFileConfigurationsVerifier productConfigurations = null; private ManifestFileVerifier productManifest = null; Map<String,ManifestFileVerifier> manifestVerifiers = null; @@ -81,7 +81,7 @@ public class ApplicationProjectInspector { return productManifest.isFragmentOfHost("org.eclipse.osbp.wizard.ui"); } - public ProductFilePluginsVerifier getProductPlugins() { + public ProductFileFeaturesPluginsVerifier getProductPlugins() { initialize(); return productPlugins; } @@ -103,7 +103,7 @@ public class ApplicationProjectInspector { private void initialize() { if (manifestVerifiers == null) { - productPlugins = new ProductFilePluginsVerifier(applicationProject, applicationFileName); + productPlugins = new ProductFileFeaturesPluginsVerifier(applicationProject, applicationFileName); productConfigurations = new ProductFileConfigurationsVerifier(applicationProject, applicationFileName); productManifest = new ManifestFileVerifier(applicationProject); manifestVerifiers = new TreeMap<>(); diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileConfigurationsVerifier.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileConfigurationsVerifier.java index 61f5b23..21c9bce 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileConfigurationsVerifier.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileConfigurationsVerifier.java @@ -41,6 +41,14 @@ public class ProductFileConfigurationsVerifier extends ProductFileVerifier { return ProductFileBase.getValues(document, "product/configurations", "plugin", "id"); } + /** + * Get all <product><configurations><plugin> items with <code>id="???"</code> as id + */ + @Override + public Map<String,Map<String,String>> getPluginFeatures() { + return ProductFileBase.getValues(document, "product/configurations", "feature", "id"); + } + @Override public String getRowName() { return "Product configurations ..."; diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFilePluginsVerifier.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileFeaturesPluginsVerifier.java index 539f632..2e3dd52 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFilePluginsVerifier.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileFeaturesPluginsVerifier.java @@ -16,19 +16,19 @@ import java.util.Map; import org.eclipse.core.resources.IProject; import org.eclipse.osbp.preferences.ProductFileBase; -import org.eclipse.osbp.preferences.ProductFilePlugins; +import org.eclipse.osbp.preferences.ProductFileFeatures; import org.eclipse.osbp.preferences.ui.data.ProductConfigurationStore; /** * Class to verify all <plugins> inside a <code>*.product</code> configuration file. */ -public class ProductFilePluginsVerifier extends ProductFileVerifier { +public class ProductFileFeaturesPluginsVerifier extends ProductFileVerifier { - public ProductFilePluginsVerifier(IProject project, String productFileName) { + public ProductFileFeaturesPluginsVerifier(IProject project, String productFileName) { super( project, productFileName, - new ProductFilePlugins(ProductConfigurationStore.instance().getProductConfigurationPrefs()), + new ProductFileFeatures(ProductConfigurationStore.instance().getProductConfigurationPrefs()), project.getName()+"/"+productFileName ); } @@ -41,6 +41,14 @@ public class ProductFilePluginsVerifier extends ProductFileVerifier { return ProductFileBase.getValues(document, "product/plugins", "plugin", "id"); } + /** + * Get all <product><plugins><plugin> items with <code>id="???"</code> as id + */ + @Override + public Map<String,Map<String,String>> getPluginFeatures() { + return ProductFileBase.getValues(document, "product/features", "feature", "id"); + } + @Override public String getRowName() { return "Product plugins ..."; diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileVerifier.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileVerifier.java index 3e526ba..4583924 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileVerifier.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/utils/ProductFileVerifier.java @@ -59,13 +59,15 @@ abstract public class ProductFileVerifier extends ConfigurationFileVerifier { e.printStackTrace(); } this.document = document; - Map<String, Map<String, String>> actual = getPluginBundles(); +// Map<String, Map<String, String>> actual = getPluginBundles(); + Map<String, Map<String, String>> actual = getPluginFeatures(); verifyNecessary("required", actual, base.getRequiredAsMap()); verifyNecessary("recommended", actual, base.getRecommendedAsMap()); verifyDeprecated("deprecated", actual, base.getDeprecatedAsMap()); } abstract public Map<String,Map<String,String>> getPluginBundles(); + abstract public Map<String, Map<String, String>> getPluginFeatures(); /** * For every violation found a subitem will be generated. @@ -110,4 +112,5 @@ abstract public class ProductFileVerifier extends ConfigurationFileVerifier { public SubItem[] getSubItems() { return subItems.toArray(new SubItem[0]); } + } diff --git a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/TableTreeDescribedItem.java b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/swt/widgets/TreeDescribedItem.java index 1be3c26..70dcb69 100644 --- a/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/osbp/preferences/ui/component/TableTreeDescribedItem.java +++ b/org.eclipse.osbp.preferences.ui.page/src/org/eclipse/swt/widgets/TreeDescribedItem.java @@ -10,24 +10,25 @@ * Contributors: * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation */ -package org.eclipse.osbp.preferences.ui.component; +package org.eclipse.swt.widgets; import org.eclipse.osbp.preferences.AItemDescribed; import org.eclipse.osbp.preferences.AItemDescribed.SubItem; import org.eclipse.osbp.preferences.IItemDescribed; import org.eclipse.osbp.preferences.ItemDescription; +import org.eclipse.osbp.preferences.ui.component.APreferencePage; +import org.eclipse.osbp.preferences.ui.component.ATreeFieldEditor; import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.TableTreeItem; -public class TableTreeDescribedItem extends TableTreeItem implements IItemDescribed { +public class TreeDescribedItem extends TreeItem implements IItemDescribed { - private final ATableTreeFieldEditor fParent; + private final ATreeFieldEditor fParent; private final static int ATTRIBUTE = 0; - protected final static int VALUE = 2; - protected final static int HINT = 1; + public final static int VALUE = 2; + public final static int HINT = 1; - public TableTreeDescribedItem(ATableTreeFieldEditor parent, AItemDescribed dataItem, AItemDescribed defaultItem) { + public TreeDescribedItem(ATreeFieldEditor parent, AItemDescribed dataItem, AItemDescribed defaultItem) { this(parent); ItemDescription description = fParent.getItemDescription(); if (dataItem.getRowName() == null) { @@ -40,7 +41,7 @@ public class TableTreeDescribedItem extends TableTreeItem implements IItemDescri String[] columnNames = description.getColumnNames(); if (dataItem.getSubItems() != null) { for (SubItem subItem : dataItem.getSubItems()) { - TableTreeItem attribute = new TableTreeItem(this, SWT.NONE); + TreeItem attribute = new TreeItem(this, SWT.NONE); attribute.setText(ATTRIBUTE, subItem.getAction()); attribute.setText(VALUE, subItem.getInformation()); attribute.setImage(HINT, APreferencePage.getImage(subItem.getIcon())); @@ -51,7 +52,7 @@ public class TableTreeDescribedItem extends TableTreeItem implements IItemDescri if (columnNames.length > 0) { boolean isDefault = defaultItem != null; for (int idx = 0; idx<columnNames.length; idx++) { - TableTreeItem attribute = new TableTreeItem(this, SWT.NONE); + TreeItem attribute = new TreeItem(this, SWT.NONE); attribute.setText(ATTRIBUTE, columnNames[idx]); attribute.setText(VALUE, dataItem.getValue(columnNames[idx])); if (defaultItem != null && dataItem.getValue(columnNames[idx]).equals(defaultItem.getValue(columnNames[idx]))) { @@ -67,19 +68,19 @@ public class TableTreeDescribedItem extends TableTreeItem implements IItemDescri } } - public static TableTreeDescribedItem clone(TableTreeItem source, String postfix) { - TableTreeDescribedItem cloned = null; - if (source instanceof TableTreeDescribedItem) { - TableTreeDescribedItem sourceItem = (TableTreeDescribedItem) source; + public static TreeDescribedItem clone(TreeItem source, String postfix) { + TreeDescribedItem cloned = null; + if (source instanceof TreeDescribedItem) { + TreeDescribedItem sourceItem = (TreeDescribedItem) source; ItemDescription description = sourceItem.fParent.getItemDescription(); - cloned = new TableTreeDescribedItem(sourceItem.fParent); + cloned = new TreeDescribedItem(sourceItem.fParent); cloned.setText(ATTRIBUTE, description.getRowName()); cloned.setText(VALUE, sourceItem.getText(VALUE)+postfix); cloned.setImage(HINT, APreferencePage.getImage(APreferencePage.DEFAULT_VALUE_NO)); String[] columnNames = description.getColumnNames(); for (int idx = 0; idx<columnNames.length; idx++) { - TableTreeItem sourceAttribute = sourceItem.getItem(idx); - TableTreeItem cloneAttribute = new TableTreeItem(cloned, SWT.NONE); + TreeItem sourceAttribute = sourceItem.getItem(idx); + TreeItem cloneAttribute = new TreeItem(cloned, SWT.NONE); cloneAttribute.setText(ATTRIBUTE, columnNames[idx]); cloneAttribute.setText(VALUE, sourceAttribute.getText(VALUE)); cloneAttribute.setImage(HINT, APreferencePage.getImage(APreferencePage.DEFAULT_VALUE_NO)); @@ -88,8 +89,8 @@ public class TableTreeDescribedItem extends TableTreeItem implements IItemDescri return cloned; } - public TableTreeDescribedItem(ATableTreeFieldEditor parent) { - super(parent.tableTree, SWT.NONE); + public TreeDescribedItem(ATreeFieldEditor parent) { + super(parent.tree, SWT.NONE); fParent = parent; } diff --git a/org.eclipse.osbp.preferences/.classpath b/org.eclipse.osbp.preferences/.classpath new file mode 100644 index 0000000..8b37caa --- /dev/null +++ b/org.eclipse.osbp.preferences/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src/"/> + <classpathentry kind="src" path="xtend-gen/"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/org.eclipse.osbp.preferences/.gitignore b/org.eclipse.osbp.preferences/.gitignore new file mode 100644 index 0000000..92145bc --- /dev/null +++ b/org.eclipse.osbp.preferences/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/
\ No newline at end of file diff --git a/org.eclipse.osbp.preferences/.settings/org.eclipse.core.resources.prefs b/org.eclipse.osbp.preferences/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/org.eclipse.osbp.preferences/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.osbp.preferences/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.osbp.preferences/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..6e80039 --- /dev/null +++ b/org.eclipse.osbp.preferences/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.eclipse.osbp.preferences/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.osbp.preferences/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/org.eclipse.osbp.preferences/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.osbp.preferences/.settings/org.eclipse.pde.core.prefs b/org.eclipse.osbp.preferences/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000..f29e940 --- /dev/null +++ b/org.eclipse.osbp.preferences/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/org.eclipse.osbp.preferences/.settings/org.eclipse.xtend.core.Xtend.prefs b/org.eclipse.osbp.preferences/.settings/org.eclipse.xtend.core.Xtend.prefs new file mode 100644 index 0000000..19e3115 --- /dev/null +++ b/org.eclipse.osbp.preferences/.settings/org.eclipse.xtend.core.Xtend.prefs @@ -0,0 +1,11 @@ +//outlet.DEFAULT_OUTPUT.sourceFolder.src/test/java.directory=src/test/generated-sources/xtend +BuilderConfiguration.is_project_specific=true +eclipse.preferences.version=1 +is_project_specific=true +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.sourceFolder.emf-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen +outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true diff --git a/org.eclipse.osbp.preferences/META-INF/MANIFEST.MF b/org.eclipse.osbp.preferences/META-INF/MANIFEST.MF index b33895c..d9575b6 100644 --- a/org.eclipse.osbp.preferences/META-INF/MANIFEST.MF +++ b/org.eclipse.osbp.preferences/META-INF/MANIFEST.MF @@ -14,17 +14,18 @@ Import-Package: javax.transaction, org.eclipse.persistence.config;version="2.6.0", org.eclipse.persistence.sessions;version="2.6.1", org.osgi.framework;version="1.6.0", - org.osgi.service.jdbc + org.osgi.service.jdbc, + javax.annotation Require-Bundle: org.slf4j.api;bundle-version="1.7.2", org.eclipse.equinox.preferences, - javax.annotation;bundle-version="[1.1.0,1.2.0)", javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime, org.eclipse.osbp.gitinfo;bundle-version="[0.9.0,0.10.0)", com.google.guava, - org.eclipse.xtext.xbase.lib, - org.eclipse.xtend.lib, - org.eclipse.xtend.lib.macro, - org.eclipse.persistence.core + org.eclipse.xtext.xbase.lib;bundle-version="[2.11.0,2.12.0)", + org.eclipse.xtend.lib;bundle-version="[2.11.0,2.12.0)", + org.eclipse.xtend.lib.macro;bundle-version="[2.11.0,2.12.0)", + org.eclipse.persistence.core, + org.eclipse.core.variables Bundle-Vendor: Eclipse OSBP Bundle-Activator: org.eclipse.osbp.preferences.Activator diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/EnumDatabaseVendor.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/EnumDatabaseVendor.java index 57550ca..16da1f7 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/EnumDatabaseVendor.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/EnumDatabaseVendor.java @@ -16,242 +16,227 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import org.eclipse.core.runtime.IBundleGroup; +import org.eclipse.core.runtime.IBundleGroupProvider; +import org.eclipse.core.runtime.Platform; +import org.osgi.framework.Bundle; + class VARIABLE { // NOSONAR - protected static final String VENDOR = "%%VENDOR%%"; - protected static final String TYPE = "%%TYPE%%"; - protected static final String SERVER = "%%SERVER%%"; - protected static final String PORT = "%%PORT%%"; - protected static final String DATABASE = "%%DATABASE%%"; - protected static final String USERHOME = "%%USERHOME%%"; + protected static final String VENDOR = "%%VENDOR%%"; + protected static final String TYPE = "%%TYPE%%"; + protected static final String SERVER = "%%SERVER%%"; + protected static final String PORT = "%%PORT%%"; + protected static final String DATABASE = "%%DATABASE%%"; + protected static final String USERHOME = "%%USERHOME%%"; } public enum EnumDatabaseVendor { - /*... - // http://hsqldb.org/doc/src/org/hsqldb/jdbc/JDBCDriver.html - // http://hsqldb.org/doc/guide/dbproperties-chapt.html - HSQLDB_IN_MEMORY ("hsqldb", "", "org.hsqldb.jdbc.JDBCDriver", - "jdbc:hsqldb:mem:"+VARIABLE.DATABASE - // http://h2database.com/html/features.html#execute_sql_on_connection - +";INIT=" - // create schema on initial startup - // http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_schemas_schema_objects - // http://www.hsqldb.org/doc/guide/ch09.html#N11DB1 - //+"ALTER SCHEMA PUBLIC RENAME TO "+VARIABLE.DATABASE - //+"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE - // SEPARATOR between multipe SQL commandos - //+"\\;" - // use this schema as default - +"SET SCHEMA "+VARIABLE.DATABASE - // SEPARATOR between multipe SQL commandos - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user" - ), - // http://www.h2database.com/html/features.html#database_url - HSQLDB_LOCAL_FILE ("hsqldb", "", "org.hsqldb.jdbc.JDBCDriver", - "jdbc:hsqldb:file:"+VARIABLE.USERHOME+"/"+VARIABLE.DATABASE - // http://h2database.com/html/features.html#execute_sql_on_connection - +";INIT=" - // create schema on initial startup - // http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_schemas_schema_objects - // http://www.hsqldb.org/doc/guide/ch09.html#N11DB1 - //+"ALTER SCHEMA PUBLIC RENAME TO "+VARIABLE.DATABASE - //+"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE - // SEPARATOR between multipe SQL commandos - //+"\\;" - // use this schema as default - +"SET SCHEMA "+VARIABLE.DATABASE - // SEPARATOR between multipe SQL commandos - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user" - ), - */ - DERBY_IN_MEMORY (true, "derby", "", "org.apache.derby.jdbc.EmbeddedDriver", - "jdbc:derby:memory:"+VARIABLE.DATABASE - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp17453.html - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlpinmemdb.html - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp40653.html - +";create=true" - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", - "org.hibernate.dialect.DerbyTenSevenDialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\"/>\n"+ - " <plugin id=\"org.apache.derby\"/>", - "id int", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); - } - }, + /* + * ... // http://hsqldb.org/doc/src/org/hsqldb/jdbc/JDBCDriver.html // + * http://hsqldb.org/doc/guide/dbproperties-chapt.html HSQLDB_IN_MEMORY + * ("hsqldb", "", "org.hsqldb.jdbc.JDBCDriver", + * "jdbc:hsqldb:mem:"+VARIABLE.DATABASE // + * http://h2database.com/html/features.html#execute_sql_on_connection + * +";INIT=" // create schema on initial startup // + * http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html# + * dbc_schemas_schema_objects // + * http://www.hsqldb.org/doc/guide/ch09.html#N11DB1 + * //+"ALTER SCHEMA PUBLIC RENAME TO "+VARIABLE.DATABASE + * //+"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE // SEPARATOR between + * multipe SQL commandos //+"\\;" // use this schema as default + * +"SET SCHEMA "+VARIABLE.DATABASE // SEPARATOR between multipe SQL + * commandos +"", "JDBC", + * "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user" + * ), // http://www.h2database.com/html/features.html#database_url + * HSQLDB_LOCAL_FILE ("hsqldb", "", "org.hsqldb.jdbc.JDBCDriver", + * "jdbc:hsqldb:file:"+VARIABLE.USERHOME+"/"+VARIABLE.DATABASE // + * http://h2database.com/html/features.html#execute_sql_on_connection + * +";INIT=" // create schema on initial startup // + * http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html# + * dbc_schemas_schema_objects // + * http://www.hsqldb.org/doc/guide/ch09.html#N11DB1 + * //+"ALTER SCHEMA PUBLIC RENAME TO "+VARIABLE.DATABASE + * //+"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE // SEPARATOR between + * multipe SQL commandos //+"\\;" // use this schema as default + * +"SET SCHEMA "+VARIABLE.DATABASE // SEPARATOR between multipe SQL + * commandos +"", "JDBC", + * "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user" + * ), + */ + DERBY_IN_MEMORY(true, "derby", "", "org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:" + VARIABLE.DATABASE + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp17453.html + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlpinmemdb.html + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp40653.html + + ";create=true" + "", "JDBC", + "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", + "org.hibernate.dialect.DerbyTenSevenDialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.eclipse.osbp.dependencies.feature.derby\"/>", + "id int", "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); + } + }, // https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html // https://db.apache.org/derby/integrate/plugin_help/derby_app.html - DERBY_LOCAL_FILE (false, "derby", "", "org.apache.derby.jdbc.EmbeddedDriver", - "jdbc:derby:directory:"+VARIABLE.USERHOME+"/"+VARIABLE.DATABASE - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp17453.html - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlpinmemdb.html - // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp40653.html - +";create=true" - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", - "org.hibernate.dialect.DerbyTenSevenDialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\"/>\n"+ - " <plugin id=\"org.apache.derby\"/>", - "id int", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); - } - }, + DERBY_LOCAL_FILE(false, "derby", "", "org.apache.derby.jdbc.EmbeddedDriver", + "jdbc:derby:directory:" + VARIABLE.USERHOME + "/" + VARIABLE.DATABASE + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp17453.html + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlpinmemdb.html + // https://db.apache.org/derby/docs/10.8/devguide/cdevdvlp40653.html + + ";create=true" + "", + "JDBC", "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", + "org.hibernate.dialect.DerbyTenSevenDialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.eclipse.osbp.dependencies.feature.derby\"/>", + "id int", "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); + } + }, // https://karussell.wordpress.com/2009/06/09/hibernate-cfg-xml-settings-for-derby-oracle-and-h2/ // https://db.apache.org/derby/integrate/plugin_help/derby_app.html - DERBY_CLIENT (false, "derby", "", "org.apache.derby.jdbc.ClientDriver", - "jdbc:derby://"+VARIABLE.SERVER+":"+VARIABLE.PORT+"/"+VARIABLE.DATABASE+";create=true", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", - "org.hibernate.dialect.DerbyDialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"org.eclipse.gemini.dbaccess.derby\"/>\n"+ - " <plugin id=\"org.apache.derby\"/>", - "id int", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); - } - }, + DERBY_CLIENT(false, "derby", "", "org.apache.derby.jdbc.ClientDriver", + "jdbc:derby://" + VARIABLE.SERVER + ":" + VARIABLE.PORT + "/" + VARIABLE.DATABASE + ";create=true", "JDBC", + "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", + "org.hibernate.dialect.DerbyDialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.derby\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.eclipse.osbp.dependencies.feature.derby\"/>", + "id int", "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_DERBY); + } + }, // http://www.h2database.com/html/features.html#in_memory_databases - H2_IN_MEMORY (true, "h2", "", "org.h2.Driver", - "jdbc:h2:mem:"+VARIABLE.DATABASE - // http://h2database.com/html/features.html#execute_sql_on_connection - +";LOCK_MODE=0" - +";INIT=" + H2_IN_MEMORY(true, "h2", "", "org.h2.Driver", "jdbc:h2:mem:" + VARIABLE.DATABASE + // http://h2database.com/html/features.html#execute_sql_on_connection + + ";LOCK_MODE=0" + ";INIT=" // create schema on initial startup - +"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE + + "CREATE SCHEMA IF NOT EXISTS " + VARIABLE.DATABASE // SEPARATOR between multipe SQL commandos - +"\\;" + + "\\;" // use this schema as default - +"SET SCHEMA "+VARIABLE.DATABASE + + "SET SCHEMA " + VARIABLE.DATABASE // SEPARATOR between multipe SQL commandos - +"\\;" - // ??? set autocommit to false due to own implemented commit statements ?!? - +"SET AUTOCOMMIT=FALSE" - // http://h2database.com/html/features.html#auto_mixed_mode - // H2 can't mix memory AND AUTO-SERVER - +";AUTO_SERVER=TRUE" - // http://h2database.com/html/features.html#in_memory_databases - +";DB_CLOSE_DELAY=-1" - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", - "org.hibernate.dialect.H2Dialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.h2\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"org.eclipse.gemini.dbaccess.h2\"/>\n"+ - " <plugin id=\"org.h2\"/>\n"+ - " <plugin id=\"org.ops4j.pax.jdbc.h2\"/>", - /** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist also discussed at http://stackoverflow.com/questions/9909893/jpa-how-to-annotate-id-so-its-autoincrements-without-sequence-table */ - "/** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist */ uuid String", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_H2); - } - /** - * in H2 there are no schema names! - */ - @Override - public String applySchemaNameSpecifications(String schemaName) { - return null; - } - }, + + "\\;" + // ??? set autocommit to false due to own implemented commit + // statements ?!? + + "SET AUTOCOMMIT=FALSE" + // http://h2database.com/html/features.html#auto_mixed_mode + // H2 can't mix memory AND AUTO-SERVER - +";AUTO_SERVER=TRUE" + // http://h2database.com/html/features.html#in_memory_databases + + ";DB_CLOSE_DELAY=-1" + "", "JDBC", + "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", + "org.hibernate.dialect.H2Dialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.h2\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.eclipse.osbp.dependencies.feature.h2\"/>", + /** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist also discussed at http://stackoverflow.com/questions/9909893/jpa-how-to-annotate-id-so-its-autoincrements-without-sequence-table*/ + "/** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist */ uuid String", + "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_H2); + } + + /** + * in H2 there are no schema names! + */ + @Override + public String applySchemaNameSpecifications(String schemaName) { + return null; + } + + }, // http://www.h2database.com/html/features.html#database_url - H2_LOCAL_FILE (false, "h2", "", "org.h2.Driver", - "jdbc:h2:file:"+VARIABLE.USERHOME+"/"+VARIABLE.DATABASE - // http://h2database.com/html/features.html#execute_sql_on_connection - +";LOCK_MODE=0" - +";INIT=" + H2_LOCAL_FILE(false, "h2", "", "org.h2.Driver", "jdbc:h2:file:" + VARIABLE.USERHOME + "/" + VARIABLE.DATABASE + // http://h2database.com/html/features.html#execute_sql_on_connection + + ";LOCK_MODE=0" + ";INIT=" // create schema on initial startup - +"CREATE SCHEMA IF NOT EXISTS "+VARIABLE.DATABASE + + "CREATE SCHEMA IF NOT EXISTS " + VARIABLE.DATABASE // SEPARATOR between multipe SQL commandos - +"\\;" + + "\\;" // use this schema as default - +"SET SCHEMA "+VARIABLE.DATABASE + + "SET SCHEMA " + VARIABLE.DATABASE // SEPARATOR between multipe SQL commandos - +"\\;" - // ??? set autocommit to false due to own implemented commit statements ?!? - +"SET AUTOCOMMIT=FALSE" - // http://h2database.com/html/features.html#auto_mixed_mode - +";AUTO_SERVER=TRUE" - +"", - "JDBC", - "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", - "org.hibernate.dialect.H2Dialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.h2\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"org.eclipse.gemini.dbaccess.h2\"/>\n"+ - " <plugin id=\"org.h2\"/>\n"+ - " <plugin id=\"org.ops4j.pax.jdbc.h2\"/>", - /** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist also discussed at http://stackoverflow.com/questions/9909893/jpa-how-to-annotate-id-so-its-autoincrements-without-sequence-table */ - "/** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist */ uuid String", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_H2); - } - /** - * in H2 there are no schema names! - */ - @Override - public String applySchemaNameSpecifications(String schemaName) { - return "APP"; - } - }, + + "\\;" + // ??? set autocommit to false due to own implemented commit + // statements ?!? + + "SET AUTOCOMMIT=FALSE" + // http://h2database.com/html/features.html#auto_mixed_mode + + ";AUTO_SERVER=TRUE" + "", "JDBC", + "driverType, URL, description, logWriter, loginTimeout, password, passwordChars, url, user", + "org.hibernate.dialect.H2Dialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.h2\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.eclipse.osbp.dependencies.feature.h2\"/>", + /** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist also discussed at http://stackoverflow.com/questions/9909893/jpa-how-to-annotate-id-so-its-autoincrements-without-sequence-table*/ + "/** do NOT use <code>int</code> for id in H2, because table SEQUENCE doesn't exist */ uuid String", + "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_H2); + } + + /** + * in H2 there are no schema names! + */ + @Override + public String applySchemaNameSpecifications(String schemaName) { + return "APP"; + } + }, // see samples - // - http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-connect-drivermanager.html - // - http://www.mkyong.com/jdbc/how-to-connect-to-mysql-with-jdbc-driver-java/ + // - + // http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-connect-drivermanager.html + // - + // http://www.mkyong.com/jdbc/how-to-connect-to-mysql-with-jdbc-driver-java/ // - http://www.vogella.com/tutorials/MySQLJava/article.html - MYSQL (false, "mysql", "thin", "com.mysql.jdbc.Driver", - "jdbc:"+VARIABLE.VENDOR+"://"+VARIABLE.SERVER+":"+VARIABLE.PORT+"/"+VARIABLE.DATABASE, - "JDBC", - "URL, allowLoadLocalInfile, allowMasterDownConnections, allowMultiQueries, allowNanAndInf, allowUrlInLocalInfile, alwaysSendSetIsolation, authenticationPlugins, autoClosePStmtStreams, autoDeserialize, autoGenerateTestcaseScript, autoReconnect, autoReconnectForConnectionPools, autoReconnectForPools, autoSlowLog, blobsAreStrings, cacheCallableStatements, cacheCallableStmts, cachePrepStmts, cachePreparedStatements, cacheResultSetMetadata, cacheServerConfiguration, callableStatementCacheSize, callableStmtCacheSize, capitalizeDBMDTypes, capitalizeTypeNames, characterEncoding, characterSetResults, clientCertificateKeyStorePassword, clientCertificateKeyStoreType, clientCertificateKeyStoreUrl, clientInfoProvider, clobCharacterEncoding, clobberStreamingResults, compensateOnDuplicateKeyUpdateCounts, connectTimeout, connectionAttributes, connectionCollation, connectionLifecycleInterceptors, continueBatchOnError, createDatabaseIfNotExist, databaseName, defaultAuthenticationPlugin, defaultFetchSize, detectCustomCollations, detectServerPreparedStmts, disabledAuthenticationPlugins, disconnectOnExpiredPasswords, dontTrackOpenResources, dumpMetadataOnColumnNotFound, dumpQueriesOnException, dynamicCalendars, elideSetAutoCommits, emptyStringsConvertToZero, emulateLocators, emulateUnsupportedPstmts, enablePacketDebug, enableQueryTimeouts, encoding, exceptionInterceptors, explainSlowQueries, failOverReadOnly, functionsNeverReturnBlobs, gatherPerfMetrics, gatherPerformanceMetrics, generateSimpleParameterMetadata, getProceduresReturnsFunctions, holdResultsOpenOverStatementClose, ignoreNonTxTables, includeInnodbStatusInDeadlockExceptions, includeThreadDumpInDeadlockExceptions, includeThreadNamesAsStatementComment, initialTimeout, interactiveClient, isInteractiveClient, jdbcCompliantTruncation, jdbcCompliantTruncationForReads, largeRowSizeThreshold, loadBalanceAutoCommitStatementRegex, loadBalanceAutoCommitStatementThreshold, loadBalanceBlacklistTimeout, loadBalanceConnectionGroup, loadBalanceEnableJMX, loadBalanceExceptionChecker, loadBalancePingTimeout, loadBalanceSQLExceptionSubclassFailover, loadBalanceSQLStateFailover, loadBalanceStrategy, loadBalanceValidateConnectionOnSwapServer, localSocketAddress, logSlowQueries, logWriter, logXaCommands, logger, loggerClassName, loginTimeout, maintainTimeStats, maxAllowedPacket, maxQuerySizeToLog, maxReconnects, maxRows, metadataCacheSize, netTimeoutForStreamingResults, noAccessToProcedureBodies, noDatetimeStringSync, noTimezoneConversionForTimeType, nullCatalogMeansCurrent, nullNamePatternMatchesAll, overrideSupportsIntegrityEnhancementFacility, packetDebugBufferSize, padCharsWithSpace, paranoid, parseInfoCacheFactory, password, passwordCharacterEncoding, pedantic, pinGlobalTxToPhysicalConnection, populateInsertRowWithDefaultValues, port, portNumber, prepStmtCacheSize, prepStmtCacheSqlLimit, preparedStatementCacheSize, preparedStatementCacheSqlLimit, processEscapeCodesForPrepStmts, profileSQL, profileSql, profilerEventHandler, propertiesTransform, propertiesViaRef, queriesBeforeRetryMaster, queryTimeoutKillsConnection, reconnectAtTxEnd, relaxAutoCommit, replicationEnableJMX, reportMetricsIntervalMillis, requireSSL, resourceId, resultSetSizeThreshold, retainStatementAfterResultSetClose, retriesAllDown, rewriteBatchedStatements, rollbackOnPooledClose, roundRobinLoadBalance, runningCTS13, secondsBeforeRetryMaster, selfDestructOnPingMaxOperations, selfDestructOnPingSecondsLifetime, serverConfigCacheFactory, serverName, serverTimezone, sessionVariables, slowQueryThresholdMillis, slowQueryThresholdNanos, socketFactory, socketFactoryClassName, socketTimeout, statementInterceptors, strictFloatingPoint, strictUpdates, tcpKeepAlive, tcpNoDelay, tcpRcvBuf, tcpSndBuf, tcpTrafficClass, tinyInt1isBit, traceProtocol, transformedBitIsBoolean, treatUtilDateAsTimestamp, trustCertificateKeyStorePassword, trustCertificateKeyStoreType, trustCertificateKeyStoreUrl, ultraDevHack, url, useAffectedRows, useBlobToStoreUTF8OutsideBMP, useColumnNamesInFindColumn, useCompression, useConfigs, useCursorFetch, useDirectRowUnpack, useDynamicCharsetInfo, useFastDateParsing, useFastIntParsing, useGmtMillisForDatetimes, useHostsInPrivileges, useInformationSchema, useJDBCCompliantTimezoneShift, useJvmCharsetConverters, useLegacyDatetimeCode, useLocalSessionState, useLocalTransactionState, useNanosForElapsedTime, useOldAliasMetadataBehavior, useOldUTF8Behavior, useOnlyServerErrorMessages, useReadAheadInput, useSSL, useSSPSCompatibleTimezoneShift, useServerPrepStmts, useServerPreparedStmts, useSqlStateCodes, useStreamLengthsInPrepStmts, useTimezone, useUltraDevWorkAround, useUnbufferedInput, useUnicode, useUsageAdvisor, user, utf8OutsideBmpExcludedColumnNamePattern, utf8OutsideBmpIncludedColumnNamePattern, verifyServerCertificate, yearIsDateType, zeroDateTimeBehavior", - "org.hibernate.dialect.MySQLDialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.mysql\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"com.mysql.jdbc\"/>\n"+ - " <plugin id=\"org.eclipse.gemini.dbaccess.mysql\"/>", - "id int", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_MYSQL); - } - }, - ORACLE (false, "oracle", "thin", "oracle.jdbc.OracleDriver", - "jdbc:"+VARIABLE.VENDOR+":"+VARIABLE.TYPE+":@"+VARIABLE.SERVER+":"+VARIABLE.PORT+":"+VARIABLE.DATABASE, - "Oracle-JDBC", - null, - "org.hibernate.dialect.Oracle10gDialect", - " <plugin id=\"org.eclipse.gemini.dbaccess.oracle\" autoStart=\"true\" startLevel=\"2\" />", - " <plugin id=\"oracleJdbc.osgi\"/>\n"+ - " <plugin id=\"org.eclipse.gemini.dbaccess.oracle\"/>", - "id int", - "uuid String" - ) { - @Override - public String applySqlSpecifications(String sqlStatement) { - return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_ORACLE); - } - }; - + MYSQL(false, "mysql", "thin", "com.mysql.jdbc.Driver", + "jdbc:" + VARIABLE.VENDOR + "://" + VARIABLE.SERVER + ":" + VARIABLE.PORT + "/" + VARIABLE.DATABASE, "JDBC", + "URL, allowLoadLocalInfile, allowMasterDownConnections, allowMultiQueries, allowNanAndInf, allowUrlInLocalInfile, alwaysSendSetIsolation, authenticationPlugins, autoClosePStmtStreams, autoDeserialize, autoGenerateTestcaseScript, autoReconnect, autoReconnectForConnectionPools, autoReconnectForPools, autoSlowLog, blobsAreStrings, cacheCallableStatements, cacheCallableStmts, cachePrepStmts, cachePreparedStatements, cacheResultSetMetadata, cacheServerConfiguration, callableStatementCacheSize, callableStmtCacheSize, capitalizeDBMDTypes, capitalizeTypeNames, characterEncoding, characterSetResults, clientCertificateKeyStorePassword, clientCertificateKeyStoreType, clientCertificateKeyStoreUrl, clientInfoProvider, clobCharacterEncoding, clobberStreamingResults, compensateOnDuplicateKeyUpdateCounts, connectTimeout, connectionAttributes, connectionCollation, connectionLifecycleInterceptors, continueBatchOnError, createDatabaseIfNotExist, databaseName, defaultAuthenticationPlugin, defaultFetchSize, detectCustomCollations, detectServerPreparedStmts, disabledAuthenticationPlugins, disconnectOnExpiredPasswords, dontTrackOpenResources, dumpMetadataOnColumnNotFound, dumpQueriesOnException, dynamicCalendars, elideSetAutoCommits, emptyStringsConvertToZero, emulateLocators, emulateUnsupportedPstmts, enablePacketDebug, enableQueryTimeouts, encoding, exceptionInterceptors, explainSlowQueries, failOverReadOnly, functionsNeverReturnBlobs, gatherPerfMetrics, gatherPerformanceMetrics, generateSimpleParameterMetadata, getProceduresReturnsFunctions, holdResultsOpenOverStatementClose, ignoreNonTxTables, includeInnodbStatusInDeadlockExceptions, includeThreadDumpInDeadlockExceptions, includeThreadNamesAsStatementComment, initialTimeout, interactiveClient, isInteractiveClient, jdbcCompliantTruncation, jdbcCompliantTruncationForReads, largeRowSizeThreshold, loadBalanceAutoCommitStatementRegex, loadBalanceAutoCommitStatementThreshold, loadBalanceBlacklistTimeout, loadBalanceConnectionGroup, loadBalanceEnableJMX, loadBalanceExceptionChecker, loadBalancePingTimeout, loadBalanceSQLExceptionSubclassFailover, loadBalanceSQLStateFailover, loadBalanceStrategy, loadBalanceValidateConnectionOnSwapServer, localSocketAddress, logSlowQueries, logWriter, logXaCommands, logger, loggerClassName, loginTimeout, maintainTimeStats, maxAllowedPacket, maxQuerySizeToLog, maxReconnects, maxRows, metadataCacheSize, netTimeoutForStreamingResults, noAccessToProcedureBodies, noDatetimeStringSync, noTimezoneConversionForTimeType, nullCatalogMeansCurrent, nullNamePatternMatchesAll, overrideSupportsIntegrityEnhancementFacility, packetDebugBufferSize, padCharsWithSpace, paranoid, parseInfoCacheFactory, password, passwordCharacterEncoding, pedantic, pinGlobalTxToPhysicalConnection, populateInsertRowWithDefaultValues, port, portNumber, prepStmtCacheSize, prepStmtCacheSqlLimit, preparedStatementCacheSize, preparedStatementCacheSqlLimit, processEscapeCodesForPrepStmts, profileSQL, profileSql, profilerEventHandler, propertiesTransform, propertiesViaRef, queriesBeforeRetryMaster, queryTimeoutKillsConnection, reconnectAtTxEnd, relaxAutoCommit, replicationEnableJMX, reportMetricsIntervalMillis, requireSSL, resourceId, resultSetSizeThreshold, retainStatementAfterResultSetClose, retriesAllDown, rewriteBatchedStatements, rollbackOnPooledClose, roundRobinLoadBalance, runningCTS13, secondsBeforeRetryMaster, selfDestructOnPingMaxOperations, selfDestructOnPingSecondsLifetime, serverConfigCacheFactory, serverName, serverTimezone, sessionVariables, slowQueryThresholdMillis, slowQueryThresholdNanos, socketFactory, socketFactoryClassName, socketTimeout, statementInterceptors, strictFloatingPoint, strictUpdates, tcpKeepAlive, tcpNoDelay, tcpRcvBuf, tcpSndBuf, tcpTrafficClass, tinyInt1isBit, traceProtocol, transformedBitIsBoolean, treatUtilDateAsTimestamp, trustCertificateKeyStorePassword, trustCertificateKeyStoreType, trustCertificateKeyStoreUrl, ultraDevHack, url, useAffectedRows, useBlobToStoreUTF8OutsideBMP, useColumnNamesInFindColumn, useCompression, useConfigs, useCursorFetch, useDirectRowUnpack, useDynamicCharsetInfo, useFastDateParsing, useFastIntParsing, useGmtMillisForDatetimes, useHostsInPrivileges, useInformationSchema, useJDBCCompliantTimezoneShift, useJvmCharsetConverters, useLegacyDatetimeCode, useLocalSessionState, useLocalTransactionState, useNanosForElapsedTime, useOldAliasMetadataBehavior, useOldUTF8Behavior, useOnlyServerErrorMessages, useReadAheadInput, useSSL, useSSPSCompatibleTimezoneShift, useServerPrepStmts, useServerPreparedStmts, useSqlStateCodes, useStreamLengthsInPrepStmts, useTimezone, useUltraDevWorkAround, useUnbufferedInput, useUnicode, useUsageAdvisor, user, utf8OutsideBmpExcludedColumnNamePattern, utf8OutsideBmpIncludedColumnNamePattern, verifyServerCertificate, yearIsDateType, zeroDateTimeBehavior", + "org.hibernate.dialect.MySQLDialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.mysql\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"org.osbee.dependencies.feature.mysql\"/>\n", + "id int", + "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_MYSQL); + } + + @Override + public String getToDateSQLMethod() { + return "str_to_date"; + + } + + @Override + public String getToTimestampSQLMethod() { + return "str_to_date"; + } + }, + ORACLE(false, "oracle", "thin", "oracle.jdbc.OracleDriver", + "jdbc:" + VARIABLE.VENDOR + ":" + VARIABLE.TYPE + ":@" + VARIABLE.SERVER + ":" + VARIABLE.PORT + ":" + + VARIABLE.DATABASE, + "Oracle-JDBC", null, "org.hibernate.dialect.Oracle10gDialect", + " <plugin id=\"org.eclipse.gemini.dbaccess.oracle\" autoStart=\"true\" startLevel=\"2\" />", + " <feature id=\"net.osbee.dependencies.feature.oracle\"/>\n", + "id int", + "uuid String") { + @Override + public String applySqlSpecifications(String sqlStatement) { + return sqlStatement.replace(ONE_ROW_ONE_COLUMN_TABLE, ONE_ROW_ONE_COLUMN_TABLE_ORACLE); + } + + + @Override + public String getToTimestampSQLMethod() { + return "to_timestamp"; + } + }; + private final boolean fIsInMemory; private final String fDriverVendor; private final String fDriverType; @@ -259,115 +244,124 @@ public enum EnumDatabaseVendor { private final String fJdbcUrlFormat; private final String fPersistenceBatchWriting; private final String fHibernateDialect; - private final String fProductPlugins; + private final String fProductFeatures; private final String fProductConfigurations; private final String fEntityPropertyBaseID; private final String fEntityPropertyBaseUUID; private final List<String> fPropertyKeys; - private EnumDatabaseVendor(boolean isInMemory, String driverVendor, String driverType, String driverClass, String jdbcUrlFormat, String persistenceBatchWriting, String propertyKeys, String hibernateDialect, String productConfigurations, String productPlugins, String entityPropertyBaseID, String entityPropertyBaseUUID) { - fIsInMemory = isInMemory; - fDriverVendor = driverVendor; - fDriverType = driverType; - fDriverClass = driverClass; - fJdbcUrlFormat = jdbcUrlFormat; - fPersistenceBatchWriting = persistenceBatchWriting; - fPropertyKeys = new ArrayList<>(); - if (propertyKeys != null) { - for (String propertyKey : propertyKeys.split(",")) { + private EnumDatabaseVendor(boolean isInMemory, String driverVendor, String driverType, String driverClass, + String jdbcUrlFormat, String persistenceBatchWriting, String propertyKeys, String hibernateDialect, + String productConfigurations, String productFeatures, String entityPropertyBaseID, + String entityPropertyBaseUUID) { + fIsInMemory = isInMemory; + fDriverVendor = driverVendor; + fDriverType = driverType; + fDriverClass = driverClass; + fJdbcUrlFormat = jdbcUrlFormat; + fPersistenceBatchWriting = persistenceBatchWriting; + fPropertyKeys = new ArrayList<>(); + if (propertyKeys != null) { + for (String propertyKey : propertyKeys.split(",")) { fPropertyKeys.add(propertyKey.trim()); } } - fHibernateDialect = hibernateDialect; - fProductPlugins = productPlugins; - fProductConfigurations = productConfigurations; - fEntityPropertyBaseID = entityPropertyBaseID; - fEntityPropertyBaseUUID = entityPropertyBaseUUID; + fHibernateDialect = hibernateDialect; + fProductFeatures = productFeatures; + fProductConfigurations = productConfigurations; + fEntityPropertyBaseID = entityPropertyBaseID; + fEntityPropertyBaseUUID = entityPropertyBaseUUID; } - + private static boolean equalsIgnoreCase(String s1, String s2) { s1 = s1.replaceAll("_IN_", "").replaceAll("_", ""); // NOSONAR s2 = s2.replaceAll("_IN_", "").replaceAll("_", ""); // NOSONAR return s1.equalsIgnoreCase(s2); } - - public static String getNecessaryPlugins(Set<EnumDatabaseVendor> vendors) { - ArrayList<String> result = new ArrayList<String>(); - for (EnumDatabaseVendor vendor : vendors) { - result.add(vendor.getProductPlugins()); - } - return String.join("\n", result); - } - - public static String getUnnecessaryPlugins(Set<EnumDatabaseVendor> vendors) { + + public static String getDatabaseFeatures(Set<EnumDatabaseVendor> vendors) { ArrayList<String> result = new ArrayList<String>(); - for (EnumDatabaseVendor vendor : values()) { - if (!vendors.contains(vendor)) { - result.add(vendor.getProductPlugins()); - } + for (EnumDatabaseVendor vendor : vendors) { + result.add(vendor.getProductFeatures()); } return String.join("\n", result); } - + public static String getNecessaryConfigurations(Set<EnumDatabaseVendor> vendors) { ArrayList<String> result = new ArrayList<String>(); - for (EnumDatabaseVendor vendor : vendors) { + for (EnumDatabaseVendor vendor : vendors) { result.add(vendor.getProductConfigurations()); } return String.join("\n", result); } - + public static String getUnnecessaryConfigurations(Set<EnumDatabaseVendor> vendors) { ArrayList<String> result = new ArrayList<String>(); - for (EnumDatabaseVendor vendor : values()) { - if (!vendors.contains(vendor)) { + for (EnumDatabaseVendor vendor : values()) { + if (!vendors.contains(vendor)) { result.add(vendor.getProductConfigurations()); } } return String.join("\n", result); } - + public static EnumDatabaseVendor byName(String vendorName) { // NOSONAR return byName(vendorName, vendorName, vendorName); } - + public static EnumDatabaseVendor byName(String vendorName, String driverVendor, String dataBaseName) { // NOSONAR - for (EnumDatabaseVendor step : values()) { - if (equalsIgnoreCase(step.name(), vendorName) || equalsIgnoreCase(step.fDriverVendor, vendorName)) { + for (EnumDatabaseVendor step : values()) { + if (equalsIgnoreCase(step.name(), vendorName) || equalsIgnoreCase(step.fDriverVendor, vendorName)) { return step; } } - for (EnumDatabaseVendor step : values()) { - if (equalsIgnoreCase(step.name(), dataBaseName) || equalsIgnoreCase(step.fDriverVendor, dataBaseName)) { + for (EnumDatabaseVendor step : values()) { + if (equalsIgnoreCase(step.name(), dataBaseName) || equalsIgnoreCase(step.fDriverVendor, dataBaseName)) { return step; } - if (equalsIgnoreCase(step.name(), driverVendor) || equalsIgnoreCase(step.fDriverVendor, driverVendor)) { + if (equalsIgnoreCase(step.name(), driverVendor) || equalsIgnoreCase(step.fDriverVendor, driverVendor)) { return step; } } return ORACLE; } - + public static final String ONE_ROW_ONE_COLUMN_TABLE = "{{ONE_ROW_ONE_COLUMN_TABLE}}"; public static final String ONE_ROW_ONE_COLUMN_TABLE_DERBY = "SYSIBM.SYSDUMMY1"; public static final String ONE_ROW_ONE_COLUMN_TABLE_H2 = "DUAL"; public static final String ONE_ROW_ONE_COLUMN_TABLE_MYSQL = "DUAL"; public static final String ONE_ROW_ONE_COLUMN_TABLE_ORACLE = "DUAL"; - + /** * @param sqlStatement * @return applied vendor specific SQL statement */ abstract public String applySqlSpecifications(String sqlStatement); + /** + * @param sqlStatement + * @return applied vendor specific 'to date' SQL statement prefix + */ + public String getToDateSQLMethod() { + return "to_date"; + } + + /** + * @param sqlStatement + * @return applied vendor specific 'to timestamp' SQL statement prefix + */ + public String getToTimestampSQLMethod() { + return "to_timestamp"; + } + public String applySchemaNameSpecifications(String schemaName) { return schemaName; } - + public boolean isInMemory() { return fIsInMemory; } - + public String getDriverVendor() { return fDriverVendor; } @@ -384,8 +378,8 @@ public enum EnumDatabaseVendor { return fHibernateDialect; } - public String getProductPlugins() { - return fProductPlugins; + public String getProductFeatures() { + return fProductFeatures; } public String getProductConfigurations() { @@ -404,37 +398,35 @@ public enum EnumDatabaseVendor { return fPersistenceBatchWriting; } - public String jdbcUrl(String driverVendor, String driverType, String serverName, int serverPort, String databaseName, String jdbUrlFormat) { - if ((driverVendor == null) || driverVendor.trim().isEmpty()) { + public String jdbcUrl(String driverVendor, String driverType, String serverName, int serverPort, + String databaseName, String jdbUrlFormat) { + if ((driverVendor == null) || driverVendor.trim().isEmpty()) { driverVendor = fDriverVendor; // NOSONAR } - if ((driverType == null) || driverType.trim().isEmpty()) { + if ((driverType == null) || driverType.trim().isEmpty()) { driverType = fDriverType; // NOSONAR } - if (serverName == null) { + if (serverName == null) { serverName = "???"; // NOSONAR } - if (serverPort == 0) { + if (serverPort == 0) { serverPort = -1; // NOSONAR } String format = ((jdbUrlFormat != null) && !jdbUrlFormat.isEmpty()) ? jdbUrlFormat : fJdbcUrlFormat; String retcode = format // NOSONAR - .replaceAll(VARIABLE.VENDOR, driverVendor) - .replaceAll(VARIABLE.TYPE, driverType) - .replaceAll(VARIABLE.SERVER, serverName) - .replaceAll(VARIABLE.PORT, ((Integer)serverPort).toString()) - .replaceAll(VARIABLE.DATABASE, databaseName) - .replaceAll(VARIABLE.USERHOME, System.getProperty("user.home").replace(java.io.File.separator,"/")) - ; + .replaceAll(VARIABLE.VENDOR, driverVendor).replaceAll(VARIABLE.TYPE, driverType) + .replaceAll(VARIABLE.SERVER, serverName).replaceAll(VARIABLE.PORT, ((Integer) serverPort).toString()) + .replaceAll(VARIABLE.DATABASE, databaseName) + .replaceAll(VARIABLE.USERHOME, System.getProperty("user.home").replace(java.io.File.separator, "/")); return retcode; } public boolean supportsPropertyKey(String key) { - if (fPropertyKeys.isEmpty()) { + if (fPropertyKeys.isEmpty()) { return true; - } - else { + } else { return fPropertyKeys.contains(key); } } + } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/IProductConfigurationPrefs.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/IProductConfigurationPrefs.java index 0c15276..ebe64d0 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/IProductConfigurationPrefs.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/IProductConfigurationPrefs.java @@ -40,6 +40,8 @@ public interface IProductConfigurationPrefs { public abstract String getEuroXRefRatesURLDaily(); public abstract String getEuroXRefRatesURLPrevious(); + + public abstract String getWelcomeScreen(); /** * @return name of the server running the ActiveMQ Broker Service.<br>Use {@link ProductConfiguration#isServerReasonable(String)} to check if the name is reasonable. @@ -52,14 +54,6 @@ public interface IProductConfigurationPrefs { public abstract int getHybridRefresherMilliSecsInactive(); -// public abstract String getDataSourceNameForAuthentication(); -// -// public abstract String getDataSourceNameForBLOB(); -// -// public abstract String getDataSourceNameForBPM(); -// -// public abstract String getDataSourceNameForBusinessData(); - public abstract int getAuthRESTfulPort(); public abstract boolean hasAutoLogin(); @@ -110,10 +104,6 @@ public interface IProductConfigurationPrefs { public abstract boolean showLanguageSelectInRespectiveLocale(); - public abstract String getLanguagesGoogleHttpReferrer(); - - public abstract String getLanguagesGoogleApiKey(); - public abstract boolean hasToolsPrintService(); public abstract boolean hasDemoToolsTheme(); @@ -150,4 +140,9 @@ public interface IProductConfigurationPrefs { public abstract boolean isEmailUseSslOnConnect(); public abstract String getJavaPosConfiguration(); + + public abstract String getDatainterchangeConfiguration(); + + public abstract boolean isMavenActivated(); + } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/LocaleUtils.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/LocaleUtils.java index 9f15a18..a5e9b9d 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/LocaleUtils.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/LocaleUtils.java @@ -23,26 +23,19 @@ public class LocaleUtils { /** * @param locale - * @param displayByRespectiveLocale true, if the locale itself should be used to get the display name * @return the display name for the given locale */ - public static String getDisplayName(Locale locale, boolean displayByRespectiveLocale) { + public static String getDisplayName(Locale locale) { - String displayName = displayByRespectiveLocale ? - locale.getDisplayLanguage(locale) : - locale.getDisplayLanguage(); + String displayName = locale.getDisplayLanguage(); if (locale.getLanguage().length()>0 && locale.getCountry().length()>0){ - displayName = displayName + " " + ( displayByRespectiveLocale ? - locale.getDisplayCountry(locale) : - locale.getDisplayCountry() ); + displayName = displayName + " " + locale.getDisplayCountry(); if (locale.getVariant().length()>0) { - displayName = displayName + " " + ( displayByRespectiveLocale ? - locale.getDisplayVariant(locale): - locale.getDisplayVariant() ); + displayName = displayName + " " + locale.getDisplayVariant(); } } @@ -51,13 +44,10 @@ public class LocaleUtils { /** * @param locales the array of locales, that should be sorted - * @param displayByRespectiveLocale true, if the locale itself should be used to get the display name for sorting */ - public static void sortLocalesOnDisplayName(Locale[] locales, final boolean displayByRespectiveLocale) { + public static void sortLocalesOnDisplayName(Locale[] locales) { Comparator<Locale> localeComparator = (locale1, locale2) -> { - String locale1Name = displayByRespectiveLocale ? locale1.getDisplayName(locale1) : locale1.getDisplayName(); - String locale2Name = displayByRespectiveLocale ? locale2.getDisplayName(locale2) : locale2.getDisplayName(); - return locale1Name.compareTo(locale2Name); + return locale1.getDisplayName().compareTo(locale2.getDisplayName()); }; Arrays.sort(locales, localeComparator); } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/Preference.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/Preference.java index 57830cb..e506461 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/Preference.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/Preference.java @@ -45,10 +45,6 @@ public enum Preference { BPM_ENGINE_HIBERNATE_MAX_FETCH_DEPTH, DATASOURCES, PRODUCTCONFIGURATION, -// DATASOURCE_AUTHENTICATION, -// DATASOURCE_BLOB, -// DATASOURCE_BPM, -// DATASOURCE_BUSINESSDATA, DTO_REALM_PORTAL_ID, EXCHANGE_RATES_EURO_BASED_DAILY, EXCHANGE_RATES_EURO_BASED_PREVIOUS, @@ -60,14 +56,12 @@ public enum Preference { HYBRID_REFRESH_PERSPECTIVE_ACTIVE, HYBRID_REFRESH_PERSPECTIVE_INACTIVE, JAVA_POS_CONFIGURATION, + DATAINTERCHANGE_CONFIGURATION, LDAP_CONTEXT_FACTORY_URL, LDAP_REALM_PORTAL_ID, LDAP_USER_DN_TEMPLATE, LOCALIZATION_AUTOCREATE, -// LOCALIZATION_AUTOTRANSLATE, LOCALIZATION_SHOW_SELECT_IN_RESPECTIVE_LOCALE, -// LOCALIZATION_GOOGLE_API_KEY, -// LOCALIZATION_GOOGLE_HTTP_REFERRER, LOCALIZATION_SUPPORTED_LANGUAGES, PERSISTENCE_UNITS, DEMO_TOOLS_THEME, diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfiguration.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfiguration.java index 3927ed5..634f5e9 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfiguration.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfiguration.java @@ -39,10 +39,17 @@ public class ProductConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(ProductConfiguration.class); private static ProductConfigurationPrefs workspacePrefs = null; private static ProductConfigurationPrefs activePrefs = null; + + private ProductConfiguration() { + } public static ProductConfigurationPrefs workspacePrefs() { if (workspacePrefs == null) { workspacePrefs = new ProductConfigurationPrefs(WORKSPACE_NAME, new ProductInstanceScope(), true, null); + if(workspacePrefs.getScopeContext() != null && workspacePrefs.getScopeContext().getLocation() != null) { + String msg = workspacePrefs.getScopeContext().getLocation().toOSString(); + LOGGER.debug("ProductConfigurationFile: {}", msg); + } } return workspacePrefs; } @@ -68,12 +75,16 @@ public class ProductConfiguration { * @return <ul><li><code>false</code>, if the server name or ip is defintively non-reasonable.</li><li><code>true</code> otherwise, but it <b>does not guarantee</b> an existing or reachable server name or ip address</li></ul> */ public static boolean isServerReasonable(String serverNameOrIp) { - if (serverNameOrIp.contains("<") || serverNameOrIp.contains(">")) { - return false; - } - return true; + return !(serverNameOrIp.contains("<") || serverNameOrIp.contains(">")); } + public static String getWelcomeScreen() { + return prefs().getWelcomeScreen(); + } + + public static void setWelcomeScreen(String value) { + prefs().setWelcomeScreen(value); + } /** * @see http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html * @return URL to server with the daily Euro Foreign Exchange Reference @@ -127,34 +138,6 @@ public class ProductConfiguration { return prefs().getDataSourceNames(); } -// /** -// * @return the name of the bpm DataSource -// */ -// public static String getDataSourceNameForAuthentication() { -// return prefs().getDataSourceNameForAuthentication(); -// } -// -// /** -// * @return the name of the bpm DataSource -// */ -// public static String getDataSourceNameForBLOB() { -// return prefs().getDataSourceNameForBLOB(); -// } -// -// /** -// * @return the name of the bpm DataSource -// */ -// public static String getDataSourceNameForBPM() { -// return prefs().getDataSourceNameForBPM(); -// } -// -// /** -// * @return the name of the active DataSource -// */ -// public static String getDataSourceNameForBusinessData() { -// return prefs().getDataSourceNameForBusinessData(); -// } - /** * @param jndiName * the requested DataSource @@ -189,13 +172,6 @@ public class ProductConfiguration { /** * @return list of name of all defined DataSources */ -// public static Set<EnumDatabaseVendor> getNecessaryDataBaseVendors(Set<String> jndiNames) { -// return prefs().getNecessaryDataBaseVendors(jndiNames); -// } - - /** - * @return list of name of all defined DataSources - */ public static Set<String> getPersistenceUnitNames() { return prefs().getPersistenceUnitNames(); } @@ -344,14 +320,6 @@ public class ProductConfiguration { return prefs().showLanguageSelectInRespectiveLocale(); } - public static String getLanguagesGoogleHttpReferrer() { - return prefs().getLanguagesGoogleHttpReferrer(); - } - - public static String getLanguagesGoogleApiKey() { - return prefs().getLanguagesGoogleApiKey(); - } - /** * @param generator class of the requested mock data generator * @return either null, if no entry is set, or the timestamp as String @@ -447,7 +415,15 @@ public class ProductConfiguration { return prefs().isEmailUseSslOnConnect(); } + public static boolean isMavenActivated() { + return prefs().isMavenActivated(); + } + public static String getJavaPosConfiguration() { return prefs().getJavaPosConfiguration(); } + + public static String getDatainterchangeConfiguration() { + return prefs().getDatainterchangeConfiguration(); + } } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationDefaultPrefs.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationDefaultPrefs.java index a992fd5..c7b0f28 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationDefaultPrefs.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationDefaultPrefs.java @@ -12,6 +12,10 @@ */ package org.eclipse.osbp.preferences; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; import java.util.Collection; import java.util.HashMap; import java.util.Locale; @@ -28,7 +32,17 @@ import org.eclipse.persistence.config.PersistenceUnitProperties; */ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPrefs { - public final static String BPM_ENGINE_PERSISTENCE_UNIT = "bpm"; + public static final String MYSQL = "mysql"; + public static final String ORACLE = "oracle"; + public static final String PASSWORD_HINT = "<password>"; // NOSONAR + public static final String USERNAME_HINT = "<username>"; + public static final String DATABASE_HINT = "<database>"; + public static final String H2MEMORY = "H2MEMORY"; + public static final String DERBYLOCALFILE = "DERBYLOCALFILE"; + public static final String H2LOCALFILE = "H2LOCALFILE"; + public static final String DERBYMEMORY = "DERBYMEMORY"; + public static final String IP_OR_HOST = "<ip-or-host>"; + public static final String BPM_ENGINE_PERSISTENCE_UNIT = "bpm"; public String getBusinessBundleClassNameReadOnly() { return ""; @@ -38,26 +52,26 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr private Map<String, PersistenceUnitConfiguration> persistenceUnits = new HashMap<>(); public ProductConfigurationDefaultPrefs() { - initializeIfNotExists ("oracle", "oracle", //ProductConfigurationPrefs.DATASOURCE_FOR_BUSINESSDATA, - EnumDatabaseVendor.ORACLE, "<ip-or-host>", 1521, "<database>", "<username>", "<password>"); + initializeIfNotExists (ORACLE, ORACLE, + EnumDatabaseVendor.ORACLE, IP_OR_HOST, 1521, DATABASE_HINT, USERNAME_HINT, PASSWORD_HINT); /* === datasource using a MySQL database === */ - initializeIfNotExists ("mysql", null, - EnumDatabaseVendor.MYSQL, "<ip-or-host>", 3306, "<database>", "<username>", ""); + initializeIfNotExists (MYSQL, null, + EnumDatabaseVendor.MYSQL, IP_OR_HOST, 3306, DATABASE_HINT, USERNAME_HINT, ""); /* === datasource using a H2 in-Memory database === */ initializeIfNotExists (ProductConfigurationPrefs.DEFAULT_H2MEMORY_DATASOURCE, null, - EnumDatabaseVendor.H2_IN_MEMORY, null, -1, "H2MEMORY", "H2MEMORY", "H2MEMORY"); // NOSONAR + EnumDatabaseVendor.H2_IN_MEMORY, null, -1, H2MEMORY, H2MEMORY, H2MEMORY); // NOSONAR /* === datasource using a H2 local-file database === */ initializeIfNotExists (ProductConfigurationPrefs.DEFAULT_H2LOCALFILE_DATASOURCE, null, - EnumDatabaseVendor.H2_LOCAL_FILE, null, -1, "H2LOCALFILE", "H2LOCALFILE", "H2LOCALFILE"); + EnumDatabaseVendor.H2_LOCAL_FILE, null, -1, H2LOCALFILE, H2LOCALFILE, H2LOCALFILE); /* === datasource using a Derby in-Memory database === */ initializeIfNotExists (ProductConfigurationPrefs.DEFAULT_DERBYMEMORY_DATASOURCE, null, - EnumDatabaseVendor.DERBY_IN_MEMORY, null, -1, "DERBYMEMORY", "DERBYMEMORY", "DERBYMEMORY"); + EnumDatabaseVendor.DERBY_IN_MEMORY, null, -1, DERBYMEMORY, DERBYMEMORY, DERBYMEMORY); /* === datasource using a Derby local-file database === */ initializeIfNotExists (ProductConfigurationPrefs.DEFAULT_DERBYLOCALFILE_DATASOURCE, null, - EnumDatabaseVendor.DERBY_LOCAL_FILE, null, -1, "DERBYLOCALFILE", "DERBYLOCALFILE", "DERBYLOCALFILE"); + EnumDatabaseVendor.DERBY_LOCAL_FILE, null, -1, DERBYLOCALFILE, DERBYLOCALFILE, DERBYLOCALFILE); /* === datasource using a Derby database === */ initializeIfNotExists (ProductConfigurationPrefs.DEFAULT_DERBYSERVER_DATASOURCE, null, - EnumDatabaseVendor.DERBY_CLIENT, "<ip-or-host>", 1527, "<database>", "<username>", "<password>"); + EnumDatabaseVendor.DERBY_CLIENT, IP_OR_HOST, 1527, DATABASE_HINT, USERNAME_HINT, PASSWORD_HINT); // --- generate reasonable default preferences for development product initializeIfNotExists (ProductConfigurationPrefs.PERSISTENCE_UNIT_AUTHENTICATION, @@ -86,11 +100,24 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML_DEFAULT); } - private void initializeIfNotExists( - String dataSource, String dataSourceConsumer, EnumDatabaseVendor vendor, + private String readHTML() throws IOException { + StringBuilder builder = new StringBuilder(); + URL url = getClass().getResource("welcome.html"); + if (url != null) { + BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); + while (reader.ready()) { + builder.append(reader.readLine()); + builder.append("\n"); + } + reader.close(); + } + return builder.toString(); + } + + private void initializeIfNotExists( // NOSONAR + String dataSource, String dataSourceConsumer, EnumDatabaseVendor vendor, // NOSONAR String serverName, int serverPort, String database, String username, String password) { - String vendorName = vendor.name(); String driverVendor = vendor.getDriverVendor(); String driverType = vendor.getDriverType(); String driverClass = vendor.getDriverClass(); @@ -108,18 +135,19 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr } } - private void initializeIfNotExists(String persistenceUnit, + private void initializeIfNotExists(String persistenceUnit,// NOSONAR String dataSource, boolean deployOnStartup, boolean queryCache, String batchWriting, int batchWritingSize, boolean cacheStatements, int cacheStatementsSize, - String loggingLevel, String dllGeneration, String xmlPath) { // NOSONAR + String loggingLevel, String dllGeneration, String xmlPath) { DataSourceConfiguration dataSourceConfiguration = dataSources.get(dataSource); + String bw = batchWriting; if ((batchWriting == null) && (dataSourceConfiguration != null)) { - batchWriting = dataSourceConfiguration.getDefaultBatchWriting(); + bw = dataSourceConfiguration.getDefaultBatchWriting(); } PersistenceUnitConfiguration configuration = new PersistenceUnitConfiguration( persistenceUnit, dataSource, deployOnStartup, - queryCache, batchWriting, batchWritingSize, + queryCache, bw, batchWritingSize, cacheStatements, cacheStatementsSize, loggingLevel, dllGeneration, xmlPath, "static"); persistenceUnits.put(persistenceUnit, configuration); @@ -130,7 +158,7 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr */ @Override public String getBpmServerIp() { - return "127.0.0.1"; + return "127.0.0.1"; // NOSONAR } /* (non-Javadoc) @@ -149,6 +177,14 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr return 10000; } + @Override + public String getWelcomeScreen() { + try { + return readHTML(); + } catch (Exception e) { + return ""; + } + } /* (non-Javadoc) * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getEuroXRefRatesURLDaily() */ @@ -197,99 +233,6 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr return 10000; } -// public Collection<DataSourceConfiguration> getDataSources() { -// return dataSources.values(); -// } - -// public Set<String> getDataSourceNames() { -// return dataSources.keySet(); -// } - -// /* (non-Javadoc) -// * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getDataSourceNameForAuthentication() -// */ -// @Override -// public String getDataSourceNameForAuthentication() { -// return ProductConfigurationPrefs.DEFAULT_DATASOURCE_FOR_AUTHENTICATION; -// } -// -// /* (non-Javadoc) -// * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getDataSourceNameForBLOB() -// */ -// @Override -// public String getDataSourceNameForBLOB() { -// return ProductConfigurationPrefs.DEFAULT_DATASOURCE_FOR_BLOB; -// } -// -// /* (non-Javadoc) -// * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getDataSourceNameForBPM() -// */ -// @Override -// public String getDataSourceNameForBPM() { -// return ProductConfigurationPrefs.DEFAULT_DATASOURCE_FOR_BPM; -// } -// -// /* (non-Javadoc) -// * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getDataSourceNameForBusinessData() -// */ -// @Override -// public String getDataSourceNameForBusinessData() { -// return ProductConfigurationPrefs.DEFAULT_DATASOURCE_FOR_BUSINESSDATA; -// } - -// public Properties getDataSourceProperties(String jndiName) { -// DataSourceConfiguration jndi = getDataSource(jndiName); -// return (jndi == null) ? null : jndi.getDataSourceProperties(); -// } - -// public DataSourceConfiguration getDataSource(String jndiName) { -// return dataSources.get(jndiName); -// } - -// public String getDataSourceDriverClass(String jndiName) { -// DataSourceConfiguration jndi = dataSources.get(jndiName); -// return (jndi == null) ? null : jndi.getDriverClass(); -// } - -// public Properties getJpaProperties(String jndiName) { -// DataSourceConfiguration jndi = dataSources.get(jndiName); -// return (jndi == null) ? null : jndi.getJpaProperties(); -// } - -// public Collection<PersistenceUnitConfiguration> getPersistenceUnits() { -// return persistenceUnits.values(); -// } - -// public Set<String> getPersistenceUnitNames() { -// return persistenceUnits.keySet(); -// } - -// public String getPersistenceUnitJndiName(String persistenceUnitName) { -// return persistenceUnits.get(persistenceUnitName).getJndiName(); -// } - -// public String getPersistenceUnitSchemaName(String persistenceUnitName) { -// return persistenceUnits.get(persistenceUnitName).getSchemaName(); -// } - -// public String getPersistenceUnitHibernateDialect(String persistenceUnitName) { -// return getJndiNameHibernateDialect(getPersistenceUnitJndiName(persistenceUnitName)); -// } - -// public String getJndiNameHibernateDialect(String jndiName) { -// DataSourceConfiguration jndi = dataSources.get(jndiName); -// return (jndi == null) ? null : jndi.getDatabaseVendor().getHibernateDialect(); -// } - -// public Properties getPersistenceUnitProperties( -// String persistenceUnitName, CommonDataSource dataSource, ClassLoader classLoader) { -// if (persistenceUnits.containsKey(persistenceUnitName)) { -// return persistenceUnits.get(persistenceUnitName) -// .getPersistenceUnitProperties(dataSource, classLoader); -// } -// return null; -// } - public final String getAuthenticationOrganizationId() { return "FoodMart"; } @@ -408,23 +351,6 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr return true; } -// public final String getShiroConfiguration(String staticRealmClassName) { -// String mainSection = "[main]" + IShiroConfiguration.INI_NEWLINE; -// String realms = ""; -// if (!shiros.containsKey(ProductConfiguration.SHIRO_STATIC_REALM)) { -// shiros.put(ProductConfiguration.SHIRO_STATIC_REALM, new StaticConfiguration(staticRealmClassName, 1)); -// } -// for (String name : shiros.keySet()) { -// mainSection += shiros.get(name).getShiroConfiguration(name); -// if (!realms.isEmpty()) { -// realms += ","; -// } -// realms += "$" + name; -// } -// mainSection += "securityManager.realms = " + realms + IShiroConfiguration.INI_NEWLINE; -// return mainSection; -// } - /* (non-Javadoc) * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getLanguages() */ @@ -477,22 +403,6 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr } /* (non-Javadoc) - * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getLanguagesGoogleHttpReferrer() - */ - @Override - public String getLanguagesGoogleHttpReferrer() { - return ""; - } - - /* (non-Javadoc) - * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#getLanguagesGoogleApiKey() - */ - @Override - public String getLanguagesGoogleApiKey() { - return ""; - } - - /* (non-Javadoc) * @see org.eclipse.osbp.preferences.IProductConfigurationPrefs#hasDemoToolsTheme() */ @Override @@ -588,4 +498,14 @@ public class ProductConfigurationDefaultPrefs implements IProductConfigurationPr public String getJavaPosConfiguration() { return ""; } + + @Override + public String getDatainterchangeConfiguration() { + return ""; + } + + @Override + public boolean isMavenActivated() { + return false; + } } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationPrefs.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationPrefs.java index a79db46..25a1998 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationPrefs.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductConfigurationPrefs.java @@ -51,6 +51,7 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChang import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; import org.eclipse.core.runtime.preferences.IPreferenceNodeVisitor; import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.persistence.config.PersistenceUnitProperties; import org.osgi.service.prefs.BackingStoreException; import org.osgi.service.prefs.Preferences; @@ -71,73 +72,6 @@ class StringComparator implements Comparator<String> { */ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { - public static enum DDL_GENERATION { - CREATE ("create-tables", "create"), - DROP_CREATE ("drop-and-create-tables", "create"), - UPDATE ("create-or-extend-tables", "update"), - NONE ("none", "validate"); - - private final String eclipseLink; - private final String hibernate; - - private DDL_GENERATION(String eclipseLink, String hibernate) { - this.eclipseLink = eclipseLink; - this.hibernate = hibernate; - } - - public String eclipseLink() { - return eclipseLink; - } - - public String hibernate() { - return hibernate; - } - - public static String hibernate(String eclipseLink) { - for (DDL_GENERATION step : values()) { - if (step.eclipseLink.equals(eclipseLink)) { - return step.hibernate; - } - } - return NONE.hibernate; - } - } - - public Set<EnumDatabaseVendor> getNecessaryDataBaseVendors() { - TreeSet<EnumDatabaseVendor> result = new TreeSet<EnumDatabaseVendor>(); - for (String pu : getPersistenceUnitNames()) { - addNecessaryDataBaseVendor(result, getPersistenceUnitJndiName(pu)); - } - return result; - } - - public Set<EnumDatabaseVendor> getNecessaryDataBaseVendors(String... jndiNames) { - TreeSet<EnumDatabaseVendor> result = new TreeSet<EnumDatabaseVendor>(); - for (String jndiName : jndiNames) { - addNecessaryDataBaseVendor(result, jndiName); - } - return result; - } - -// public Set<EnumDatabaseVendor> getNecessaryDataBaseVendors(Collection<String> jndiNames) { -// return getNecessaryDataBaseVendors(jndiNames.toArray(new String[0])); -// } - -// public Set<EnumDatabaseVendor> getNecessaryDataBaseVendors(String... jndiNames) { -// TreeSet<EnumDatabaseVendor> result = new TreeSet<EnumDatabaseVendor>(); -// for (String jndiName : jndiNames) { -// addNecessaryDataBaseVendor(result, jndiName); -// } -// return result; -// } - - private void addNecessaryDataBaseVendor(TreeSet<EnumDatabaseVendor> result, String jndiName) { - DataSourceConfiguration ds = getDataSource(jndiName); - if (ds != null) { - result.add(ds.getDatabaseVendor()); - } - } - /* ========================= variables =========================== */ private String businessBundleClassNameReadOnly; @@ -153,7 +87,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private boolean noRememberMe = false; private String adminEmail = ""; private String adminEmailUsername = ""; - private String adminEmailPassword = ""; + private String adminEmailPassword = ""; //NOSONAR private String activeMqBrokerServerName; private int activeMqBrokerServerPort; private int hybridRefresherMilliSecsActive; @@ -170,8 +104,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private boolean languagesAutocreate; private boolean uomoMetricUnit; private boolean showLanguageSelectInRespectiveLocale; - private String languagesGoogleHttpReferrer; - private String languagesGoogleApiKey; private String bpmServerIp; private int bpmServerPort; private int bpmResponseTimeout; @@ -184,10 +116,12 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private boolean demoToolsLanguage; private boolean demoToolsPrintService; private boolean projectWizardAbsoluteLocation; + private String welcomeScreen; + private boolean mavenActivated; /* ========================= internal utilities =========================== */ - public static final String PREFERENCES_PATH = "/.metadata/.plugins/org.eclipse.core.runtime/"+EclipsePreferences.DEFAULT_PREFERENCES_DIRNAME+"/"; + public static final String PREFERENCES_PATH = ".metadata/.plugins/org.eclipse.core.runtime/"+EclipsePreferences.DEFAULT_PREFERENCES_DIRNAME+"/"; public static final String PRODUCT_PREFERENCES = "org.eclipse.osbp.production"; public static final String PREFERENCES_FULL_PATH = PREFERENCES_PATH+PRODUCT_PREFERENCES+"."+EclipsePreferences.PREFS_FILE_EXTENSION; @@ -205,6 +139,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private Integer emailSmtpPort; private Boolean emailUseSslOnConnect; private String javaPosConfiguration; + private String datainterchangeConfiguration; public static final String BUSINESS_BUNDLE_CLASS_NAME = "BUSINESS_BUNDLE_CLASS_NAME_read_only"; @@ -230,6 +165,10 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private static final String UOMOUNIT_METRIC = "uomoUnitMetric"; + /* ========================= welcomescreen initializer =========================== */ + private static final String WELCOMESCREEN_NODE = "welcomeScreen"; + private static final String WELCOMESCREEN_HTML = "html"; + /* ========================= xref rates initializer =========================== */ private static final String EURO_X_REF_URL_NODE = "euroxrefurl"; @@ -240,6 +179,11 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private static final String JAVA_POS_NODE = "javaPOS"; private static final String JAVA_POS_CONFIGURATION = "javaPosConfiguration"; + + /* ========================= Datainterchange initializer =========================== */ + + private static final String DATAINTERCHANGE_NODE = "datainterchange"; + private static final String DATAINTERCHANGE_CONFIGURATION = "datainterchangeConfiguration"; /* ========================= authentication initializer =========================== */ @@ -247,11 +191,11 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private static final String AUTH_RESTFUL_PORT = "authRESTfulPort"; private static final String AUTHENTICATION_AUTOLOGIN = "autoLogin"; private static final String AUTHENTICATION_ORGANIZATION_ID = "organizationId"; - public static final String AUTHENTICATION_ENCRYPT_PASSWORDS = "encryptPasswords"; + public static final String AUTHENTICATION_ENCRYPT_PASSWORDS = "encryptPasswords"; //NOSONAR private static final String AUTHENTICATION_HIDE_REMEMBER_ME = "noRememberMe"; private static final String AUTHENTICATION_ADMIN_EMAIL_ACCOUNT = "adminEmail"; private static final String AUTHENTICATION_ADMIN_EMAIL_USERNAME = "adminEmailUsername"; - private static final String AUTHENTICATION_ADMIN_EMAIL_PASSWORD = "adminEmailPassword"; + private static final String AUTHENTICATION_ADMIN_EMAIL_PASSWORD = "adminEmailPassword"; //NOSONAR /* ========================= email initializer =========================== */ @@ -298,7 +242,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { public static final String DEFAULT_DERBYMEMORY_DATASOURCE = "derbymemory"; public static final String DEFAULT_DERBYSERVER_DATASOURCE = "derbyserver"; - private static final String DEFAULT_INITIAL_DATASOURCE = "oracle"; // DEFAULT_H2MEMORY_DATASOURCE; // "oracle"; + private static final String DEFAULT_INITIAL_DATASOURCE = "oracle"; public static final String DEFAULT_DATASOURCE_FOR_AUTHENTICATION = DEFAULT_INITIAL_DATASOURCE; public static final String DEFAULT_DATASOURCE_FOR_BLOB = DEFAULT_INITIAL_DATASOURCE; @@ -306,10 +250,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { public static final String DEFAULT_DATASOURCE_FOR_BUSINESSDATA = DEFAULT_INITIAL_DATASOURCE; private static final String DATASOURCE_NODE = "datasource"; -// public static final String DATASOURCE_FOR_AUTHENTICATION = "datasource.authentication"; -// public static final String DATASOURCE_FOR_BLOB = "datasource.blob"; -// public static final String DATASOURCE_FOR_BPM = "datasource.bpm"; -// public static final String DATASOURCE_FOR_BUSINESSDATA = "datasource.businessdata"; private static final String DATASOURCE_ENUM_ITEM = "enum.item"; private static final String DATASOURCE_DRIVER_VENDOR = "driver.vendor"; private static final String DATASOURCE_DRIVER_TYPE = "driver.type"; @@ -352,12 +292,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private static final String PERSISTENCE_PERSISTENCEXMLPATH = "persistenceXMLPath"; private static final String PERSISTENCE_WEAVING = "weaving"; - /* ========================= image bundle initializer =========================== */ - - private static final String IMAGES_NODE = "images"; - private static final String IMAGES_BUNDLE_ID = "bundle.id"; - private static final String IMAGES_RELATIVE_PATH = "relative.path"; - /* ========================= mock data generator initializer =========================== */ private static final String MOCK_DATA_GENERATORS_DONE = "mockDataGeneratorsDone"; @@ -371,7 +305,64 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private static final String DEMO_TOOLS_STRATEGY = "demoToolsStrategy"; private static final String DEMO_TOOLS_LANGUAGE = "demoToolsLanguage"; private static final String DEMO_TOOLS_PRINTSERVICE = "toolsPrintService"; + /* ========================= maven settings initializer =========================== */ + private static final String MAVEN_ACTIVATED = "mavenActivated"; + + public static enum DDL_GENERATION { + CREATE ("create-tables", "create"), + DROP_CREATE ("drop-and-create-tables", "create"), + UPDATE ("create-or-extend-tables", "update"), + NONE ("none", "validate"); + + private final String eclipseLink; + private final String hibernate; + + private DDL_GENERATION(String eclipseLink, String hibernate) { + this.eclipseLink = eclipseLink; + this.hibernate = hibernate; + } + + public String eclipseLink() { + return eclipseLink; + } + + public String hibernate() { + return hibernate; + } + + public static String hibernate(String eclipseLink) { + for (DDL_GENERATION step : values()) { + if (step.eclipseLink.equals(eclipseLink)) { + return step.hibernate; + } + } + return NONE.hibernate; + } + } + + public Set<EnumDatabaseVendor> getDataBaseVendors() { + TreeSet<EnumDatabaseVendor> result = new TreeSet<EnumDatabaseVendor>(); + for (String pu : getPersistenceUnitNames()) { + addDataBaseVendor(result, getPersistenceUnitJndiName(pu)); + } + return result; + } + public Set<EnumDatabaseVendor> getDataBaseVendors(String... jndiNames) { + TreeSet<EnumDatabaseVendor> result = new TreeSet<EnumDatabaseVendor>(); + for (String jndiName : jndiNames) { + addDataBaseVendor(result, jndiName); + } + return result; + } + + private void addDataBaseVendor(TreeSet<EnumDatabaseVendor> result, String jndiName) { + DataSourceConfiguration ds = getDataSource(jndiName); + if (ds != null) { + result.add(ds.getDatabaseVendor()); + } + } + public ProductConfigurationPrefs(String name, IScopeContext scopeContext, boolean watchRegister, IProject project) { defaultPrefs = new ProductConfigurationDefaultPrefs(); this.scopeContext = scopeContext; @@ -391,6 +382,10 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { LOGGER.trace(getInformation()+" # constructed"); } + public IScopeContext getScopeContext() { + return scopeContext; + } + public ProductConfigurationPrefs(String name, IScopeContext scopeContext, IProject project) { this(name, scopeContext, false, project); } @@ -450,7 +445,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { } public static IResource getPrefsFile(IProject project) { - IResource prefsFile = project.findMember(PREFERENCES_FULL_PATH); + IResource prefsFile = null; try { for (IResource resource : project.members()) { if ((resource instanceof IFile) && "product".equals(resource.getFileExtension())) { @@ -458,6 +453,10 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { String[] tokens = IOUtils.toString(((IFile)resource).getContents()).split("-DproductConfigurationFile="); if (tokens.length > 1) { String filePath = tokens[1].replace('\r', ' ').replace('\n', ' ').replace('\t', ' ').split(" ")[0].replace("DEFAULTFILE", PREFERENCES_FULL_PATH); + // The following line is required to perform a string substitution. + // In case of having a file path with placeholders this will replace them with the defined string in the eclipse string substitution preferences: + // Reference > Preferences > Run/Debug > String Substitution + filePath = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(filePath); File handle = new File(filePath); if (handle.exists()) { String fileName = handle.getAbsolutePath(); @@ -471,6 +470,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { } } catch (Exception e) { // NOSONAR + e.printStackTrace(); } // NOSONAR } } @@ -494,6 +494,11 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { /* ========================= getters =========================== */ + public String getWelcomeScreen() { + initialize(); + return welcomeScreen; + } + /** * @see http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html * @return URL to server with the daily Euro Foreign Exchange Reference @@ -668,7 +673,13 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { */ public String getPersistenceUnitJndiName(String persistenceUnitName) { initialize(); - return persistenceUnits.get(persistenceUnitName).getJndiName(); + PersistenceUnitConfiguration puConfig = persistenceUnits.get(persistenceUnitName); + if (puConfig!=null){ + return puConfig.getJndiName(); + } else { + LOGGER.error("No persistence unit named '" + persistenceUnitName + "' found. Check the defined persistence unit of your entity."); + return null; + } } public String getPersistenceUnitHibernateDialect(String persistenceUnitName) { @@ -794,7 +805,9 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { initialize(); try { LdapConfiguration configuration = (LdapConfiguration) getShiroRealmConfiguration(SHIRO_LDAP_REALM); - return configuration.getUrl(); + if(configuration != null) { + return configuration.getUrl(); + } } catch (Exception e) { // NOSONAR e.printStackTrace(); // NOSONAR @@ -806,7 +819,9 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { initialize(); try { LdapConfiguration configuration = (LdapConfiguration) getShiroRealmConfiguration(SHIRO_LDAP_REALM); - return configuration.getTemplate(); + if(configuration != null) { + return configuration.getTemplate(); + } } catch (Exception e) { // NOSONAR e.printStackTrace(); // NOSONAR @@ -933,16 +948,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { return showLanguageSelectInRespectiveLocale; } - public String getLanguagesGoogleHttpReferrer() { - initialize(); - return languagesGoogleHttpReferrer; - } - - public String getLanguagesGoogleApiKey() { - initialize(); - return languagesGoogleApiKey; - } - /** * @return show theme tool control if true */ @@ -985,6 +990,11 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { /* ========================= setters =========================== */ + public void setWelcomeScreen(String welcomeScreen) { + this.welcomeScreen = put(WELCOMESCREEN_NODE, WELCOMESCREEN_HTML, + welcomeScreen); + } + public void setEuroForeignExchangeReferenceRatesURLDaily( String euroForeignExchangeReferenceRatesURLDaily) { this.euroForeignExchangeReferenceRatesURLDaily = put(EURO_X_REF_URL_NODE, EURO_X_REF_URL_DAILY, @@ -1114,22 +1124,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { } } -// public void setDataSourceForAuthentication(String dataSource) { -// this.dataSourceForAuthentication = put((String)null, DATASOURCE_FOR_AUTHENTICATION, dataSource); -// } -// -// public void setDataSourceForBLOB(String dataSource) { -// this.dataSourceForBLOB = put((String)null, DATASOURCE_FOR_BLOB, dataSource); -// } -// -// public void setDataSourceForBPM(String dataSource) { -// this.dataSourceForBPM = put((String)null, DATASOURCE_FOR_BPM, dataSource); -// } -// -// public void setDataSourceForBusinessData(String dataSource) { -// this.dataSourceForBusinessData = put((String)null, DATASOURCE_FOR_BUSINESSDATA, dataSource); -// } - public void setDataSources(Map<String, DataSourceConfiguration> dataSources) { forceReloadConfiguration(); this.dataSources = dataSources; @@ -1197,8 +1191,16 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { index++; Preferences language = languagesNode.node(Integer.toString(index)); put(language, LANGUAGES_LANGUAGE, locale.getLanguage()); - put(language, LANGUAGES_COUNTRY, locale.getCountry()); - put(language, LANGUAGES_VARIANT, locale.getVariant()); + if(locale.getCountry().length() > 0) { + put(language, LANGUAGES_COUNTRY, locale.getCountry()); + } else { + put(language, LANGUAGES_COUNTRY, ""); + } + if(locale.getVariant().length() > 0) { + put(language, LANGUAGES_VARIANT, locale.getVariant()); + } else { + put(language, LANGUAGES_VARIANT, ""); + } } languagesNode.flush(); } @@ -1227,16 +1229,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { showLanguageSelectInRespectiveLocale); } - public void setLanguagesGoogleHttpReferrer( - String languagesGoogleHttpReferrer) { - this.languagesGoogleHttpReferrer = put((String)null, LANGUAGES_GOOGLE_HTTP_REFERRER, - languagesGoogleHttpReferrer); - } - - public void setLanguagesGoogleApiKey(String languagesGoogleApiKey) { - this.languagesGoogleApiKey = put((String)null, LANGUAGES_GOOGLE_API_KEY, languagesGoogleApiKey); - } - public String getBusinessBundleClassNameReadOnly() { initialize(); return businessBundleClassNameReadOnly; @@ -1500,7 +1492,7 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { * @return either null, if no entry is set, or the timestamp as String */ public String isMockDataGeneratorDone(Object generator) { - return getMockDataGeneratorsDoneNode().get(mockDataGeneratorToKey(generator), null); + return getMockDataGeneratorsDoneNode().get(mockDataGeneratorToKey(generator), ""); } public void setMockDataGeneratorDone(Object generator) { @@ -1577,7 +1569,12 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { exceptions.add(e); } try { - initializeJavPOS(); + initializeJavaPOS(); + } catch (Exception e) { + exceptions.add(e); + } + try { + initializeDatainterchange(); } catch (Exception e) { exceptions.add(e); } @@ -1602,10 +1599,20 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { exceptions.add(e); } try { + initializeMavenActivated(); + } catch (Exception e) { + exceptions.add(e); + } + try { initializeProjectWizard(); } catch (Exception e) { exceptions.add(e); } + try { + initializeWelcomeScreen(); + } catch (Exception e) { + exceptions.add(e); + } if (!exceptions.isEmpty()) { Exception e = new ConfigurationException(exceptions); LOGGER.error("exceptions caught while reading configuration", e); @@ -1617,6 +1624,11 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { } + private void initializeMavenActivated() { + Preferences root = getProductPreferences(); + mavenActivated = root.getBoolean(MAVEN_ACTIVATED, defaultPrefs.isMavenActivated()); + } + private void initializeLanguages() throws Exception { Preferences root = getProductPreferences(); int languagesSupported = root.getInt(LANGUAGES_SUPPORTED, 0); @@ -1628,8 +1640,6 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { languagesAutotranslate = root.getBoolean(LANGUAGES_AUTOTRANSLATE, defaultPrefs.isLanguagesAutotranslate()); languagesAutocreate = root.getBoolean(LANGUAGES_AUTOCREATE, defaultPrefs.willLanguagesAutocreate()); showLanguageSelectInRespectiveLocale = root.getBoolean(LANGUAGES_SHOW_SELECT_IN_RESPECTIVE_LOCALE, defaultPrefs.showLanguageSelectInRespectiveLocale()); - languagesGoogleHttpReferrer = root.get(LANGUAGES_GOOGLE_HTTP_REFERRER, defaultPrefs.getLanguagesGoogleHttpReferrer()); - languagesGoogleApiKey = root.get(LANGUAGES_GOOGLE_API_KEY, defaultPrefs.getLanguagesGoogleApiKey()); languagesSupported = root.getInt(LANGUAGES_SUPPORTED, 0); for (int i = 0; i < languagesSupported; i++) { Preferences language = languagesNode.node(Integer.toString(i + 1)); @@ -1662,6 +1672,12 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { uomoMetricUnit = uomounitsNode.getBoolean(UOMOUNIT_METRIC, defaultPrefs.isUomoMetricUnit()); } + private void initializeWelcomeScreen() throws Exception { + Preferences welcomeNode = getProductPreferencesNode(WELCOMESCREEN_NODE); + // --- read all preferences --- + welcomeScreen = welcomeNode.get(WELCOMESCREEN_HTML, defaultPrefs.getWelcomeScreen()); + } + private void initializeEuroXRefRates() throws Exception { Preferences euroXRefURL = getProductPreferencesNode(EURO_X_REF_URL_NODE); // --- read all preferences --- @@ -1669,12 +1685,18 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { euroForeignExchangeReferenceRatesURLPrevious = euroXRefURL.get(EURO_X_REF_URL_PREVIOUS, defaultPrefs.getEuroXRefRatesURLPrevious()); } - private void initializeJavPOS() throws Exception { + private void initializeJavaPOS() throws Exception { Preferences javaPos = getProductPreferencesNode(JAVA_POS_NODE); // --- read all preferences --- javaPosConfiguration = javaPos.get(JAVA_POS_CONFIGURATION, defaultPrefs.getJavaPosConfiguration()); } + private void initializeDatainterchange() throws Exception { + Preferences datainterchange = getProductPreferencesNode(DATAINTERCHANGE_NODE); + // --- read all preferences --- + datainterchangeConfiguration = datainterchange.get(DATAINTERCHANGE_CONFIGURATION, defaultPrefs.getDatainterchangeConfiguration()); + } + private void initializeReadOnly() throws Exception { Preferences readOnly = getProductPreferences(); businessBundleClassNameReadOnly = readOnly.get(BUSINESS_BUNDLE_CLASS_NAME, ""); @@ -1784,41 +1806,28 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { private void initializeDataSources() throws Exception { Preferences root = getProductPreferences(); Preferences dataSourcesPrefs = getProductPreferencesNode(DATASOURCE_NODE); + /* === datasource using a Oracle database === */ - initializeIfNotExists (root, dataSourcesPrefs, "oracle", "oracle", //DATASOURCE_FOR_BUSINESSDATA, - EnumDatabaseVendor.ORACLE, "<ip-or-host>", 1521, "<database>", "<username>", "<password>"); // NOSONAR + initializeIfNotExists (root, dataSourcesPrefs, ProductConfigurationDefaultPrefs.ORACLE, ProductConfigurationDefaultPrefs.ORACLE, + EnumDatabaseVendor.ORACLE, ProductConfigurationDefaultPrefs.IP_OR_HOST, 1521, ProductConfigurationDefaultPrefs.DATABASE_HINT, ProductConfigurationDefaultPrefs.USERNAME_HINT, ProductConfigurationDefaultPrefs.PASSWORD_HINT); /* === datasource using a MySQL database === */ - initializeIfNotExists (root, dataSourcesPrefs, "mysql", null, - EnumDatabaseVendor.MYSQL, "<ip-or-host>", 3306, "<database>", "<username>", ""); + initializeIfNotExists (root, dataSourcesPrefs, ProductConfigurationDefaultPrefs.MYSQL, null, + EnumDatabaseVendor.MYSQL, "<ip-or-host>", 3306, ProductConfigurationDefaultPrefs.DATABASE_HINT, ProductConfigurationDefaultPrefs.USERNAME_HINT, ""); /* === datasource using a H2 in-Memory database === */ initializeIfNotExists (root, dataSourcesPrefs, DEFAULT_H2MEMORY_DATASOURCE, null, - EnumDatabaseVendor.H2_IN_MEMORY, null, -1, "H2MEMORY", "H2MEMORY", "H2MEMORY"); // NOSONAR + EnumDatabaseVendor.H2_IN_MEMORY, null, -1, ProductConfigurationDefaultPrefs.H2MEMORY, ProductConfigurationDefaultPrefs.H2MEMORY, ProductConfigurationDefaultPrefs.H2MEMORY); // NOSONAR /* === datasource using a H2 local-file database === */ initializeIfNotExists (root, dataSourcesPrefs, DEFAULT_H2LOCALFILE_DATASOURCE, null, - EnumDatabaseVendor.H2_LOCAL_FILE, null, -1, "H2LOCALFILE", "H2LOCALFILE", "H2LOCALFILE"); + EnumDatabaseVendor.H2_LOCAL_FILE, null, -1, ProductConfigurationDefaultPrefs.H2LOCALFILE, ProductConfigurationDefaultPrefs.H2LOCALFILE, ProductConfigurationDefaultPrefs.H2LOCALFILE); /* === datasource using a Derby in-Memory database === */ initializeIfNotExists (root, dataSourcesPrefs, DEFAULT_DERBYMEMORY_DATASOURCE, null, - EnumDatabaseVendor.DERBY_IN_MEMORY, null, -1, "DERBYMEMORY", "DERBYMEMORY", "DERBYMEMORY"); + EnumDatabaseVendor.DERBY_IN_MEMORY, null, -1, ProductConfigurationDefaultPrefs.DERBYMEMORY, ProductConfigurationDefaultPrefs.DERBYMEMORY, ProductConfigurationDefaultPrefs.DERBYMEMORY); /* === datasource using a Derby local-file database === */ initializeIfNotExists (root, dataSourcesPrefs, DEFAULT_DERBYLOCALFILE_DATASOURCE, null, - EnumDatabaseVendor.DERBY_LOCAL_FILE, null, -1, "DERBYLOCALFILE", "DERBYLOCALFILE", "DERBYLOCALFILE"); + EnumDatabaseVendor.DERBY_LOCAL_FILE, null, -1, ProductConfigurationDefaultPrefs.DERBYLOCALFILE, ProductConfigurationDefaultPrefs.DERBYLOCALFILE, ProductConfigurationDefaultPrefs.DERBYLOCALFILE); /* === datasource using a Derby database === */ initializeIfNotExists (root, dataSourcesPrefs, DEFAULT_DERBYSERVER_DATASOURCE, null, - EnumDatabaseVendor.DERBY_CLIENT, "<ip-or-host>", 1527, "<database>", "<username>", "<password>"); - /* - // http://www.hsqldb.org/doc/1.8/guide/guide.html#N106CC - initializeIfNotExists (root, dataSourcesPrefs, "hsqldbmemory", null, - EnumDatabaseVendor.HSQLDB_IN_MEMORY, null, -1, "PUBLIC", "SA", ""); - initializeIfNotExists (root, dataSourcesPrefs, "hsqldblocalfile", null, - EnumDatabaseVendor.HSQLDB_LOCAL_FILE, null, -1, "PUBLIC", "SA", ""); - */ - // TODO ... QUICK FIX --- - - // --- read all preferences --- -// dataSourceForAuthentication = root.get(DATASOURCE_FOR_AUTHENTICATION, defaultPrefs.getDataSourceNameForAuthentication()); -// dataSourceForBLOB = root.get(DATASOURCE_FOR_BLOB, defaultPrefs.getDataSourceNameForBLOB()); -// dataSourceForBPM = root.get(DATASOURCE_FOR_BPM, defaultPrefs.getDataSourceNameForBPM()); -// dataSourceForBusinessData = root.get(DATASOURCE_FOR_BUSINESSDATA, defaultPrefs.getDataSourceNameForBusinessData()); + EnumDatabaseVendor.DERBY_CLIENT, ProductConfigurationDefaultPrefs.IP_OR_HOST, 1527, ProductConfigurationDefaultPrefs.DATABASE_HINT, ProductConfigurationDefaultPrefs.USERNAME_HINT, ProductConfigurationDefaultPrefs.PASSWORD_HINT); for (String dataSourceName : dataSourcesPrefs.childrenNames()) { Preferences dataSource = dataSourcesPrefs.node(dataSourceName); String vendorName = dataSource.get(DATASOURCE_ENUM_ITEM, ""); @@ -2056,4 +2065,19 @@ public class ProductConfigurationPrefs implements IProductConfigurationPrefs { public String getJavaPosConfiguration() { return javaPosConfiguration; } + + public void setDatainterchangeConfiguration(String value) { + this.datainterchangeConfiguration = put(DATAINTERCHANGE_NODE, DATAINTERCHANGE_CONFIGURATION, value); + } + + @Override + public String getDatainterchangeConfiguration() { + return datainterchangeConfiguration; + } + + @Override + public boolean isMavenActivated() { + initialize(); + return mavenActivated; + } } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileBase.java b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileBase.java index ed569f1..d660917 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileBase.java +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileBase.java @@ -78,14 +78,14 @@ public abstract class ProductFileBase extends AbstractConfigurationFileBase { } /** set of necessary data base vendors defined by the product preferences */ - protected final Set<EnumDatabaseVendor> necessaryDataBaseVendors; + protected final Set<EnumDatabaseVendor> dataBaseVendors; public ProductFileBase(ProductConfigurationPrefs prefs) { - necessaryDataBaseVendors = prefs.getNecessaryDataBaseVendors(); + dataBaseVendors = prefs.getDataBaseVendors(); } public ProductFileBase(ProductConfigurationPrefs prefs, String... jndiNames) { - necessaryDataBaseVendors = prefs.getNecessaryDataBaseVendors(jndiNames); + dataBaseVendors = prefs.getDataBaseVendors(jndiNames); } @Override diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileConfigurations.xtend b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileConfigurations.xtend index 636b0ef..a1d59a6 100644 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileConfigurations.xtend +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileConfigurations.xtend @@ -39,20 +39,19 @@ ${{UNNECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}} override getRequiredAsString() { prepareSerialized( ''' -${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}} + ${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}} <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.e4.ui.services" autoStart="false" startLevel="1" /> <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" /> <plugin id="org.eclipse.equinox.coordinator" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="1" /> <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="0" /> + <plugin id="org.eclipse.gemini.naming" autoStart="true" startLevel="3" /> <plugin id="org.eclipse.osbp.dsl.dto.lib" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.osbp.dsl.metadata.service" autoStart="true" startLevel="3" /> <plugin id="org.eclipse.osbp.ecview.extension.strategy" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.osbp.ecview.jetty.manager" autoStart="true" startLevel="0" /> - <plugin id="org.eclipse.osbp.fork.gemini.naming" autoStart="true" startLevel="3" /> <plugin id="org.eclipse.osbp.osgi.hybrid.api" autoStart="true" startLevel="0" /> - <plugin id="org.eclipse.osbp.persistence" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.osbp.runtime.ecore.bundlespace" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.osbp.runtime.event" autoStart="true" startLevel="0" /> <plugin id="org.eclipse.osbp.runtime.jsr303.validation" autoStart="true" startLevel="4" /> @@ -73,11 +72,7 @@ ${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}} removeDuplicates(asString .replace( "${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}", - EnumDatabaseVendor.getNecessaryConfigurations(necessaryDataBaseVendors) - ) - .replace( - "${{UNNECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}", - EnumDatabaseVendor.getUnnecessaryConfigurations(necessaryDataBaseVendors) + EnumDatabaseVendor.getNecessaryConfigurations(dataBaseVendors) ) ) } diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileFeatures.xtend b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileFeatures.xtend new file mode 100644 index 0000000..e1b8ef8 --- /dev/null +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFileFeatures.xtend @@ -0,0 +1,82 @@ +/** + * + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + */ +package org.eclipse.osbp.preferences + +import org.eclipse.core.runtime.IBundleGroupProvider +import org.eclipse.core.runtime.Platform + +/** + * <plugins> dependencies for the OSBP product bundle <code>*.product</code> file. + */ +public class ProductFileFeatures extends ProductFileBase { + + new(ProductConfigurationPrefs prefs) { + super(prefs) + } + + new(ProductConfigurationPrefs prefs, String... jndiNames) { + super(prefs, jndiNames) + } + + override getDeprecatedAsString() { + } + + /** + * Creates the list of used plugins for the .product file in the product targetbundle. + */ + override getRequiredAsString() { + prepareSerialized( + ''' + ${{DATA_BASE_VENDOR_FEATURES}} + «runtimeSoftwareFeature» + ''') + } + + override getRecommendedAsString() { + } + + override prepareSerialized(String asString) { + removeDuplicates(asString + .replace( + "${{DATA_BASE_VENDOR_FEATURES}}", + EnumDatabaseVendor.getDatabaseFeatures(dataBaseVendors) + ) + ) + } + + + def private String getRuntimeSoftwareFeature(){ + var netOsbee = false + var orgOsbee = false + for (IBundleGroupProvider provider : Platform.getBundleGroupProviders()) { + for (feature : provider.getBundleGroups()) { + var featureId = feature.getIdentifier() + if (featureId !== null) { + if (featureId.startsWith("net.osbee")) { + netOsbee = true + } else if (featureId.startsWith("org.osbee")) { + orgOsbee = true + } + } + } + } + if (netOsbee){ + return "\t<feature id=\"net.osbee.softwarefactory.runtime.feature\"/>" + } else if (orgOsbee){ + return "\t<feature id=\"org.osbee.softwarefactory.runtime.feature\"/>" + } + return "\t<feature id=\"org.eclipse.osbp.softwarefactory.runtime.feature\"/>"; + } +} + + diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFilePlugins.xtend b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFilePlugins.xtend deleted file mode 100644 index 033151a..0000000 --- a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/ProductFilePlugins.xtend +++ /dev/null @@ -1,538 +0,0 @@ -/** - * - * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation - */ -package org.eclipse.osbp.preferences - -/** - * <plugins> dependencies for the OSBP product bundle <code>*.product</code> file. - */ -public class ProductFilePlugins extends ProductFileBase { - - new(ProductConfigurationPrefs prefs) { - super(prefs) - } - - new(ProductConfigurationPrefs prefs, String... jndiNames) { - super(prefs, jndiNames) - } - - override getDeprecatedAsString() { - prepareSerialized( - ''' -${{UNNECESSARY_DATA_BASE_VENDOR_PLUGINS}} - <plugin id="com.google.protobuf"/> - <plugin id="com.springsource.javax.jms"/> - <plugin id="org.eclipse.osbp.dsl.semantic.common"/> - <plugin id="org.eclipse.osbp.dsl.semantic.common.edit"/> - <plugin id="org.eclipse.osbp.dsl.semantic.dto"/> - <plugin id="org.eclipse.osbp.dsl.semantic.entity"/> - <plugin id="org.eclipse.osbp.dsl.semantic.entity.edit"/> - <plugin id="org.eclipse.osbp.dsl.semantic.service"/> - <plugin id="org.eclipse.osbp.ecview.vaadin.servlet.mobile"/> - <plugin id="org.eclipse.osbp.mobile.vaadin.touchkit.osgi"/> - <plugin id="org.eclipse.osbp.utils.mobile.ui"/> - <plugin id="org.eclipse.osbp.vaaclipse.vaadin.addon.contextmenu"/> - <plugin id="org.eclipse.osbp.vaaclipse.vaadin.addon.dndlayout"/> - ''') - } - - override getRequiredAsString() { - prepareSerialized( - ''' - <plugin id="OpenCSV"/> - <plugin id="activemq-all-osgi-5.9.0"/> - <plugin id="animator.osgi"/> - <plugin id="ca.ecliptical.pde.ds.lib"/> - <plugin id="ch.qos.logback.classic"/> - <plugin id="ch.qos.logback.core"/> - <plugin id="ch.qos.logback.slf4j" fragment="true"/> - <plugin id="com.google.api.translate.osgi"/> - <plugin id="com.google.guava"/> - <plugin id="com.google.gwt.thirdparty.guava"/> - <plugin id="com.google.gwt.thirdparty.streamhtmlparser"/> - <plugin id="com.google.inject"/> - <plugin id="com.google.inject.assistedinject" fragment="true"/> - <plugin id="com.ibm.icu"/> - <plugin id="com.jcraft.jsch"/> - <plugin id="com.lowagie.text"/> - <plugin id="javax.jms"/> - <plugin id="com.springsource.org.antlr.runtime"/> - <plugin id="com.springsource.org.codehaus.commons.compiler"/> - <plugin id="com.springsource.org.codehaus.janino"/> - <plugin id="com.sun.mail.javax.mail"/> - <plugin id="com.vaadin.client"/> - <plugin id="com.vaadin.client-compiled"/> - <plugin id="com.vaadin.external.atmosphere.runtime"/> - <plugin id="com.vaadin.external.org.slf4j"/> - <plugin id="com.vaadin.push"/> - <plugin id="com.vaadin.sass-compiler"/> - <plugin id="com.vaadin.server"/> - <plugin id="com.vaadin.shared"/> - <plugin id="com.vaadin.theme-compiler"/> - <plugin id="com.vaadin.themes"/> - <plugin id="commons-vfs-osgi"/> - <plugin id="contextmenu.osgi"/> - <plugin id="dCharts.osgi"/> - <plugin id="dragdroplayouts.osgi"/> - <plugin id="dom.osgi"/> - <plugin id="dragdroplayouts.osgi"/> - <plugin id="easyuploads.osgi"/> - <plugin id="filteringtable.osgi"/> - <plugin id="groovy-all"/> - <plugin id="iban4j"/> - <plugin id="jackrabbit-jcr-commons-osgi"/> - <plugin id="jackrabbit-webdav-osgi"/> - <plugin id="jackson-core-asl"/> - <plugin id="java-cup.osgi"/> - <plugin id="javax.annotation"/> - <plugin id="javax.el"/> - <plugin id="javax.inject"/> - <plugin id="javax.jcr"/> - <plugin id="javax.persistence"/> - <plugin id="javax.servlet"/> - <plugin id="javax.transaction" fragment="true"/> - <plugin id="javax.validation.api"/> - <plugin id="javax.ws.rs.jsr311-api"/> - <plugin id="javax.wsdl"/> - <plugin id="javax.xml"/> - <plugin id="javax.xml.stream"/> - <plugin id="jaxen"/> - <plugin id="joda-time"/> - <plugin id="mondrian.osgi"/> - <plugin id="multifileupload.osgi"/> - <plugin id="net.osbee.vaaclipse.designer"/> - <plugin id="net.osbee.vaadin.designer"/> - <plugin id="olap4j-xmla.osgi"/> - <plugin id="olap4j.osgi"/> - <plugin id="org.antlr.runtime"/> - <plugin id="org.apache.ant"/> - <plugin id="org.apache.batik.bridge"/> - <plugin id="org.apache.batik.css"/> - <plugin id="org.apache.batik.dom"/> - <plugin id="org.apache.batik.dom.svg"/> - <plugin id="org.apache.batik.ext.awt"/> - <plugin id="org.apache.batik.parser"/> - <plugin id="org.apache.batik.svggen"/> - <plugin id="org.apache.batik.transcoder"/> - <plugin id="org.apache.batik.util"/> - <plugin id="org.apache.batik.util.gui"/> - <plugin id="org.apache.batik.xml"/> - <plugin id="org.apache.bval.org.apache.bval.bundle"/> - <plugin id="org.apache.commons.beanutils"/> - <plugin id="org.apache.commons.cli"/> - <plugin id="org.apache.commons.codec"/> - <plugin id="org.apache.commons.collections"/> - <plugin id="org.apache.commons.compress"/> - <plugin id="org.apache.commons.dbcp"/> - <plugin id="org.apache.commons.digester"/> - <plugin id="org.apache.commons.discovery"/> - <plugin id="org.apache.commons.email"/> - <plugin id="org.apache.commons.exec"/> - <plugin id="org.apache.commons.httpclient"/> - <plugin id="org.apache.commons.io"/> - <plugin id="org.apache.commons.jexl"/> - <plugin id="org.apache.commons.lang"/> - <plugin id="org.apache.commons.lang3"/> - <plugin id="org.apache.commons.logging"/> - <plugin id="org.apache.commons.math"/> - <plugin id="org.apache.commons.math3"/> - <plugin id="org.apache.commons.net"/> - <plugin id="org.apache.commons.pool"/> - <plugin id="org.apache.commons.vfs"/> - <plugin id="org.apache.commons.validator"/> - <plugin id="org.apache.cxf.cxf-core"/> - <plugin id="org.apache.cxf.cxf-rt-bindings-soap"/> - <plugin id="org.apache.cxf.cxf-rt-bindings-xml"/> - <plugin id="org.apache.cxf.cxf-rt-databinding-jaxb"/> - <plugin id="org.apache.cxf.cxf-rt-frontend-jaxws"/> - <plugin id="org.apache.cxf.cxf-rt-frontend-simple"/> - <plugin id="org.apache.cxf.cxf-rt-transports-http"/> - <plugin id="org.apache.cxf.cxf-rt-wsdl"/> - <plugin id="org.apache.felix.gogo.command"/> - <plugin id="org.apache.felix.gogo.runtime"/> - <plugin id="org.apache.felix.gogo.shell"/> - <plugin id="org.apache.httpcomponents.httpclient"/> - <plugin id="org.apache.httpcomponents.httpcore"/> - <plugin id="org.apache.log4j"/> - <plugin id="org.apache.pdfbox.fontbox"/> - <plugin id="org.apache.pdfbox"/> - <plugin id="org.apache.servicemix.bundles.jexcelapi"/> - <plugin id="org.apache.servicemix.bundles.wsdl4j"/> - <plugin id="org.apache.servicemix.bundles.xpp3"/> - <plugin id="org.apache.ws.xmlschema.core"/> - <plugin id="org.apache.xerces"/> - <plugin id="org.apache.xml.resolver"/> - <plugin id="org.apache.xml.serializer"/> - <plugin id="org.drools.api"/> - <plugin id="org.eclipse.birt.core"/> - <plugin id="org.eclipse.birt.data"/> - <plugin id="org.eclipse.birt.data.aggregation"/> - <plugin id="org.eclipse.birt.report.data.adapter"/> - <plugin id="org.eclipse.birt.report.engine"/> - <plugin id="org.eclipse.birt.report.engine.emitter.html"/> - <plugin id="org.eclipse.birt.report.engine.emitter.pdf"/> - <plugin id="org.eclipse.birt.report.engine.fonts"/> - <plugin id="org.eclipse.birt.report.engine.script.javascript"/> - <plugin id="org.eclipse.birt.report.model"/> - <plugin id="org.eclipse.bpmn2"/> - <plugin id="org.eclipse.bpmn2.edit"/> - <plugin id="org.eclipse.compare.core"/> - <plugin id="org.eclipse.core.commands"/> - <plugin id="org.eclipse.core.contenttype"/> - <plugin id="org.eclipse.core.databinding"/> - <plugin id="org.eclipse.core.databinding.beans"/> - <plugin id="org.eclipse.core.databinding.observable"/> - <plugin id="org.eclipse.core.databinding.property"/> - <plugin id="org.eclipse.core.expressions"/> - <plugin id="org.eclipse.core.filebuffers"/> - <plugin id="org.eclipse.core.filesystem"/> - <plugin id="org.eclipse.core.jobs"/> - <plugin id="org.eclipse.core.resources"/> - <plugin id="org.eclipse.core.runtime"/> - <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/> - <plugin id="org.eclipse.core.variables"/> - <plugin id="org.eclipse.datatools.connectivity"/> - <plugin id="org.eclipse.datatools.connectivity.oda"/> - <plugin id="org.eclipse.datatools.connectivity.oda.consumer"/> - <plugin id="org.eclipse.datatools.connectivity.oda.design"/> - <plugin id="org.eclipse.datatools.connectivity.oda.profile"/> - <plugin id="org.eclipse.debug.core"/> - <plugin id="org.eclipse.e4.core.commands"/> - <plugin id="org.eclipse.e4.core.contexts"/> - <plugin id="org.eclipse.e4.core.di"/> - <plugin id="org.eclipse.e4.core.di.extensions"/> - <plugin id="org.eclipse.e4.core.services" version="1.2.1.v20140808-1251"/> - <plugin id="org.eclipse.e4.ui.di"/> - <plugin id="org.eclipse.e4.ui.model.workbench"/> - <plugin id="org.eclipse.e4.ui.model.workbench.edit"/> - <plugin id="org.eclipse.e4.ui.services"/> - <plugin id="org.eclipse.e4.ui.workbench"/> - <plugin id="org.eclipse.emf.codegen"/> - <plugin id="org.eclipse.emf.codegen.ecore"/> - <plugin id="org.eclipse.emf.codegen.ecore.xtext"/> - <plugin id="org.eclipse.emf.common"/> - <plugin id="org.eclipse.emf.databinding"/> - <plugin id="org.eclipse.emf.databinding.edit"/> - <plugin id="org.eclipse.emf.ecore"/> - <plugin id="org.eclipse.emf.ecore.change"/> - <plugin id="org.eclipse.emf.ecore.change.edit"/> - <plugin id="org.eclipse.emf.ecore.edit"/> - <plugin id="org.eclipse.emf.ecore.xcore"/> - <plugin id="org.eclipse.emf.ecore.xcore.lib"/> - <plugin id="org.eclipse.emf.ecore.xmi"/> - <plugin id="org.eclipse.emf.edit"/> - <plugin id="org.eclipse.emf.mwe.core"/> - <plugin id="org.eclipse.emf.mwe.utils"/> - <plugin id="org.eclipse.emf.mwe2.runtime"/> - <plugin id="org.eclipse.equinox.app"/> - <plugin id="org.eclipse.equinox.bidi"/> - <plugin id="org.eclipse.equinox.common"/> - <plugin id="org.eclipse.equinox.console"/> - <plugin id="org.eclipse.equinox.coordinator"/> - <plugin id="org.eclipse.equinox.ds"/> - <plugin id="org.eclipse.equinox.event"/> - <plugin id="org.eclipse.equinox.http.registry"/> - <plugin id="org.eclipse.equinox.http.servlet"/> - <plugin id="org.eclipse.equinox.preferences"/> - <plugin id="org.eclipse.equinox.registry"/> - <plugin id="org.eclipse.equinox.security"/> - <plugin id="org.eclipse.equinox.util"/> - <plugin id="org.eclipse.gemini.dbaccess.util"/> - <plugin id="org.eclipse.help"/> - <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/> - <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/> - <plugin id="org.eclipse.jdt.core"/> - <plugin id="org.eclipse.jdt.debug"/> - <plugin id="org.eclipse.jdt.launching"/> - <plugin id="org.eclipse.jetty.continuation"/> - <plugin id="org.eclipse.jetty.http"/> - <plugin id="org.eclipse.jetty.io"/> - <plugin id="org.eclipse.jetty.security"/> - <plugin id="org.eclipse.jetty.server"/> - <plugin id="org.eclipse.jetty.servlet"/> - <plugin id="org.eclipse.jetty.util"/> - <plugin id="org.eclipse.jetty.websocket"/> - <plugin id="org.eclipse.osbp.authentication"/> - <plugin id="org.eclipse.osbp.authentication.ui"/> - <plugin id="org.eclipse.osbp.bpm.api"/> - <plugin id="org.eclipse.osbp.bpmn2.ecore"/> - <plugin id="org.eclipse.osbp.commons"/> - <plugin id="org.eclipse.osbp.dsl.common.xtext"/> - <plugin id="org.eclipse.osbp.dsl.datatype.lib"/> - <plugin id="org.eclipse.osbp.dsl.datatype.xtext"/> - <plugin id="org.eclipse.osbp.dsl.dto.lib"/> - <plugin id="org.eclipse.osbp.dsl.dto.xtext"/> - <plugin id="org.eclipse.osbp.dsl.entity.xtext"/> - <plugin id="org.eclipse.osbp.dsl.metadata.service"/> - <plugin id="org.eclipse.osbp.dsl.mwe"/> - <plugin id="org.eclipse.osbp.dsl.xtext.builder.participant"/> - <plugin id="org.eclipse.osbp.dsl.xtext.lazyresolver"/> - <plugin id="org.eclipse.osbp.dsl.xtext.lazyresolver.api"/> - <plugin id="org.eclipse.osbp.e4extension"/> - <plugin id="org.eclipse.osbp.e4modelextension"/> - <plugin id="org.eclipse.osbp.ecview.core.common"/> - <plugin id="org.eclipse.osbp.ecview.core.common.editparts.emf"/> - <plugin id="org.eclipse.osbp.ecview.core.common.model"/> - <plugin id="org.eclipse.osbp.ecview.core.common.model.edit"/> - <plugin id="org.eclipse.osbp.ecview.core.databinding.beans"/> - <plugin id="org.eclipse.osbp.ecview.core.databinding.emf"/> - <plugin id="org.eclipse.osbp.ecview.core.emf.api"/> - <plugin id="org.eclipse.osbp.ecview.core.extension.editparts"/> - <plugin id="org.eclipse.osbp.ecview.core.extension.editparts.emf"/> - <plugin id="org.eclipse.osbp.ecview.core.extension.model"/> - <plugin id="org.eclipse.osbp.ecview.core.extension.model.edit"/> - <plugin id="org.eclipse.osbp.ecview.core.ui.presentation.common"/> - <plugin id="org.eclipse.osbp.ecview.core.util.emf"/> - <plugin id="org.eclipse.osbp.ecview.dsl"/> - <plugin id="org.eclipse.osbp.ecview.dsl.lib"/> - <plugin id="org.eclipse.osbp.ecview.extension.api"/> - <plugin id="org.eclipse.osbp.ecview.extension.editparts"/> - <plugin id="org.eclipse.osbp.ecview.extension.editparts.emf"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.editparts"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.editparts.emf"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.model"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.model.edit"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.presentation"/> - <plugin id="org.eclipse.osbp.ecview.extension.grid.presentation.clientside"/> - <plugin id="org.eclipse.osbp.ecview.extension.model"/> - <plugin id="org.eclipse.osbp.ecview.extension.model.edit"/> - <plugin id="org.eclipse.osbp.ecview.extension.presentation.vaadin"/> - <plugin id="org.eclipse.osbp.ecview.extension.services"/> - <plugin id="org.eclipse.osbp.ecview.extension.strategy"/> - <plugin id="org.eclipse.osbp.ecview.extension.widgetset"/> - <plugin id="org.eclipse.osbp.ecview.jetty.manager"/> - <plugin id="org.eclipse.osbp.ecview.uisemantics"/> - <plugin id="org.eclipse.osbp.ecview.xtext.builder.participant"/> - <plugin id="org.eclipse.osbp.ecview.xtext.builder.participant.i18n"/> - <plugin id="org.eclipse.osbp.eventbroker"/> - <plugin id="org.eclipse.osbp.filter"/> - <plugin id="org.eclipse.osbp.fork.gemini.naming"/> - <plugin id="org.eclipse.osbp.fork.vaadin.addon.maskedtextfield"/> - <plugin id="org.eclipse.osbp.gitinfo"/> - <plugin id="org.eclipse.osbp.i18n.common"/> - <plugin id="org.eclipse.osbp.infogrid.api"/> - <plugin id="org.eclipse.osbp.infogrid.ecview"/> - <plugin id="org.eclipse.osbp.infogrid.model"/> - <plugin id="org.eclipse.osbp.infogrid.services"/> - <plugin id="org.eclipse.osbp.infogrid.vaaclipse"/> - <plugin id="org.eclipse.osbp.infogrid.vaadin"/> - <plugin id="org.eclipse.osbp.mobile.vaadin.ecview.api"/> - <plugin id="org.eclipse.osbp.mobile.vaadin.ecview.editparts"/> - <plugin id="org.eclipse.osbp.mobile.vaadin.ecview.editparts.emf"/> - <plugin id="org.eclipse.osbp.mobile.vaadin.ecview.model"/> - <plugin id="org.eclipse.osbp.mondrian"/> - <plugin id="org.eclipse.osbp.mondrian.api"/> - <plugin id="org.eclipse.osbp.osgi.hybrid.api"/> - <plugin id="org.eclipse.osbp.osgi.hybrid.api.runtime"/> - <plugin id="org.eclipse.osbp.persistence"/> - <plugin id="org.eclipse.osbp.preferences"/> - <plugin id="org.eclipse.osbp.runtime.common"/> - <plugin id="org.eclipse.osbp.runtime.designer.api"/> - <plugin id="org.eclipse.osbp.runtime.ecore.bundlespace"/> - <plugin id="org.eclipse.osbp.runtime.event"/> - <plugin id="org.eclipse.osbp.runtime.jsr303.validation"/> - <plugin id="org.eclipse.osbp.runtime.systemextension" fragment="true"/> - <plugin id="org.eclipse.osbp.runtime.typeprovider.bundlespace"/> - <plugin id="org.eclipse.osbp.runtime.web.atmosphere.fragment" fragment="true"/> - <plugin id="org.eclipse.osbp.runtime.web.common"/> - <plugin id="org.eclipse.osbp.runtime.web.ecview.presentation.vaadin"/> - <plugin id="org.eclipse.osbp.runtime.web.vaadin.common"/> - <plugin id="org.eclipse.osbp.runtime.web.vaadin.components"/> - <plugin id="org.eclipse.osbp.runtime.web.vaadin.components.widget"/> - <plugin id="org.eclipse.osbp.runtime.web.vaadin.databinding"/> - <plugin id="org.eclipse.osbp.runtime.web.vaadin.widgetset"/> - <plugin id="org.eclipse.osbp.themes"/> - <plugin id="org.eclipse.osbp.ui.api"/> - <plugin id="org.eclipse.osbp.ui.common"/> - <plugin id="org.eclipse.osbp.user"/> - <plugin id="org.eclipse.osbp.utils"/> - <plugin id="org.eclipse.osbp.utils.blob"/> - <plugin id="org.eclipse.osbp.utils.bpmn"/> - <plugin id="org.eclipse.osbp.utils.entitymock.dbfill.ui"/> - <plugin id="org.eclipse.osbp.utils.functionnormalizer"/> - <plugin id="org.eclipse.osbp.utils.img"/> - <plugin id="org.eclipse.osbp.utils.js"/> - <plugin id="org.eclipse.osbp.utils.themes.ui"/> - <plugin id="org.eclipse.osbp.utils.ui"/> - <plugin id="org.eclipse.osbp.vaaclipse.additions"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.app"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.application"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.common"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.common.api"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.ecview"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.ecview.lib"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.keybinding"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.perspective"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.problems"/> - <plugin id="org.eclipse.osbp.vaaclipse.addons.softwarefactory"/> - <plugin id="org.eclipse.osbp.vaaclipse.api"/> - <plugin id="org.eclipse.osbp.vaaclipse.behaviour"/> - <plugin id="org.eclipse.osbp.vaaclipse.behaviour.source"/> - <plugin id="org.eclipse.osbp.vaaclipse.common.ecview"/> - <plugin id="org.eclipse.osbp.vaaclipse.common.ecview.api"/> - <plugin id="org.eclipse.osbp.vaaclipse.contributions"/> - <plugin id="org.eclipse.osbp.vaaclipse.emf"/> - <plugin id="org.eclipse.osbp.vaaclipse.emf.addon"/> - <plugin id="org.eclipse.osbp.vaaclipse.emf.api"/> - <plugin id="org.eclipse.osbp.vaaclipse.presentation"/> - <plugin id="org.eclipse.osbp.vaaclipse.publicapi"/> - <plugin id="org.eclipse.osbp.vaaclipse.resources" fragment="true"/> - <plugin id="org.eclipse.osbp.vaaclipse.theme"/> - <plugin id="org.eclipse.osbp.vaaclipse.ui.preferences.addon"/> - <plugin id="org.eclipse.osbp.vaaclipse.ui.preferences.model"/> - <plugin id="org.eclipse.osbp.vaaclipse.util"/> - <plugin id="org.eclipse.osbp.vaaclipse.widgets"/> - <plugin id="org.eclipse.osbp.vaaclipse.widgetset.default"/> - <plugin id="org.eclipse.osbp.vaadin"/> - <plugin id="org.eclipse.osbp.vaadin.addons.absolutelayout"/> - <plugin id="org.eclipse.osbp.vaadin.addons.designer.overlay"/> - <plugin id="org.eclipse.osbp.vaadin.addons.suggesttext"/> - <plugin id="org.eclipse.osbp.vaadin.emf"/> - <plugin id="org.eclipse.osbp.vaadin.emf.api"/> - <plugin id="org.eclipse.osbp.vaadin.widgetset"/> - <plugin id="org.eclipse.osbp.webserver.messagequeue"/> - <plugin id="org.eclipse.osbp.xtext.action"/> - <plugin id="org.eclipse.osbp.xtext.addons"/> - <plugin id="org.eclipse.osbp.xtext.authorizationdsl"/> - <plugin id="org.eclipse.osbp.xtext.basic"/> - <plugin id="org.eclipse.osbp.xtext.blip"/> - <plugin id="org.eclipse.osbp.xtext.builder.metadata.services"/> - <plugin id="org.eclipse.osbp.xtext.builder.types.bundles"/> - <plugin id="org.eclipse.osbp.xtext.builder.types.loader.api"/> - <plugin id="org.eclipse.osbp.xtext.builder.types.loader.runtime"/> - <plugin id="org.eclipse.osbp.xtext.builder.xbase.setups"/> - <plugin id="org.eclipse.osbp.xtext.chart"/> - <plugin id="org.eclipse.osbp.xtext.cubedsl"/> - <plugin id="org.eclipse.osbp.xtext.datainterchange"/> - <plugin id="org.eclipse.osbp.xtext.datainterchange.common"/> - <plugin id="org.eclipse.osbp.xtext.datamart.common"/> - <plugin id="org.eclipse.osbp.xtext.datamartdsl"/> - <plugin id="org.eclipse.osbp.xtext.dialogdsl"/> - <plugin id="org.eclipse.osbp.xtext.entitymock"/> - <plugin id="org.eclipse.osbp.xtext.functionlibrary.common"/> - <plugin id="org.eclipse.osbp.xtext.functionlibrary.common.api"/> - <plugin id="org.eclipse.osbp.xtext.functionlibrarydsl"/> - <plugin id="org.eclipse.osbp.xtext.functionlibrarydsl.provider"/> - <plugin id="org.eclipse.osbp.xtext.gridsource"/> - <plugin id="org.eclipse.osbp.xtext.i18n"/> - <plugin id="org.eclipse.osbp.xtext.menu"/> - <plugin id="org.eclipse.osbp.xtext.messagedsl"/> - <plugin id="org.eclipse.osbp.xtext.organizationdsl"/> - <plugin id="org.eclipse.osbp.xtext.perspective"/> - <plugin id="org.eclipse.osbp.xtext.reportdsl"/> - <plugin id="org.eclipse.osbp.xtext.reportdsl.oda.datamart"/> - <plugin id="org.eclipse.osbp.xtext.strategy"/> - <plugin id="org.eclipse.osbp.xtext.table"/> - <plugin id="org.eclipse.osbp.xtext.table.common"/> - <plugin id="org.eclipse.osbp.xtext.topologydsl"/> - <plugin id="org.eclipse.osgi"/> - <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/> - <plugin id="org.eclipse.osgi.services"/> - <plugin id="org.eclipse.osgi.util"/> - <plugin id="org.eclipse.persistence.antlr"/> - <plugin id="org.eclipse.persistence.asm"/> - <plugin id="org.eclipse.persistence.core"/> - <plugin id="org.eclipse.persistence.jpa"/> - <plugin id="org.eclipse.persistence.jpa.jpql"/> - <plugin id="org.eclipse.text"/> - <plugin id="org.eclipse.uomo.core"/> - <plugin id="org.eclipse.uomo.ucum"/> - <plugin id="org.eclipse.uomo.ui"/> - <plugin id="org.eclipse.uomo.units"/> - <plugin id="org.eclipse.uomo.util"/> - <plugin id="org.eclipse.uomo.xml"/> - <plugin id="org.eclipse.xpand"/> - <plugin id="org.eclipse.xsd"/> - <plugin id="org.eclipse.xsd.edit"/> - <plugin id="org.eclipse.xtend"/> - <plugin id="org.eclipse.xtend.lib"/> - <plugin id="org.eclipse.xtend.lib.macro"/> - <plugin id="org.eclipse.xtend.typesystem.emf"/> - <plugin id="org.eclipse.xtext"/> - <plugin id="org.eclipse.xtext.common.types"/> - <plugin id="org.eclipse.xtext.common.types.edit"/> - <plugin id="org.eclipse.xtext.ecore"/> - <plugin id="org.eclipse.xtext.generator"/> - <plugin id="org.eclipse.xtext.util"/> - <plugin id="org.eclipse.xtext.xbase"/> - <plugin id="org.eclipse.xtext.xbase.lib"/> - <plugin id="org.freemarker.freemarker"/> - <plugin id="org.glassfish.javax.json"/> - <plugin id="org.hamcrest.core"/> - <plugin id="org.jivesoftware.smack"/> - <plugin id="org.joda.convert"/> - <plugin id="org.joda.money"/> - <plugin id="org.json"/> - <plugin id="org.jsoup"/> - <plugin id="org.junit"/> - <plugin id="org.milyn.smooks.osgi"/> - <plugin id="org.mozilla.javascript"/> - <plugin id="org.mvel2"/> - <plugin id="org.objectweb.asm"/> - <plugin id="org.restlet"/> - <plugin id="org.slf4j.api"/> - <plugin id="org.unitsofmeasurement.unit-api"/> - <plugin id="org.vaadin.addons.vaadin-grid-util"/> - <plugin id="org.w3c.css.sac"/> - <plugin id="org.w3c.dom.events"/> - <plugin id="org.w3c.dom.smil"/> - <plugin id="org.w3c.dom.svg"/> - <plugin id="org.w3c.flute"/> - <plugin id="org.w3c.sac"/> - <plugin id="org.xmlpull"/> - <plugin id="org.yaml.snakeyaml"/> - <plugin id="osgi.enterprise"/> - <plugin id="osgi.sun"/> - <plugin id="overlays.osgi"/> - <plugin id="popupbutton.osgi"/> - <plugin id="refresher.osgi"/> - <plugin id="sizereporter.osgi"/> - <plugin id="xstream"/> -${{NECESSARY_DATA_BASE_VENDOR_PLUGINS}} - ''') - } - - override getRecommendedAsString() { - prepareSerialized( - ''' - <plugin id="net.osbee.bpm"/> - <plugin id="net.osbee.mobile.vaadin.ecview.presentation"/> - <plugin id="net.osbee.mobile.vaadin.ecview.servlet.mobile"/> - <plugin id="net.osbee.mobile.vaadin.touchkit.osgi"/> - <plugin id="net.osbee.mobile.vaadin.utils"/> - <plugin id="net.osbee.mobile.vaadin.widgetset"/> - <plugin id="net.osbee.organization.permissions"/> - <plugin id="net.osbee.utils.js"/> - <plugin id="net.osbee.vaaclipse.designer"/> - <plugin id="net.osbee.vaadin.designer"/> - <plugin id="net.osbee.xtext.cubedsl"/> - <plugin id="net.osbee.xtext.cubedsl.services"/> - <plugin id="net.osbee.xtext.organizationdsl"/> - <plugin id="net.osbee.xtext.organizationdsl.api"/> - <plugin id="net.osbee.xtext.organizationdsl.services"/> - <plugin id="net.osbee.xtext.organizationdsl.vaaclipse"/> - ''') - } - - override prepareSerialized(String asString) { - removeDuplicates(asString - .replace( - "${{NECESSARY_DATA_BASE_VENDOR_PLUGINS}}", - EnumDatabaseVendor.getNecessaryPlugins(necessaryDataBaseVendors) - ) - .replace( - "${{UNNECESSARY_DATA_BASE_VENDOR_PLUGINS}}", - EnumDatabaseVendor.getUnnecessaryPlugins(necessaryDataBaseVendors) - ) - ) - } -}
\ No newline at end of file diff --git a/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/welcome.html b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/welcome.html new file mode 100644 index 0000000..87a823b --- /dev/null +++ b/org.eclipse.osbp.preferences/src/org/eclipse/osbp/preferences/welcome.html @@ -0,0 +1,6 @@ +<iframe src="./VAADIN/themes/osbp/html/Welcome.html" +width="100%" height="100%" name="welcome page"> + + <p>Alternative Welcome page</p> + +</iframe> diff --git a/org.eclipse.osbp.preferences/xtend-gen/.gitignore b/org.eclipse.osbp.preferences/xtend-gen/.gitignore new file mode 100644 index 0000000..1b5b6a9 --- /dev/null +++ b/org.eclipse.osbp.preferences/xtend-gen/.gitignore @@ -0,0 +1,2 @@ +/.ProductFileConfigurations.xtendbin +/.ProductFilePlugins.xtendbin diff --git a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/.gitignore b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/.gitignore new file mode 100644 index 0000000..1442f65 --- /dev/null +++ b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/.gitignore @@ -0,0 +1,2 @@ +/ProductFileConfigurations.java +/ProductFilePlugins.java diff --git a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileConfigurations.java b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileConfigurations.java index 9b6514c..55b8f92 100644 --- a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileConfigurations.java +++ b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileConfigurations.java @@ -29,6 +29,7 @@ public class ProductFileConfigurations extends ProductFileBase { super(prefs, jndiNames); } + @Override public String getDeprecatedAsString() { StringConcatenation _builder = new StringConcatenation(); _builder.append("${{UNNECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}"); @@ -48,70 +49,51 @@ public class ProductFileConfigurations extends ProductFileBase { return this.prepareSerialized(_builder.toString()); } + @Override public String getRequiredAsString() { StringConcatenation _builder = new StringConcatenation(); _builder.append("${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.core.runtime\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.e4.ui.services\" autoStart=\"false\" startLevel=\"1\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.equinox.common\" autoStart=\"true\" startLevel=\"2\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.equinox.coordinator\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.equinox.ds\" autoStart=\"true\" startLevel=\"1\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.equinox.event\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); + _builder.append("<plugin id=\"org.eclipse.gemini.naming\" autoStart=\"true\" startLevel=\"3\" />"); + _builder.newLine(); _builder.append("<plugin id=\"org.eclipse.osbp.dsl.dto.lib\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.dsl.metadata.service\" autoStart=\"true\" startLevel=\"3\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.strategy\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.ecview.jetty.manager\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.fork.gemini.naming\" autoStart=\"true\" startLevel=\"3\" />"); - _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.osgi.hybrid.api\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.persistence\" autoStart=\"true\" startLevel=\"0\" />"); - _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.runtime.ecore.bundlespace\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.runtime.event\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.runtime.jsr303.validation\" autoStart=\"true\" startLevel=\"4\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.runtime.typeprovider.bundlespace\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osbp.utils.entitymock.dbfill.ui\" autoStart=\"true\" startLevel=\"0\" />"); _builder.newLine(); - _builder.append(" "); _builder.append("<plugin id=\"org.eclipse.osgi\" autoStart=\"true\" startLevel=\"-1\" />"); _builder.newLine(); return this.prepareSerialized(_builder.toString()); } + @Override public String getRecommendedAsString() { StringConcatenation _builder = new StringConcatenation(); _builder.append("<plugin id=\"net.osbee.mobile.vaadin.ecview.servlet.mobile\" autoStart=\"true\" startLevel=\"0\" />"); @@ -119,13 +101,11 @@ public class ProductFileConfigurations extends ProductFileBase { return this.prepareSerialized(_builder.toString()); } + @Override public String prepareSerialized(final String asString) { - String _necessaryConfigurations = EnumDatabaseVendor.getNecessaryConfigurations(this.necessaryDataBaseVendors); - String _replace = asString.replace( - "${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}", _necessaryConfigurations); - String _unnecessaryConfigurations = EnumDatabaseVendor.getUnnecessaryConfigurations(this.necessaryDataBaseVendors); - String _replace_1 = _replace.replace( - "${{UNNECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}", _unnecessaryConfigurations); - return this.removeDuplicates(_replace_1); + return this.removeDuplicates( + asString.replace( + "${{NECESSARY_DATA_BASE_VENDOR_CONFIGURATIONS}}", + EnumDatabaseVendor.getNecessaryConfigurations(this.dataBaseVendors))); } } diff --git a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileFeatures.java b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileFeatures.java new file mode 100644 index 0000000..f7d20a9 --- /dev/null +++ b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFileFeatures.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation + */ +package org.eclipse.osbp.preferences; + +import org.eclipse.core.runtime.IBundleGroup; +import org.eclipse.core.runtime.IBundleGroupProvider; +import org.eclipse.core.runtime.Platform; +import org.eclipse.osbp.preferences.EnumDatabaseVendor; +import org.eclipse.osbp.preferences.ProductConfigurationPrefs; +import org.eclipse.osbp.preferences.ProductFileBase; +import org.eclipse.xtend2.lib.StringConcatenation; + +/** + * <plugins> dependencies for the OSBP product bundle <code>*.product</code> file. + */ +@SuppressWarnings("all") +public class ProductFileFeatures extends ProductFileBase { + public ProductFileFeatures(final ProductConfigurationPrefs prefs) { + super(prefs); + } + + public ProductFileFeatures(final ProductConfigurationPrefs prefs, final String... jndiNames) { + super(prefs, jndiNames); + } + + @Override + public String getDeprecatedAsString() { + return null; + } + + /** + * Creates the list of used plugins for the .product file in the product targetbundle. + */ + @Override + public String getRequiredAsString() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("${{DATA_BASE_VENDOR_FEATURES}}"); + _builder.newLine(); + String _runtimeSoftwareFeature = this.getRuntimeSoftwareFeature(); + _builder.append(_runtimeSoftwareFeature); + _builder.newLineIfNotEmpty(); + return this.prepareSerialized(_builder.toString()); + } + + @Override + public String getRecommendedAsString() { + return null; + } + + @Override + public String prepareSerialized(final String asString) { + return this.removeDuplicates( + asString.replace( + "${{DATA_BASE_VENDOR_FEATURES}}", + EnumDatabaseVendor.getDatabaseFeatures(this.dataBaseVendors))); + } + + private String getRuntimeSoftwareFeature() { + boolean netOsbee = false; + boolean orgOsbee = false; + IBundleGroupProvider[] _bundleGroupProviders = Platform.getBundleGroupProviders(); + for (final IBundleGroupProvider provider : _bundleGroupProviders) { + IBundleGroup[] _bundleGroups = provider.getBundleGroups(); + for (final IBundleGroup feature : _bundleGroups) { + { + String featureId = feature.getIdentifier(); + if ((featureId != null)) { + boolean _startsWith = featureId.startsWith("net.osbee"); + if (_startsWith) { + netOsbee = true; + } else { + boolean _startsWith_1 = featureId.startsWith("org.osbee"); + if (_startsWith_1) { + orgOsbee = true; + } + } + } + } + } + } + if (netOsbee) { + return "\t<feature id=\"net.osbee.softwarefactory.runtime.feature\"/>"; + } else { + if (orgOsbee) { + return "\t<feature id=\"org.osbee.softwarefactory.runtime.feature\"/>"; + } + } + return "\t<feature id=\"org.eclipse.osbp.softwarefactory.runtime.feature\"/>"; + } +} diff --git a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFilePlugins.java b/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFilePlugins.java deleted file mode 100644 index d60d6dd..0000000 --- a/org.eclipse.osbp.preferences/xtend-gen/org/eclipse/osbp/preferences/ProductFilePlugins.java +++ /dev/null @@ -1,1478 +0,0 @@ -/** - * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation - */ -package org.eclipse.osbp.preferences; - -import org.eclipse.osbp.preferences.EnumDatabaseVendor; -import org.eclipse.osbp.preferences.ProductConfigurationPrefs; -import org.eclipse.osbp.preferences.ProductFileBase; -import org.eclipse.xtend2.lib.StringConcatenation; - -/** - * <plugins> dependencies for the OSBP product bundle <code>*.product</code> file. - */ -@SuppressWarnings("all") -public class ProductFilePlugins extends ProductFileBase { - public ProductFilePlugins(final ProductConfigurationPrefs prefs) { - super(prefs); - } - - public ProductFilePlugins(final ProductConfigurationPrefs prefs, final String... jndiNames) { - super(prefs, jndiNames); - } - - public String getDeprecatedAsString() { - StringConcatenation _builder = new StringConcatenation(); - _builder.append("${{UNNECESSARY_DATA_BASE_VENDOR_PLUGINS}}"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.protobuf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.springsource.javax.jms\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.common\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.common.edit\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.dto\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.entity\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.entity.edit\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.semantic.service\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.vaadin.servlet.mobile\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.mobile.vaadin.touchkit.osgi\"/>"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.mobile.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.vaadin.addon.contextmenu\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.vaadin.addon.dndlayout\"/>"); - _builder.newLine(); - return this.prepareSerialized(_builder.toString()); - } - - public String getRequiredAsString() { - StringConcatenation _builder = new StringConcatenation(); - _builder.append(" "); - _builder.append("<plugin id=\"OpenCSV\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"activemq-all-osgi-5.9.0\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"animator.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"ca.ecliptical.pde.ds.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"ch.qos.logback.classic\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"ch.qos.logback.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"ch.qos.logback.slf4j\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.api.translate.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.guava\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.gwt.thirdparty.guava\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.gwt.thirdparty.streamhtmlparser\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.inject\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.google.inject.assistedinject\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.ibm.icu\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.jcraft.jsch\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.lowagie.text\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.jms\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.springsource.org.antlr.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.springsource.org.codehaus.commons.compiler\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.springsource.org.codehaus.janino\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.sun.mail.javax.mail\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.client\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.client-compiled\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.external.atmosphere.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.external.org.slf4j\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.push\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.sass-compiler\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.server\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.shared\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.theme-compiler\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"com.vaadin.themes\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"commons-vfs-osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"contextmenu.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"dCharts.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"dragdroplayouts.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"dom.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"dragdroplayouts.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"easyuploads.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"filteringtable.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"groovy-all\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"iban4j\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"jackrabbit-jcr-commons-osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"jackrabbit-webdav-osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"jackson-core-asl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"java-cup.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.annotation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.el\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.inject\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.jcr\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.persistence\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.servlet\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.transaction\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.validation.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.ws.rs.jsr311-api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.wsdl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.xml\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"javax.xml.stream\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"jaxen\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"joda-time\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"mondrian.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"multifileupload.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"net.osbee.vaaclipse.designer\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"net.osbee.vaadin.designer\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"olap4j-xmla.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"olap4j.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.antlr.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.ant\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.bridge\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.css\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.dom\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.dom.svg\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.ext.awt\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.parser\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.svggen\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.transcoder\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.util.gui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.batik.xml\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.bval.org.apache.bval.bundle\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.beanutils\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.cli\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.codec\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.collections\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.compress\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.dbcp\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.digester\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.discovery\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.email\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.exec\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.httpclient\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.io\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.jexl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.lang\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.lang3\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.logging\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.math\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.math3\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.net\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.pool\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.vfs\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.commons.validator\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-bindings-soap\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-bindings-xml\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-databinding-jaxb\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-frontend-jaxws\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-frontend-simple\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-transports-http\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.cxf.cxf-rt-wsdl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.felix.gogo.command\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.felix.gogo.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.felix.gogo.shell\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.httpcomponents.httpclient\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.httpcomponents.httpcore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.log4j\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.pdfbox.fontbox\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.pdfbox\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.servicemix.bundles.jexcelapi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.servicemix.bundles.wsdl4j\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.servicemix.bundles.xpp3\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.ws.xmlschema.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.xerces\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.xml.resolver\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.apache.xml.serializer\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.drools.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.data\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.data.aggregation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.data.adapter\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.engine\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.engine.emitter.html\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.engine.emitter.pdf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.engine.fonts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.engine.script.javascript\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.birt.report.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.bpmn2\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.bpmn2.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.compare.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.commands\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.contenttype\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.databinding\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.databinding.beans\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.databinding.observable\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.databinding.property\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.expressions\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.filebuffers\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.filesystem\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.jobs\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.resources\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.runtime.compatibility.registry\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.core.variables\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.datatools.connectivity\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.datatools.connectivity.oda\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.datatools.connectivity.oda.consumer\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.datatools.connectivity.oda.design\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.datatools.connectivity.oda.profile\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.debug.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.core.commands\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.core.contexts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.core.di\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.core.di.extensions\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.core.services\" version=\"1.2.1.v20140808-1251\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.ui.di\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.ui.model.workbench\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.ui.model.workbench.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.ui.services\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.e4.ui.workbench\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.codegen\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.codegen.ecore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.codegen.ecore.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.databinding\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.databinding.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.change\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.change.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.xcore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.xcore.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.ecore.xmi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.mwe.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.mwe.utils\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.emf.mwe2.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.app\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.bidi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.console\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.coordinator\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.ds\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.event\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.http.registry\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.http.servlet\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.preferences\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.registry\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.security\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.equinox.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.gemini.dbaccess.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.help\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jdt.compiler.apt\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jdt.compiler.tool\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jdt.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jdt.debug\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jdt.launching\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.continuation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.http\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.io\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.security\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.server\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.servlet\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.jetty.websocket\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.authentication\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.authentication.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.bpm.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.bpmn2.ecore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.commons\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.common.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.datatype.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.datatype.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.dto.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.dto.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.entity.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.metadata.service\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.mwe\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.xtext.builder.participant\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.xtext.lazyresolver\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.dsl.xtext.lazyresolver.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.e4extension\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.e4modelextension\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.common.editparts.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.common.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.common.model.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.databinding.beans\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.databinding.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.emf.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.extension.editparts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.extension.editparts.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.extension.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.extension.model.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.ui.presentation.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.core.util.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.dsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.dsl.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.editparts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.editparts.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.editparts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.editparts.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.model.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.presentation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.grid.presentation.clientside\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.model.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.presentation.vaadin\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.services\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.strategy\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.extension.widgetset\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.jetty.manager\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.uisemantics\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.xtext.builder.participant\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ecview.xtext.builder.participant.i18n\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.eventbroker\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.filter\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.fork.gemini.naming\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.fork.vaadin.addon.maskedtextfield\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.gitinfo\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.i18n.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.ecview\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.services\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.vaaclipse\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.infogrid.vaadin\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mobile.vaadin.ecview.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mobile.vaadin.ecview.editparts\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mobile.vaadin.ecview.editparts.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mobile.vaadin.ecview.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mondrian\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.mondrian.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.osgi.hybrid.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.osgi.hybrid.api.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.persistence\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.preferences\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.designer.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.ecore.bundlespace\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.event\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.jsr303.validation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.systemextension\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.typeprovider.bundlespace\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.atmosphere.fragment\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.ecview.presentation.vaadin\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.vaadin.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.vaadin.components\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.vaadin.components.widget\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.vaadin.databinding\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.runtime.web.vaadin.widgetset\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.themes\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ui.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.ui.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.user\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.blob\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.bpmn\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.entitymock.dbfill.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.functionnormalizer\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.img\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.js\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.themes.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.utils.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.additions\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.app\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.application\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.common.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.ecview\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.ecview.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.keybinding\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.perspective\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.problems\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.addons.softwarefactory\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.behaviour\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.behaviour.source\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.common.ecview\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.common.ecview.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.contributions\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.emf.addon\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.emf.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.presentation\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.publicapi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.resources\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.theme\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.ui.preferences.addon\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.ui.preferences.model\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.widgets\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaaclipse.widgetset.default\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.addons.absolutelayout\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.addons.designer.overlay\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.addons.suggesttext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.emf.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.vaadin.widgetset\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.webserver.messagequeue\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.action\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.addons\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.authorizationdsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.basic\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.blip\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.builder.metadata.services\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.builder.types.bundles\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.builder.types.loader.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.builder.types.loader.runtime\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.builder.xbase.setups\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.chart\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.cubedsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.datainterchange\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.datainterchange.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.datamart.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.datamartdsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.dialogdsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.entitymock\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.functionlibrary.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.functionlibrary.common.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.functionlibrarydsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.functionlibrarydsl.provider\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.gridsource\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.i18n\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.menu\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.messagedsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.organizationdsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.perspective\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.reportdsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.reportdsl.oda.datamart\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.strategy\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.table\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.table.common\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osbp.xtext.topologydsl\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osgi.compatibility.state\" fragment=\"true\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osgi.services\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.osgi.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.persistence.antlr\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.persistence.asm\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.persistence.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.persistence.jpa\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.persistence.jpa.jpql\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.text\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.ucum\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.ui\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.units\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.uomo.xml\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xpand\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xsd\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xsd.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtend\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtend.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtend.lib.macro\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtend.typesystem.emf\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.common.types\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.common.types.edit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.ecore\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.generator\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.xbase\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.eclipse.xtext.xbase.lib\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.freemarker.freemarker\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.glassfish.javax.json\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.hamcrest.core\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.jivesoftware.smack\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.joda.convert\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.joda.money\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.json\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.jsoup\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.junit\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.milyn.smooks.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.mozilla.javascript\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.mvel2\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.objectweb.asm\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.restlet\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.slf4j.api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.unitsofmeasurement.unit-api\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.vaadin.addons.vaadin-grid-util\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.css.sac\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.dom.events\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.dom.smil\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.dom.svg\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.flute\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.w3c.sac\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.xmlpull\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"org.yaml.snakeyaml\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"osgi.enterprise\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"osgi.sun\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"overlays.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"popupbutton.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"refresher.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"sizereporter.osgi\"/>"); - _builder.newLine(); - _builder.append(" "); - _builder.append("<plugin id=\"xstream\"/>"); - _builder.newLine(); - _builder.append("${{NECESSARY_DATA_BASE_VENDOR_PLUGINS}}"); - _builder.newLine(); - return this.prepareSerialized(_builder.toString()); - } - - public String getRecommendedAsString() { - StringConcatenation _builder = new StringConcatenation(); - _builder.append("<plugin id=\"net.osbee.bpm\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.mobile.vaadin.ecview.presentation\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.mobile.vaadin.ecview.servlet.mobile\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.mobile.vaadin.touchkit.osgi\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.mobile.vaadin.utils\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.mobile.vaadin.widgetset\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.organization.permissions\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.utils.js\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.vaaclipse.designer\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.vaadin.designer\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.cubedsl\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.cubedsl.services\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.organizationdsl\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.organizationdsl.api\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.organizationdsl.services\"/>"); - _builder.newLine(); - _builder.append("<plugin id=\"net.osbee.xtext.organizationdsl.vaaclipse\"/>"); - _builder.newLine(); - return this.prepareSerialized(_builder.toString()); - } - - public String prepareSerialized(final String asString) { - String _necessaryPlugins = EnumDatabaseVendor.getNecessaryPlugins(this.necessaryDataBaseVendors); - String _replace = asString.replace( - "${{NECESSARY_DATA_BASE_VENDOR_PLUGINS}}", _necessaryPlugins); - String _unnecessaryPlugins = EnumDatabaseVendor.getUnnecessaryPlugins(this.necessaryDataBaseVendors); - String _replace_1 = _replace.replace( - "${{UNNECESSARY_DATA_BASE_VENDOR_PLUGINS}}", _unnecessaryPlugins); - return this.removeDuplicates(_replace_1); - } -} |