diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/.classpath b/configuration_extractor/org.universal.tools.configurationExtractor/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..eda9a8efc9e42caa42c0ef2e854e51d5346ee402 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/.classpath @@ -0,0 +1,9 @@ +<?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.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry exported="true" kind="lib" path="javaparser-1.0.8.jar"/> + <classpathentry exported="true" kind="lib" path="rsyntaxtextarea.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/.project b/configuration_extractor/org.universal.tools.configurationExtractor/.project new file mode 100644 index 0000000000000000000000000000000000000000..0cefd48c76b42e8200602d6cbc32a1f2d2b48fd5 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.universaal.tools.configurationExtractor</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/.settings/org.eclipse.jdt.core.prefs b/configuration_extractor/org.universal.tools.configurationExtractor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..dbcb91b01a06f6b74a1e0fabb4ab117ba8d405be --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Fri Sep 23 01:46:41 CEST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/META-INF/MANIFEST.MF b/configuration_extractor/org.universal.tools.configurationExtractor/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..0785a7dde988ea9dd0c5b454d9ffe2ce94181964 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/META-INF/MANIFEST.MF @@ -0,0 +1,39 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: org.universaal.tools.configurationExtractor;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.universaal.tools.configurationExtractor.pluginActivator.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ClassPath: ., + javaparser-1.0.8.jar, + rsyntaxtextarea.jar +Export-Package: ., + org.universaal.tools.configurationExtractor.pluginActivator, + org.universaal.tools.configurationExtractor.pluginActions, + japa.parser, + japa.parser.ast, + japa.parser.ast.body, + japa.parser.ast.expr, + japa.parser.ast.stmt, + japa.parser.ast.type, + japa.parser.ast.visitor, + org.universaal.tools.configurationExtractor.model.xml, + org.fife.io, + org.fife.print, + org.fife.ui.rsyntaxtextarea, + org.fife.ui.rsyntaxtextarea.focusabletip, + org.fife.ui.rsyntaxtextarea.modes, + org.fife.ui.rsyntaxtextarea.parser, + org.fife.ui.rsyntaxtextarea.templates, + org.fife.ui.rtextarea, + org.fife.util, + org.universaal.tools.configurationExtractor.utility, + org.universaal.tools.configurationExtractor.view.Buttons, + org.universaal.tools.configurationExtractor.view.Elements, + org.universaal.tools.configurationExtractor.view.LowLevelPanels, + org.universaal.tools.configurationExtractor.view.MainPanels +Import-Package: org.apache.xml.serialize diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/OSGI-INF/l10n/bundle.properties b/configuration_extractor/org.universal.tools.configurationExtractor/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000000000000000000000000000000000000..03b43e18a59d425a50b7e807f764b5731693dc4a --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,2 @@ +#Properties file for CE +Bundle-Name = ConfigurationExtractor \ No newline at end of file diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/commands/StartHandler.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/commands/StartHandler.class new file mode 100644 index 0000000000000000000000000000000000000000..768a5cff7b8ed527dd4d0a995f77b9a02cb13364 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/commands/StartHandler.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/GuiControl.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/GuiControl.class new file mode 100644 index 0000000000000000000000000000000000000000..c70976b8e41c0db4bc9672ecaf8d29751796feb1 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/GuiControl.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/LoadControl.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/LoadControl.class new file mode 100644 index 0000000000000000000000000000000000000000..1de1f1bb7349a4eadc90cd39cc5c306dff85f56b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/LoadControl.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/MainPanelControl.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/MainPanelControl.class new file mode 100644 index 0000000000000000000000000000000000000000..6ba5b32f3d12b8e46730045ad220072c28d10065 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/controller/MainPanelControl.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element$Type.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element$Type.class new file mode 100644 index 0000000000000000000000000000000000000000..ef2092587f6712502e8fa841f2b0def516a35454 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element$Type.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element.class new file mode 100644 index 0000000000000000000000000000000000000000..59b7ac54d9ea0097836c8bd163c3da627cdf8245 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Element.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$ListPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$ListPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..618fc623d48b8c981658a116c369de6caea49069 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$ListPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$NormalPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$NormalPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..8871840c84386e862dd05c43b158979c9a0a8353 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$NormalPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Root.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Root.class new file mode 100644 index 0000000000000000000000000000000000000000..a8fd940df56909787b731d919e5a1bdadfc7dea2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations$Root.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations.class new file mode 100644 index 0000000000000000000000000000000000000000..efa270d140ca372daa3a34615625266ee672b1c2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/Annotations.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$ClassVisitor.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$ClassVisitor.class new file mode 100644 index 0000000000000000000000000000000000000000..edf6883c76478058001e2e5037588915ac78e980 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$ClassVisitor.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$MethodVisitor.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$MethodVisitor.class new file mode 100644 index 0000000000000000000000000000000000000000..4efbc24385d3c4face9f8d0a43657406eb26e137 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor$MethodVisitor.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.class new file mode 100644 index 0000000000000000000000000000000000000000..182eff668ad52dbb1a1047dc8e3d528fef2d3582 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.class new file mode 100644 index 0000000000000000000000000000000000000000..b58bb34985867a57ac4a1f82cdd44aeb82acdbfd Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements$1.class new file mode 100644 index 0000000000000000000000000000000000000000..07f6bdd4576bc7618f7df01d4c5e7453ec217f08 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.class new file mode 100644 index 0000000000000000000000000000000000000000..148f8aee1b20d1f81747dd9ae04aa52d1bb02ddb Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.class new file mode 100644 index 0000000000000000000000000000000000000000..9c58b0dd31025939800c584b924f10eeb15e88a2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActions/StartAction.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActions/StartAction.class new file mode 100644 index 0000000000000000000000000000000000000000..8bb74d853f67fbea19e53a39129d275a973caa1a Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActions/StartAction.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActivator/Activator.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActivator/Activator.class new file mode 100644 index 0000000000000000000000000000000000000000..f95d073a728dda9598cc9b57ec6bdb8ea6a5fde9 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/pluginActivator/Activator.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/utility/Constants.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/utility/Constants.class new file mode 100644 index 0000000000000000000000000000000000000000..f71ad1674d85116848296464458e9f6d4a6a7a0f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/utility/Constants.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..5fe5cf0b561d1bb51c5676f61ebedfe3e7a82e5f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.class new file mode 100644 index 0000000000000000000000000000000000000000..85f4bd4d11d1106cddc9519af5823302b3dff2a1 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements$1.class new file mode 100644 index 0000000000000000000000000000000000000000..087ad1114a692ab9ab5be07a5978afc1c5dbf272 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.class new file mode 100644 index 0000000000000000000000000000000000000000..a337b1b7ab04758d6d331324b19582962056c0bf Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel$1.class new file mode 100644 index 0000000000000000000000000000000000000000..e1086c1809e4e6c7e56565500307e6129f7fc874 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..d3d0ae0c31624b3ff90b9be8d8cd18a925f40eea Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..35e8acd84f50218ae2d645a49ee2b6b44c7114dc Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.class new file mode 100644 index 0000000000000000000000000000000000000000..20d1d933bf809db1a3726e3fa1cb8f08ef34e5eb Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..f15d345105e04a4c2c1f490c70edc4221e4e3eb5 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.class new file mode 100644 index 0000000000000000000000000000000000000000..a22da07db32f3ba24d4fe5685c7332981a62b863 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..515aa673b4c01ffb084b335fabc694fc4ab15795 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.class new file mode 100644 index 0000000000000000000000000000000000000000..0c6734b0842eba25a2c36bc1c7358f32e15d24cc Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..765b8c0f120085d4187522bf4bc48f69dcb1ff0f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.class new file mode 100644 index 0000000000000000000000000000000000000000..7c415647875fc0c2263e9d55709f8b6d1b448a06 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$1.class new file mode 100644 index 0000000000000000000000000000000000000000..94feaba35fadca914ea7142cf13d3aaa9224a11b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$2.class new file mode 100644 index 0000000000000000000000000000000000000000..a5947e4d4a98593bd063cdb130614cf99f417559 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.class new file mode 100644 index 0000000000000000000000000000000000000000..9f926ee45794571d112ff166ed74df5383ca06e9 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$1.class new file mode 100644 index 0000000000000000000000000000000000000000..3f81465bbffd1f0e10471babb2f965b5ac758dbb Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$2.class new file mode 100644 index 0000000000000000000000000000000000000000..479ee1117f46a1754e1ee871069ef26aac4fefec Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.class new file mode 100644 index 0000000000000000000000000000000000000000..638c55a24d17c4ee0153d23c46f1e74f3a71f6b3 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$1.class new file mode 100644 index 0000000000000000000000000000000000000000..c99a53e1956fc029c5a957dbfef63280d1445abe Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$2.class new file mode 100644 index 0000000000000000000000000000000000000000..9779f8d43fea04d791fab58c9264e6c2e2127d49 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.class new file mode 100644 index 0000000000000000000000000000000000000000..e37f693f1a317050e575224cec80b2c2ca2bf7c7 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton$1.class new file mode 100644 index 0000000000000000000000000000000000000000..67c406901c05a0b408655881a148910e14b99329 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.class new file mode 100644 index 0000000000000000000000000000000000000000..41a26f0006abb6af6f9121f475929b5a561e46f6 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/BigElement.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/BigElement.class new file mode 100644 index 0000000000000000000000000000000000000000..6d6f0eeb35fa6472840f753574004b2a5fe54346 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/BigElement.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$1.class new file mode 100644 index 0000000000000000000000000000000000000000..519cc856d1325702f54df9a9c5a4e664151738ce Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$2.class new file mode 100644 index 0000000000000000000000000000000000000000..b15912af64545c3a25573598cc67444407977bb6 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$3.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$3.class new file mode 100644 index 0000000000000000000000000000000000000000..e26b58020b5bafd268040888fb8125d0974e7106 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$3.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$4.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$4.class new file mode 100644 index 0000000000000000000000000000000000000000..7fc7ca5570ce77ebf6df875cbdaec39d39c09344 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$4.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$5.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$5.class new file mode 100644 index 0000000000000000000000000000000000000000..343a8c44d31e9863f6ba78de891f414d6503e51b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG$5.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG.class new file mode 100644 index 0000000000000000000000000000000000000000..cd24f88fdb15ce5254f16fd9773af926b18e7482 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ElementG.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$1.class new file mode 100644 index 0000000000000000000000000000000000000000..fa155322dded75299a1f91c07ac7a4ec8d4c779c Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$2.class new file mode 100644 index 0000000000000000000000000000000000000000..0cfa9ea6160daa7efdeb5648786274b617fa8a1c Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$3.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$3.class new file mode 100644 index 0000000000000000000000000000000000000000..ed710f91ad94c95579c0670113c9291c20237b54 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG$3.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG.class new file mode 100644 index 0000000000000000000000000000000000000000..28d702c9237e3d49927045622e80d088403b51b5 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListG.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..7faa144f2fc12fb251b3a29b772350b0f0fd4a40 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG$1.class new file mode 100644 index 0000000000000000000000000000000000000000..8c468526cb8fd640ff4375bc53da512fd6c9f355 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG.class new file mode 100644 index 0000000000000000000000000000000000000000..abaad0a28604dbddd7e29fd918c9c960a10a6a7d Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/PanelG.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Panels.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Panels.class new file mode 100644 index 0000000000000000000000000000000000000000..aba0e48cfe83142bbd5c9e54267df8c43922399d Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Panels.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$1.class new file mode 100644 index 0000000000000000000000000000000000000000..c07d61a8bc605beab4057306f9b444845892cbc7 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$2.class new file mode 100644 index 0000000000000000000000000000000000000000..81f1c68a515aa1a8d9616c0055bc4b7abf50ae33 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root.class new file mode 100644 index 0000000000000000000000000000000000000000..0c00300f24739c21ffe791789b001d4cc3e78d63 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/Elements/Root.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..795fb69f3b4dc3ec30408eed76e33235fdb9818f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..426c61101c0041b3c7397e04503c59a308bb14ef Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..c81815a50141151fa7b95a57c0c23f108f34a2b1 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..153b30fc5b15a7ba1599d767bed880d2457f394f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..f7b2466d4b3c31484f13b5afaddfb768406b3758 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.class new file mode 100644 index 0000000000000000000000000000000000000000..3f01fc48b6663a9255c4d24ac1ec6f21f89064e9 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow$1.class new file mode 100644 index 0000000000000000000000000000000000000000..812cf4ce1e4a63edc1ef6b90b26bc0f03dea0471 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.class new file mode 100644 index 0000000000000000000000000000000000000000..ac9833c20462788643c461969b04e5d0041e51d2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.class new file mode 100644 index 0000000000000000000000000000000000000000..4cca5e635e1f26af8b7ce806275752f664409e4e Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..c98429040feb622c5444b064b5ebaa9bb8af3770 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$1.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$1.class new file mode 100644 index 0000000000000000000000000000000000000000..1f79a1dd4f549c7ab880a317d52e88c0941c9475 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$1.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$2.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$2.class new file mode 100644 index 0000000000000000000000000000000000000000..5527bfaa4600a55de6e25c8a361e564a60170a9e Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$2.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$3.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$3.class new file mode 100644 index 0000000000000000000000000000000000000000..72e03f1b4983b2ffc61b1669fa6cd929e52fec4f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$3.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$4.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$4.class new file mode 100644 index 0000000000000000000000000000000000000000..cfc4a7be9c546f92d45997fa8b72b43fe9f743af Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow$4.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.class new file mode 100644 index 0000000000000000000000000000000000000000..883a1408ea60377215d92762b65b64c06b119ca5 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.class b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.class new file mode 100644 index 0000000000000000000000000000000000000000..beca83f41251d7e61849d59ad62c027fb4331f31 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/bin/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.class differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/build.properties b/configuration_extractor/org.universal.tools.configurationExtractor/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..1fd56d0b44f3f19bef969fbf2c9e228f50bad23b --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/build.properties @@ -0,0 +1,14 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + src/,\ + lib/javaparser-1.0.8.jar,\ + javaparser-1.0.8.jar,\ + rsyntaxtextarea.jar +jars.compile.order = .,\ + lib/javaparser-1.0.8.jar,\ + lib/rsyntaxtextarea.jar + diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowDownIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowDownIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..a36b6e04e157185acef2587a6e5c6cbcd2c51c53 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowDownIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowUpIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowUpIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..0e383aefbcb6b9ea23068f819fa11b4f970ff934 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/ArrowUpIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/DeleteIcon1.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/DeleteIcon1.png new file mode 100644 index 0000000000000000000000000000000000000000..a030f4715911ab83c707935a4c0f62e2f3baaf6c Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/DeleteIcon1.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/E_Symbol.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/E_Symbol.png new file mode 100644 index 0000000000000000000000000000000000000000..960670e750ca31b339ecf76151516ff8027847c2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/E_Symbol.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/LP_Symbol.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/LP_Symbol.png new file mode 100644 index 0000000000000000000000000000000000000000..a6b95639ec41cdf55ee47c62eea5eb89291f31a8 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/LP_Symbol.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/P_Symbol.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/P_Symbol.png new file mode 100644 index 0000000000000000000000000000000000000000..a9ea5b5d8eaab633596017146223078293bc5925 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/P_Symbol.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon(old).png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon(old).png new file mode 100644 index 0000000000000000000000000000000000000000..1d6a9f2ed76e1a372c04a2be2864ced98cd638d4 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon(old).png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..dee22b14b700b6a9c9be10f30cad6bc51c2eabcd Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/addPanelIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/cancelIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/cancelIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..4127bcb90b13750dc721d494a8eacf833cf38fbb Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/cancelIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/developerTeam.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/developerTeam.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6be16def6af3a098f7e4cdd52b69b8d6ff9d3c12 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/developerTeam.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..bba8d4f8c65158d98d32b0de401daf14c6110e6a Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModeIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModeIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..a382a04bad0c6ce0ad272a2fccd0b51e750b7d8e Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModeIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModePressedIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModePressedIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..18f7a59a8a25d56355f23baa3401ab806e1310b2 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/expertModePressedIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..d734b6f06a3f8e658523674996ad971b418517e5 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportPressedIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportPressedIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..199758b1d6b6369ee9ceca1ced162a8b1e351c79 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/exportPressedIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/maxElement.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/maxElement.png new file mode 100644 index 0000000000000000000000000000000000000000..652eb63a3909acca25813e5f77eacff2cd22286b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/maxElement.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/minElement.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/minElement.png new file mode 100644 index 0000000000000000000000000000000000000000..00455a7eeb818a4ce087b36a2f0dae6751f97e93 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/minElement.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..4729cfb5dbbe656d52380bcd12984be0174c71a9 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModeIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModeIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..36a746ca04ed2e47a4d16cad7c725733b7e17f50 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModeIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModePressedIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModePressedIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..b23c0b389a08c71077628ba67e8791328dc19235 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/normalModePressedIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowDownIcon.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowDownIcon.gif new file mode 100644 index 0000000000000000000000000000000000000000..c9036cbc54f08981e4c5b0d23557b685ced83f1b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowDownIcon.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowUpIcon.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowUpIcon.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1b7adf6115683cfdebf7b42197e285a28302b95 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/ArrowUpIcon.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.gif new file mode 100644 index 0000000000000000000000000000000000000000..f28f0ceb8b81a2620e1d189c5f33ed2e35475f29 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ec57d960e8fc2c9b22c3e5ebd8a914290aed01a0 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.gif new file mode 100644 index 0000000000000000000000000000000000000000..5793ba0b1e1d03275ae39249f284caa1d1072ed1 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f802abec9d30528a86617a12052cb3b6016126e6 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/DeleteIcon1.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/addPanel.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/addPanel.gif new file mode 100644 index 0000000000000000000000000000000000000000..244935b454ac9879127d95fe3c4f034e843dc110 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/addPanel.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/delElement.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/delElement.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3914f570b952573e224b5764bbf703ed2c40cfa7 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/delElement.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/exportIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/exportIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..7936c743254fa47b685dc4ae979b9286d4479661 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/exportIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/maxElement.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/maxElement.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b6bc922fbccab2773991f505b9ab248f73b8b29b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/maxElement.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/minElement.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/minElement.jpg new file mode 100644 index 0000000000000000000000000000000000000000..62e51dc4443847a55bf70653c8001f76df60e070 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/minElement.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d7b9da0f60fac36003c055f7d7eb02a232f66d8a Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..56f6d4ebe0ee24a24cab9980116be15cc2a4eff0 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromDirectoryIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cf6062838f9eb28041f6c2cc70dcaeecc57292e6 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..18a6353ec0a5c008c86dfeb3bc9bebdd875f5372 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/openFromWorkspaceIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_hoch.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_hoch.gif new file mode 100644 index 0000000000000000000000000000000000000000..02bc44c9b52f160aea08334b233a1907eb848aeb Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_hoch.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_runter.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_runter.gif new file mode 100644 index 0000000000000000000000000000000000000000..f5a2d59537736f6d544882e00bcbe2d9e4c4b2e5 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/pfeil_runter.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/roll.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/roll.gif new file mode 100644 index 0000000000000000000000000000000000000000..7854181c83892c77ed63e60d9f43ca8d2306eabe Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/roll.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/rollopen.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/rollopen.gif new file mode 100644 index 0000000000000000000000000000000000000000..af404396e84d7508b75c189b6c8ec20a912acd3a Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/rollopen.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/sample.gif b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/sample.gif new file mode 100644 index 0000000000000000000000000000000000000000..34fb3c9d8cb7d489681b7f7aee4bdcd7eaf53610 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/sample.gif differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/switchIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/switchIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..dccc9be5287f2426f4ff266b2bbbab428d0e9867 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/old/switchIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..0558b2868f7478f2d78459c71b29233bcea1db4f Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryPressedIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryPressedIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..afacf33d58c01e2a1673894e3b0637330aa87aaf Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromDirectoryPressedIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspaceIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspaceIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..b4b1230b28710c4214d8946f7ccb2c58dc4d8f31 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspaceIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspacePressedIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspacePressedIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..71a464004ab9059fbe28993008e1a978ec3fd00d Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openFromWorkspacePressedIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/openIcon.png b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..01b3629d162eb65dbf0ab5121d5de1ec1937da1b Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/openIcon.png differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/icons/wizardIcon.jpg b/configuration_extractor/org.universal.tools.configurationExtractor/icons/wizardIcon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6cee3d37bc29d87ce7ca52e7501190f248465b76 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/icons/wizardIcon.jpg differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/javaparser-1.0.8.jar b/configuration_extractor/org.universal.tools.configurationExtractor/javaparser-1.0.8.jar new file mode 100644 index 0000000000000000000000000000000000000000..5f6e2db991fe798bbba1b7ecb9ab50f8befadfd8 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/javaparser-1.0.8.jar differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/plugin.xml b/configuration_extractor/org.universal.tools.configurationExtractor/plugin.xml new file mode 100644 index 0000000000000000000000000000000000000000..475b2b35f51efefbe9c50e9b191409f96d7ab0e0 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/plugin.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + + <extension + point="org.eclipse.ui.actionSets"> + <actionSet + label="Sample Action Set" + visible="true" + id="ConfigurationExtractor.actionSet"> + <menu + label="Sample &Menu" + id="sampleMenu"> + <separator + name="sampleGroup"> + </separator> + </menu> + <action + label="&Sample Action" + icon="icons/wizardIcon.jpg" + class="org.universaal.tools.configurationExtractor.pluginActions.StartAction" + tooltip="Configuration Extractor!" + menubarPath="sampleMenu/sampleGroup" + toolbarPath="sampleGroup" + id="configurationExtractor.pluginActions.StartAction"> + </action> + </actionSet> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + defaultHandler="StartHandler" + id="org.universaal.tools.configurationExtractor.commands.startHandler" + name="Start CE"> + </command> + </extension> + +</plugin> diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/rsyntaxtextarea.jar b/configuration_extractor/org.universal.tools.configurationExtractor/rsyntaxtextarea.jar new file mode 100644 index 0000000000000000000000000000000000000000..92a8f1c09835e2968970e169adc85e896031ce62 Binary files /dev/null and b/configuration_extractor/org.universal.tools.configurationExtractor/rsyntaxtextarea.jar differ diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/commands/StartHandler.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/commands/StartHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..dce98f11a79d8349d843ca49198ad3bc14ba97f9 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/commands/StartHandler.java @@ -0,0 +1,66 @@ +package org.universaal.tools.configurationExtractor.commands; + +import javax.swing.JOptionPane; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.commands.IHandlerListener; +import org.eclipse.core.runtime.Platform; +import org.eclipse.ui.handlers.HandlerUtil; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleException; +import org.universaal.tools.configurationExtractor.pluginActions.StartAction; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; + +/** + * + * @author Ilja + * This class could be later used for calling CE from outside. + */ +public class StartHandler implements IHandler { + + @Override + public void addHandlerListener(IHandlerListener handlerListener) { + // TODO Auto-generated method stub + + } + + @Override + public void dispose() { + // TODO Auto-generated method stub + + } + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + // TODO Auto-generated method stub + +// JOptionPane.showMessageDialog( null, "CE is starting!!" ); + System.out.println("Configuration Extractor was called from from StartHandler!"); + + MainWindow mainWindow=new MainWindow("Configuration Extractor!"); + mainWindow.setVisible( true ); + + return null; + } + + @Override + public boolean isEnabled() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isHandled() { + // TODO Auto-generated method stub + return false; + } + + @Override + public void removeHandlerListener(IHandlerListener handlerListener) { + // TODO Auto-generated method stub + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/GuiControl.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/GuiControl.java new file mode 100644 index 0000000000000000000000000000000000000000..55eb6b7f5afc80f2acd777283d81670f1da56011 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/GuiControl.java @@ -0,0 +1,184 @@ +package org.universaal.tools.configurationExtractor.controller; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.Writer; +import javax.swing.DefaultListModel; +import javax.swing.JTree; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.MutableTreeNode; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.MainPanels.XMLPanel; +import org.universaal.tools.configurationExtractor.model.xml.AnnotationsExtractor; +import org.universaal.tools.configurationExtractor.model.xml.TreeWithElements; +import org.universaal.tools.configurationExtractor.model.xml.XMLCreator; + +/** + * This class is a part of controller component. GuiControl observes GUI of CE and give the user actions to Model. GuiControl is a singleton. + */ + +public class GuiControl { + private static GuiControl instance = new GuiControl(); + private AnnotationsExtractor annotationsExtractor= AnnotationsExtractor.getInstance(); + private TreeWithElements treeWithElements= TreeWithElements.getInstance(); + /* + * The constructor is private,because there is only one instance of the class. + */ + private GuiControl(){ + } + /** + * Singleton method + * @return singleton instance of GuiControl + */ + public static GuiControl getInstance(){ + return instance; + } + + /** + * This method refreshes a XML Panel of GUI + */ + public void refreshXmlPanel(){ + XMLCreator xc = XMLCreator.getInstance(); + xc.init(); + xc.printToXmlPanel(); + } + /** + * Print the actual xml configuration into file. If user have changed something in expert mode + * and clicked on import then file will be the same as content of xml panel. Otherwise the actual configuration of PanelWithElements will be saved. + * @param file with xml configuration + * @throws IOException + */ + + public void printXML(File file) throws IOException{ + XMLPanel xmlPanel= XMLPanel.getInstance(); + if(xmlPanel.getVisibilityStatus()){ + String xmlText =xmlPanel.getTextFromXMLPanel(); + try { + FileOutputStream fos = new FileOutputStream(file); + Writer out = new OutputStreamWriter(fos, "UTF8"); + out.write(xmlText); + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + }else{ + XMLCreator xc = XMLCreator.getInstance(); + xc.init(); + xc.printToFile(file); + } + } + /** + * Check for changes in xml panel + * @return true if xml panel was changed. + */ + public boolean xmlPanelChanged(){ + XMLPanel xmlPanel= XMLPanel.getInstance(); + return xmlPanel.xmlPanelChanged(); + } + /** + * + * @return tree of tree mode + */ + public JTree getTree(){ + return treeWithElements.getTree(); + } + /** + * expand tree of tree mode + */ + public void expandTree(){ + treeWithElements.expandTree(); + } + + /** + * Get leaf of parent with special number + * @param parent parent node + * @param indexOfChild index of child in parent + * @return leaf + */ + public DefaultMutableTreeNode getLeaf(DefaultMutableTreeNode parent, int indexOfChild){ + return treeWithElements.getLeaf(parent, indexOfChild); + } + + /** + * Get node otherElements + * @return node otherElements, which is a container for free elements + */ + public DefaultMutableTreeNode getOtherElementsNode(){ + return treeWithElements.getOtherElementsNode(); + } + /** + * Move a leaf to other parent node + * @param selectedNode + * @param sourceParentNode + * @param targetParentNode + */ + public void toMoveALeaf(DefaultMutableTreeNode selectedNode, DefaultMutableTreeNode sourceParentNode,DefaultMutableTreeNode targetParentNode){ + treeWithElements.toMoveALeaf(selectedNode, sourceParentNode,targetParentNode); + } + + /** + * Check whether otherElements node is empty + * @return true if otherElements node is empty + */ + public boolean isOtherElementsNodeEmpty(){ + return treeWithElements.isOtherElementsNodeEmpty(); + } + + /** + * Add leaf to a parent node on the last place + * @param child leaf + * @param parent node + */ + public void addLeaf(MutableTreeNode child ,MutableTreeNode parent){ + treeWithElements.addLeaf(child ,parent); + + } + /** + * Add node to panels + * @param child parents leaf + * @param index index of place, where parent leaf will be added + */ + public void addNode(MutableTreeNode child , int index){ + treeWithElements.addNode(child ,index); + } + /** + * Delete node from tree + * @param node to remove + */ + public void removeNode(MutableTreeNode node){ + treeWithElements.removeNode(node); + } + /** + * refresh treePanel + */ + public void updateTree(){ + treeWithElements.updateTree(); + } + + /** + * Add leaf to a parent node on the place with index + * @param child leaf + * @param parent node + * @param index index to add + */ + public void addLeafWithIndex(MutableTreeNode child ,MutableTreeNode parent,int index){ + treeWithElements.addLeafWithIndex(child , parent,index); + } + /** + * Get "panels" node of the tree + * @return panels "panels" node on the tree + */ + public DefaultMutableTreeNode getPanelsNode(){ + return treeWithElements.getPanelsNode(); + } + + + public DefaultListModel getDirectories(){ + return annotationsExtractor.getDirs(); + } + + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/LoadControl.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/LoadControl.java new file mode 100644 index 0000000000000000000000000000000000000000..0ca8c991a90ae6312b55d5e700ec8f04fa59d57c --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/LoadControl.java @@ -0,0 +1,56 @@ +package org.universaal.tools.configurationExtractor.controller; + +import java.io.File; +import java.io.IOException; +import javax.swing.DefaultListModel; +import org.universaal.tools.configurationExtractor.model.xml.AnnotationsExtractor; + +/** + * Another part of controller(MVC). The goal of LoadControl is to check the load routine. It is singleton pattern. + */ +public class LoadControl { + private static LoadControl instance = new LoadControl(); + private AnnotationsExtractor annotationsExtractor; + /* + * Constructor is private, because of singleton implementation + */ + private LoadControl(){ + annotationsExtractor = AnnotationsExtractor.getInstance(); + } + /** + * Typical singleton method + * @return LoadControl instance (singleton) + */ + public static LoadControl getInstance(){ + return instance; + } + + /** + * This method extracts Annotations from the special directory of workspace. + * @param index describe the item of the list + * @param wokspaceDirs list with all directories of workspace + */ + public void extractAnnotationsFrom(int index, DefaultListModel wokspaceDirs){ + try { + annotationsExtractor.extract(new File(""+wokspaceDirs.get(index))); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + annotationsExtractor.initialize(); + } + /** + * This method removes all history of program. If the plugin will be started again(without closing of eclipse) the whole history should be removed from cache memory. + */ + public void removeHistory(){ + AnnotationsExtractor ae= AnnotationsExtractor.getInstance(); + ae.removeHistory(); + } + /** + * This method signalizes whether the directory is a use case. + * @return true if root element was found. + */ + public boolean isRootFound(){ + return AnnotationsExtractor.getInstance().isRootFound(); + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/MainPanelControl.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/MainPanelControl.java new file mode 100644 index 0000000000000000000000000000000000000000..25e16960b78abfc8114a55f40df184feab4086f5 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/controller/MainPanelControl.java @@ -0,0 +1,77 @@ +package org.universaal.tools.configurationExtractor.controller; + +import java.util.LinkedList; +import javax.swing.tree.DefaultMutableTreeNode; +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; +import org.universaal.tools.configurationExtractor.view.Elements.Root; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigRootPanel; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * This class implemented as singleton will be need for interaction from main panel of GUI and Model. + */ + +public class MainPanelControl { + + private static final MainPanelControl instance = new MainPanelControl(); + /* + * Typically is constructor of singleton private + */ + private MainPanelControl(){ + } + /* + * Typical method of singleton pattern + */ + public static MainPanelControl getInstance(){ + return instance; + } + + /** + * Add root element + * @param r root element + */ + public void addRoot(Root r){ + BigRootPanel.getInstance().setRoot(r); + } + /** + * Get tree node with special title + * @param title of some "panel node" + * @return the panel node + */ + public DefaultMutableTreeNode getNode(String title){ + return PanelWithElements.getInstance().getNode(title); + } + /** + * Add parentPanel ("<panel>" or "<listpanel>") + * @param p some ParentPanel instance + */ + public void addParentPanel(ParentPanel p){ + BigRootPanel bigRootPanel= BigRootPanel.getInstance(); + bigRootPanel.add(p); + } + /** + * Remove some instance of ParentPanel class + * @param p ParentPanel instance + */ + public void removeParentPanel(ParentPanel p){ + BigRootPanel bigRootPanel= BigRootPanel.getInstance(); + bigRootPanel.deleteParentPanel(p); + } + /** + * Refresh all parentPanels + * @param parentPanels list with all showed parentPanels + */ + public void refresh(LinkedList <ParentPanel> parentPanels){ + BigRootPanel bigRootPanel= BigRootPanel.getInstance(); + bigRootPanel.refresh(parentPanels); + } + /** + * Change name of node in the tree structure + * @param node which name should be changed + * @param input new name + * @param type type of element (e.g. Panel) + */ + public void changeNameOfNode(DefaultMutableTreeNode node, String input, String type){ + PanelWithElements.getInstance().changeNameOfNode(node,input,type); + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/Annotations.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/Annotations.java new file mode 100644 index 0000000000000000000000000000000000000000..957b5508373c037d594b9ec71d3cc4d0fdd4523c --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/Annotations.java @@ -0,0 +1,63 @@ +package org.universaal.tools.configurationExtractor.model.xml; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +/** + * @author Ilja + * All use cases have to had this class. It wont direct used in CE + */ +public class Annotations { + + /** + * + * This interface defines a root annotation, which involves all abstract information about use case + * + */ + @Retention(RetentionPolicy.RUNTIME) + public @interface Root { + String id(); + String useCaseName(); + String title() default ""; + + } + /** + * + * NormalPanel is a container for elements + * + */ + @Retention(RetentionPolicy.RUNTIME) + public @interface NormalPanel { + + String title(); + + } + /** + * ListPanel is a special container for special elements + * + */ + @Retention(RetentionPolicy.RUNTIME) + public @interface ListPanel { + String id(); + String label(); + String hoverText() default ""; + int limit() default -1; + String uRI(); + } + /** + * All special parameter of use case should be defined as elements + * + */ + @Retention(RetentionPolicy.RUNTIME) + public @interface Element { + String id(); + enum Type {CHECKBOX,DROPDOWNLIST,LABEL,LISTBOX,MULTISELECTLISTBOX,RADIOBUTTONGROUP,TEXTAREA,TEXTBOX}; + Type type(); + String label(); + String hoverText() default " "; + String standardValue() default " "; + String domain(); + } + + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.java new file mode 100644 index 0000000000000000000000000000000000000000..b1663d13b6d1aed135fb0f9f04b5bb219c99b5aa --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/AnnotationsExtractor.java @@ -0,0 +1,468 @@ +package org.universaal.tools.configurationExtractor.model.xml; + +import japa.parser.JavaParser; +import japa.parser.ParseException; +import japa.parser.ast.CompilationUnit; +import japa.parser.ast.body.BodyDeclaration; +import japa.parser.ast.body.ClassOrInterfaceDeclaration; +import japa.parser.ast.body.MethodDeclaration; +import japa.parser.ast.expr.AnnotationExpr; +import japa.parser.ast.visitor.VoidVisitorAdapter; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Stack; +import javax.swing.DefaultListModel; +import javax.swing.JOptionPane; +import javax.swing.tree.DefaultMutableTreeNode; +import org.eclipse.core.runtime.Platform; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.Elements.ElementG; +import org.universaal.tools.configurationExtractor.view.Elements.Root; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigListPanel; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigPanel; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; +/** + * @author Ilja + * This class involved all methods to extract special annotation (look class Annotations) from use case. AnnotationsExtractor is a singleton. + */ +public class AnnotationsExtractor { + + private static AnnotationsExtractor instance=new AnnotationsExtractor(); + private static LinkedList<BigElement> elementsList=new LinkedList<BigElement>(); + private static LinkedList<Integer> elemBelongsTo=new LinkedList<Integer>(); + private static int indexOfParentPanel=-1; + private static LinkedList<ParentPanel> parentsList=new LinkedList<ParentPanel>(); + private static Root root=null; + private static File fileWithRootElement=null; + private static boolean rootFound=false; + private PanelWithElements panelsWithElements = PanelWithElements.getInstance(); + + /** + * Remove History should be always called after closing of plugin. If the user started plugin again (without closing of ) all data structures must have initial values. + */ + public void removeHistory(){ +// debug output +// System.out.println("removeHistory"); + elementsList=new LinkedList<BigElement>(); + elemBelongsTo=new LinkedList<Integer>(); + indexOfParentPanel=-1; + parentsList=new LinkedList<ParentPanel>(); + root=null; + fileWithRootElement=null; + rootFound=false; + TreeWithElements treeWithElements= TreeWithElements.getInstance(); + PanelWithElements panelWithElements= PanelWithElements.getInstance(); + panelWithElements.removeAll(); + treeWithElements.removeAll(); + } + /* + * Typical singleton method + */ + private AnnotationsExtractor(){ + } + + /** + * After all Annotations were extracted, this method initialized via controller all GUI components + */ + public void initialize(){ + if(root!=null){ + GuiControl guiControl = GuiControl.getInstance(); + + try { + addRandomNumberToRootId(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + panelsWithElements = PanelWithElements.getInstance(); + panelsWithElements.setRoot(root); + + for(int i=0;i<parentsList.size();i++){ + panelsWithElements.addParentPanel(parentsList.get(i)); + if(parentsList.get(i).getTypeOfPanel().equals("Listpanel ")){ + BigListPanel l=(BigListPanel)parentsList.get(i); + l.addListLeaf(); + } + for(int j=0;j<elemBelongsTo.size();j++){ + if(elemBelongsTo.get(j)==i) { + elementsList.get(j).setParentPanel(parentsList.get(i)); + DefaultMutableTreeNode child=new DefaultMutableTreeNode(elementsList.get(j).getElementType() +" "+ elementsList.get(j).getId()); + guiControl.addLeaf(child, panelsWithElements.getNode(parentsList.get(i).getTitle())); + + } + } + } + }else{ + JOptionPane.showMessageDialog( null, "Sorry, but there was no @root, please try again " ); + } + } + /** + * Checks root element of use case + * @return true if there was a correct use case with a root element + */ + public boolean isRootFound(){ + return (root!=null); + } + /** + * After reading of a use case to the root element (in code of use case and in CE) should be added a random number(in next versions of CE can be used UUID). + * @throws IOException + */ + private void addRandomNumberToRootId() throws IOException{ + if(fileWithRootElement!=null){ + BufferedReader in = new BufferedReader(new FileReader(fileWithRootElement)); + + String randomNumber = "_"+(Math.round(Math.random()*1000000000)); + + //read + LinkedList<String> content = new LinkedList<String>(); + String str = ""; + while((str=in.readLine()) != null){ + content.add(str); + } + + //write + BufferedWriter out = new BufferedWriter(new FileWriter(fileWithRootElement)); + for(String line : content){ + + if(line.contains("@Root") && line.contains("useCaseName")&& line.contains("id")){ + root.setId(root.getId()+randomNumber); + out.write("@Root(title=\""+root.getTitle()+"\", id=\""+root.getId()+"\", useCaseName=\""+root.getName()+"\")"); + out.write("\n"); + }else{ + out.write(line+"\n"); + } + + } + out.close(); + + }else{System.out.println("there was no root at the files!!!"); + } + + } + + /** + * Extract annotations of all classes from the given directory + * @param directory of classes with annotations + * @throws IOException + */ + public void extract(File directory) throws IOException{ + LinkedList<File> javaFiles = getFiles(directory); + for(File file: javaFiles){ + try { + inspectJavaFile(file); + } + catch (FileNotFoundException e) { + e.printStackTrace(); + } + catch (ParseException e) { + e.printStackTrace(); + } + + } + + + } + + + + + + /** + * Checks (DFS) all files in a given directory for source files with java extension. + * + * @param startDir Start directory for search java files + * @return the list with all java files + */ + private static LinkedList<File> getFiles(File startDir) { + LinkedList<File> files = new LinkedList<File>(); + Stack<File> dirs = new Stack<File>(); + Stack<File> srcDirs = new Stack<File>(); + + //file with source directory + File src = null; + + if(startDir.isDirectory() && startDir.getName().equals("src")){ + src=startDir; + }else if ( startDir.isDirectory()) { + boolean srcWasFounded=false; + dirs.push( startDir ); + while (dirs.size() > 0 && !srcWasFounded) { + for (File file : dirs.pop().listFiles()) { + if (file.isDirectory() && file.getName().equals("src")) { + src = file ; + srcWasFounded=true; + }else if (file.isDirectory()) { + dirs.push( file ); + } + } + } + } + if(src!=null){ + srcDirs.push( src ); + while (srcDirs.size() > 0) { + for (File srcFile : srcDirs.pop().listFiles()) { + if (srcFile.isDirectory()) { + srcDirs.push( srcFile ); + } + else if (srcFile.canRead()) { + files.add( srcFile ); + } + } + } + + Iterator itr = files.iterator(); + while(itr.hasNext()) { + File file=(File) itr.next(); + if (!file.getName().endsWith("java")) { + itr.remove(); + } + } + + } + return files; + } + + /** + * Typical method of singleton pattern + * @return singleton instance of AnnotationsExtractor + */ + public static AnnotationsExtractor getInstance(){ + return instance; + } + + /** + * Firstly this method compiles with javaparser the given java file. Secondly the compiled unit will be searched for Class and Method annotations + * @param pFile file with annotations + * @throws FileNotFoundException + * @throws ParseException + * @throws IOException + */ + public static void inspectJavaFile(File pFile) + throws FileNotFoundException, ParseException, IOException { + + //debug output + System.out.println("file="+pFile.toString()); + + CompilationUnit cu; + FileInputStream in = new FileInputStream(pFile); + + try { + cu = JavaParser.parse(in); + + } finally { + in.close(); + } + try { + new ClassVisitor().visit(cu, null); + new MethodVisitor().visit(cu, null); + + if(rootFound){ +// debug output + System.out.println("file with root is="+pFile.toString()); + fileWithRootElement=pFile; + rootFound=false; + } + + } + catch (NullPointerException npe) { + + //TODO Output + } + } + + + /* + * This private class provides a method MethodDeclaration for visiting all annotations of methods. + */ + private static class MethodVisitor extends VoidVisitorAdapter { + @Override + public void visit(MethodDeclaration n, Object arg) { + visitAnnotations(n,arg); + } + } + /* + * This private class provides a method MethodDeclaration for visiting all Annotations of classes. + */ + private static class ClassVisitor extends VoidVisitorAdapter { + @Override + public void visit(ClassOrInterfaceDeclaration n, Object arg) { + visitAnnotations(n,arg); + } + } + /* + * This method finds and parses special defined annotations. + */ + private static void visitAnnotations(BodyDeclaration n, Object arg) { + + if (n.getAnnotations() != null) { + + for (AnnotationExpr annotation : n.getAnnotations()) { + String annotationType = annotation.getName().toString(); + + if (annotationType.equals("Element")){ + + String id=""; + String type=""; + String label=""; + String hoverText=""; + String standardValue=""; + String domain=""; + + String a= annotation.toString(); + a=a.substring(9, a.length()-1); + String[] b=a.split(", "); + + for(int i=0;i<b.length;i++){ + String c[]= b[i].split(" = "); + if(c[0].equals("id")){ + c[1]=c[1].substring(1, c[1].length()-1); + id=c[1]; + }else if(c[0].equals("type")){ + type=c[1]; + }else if(c[0].equals("label")){ + c[1]=c[1].substring(1, c[1].length()-1); + label=c[1]; + }else if(c[0].equals("hoverText")){ + c[1]=c[1].substring(1, c[1].length()-1); + hoverText=c[1]; + }else if(c[0].equals("standardValue")){ + c[1]=c[1].substring(1, c[1].length()-1); + standardValue=c[1]; + }else if(c[0].equals("domain")){ + c[1]=c[1].substring(1, c[1].length()-1); + domain=c[1]; + } + + } + + elemBelongsTo.add(indexOfParentPanel); + + ElementG element= new ElementG(type,label,hoverText,standardValue,domain,id,null); + + elementsList.add(element); +// debug output +// System.out.println("Element " +element.getTitle() +"gefunden!"); + }else if (annotationType.equals("NormalPanel")){ + String title=""; + String a= annotation.toString(); + a=a.substring(8, a.length()-1); + + String c[]= a.split(" = "); + c[1]=c[1].substring(1, c[1].length()-1); + title=c[1]; + BigPanel panel=new BigPanel(title); + parentsList.add(panel); + indexOfParentPanel++; + }else if (annotationType.equals("ListPanel")){ + String id=""; + String label=""; + String hoverText= ""; + int limit=-1; + String uRI=""; + + String a= annotation.toString(); + a=a.substring(11, a.length()-1); + String[] b=a.split(", "); + + for(int i=0;i<b.length;i++){ + String c[]= b[i].split(" = "); + + for(int j=0;j<c.length;j++){ + } + + if(c[0].equals("id")){ + c[1]=c[1].substring(1, c[1].length()-1); + id=c[1]; + }else if(c[0].equals("label")){ + c[1]=c[1].substring(1, c[1].length()-1); + label=c[1]; + }else if(c[0].equals("hoverText")){ + c[1]=c[1].substring(1, c[1].length()-1); + hoverText=c[1]; + }else if(c[0].equals("limit")){ + c[1]=c[1].substring(1, c[1].length()-1); + limit = new Integer(limit).intValue(); + + }else if(c[0].equals("uRI")){ + c[1]=c[1].substring(1, c[1].length()-1); + uRI=c[1]; + } + } + + + BigListPanel listPanel=new BigListPanel(hoverText,id,label,limit,uRI); + parentsList.add(listPanel); + indexOfParentPanel++; + + }else if (annotationType.equals("Root")){ + + //file with root found + rootFound=true; + + String id=""; + String title=""; + String useCaseName=""; + String a= annotation.toString(); + a=a.substring(6, a.length()-1); + String[] b=a.split(", "); + + + for(int i=0;i<b.length;i++){ + String c[]= b[i].split(" = "); + c[1]=c[1].substring(1, c[1].length()-1); + if(c[0].equals("id")){ + + id=c[1]; + + }else if(c[0].equals("title")){ + title=c[1]; + }else if(c[0].equals("useCaseName")){ + useCaseName=c[1]; + } + } + + root= new Root(id,useCaseName,title,""); +// debug output +// System.out.println("root is " +root.getTitle()"); + } + + } + + } + + } + + + /** + * This method returns all directories of workspace (in plugin runtime) + * + * @return all directories of eclipse workspace + */ + public DefaultListModel getDirs() { + File dir = new File(Platform.getLocation().toString()); + DefaultListModel allDirs = new DefaultListModel(); + File[] files = dir.listFiles(); + if (files != null) { + for (int i = 0; i < files.length; i++) { + if (files[i].isDirectory()) { +// debug output +// System.out.println("Directory "+files[i].toString()); + allDirs.addElement(files[i]); + } + } + } + return allDirs; + } + + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.java new file mode 100644 index 0000000000000000000000000000000000000000..3b0c927937215a5f6a0d33e4c1e4cfc2d97868cf --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/PanelWithElements.java @@ -0,0 +1,262 @@ +package org.universaal.tools.configurationExtractor.model.xml; + +import java.util.Iterator; +import java.util.LinkedList; +import javax.swing.tree.DefaultMutableTreeNode; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.controller.MainPanelControl; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.Elements.Root; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigRootPanel; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * @author Ilja + * This part of the Model(MVC) contains all data structures which will be presented on main panel of GUI + */ +public class PanelWithElements { + private static PanelWithElements panelWithElements; + private GuiControl guiControl = GuiControl.getInstance(); + private LinkedList <ParentPanel> parentPanels = new LinkedList<ParentPanel>(); + private LinkedList<DefaultMutableTreeNode> nodesList=new LinkedList<DefaultMutableTreeNode>(); + private LinkedList<BigElement> listWithOtherElements = new LinkedList<BigElement>(); + private Root root; + + /* + * The constructor is private because of singleton implementation of this class + */ + private PanelWithElements(){ + guiControl = GuiControl.getInstance(); + } + /** + * Clear all data of this class + */ + public void removeAll(){ + BigRootPanel brp=BigRootPanel.getInstance(); + brp.removeRoot(); + for(int i=0;i<parentPanels.size();i++){ + brp.deleteParentPanel(parentPanels.get(i)); + } + parentPanels.clear(); + panelWithElements=new PanelWithElements(); + + } + /** + * get root element of use case + * @return root element + */ + public Root getRoot(){ + return root; + } + /** + * Set root element + * @param r root element + */ + public void setRoot(Root r){ + MainPanelControl mpControl=MainPanelControl.getInstance(); + root=r; + mpControl.addRoot(root); + + } + /** + * Add a new ParentPanel (e.g. BigListPanel, BigPanel) + * @param p ParentPanel which will be added + */ + public void addParentPanel(ParentPanel p){ + guiControl = GuiControl.getInstance(); + parentPanels.add(p); + refresh(); + DefaultMutableTreeNode child=new DefaultMutableTreeNode(p.getTypeOfPanel()+p.getTitle()); + +// debug output +// System.out.println("parentSize= "+parentPanels.size()); + + guiControl.addNode(child, parentPanels.size()-1); + nodesList.add(child); + } + /** + * Remove given ParentPanel + * @param parent ParentPanel which will be removed + */ + public void deleteParentPanel(ParentPanel parent){ + guiControl = GuiControl.getInstance(); + MainPanelControl mpControl=MainPanelControl.getInstance(); + DefaultMutableTreeNode parentNode=getNode(parent.getTitle()); + Iterator<BigElement> itr = parent.getElementsList().iterator(); + while (itr.hasNext()) { + DefaultMutableTreeNode leaf=guiControl.getLeaf(parentNode, 0); + guiControl.toMoveALeaf(leaf, parentNode, guiControl.getOtherElementsNode()); + } + DefaultMutableTreeNode child=(DefaultMutableTreeNode) guiControl.getTree().getModel().getChild(guiControl.getPanelsNode(), parentPanels.indexOf(parent)); + guiControl.removeNode(child); + nodesList.remove(child); + guiControl.expandTree(); + mpControl.removeParentPanel(parent); + parentPanels.remove(parent); + refresh(); + + } + + /** + * Refresh main panel of GUI + */ + private void refresh(){ + MainPanelControl mpControl=MainPanelControl.getInstance(); + mpControl.refresh(parentPanels); + } + + /** + * This method allows to change two ParentPanels + * @param p1 first ParentPanel + * @param p2 second ParentPanel + */ + public void changeTwoParentPanels(ParentPanel p1 , ParentPanel p2){ + guiControl = GuiControl.getInstance(); + DefaultMutableTreeNode child1=(DefaultMutableTreeNode) guiControl.getTree().getModel().getChild(guiControl.getPanelsNode(), parentPanels.indexOf(p1)); + DefaultMutableTreeNode child2=(DefaultMutableTreeNode) guiControl.getTree().getModel().getChild(guiControl.getPanelsNode(), parentPanels.indexOf(p2)); + guiControl.removeNode(child1); + guiControl.addNode(child1, parentPanels.indexOf(p2)); + guiControl.removeNode(child2); + guiControl.addNode(child2, parentPanels.indexOf(p1)); + + p1.setVisible(false); + p2.setVisible(false); + ParentPanel help=p1.cloneParentPanel(); + + int indexOfFirst=parentPanels.indexOf(p1); + int indexOfSecond=parentPanels.indexOf(p2); + + parentPanels.set(indexOfFirst, p2); + + parentPanels.set(indexOfSecond, help); + p1.setVisible(true); + p2.setVisible(true); + refresh(); + + } + /** + * Get all ParentPanels + * @return List with all ParentPanels + */ + public LinkedList <ParentPanel> getParentsList(){ + return parentPanels; + } + + /** + * Get ParentPanel of given title + * @param title of some instance of ParentPanel + * @return ParentPanel with the title ="title" + */ + public ParentPanel getParentPanel(String title){ + +// System.out.println("title:"+title); + + for(int i= 0;i<parentPanels.size();i++) { + if(parentPanels.get(i).getTitle().equals(title) || ("Listpanel "+parentPanels.get(i).getTitle()).equals(title) + || ("Panel "+parentPanels.get(i).getTitle()).equals(title)) { + return parentPanels.get(i); + } + } +// debug output + System.out.println("Panel nicht gefunden!"); + return parentPanels.get(parentPanels.size()-1); + } + /** + * Get tree node with special title + * @param title of some "panel node" + * @return the panel node + */ + public DefaultMutableTreeNode getNode(String title){ + for(int i= 0;i<nodesList.size();i++) { +// System.out.println("parent number "+i+"is: "+nodesList.get(i).toString()); + if(nodesList.get(i).toString().equals("Listpanel "+title) ||nodesList.get(i).toString().equals("Panel "+title)) { + return nodesList.get(i); + } + } + return nodesList.get(nodesList.size()-1); + } + /** + * Change name of node in the tree structure + * @param node which name should be changed + * @param input new name + * @param type type of element (e.g. Panel) + */ + public void changeNameOfNode(DefaultMutableTreeNode node , String name, String type){ + int index = nodesList.indexOf(node); + nodesList.get(index).setUserObject(type+name); + guiControl.updateTree(); + } + /** + * Add given BigElement instance to the "otherElements" (BigElements without ParentPanels) list + * @param element BigElement instance, which will be added to the "otherElements" + */ + public void addToOtherElementsList(BigElement element){ + listWithOtherElements.add(element); + } + /** + * Get BigElement instance with title="leaf" + * @param leaf title of some leaf of "otherElements" + * @return BigElement from "otherElements" + */ + private BigElement getElementFromOtherElements(String leaf){ + Iterator<BigElement> itr = listWithOtherElements.iterator(); + while (itr.hasNext()) { + BigElement element = itr.next(); + if(("Element "+element.getTitle()).equals(leaf)){ + System.out.println("element found!"); + return element; + } + } + System.out.println("element not found!"); + return null; + } + /** + * This method allows to move BigElements between different BigPanels (Drag and Drop in the tree structure) + * @param leaf id of BigElement leaf + * @param sourcePanel title of souceParentPanel + * @param targetPanel title of targetParentPanel + */ + public void moveElementToAnotherPanel(String leaf, String sourcePanel,String targetPanel){ +// debug output +// System.out.println("parentfromLeaf1: "+leaf); +// System.out.println("sourcePanel: "+sourcePanel); +// System.out.println("targetPanel: "+targetPanel); + ParentPanel source; + ParentPanel target; + BigElement element; + +// move to otherElements; + if(targetPanel==null){ + source=getParentPanel(sourcePanel); + element= source.findBigElement(leaf); + listWithOtherElements.add(element); + source.deleteElement(element); +// move from otherElements + }else if(sourcePanel==null){ + element=getElementFromOtherElements(leaf); + target=getParentPanel(targetPanel); + int index= listWithOtherElements.indexOf(element); + listWithOtherElements.remove(index); + element.setParentPanel(target); + + }else{ + source=getParentPanel(sourcePanel); + target=getParentPanel(targetPanel); + element= source.findBigElement(leaf); + element.setParentPanel(target); + + } + } + /** + * Typical singleton method + * @return singleton instance of PanelWithElements + */ + public static PanelWithElements getInstance(){ + if(panelWithElements==null){ +// debug output +// System.out.println("panelWithElements init!"); + panelWithElements=new PanelWithElements(); + } + return panelWithElements; + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.java new file mode 100644 index 0000000000000000000000000000000000000000..1d2b7be8c3ccf526f833ad71ec136d176270eab3 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/TreeWithElements.java @@ -0,0 +1,240 @@ +package org.universaal.tools.configurationExtractor.model.xml; + +import java.awt.Point; +import java.awt.dnd.DropTarget; +import java.awt.dnd.DropTargetAdapter; +import java.awt.dnd.DropTargetDropEvent; +import javax.swing.DropMode; +import javax.swing.JOptionPane; +import javax.swing.JTree; +import javax.swing.TransferHandler; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.MutableTreeNode; +import javax.swing.tree.TreePath; +import javax.swing.tree.TreeSelectionModel; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +/** + * + * @author Ilja + * Another part of Model (MVC). TreeWithElements contains all important methods to deal with the tree perspective of CE. + */ +public class TreeWithElements { + private static TreeWithElements treeWithElements; + private JTree tree; + private DefaultTreeModel treeModel; + private DefaultMutableTreeNode panels; + private DefaultMutableTreeNode otherElements; + private DefaultMutableTreeNode root; + + /* + * Constructor is private because of singleton pattern. + */ + private TreeWithElements(){ + init(); + } + + /** + * Remove the history of tree + */ + public void removeAll(){ + tree=null; + panels.removeAllChildren(); + otherElements.removeAllChildren(); + init(); + expandTree(); + updateTree(); + } + /** + * Typical singleton method + * @return + */ + public static TreeWithElements getInstance(){ + if(treeWithElements==null){ +// debug output +// System.out.println("treeWithElements init!"); + treeWithElements=new TreeWithElements(); + } + return treeWithElements; + } + /** + * Initialize all tree elements + */ + public void init(){ + + root = new DefaultMutableTreeNode( "root" ); + treeModel = new DefaultTreeModel( root ); + panels = new DefaultMutableTreeNode( "panels" ) ; + root.add(panels); + otherElements=new DefaultMutableTreeNode( "otherElements" ) ; + root.add(otherElements); + tree=new JTree(treeModel); + + tree.setDragEnabled(true); + tree.getSelectionModel().setSelectionMode( + TreeSelectionModel.SINGLE_TREE_SELECTION); + tree.setDropMode(DropMode.USE_SELECTION); + tree.setDropTarget(new DropTarget(tree, TransferHandler.MOVE, new DropTargetAdapter() { + @Override + public void drop(DropTargetDropEvent dtde) { + + TreePath selectionPath = tree.getSelectionPath(); + TreePath sourcePath = selectionPath.getParentPath(); + + DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) selectionPath.getLastPathComponent(); + + Point dropLocation = dtde.getLocation(); + TreePath targetPath = tree.getClosestPathForLocation( + dropLocation.x, dropLocation.y); + +// debug output +// System.out.println("###################"); +// +// System.out.println("srcPath: " + sourcePath); +// System.out.println("targetPath: " + targetPath); +// System.out.println("selectedNode: " + selectedNode); + +// drop accept + if (isDropAllowed(sourcePath, targetPath, selectedNode)) { + DefaultMutableTreeNode sourceParentNode = (DefaultMutableTreeNode) sourcePath + .getLastPathComponent(); + DefaultMutableTreeNode targetParentNode = (DefaultMutableTreeNode) targetPath + .getLastPathComponent(); + toMoveALeaf(selectedNode, sourceParentNode,targetParentNode); + + dtde.dropComplete(true); + updateTree(); + +// drop reject + } else { + dtde.rejectDrop(); + dtde.dropComplete(false); + } + } + + private boolean isDropAllowed(TreePath sourcePath, TreePath targetPath, DefaultMutableTreeNode selectedNode) { +// root and panels arent moveable + if (selectedNode.equals(panels) || selectedNode.equals(root)) { + return false; + } +// source and target are the same + if (targetPath.equals(sourcePath)) { + return false; + } +// don´t move otherElemnts; + if (selectedNode.equals(otherElements)) { + + return false; + } +// don´t move panels + if (sourcePath.getLastPathComponent().equals(panels)) { + return false; + } +// parent isn´t panels or otherElements + if (!(targetPath.getParentPath().getLastPathComponent().equals(panels) || targetPath.getLastPathComponent().equals(otherElements))) { + + return false; + } + + String typeOfTargetArray[]=targetPath.getLastPathComponent().toString().split(" "); + String typeOfTarget=typeOfTargetArray[0]; + String typeOfSourceArray[]=sourcePath.getLastPathComponent().toString().split(" "); + String typeOfSource=typeOfSourceArray[0]; +// don´t move elements to or from Listpanel! + if (typeOfTarget.equals("Listpanel") || typeOfSource.equals("Listpanel")) { + + JOptionPane.showMessageDialog( null, "It's not allowed to add or remove Elements from Listpanel!" ); + return false; + } + + return selectedNode.isLeaf(); + } + + })); + expandTree(); + } + /** + * Refresh tree + */ + public void updateTree(){ + tree.updateUI(); + } + /** + * Add new ParentPanel node to tree structure + * @param child + * @param index + */ + public void addNode(MutableTreeNode child , int index){ + treeModel.insertNodeInto(child, panels, index); + } + + /** + * Add + * @param child + * @param parent + */ + public void addLeaf(MutableTreeNode child ,MutableTreeNode parent){ + treeModel.insertNodeInto(child, parent, parent.getChildCount()); + } + public void addLeafWithIndex(MutableTreeNode child ,MutableTreeNode parent,int index){ + treeModel.insertNodeInto(child, parent, index); + } + + public void removeNode(MutableTreeNode node){ + treeModel.removeNodeFromParent(node); + } + + public void addToOtherElements(BigElement element){ + String idFromElement=element.getId(); + DefaultMutableTreeNode leaf = new DefaultMutableTreeNode( idFromElement ); + treeWithElements.addLeaf(leaf,otherElements); + } + + public void toMoveALeaf(DefaultMutableTreeNode selectedNode, DefaultMutableTreeNode sourceParentNode,DefaultMutableTreeNode targetParentNode){ + sourceParentNode.remove(selectedNode); + targetParentNode.add(selectedNode); + String leaf=selectedNode.toString(); + String source=sourceParentNode.toString(); + String target=targetParentNode.toString(); + PanelWithElements panelsWithElements = PanelWithElements.getInstance(); + + if(targetParentNode.equals(otherElements)){ + panelsWithElements.moveElementToAnotherPanel(leaf, source,null); + + }else if(sourceParentNode.equals(otherElements)){ + panelsWithElements.moveElementToAnotherPanel(leaf, null,target); + }else{ + panelsWithElements.moveElementToAnotherPanel(leaf, source,target); + } + tree.updateUI(); + } + + public DefaultMutableTreeNode getLeaf(DefaultMutableTreeNode parent, int indexOfChild){ + DefaultMutableTreeNode child=(DefaultMutableTreeNode) parent.getChildAt(indexOfChild); + return child; + } + + public void expandTree(){ + for (int currentRowIndex = 0; currentRowIndex < tree.getRowCount(); currentRowIndex++) { + tree.expandRow(currentRowIndex); + } + } + + public JTree getTree(){ + return tree; + } + + public DefaultMutableTreeNode getPanelsNode(){ + return panels; + } + public DefaultMutableTreeNode getOtherElementsNode(){ + return otherElements; + } + + public boolean isOtherElementsNodeEmpty() { + return otherElements.isLeaf(); + } + + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.java new file mode 100644 index 0000000000000000000000000000000000000000..02dd15a5e24500beb8679f95b8fcbc83e3970f91 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/model/xml/XMLCreator.java @@ -0,0 +1,314 @@ +package org.universaal.tools.configurationExtractor.model.xml; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.StringWriter; +import java.util.Iterator; +import java.util.LinkedList; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Text; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.Elements.ElementG; +import org.universaal.tools.configurationExtractor.view.Elements.ListG; +import org.universaal.tools.configurationExtractor.view.Elements.Root; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.*; +import org.universaal.tools.configurationExtractor.view.MainPanels.XMLPanel; + +import org.apache.xml.serialize.XMLSerializer; +import org.apache.xml.serialize.OutputFormat; + + +@SuppressWarnings("deprecation") +/** + * This class contains methods to create a XML Data from the current configuration of CE. + */ +public class XMLCreator { + + private Document dom; + private XMLPanel xmlPanel=XMLPanel.getInstance(); + private static XMLCreator xmlCreator=new XMLCreator(); + /** + * Constructor is private because of singleton pattern of this class + */ + private XMLCreator() { + init(); + } + /** + * This method initializes a dom object and creates a initial tree structure + */ + public void init(){ + createDocument(); + createDOMTree(); + } + + public static XMLCreator getInstance(){ + return xmlCreator; + } + + /* + * Using JAXP in implementation independent manner create a document object + * using which we create a xml tree in memory + */ + private void createDocument() { + + //get an instance of factory + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + try { + //get an instance of builder + DocumentBuilder db = dbf.newDocumentBuilder(); + + //create an instance of DOM + dom = db.newDocument(); + + }catch(ParserConfigurationException pce) { + //dump it + System.out.println("Error while trying to instantiate DocumentBuilder " + pce); + System.exit(1); + } + + } + + /* + * This method creates the initial XML structure + */ + private void createDOMTree(){ + PanelWithElements panelWithElements= PanelWithElements.getInstance(); + Root root = panelWithElements.getRoot(); + + //create the root element + Element rootEle = dom.createElement("root"); + + rootEle.setAttribute("id", root.getId()); + + rootEle.setAttribute("name", root.getName()); + + rootEle.setAttribute("title", root.getTitle()); + + rootEle.setAttribute("info", root.getHelp()); + dom.appendChild(rootEle); + Element panelEle=dom.createElement("panels"); + rootEle.appendChild(panelEle); + LinkedList<ParentPanel> panels=panelWithElements.getParentsList(); + + for(int i=0;i<panels.size();i++){ + ParentPanel parent = panels.get(i); + Element elementPanel=null; + + if(parent instanceof BigListPanel){ + elementPanel = createListPanel((BigListPanel)parent); + panelEle.appendChild(elementPanel); + + }else if(parent instanceof BigPanel){ + elementPanel = createPanel((BigPanel)parent); + panelEle.appendChild(elementPanel); + }else{ + System.out.println("Element wurde nicht definiert"); + } + + LinkedList<BigElement> elementsList = parent.getElementsList(); + + Iterator it = elementsList.iterator(); + while(it.hasNext()) { + BigElement b = (BigElement)it.next(); + + if(b instanceof ElementG){ + Element elementEle = createElement((ElementG)b); + elementPanel.appendChild(elementEle); + }else if(b instanceof ListG){ + Element elementEle = createList((ListG)b); + elementPanel.appendChild(elementEle); + }else{ + System.out.println("Element wurde nicht definiert"); + } + } + } + + } + + /** + * Helper method which creates a XML element <Element> + * @param e The Element for which we need to create an xml representation + * @return XML element representing a Element + */ + private Element createElement(ElementG e){ + + Element elementEle = dom.createElement(e.getElementType()); + elementEle.setAttribute("id", e.getId()); + + Element typeEle = dom.createElement("type"); + Text typeText = dom.createTextNode(e.getType()); + typeEle.appendChild(typeText); + elementEle.appendChild(typeEle); + + + Element labelEle = dom.createElement("label"); + Text labelText = dom.createTextNode(e.getLabel()); + labelEle.appendChild(labelText); + elementEle.appendChild(labelEle); + + + Element titleEle = dom.createElement("title"); + Text titleText = dom.createTextNode(e.getTitle()); + titleEle.appendChild(titleText); + elementEle.appendChild(titleEle); + + + Element sValueEle = dom.createElement("standartValue"); + Text sValueText = dom.createTextNode(e.getStandartV()); + sValueEle.appendChild(sValueText); + elementEle.appendChild(sValueEle); + + Element domainEle = dom.createElement("domain"); + Text domainText = dom.createTextNode(e.getDomain()); + domainEle.appendChild(domainText); + elementEle.appendChild(domainEle); + + return elementEle; + + } + /** + * Helper method which creates a XML element <List> + * @param l The List for which we need to create an xml representation + * @return XML element representing a List + */ + private Element createList(ListG l){ + + Element elementEle = dom.createElement(l.getElementType()); + + Element labelEle = dom.createElement("label"); + Text labelText = dom.createTextNode(l.getLabel()); + labelEle.appendChild(labelText); + elementEle.appendChild(labelEle); + Element titleEle = dom.createElement("title"); + Text titleText = dom.createTextNode(l.getTitle()); + titleEle.appendChild(titleText); + elementEle.appendChild(titleEle); + + Element limitEle = dom.createElement("limit"); + Text limitText = dom.createTextNode(l.getLimit()+""); + limitEle.appendChild(limitText); + elementEle.appendChild(limitEle); + + + Element domainEle = dom.createElement("domain"); + Text domainText = dom.createTextNode(l.getDomain()); + domainEle.appendChild(domainText); + elementEle.appendChild(domainEle); + + return elementEle; + + } + + /** + * Helper method which creates a XML element <ListPanel> + * @param lp The BigListPanel for which we need to create an xml representation + * @return XML element representing a BigListPanel + */ + private Element createListPanel(BigListPanel lp){ + + Element elementEle = dom.createElement("listPanel"); + elementEle.setAttribute("id", lp.getId()); + + + Element titleEle = dom.createElement("title"); + Text titleText = dom.createTextNode(lp.getTitle()); + titleEle.appendChild(titleText); + elementEle.appendChild(titleEle); + + return elementEle; + } + + /** + * Helper method which creates a XML element <Panel> + * @param p The BigPanel for which we need to create an xml representation + * @return XML element representing a BigPanel + */ + private Element createPanel(BigPanel p){ + + Element elementEle = dom.createElement("Panel"); + Element titleEle = dom.createElement("title"); + Text titleText = dom.createTextNode(p.getTitle()); + titleEle.appendChild(titleText); + elementEle.appendChild(titleEle); + + return elementEle; + } + + /** + * This method printed a XML text (via Controller) to XML Panel ("expert mode"of GUI) + * + */ + public void printToXmlPanel(){ + String s=generateXMLString(dom); + xmlPanel.setText(s); + + } + + /** + * This method uses Xerces specific classes + * prints the XML document to file. + */ + public void printToFile(File file){ + + try + { + //print + OutputFormat format = new OutputFormat(dom); + format.setIndenting(true); + + //to generate output to console use this serializer +// XMLSerializer serializer = new XMLSerializer(System.out, format); + + //to generate a file output use fileoutputstream + XMLSerializer serializer = new XMLSerializer(new FileOutputStream(file), format); + + serializer.serialize(dom); + + } catch(IOException ie) { + ie.printStackTrace(); + } + } + // Generate String out of the XML document object + private String generateXMLString(Document xmlDoc) { + + StringWriter strWriter = null; + XMLSerializer probeMsgSerializer = null; + OutputFormat outFormat = null; + String xmlStr; + + try { + probeMsgSerializer = new XMLSerializer(); + strWriter = new StringWriter(); + outFormat = new OutputFormat(); + + outFormat.setIndenting(true); + outFormat.setIndent(4); + + // Define a Writer + probeMsgSerializer.setOutputCharStream(strWriter); + + // Apply the format settings + probeMsgSerializer.setOutputFormat(outFormat); + + // Serialize XML Document + probeMsgSerializer.serialize(xmlDoc); + xmlStr = strWriter.toString(); + strWriter.close(); + + } catch (IOException ioEx) { + System.out.println("Error " + ioEx); + return "fehler"; + } + return xmlStr; + } + + + + +} + diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActions/StartAction.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActions/StartAction.java new file mode 100644 index 0000000000000000000000000000000000000000..8380086c469800ef0f66b36ca53a794d7459dd26 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActions/StartAction.java @@ -0,0 +1,68 @@ +package org.universaal.tools.configurationExtractor.pluginActions; + +import org.eclipse.jface.action.IAction;import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; + + +/** + * This start action implements workbench action delegate. + * The action proxy will be created by the workbench and + * shown in the UI. When the user tries to use the action, + * this delegate will be created and execution will be + * delegated to it. + * @see IWorkbenchWindowActionDelegate + */ +public class StartAction implements IWorkbenchWindowActionDelegate { + private IWorkbenchWindow window; + /** + * The constructor. + */ + public StartAction() { + } + + /** + * The action has been activated. The argument of the + * method represents the 'real' action sitting + * in the workbench UI. + * @see IWorkbenchWindowActionDelegate#run + */ + public void run(IAction action) { + System.out.println("Hello,im Configuration Extractor PlugIn!"); + MainWindow mainWindow=new MainWindow("Configuration Extractor!"); + mainWindow.setVisible( true ); + + } + + /** + * Selection in the workbench has been changed. We + * can change the state of the 'real' action here + * if we want, but this can only happen after + * the delegate has been created. + * @see IWorkbenchWindowActionDelegate#selectionChanged + */ + public void selectionChanged(IAction action, ISelection selection) { + } + + /** + * We can use this method to dispose of any system + * resources we previously allocated. + * @see IWorkbenchWindowActionDelegate#dispose + */ + public void dispose() { + } + + /** + * We will cache window object in order to + * be able to provide parent shell for the message dialog. + * @see IWorkbenchWindowActionDelegate#init + */ + public void init(IWorkbenchWindow window) { + this.window = window; + } + + + + +} \ No newline at end of file diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActivator/Activator.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActivator/Activator.java new file mode 100644 index 0000000000000000000000000000000000000000..13139227c1a5a8c34f4949e93d8c8ac30161d3d6 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/pluginActivator/Activator.java @@ -0,0 +1,91 @@ +package org.universaal.tools.configurationExtractor.pluginActivator; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; + + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.universaal.tools.configurationExtractor"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor +// + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + System.out.println("start Configuration Extractor!"); + super.start(context); + plugin = this; + +// see comments down +// startFromOutside(); + + } + + /* + * This method allows to start plug-in from outside via Bundle bundle = Platform.getBundle("CE"); + * Bundle bundle = Platform.getBundle("CE"); + * try { + * bundle.stop(); + * bundle.start(); + * } catch (BundleException e) { + * // TODO Auto-generated catch block + * e.printStackTrace(); + * } + * This temporary method is definitely not the best and should later be exchanged!!! + */ +// private void startFromOutside(){ +// System.out.println("Start Configuration Extractor Plug-In from outside!"); +// MainWindow mainWindow=new MainWindow("Configuration Extractor!"); +// mainWindow.setVisible( true ); +// } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/utility/Constants.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/utility/Constants.java new file mode 100644 index 0000000000000000000000000000000000000000..36f048c46642b692e4bfcfd4c5ca7c690bb25c3e --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/utility/Constants.java @@ -0,0 +1,53 @@ +package org.universaal.tools.configurationExtractor.utility; + +import java.net.URL; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.ui.internal.util.BundleUtility; +import org.osgi.framework.Bundle; + +/** + * + * @author Ilja + * This class contains constants of CE + */ +public class Constants { + private Constants(){ + + } + + public static final URL DELETE_PANEL_ICON = getResourceURL("icons/DeleteIcon1.png"); + public static final URL DELETE_ELEMENT_ICON = getResourceURL("icons/DeleteIcon1.png"); + public static final URL ARROW_DOWN_PANEL_ICON = getResourceURL("icons/ArrowDownIcon.png"); + public static final URL ARROW_UP_PANEL_ICON = getResourceURL("icons/ArrowUpIcon.png"); + public static final URL ARROW_DOWN_ELEMENT_ICON = getResourceURL("icons/ArrowDownIcon.png"); + public static final URL ARROW_UP_ELEMENT_ICON = getResourceURL("icons/ArrowUpIcon.png"); + public static final URL ROLL_ELEMENTS_ICON = getResourceURL("icons/maxElement.png"); + public static final URL ROLLOPEN_ELEMENTS_ICON = getResourceURL("icons/minElement.png"); + public static final URL MAXIMIZE_ELEMENT_ICON = getResourceURL("icons/maxElement.png"); + public static final URL MINIMIZE_ELEMENT_ICON = getResourceURL("icons/minElement.png"); + public static final URL E_SYMBOL = getResourceURL("icons/E_Symbol.png"); + public static final URL P_SYMBOL = getResourceURL("icons/P_Symbol.png"); + public static final URL LP_SYMBOL = getResourceURL("icons/LP_Symbol.png"); + public static final URL OPEN_FROM_DIRECTORY_ICON = getResourceURL("icons/openFromDirectoryIcon.png"); + public static final URL OPEN_FROM_WORKSPACE_ICON = getResourceURL("icons/openFromWorkspaceIcon.png"); + public static final URL EXPORT_ICON = getResourceURL("icons/exportIcon.png"); + public static final URL EXPERT_MODE_ICON = getResourceURL("icons/expertModeIcon.png"); + public static final URL NORMAL_MODE_ICON = getResourceURL("icons/normalModeIcon.png"); + public static final URL ADD_PANEL_ICON = getResourceURL("icons/addPanelIcon.png"); + public static final URL OPEN_ICON = getResourceURL("icons/openIcon.png"); + public static final URL CANCEL_ICON = getResourceURL("icons/cancelIcon.png"); + + + /** + * This method transforms String path of image to URL + * @param path path to data with image + * @return URL of image + */ + private static URL getResourceURL(String path) { + Bundle bundle = Platform.getBundle("org.universaal.tools.configurationExtractor"); //Plugin ID + URL fullPathString = BundleUtility.find(bundle, path); + return fullPathString; + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.java new file mode 100644 index 0000000000000000000000000000000000000000..43a94eef95796e352b471b8fac9ec77043153d74 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/AddPanelButton.java @@ -0,0 +1,53 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigPanel; +/** + * + * @author Ilja + * The instance of this class is a special button, which can create new panel element. + */ +@SuppressWarnings("serial") +public class AddPanelButton extends JButton{ + public static int index=1; + + /** + * Constructor method, which include a listener + */ + public AddPanelButton(){ + // super("addPanel"); + ImageIcon addPanelButton = new ImageIcon( Constants.ADD_PANEL_ICON); + this.setIcon(addPanelButton); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + addNewPanel(); + + } + } ); + + String help = "Add a new Panel"; + this.setToolTipText( help ); + + } + /* + * Helper method to create a new panel + */ + private void addNewPanel(){ + BigPanel bg=new BigPanel("title"+index); + PanelWithElements.getInstance().addParentPanel(bg); + index++; + } + + /** + * Reset index to 1 + */ + public void resetIndex(){ + index=1; + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.java new file mode 100644 index 0000000000000000000000000000000000000000..8cdcb2854a746f987470f4ef38973f0547a88d60 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForElements.java @@ -0,0 +1,77 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.tree.DefaultMutableTreeNode; + +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; + +import org.universaal.tools.configurationExtractor.controller.GuiControl; + +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; +/** + * + * @author Ilja + * The instance of this class is a special button, which can remove a element from some panel. + */ +@SuppressWarnings("serial") +public class DeleteButtonForElements extends JButton{ + private ParentPanel parent; + private BigElement element; + private GuiControl guiControl = GuiControl.getInstance(); + private PanelWithElements panelWithElements= PanelWithElements.getInstance(); + + /** + * Constructor method. + * @param parent parent panel of a element + * @param element element which will be a container for a button. This element will be deleted after click on the button + */ + public DeleteButtonForElements(ParentPanel parent , BigElement element){ + this.element=element; + this.parent=parent; + ImageIcon del = new ImageIcon( Constants.DELETE_ELEMENT_ICON); + + this.setIcon(del); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + deleteElement(); + + } + } ); + String help = "Remove element"; + this.setToolTipText(help); + } + + /* + * Helper method to remove the element + */ + private void deleteElement(){ + if(parent.getTypeOfPanel().equals("Panel ")){ + element.setVisible(false); + DefaultMutableTreeNode p=panelWithElements.getNode(parent.getTitle()); + int indexOfChild= parent.getElementsList().indexOf(element); + DefaultMutableTreeNode leaf=guiControl.getLeaf(p, indexOfChild); + guiControl.toMoveALeaf(leaf, p, guiControl.getOtherElementsNode()); + guiControl.expandTree(); + + }else{ + System.out.println("not possible to remove Element from Listpanel"); + JOptionPane.showMessageDialog( null, "It's not allowed to remove Elements from Listpanel!" ); + } + } + + /** + * Set a new parent of element + * @param p parent panel + */ + public void setParent(ParentPanel p){ + this.parent=p; + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..d5bd8bb230ee71fb929b405bd60926257ab1a25a --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/DeleteButtonForPanel.java @@ -0,0 +1,44 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.ImageIcon; +import javax.swing.JButton; + +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * The instance of this class is a special button, which can remove a panel with all its elements. + */ +@SuppressWarnings("serial") +public class DeleteButtonForPanel extends JButton{ + private PanelWithElements panelWithElements= PanelWithElements.getInstance(); + private ParentPanel element; + public DeleteButtonForPanel(ParentPanel element){ + this.element=element; + ImageIcon del = new ImageIcon( Constants.DELETE_PANEL_ICON ); + this.setIcon(del); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + deleteParentPanel(); + + } + } ); + String help = "Remove panel with all elements"; + this.setToolTipText(help); + } + /* + * Helper method to delete a parent panel + */ + private void deleteParentPanel(){ + element.setVisible(false); + panelWithElements.deleteParentPanel(element); + } +} \ No newline at end of file diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.java new file mode 100644 index 0000000000000000000000000000000000000000..53c02c38610a8632eab0f0ac9d6ca5d4d70085c2 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ExportButton.java @@ -0,0 +1,90 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; +import javax.swing.filechooser.FileNameExtensionFilter; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.controller.LoadControl; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.MainPanels.EndWindow; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; + +/** + * + * @author Ilja + * This class provides the button, which can export the current configuration. + */ +@SuppressWarnings("serial") +public class ExportButton extends JButton{ + private MainWindow mainWindow; + private GuiControl guiControl = GuiControl.getInstance(); + + public ExportButton(MainWindow mainWindow){ + this.mainWindow=mainWindow; + ImageIcon exportIcon = new ImageIcon( Constants.EXPORT_ICON ); + this.setIcon(exportIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + export(); + + } + } ); + String help = "Export the actual configuration to xml file"; + this.setToolTipText( help ); + } + + /* + * Helper method to export a use case from directories + */ + private void export(){ + if(guiControl.isOtherElementsNodeEmpty()){ + JFileChooser fc = new JFileChooser(); + + fc.setFileFilter( new FileNameExtensionFilter("xml", ".xml") ); + fc.setDialogType(JFileChooser.SAVE_DIALOG); + + fc.setSelectedFile( new File("c:/test_CE.xml") ); + + int state = fc.showSaveDialog( null ); + + if ( state == JFileChooser.APPROVE_OPTION ) { + File file = fc.getSelectedFile(); + + try { + GuiControl.getInstance().printXML(file); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + removeHistory(); + + + } + else{ + System.out.println( "Dialog was closed" ); + } + }else{ + JOptionPane.showMessageDialog( null, "You have to use all elements! \"OtherElements\" node is not empty!" ); + } + } + + /** + * This method removes the history of this class + */ + public void removeHistory(){ + LoadControl loadControl=LoadControl.getInstance(); + loadControl.removeHistory(); + EndWindow end=new EndWindow(mainWindow); + + + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.java new file mode 100644 index 0000000000000000000000000000000000000000..c60ba81c2a34191fec771cff589b6401c1f72a3f --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/HelpButton.java @@ -0,0 +1,57 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import org.universaal.tools.configurationExtractor.view.Elements.Root; + +/** + * This class provides a information button for a root element. A programmer could write some help information for a user + * @author Ilja + * + */ +@SuppressWarnings("serial") +public class HelpButton extends JButton{ + String help; + String name; + Root root; + + public HelpButton(String name, Root root){ + super(name); + this.root=root; + this.name=name; + this.help=""; + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + setHelp(); + + } + } ); + String help = "Edit information about Use Case"; + this.setToolTipText(help); + } + + /** + * set or change a information about use case + */ + public void setHelp(){ + String h; + h=JOptionPane.showInputDialog( "Please add some information about Use Case" ,help ); + if(h!=null){ + this.help=h; + this.root.setHelp(h); + } + } + + /** + * Return the String with current information of use case + * @return + */ + public String getHelp(){ + return this.help; + } + + +} \ No newline at end of file diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.java new file mode 100644 index 0000000000000000000000000000000000000000..8c15855dbbdf5a62c9e886007cd86ec6f95e36cf --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportButton.java @@ -0,0 +1,111 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; +import javax.swing.filechooser.FileNameExtensionFilter; +import org.universaal.tools.configurationExtractor.controller.LoadControl; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; +import org.universaal.tools.configurationExtractor.model.xml.AnnotationsExtractor; + +/** + * + * @author Ilja + * This class provides a export button. Click on this button performs a export function of use case from directories + */ +@SuppressWarnings("serial") +public class ImportButton extends JButton { + private MainWindow mainWindow; + /** + * Constructor + */ + public ImportButton(MainWindow mainWindow){ + this.mainWindow=mainWindow; + ImageIcon openFromDirectoryIcon = new ImageIcon( Constants.OPEN_FROM_DIRECTORY_ICON ); + this.setIcon(openFromDirectoryIcon); + + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + if(isImported()){ + int ok = JOptionPane.showConfirmDialog(null,"Are you sure you want to create a new project? All actual data will be lost! !", + "Confirmation", JOptionPane.OK_CANCEL_OPTION); + if (ok == JOptionPane.YES_OPTION){ + clearView(); + LoadControl loadControl=LoadControl.getInstance(); + loadControl.removeHistory(); + makeImport(); + } + }else{ + makeImport(); + } + } + } ); + String help = "Open the Use Case from directories"; + this.setToolTipText( help ); + } + + /* + * This method return true, if user has already started with import + */ + private boolean isImported() { + return mainWindow.isImported(); + } + + /* + * After start of import the main window must be cleared + */ + private void clearView(){ + mainWindow.clearView(); + + } + + /* + * Helper method for import + */ + private void makeImport(){ + System.out.println("Import..."); + JFileChooser fc = new JFileChooser(); + fc.setDialogType(JFileChooser.OPEN_DIALOG); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + fc.setFileFilter( new FileNameExtensionFilter("Directory", "DIRECTORIES_ONLY") ); + + int state = fc.showOpenDialog( null ); + + if ( state == JFileChooser.APPROVE_OPTION ) { + File directory = fc.getSelectedFile(); + System.out.println( directory.getName() ); + AnnotationsExtractor annotationsExtractor= AnnotationsExtractor.getInstance(); + try { + annotationsExtractor.extract(directory); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + annotationsExtractor.initialize(); + if(LoadControl.getInstance().isRootFound()){ + mainWindow.importSuccesful(); + }else{ + setImportedToFalse(); + } + }else{ +// debug output + System.out.println( "Dialog was closed!" ); + setImportedToFalse(); + } + } + + /* + * Helper method, which ends with import + */ + private void setImportedToFalse() { + mainWindow.setImportedToFalse(); + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.java new file mode 100644 index 0000000000000000000000000000000000000000..bf4bba305c87e052457e139c74d1cd9a3a4b55bb --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/ImportFromWorkspaceButton.java @@ -0,0 +1,72 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import org.universaal.tools.configurationExtractor.controller.LoadControl; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; +import org.universaal.tools.configurationExtractor.view.MainPanels.WorkspaceWindow; + +/** + * + * @author Ilja + * This class provides another export button. Click on this button performs a export function of use case from workspace of eclipse. + */ +@SuppressWarnings("serial") +public class ImportFromWorkspaceButton extends JButton { + private MainWindow mainWindow; + + public ImportFromWorkspaceButton(MainWindow mainWindow){ + this.mainWindow=mainWindow; + + ImageIcon openFromWorkspaceIcon = new ImageIcon( Constants.OPEN_FROM_WORKSPACE_ICON ); + this.setIcon(openFromWorkspaceIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + + this.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + + if(isImported()){ + int ok = JOptionPane.showConfirmDialog(null,"Are you sure you want to create a new project? All actual data will be lost! !", + "Confirmation", JOptionPane.OK_CANCEL_OPTION); + if (ok == JOptionPane.YES_OPTION){ + clearView(); + LoadControl loadControl=LoadControl.getInstance(); + loadControl.removeHistory(); + makeImport(); + } + }else{ + makeImport(); + } + } + } ); + String help = "Open the Use Case from eclipse workspace"; + this.setToolTipText( help ); + + } + + /* + * Helper method, which calls a new window with a list of all workspace directories + */ + private void makeImport(){ + WorkspaceWindow wsw= new WorkspaceWindow("Open project from workspace", mainWindow); + } + /* + * This method return true, if user has already started with import + */ + private boolean isImported() { + return mainWindow.isImported(); + } + /* + * After start of import the main window must be cleared + */ + private void clearView(){ + mainWindow.clearView(); + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.java new file mode 100644 index 0000000000000000000000000000000000000000..b45849d80700180fe40497a0013acffac0bebf57 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForBigPanels.java @@ -0,0 +1,75 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.BoxLayout; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JPanel; +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class allowed to change two panels. + */ +@SuppressWarnings("serial") +public class NavigationButtonForBigPanels extends JPanel { + JButton top; + JButton down; + PanelWithElements parent = PanelWithElements.getInstance(); + ParentPanel element; + public NavigationButtonForBigPanels(ParentPanel element){ + this.element=element; + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + ImageIcon upIcon = new ImageIcon( Constants.ARROW_UP_PANEL_ICON ); + top=new JButton(upIcon); + top.setMargin(new java.awt.Insets(0, 0, 0, 0)); + top.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + changeWithTop(); + } + } ); + ImageIcon downIcon = new ImageIcon( Constants.ARROW_DOWN_PANEL_ICON ); + down=new JButton(downIcon); + down.setMargin(new java.awt.Insets(0, 0, 0, 0)); + down.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + changeWithDown(); + } + } ); + this.add(top); + this.add(down); + + String helpTop = "Change current panel with panel over!"; + top.setToolTipText(helpTop); + + String helpDown = "Change current panel with panel down!"; + down.setToolTipText(helpDown); + + } + + /* + * Change the current panel with one on the top + */ + private void changeWithTop(){ + int indexOfTop=parent.getParentsList().indexOf(element)-1; + if(indexOfTop >= 0){ + parent.changeTwoParentPanels(element,parent.getParentsList().get(indexOfTop)); + } + } + + /* + * Change the current panel with one on the down + */ + private void changeWithDown(){ + int indexOfDown=parent.getParentsList().indexOf(element)+1; + if(indexOfDown<parent.getParentsList().size()){ + parent.changeTwoParentPanels(element,parent.getParentsList().get(indexOfDown)); + } + } + +} + diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.java new file mode 100644 index 0000000000000000000000000000000000000000..6a6a54d9526b12cc751bcea53df4053c68bd6059 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/NavigationButtonForElements.java @@ -0,0 +1,88 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.BoxLayout; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +import org.universaal.tools.configurationExtractor.view.Elements.ListG; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class allowed to change two elements. + */ +@SuppressWarnings("serial") +public class NavigationButtonForElements extends JPanel { + JButton top; + JButton down; + ParentPanel parent; + BigElement element; + public NavigationButtonForElements(ParentPanel parent , BigElement element){ + this.parent=parent; + this.element=element; + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + ImageIcon upIcon = new ImageIcon( Constants.ARROW_UP_ELEMENT_ICON ); + top=new JButton(upIcon); + top.setMargin(new java.awt.Insets(0, 0, 0, 0)); + top.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + changeWithTop(); + } + } ); + ImageIcon downIcon = new ImageIcon( Constants.ARROW_DOWN_ELEMENT_ICON ); + down=new JButton(downIcon); + down.setMargin(new java.awt.Insets(0, 0, 0, 0)); + down.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + changeWithDown(); + } + } ); + this.add(top); + this.add(down); + + String helpTop = "Change current element with element over!"; + top.setToolTipText(helpTop); + + String helpDown = "Change current element with element down!"; + down.setToolTipText(helpDown); + } + + /* + * Change the current element with one on the top + */ + private void changeWithTop(){ + + int indexOfTop=parent.getElementsList().indexOf(element)-1; + if(indexOfTop >= 0 && !(parent.getElementsList().get(indexOfTop) instanceof ListG)){ + parent.changeTwoElements(element,parent.getElementsList().get(indexOfTop)); + }else if((parent.getElementsList().get(indexOfTop) instanceof ListG)){ + JOptionPane.showMessageDialog( null, "Sorry, but \"list\" has to be always on the top of \"listpanel\"" ); + } + } + + /* + * Change the current element with one on the down + */ + private void changeWithDown(){ + int indexOfDown=parent.getElementsList().indexOf(element)+1; + + if(indexOfDown<parent.getElementsList().size()){ + parent.changeTwoElements(element,parent.getElementsList().get(indexOfDown)); + } + } + + /** + * Set the parent panel + * @param p parent panel + */ + public void setParent(ParentPanel p){ + this.parent=p; + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.java new file mode 100644 index 0000000000000000000000000000000000000000..bd3f588c29da772e439aa0f7567e1af29956b3c6 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/RollButtons.java @@ -0,0 +1,74 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.BoxLayout; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JPanel; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class allowed to create two buttons to show and hide all elements of the parent panel. + */ +@SuppressWarnings("serial") +public class RollButtons extends JPanel{ + + + ParentPanel parent; + ImageIcon rollOpenIcon = new ImageIcon( Constants.ROLLOPEN_ELEMENTS_ICON ); + ImageIcon rollIcon = new ImageIcon( Constants.ROLL_ELEMENTS_ICON); + + /** + * Constructor method + */ + public RollButtons(ParentPanel parent){ + this.parent=parent; + this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); + JButton min= new JButton(rollOpenIcon); + JButton max= new JButton(rollIcon); + + String helpMax = "Show elements!"; + max.setToolTipText(helpMax); + + String helpMin = "Hide elements!"; + min.setToolTipText(helpMin); + + max.setMargin(new java.awt.Insets(0, 0, 0, 0)); + min.setMargin(new java.awt.Insets(0, 0, 0, 0)); + min.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + rollAllElements(); + } + } ); + max.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + rollOpenElements(); + } + } ); + + + this.add(min); + this.add(max); + + } + + /* + * hide all elements + */ + private void rollAllElements(){ + parent.rollElements(); + + /* + * Show all elements + */ + } + private void rollOpenElements(){ + parent.rollOpenElements(); + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.java new file mode 100644 index 0000000000000000000000000000000000000000..bfffcc0fa4f3b3f4af1c0105aaa166faa41e41c2 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Buttons/SwitchButton.java @@ -0,0 +1,83 @@ +package org.universaal.tools.configurationExtractor.view.Buttons; + + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JOptionPane; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.MainPanels.MainWindow; + +/** + * + * @author Ilja + * This class provides the button, which can change between two perspectives (Expert View and Normal View) + */ +@SuppressWarnings("serial") +public class SwitchButton extends JButton{ +private static boolean xmlPanelIsVisible=false; +private MainWindow mainWindow; +private ImageIcon expertModeIcon; +private ImageIcon normalModeIcon; + + /** + * Constructor method + * @param mainWindow + */ + public SwitchButton(MainWindow mainWindow){ + expertModeIcon = new ImageIcon( Constants.EXPERT_MODE_ICON ); + normalModeIcon = new ImageIcon( Constants.NORMAL_MODE_ICON ); + this.mainWindow=mainWindow; + this.setIcon(expertModeIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + this.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + switchPanels(); + + } + }); + String help = "Change to expert mode"; + this.setToolTipText( help ); + } + + /* + * Helper method for switching between perspectives + */ + private void switchPanels(){ + if(xmlPanelIsVisible){ + if(GuiControl.getInstance().xmlPanelChanged()){ + int ok = JOptionPane.showConfirmDialog(null,"Your changes will be lost if you will change to Normal_Mode!", + "Confirmation", JOptionPane.OK_CANCEL_OPTION); + if (ok == JOptionPane.YES_OPTION){ + mainWindow.makeXmlPanelInVisible(); + xmlPanelIsVisible=false; + this.setIcon(expertModeIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + String help = "Change to expert mode"; + this.setToolTipText( help ); + } + }else{ + mainWindow.makeXmlPanelInVisible(); + xmlPanelIsVisible=false; + this.setIcon(expertModeIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + String help = "Change to expert mode"; + this.setToolTipText( help ); + } + }else{ + mainWindow.makeXmlPanelVisible(); + xmlPanelIsVisible=true; + this.setIcon(normalModeIcon); + this.setMargin(new java.awt.Insets(0, 0, 0, 0)); + String help = "Change to normal mode"; + this.setToolTipText( help ); + } + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/BigElement.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/BigElement.java new file mode 100644 index 0000000000000000000000000000000000000000..cdeba59a148f0d0ddccfc2dd1710412b68b8b7b6 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/BigElement.java @@ -0,0 +1,139 @@ +package org.universaal.tools.configurationExtractor.view.Elements; + +import java.awt.Color; +import java.awt.Component; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.border.EtchedBorder; +import org.universaal.tools.configurationExtractor.view.Buttons.*; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class provides a BigElement instance, which symbolizes a abstract element (e.g. <elemet> or <list>) with all its attributes + */ +@SuppressWarnings("serial") +public class BigElement extends JPanel{ + + private ParentPanel parent; + private String title; + protected NavigationButtonForElements nb; + protected DeleteButtonForElements db; + + /** + * Constructor method + * @param title title of element + * @param parent parent panel of element(<panel> or <listpanel>) + */ + public BigElement(String title, ParentPanel parent){ + this.parent=parent; + this.title=title; + this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + this.setAlignmentX(Component.LEFT_ALIGNMENT); + this.setBorder(new EtchedBorder(Color.black, Color.black)); + nb= new NavigationButtonForElements(parent , this); + db= new DeleteButtonForElements(parent,this); + } + /** + * Get parent panel + * @return parent panel of element + */ + public ParentPanel getParentPanel(){ + return parent; + } + + /** + * Set parent panel of element + * @param p new parent panel of element + */ + public void setParentPanel(ParentPanel p){ + if(this.parent!=null){ + parent.deleteElement(this); + } + + this.parent=p; + nb.setParent(p); + db.setParent(p); + p.addElement(this); + } + + /** + * Clone the BigElement + * @return the copy of BigElement + */ + public BigElement cloneBigElement(){ + + BigElement cloneElement = this; + return cloneElement; + } + + /** + * Get title of element + * @return title of element + */ + public String getTitle(){ + return title; + } + /** + * Set new title + * @param input new title + */ + public void setTitle(String input){ + this.title=input; + } + + /** + * get type of element + * @return type of element + */ + public String getElementType(){ + return "Bigelement"; + } + + /** + * Get id + * @return id + */ + public String getId(){ + return "no Id"; + } + + /** + * Get type of GUI component + * @return + */ + public String getType(){ + return "no Type"; + } + /** + * Get standard value + * @return standard value + */ + public String getStandartV(){ + return "no standartV"; + } + /** + * Get limit + * @return limit + */ + public int getLimit(){ + return 0; + } + + /** + * Get domain + * @return domain + */ + public String getDomain(){ + return "no Domain"; + } + /** + * Get label + * @return label + */ + public String getLabel(){ + return "no Label"; + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ElementG.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ElementG.java new file mode 100644 index 0000000000000000000000000000000000000000..87eb4b8836e1496fd60c2c8daa50a6f32b53af20 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ElementG.java @@ -0,0 +1,278 @@ +package org.universaal.tools.configurationExtractor.view.Elements; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.border.EtchedBorder; +import org.universaal.tools.configurationExtractor.utility.Constants; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class provides a ElementG instance, which symbolizes a <element> with all its attributes + */ +@SuppressWarnings("serial") +public class ElementG extends BigElement { + private String type; + private String label; + private String standartV; + private String domain; + private String id; + private JPanel firstPanel; + private JPanel secondPanel; + private ParentPanel parent; + + /** + * Constructor + * @param type type of <element> + * @param label label of <element> + * @param title title of <element> + * @param standartV standard value of <element> + * @param domain domain of <element> + * @param id id of <element> + * @param parent parent panel of <element> + */ + public ElementG(String type, String label,String title, String standartV,String domain, String id, ParentPanel parent){ + super(title,parent); + this.type=type; + this.label=label; + this.standartV=standartV; + this.domain=domain; + this.id=id; + this.parent=parent; + + Color color= new Color(242,238,219); + this.setBorder(new EtchedBorder(Color.black,Color.black)); + JPanel mainPanel=new JPanel(); + mainPanel.setLayout( new BoxLayout(mainPanel, BoxLayout.X_AXIS) ); + mainPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.setBackground(color); + + firstPanel=new JPanel(); + firstPanel.setLayout( new BoxLayout(firstPanel, BoxLayout.X_AXIS) ); + firstPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + firstPanel.setBackground(color); + + secondPanel=new JPanel(); + secondPanel.setLayout( new BoxLayout(secondPanel, BoxLayout.X_AXIS) ); + secondPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + secondPanel.setBackground(color); + + JLabel jl=new JLabel("<Element>"); + + mainPanel.add(Box.createHorizontalStrut(55)); + mainPanel.add(jl); + + mainPanel.add(Box.createHorizontalStrut(52)); + + JLabel idLabel=new JLabel("ID: "+id); + idLabel.setFont(new Font("Arial", Font.BOLD, 12)); + JPanel idPanel=new JPanel(); + idPanel.setBackground(color); + idPanel.setLayout( new BoxLayout(idPanel, BoxLayout.X_AXIS) ); + idPanel.setMaximumSize(new Dimension(400,50)); + idPanel.add(idLabel); + mainPanel.add(idPanel); + + mainPanel.add(Box.createHorizontalStrut(150)); + mainPanel.add(nb); + mainPanel.add(Box.createHorizontalStrut(30)); + + ImageIcon minimize = new ImageIcon( Constants.MINIMIZE_ELEMENT_ICON ); + JButton min=new JButton(minimize); + min.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + min.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + toMinimize(); + } + } ); + + mainPanel.add(min); + ImageIcon maximize = new ImageIcon( Constants.MAXIMIZE_ELEMENT_ICON ); + JButton max=new JButton(maximize); + max.setMargin(new java.awt.Insets(0, 0, 0, 0)); + max.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + toMaximize(); + } + } ); + + mainPanel.add(max); + String helpMax = "Show parameters!"; + max.setToolTipText(helpMax); + + String helpMin = "Hide parameters!"; + min.setToolTipText(helpMin); + mainPanel.add(db); + + firstPanel.add(Box.createRigidArea(new Dimension(167,0))); + + + JLabel jLabel=new JLabel("Label: "); + firstPanel.add(jLabel); + firstPanel.add(Box.createRigidArea(new Dimension(51,0))); + + final JTextField textLabel=new JTextField(label); + textLabel.setMaximumSize(new Dimension(150,25)); + + ActionListener labelListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=textLabel.getText(); + setLabel(input); + + } }; + textLabel.addActionListener(labelListener); + + firstPanel.add(textLabel); + firstPanel.add(Box.createRigidArea(new Dimension(40,0))); + + JLabel jHoverText=new JLabel("Hover Text: "); + firstPanel.add(jHoverText); + firstPanel.add(Box.createRigidArea(new Dimension(10,0))); + final JTextField textHoverLabel=new JTextField(super.getTitle()); + textHoverLabel.setMaximumSize(new Dimension(150,25)); + + ActionListener textHoverListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=textHoverLabel.getText(); + setTitle(input); + + } }; + textHoverLabel.addActionListener(textHoverListener); + firstPanel.add(textHoverLabel); + firstPanel.add(Box.createRigidArea(new Dimension(20,0))); + String typeSplit[]= type.split("\\."); + String typeEnd=typeSplit[typeSplit.length-1]; + firstPanel.add(new JLabel("Type: "+typeEnd)); + + secondPanel.add(Box.createRigidArea(new Dimension(165,0))); + + JLabel jstandartV=new JLabel("Standart Value: "); + secondPanel.add(jstandartV); + final JTextField textstandartV=new JTextField(standartV); + textstandartV.setMaximumSize(new Dimension(150,25)); + + ActionListener standardValueListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=textstandartV.getText(); + setStandardV(input); + + } }; + textstandartV.addActionListener(standardValueListener); + + secondPanel.add(textstandartV); + + secondPanel.add(Box.createRigidArea(new Dimension(40,0))); + + String split[]= domain.split("/"); + String domainEnd=split[split.length-1]; + secondPanel.add(new JLabel("Domain: "+domainEnd)); + + secondPanel.add(Box.createRigidArea(new Dimension(164,0))); + + this.add(mainPanel); + this.add(firstPanel); + this.add(secondPanel); + + mainPanel.setMaximumSize(new Dimension(900,35)); + firstPanel.setMaximumSize(new Dimension(900,35)); + secondPanel.setMaximumSize(new Dimension(900,35)); + firstPanel.setVisible(false); + secondPanel.setVisible(false); + } + + /** + * Hide all subpanels + */ + public void toMinimize(){ + firstPanel.setVisible(false); + secondPanel.setVisible(false); + } + + /** + * Show all subpanels + */ + public void toMaximize(){ + firstPanel.setVisible(true); + secondPanel.setVisible(true); + } + + /** + * get type of element + * @return type of element + */ + @Override + public String getElementType(){ + return "Element"; + } + /** + * Get id + */ + @Override + public String getId(){ + return id; + } + /** + * Get title + */ + @Override + public String getTitle(){ + return getId(); + } + /** + * Get type of GUI component + */ + @Override + public String getType(){ + return type; + } + /** + * Get standard value + */ + @Override + public String getStandartV(){ + return standartV; + } + /* + * Set standard value + */ + private void setStandardV(String input){ + this.standartV=input; + } + /** + * Get domain + */ + @Override + public String getDomain(){ + return domain; + } + /** + * Get label + */ + @Override + public String getLabel(){ + return label; + } + + /* + * Set label + */ + private void setLabel(String input){ + this.label=input; + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListG.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListG.java new file mode 100644 index 0000000000000000000000000000000000000000..6e4dfdfaaf90fee70887200a99bbed17913bb356 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListG.java @@ -0,0 +1,201 @@ +package org.universaal.tools.configurationExtractor.view.Elements; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.DecimalFormat; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JFormattedTextField; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.border.EtchedBorder; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; + +/** + * + * @author Ilja + * This class provides a ListG instance, which symbolizes a <list> with all its attributes + */ +@SuppressWarnings("serial") +public class ListG extends BigElement { + private String label; + private int limit; + private int initialLimit; + private String domain; + private JPanel firstPanel; + private JPanel secondPanel; + + /** + * Constructor + * @param label label of <list> + * @param title title of <list> + * @param limit limit of <list> + * @param domain domain of <list> + * @param parent parent panel of <list> + */ + public ListG(String label,String title, int limit,String domain,ParentPanel parent){ + super(title,parent); + this.label=label; + this.limit=limit; + this.initialLimit=limit; + this.domain=domain; + Color color = new Color(238,252,226); + this.setBackground(color); + this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + this.setBorder(new EtchedBorder(Color.black,Color.black)); + + firstPanel=new JPanel(); + firstPanel.setLayout( new BoxLayout(firstPanel, BoxLayout.X_AXIS) ); + firstPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + firstPanel.setBackground(color); + secondPanel=new JPanel(); + secondPanel.setLayout( new BoxLayout(secondPanel, BoxLayout.X_AXIS) ); + secondPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + secondPanel.setBackground(color); + + JLabel jl=new JLabel("<List>"); + firstPanel.add(Box.createRigidArea(new Dimension(60,0))); + firstPanel.add(jl); + firstPanel.add(Box.createRigidArea(new Dimension(72,0))); + + firstPanel.add(new JLabel("Label: ")); + firstPanel.add(Box.createRigidArea(new Dimension(51,0))); + final JTextField textLabel=new JTextField(""+label); + textLabel.setMaximumSize(new Dimension(150,25)); + + ActionListener labelListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=textLabel.getText(); + setLabel(input); + + } }; + textLabel.addActionListener(labelListener); + + firstPanel.add(textLabel); + + firstPanel.add(Box.createRigidArea(new Dimension(39,0))); + + firstPanel.add(new JLabel("Hover Text: ")); + firstPanel.add(Box.createRigidArea(new Dimension(10,0))); + final JTextField textHoverLabel=new JTextField(""+title); + + ActionListener textHoverListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=textHoverLabel.getText(); + setTitle(input); + + } }; + textHoverLabel.addActionListener(textHoverListener); + + firstPanel.add(textHoverLabel); + textHoverLabel.setMaximumSize(new Dimension(150,25)); + + secondPanel.add(Box.createRigidArea(new Dimension(167,0))); + secondPanel.add(new JLabel("Limit: ")); + secondPanel.add(Box.createRigidArea(new Dimension(54,0))); + final JFormattedTextField jt=new JFormattedTextField( + new DecimalFormat("#") ); + jt.setValue(limit); + jt.setMaximumSize(new Dimension(30,25)); + + jt.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input =((JFormattedTextField)e.getSource()).getText().toString(); + int inp=Integer.parseInt(input); + if (inp < -1){ + JOptionPane.showMessageDialog( null, "Sorry, but limit has to be equal or greater as -1!" ); + jt.setValue(initialLimit); + } + + } }); + secondPanel.add(jt); + secondPanel.add(Box.createRigidArea(new Dimension(159,0))); + + String split[]= domain.split("/"); + String domainEnd=split[split.length-1]; + + JLabel domainLabel=new JLabel("Domain: "); + + secondPanel.add(domainLabel); + secondPanel.add(new JLabel(""+domainEnd)); + + this.add(Box.createRigidArea(new Dimension(0,2))); + this.add(firstPanel); + this.add(Box.createRigidArea(new Dimension(0,8))); + this.add(secondPanel); + this.setMaximumSize(new Dimension(904,55)); + } + + + /** + * get type of element + * @return type of element + */ + @Override + public String getElementType(){ + return "List"; + } + /** + * Get title + */ + @Override + public String getTitle(){ + return getLabel(); + } + /** + * Get limit + */ + @Override + public int getLimit(){ + return limit; + } + /** + * Set limit + * @param newLimit new limit + */ + public void setLimit(int newLimit){ + this.limit= newLimit; + } + /** + * Get domain + */ + @Override + public String getDomain(){ + return domain; + } + /** + * Get label + */ + @Override + public String getLabel(){ + return label; + } + /** + * Set label + * @param input new label + */ + private void setLabel(String input){ + this.label=input; + } + /** + * + * Hide all subpanels + */ + public void toMinimize(){ + secondPanel.setVisible(false); + } + /** + * Show all subpanels + */ + public void toMaximize(){ + secondPanel.setVisible(true); + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..82b1ae35ee27fb13bf800e48f7ffd7754db59036 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/ListPanel.java @@ -0,0 +1,80 @@ +package org.universaal.tools.configurationExtractor.view.Elements; +import org.universaal.tools.configurationExtractor.view.Buttons.*; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.ParentPanel; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.border.EtchedBorder; + +/** + * + * @author Ilja + * This class is the part of whole listpanel(without <list> and <elements>) + */ +@SuppressWarnings("serial") +public class ListPanel extends JPanel { + private String title; + private String id; + private ParentPanel parent; + private RollButtons rb; + + /** + * Constructor + * @param title title of <listpanel> + * @param id id of <listpanel> + * @param parent parent panel of <listpanel> + */ + public ListPanel(String title, String id , ParentPanel parent){ + this.parent=parent; + this.title= title; + this.id=id; + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + this.setAlignmentX(Component.LEFT_ALIGNMENT); + this.setBorder(new EtchedBorder(Color.blue, Color.yellow)); + Color color= new Color(205,233,202); + this.setBackground(color); + + JLabel jl=new JLabel("<Listpanel>"); + + this.add(Box.createRigidArea(new Dimension(40,0))); + this.add(jl); + JLabel idLabel=new JLabel("ID: "+id); + idLabel.setFont(new Font("Arial", Font.BOLD, 13)); + JPanel idPanel=new JPanel(); + idPanel.setBackground(color); + idPanel.setLayout( new BoxLayout(idPanel, BoxLayout.X_AXIS) ); + idPanel.setMaximumSize(new Dimension(400,50)); + idPanel.add(idLabel); + this.add(Box.createRigidArea(new Dimension(61,0))); + this.add(idPanel); + this.add(Box.createRigidArea(new Dimension(125,0))); + NavigationButtonForBigPanels nb= new NavigationButtonForBigPanels(parent); + this.add(nb); + this.add(Box.createRigidArea(new Dimension(30,0))); + rb= new RollButtons(parent); + this.add(rb); + this.setMaximumSize(new Dimension(904,50)); + } + + /** + * Get id of <listpanel> + * @return id + */ + public String getId(){ + return id; + } + /** + * Get title of <listpanel> + * @return title + */ + public String getTitle(){ + return title; + } + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/PanelG.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/PanelG.java new file mode 100644 index 0000000000000000000000000000000000000000..a14e26c6882d4e199eaeb4755465f1f1f8f91651 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/PanelG.java @@ -0,0 +1,84 @@ +package org.universaal.tools.configurationExtractor.view.Elements; +import org.universaal.tools.configurationExtractor.view.Buttons.*; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigPanel; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.border.EtchedBorder; + +/** + * + * @author Ilja + * This class symbolizes the <panel> element (without its <elements>) + */ +@SuppressWarnings("serial") +public class PanelG extends JPanel { + String title; + BigPanel parent; + public PanelG(String title , BigPanel parent){ + this.parent=parent; + this.title=title; + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + this.setAlignmentX(Component.LEFT_ALIGNMENT); + this.setBorder(new EtchedBorder(Color.blue, Color.yellow)); + Color color= new Color(219,230,236); + this.setBackground(color); + JLabel jl=new JLabel("<Panel>"); + this.add(Box.createRigidArea(new Dimension(40,0))); + this.add(jl); + this.add(Box.createRigidArea(new Dimension(79,0))); + + JLabel jTitle=new JLabel("Title: "); + jTitle.setFont(new Font("Arial", Font.BOLD, 13)); + this.add(jTitle); + final JTextField titleField=new JTextField(title); + titleField.setFont(new Font("Arial", Font.BOLD, 13)); + titleField.setMaximumSize(new Dimension(150,25)); + + ActionListener titleFieldListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=titleField.getText(); + setTitle(input); + + } }; + titleField.addActionListener(titleFieldListener); + + this.add(Box.createRigidArea(new Dimension(55,0))); + this.add(titleField); + this.add(Box.createRigidArea(new Dimension(285,0))); + + NavigationButtonForBigPanels nb= new NavigationButtonForBigPanels(parent); + this.add(nb); + + this.add(Box.createRigidArea(new Dimension(30,0))); + RollButtons rb= new RollButtons(parent); + this.add(rb); + DeleteButtonForPanel db= new DeleteButtonForPanel(parent); + this.add(db); + this.setMaximumSize(new Dimension(904,50)); + + } + /** + * Get title of <panel> + * @return + */ + public String getTitle(){ + return title; + } + /* + * Set a new title to <panel> + */ + private void setTitle(String input){ + parent.setTitle(input); + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Panels.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Panels.java new file mode 100644 index 0000000000000000000000000000000000000000..256ad3350bf40d78df5e747312a99dce5aad7daa --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Panels.java @@ -0,0 +1,35 @@ +package org.universaal.tools.configurationExtractor.view.Elements; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.border.EtchedBorder; + +/** + * + * @author Ilja + * This class provides a special <panels> element, which contains all <panel> and <listpanel> elements + */ +@SuppressWarnings("serial") +public class Panels extends JPanel { + /** + * Constructor + */ + public Panels(){ + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + this.setAlignmentX(Component.LEFT_ALIGNMENT); + this.setBorder(new EtchedBorder(Color.LIGHT_GRAY, Color.LIGHT_GRAY)); + JLabel jl=new JLabel("<Panels>"); + this.add(Box.createRigidArea(new Dimension(20,0))); + this.add(jl); + this.setMaximumSize(new Dimension(918,25)); + Color color= new Color(230,233,220); + this.setBackground(color); + } + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Root.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Root.java new file mode 100644 index 0000000000000000000000000000000000000000..88fe513dc584394840fd0dedd6dfbb6a39d70d68 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/Elements/Root.java @@ -0,0 +1,151 @@ +package org.universaal.tools.configurationExtractor.view.Elements; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.border.EtchedBorder; +import org.universaal.tools.configurationExtractor.view.Buttons.HelpButton; +/** + * + * @author Ilja + * The <root> element describes a important information about use case + */ +@SuppressWarnings("serial") +public class Root extends JPanel { + private String name; + private String title; + private String help; + private String id; + + /** + * Constructor + * @param id id of use case + * @param name of use case + * @param title of use case + * @param help help information about use case + */ + public Root(String id ,String name, String title, String help){ + this.name=name; + this.help=help; + this.title=title; + this.id=id; + + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + this.setAlignmentX(Component.LEFT_ALIGNMENT); + this.setBorder(new EtchedBorder(Color.LIGHT_GRAY, Color.LIGHT_GRAY)); + this.setMaximumSize(new Dimension(918,30)); + Color color= new Color(228,221,250); + this.setBackground(color); + + JLabel jl=new JLabel("<Root>"); + + this.add(jl); + this.add(Box.createRigidArea(new Dimension(133,0))); + JLabel titleLabel=new JLabel("Title: "); + titleLabel.setFont(new Font("Arial", Font.BOLD, 13)); + this.add(titleLabel); + final JTextField titleField=new JTextField(title); + titleField.setFont(new Font("Arial", Font.BOLD, 13)); + titleField.setMaximumSize(new Dimension(200,25)); + titleField.setMinimumSize(new Dimension(200,25)); + + ActionListener fieldListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=titleField.getText(); + setTitle(input); + + } }; + titleField.addActionListener(fieldListener); + + this.add(titleField); + this.add(Box.createRigidArea(new Dimension(50,0))); + JLabel nameLabel=new JLabel("Name: "); + nameLabel.setFont(new Font("Arial", Font.BOLD, 13)); + this.add(nameLabel); + final JTextField nameField=new JTextField(name); + nameField.setFont(new Font("Arial", Font.BOLD, 13)); + nameField.setMaximumSize(new Dimension(200,25)); + nameField.setMinimumSize(new Dimension(200,25)); + + ActionListener nameListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String input=nameField.getText(); + changeName(input); + + } }; + nameField.addActionListener(nameListener); + this.add(nameField); + this.add(Box.createRigidArea(new Dimension(98,0))); + + HelpButton h= new HelpButton("info",this); + this.add(h); + } + + /** + * Get name + * @return name of use case + */ + public String getName(){ + return name; + } + /* + * change name of use case + */ + private void changeName(String input){ + this.name=input; + } + /** + * Get if of use case + * @return id + */ + public String getId(){ + return id; + } + /** + * Set id of use case + * @param newId new id + */ + public void setId(String newId){ + this.id=newId; + } + + /** + * Get title of use case + * @return title + */ + public String getTitle(){ + return title; + } + /** + * Set title of use case + * @param newTitle new title of use case + */ + public void setTitle(String newTitle){ + title=newTitle; + } + /** + * Get current help information of use case + * @return current help information + */ + public String getHelp(){ + return help; + } + /** + * Set new help information of use case + * @param s new help information + */ + public void setHelp(String s){ + this.help=s; + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..c924f214755bbbf728216360fbf2c79868f9cad8 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigListPanel.java @@ -0,0 +1,77 @@ +package org.universaal.tools.configurationExtractor.view.LowLevelPanels; + +import java.awt.Color; +import javax.swing.BorderFactory; +import javax.swing.tree.DefaultMutableTreeNode; +import org.universaal.tools.configurationExtractor.model.xml.PanelWithElements; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.view.Elements.ListG; +import org.universaal.tools.configurationExtractor.view.Elements.ListPanel; + +/** + * + * @author Ilja + * BigListPanel provides a <listpanel> element with all its elements. + */ +@SuppressWarnings("serial") +public class BigListPanel extends ParentPanel { + private GuiControl guiControl = GuiControl.getInstance(); + private String id; + private PanelWithElements panelWithElements; + private ListG list; + + /** + * Constructor + * @param title of <list> + * @param id of <listpanel> + * @param label of <list> + * @param limit of <list> + * @param uRI of <list> + */ + public BigListPanel(String title , String id ,String label,int limit,String uRI){ + super(title); + this.id=id; + this.title=title; + ListPanel lp=new ListPanel(title,id,this); + this.add(lp); + this.panelWithElements=PanelWithElements.getInstance(); + list = new ListG(label,title,limit,uRI,this); + this.addElement(list); + Color lightGreen = new Color(145,237,162); + this.setBorder(BorderFactory.createLineBorder(lightGreen,7)); + } + + /** + * This method adds a list leaf to listpanel in the tree perspective + */ + public void addListLeaf(){ + DefaultMutableTreeNode child=new DefaultMutableTreeNode(list.getElementType() +" "+ list.getTitle()); + guiControl.addLeaf(child, panelWithElements.getNode(title)); + } + + /** + * Get title of <listpanel> (title of listpanel = id of listpanel) + * @return title + */ + @Override + public String getTitle(){ + return getId(); + } + + /** + * Get id of listpanel + * @return id + */ + public String getId(){ + return id; + } + + /** + * Get type of panel + * @return type of panel + */ + @Override + public String getTypeOfPanel(){ + return "Listpanel "; + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..313daf55bfc3f82e106e8478b9f36533e24d6dd3 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigPanel.java @@ -0,0 +1,55 @@ +package org.universaal.tools.configurationExtractor.view.LowLevelPanels; + +import java.awt.Color; +import javax.swing.BorderFactory; +import org.universaal.tools.configurationExtractor.view.Elements.PanelG; + +/** + * + * @author Ilja + * This class provides <panel> element with all its <elements> + */ +@SuppressWarnings("serial") +public class BigPanel extends ParentPanel { + + private String title; + /** + * Constructor + * @param title title of <panel> + */ + public BigPanel(String title){ + super(title); + this.title=title; + PanelG p=new PanelG(title,this); + this.add(p); + Color lightBlue = new Color(161,190,230); + this.setBorder(BorderFactory.createLineBorder(lightBlue,7)); + } + + /** + * Get type of panel + * @return type of panel + */ + @Override + public String getTypeOfPanel(){ + return "Panel "; + } + + /** + * Get title of <panel> + * @return title of <panel> + */ + @Override + public String getTitle(){ + return title; + } + /** + * Set new title of <panel> + * @param input new title + */ + public void setTitle(String input){ + this.title=input; + changeTitleOfNode(input,getTypeOfPanel()); + + } +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..64fd2246fc804c5f1c1158062c0871f79ef80163 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/BigRootPanel.java @@ -0,0 +1,111 @@ +package org.universaal.tools.configurationExtractor.view.LowLevelPanels; + +import java.awt.Color; + +import java.util.LinkedList; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JPanel; + +import org.universaal.tools.configurationExtractor.view.Elements.Panels; +import org.universaal.tools.configurationExtractor.view.Elements.Root; + +@SuppressWarnings("serial") +public class BigRootPanel extends JPanel { + +private static final BigRootPanel bRP =new BigRootPanel(); +private LinkedList <ParentPanel> parentPanels = new LinkedList<ParentPanel>(); +private Root root; +private Panels panels; + /** + * Constructor is private because of singleton implementation of this class + */ + private BigRootPanel(){ + super.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + this.setBorder(BorderFactory.createLineBorder(Color.BLACK,3)); + } + /** + * get <root> + * @return Root of use case + */ + public Root getRoot(){ + return bRP.root; + } + + /** + * Set <root> + * @param r instance of Root + */ + public void setRoot(Root r){ + root=r; + root.setVisible(false); + this.add(root); + root.setVisible(true); + panels=new Panels(); + this.add(panels); + } + /** + * Delete root. This method will be needed for removing all history of CE + */ + public void removeRoot(){ + this.remove(this.root); + this.root=null; + this.remove(panels); + this.panels=null; + } + /** + * Add new parent panel + * @param p parent panel + */ + public void addParentPanel(ParentPanel p){ + bRP.add(p); + p.setVisible(false); + p.setVisible(true); + } + /** + * Remove given parent panel + * @param parent panel, which will be deleted + */ + public void deleteParentPanel(ParentPanel parent){ + parent.setVisible(false); + bRP.remove(parent); + } + + /** + * Refreshing of all parent panels + * @param pPanels list with all parent panels + */ + public void refresh(LinkedList <ParentPanel> pPanels){ + parentPanels= pPanels; + + for(int i=0;i<parentPanels.size();i++){ + bRP.remove(parentPanels.get(i)); + } + for(int i=0;i<parentPanels.size();i++){ + bRP.add(parentPanels.get(i)); + } + for(int i=0;i<parentPanels.size();i++){ + parentPanels.get(i).setVisible(false); + } + for(int i=0;i<parentPanels.size();i++){ + parentPanels.get(i).setVisible(true); + } + } + + /** + * Typical singleton method + * @return + */ + public static BigRootPanel getInstance(){ + return bRP; + } + + + + + + + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..c17b10e0d561fd6f799a5534bf02cd866fef1d03 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/LowLevelPanels/ParentPanel.java @@ -0,0 +1,188 @@ +package org.universaal.tools.configurationExtractor.view.LowLevelPanels; + +import java.awt.Color; +import java.util.Iterator; +import java.util.LinkedList; +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeModel; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.controller.MainPanelControl; + +import org.universaal.tools.configurationExtractor.view.Elements.BigElement; +/** + * + * @author Ilja + * This class is provides a ParentPanel instance, which could be <panel> or <listpanel> element. + */ +@SuppressWarnings("serial") +public class ParentPanel extends JPanel { + private GuiControl guiControl = GuiControl.getInstance(); + private LinkedList <BigElement> elements = new LinkedList<BigElement>(); + protected String title; + private MainPanelControl mpControl= MainPanelControl.getInstance(); + /** + * Constructor + * @param title of parent panel + */ + public ParentPanel(String title){ + super.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + this.title=title; + this.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY,7)); + } + + /** + * Add given BigElement to the parent panel + * @param el BigElement, which will be added to the parent panel + */ + public void addElement(BigElement el){ + this.add(el); + elements.add(el); + refresh(); +// debug output +// System.out.println("size after ADD is:"+elements.size()); + + + } + /** + * Delete given BigElement from the parent panel + * @param el BigElement + */ + public void deleteElement(BigElement el){ + + this.remove(el); + elements.remove(el); + refresh(); +// debug output +// System.out.println("size after DELETE is:"+elements.size()); + } + /** + * Hide all "children" of parent panel + */ + public void rollElements(){ + for(int i=0;i<elements.size();i++){ + elements.get(i).setVisible(false); + } + } + /** + * Show all "children" of parent panel + */ + public void rollOpenElements(){ + for(int i=0;i<elements.size();i++){ + elements.get(i).setVisible(true); + } + } + + /** + * Refresh all "children" of parent panel + */ + private void refresh(){ + for(int i=0;i<elements.size();i++){ + this.remove(elements.get(i)); + } + for(int i=0;i<elements.size();i++){ + this.add(elements.get(i)); + } + for(int i=0;i<elements.size();i++){ + elements.get(i).setVisible(false); + } + for(int i=0;i<elements.size();i++){ + elements.get(i).setVisible(true); + } + } + /** + * Change the places of two children + * @param e1 first element + * @param e2 second element + */ + public void changeTwoElements(BigElement e1 , BigElement e2){ + mpControl= MainPanelControl.getInstance(); + e1.setVisible(false); + e2.setVisible(false); + BigElement help=e1.cloneBigElement(); + + int indexOfFirst=elements.indexOf(e1); + int indexOfSecond=elements.indexOf(e2); + + elements.set(indexOfFirst, e2); + + elements.set(indexOfSecond, help); + e1.setVisible(true); + e2.setVisible(true); + refresh(); + TreeModel treeModel= guiControl.getTree().getModel(); + DefaultMutableTreeNode parent =mpControl.getNode(getTitle()); + DefaultMutableTreeNode leaf1=(DefaultMutableTreeNode) treeModel.getChild(parent, indexOfFirst); + DefaultMutableTreeNode leaf2=(DefaultMutableTreeNode) treeModel.getChild(parent, indexOfSecond); + int index1= treeModel.getIndexOfChild(parent, leaf1); + int index2= treeModel.getIndexOfChild(parent, leaf2); + guiControl.removeNode(leaf1); + guiControl.addLeafWithIndex(leaf1,parent, index2); + guiControl.removeNode(leaf2); + guiControl.addLeafWithIndex(leaf2,parent ,index1); + + } + /** + * Get the list with all children of the parent panel + * @return list with children of parent panel + */ + public LinkedList <BigElement> getElementsList(){ + return elements; + } + /** + * ------------------------------------------------------------------------------------ + * Find the element with special title + * @param node title of element + * @return return the element with given title.otherwise return null + */ + public BigElement findBigElement (String node){ + Iterator<BigElement> itr = elements.iterator(); + while (itr.hasNext()) { + BigElement element = itr.next(); + if(("Element "+element.getTitle()).equals(node)){ + return element; + } + } +// debug output + System.out.println("element named "+node+" wasnt found!"); + return null; + } + + /** + * Make a copy of parent panel + * @return copy of parent panel + */ + public ParentPanel cloneParentPanel(){ + + ParentPanel cloneParentPanel = this; + return cloneParentPanel; + } + /** + * Get title of parent panel + * @return title + */ + public String getTitle(){ + return title; + } + /** + * Change title of node <panel> in the tree perspective + * @param input new title + * @param type type of parent panel + */ + public void changeTitleOfNode(String input, String type){ + mpControl= MainPanelControl.getInstance(); + DefaultMutableTreeNode node= mpControl.getNode(title); + mpControl.changeNameOfNode(node,input,type); + + } + /** + * Get type of parent panel + * @return type of parent panel + */ + public String getTypeOfPanel(){ + return "ParentPanel"; + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..e65f27c58d63b73724b9cfb5b1cab781176fc2c5 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/CentralPanel.java @@ -0,0 +1,42 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + + +import java.awt.Color; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import org.universaal.tools.configurationExtractor.view.LowLevelPanels.BigRootPanel; + +/** + * + * @author Ilja + * This panel contains a XML related view (normal mode) of current configuration. + */ +@SuppressWarnings("serial") +public class CentralPanel extends JPanel{ + /** + * Constructor + */ + public CentralPanel(){ + this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + init(); + } + /* + * Helper method for initializing of central panel + */ + private void init(){ + JPanel cPanel=new JPanel(); + cPanel.setLayout( new BoxLayout(cPanel, BoxLayout.Y_AXIS) ); + JLabel jl =new JLabel("Configuration-Panel"); + jl.setBackground(Color.DARK_GRAY); + cPanel.add(jl); + BigRootPanel bigRootPanel= BigRootPanel.getInstance(); + cPanel.add(bigRootPanel); + JScrollPane cP= new JScrollPane(); + cP.setViewportView(cPanel); + this.add(cP); + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.java new file mode 100644 index 0000000000000000000000000000000000000000..8939436d1b9965aa4732657f117ee60327ef25a4 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/EndWindow.java @@ -0,0 +1,39 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.Dimension; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; + + +/** + * + * @author Ilja + * The goodbye frame of CE + */ +@SuppressWarnings("serial") +public class EndWindow extends JFrame { + + private MainWindow mainWindow; + /** + * Constructor + * @param mainWindow + */ + public EndWindow(MainWindow mainWindow){ + super.setTitle("Goodbye!"); + this.mainWindow=mainWindow; + mainWindow.setVisible(false); + Dimension d = new Dimension(300,100); + this.setSize(d); + Container pane=this.getContentPane(); + JLabel jl=new JLabel("Thank you for using \"Configuration Extractor\"!"); + JPanel panel=new JPanel(); + panel.add(jl,BorderLayout.NORTH); + pane.add(panel); + this.setVisible(true); + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.java new file mode 100644 index 0000000000000000000000000000000000000000..c6e6e9d7f9ea5ccc3e67d4a3961a07da55fbbcb3 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/MainWindow.java @@ -0,0 +1,129 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Toolkit; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import javax.swing.JFrame; +import org.universaal.tools.configurationExtractor.controller.LoadControl; + +/** + * + * @author Ilja + * The main frame which contains all views and functions of CE + */ +@SuppressWarnings("serial") +public class MainWindow extends JFrame{ + + private XMLPanel xmlPanel; + private TreePanel treePanel; + private CentralPanel cp; + private Container pane; + private boolean imported=false; + private UpPanel up; + + /** + * Constructor + * @param name title of frame + */ + public MainWindow(String name){ + super(name); + Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); + this.setPreferredSize(d); + pane=this.getContentPane(); + pane.setLayout(new BorderLayout()); + init(); + this.pack(); + + WindowListener windowListener = new WindowAdapter() { + public void windowClosing( WindowEvent event ) { + if(imported){ + cp.setVisible(false); + treePanel.setVisible(false); + LoadControl loadControl=LoadControl.getInstance(); + loadControl.removeHistory(); + imported=false; + + } + } + }; + this.addWindowListener(windowListener); + } + /* + * Helper method for initialization of frame + */ + private void init(){ + cp = new CentralPanel(); + pane.add(cp,BorderLayout.CENTER); + cp.setVisible(false); + up=new UpPanel(this); + pane.add(up,BorderLayout.NORTH); + xmlPanel = XMLPanel.getInstance(); + pane.add(xmlPanel,BorderLayout.LINE_END); + xmlPanel.setVisible(false); + treePanel=new TreePanel(); + treePanel.setVisible(false); + pane.add(treePanel,BorderLayout.LINE_START); + imported=false; + } + + /** + * This method makes a GUI clear. Only import buttons are available. + */ + public void clearView(){ + cp.setVisible(false); + treePanel.setVisible(false); + up.setButtonsNotEnabled(); + } + + /** + * This method will be called after successful import of use case. + */ + public void importSuccesful(){ + cp.setVisible(true); + treePanel.setVisible(false); + treePanel=new TreePanel(); + pane.add(treePanel,BorderLayout.LINE_START); + treePanel.setVisible(true); + imported=true; + up.setButtonsEnabled(); + } + /** + * Checks whether import was successful performed + * @return true if import was successful,otherwise returns false. + */ + public boolean isImported(){ + return imported; + } + /** + * Set import to false + */ + public void setImportedToFalse(){ + imported=false; + } + + /** + * Makes XML Editor visible and Central Panel invisible + */ + public void makeXmlPanelVisible(){ + cp.setVisible(false); + pane.add(xmlPanel,BorderLayout.CENTER); + xmlPanel.refresh(); + xmlPanel.setVisible(true); + + } + + /** + * Makes XML Editor invisible and Central Panel visible + */ + public void makeXmlPanelInVisible(){ + xmlPanel.setVisible(false); + pane.add(cp,BorderLayout.CENTER); + cp.setVisible(true); + } + + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.java new file mode 100644 index 0000000000000000000000000000000000000000..4e3705e11f7440f4624d80e7d33226a2843be674 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/TreePanel.java @@ -0,0 +1,38 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; +import java.awt.Color; +import java.awt.Dimension; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTree; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +/** + * + * @author Ilja + * This class provides a tree view of current configuration implemented as singleton. + */ +@SuppressWarnings("serial") +public class TreePanel extends JPanel{ + private JTree tree; + + /** + * Constructor + */ + public TreePanel(){ + + this.setPreferredSize(new Dimension(300, 100)); + this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + + JLabel jt =new JLabel("Tree-Panel"); + jt.setBackground(Color.DARK_GRAY); + this.add(jt); + + tree=GuiControl.getInstance().getTree(); + + JScrollPane jp= new JScrollPane(tree); + this.add(jp); + + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..a9c1bd9cfafc9f11bee66fbb10021e4e3c5a59f6 --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/UpPanel.java @@ -0,0 +1,76 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + +import java.awt.Color; +import java.awt.Dimension; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.border.EtchedBorder; +import org.universaal.tools.configurationExtractor.view.Buttons.AddPanelButton; +import org.universaal.tools.configurationExtractor.view.Buttons.ExportButton; +import org.universaal.tools.configurationExtractor.view.Buttons.ImportButton; +import org.universaal.tools.configurationExtractor.view.Buttons.ImportFromWorkspaceButton; +import org.universaal.tools.configurationExtractor.view.Buttons.SwitchButton; + +/** + * + * @author Ilja + * This class provides a panel which contains some important functions (Import, Save, Switch between modes, Add new <panel>) + */ +@SuppressWarnings("serial") +public class UpPanel extends JPanel{ + + private MainWindow mainWindow; + private ExportButton exp; + private AddPanelButton apb; + private SwitchButton sb; + + /** + * Constructor + * @param mainWindow mainwindow frame + */ + public UpPanel(MainWindow mainWindow){ + this.mainWindow = mainWindow; + this.setLayout( new BoxLayout(this, BoxLayout.X_AXIS) ); + this.setBorder(new EtchedBorder(Color.blue, Color.black)); + + ImportButton imp = new ImportButton(mainWindow); + this.add(imp); + + ImportFromWorkspaceButton impFromWorkspace = new ImportFromWorkspaceButton(mainWindow); + this.add(impFromWorkspace); + + exp = new ExportButton(mainWindow); + this.add(exp); + + this.add(Box.createRigidArea(new Dimension(20,0))); + + sb= new SwitchButton(this.mainWindow); + this.add(sb); + + this.add(Box.createRigidArea(new Dimension(20,0))); + + apb=new AddPanelButton(); + this.add(apb); + setButtonsNotEnabled(); + + } + + /** + * Make all buttons not enabled, except import buttons + */ + public void setButtonsNotEnabled(){ + exp.setEnabled(false); + apb.setEnabled(false); + sb.setEnabled(false); + } + /** + * Make all buttons enabled + */ + public void setButtonsEnabled(){ + exp.setEnabled(true); + apb.setEnabled(true); + sb.setEnabled(true); + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.java new file mode 100644 index 0000000000000000000000000000000000000000..bbaa933056c74f9ad2d3a9475f9f33338cd7346f --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/WorkspaceWindow.java @@ -0,0 +1,140 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + +import java.awt.Container; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import javax.swing.BoxLayout; +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +import org.universaal.tools.configurationExtractor.controller.LoadControl; + +/** + * + * @author Ilja + * This frame contains a list with all directories of eclipse workspace + */ +@SuppressWarnings("serial") +public class WorkspaceWindow extends JFrame{ + private LoadControl loadControl = LoadControl.getInstance(); + private GuiControl guiControl = GuiControl.getInstance(); + private Container pane; + private MainWindow mainWindow; + private int index=-1; + + /** + * Constructor + * @param name of the frame + * @param mainWindow mainwindow frame + */ + public WorkspaceWindow(String name, MainWindow mainWindow){ + super(name); + this.mainWindow=mainWindow; + Dimension d = new Dimension(450,500); + this.setPreferredSize(d); + pane=this.getContentPane(); + pane.setLayout( new BoxLayout(pane, BoxLayout.X_AXIS) ); + this.pack(); + + final DefaultListModel workspaceDirs=guiControl.getDirectories(); + JList wokspaceDirsList = new JList(workspaceDirs); + + MouseListener mouseListener = new MouseAdapter() { + public void mouseClicked(MouseEvent mouseEvent) { + JList theList = (JList) mouseEvent.getSource(); + index = theList.locationToIndex(mouseEvent.getPoint()); + + if (mouseEvent.getClickCount() == 2) { + index = theList.locationToIndex(mouseEvent.getPoint()); + selected(index,workspaceDirs); + + } + } + }; + + wokspaceDirsList.addMouseListener(mouseListener); + JScrollPane jScrollPane = new JScrollPane(wokspaceDirsList); + pane.add(jScrollPane); + + WindowListener windowListener = new WindowAdapter() { + public void windowClosing( WindowEvent event ) { + setImportedToFalse(); + index=-1; + } + }; + this.addWindowListener(windowListener); + this.setVisible(true); + + JButton openButton = new JButton(" Open "); + JButton cancelButton = new JButton("Cancel"); + + openButton.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + if(index != -1){ + selected(index,workspaceDirs); + } + index=-1; + } + } ); + + cancelButton.addActionListener( new ActionListener() { + @Override public void actionPerformed( ActionEvent e ) { + setInvisible(); + setImportedToFalse(); + index=-1; + } + } ); + + + + JPanel buttonsPanel= new JPanel(); + buttonsPanel.setLayout( new BoxLayout(buttonsPanel, BoxLayout.Y_AXIS) ); + buttonsPanel.add(openButton); + buttonsPanel.add(cancelButton); + + pane.add(buttonsPanel); + } + + /* + * Helper method, which should be called, if import has aborted + */ + private void setImportedToFalse() { + mainWindow.setImportedToFalse(); + } + + /* + * Makes frame invisible + */ + private void setInvisible(){ + this.setVisible(false); + } + + /* + * Selected directory can be imported + */ + private void selected(int index, DefaultListModel workspaceDirs){ + + if (index >= 0) { + System.out.println("clicked on "+workspaceDirs.get(index)); + loadControl.extractAnnotationsFrom(index,workspaceDirs); + if(LoadControl.getInstance().isRootFound()){ + mainWindow.importSuccesful(); + }else{ + setImportedToFalse(); + } + this.setVisible(false); + } + } + +} diff --git a/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.java b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.java new file mode 100644 index 0000000000000000000000000000000000000000..d7a3239ecfe46309f6a1db27a9ab6e0b6e41e8ab --- /dev/null +++ b/configuration_extractor/org.universal.tools.configurationExtractor/src/org/universaal/tools/configurationExtractor/view/MainPanels/XMLPanel.java @@ -0,0 +1,86 @@ +package org.universaal.tools.configurationExtractor.view.MainPanels; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import javax.swing.BoxLayout; +import javax.swing.JLabel; +import javax.swing.JPanel; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; +import org.fife.ui.rsyntaxtextarea.SyntaxConstants; +import org.fife.ui.rtextarea.RTextScrollPane; +import org.universaal.tools.configurationExtractor.controller.GuiControl; +/** + * + * @author Ilja + * This panel contains a XML editor with current configuration in poor XML format + */ +@SuppressWarnings("serial") +public class XMLPanel extends JPanel { + GuiControl guiControl = GuiControl.getInstance(); + private static XMLPanel xmlPanel=new XMLPanel(); + private String text; + // Syntax highlighting text component for Java Swing + private RSyntaxTextArea rsyntaxtextarea; + private Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 12 ); + + /* + * Constructor is private because of singleton implementation + */ + private XMLPanel(){ + this.setPreferredSize(new Dimension(400, 100)); + this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) ); + JLabel jt =new JLabel("XML-Panel"); + jt.setBackground(Color.DARK_GRAY); + this.add(jt); + rsyntaxtextarea = new RSyntaxTextArea(); + rsyntaxtextarea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML); + RTextScrollPane sp = new RTextScrollPane(rsyntaxtextarea); + this.add(sp); + } + /** + * Typical singleton method + * @return a singleton instance of XMLPanel + */ + public static XMLPanel getInstance(){ + return xmlPanel; + } + /** + * Set new text + * @param newText new text + */ + public void setText(String newText){ + this.text=newText; + rsyntaxtextarea.setText(newText); + } + /** + * Refresh a XMLPanel + */ + public void refresh(){ + guiControl.refreshXmlPanel(); + } + + /** + * Get current text + * @return current text + */ + public String getTextFromXMLPanel(){ + return rsyntaxtextarea.getText(); + } + /** + * Checks, whether user has changed something in xml editor + * @return true, if xml panel has changed + */ + public boolean xmlPanelChanged(){ + return !rsyntaxtextarea.getText().equals((this.text)); + } + + /** + * Checks whether XMLPanel is visible + * @return true if XMLPanel is visible + */ + public boolean getVisibilityStatus(){ + return xmlPanel.isVisible(); + } + +}