├── repository
├── .gitignore
├── target
│ ├── p2artifacts.xml
│ ├── repository
│ │ ├── content.jar
│ │ ├── artifacts.jar
│ │ ├── content.xml.xz
│ │ ├── artifacts.xml.xz
│ │ └── p2.index
│ ├── repository-1.0.0-SNAPSHOT.zip
│ ├── local-artifacts.properties
│ ├── category.xml
│ ├── p2agent
│ │ ├── org.eclipse.equinox.p2.core
│ │ │ └── cache
│ │ │ │ └── artifacts.xml
│ │ └── org.eclipse.equinox.p2.engine
│ │ │ └── .settings
│ │ │ ├── org.eclipse.equinox.p2.metadata.repository.prefs
│ │ │ └── org.eclipse.equinox.p2.artifact.repository.prefs
│ └── p2content.xml
├── .project
├── category.xml
└── pom.xml
├── ru.capralow.dt.conversion.plugin.feature
├── .gitignore
├── SourceTemplateFeature
│ ├── build.properties
│ └── feature.properties
├── build.properties
├── feature.properties
├── .project
├── feature.xml
└── pom.xml
├── ru.capralow.dt.conversion.plugin.core
├── .gitignore
├── build.properties
├── plugin.properties
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── .classpath
├── pom.xml
├── plugin.xml
├── .project
├── src-gen
│ └── ru
│ │ └── capralow
│ │ └── dt
│ │ └── conversion
│ │ └── plugin
│ │ └── core
│ │ ├── rm
│ │ ├── ObjectSelectionRule.java
│ │ ├── ExchangePlanSelectionRule.java
│ │ ├── impl
│ │ │ ├── ObjectSelectionRuleImpl.java
│ │ │ ├── ExchangePlanSelectionRuleImpl.java
│ │ │ ├── ExchangePlanContentImpl.java
│ │ │ ├── RegistrationRuleImpl.java
│ │ │ ├── RmFactoryImpl.java
│ │ │ └── RegistrationModuleImpl.java
│ │ ├── RmFactory.java
│ │ ├── ExchangePlanContent.java
│ │ ├── AutoRegistration.java
│ │ └── util
│ │ │ ├── RmAdapterFactory.java
│ │ │ └── RmSwitch.java
│ │ └── cp
│ │ ├── CpFactory.java
│ │ ├── impl
│ │ ├── cpExtensionImpl.java
│ │ ├── cpFormatVersionImpl.java
│ │ ├── cpExchangePairImpl.java
│ │ ├── ConversionPanelImpl.java
│ │ ├── cpConfigurationImpl.java
│ │ └── CpFactoryImpl.java
│ │ ├── cpExtension.java
│ │ ├── ConversionPanel.java
│ │ ├── cpFormatVersion.java
│ │ ├── cpExchangePair.java
│ │ ├── util
│ │ ├── CpAdapterFactory.java
│ │ └── CpSwitch.java
│ │ ├── ExchangePairStatus.java
│ │ └── cpConfiguration.java
├── META-INF
│ └── MANIFEST.MF
├── model
│ ├── RegistrationModule.xcore
│ └── ConversionPanel.xcore
└── src
│ └── ru
│ └── capralow
│ └── dt
│ └── conversion
│ └── plugin
│ └── core
│ ├── rm
│ └── RegistrationModuleContentProvider.java
│ └── cp
│ ├── ConversionPanelLabelProvider.java
│ └── ConversionPanelContentProvider.java
├── ru.capralow.dt.conversion.plugin.ui
├── .gitignore
├── build.properties
├── .classpath
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── pom.xml
├── src
│ └── ru
│ │ └── capralow
│ │ └── dt
│ │ └── conversion
│ │ └── plugin
│ │ └── ui
│ │ ├── ConversionExecutableExtensionFactory.java
│ │ ├── ConversionExternalDependenciesModule.java
│ │ ├── editors
│ │ ├── ConversionModuleEditor.java
│ │ └── RegistrationModuleEditor.java
│ │ ├── Activator.java
│ │ └── views
│ │ └── ConversionPanelView.java
├── plugin.xml
├── .project
├── META-INF
│ └── MANIFEST.MF
├── plugin.launch
└── plugin Зарубежнефть.launch
├── target
├── .project
└── pom.xml
├── README.md
├── LICENSE
└── .travis.yml
/repository/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /target/
3 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /target/
3 |
--------------------------------------------------------------------------------
/repository/target/p2artifacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/repository/target/repository/content.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoublesunRUS/ru.capralow.dt.conversion/master/repository/target/repository/content.jar
--------------------------------------------------------------------------------
/repository/target/repository/artifacts.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoublesunRUS/ru.capralow.dt.conversion/master/repository/target/repository/artifacts.jar
--------------------------------------------------------------------------------
/repository/target/repository/content.xml.xz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoublesunRUS/ru.capralow.dt.conversion/master/repository/target/repository/content.xml.xz
--------------------------------------------------------------------------------
/repository/target/repository/artifacts.xml.xz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoublesunRUS/ru.capralow.dt.conversion/master/repository/target/repository/artifacts.xml.xz
--------------------------------------------------------------------------------
/repository/target/repository-1.0.0-SNAPSHOT.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DoublesunRUS/ru.capralow.dt.conversion/master/repository/target/repository-1.0.0-SNAPSHOT.zip
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/
2 | output.. = bin/
3 | bin.includes = META-INF/,\
4 | .,\
5 | plugin.xml
6 |
--------------------------------------------------------------------------------
/repository/target/local-artifacts.properties:
--------------------------------------------------------------------------------
1 | #Sat Aug 25 20:59:13 MSK 2018
2 | artifact.attached.p2artifacts=C\:\\git\\ru.capralow.dt.conversion\\repository\\target\\p2artifacts.xml
3 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/SourceTemplateFeature/build.properties:
--------------------------------------------------------------------------------
1 | javacCustomEncodings.. = src/[UTF-8]
2 | bin.includes = feature.xml,\
3 | feature.properties
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/build.properties:
--------------------------------------------------------------------------------
1 | javacCustomEncodings.. = src/[UTF-8]
2 | bin.includes = feature.xml,\
3 | feature.properties,\
4 | SourceTemplateFeature/
5 |
6 |
--------------------------------------------------------------------------------
/repository/target/repository/p2.index:
--------------------------------------------------------------------------------
1 | #Sat Aug 25 20:59:15 MSK 2018
2 | version=1
3 | metadata.repository.factory.order=content.xml.xz,content.xml,\!
4 | artifact.repository.factory.order=artifacts.xml.xz,artifacts.xml,\!
5 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = META-INF/,\
2 | .,\
3 | plugin.xml,\
4 | model/
5 | output.. = bin/
6 | source.. = src/,\
7 | src-gen/
8 | src.includes = model/
9 |
--------------------------------------------------------------------------------
/target/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | target
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/repository/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | repository
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/repository/category.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/repository/target/category.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/plugin.properties:
--------------------------------------------------------------------------------
1 | #
2 |
3 | pluginName = \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f EDT
4 | providerName = \u041a\u0430\u043f\u0440\u0430\u043b\u043e\u0432 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u043e\u0432\u0438\u0447 (1\u0421-\u0420\u0430\u0440\u0443\u0441)
5 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/feature.properties:
--------------------------------------------------------------------------------
1 |
2 | featureName = \u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F EDT
3 |
4 | providerName = \u041A\u0430\u043F\u0440\u0430\u043B\u043E\u0432 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u043E\u0432\u0438\u0447 (1\u0421-\u0420\u0430\u0440\u0443\u0441)
5 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.compliance=1.8
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.8
8 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.compliance=1.8
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.8
8 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/SourceTemplateFeature/feature.properties:
--------------------------------------------------------------------------------
1 |
2 | featureName = \u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F EDT
3 |
4 | providerName = \u041A\u0430\u043F\u0440\u0430\u043B\u043E\u0432 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u043E\u0432\u0438\u0447 (1\u0421-\u0420\u0430\u0440\u0443\u0441)
5 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ru.capralow.dt.conversion.plugin.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | 4.0.0
7 |
8 | ru.capralow.dt.conversion
9 | build
10 | 1.0.0-SNAPSHOT
11 | ../build/pom.xml
12 |
13 | eclipse-plugin
14 | ru.capralow.dt.conversion.plugin.ui
15 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | 4.0.0
7 |
8 | ru.capralow.dt.conversion
9 | build
10 | 1.0.0-SNAPSHOT
11 | ../build/pom.xml
12 |
13 | ru.capralow.dt.conversion.plugin.core
14 | eclipse-plugin
15 |
--------------------------------------------------------------------------------
/repository/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | 4.0.0
7 |
8 |
9 | ru.capralow.dt.conversion
10 | build
11 | 1.0.0-SNAPSHOT
12 | ../build/pom.xml
13 |
14 |
15 | eclipse-repository
16 | repository
17 | ru.capralow.dt.conversion
18 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/ConversionExecutableExtensionFactory.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui;
2 |
3 | import org.osgi.framework.Bundle;
4 |
5 | import com._1c.g5.wiring.AbstractGuiceAwareExecutableExtensionFactory;
6 | import com.google.inject.Injector;
7 |
8 | public class ConversionExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
9 |
10 | @Override
11 | protected Bundle getBundle() {
12 | return Activator.getDefault().getBundle();
13 | }
14 |
15 | @Override
16 | protected Injector getInjector() {
17 | return Activator.getDefault().getInjector();
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/target/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | 4.0.0
7 |
8 | ru.capralow.dt.conversion
9 | build
10 | 1.0.0-SNAPSHOT
11 | ../build/pom.xml
12 |
13 |
14 | target
15 | eclipse-target-definition
16 | ru.capralow.dt.conversion.target
17 | default
18 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
11 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/repository/target/p2agent/org.eclipse.equinox.p2.core/cache/artifacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ru.capralow.dt.conversion.plugin.ui
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/feature.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | Конвертация данных для EDT
10 |
11 |
12 |
13 | Капралов Александр Александрович (1С-Рарус)
14 |
15 |
16 |
22 |
23 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/ConversionExternalDependenciesModule.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui;
2 |
3 | import org.eclipse.core.runtime.Plugin;
4 |
5 | import com._1c.g5.v8.dt.bm.index.emf.IBmEmfIndexManager;
6 | import com._1c.g5.v8.dt.core.platform.IResourceLookup;
7 | import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
8 | import com._1c.g5.wiring.AbstractServiceAwareModule;
9 |
10 | public class ConversionExternalDependenciesModule extends AbstractServiceAwareModule {
11 |
12 | public ConversionExternalDependenciesModule(Plugin bundle) {
13 | super(bundle);
14 | }
15 |
16 | @Override
17 | protected void doConfigure() {
18 | bind(IV8ProjectManager.class).toService();
19 | bind(IBmEmfIndexManager.class).toService();
20 | bind(IResourceLookup.class).toService();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/repository/target/p2content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # dt.conversion
2 |
3 | ## Конвертация данных для [1C:Enterprise Development Tools](http://v8.1c.ru/overview/IDE/) 1.09
4 |
5 | Текущий релиз в ветке [master: 1.0.0](https://github.com/DoublesunRUS/ru.capralow.dt.conversion/tree/master).
6 | Разработка ведется в ветке [dev](https://github.com/DoublesunRUS/ru.capralow.dt.conversion/tree/dev).
7 |
8 | В данном репозитории хранятся только исходники.
9 |
10 | Плагин можно установить через Eclipse с сайта обновления http://capralow.ru/edt/conversion .
11 | Для самостоятельной сборки плагина необходимо иметь доступ к сайту https://releases.1c.ru и настроить соответствующим образом Maven.
12 | Подробности настройки написаны [здесь](https://github.com/1C-Company/dt-example-plugins/blob/master/simple-plugin/README.md).
13 |
14 | ### Панель "Конвертация данных" (1.0.0)
15 | Панель паказывает, какие версии формата доступны для каждой конфигурации. Если в рабочей области больше одной конфигурации, панель для каждой пары конфигураций показывает какими форматами они могут обмениваться
16 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ru.capralow.dt.conversion.plugin.core
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.xtext.ui.shared.xtextBuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.ManifestBuilder
20 |
21 |
22 |
23 |
24 | org.eclipse.pde.SchemaBuilder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.jdt.core.javanature
31 | org.eclipse.pde.PluginNature
32 | org.eclipse.xtext.ui.shared.xtextNature
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.feature/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | 4.0.0
7 |
8 | ru.capralow.dt.conversion
9 | build
10 | 1.0.0-SNAPSHOT
11 | ../build/pom.xml
12 |
13 | ru.capralow.dt.conversion
14 | eclipse-feature
15 |
16 |
17 |
18 | org.eclipse.tycho.extras
19 | tycho-source-feature-plugin
20 |
21 |
22 | package
23 |
24 | source-feature
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.tycho
31 | tycho-p2-plugin
32 |
33 |
34 | package
35 |
36 | p2-metadata
37 |
38 |
39 |
40 |
41 |
42 |
43 | ru.capralow.dt.conversion.plugin.feature
44 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2019, Александр Капралов
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 |
3 | jdk:
4 | - oraclejdk8
5 |
6 | addons:
7 | sonarcloud:
8 | organization: "doublesunrus-github"
9 | token: $SONAR_TOKEN
10 |
11 | git:
12 | depth: false
13 |
14 | script:
15 | - mvn clean test verify -f build/pom.xml -s build/settings.xml
16 | - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -f build/pom.xml -s build/settings.xml -Dsonar.projectKey=DoublesunRUS_ru.capralow.dt.conversion
17 |
18 | cache:
19 | directories:
20 | - '$HOME/.m2/repository'
21 | - '$HOME/.sonar/cache'
22 |
23 | language: node_js
24 |
25 | env:
26 | - PLUGIN_VERSION="1.0.0"
27 |
28 | after_success:
29 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/ | xargs -I{} -- curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/ -Q "-DELE {}"
30 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/features/ | xargs -I{} -- curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/features/ -Q "-DELE {}"
31 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/plugins/ | xargs -I{} -- curl -v -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/plugins/ -Q "-DELE {}"
32 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/ -v -Q "-RMD features"
33 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/ -v -Q "-RMD plugins"
34 | - curl -l -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/ -v -Q "-RMD $PLUGIN_VERSION"
35 | - find repository/target/repository/ -type f | xargs -L 1 bash -c 'curl --ftp-create-dirs -T $1 -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_ADDRESS/$PLUGIN_VERSION/${1##repository/target/repository/}' \;
36 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/ObjectSelectionRule.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm;
4 |
5 | import com._1c.g5.v8.bm.core.IBmObject;
6 |
7 | /**
8 | *
9 | * A representation of the model object 'Object Selection Rule '.
10 | *
11 | *
12 | *
13 | * The following features are supported:
14 | *
15 | *
16 | * {@link ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule#getIsFolder Is Folder }
17 | *
18 | *
19 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getObjectSelectionRule()
20 | * @model
21 | * @extends IBmObject
22 | * @generated
23 | */
24 | public interface ObjectSelectionRule extends IBmObject {
25 | /**
26 | * Returns the value of the 'Is Folder ' attribute.
27 | *
28 | *
29 | * If the meaning of the 'Is Folder ' attribute isn't clear,
30 | * there really should be more of a description here...
31 | *
32 | *
33 | * @return the value of the 'Is Folder ' attribute.
34 | * @see #setIsFolder(Boolean)
35 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getObjectSelectionRule_IsFolder()
36 | * @model unique="false"
37 | * @generated
38 | */
39 | Boolean getIsFolder();
40 |
41 | /**
42 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule#getIsFolder Is Folder }' attribute.
43 | *
44 | *
45 | * @param value the new value of the 'Is Folder ' attribute.
46 | * @see #getIsFolder()
47 | * @generated
48 | */
49 | void setIsFolder(Boolean value);
50 |
51 | } // ObjectSelectionRule
52 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/ExchangePlanSelectionRule.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm;
4 |
5 | import com._1c.g5.v8.bm.core.IBmObject;
6 |
7 | /**
8 | *
9 | * A representation of the model object 'Exchange Plan Selection Rule '.
10 | *
11 | *
12 | *
13 | * The following features are supported:
14 | *
15 | *
16 | * {@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule#getIsFolder Is Folder }
17 | *
18 | *
19 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getExchangePlanSelectionRule()
20 | * @model
21 | * @extends IBmObject
22 | * @generated
23 | */
24 | public interface ExchangePlanSelectionRule extends IBmObject {
25 | /**
26 | * Returns the value of the 'Is Folder ' attribute.
27 | *
28 | *
29 | * If the meaning of the 'Is Folder ' attribute isn't clear,
30 | * there really should be more of a description here...
31 | *
32 | *
33 | * @return the value of the 'Is Folder ' attribute.
34 | * @see #setIsFolder(Boolean)
35 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getExchangePlanSelectionRule_IsFolder()
36 | * @model unique="false"
37 | * @generated
38 | */
39 | Boolean getIsFolder();
40 |
41 | /**
42 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule#getIsFolder Is Folder }' attribute.
43 | *
44 | *
45 | * @param value the new value of the 'Is Folder ' attribute.
46 | * @see #getIsFolder()
47 | * @generated
48 | */
49 | void setIsFolder(Boolean value);
50 |
51 | } // ExchangePlanSelectionRule
52 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: Конвертация данных для EDT
4 | Bundle-SymbolicName: ru.capralow.dt.conversion.plugin.ui;singleton:=true
5 | Bundle-Version: 1.0.0.qualifier
6 | Bundle-Vendor: Капралов Александр Александрович (1С-Рарус)
7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8
8 | Automatic-Module-Name: ru.capralow.dt.conversion.plugin.ui
9 | Bundle-ActivationPolicy: lazy
10 | Bundle-Activator: ru.capralow.dt.conversion.plugin.ui.Activator
11 | Require-Bundle: com.google.inject;bundle-version="[3.0.0,4.0.0)",
12 | org.eclipse.ui;bundle-version="[3.106.1,4.0.0)",
13 | org.eclipse.xtext.ui;bundle-version="[2.12.0,2.13.0)",
14 | org.eclipse.ui.ide;bundle-version="[3.10.2,4.0.0)",
15 | org.apache.log4j;bundle-version="[1.2.15,2.0.0)",
16 | com._1c.g5.wiring;bundle-version="2.0.100",
17 | ru.capralow.dt.conversion.plugin.core;bundle-version="1.0.0"
18 | Import-Package: com._1c.g5.v8.bm.core;version="5.0.0",
19 | com._1c.g5.v8.dt.bm.index.emf;version="6.1.0",
20 | com._1c.g5.v8.dt.bsl.common;version="4.0.0",
21 | com._1c.g5.v8.dt.bsl.model;version="[3.0.0,4.0.0)",
22 | com._1c.g5.v8.dt.bsl.resource;version="7.1.0",
23 | com._1c.g5.v8.dt.core.event;version="2.0.0",
24 | com._1c.g5.v8.dt.core.lifecycle;version="3.2.0",
25 | com._1c.g5.v8.dt.core.platform;version="7.0.0",
26 | com._1c.g5.v8.dt.core.platform.events;version="1.0.0",
27 | com._1c.g5.v8.dt.lifecycle;version="2.0.0",
28 | com._1c.g5.v8.dt.mcore;version="[4.0.0,5.0.0)",
29 | com._1c.g5.v8.dt.mcore.impl;version="[5.0.0,6.0.0)",
30 | com._1c.g5.v8.dt.md.extension.adopt;version="1.1.0",
31 | com._1c.g5.v8.dt.metadata.mdclass;version="[6.0.0,7.0.0)",
32 | com._1c.g5.v8.dt.ui.util;version="5.1.0",
33 | org.antlr.stringtemplate;version="[3.2.0,4.0.0)",
34 | org.eclipse.core.runtime;version="[3.4.0,4.0.0)",
35 | org.osgi.framework;version="[1.8.0,2.0.0)"
36 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/ObjectSelectionRuleImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import com._1c.g5.v8.bm.core.BmObject;
6 |
7 | import org.eclipse.emf.ecore.EClass;
8 |
9 | import ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule;
10 | import ru.capralow.dt.conversion.plugin.core.rm.RmPackage;
11 |
12 | /**
13 | *
14 | * An implementation of the model object 'Object Selection Rule '.
15 | *
16 | *
17 | * The following features are implemented:
18 | *
19 | *
20 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.ObjectSelectionRuleImpl#getIsFolder Is Folder }
21 | *
22 | *
23 | * @generated
24 | */
25 | public class ObjectSelectionRuleImpl extends BmObject implements ObjectSelectionRule {
26 | /**
27 | *
28 | *
29 | * @generated
30 | */
31 | public ObjectSelectionRuleImpl() {
32 | super();
33 | }
34 |
35 | /**
36 | *
37 | *
38 | * @generated
39 | */
40 | @Override
41 | protected EClass eStaticClass() {
42 | return RmPackage.Literals.OBJECT_SELECTION_RULE;
43 | }
44 |
45 | /**
46 | *
47 | *
48 | * @generated
49 | */
50 | @Override
51 | protected int eStaticFeatureCount() {
52 | return 0;
53 | }
54 |
55 | /**
56 | *
57 | *
58 | * @generated
59 | */
60 | public Boolean getIsFolder() {
61 | return (Boolean)eGet(RmPackage.Literals.OBJECT_SELECTION_RULE__IS_FOLDER, true);
62 | }
63 |
64 | /**
65 | *
66 | *
67 | * @generated
68 | */
69 | public void setIsFolder(Boolean newIsFolder) {
70 | eSet(RmPackage.Literals.OBJECT_SELECTION_RULE__IS_FOLDER, newIsFolder);
71 | }
72 |
73 | } //ObjectSelectionRuleImpl
74 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: Конвертация данных для EDT
4 | Bundle-SymbolicName: ru.capralow.dt.conversion.plugin.core;singleton:=true
5 | Bundle-Version: 1.0.0.qualifier
6 | Bundle-Vendor: Капралов Александр Александрович (1С-Рарус)
7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8
8 | Automatic-Module-Name: ru.capralow.dt.conversion.plugin.core
9 | Require-Bundle: com.google.inject;bundle-version="[3.0.0,4.0.0)",
10 | org.eclipse.ui;bundle-version="[3.106.1,4.0.0)",
11 | org.eclipse.xtext.ui;bundle-version="[2.12.0,2.13.0)",
12 | org.eclipse.ui.ide;bundle-version="[3.10.2,4.0.0)",
13 | org.apache.log4j;bundle-version="[1.2.15,2.0.0)",
14 | org.eclipse.emf.ecore.xcore.lib;bundle-version="1.1.100",
15 | org.eclipse.xtext.xbase.lib
16 | Import-Package: com._1c.g5.modeling.xtext.scoping;version="3.1.0",
17 | com._1c.g5.v8.bm.core;version="5.0.0",
18 | com._1c.g5.v8.bm.integration;version="5.0.0",
19 | com._1c.g5.v8.dt.bm.index.emf;version="6.1.0",
20 | com._1c.g5.v8.dt.bsl.common;version="4.0.0",
21 | com._1c.g5.v8.dt.bsl.model;version="[3.0.0,4.0.0)",
22 | com._1c.g5.v8.dt.bsl.resource;version="7.1.0",
23 | com._1c.g5.v8.dt.core.platform;version="7.0.0",
24 | com._1c.g5.v8.dt.lcore.util;version="2.0.0",
25 | com._1c.g5.v8.dt.mcore;version="[4.0.0,5.0.0)",
26 | com._1c.g5.v8.dt.mcore.util;version="3.5.0",
27 | com._1c.g5.v8.dt.md.extension.adopt;version="1.1.0",
28 | com._1c.g5.v8.dt.metadata.mdclass;version="[6.0.0,7.0.0)",
29 | com._1c.g5.wiring;version="2.0.0",
30 | org.antlr.stringtemplate;version="[3.2.0,4.0.0)",
31 | org.eclipse.core.runtime;version="[3.4.0,4.0.0)",
32 | org.osgi.framework;version="[1.8.0,2.0.0)"
33 | Export-Package: ru.capralow.dt.conversion.plugin.core.cp,
34 | ru.capralow.dt.conversion.plugin.core.cp.impl,
35 | ru.capralow.dt.conversion.plugin.core.cp.util,
36 | ru.capralow.dt.conversion.plugin.core.rm,
37 | ru.capralow.dt.conversion.plugin.core.rm.impl,
38 | ru.capralow.dt.conversion.plugin.core.rm.util
39 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/ExchangePlanSelectionRuleImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import com._1c.g5.v8.bm.core.BmObject;
6 |
7 | import org.eclipse.emf.ecore.EClass;
8 |
9 | import ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule;
10 | import ru.capralow.dt.conversion.plugin.core.rm.RmPackage;
11 |
12 | /**
13 | *
14 | * An implementation of the model object 'Exchange Plan Selection Rule '.
15 | *
16 | *
17 | * The following features are implemented:
18 | *
19 | *
20 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.ExchangePlanSelectionRuleImpl#getIsFolder Is Folder }
21 | *
22 | *
23 | * @generated
24 | */
25 | public class ExchangePlanSelectionRuleImpl extends BmObject implements ExchangePlanSelectionRule {
26 | /**
27 | *
28 | *
29 | * @generated
30 | */
31 | public ExchangePlanSelectionRuleImpl() {
32 | super();
33 | }
34 |
35 | /**
36 | *
37 | *
38 | * @generated
39 | */
40 | @Override
41 | protected EClass eStaticClass() {
42 | return RmPackage.Literals.EXCHANGE_PLAN_SELECTION_RULE;
43 | }
44 |
45 | /**
46 | *
47 | *
48 | * @generated
49 | */
50 | @Override
51 | protected int eStaticFeatureCount() {
52 | return 0;
53 | }
54 |
55 | /**
56 | *
57 | *
58 | * @generated
59 | */
60 | public Boolean getIsFolder() {
61 | return (Boolean)eGet(RmPackage.Literals.EXCHANGE_PLAN_SELECTION_RULE__IS_FOLDER, true);
62 | }
63 |
64 | /**
65 | *
66 | *
67 | * @generated
68 | */
69 | public void setIsFolder(Boolean newIsFolder) {
70 | eSet(RmPackage.Literals.EXCHANGE_PLAN_SELECTION_RULE__IS_FOLDER, newIsFolder);
71 | }
72 |
73 | } //ExchangePlanSelectionRuleImpl
74 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/model/RegistrationModule.xcore:
--------------------------------------------------------------------------------
1 | @GenModel(publicConstructors="true", loadInitialization="false", literalsInterface="true", nonNLSMarkers="true",
2 | updateClasspath="false", featureDelegation="Reflective", rootExtendsClass="com._1c.g5.v8.bm.core.BmObject",
3 | rootExtendsInterface="com._1c.g5.v8.bm.core.IBmObject")
4 | package ru.capralow.dt.conversion.plugin.core.rm
5 |
6 | import java.text.ParseException
7 | import java.text.SimpleDateFormat
8 | import java.util.Date
9 |
10 | class RegistrationModule {
11 | String moduleRef
12 | String moduleName
13 | String moduleVersion
14 | Date moduleCreationDate
15 |
16 | String exchangePlanName
17 | String exchangePlanMdObject
18 |
19 | String runtimeVersion
20 |
21 | String configurationName
22 | String configurationSynonym
23 | String configurationVersion
24 |
25 | contains ExchangePlanContent[] exchangePlanContent
26 |
27 | contains RegistrationRule[] registrationRules
28 | }
29 |
30 | class ExchangePlanContent {
31 | String mdObject
32 | AutoRegistration AutoRecord
33 | }
34 |
35 | class RegistrationRule {
36 | Boolean isFolder
37 |
38 | Boolean disabled
39 | Boolean valid
40 |
41 | String code
42 | String name
43 | String mdObject
44 | String objectName
45 | String mdClass
46 |
47 | String attributeSendMode
48 |
49 | contains ObjectSelectionRule[] objectSelectionRules
50 | contains ExchangePlanSelectionRule[] exchangePlanSelectionRules
51 | }
52 |
53 | class ObjectSelectionRule {
54 | Boolean isFolder
55 |
56 | }
57 |
58 | class ExchangePlanSelectionRule {
59 | Boolean isFolder
60 |
61 | }
62 |
63 | type Date wraps Date
64 | create {
65 | try {
66 | if (it !== null) new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss").parse(it);
67 | }
68 | catch (ParseException exception) {
69 | throw new RuntimeException(exception);
70 | }
71 | }
72 | convert {
73 | if (it !== null) new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss").format(it);
74 | }
75 |
76 | enum AutoRegistration {
77 | Allow as "Разрешить" = 1
78 | Deny as "Запретить" = 0
79 | }
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/CpFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import org.eclipse.emf.ecore.EFactory;
6 |
7 | /**
8 | *
9 | * The Factory for the model.
10 | * It provides a create method for each non-abstract class of the model.
11 | *
12 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage
13 | * @generated
14 | */
15 | public interface CpFactory extends EFactory {
16 | /**
17 | * The singleton instance of the factory.
18 | *
19 | *
20 | * @generated
21 | */
22 | CpFactory eINSTANCE = ru.capralow.dt.conversion.plugin.core.cp.impl.CpFactoryImpl.init();
23 |
24 | /**
25 | * Returns a new object of class 'Conversion Panel '.
26 | *
27 | *
28 | * @return a new object of class 'Conversion Panel '.
29 | * @generated
30 | */
31 | ConversionPanel createConversionPanel();
32 |
33 | /**
34 | * Returns a new object of class 'cp Configuration '.
35 | *
36 | *
37 | * @return a new object of class 'cp Configuration '.
38 | * @generated
39 | */
40 | cpConfiguration createcpConfiguration();
41 |
42 | /**
43 | * Returns a new object of class 'cp Extension '.
44 | *
45 | *
46 | * @return a new object of class 'cp Extension '.
47 | * @generated
48 | */
49 | cpExtension createcpExtension();
50 |
51 | /**
52 | * Returns a new object of class 'cp Format Version '.
53 | *
54 | *
55 | * @return a new object of class 'cp Format Version '.
56 | * @generated
57 | */
58 | cpFormatVersion createcpFormatVersion();
59 |
60 | /**
61 | * Returns a new object of class 'cp Exchange Pair '.
62 | *
63 | *
64 | * @return a new object of class 'cp Exchange Pair '.
65 | * @generated
66 | */
67 | cpExchangePair createcpExchangePair();
68 |
69 | /**
70 | * Returns the package supported by this factory.
71 | *
72 | *
73 | * @return the package supported by this factory.
74 | * @generated
75 | */
76 | CpPackage getCpPackage();
77 |
78 | } //CpFactory
79 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src/ru/capralow/dt/conversion/plugin/core/rm/RegistrationModuleContentProvider.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.core.rm;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 | import java.util.Set;
6 |
7 | import org.eclipse.emf.common.util.EList;
8 | import org.eclipse.jface.viewers.ITreeContentProvider;
9 | import org.eclipse.jface.viewers.Viewer;
10 |
11 | public class RegistrationModuleContentProvider implements ITreeContentProvider {
12 |
13 | private Map contentMap = new HashMap<>();
14 |
15 | @Override
16 | public Object[] getElements(Object registrationModule) {
17 | EList exchangePlanContents = ((RegistrationModule) registrationModule).getExchangePlanContent();
18 |
19 | String[] treeContents = new String[exchangePlanContents.size()];
20 | for (int i = 0; i < exchangePlanContents.size(); i++) {
21 | ExchangePlanContent exchangePlanContent = exchangePlanContents.get(i);
22 |
23 | treeContents[i] = exchangePlanContent.getMdObject();
24 |
25 | contentMap.put(treeContents[i], new String[] { exchangePlanContent.getAutoRecord().getLiteral() });
26 | }
27 |
28 | contentMap.put("exchangePlanContents", treeContents);
29 |
30 | // contentMap.put("root1", new String[] { "root1_child1", "root1_child2", "root1_child3" });
31 | // contentMap.put("root1_child1", new String[] { "root1_child1_child1", "root1_child1_child2" });
32 |
33 | return contentMap.get("exchangePlanContents");
34 | }
35 |
36 | @Override
37 | public void dispose() {
38 | // TODO Автоматически созданная заглушка метода
39 |
40 | }
41 |
42 | @Override
43 | public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
44 | // TODO Автоматически созданная заглушка метода
45 |
46 | }
47 |
48 | @Override
49 | public Object[] getChildren(Object arg0) {
50 | return contentMap.get(arg0);
51 | }
52 |
53 | @Override
54 | public Object getParent(Object arg0) {
55 | return getParentOfEle(arg0);
56 | }
57 |
58 | @Override
59 | public boolean hasChildren(Object arg0) {
60 | return contentMap.containsKey(arg0);
61 | }
62 |
63 | private String getParentOfEle(Object arg0) {
64 | Set keys = contentMap.keySet();
65 |
66 | for (String key : keys) {
67 | String[] values = contentMap.get(key);
68 |
69 | for (String val : values) {
70 | if (val.equals(arg0)) {
71 | return key;
72 | }
73 | }
74 | }
75 | return null;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/RmFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm;
4 |
5 | import org.eclipse.emf.ecore.EFactory;
6 |
7 | /**
8 | *
9 | * The Factory for the model.
10 | * It provides a create method for each non-abstract class of the model.
11 | *
12 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage
13 | * @generated
14 | */
15 | public interface RmFactory extends EFactory {
16 | /**
17 | * The singleton instance of the factory.
18 | *
19 | *
20 | * @generated
21 | */
22 | RmFactory eINSTANCE = ru.capralow.dt.conversion.plugin.core.rm.impl.RmFactoryImpl.init();
23 |
24 | /**
25 | * Returns a new object of class 'Registration Module '.
26 | *
27 | *
28 | * @return a new object of class 'Registration Module '.
29 | * @generated
30 | */
31 | RegistrationModule createRegistrationModule();
32 |
33 | /**
34 | * Returns a new object of class 'Exchange Plan Content '.
35 | *
36 | *
37 | * @return a new object of class 'Exchange Plan Content '.
38 | * @generated
39 | */
40 | ExchangePlanContent createExchangePlanContent();
41 |
42 | /**
43 | * Returns a new object of class 'Registration Rule '.
44 | *
45 | *
46 | * @return a new object of class 'Registration Rule '.
47 | * @generated
48 | */
49 | RegistrationRule createRegistrationRule();
50 |
51 | /**
52 | * Returns a new object of class 'Object Selection Rule '.
53 | *
54 | *
55 | * @return a new object of class 'Object Selection Rule '.
56 | * @generated
57 | */
58 | ObjectSelectionRule createObjectSelectionRule();
59 |
60 | /**
61 | * Returns a new object of class 'Exchange Plan Selection Rule '.
62 | *
63 | *
64 | * @return a new object of class 'Exchange Plan Selection Rule '.
65 | * @generated
66 | */
67 | ExchangePlanSelectionRule createExchangePlanSelectionRule();
68 |
69 | /**
70 | * Returns the package supported by this factory.
71 | *
72 | *
73 | * @return the package supported by this factory.
74 | * @generated
75 | */
76 | RmPackage getRmPackage();
77 |
78 | } //RmFactory
79 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/model/ConversionPanel.xcore:
--------------------------------------------------------------------------------
1 | @GenModel(publicConstructors="true", loadInitialization="false", literalsInterface="true", nonNLSMarkers="true",
2 | updateClasspath="false", featureDelegation="Reflective")
3 | package ru.capralow.dt.conversion.plugin.core.cp
4 |
5 | import com._1c.g5.v8.dt.bsl.model.Module
6 |
7 | class ConversionPanel {
8 | contains cpExchangePair[] ExchangePairs
9 | contains cpConfiguration[] configurations
10 | op cpConfiguration getConfiguration(String configurationName) {
11 | for (cpConfiguration configuration : configurations) {
12 | if (configurationName == configuration.configurationName) return configuration
13 | }
14 | return null;
15 | }
16 | op Object[] getObjects() {
17 | val result = newBasicEList()
18 |
19 | for (cpConfiguration configuration : configurations) {
20 | for (Object coreObject : configuration.coreObjects) {
21 | result.add(coreObject)
22 | }
23 | }
24 | return result
25 | }
26 | }
27 |
28 | class cpConfiguration {
29 | Object configurationObject
30 | String configurationName
31 | String storeVersion
32 | contains cpExtension[] extensions
33 | ConfigurationStatus Status
34 | contains cpFormatVersion[] availableFormatVersions
35 | op String[] getVersions() {
36 | val result = newBasicEList()
37 | for (cpFormatVersion formatVersion : availableFormatVersions) {
38 | result.add(formatVersion.version)
39 | }
40 | return result
41 | }
42 | Object[] coreObjects
43 | }
44 |
45 | class cpExtension {
46 | Object configurationObject
47 | String configurationName
48 | }
49 |
50 | class cpFormatVersion {
51 | String version
52 | String configurationName
53 | contains Module module
54 | }
55 |
56 | class cpExchangePair {
57 | String configurationName1
58 | String configurationName2
59 | ExchangePairStatus Status
60 | String[] versions
61 | }
62 |
63 | enum ExchangePairStatus {
64 | NoSharedFormatVersions as "Нет совпадений по доступным версиям формата" = 0
65 | Ready as "Конфигурации готовы к обмену" = 1
66 | }
67 |
68 | enum ConfigurationStatus {
69 | NoConfiguration as "Ожидание активации проектного контекста" = 0
70 | NoSubsystem as "Нет подсистемы ОбменДанными" = 1
71 | NoSSLVersion as "Не удалось определить версию БСП" = 2
72 | NoCommonModule as "Нет общего модуля ОбменДаннымиПереопределяемый" = 3
73 | NoMethod as "В общем модуле нет метода ПриПолученииДоступныхВерсийФормата" = 4
74 | EmptyMethod as "В процедуре ПриПолученииДоступныхВерсийФормата не указаны версии формата" = 5
75 | Ready as "Конфигурация готова к обмену" = 6
76 | }
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src/ru/capralow/dt/conversion/plugin/core/cp/ConversionPanelLabelProvider.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.core.cp;
2 |
3 | import org.eclipse.emf.common.util.EList;
4 | import org.eclipse.jface.viewers.ILabelProvider;
5 | import org.eclipse.jface.viewers.ILabelProviderListener;
6 | import org.eclipse.swt.graphics.Image;
7 |
8 | import com._1c.g5.v8.dt.metadata.mdclass.CommonModule;
9 |
10 | public class ConversionPanelLabelProvider implements ILabelProvider {
11 |
12 | @Override
13 | public String getText(Object element) {
14 | if (element instanceof cpExchangePair) {
15 | return ((cpExchangePair) element).getConfigurationName1() + " - " + ((cpExchangePair) element).getConfigurationName2();
16 |
17 | } else if (element instanceof ExchangePairStatus) {
18 | return ((ExchangePairStatus) element).getLiteral();
19 |
20 | } else if (element instanceof cpConfiguration) {
21 | return ((cpConfiguration) element).getConfigurationName();
22 |
23 | } else if (element instanceof ConfigurationStatus) {
24 | return ((ConfigurationStatus) element).getLiteral();
25 |
26 | } else if (element instanceof cpFormatVersion) {
27 | cpFormatVersion formatVersion = (cpFormatVersion) element;
28 |
29 | String version = formatVersion.getVersion().intern();
30 | String module = ((CommonModule) formatVersion.getModule().getOwner()).getName();
31 |
32 | if (formatVersion.getConfigurationName() != null) {
33 | module = formatVersion.getConfigurationName() + "." + module;
34 | }
35 |
36 | return version + " [" + module + "]";
37 |
38 | } else if (element instanceof EList) {
39 | return "Доступные версии формата";
40 |
41 | } else if (element instanceof String) {
42 | return element.toString();
43 |
44 | }
45 |
46 | return null;
47 | }
48 |
49 | @Override
50 | public void addListener(ILabelProviderListener listener) {
51 | // TODO Автоматически созданная заглушка метода
52 |
53 | }
54 |
55 | @Override
56 | public void dispose() {
57 | // TODO Автоматически созданная заглушка метода
58 |
59 | }
60 |
61 | @Override
62 | public boolean isLabelProperty(Object element, String property) {
63 | // TODO Автоматически созданная заглушка метода
64 | return false;
65 | }
66 |
67 | @Override
68 | public void removeListener(ILabelProviderListener listener) {
69 | // TODO Автоматически созданная заглушка метода
70 |
71 | }
72 |
73 | @Override
74 | public Image getImage(Object element) {
75 | // TODO Автоматически созданная заглушка метода
76 | return null;
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/editors/ConversionModuleEditor.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui.editors;
2 |
3 | import org.eclipse.core.runtime.IProgressMonitor;
4 | import org.eclipse.swt.SWT;
5 | import org.eclipse.swt.layout.GridData;
6 | import org.eclipse.swt.layout.GridLayout;
7 | import org.eclipse.swt.widgets.Button;
8 | import org.eclipse.swt.widgets.Composite;
9 | import org.eclipse.swt.widgets.Label;
10 | import org.eclipse.swt.widgets.Text;
11 | import org.eclipse.ui.IEditorInput;
12 | import org.eclipse.ui.IEditorSite;
13 | import org.eclipse.ui.IFileEditorInput;
14 | import org.eclipse.ui.PartInitException;
15 | import org.eclipse.ui.part.EditorPart;
16 |
17 | import com.google.common.base.Preconditions;
18 |
19 | public class ConversionModuleEditor extends EditorPart {
20 |
21 | @Override
22 | public void init(IEditorSite site, IEditorInput input) throws PartInitException {
23 | Preconditions.checkArgument(input instanceof IFileEditorInput, "IFileEditorInput expected, but actual: %s",
24 | input);
25 |
26 | setSite(site);
27 | setInput(input);
28 | }
29 |
30 | @Override
31 | public void doSave(IProgressMonitor monitor) {
32 | // TODO Автоматически созданная заглушка метода
33 |
34 | }
35 |
36 | @Override
37 | public void doSaveAs() {
38 | // TODO Автоматически созданная заглушка метода
39 |
40 | }
41 |
42 | @Override
43 | public boolean isDirty() {
44 | // TODO Автоматически созданная заглушка метода
45 | return false;
46 | }
47 |
48 | @Override
49 | public boolean isSaveAsAllowed() {
50 | // TODO Автоматически созданная заглушка метода
51 | return false;
52 | }
53 |
54 | @Override
55 | public void createPartControl(Composite parent) {
56 | GridLayout layout = new GridLayout();
57 | layout.numColumns = 2;
58 | parent.setLayout(layout);
59 | new Label(parent, SWT.NONE).setText("Summary");
60 | Text text = new Text(parent, SWT.BORDER);
61 | text.setText("111");
62 | text.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
63 |
64 | new Label(parent, SWT.NONE).setText("Description");
65 | Text lastName = new Text(parent, SWT.BORDER);
66 | lastName.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
67 | lastName.setText("222");
68 |
69 | new Label(parent, SWT.NONE).setText("Done");
70 | Button doneBtn = new Button(parent, SWT.CHECK);
71 | doneBtn.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
72 | doneBtn.setSelection(true);
73 | }
74 |
75 | @Override
76 | public void setFocus() {
77 | // TODO Автоматически созданная заглушка метода
78 |
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/plugin.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/plugin Зарубежнефть.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/Activator.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui;
2 |
3 | import org.eclipse.core.runtime.IStatus;
4 | import org.eclipse.core.runtime.Status;
5 | import org.eclipse.jface.resource.ImageDescriptor;
6 | import org.eclipse.ui.plugin.AbstractUIPlugin;
7 | import org.osgi.framework.BundleContext;
8 |
9 | import com.google.inject.Guice;
10 | import com.google.inject.Injector;
11 |
12 | public class Activator extends AbstractUIPlugin {
13 |
14 | public static final String PLUGIN_ID = "ru.capralow.dt.conversion.plugin.ui"; //$NON-NLS-1$
15 | private static Activator plugin;
16 |
17 | private BundleContext bundleContext;
18 |
19 | private Injector injector;
20 |
21 | public static Activator getDefault() {
22 | return plugin;
23 | }
24 |
25 | public static void log(IStatus status) {
26 | plugin.getLog().log(status);
27 | }
28 |
29 | public static void logError(Throwable throwable) {
30 | log(createErrorStatus(throwable.getMessage(), throwable));
31 | }
32 |
33 | public static IStatus createErrorStatus(String message, Throwable throwable) {
34 | return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, throwable);
35 | }
36 |
37 | public static IStatus createWarningStatus(String message) {
38 | return new Status(IStatus.WARNING, PLUGIN_ID, 0, message, null);
39 | }
40 |
41 | public static IStatus createWarningStatus(final String message, Exception throwable) {
42 | return new Status(IStatus.WARNING, PLUGIN_ID, 0, message, throwable);
43 | }
44 |
45 | @Override
46 | public void start(BundleContext bundleContext) throws Exception {
47 | super.start(bundleContext);
48 |
49 | this.bundleContext = bundleContext;
50 | plugin = this;
51 | }
52 |
53 | @Override
54 | public void stop(BundleContext bundleContext) throws Exception {
55 | plugin = null;
56 | super.stop(bundleContext);
57 | }
58 |
59 | protected BundleContext getContext() {
60 | return bundleContext;
61 | }
62 |
63 | public synchronized Injector getInjector() {
64 | if (injector == null)
65 | return injector = createInjector();
66 | return injector;
67 | }
68 |
69 | private Injector createInjector() {
70 | try {
71 | return Guice.createInjector(new ConversionExternalDependenciesModule(this));
72 | } catch (Exception e) {
73 | throw new RuntimeException("Failed to create injector for " + getBundle().getSymbolicName(), e);
74 | }
75 | }
76 |
77 | public static ImageDescriptor getImageDescriptor(String name) {
78 | String iconPath = "icons/";
79 | return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, iconPath + name);
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/ExchangePlanContentImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import com._1c.g5.v8.bm.core.BmObject;
6 |
7 | import org.eclipse.emf.ecore.EClass;
8 |
9 | import ru.capralow.dt.conversion.plugin.core.rm.AutoRegistration;
10 | import ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent;
11 | import ru.capralow.dt.conversion.plugin.core.rm.RmPackage;
12 |
13 | /**
14 | *
15 | * An implementation of the model object 'Exchange Plan Content '.
16 | *
17 | *
18 | * The following features are implemented:
19 | *
20 | *
21 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.ExchangePlanContentImpl#getMdObject Md Object }
22 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.ExchangePlanContentImpl#getAutoRecord Auto Record }
23 | *
24 | *
25 | * @generated
26 | */
27 | public class ExchangePlanContentImpl extends BmObject implements ExchangePlanContent {
28 | /**
29 | *
30 | *
31 | * @generated
32 | */
33 | public ExchangePlanContentImpl() {
34 | super();
35 | }
36 |
37 | /**
38 | *
39 | *
40 | * @generated
41 | */
42 | @Override
43 | protected EClass eStaticClass() {
44 | return RmPackage.Literals.EXCHANGE_PLAN_CONTENT;
45 | }
46 |
47 | /**
48 | *
49 | *
50 | * @generated
51 | */
52 | @Override
53 | protected int eStaticFeatureCount() {
54 | return 0;
55 | }
56 |
57 | /**
58 | *
59 | *
60 | * @generated
61 | */
62 | public String getMdObject() {
63 | return (String)eGet(RmPackage.Literals.EXCHANGE_PLAN_CONTENT__MD_OBJECT, true);
64 | }
65 |
66 | /**
67 | *
68 | *
69 | * @generated
70 | */
71 | public void setMdObject(String newMdObject) {
72 | eSet(RmPackage.Literals.EXCHANGE_PLAN_CONTENT__MD_OBJECT, newMdObject);
73 | }
74 |
75 | /**
76 | *
77 | *
78 | * @generated
79 | */
80 | public AutoRegistration getAutoRecord() {
81 | return (AutoRegistration)eGet(RmPackage.Literals.EXCHANGE_PLAN_CONTENT__AUTO_RECORD, true);
82 | }
83 |
84 | /**
85 | *
86 | *
87 | * @generated
88 | */
89 | public void setAutoRecord(AutoRegistration newAutoRecord) {
90 | eSet(RmPackage.Literals.EXCHANGE_PLAN_CONTENT__AUTO_RECORD, newAutoRecord);
91 | }
92 |
93 | } //ExchangePlanContentImpl
94 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/cpExtensionImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import org.eclipse.emf.ecore.EClass;
6 |
7 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
8 |
9 | import ru.capralow.dt.conversion.plugin.core.cp.CpPackage;
10 | import ru.capralow.dt.conversion.plugin.core.cp.cpExtension;
11 |
12 | /**
13 | *
14 | * An implementation of the model object 'cp Extension '.
15 | *
16 | *
17 | * The following features are implemented:
18 | *
19 | *
20 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExtensionImpl#getConfigurationObject Configuration Object }
21 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExtensionImpl#getConfigurationName Configuration Name }
22 | *
23 | *
24 | * @generated
25 | */
26 | public class cpExtensionImpl extends MinimalEObjectImpl.Container implements cpExtension {
27 | /**
28 | *
29 | *
30 | * @generated
31 | */
32 | public cpExtensionImpl() {
33 | super();
34 | }
35 |
36 | /**
37 | *
38 | *
39 | * @generated
40 | */
41 | @Override
42 | protected EClass eStaticClass() {
43 | return CpPackage.Literals.CP_EXTENSION;
44 | }
45 |
46 | /**
47 | *
48 | *
49 | * @generated
50 | */
51 | @Override
52 | protected int eStaticFeatureCount() {
53 | return 0;
54 | }
55 |
56 | /**
57 | *
58 | *
59 | * @generated
60 | */
61 | public Object getConfigurationObject() {
62 | return (Object)eGet(CpPackage.Literals.CP_EXTENSION__CONFIGURATION_OBJECT, true);
63 | }
64 |
65 | /**
66 | *
67 | *
68 | * @generated
69 | */
70 | public void setConfigurationObject(Object newConfigurationObject) {
71 | eSet(CpPackage.Literals.CP_EXTENSION__CONFIGURATION_OBJECT, newConfigurationObject);
72 | }
73 |
74 | /**
75 | *
76 | *
77 | * @generated
78 | */
79 | public String getConfigurationName() {
80 | return (String)eGet(CpPackage.Literals.CP_EXTENSION__CONFIGURATION_NAME, true);
81 | }
82 |
83 | /**
84 | *
85 | *
86 | * @generated
87 | */
88 | public void setConfigurationName(String newConfigurationName) {
89 | eSet(CpPackage.Literals.CP_EXTENSION__CONFIGURATION_NAME, newConfigurationName);
90 | }
91 |
92 | } //cpExtensionImpl
93 |
--------------------------------------------------------------------------------
/repository/target/p2agent/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/description=
3 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/enabled=false
4 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/isSystem=true
5 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/name=module-metadata-repository@C\:\\git\\ru.capralow.dt.conversion\\repository\\target
6 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/provider=
7 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/suffix=p2content.xml
8 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/type=org.eclipse.tycho.repository.module.ModuleMetadataRepository
9 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/
10 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/version=1.0.0
11 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/description=
12 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/enabled=true
13 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/isSystem=false
14 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/name=\u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 20180825-1756
15 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/provider=
16 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
17 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/repository/
18 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/version=1
19 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/enabled=false
20 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/isSystem=true
21 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/name=TychoTargetPlatform
22 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/suffix=content.xml
23 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
24 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/targetPlatformRepository/
25 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_targetPlatformRepository/version=0.0.1
26 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/cpExtension.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import org.eclipse.emf.ecore.EObject;
6 |
7 | /**
8 | *
9 | * A representation of the model object 'cp Extension '.
10 | *
11 | *
12 | *
13 | * The following features are supported:
14 | *
15 | *
16 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension#getConfigurationObject Configuration Object }
17 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension#getConfigurationName Configuration Name }
18 | *
19 | *
20 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExtension()
21 | * @model
22 | * @generated
23 | */
24 | public interface cpExtension extends EObject {
25 | /**
26 | * Returns the value of the 'Configuration Object ' attribute.
27 | *
28 | *
29 | * If the meaning of the 'Configuration Object ' attribute isn't clear,
30 | * there really should be more of a description here...
31 | *
32 | *
33 | * @return the value of the 'Configuration Object ' attribute.
34 | * @see #setConfigurationObject(Object)
35 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExtension_ConfigurationObject()
36 | * @model unique="false"
37 | * @generated
38 | */
39 | Object getConfigurationObject();
40 |
41 | /**
42 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension#getConfigurationObject Configuration Object }' attribute.
43 | *
44 | *
45 | * @param value the new value of the 'Configuration Object ' attribute.
46 | * @see #getConfigurationObject()
47 | * @generated
48 | */
49 | void setConfigurationObject(Object value);
50 |
51 | /**
52 | * Returns the value of the 'Configuration Name ' attribute.
53 | *
54 | *
55 | * If the meaning of the 'Configuration Name ' attribute isn't clear,
56 | * there really should be more of a description here...
57 | *
58 | *
59 | * @return the value of the 'Configuration Name ' attribute.
60 | * @see #setConfigurationName(String)
61 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExtension_ConfigurationName()
62 | * @model unique="false"
63 | * @generated
64 | */
65 | String getConfigurationName();
66 |
67 | /**
68 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension#getConfigurationName Configuration Name }' attribute.
69 | *
70 | *
71 | * @param value the new value of the 'Configuration Name ' attribute.
72 | * @see #getConfigurationName()
73 | * @generated
74 | */
75 | void setConfigurationName(String value);
76 |
77 | } // cpExtension
78 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/ExchangePlanContent.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm;
4 |
5 | import com._1c.g5.v8.bm.core.IBmObject;
6 |
7 | /**
8 | *
9 | * A representation of the model object 'Exchange Plan Content '.
10 | *
11 | *
12 | *
13 | * The following features are supported:
14 | *
15 | *
16 | * {@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent#getMdObject Md Object }
17 | * {@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent#getAutoRecord Auto Record }
18 | *
19 | *
20 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getExchangePlanContent()
21 | * @model
22 | * @extends IBmObject
23 | * @generated
24 | */
25 | public interface ExchangePlanContent extends IBmObject {
26 | /**
27 | * Returns the value of the 'Md Object ' attribute.
28 | *
29 | *
30 | * If the meaning of the 'Md Object ' attribute isn't clear,
31 | * there really should be more of a description here...
32 | *
33 | *
34 | * @return the value of the 'Md Object ' attribute.
35 | * @see #setMdObject(String)
36 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getExchangePlanContent_MdObject()
37 | * @model unique="false"
38 | * @generated
39 | */
40 | String getMdObject();
41 |
42 | /**
43 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent#getMdObject Md Object }' attribute.
44 | *
45 | *
46 | * @param value the new value of the 'Md Object ' attribute.
47 | * @see #getMdObject()
48 | * @generated
49 | */
50 | void setMdObject(String value);
51 |
52 | /**
53 | * Returns the value of the 'Auto Record ' attribute.
54 | * The literals are from the enumeration {@link ru.capralow.dt.conversion.plugin.core.rm.AutoRegistration}.
55 | *
56 | *
57 | * If the meaning of the 'Auto Record ' attribute isn't clear,
58 | * there really should be more of a description here...
59 | *
60 | *
61 | * @return the value of the 'Auto Record ' attribute.
62 | * @see ru.capralow.dt.conversion.plugin.core.rm.AutoRegistration
63 | * @see #setAutoRecord(AutoRegistration)
64 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getExchangePlanContent_AutoRecord()
65 | * @model unique="false"
66 | * @generated
67 | */
68 | AutoRegistration getAutoRecord();
69 |
70 | /**
71 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent#getAutoRecord Auto Record }' attribute.
72 | *
73 | *
74 | * @param value the new value of the 'Auto Record ' attribute.
75 | * @see ru.capralow.dt.conversion.plugin.core.rm.AutoRegistration
76 | * @see #getAutoRecord()
77 | * @generated
78 | */
79 | void setAutoRecord(AutoRegistration value);
80 |
81 | } // ExchangePlanContent
82 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/cpFormatVersionImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import com._1c.g5.v8.dt.bsl.model.Module;
6 |
7 | import org.eclipse.emf.ecore.EClass;
8 |
9 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
10 |
11 | import ru.capralow.dt.conversion.plugin.core.cp.CpPackage;
12 | import ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion;
13 |
14 | /**
15 | *
16 | * An implementation of the model object 'cp Format Version '.
17 | *
18 | *
19 | * The following features are implemented:
20 | *
21 | *
22 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpFormatVersionImpl#getVersion Version }
23 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpFormatVersionImpl#getConfigurationName Configuration Name }
24 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpFormatVersionImpl#getModule Module }
25 | *
26 | *
27 | * @generated
28 | */
29 | public class cpFormatVersionImpl extends MinimalEObjectImpl.Container implements cpFormatVersion {
30 | /**
31 | *
32 | *
33 | * @generated
34 | */
35 | public cpFormatVersionImpl() {
36 | super();
37 | }
38 |
39 | /**
40 | *
41 | *
42 | * @generated
43 | */
44 | @Override
45 | protected EClass eStaticClass() {
46 | return CpPackage.Literals.CP_FORMAT_VERSION;
47 | }
48 |
49 | /**
50 | *
51 | *
52 | * @generated
53 | */
54 | @Override
55 | protected int eStaticFeatureCount() {
56 | return 0;
57 | }
58 |
59 | /**
60 | *
61 | *
62 | * @generated
63 | */
64 | public String getVersion() {
65 | return (String)eGet(CpPackage.Literals.CP_FORMAT_VERSION__VERSION, true);
66 | }
67 |
68 | /**
69 | *
70 | *
71 | * @generated
72 | */
73 | public void setVersion(String newVersion) {
74 | eSet(CpPackage.Literals.CP_FORMAT_VERSION__VERSION, newVersion);
75 | }
76 |
77 | /**
78 | *
79 | *
80 | * @generated
81 | */
82 | public String getConfigurationName() {
83 | return (String)eGet(CpPackage.Literals.CP_FORMAT_VERSION__CONFIGURATION_NAME, true);
84 | }
85 |
86 | /**
87 | *
88 | *
89 | * @generated
90 | */
91 | public void setConfigurationName(String newConfigurationName) {
92 | eSet(CpPackage.Literals.CP_FORMAT_VERSION__CONFIGURATION_NAME, newConfigurationName);
93 | }
94 |
95 | /**
96 | *
97 | *
98 | * @generated
99 | */
100 | public Module getModule() {
101 | return (Module)eGet(CpPackage.Literals.CP_FORMAT_VERSION__MODULE, true);
102 | }
103 |
104 | /**
105 | *
106 | *
107 | * @generated
108 | */
109 | public void setModule(Module newModule) {
110 | eSet(CpPackage.Literals.CP_FORMAT_VERSION__MODULE, newModule);
111 | }
112 |
113 | } //cpFormatVersionImpl
114 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/cpExchangePairImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import org.eclipse.emf.common.util.EList;
6 |
7 | import org.eclipse.emf.ecore.EClass;
8 |
9 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
10 |
11 | import ru.capralow.dt.conversion.plugin.core.cp.CpPackage;
12 | import ru.capralow.dt.conversion.plugin.core.cp.ExchangePairStatus;
13 | import ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair;
14 |
15 | /**
16 | *
17 | * An implementation of the model object 'cp Exchange Pair '.
18 | *
19 | *
20 | * The following features are implemented:
21 | *
22 | *
23 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExchangePairImpl#getConfigurationName1 Configuration Name1 }
24 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExchangePairImpl#getConfigurationName2 Configuration Name2 }
25 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExchangePairImpl#getStatus Status }
26 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpExchangePairImpl#getVersions Versions }
27 | *
28 | *
29 | * @generated
30 | */
31 | public class cpExchangePairImpl extends MinimalEObjectImpl.Container implements cpExchangePair {
32 | /**
33 | *
34 | *
35 | * @generated
36 | */
37 | public cpExchangePairImpl() {
38 | super();
39 | }
40 |
41 | /**
42 | *
43 | *
44 | * @generated
45 | */
46 | @Override
47 | protected EClass eStaticClass() {
48 | return CpPackage.Literals.CP_EXCHANGE_PAIR;
49 | }
50 |
51 | /**
52 | *
53 | *
54 | * @generated
55 | */
56 | @Override
57 | protected int eStaticFeatureCount() {
58 | return 0;
59 | }
60 |
61 | /**
62 | *
63 | *
64 | * @generated
65 | */
66 | public String getConfigurationName1() {
67 | return (String)eGet(CpPackage.Literals.CP_EXCHANGE_PAIR__CONFIGURATION_NAME1, true);
68 | }
69 |
70 | /**
71 | *
72 | *
73 | * @generated
74 | */
75 | public void setConfigurationName1(String newConfigurationName1) {
76 | eSet(CpPackage.Literals.CP_EXCHANGE_PAIR__CONFIGURATION_NAME1, newConfigurationName1);
77 | }
78 |
79 | /**
80 | *
81 | *
82 | * @generated
83 | */
84 | public String getConfigurationName2() {
85 | return (String)eGet(CpPackage.Literals.CP_EXCHANGE_PAIR__CONFIGURATION_NAME2, true);
86 | }
87 |
88 | /**
89 | *
90 | *
91 | * @generated
92 | */
93 | public void setConfigurationName2(String newConfigurationName2) {
94 | eSet(CpPackage.Literals.CP_EXCHANGE_PAIR__CONFIGURATION_NAME2, newConfigurationName2);
95 | }
96 |
97 | /**
98 | *
99 | *
100 | * @generated
101 | */
102 | public ExchangePairStatus getStatus() {
103 | return (ExchangePairStatus)eGet(CpPackage.Literals.CP_EXCHANGE_PAIR__STATUS, true);
104 | }
105 |
106 | /**
107 | *
108 | *
109 | * @generated
110 | */
111 | public void setStatus(ExchangePairStatus newStatus) {
112 | eSet(CpPackage.Literals.CP_EXCHANGE_PAIR__STATUS, newStatus);
113 | }
114 |
115 | /**
116 | *
117 | *
118 | * @generated
119 | */
120 | @SuppressWarnings("unchecked")
121 | public EList getVersions() {
122 | return (EList)eGet(CpPackage.Literals.CP_EXCHANGE_PAIR__VERSIONS, true);
123 | }
124 |
125 | } //cpExchangePairImpl
126 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src/ru/capralow/dt/conversion/plugin/core/cp/ConversionPanelContentProvider.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.core.cp;
2 |
3 | import java.util.Iterator;
4 |
5 | import org.eclipse.emf.common.util.EList;
6 | import org.eclipse.jface.viewers.ITreeContentProvider;
7 | import org.eclipse.jface.viewers.Viewer;
8 |
9 | public class ConversionPanelContentProvider implements ITreeContentProvider {
10 |
11 | @Override
12 | public Object[] getElements(Object conversionPanel) {
13 | EList exchangePairs = ((ConversionPanel) conversionPanel).getExchangePairs();
14 | EList configurations = ((ConversionPanel) conversionPanel).getConfigurations();
15 |
16 | Object[] treeContent = new Object[exchangePairs.size() + configurations.size()];
17 |
18 | int i = 0;
19 |
20 | Iterator itr1 = exchangePairs.iterator();
21 | while (itr1.hasNext()) {
22 | cpExchangePair cpExchangePair = itr1.next();
23 |
24 | treeContent[i] = cpExchangePair;
25 | i++;
26 | }
27 | Iterator itr2 = configurations.iterator();
28 | while (itr2.hasNext()) {
29 | cpConfiguration cpConfiguration = itr2.next();
30 |
31 | treeContent[i] = cpConfiguration;
32 | i++;
33 | }
34 |
35 | return treeContent;
36 | }
37 |
38 | @Override
39 | public Object[] getChildren(Object arg0) {
40 | if (arg0 instanceof cpExchangePair) {
41 | EList availableFormatVersions = ((cpExchangePair) arg0).getVersions();
42 |
43 | int treeSize = 1;
44 | if (availableFormatVersions.size() != 0) {
45 | treeSize++;
46 | }
47 | Object[] treeContent = new Object[treeSize];
48 |
49 | treeContent[0] = ((cpExchangePair) arg0).getStatus();
50 |
51 | if (availableFormatVersions.size() != 0) {
52 | treeContent[1] = availableFormatVersions;
53 | }
54 |
55 | return treeContent;
56 |
57 | } else if (arg0 instanceof cpConfiguration) {
58 | EList availableFormatVersions = ((cpConfiguration) arg0).getAvailableFormatVersions();
59 | String storeVersion = ((cpConfiguration) arg0).getStoreVersion();
60 |
61 | int treeSize = 1;
62 | if (storeVersion != null) {
63 | treeSize++;
64 | }
65 | if (availableFormatVersions.size() != 0) {
66 | treeSize++;
67 | }
68 | Object[] treeContent = new Object[treeSize];
69 |
70 | treeContent[0] = ((cpConfiguration) arg0).getStatus();
71 |
72 | int i = 0;
73 | if (storeVersion != null) {
74 | i++;
75 | treeContent[i] = "Версия модуля обмена данными: " + storeVersion;
76 | }
77 |
78 | if (availableFormatVersions.size() != 0) {
79 | i++;
80 | treeContent[i] = availableFormatVersions;
81 | }
82 |
83 | return treeContent;
84 |
85 | } else if (arg0 instanceof EList>) {
86 | EList availableFormatVersions = (EList) arg0;
87 |
88 | Object[] treeContent = new Object[availableFormatVersions.size()];
89 |
90 | int i = 0;
91 | Iterator itr = (Iterator) availableFormatVersions.iterator();
92 | while (itr.hasNext()) {
93 | treeContent[i] = itr.next();
94 | i++;
95 | }
96 |
97 | return treeContent;
98 |
99 | }
100 |
101 | return new Object[0];
102 | }
103 |
104 | @Override
105 | public Object getParent(Object arg0) {
106 | return null;
107 | }
108 |
109 | @Override
110 | public boolean hasChildren(Object arg0) {
111 | if (arg0 instanceof cpExchangePair) {
112 | return true;
113 |
114 | } else if (arg0 instanceof cpConfiguration) {
115 | return true;
116 |
117 | } else if (arg0 instanceof EList) {
118 | return ((EList>) arg0).size() != 0;
119 |
120 | }
121 |
122 | return false;
123 | }
124 |
125 | @Override
126 | public void dispose() {
127 | // TODO Автоматически созданная заглушка метода
128 |
129 | }
130 |
131 | @Override
132 | public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
133 | // TODO Автоматически созданная заглушка метода
134 |
135 | }
136 |
137 | }
138 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/ConversionPanel.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import org.eclipse.emf.common.util.EList;
6 |
7 | import org.eclipse.emf.ecore.EObject;
8 |
9 | /**
10 | *
11 | * A representation of the model object 'Conversion Panel '.
12 | *
13 | *
14 | *
15 | * The following features are supported:
16 | *
17 | *
18 | * {@link ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel#getExchangePairs Exchange Pairs }
19 | * {@link ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel#getConfigurations Configurations }
20 | *
21 | *
22 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getConversionPanel()
23 | * @model
24 | * @generated
25 | */
26 | public interface ConversionPanel extends EObject {
27 | /**
28 | * Returns the value of the 'Exchange Pairs ' containment reference list.
29 | * The list contents are of type {@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair}.
30 | *
31 | *
32 | * If the meaning of the 'Exchange Pairs ' containment reference list isn't clear,
33 | * there really should be more of a description here...
34 | *
35 | *
36 | * @return the value of the 'Exchange Pairs ' containment reference list.
37 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getConversionPanel_ExchangePairs()
38 | * @model containment="true"
39 | * @generated
40 | */
41 | EList getExchangePairs();
42 |
43 | /**
44 | * Returns the value of the 'Configurations ' containment reference list.
45 | * The list contents are of type {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration}.
46 | *
47 | *
48 | * If the meaning of the 'Configurations ' containment reference list isn't clear,
49 | * there really should be more of a description here...
50 | *
51 | *
52 | * @return the value of the 'Configurations ' containment reference list.
53 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getConversionPanel_Configurations()
54 | * @model containment="true"
55 | * @generated
56 | */
57 | EList getConfigurations();
58 |
59 | /**
60 | *
61 | *
62 | * @model unique="false" configurationNameUnique="false"
63 | * annotation="http://www.eclipse.org/emf/2002/GenModel body='<%org.eclipse.emf.common.util.EList%><<%ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration%>> _configurations = this.getConfigurations();\nfor (final <%ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration%> configuration : _configurations)\n{\n\t<%java.lang.String%> _configurationName = configuration.getConfigurationName();\n\tboolean _equals = <%com.google.common.base.Objects%>.equal(configurationName, _configurationName);\n\tif (_equals)\n\t{\n\t\treturn configuration;\n\t}\n}\nreturn null;'"
64 | * @generated
65 | */
66 | cpConfiguration getConfiguration(String configurationName);
67 |
68 | /**
69 | *
70 | *
71 | * @model kind="operation" unique="false"
72 | * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%org.eclipse.emf.common.util.BasicEList%><<%java.lang.Object%>> result = <%org.eclipse.emf.ecore.xcore.lib.XcoreCollectionLiterals%>.<<%java.lang.Object%>>newBasicEList();\n<%org.eclipse.emf.common.util.EList%><<%ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration%>> _configurations = this.getConfigurations();\nfor (final <%ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration%> configuration : _configurations)\n{\n\t<%org.eclipse.emf.common.util.EList%><<%java.lang.Object%>> _coreObjects = configuration.getCoreObjects();\n\tfor (final <%java.lang.Object%> coreObject : _coreObjects)\n\t{\n\t\tresult.add(coreObject);\n\t}\n}\nreturn result;'"
73 | * @generated
74 | */
75 | EList getObjects();
76 |
77 | } // ConversionPanel
78 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/cpFormatVersion.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import com._1c.g5.v8.dt.bsl.model.Module;
6 |
7 | import org.eclipse.emf.ecore.EObject;
8 |
9 | /**
10 | *
11 | * A representation of the model object 'cp Format Version '.
12 | *
13 | *
14 | *
15 | * The following features are supported:
16 | *
17 | *
18 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getVersion Version }
19 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getConfigurationName Configuration Name }
20 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getModule Module }
21 | *
22 | *
23 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpFormatVersion()
24 | * @model
25 | * @generated
26 | */
27 | public interface cpFormatVersion extends EObject {
28 | /**
29 | * Returns the value of the 'Version ' attribute.
30 | *
31 | *
32 | * If the meaning of the 'Version ' attribute isn't clear,
33 | * there really should be more of a description here...
34 | *
35 | *
36 | * @return the value of the 'Version ' attribute.
37 | * @see #setVersion(String)
38 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpFormatVersion_Version()
39 | * @model unique="false"
40 | * @generated
41 | */
42 | String getVersion();
43 |
44 | /**
45 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getVersion Version }' attribute.
46 | *
47 | *
48 | * @param value the new value of the 'Version ' attribute.
49 | * @see #getVersion()
50 | * @generated
51 | */
52 | void setVersion(String value);
53 |
54 | /**
55 | * Returns the value of the 'Configuration Name ' attribute.
56 | *
57 | *
58 | * If the meaning of the 'Configuration Name ' attribute isn't clear,
59 | * there really should be more of a description here...
60 | *
61 | *
62 | * @return the value of the 'Configuration Name ' attribute.
63 | * @see #setConfigurationName(String)
64 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpFormatVersion_ConfigurationName()
65 | * @model unique="false"
66 | * @generated
67 | */
68 | String getConfigurationName();
69 |
70 | /**
71 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getConfigurationName Configuration Name }' attribute.
72 | *
73 | *
74 | * @param value the new value of the 'Configuration Name ' attribute.
75 | * @see #getConfigurationName()
76 | * @generated
77 | */
78 | void setConfigurationName(String value);
79 |
80 | /**
81 | * Returns the value of the 'Module ' containment reference.
82 | *
83 | *
84 | * If the meaning of the 'Module ' containment reference isn't clear,
85 | * there really should be more of a description here...
86 | *
87 | *
88 | * @return the value of the 'Module ' containment reference.
89 | * @see #setModule(Module)
90 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpFormatVersion_Module()
91 | * @model containment="true"
92 | * @generated
93 | */
94 | Module getModule();
95 |
96 | /**
97 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion#getModule Module }' containment reference.
98 | *
99 | *
100 | * @param value the new value of the 'Module ' containment reference.
101 | * @see #getModule()
102 | * @generated
103 | */
104 | void setModule(Module value);
105 |
106 | } // cpFormatVersion
107 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/ConversionPanelImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import com.google.common.base.Objects;
6 |
7 | import java.lang.reflect.InvocationTargetException;
8 |
9 | import org.eclipse.emf.common.util.BasicEList;
10 | import org.eclipse.emf.common.util.EList;
11 |
12 | import org.eclipse.emf.ecore.EClass;
13 |
14 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
15 |
16 | import org.eclipse.emf.ecore.xcore.lib.XcoreCollectionLiterals;
17 |
18 | import ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel;
19 | import ru.capralow.dt.conversion.plugin.core.cp.CpPackage;
20 | import ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration;
21 | import ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair;
22 |
23 | /**
24 | *
25 | * An implementation of the model object 'Conversion Panel '.
26 | *
27 | *
28 | * The following features are implemented:
29 | *
30 | *
31 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.ConversionPanelImpl#getExchangePairs Exchange Pairs }
32 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.ConversionPanelImpl#getConfigurations Configurations }
33 | *
34 | *
35 | * @generated
36 | */
37 | public class ConversionPanelImpl extends MinimalEObjectImpl.Container implements ConversionPanel {
38 | /**
39 | *
40 | *
41 | * @generated
42 | */
43 | public ConversionPanelImpl() {
44 | super();
45 | }
46 |
47 | /**
48 | *
49 | *
50 | * @generated
51 | */
52 | @Override
53 | protected EClass eStaticClass() {
54 | return CpPackage.Literals.CONVERSION_PANEL;
55 | }
56 |
57 | /**
58 | *
59 | *
60 | * @generated
61 | */
62 | @Override
63 | protected int eStaticFeatureCount() {
64 | return 0;
65 | }
66 |
67 | /**
68 | *
69 | *
70 | * @generated
71 | */
72 | @SuppressWarnings("unchecked")
73 | public EList getExchangePairs() {
74 | return (EList)eGet(CpPackage.Literals.CONVERSION_PANEL__EXCHANGE_PAIRS, true);
75 | }
76 |
77 | /**
78 | *
79 | *
80 | * @generated
81 | */
82 | @SuppressWarnings("unchecked")
83 | public EList getConfigurations() {
84 | return (EList)eGet(CpPackage.Literals.CONVERSION_PANEL__CONFIGURATIONS, true);
85 | }
86 |
87 | /**
88 | *
89 | *
90 | * @generated
91 | */
92 | public cpConfiguration getConfiguration(final String configurationName) {
93 | EList _configurations = this.getConfigurations();
94 | for (final cpConfiguration configuration : _configurations) {
95 | String _configurationName = configuration.getConfigurationName();
96 | boolean _equals = Objects.equal(configurationName, _configurationName);
97 | if (_equals) {
98 | return configuration;
99 | }
100 | }
101 | return null;
102 | }
103 |
104 | /**
105 | *
106 | *
107 | * @generated
108 | */
109 | public EList getObjects() {
110 | final BasicEList result = XcoreCollectionLiterals.newBasicEList();
111 | EList _configurations = this.getConfigurations();
112 | for (final cpConfiguration configuration : _configurations) {
113 | EList _coreObjects = configuration.getCoreObjects();
114 | for (final Object coreObject : _coreObjects) {
115 | result.add(coreObject);
116 | }
117 | }
118 | return result;
119 | }
120 |
121 | /**
122 | *
123 | *
124 | * @generated
125 | */
126 | @Override
127 | public Object eInvoke(int operationID, EList> arguments) throws InvocationTargetException {
128 | switch (operationID) {
129 | case CpPackage.CONVERSION_PANEL___GET_CONFIGURATION__STRING:
130 | return getConfiguration((String)arguments.get(0));
131 | case CpPackage.CONVERSION_PANEL___GET_OBJECTS:
132 | return getObjects();
133 | }
134 | return super.eInvoke(operationID, arguments);
135 | }
136 |
137 | } //ConversionPanelImpl
138 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/cpExchangePair.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import org.eclipse.emf.common.util.EList;
6 |
7 | import org.eclipse.emf.ecore.EObject;
8 |
9 | /**
10 | *
11 | * A representation of the model object 'cp Exchange Pair '.
12 | *
13 | *
14 | *
15 | * The following features are supported:
16 | *
17 | *
18 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getConfigurationName1 Configuration Name1 }
19 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getConfigurationName2 Configuration Name2 }
20 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getStatus Status }
21 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getVersions Versions }
22 | *
23 | *
24 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExchangePair()
25 | * @model
26 | * @generated
27 | */
28 | public interface cpExchangePair extends EObject {
29 | /**
30 | * Returns the value of the 'Configuration Name1 ' attribute.
31 | *
32 | *
33 | * If the meaning of the 'Configuration Name1 ' attribute isn't clear,
34 | * there really should be more of a description here...
35 | *
36 | *
37 | * @return the value of the 'Configuration Name1 ' attribute.
38 | * @see #setConfigurationName1(String)
39 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExchangePair_ConfigurationName1()
40 | * @model unique="false"
41 | * @generated
42 | */
43 | String getConfigurationName1();
44 |
45 | /**
46 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getConfigurationName1 Configuration Name1 }' attribute.
47 | *
48 | *
49 | * @param value the new value of the 'Configuration Name1 ' attribute.
50 | * @see #getConfigurationName1()
51 | * @generated
52 | */
53 | void setConfigurationName1(String value);
54 |
55 | /**
56 | * Returns the value of the 'Configuration Name2 ' attribute.
57 | *
58 | *
59 | * If the meaning of the 'Configuration Name2 ' attribute isn't clear,
60 | * there really should be more of a description here...
61 | *
62 | *
63 | * @return the value of the 'Configuration Name2 ' attribute.
64 | * @see #setConfigurationName2(String)
65 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExchangePair_ConfigurationName2()
66 | * @model unique="false"
67 | * @generated
68 | */
69 | String getConfigurationName2();
70 |
71 | /**
72 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getConfigurationName2 Configuration Name2 }' attribute.
73 | *
74 | *
75 | * @param value the new value of the 'Configuration Name2 ' attribute.
76 | * @see #getConfigurationName2()
77 | * @generated
78 | */
79 | void setConfigurationName2(String value);
80 |
81 | /**
82 | * Returns the value of the 'Status ' attribute.
83 | * The literals are from the enumeration {@link ru.capralow.dt.conversion.plugin.core.cp.ExchangePairStatus}.
84 | *
85 | *
86 | * If the meaning of the 'Status ' attribute isn't clear,
87 | * there really should be more of a description here...
88 | *
89 | *
90 | * @return the value of the 'Status ' attribute.
91 | * @see ru.capralow.dt.conversion.plugin.core.cp.ExchangePairStatus
92 | * @see #setStatus(ExchangePairStatus)
93 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExchangePair_Status()
94 | * @model unique="false"
95 | * @generated
96 | */
97 | ExchangePairStatus getStatus();
98 |
99 | /**
100 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair#getStatus Status }' attribute.
101 | *
102 | *
103 | * @param value the new value of the 'Status ' attribute.
104 | * @see ru.capralow.dt.conversion.plugin.core.cp.ExchangePairStatus
105 | * @see #getStatus()
106 | * @generated
107 | */
108 | void setStatus(ExchangePairStatus value);
109 |
110 | /**
111 | * Returns the value of the 'Versions ' attribute list.
112 | * The list contents are of type {@link java.lang.String}.
113 | *
114 | *
115 | * If the meaning of the 'Versions ' attribute list isn't clear,
116 | * there really should be more of a description here...
117 | *
118 | *
119 | * @return the value of the 'Versions ' attribute list.
120 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpExchangePair_Versions()
121 | * @model unique="false"
122 | * @generated
123 | */
124 | EList getVersions();
125 |
126 | } // cpExchangePair
127 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/AutoRegistration.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm;
4 |
5 | import java.util.Arrays;
6 | import java.util.Collections;
7 | import java.util.List;
8 |
9 | import org.eclipse.emf.common.util.Enumerator;
10 |
11 | /**
12 | *
13 | * A representation of the literals of the enumeration 'Auto Registration ',
14 | * and utility methods for working with them.
15 | *
16 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage#getAutoRegistration()
17 | * @model
18 | * @generated
19 | */
20 | public enum AutoRegistration implements Enumerator {
21 | /**
22 | * The 'Allow ' literal object.
23 | *
24 | *
25 | * @see #ALLOW_VALUE
26 | * @generated
27 | * @ordered
28 | */
29 | ALLOW(1, "Allow", "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c"), //$NON-NLS-1$ //$NON-NLS-2$
30 |
31 | /**
32 | * The 'Deny ' literal object.
33 | *
34 | *
35 | * @see #DENY_VALUE
36 | * @generated
37 | * @ordered
38 | */
39 | DENY(0, "Deny", "\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c"); //$NON-NLS-1$ //$NON-NLS-2$
40 |
41 | /**
42 | * The 'Allow ' literal value.
43 | *
44 | *
45 | * If the meaning of 'Allow ' literal object isn't clear,
46 | * there really should be more of a description here...
47 | *
48 | *
49 | * @see #ALLOW
50 | * @model name="Allow" literal="\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c"
51 | * @generated
52 | * @ordered
53 | */
54 | public static final int ALLOW_VALUE = 1;
55 |
56 | /**
57 | * The 'Deny ' literal value.
58 | *
59 | *
60 | * If the meaning of 'Deny ' literal object isn't clear,
61 | * there really should be more of a description here...
62 | *
63 | *
64 | * @see #DENY
65 | * @model name="Deny" literal="\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c"
66 | * @generated
67 | * @ordered
68 | */
69 | public static final int DENY_VALUE = 0;
70 |
71 | /**
72 | * An array of all the 'Auto Registration ' enumerators.
73 | *
74 | *
75 | * @generated
76 | */
77 | private static final AutoRegistration[] VALUES_ARRAY =
78 | new AutoRegistration[] {
79 | ALLOW,
80 | DENY,
81 | };
82 |
83 | /**
84 | * A public read-only list of all the 'Auto Registration ' enumerators.
85 | *
86 | *
87 | * @generated
88 | */
89 | public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
90 |
91 | /**
92 | * Returns the 'Auto Registration ' literal with the specified literal value.
93 | *
94 | *
95 | * @param literal the literal.
96 | * @return the matching enumerator or null.
97 | * @generated
98 | */
99 | public static AutoRegistration get(String literal) {
100 | for (int i = 0; i < VALUES_ARRAY.length; ++i) {
101 | AutoRegistration result = VALUES_ARRAY[i];
102 | if (result.toString().equals(literal)) {
103 | return result;
104 | }
105 | }
106 | return null;
107 | }
108 |
109 | /**
110 | * Returns the 'Auto Registration ' literal with the specified name.
111 | *
112 | *
113 | * @param name the name.
114 | * @return the matching enumerator or null.
115 | * @generated
116 | */
117 | public static AutoRegistration getByName(String name) {
118 | for (int i = 0; i < VALUES_ARRAY.length; ++i) {
119 | AutoRegistration result = VALUES_ARRAY[i];
120 | if (result.getName().equals(name)) {
121 | return result;
122 | }
123 | }
124 | return null;
125 | }
126 |
127 | /**
128 | * Returns the 'Auto Registration ' literal with the specified integer value.
129 | *
130 | *
131 | * @param value the integer value.
132 | * @return the matching enumerator or null.
133 | * @generated
134 | */
135 | public static AutoRegistration get(int value) {
136 | switch (value) {
137 | case ALLOW_VALUE: return ALLOW;
138 | case DENY_VALUE: return DENY;
139 | }
140 | return null;
141 | }
142 |
143 | /**
144 | *
145 | *
146 | * @generated
147 | */
148 | private final int value;
149 |
150 | /**
151 | *
152 | *
153 | * @generated
154 | */
155 | private final String name;
156 |
157 | /**
158 | *
159 | *
160 | * @generated
161 | */
162 | private final String literal;
163 |
164 | /**
165 | * Only this class can construct instances.
166 | *
167 | *
168 | * @generated
169 | */
170 | private AutoRegistration(int value, String name, String literal) {
171 | this.value = value;
172 | this.name = name;
173 | this.literal = literal;
174 | }
175 |
176 | /**
177 | *
178 | *
179 | * @generated
180 | */
181 | public int getValue() {
182 | return value;
183 | }
184 |
185 | /**
186 | *
187 | *
188 | * @generated
189 | */
190 | public String getName() {
191 | return name;
192 | }
193 |
194 | /**
195 | *
196 | *
197 | * @generated
198 | */
199 | public String getLiteral() {
200 | return literal;
201 | }
202 |
203 | /**
204 | * Returns the literal value of the enumerator, which is its string representation.
205 | *
206 | *
207 | * @generated
208 | */
209 | @Override
210 | public String toString() {
211 | return literal;
212 | }
213 |
214 | } //AutoRegistration
215 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/cpConfigurationImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import java.lang.reflect.InvocationTargetException;
6 |
7 | import org.eclipse.emf.common.util.BasicEList;
8 | import org.eclipse.emf.common.util.EList;
9 |
10 | import org.eclipse.emf.ecore.EClass;
11 |
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
13 |
14 | import org.eclipse.emf.ecore.xcore.lib.XcoreCollectionLiterals;
15 |
16 | import ru.capralow.dt.conversion.plugin.core.cp.ConfigurationStatus;
17 | import ru.capralow.dt.conversion.plugin.core.cp.CpPackage;
18 | import ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration;
19 | import ru.capralow.dt.conversion.plugin.core.cp.cpExtension;
20 | import ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion;
21 |
22 | /**
23 | *
24 | * An implementation of the model object 'cp Configuration '.
25 | *
26 | *
27 | * The following features are implemented:
28 | *
29 | *
30 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getConfigurationObject Configuration Object }
31 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getConfigurationName Configuration Name }
32 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getStoreVersion Store Version }
33 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getExtensions Extensions }
34 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getStatus Status }
35 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getAvailableFormatVersions Available Format Versions }
36 | * {@link ru.capralow.dt.conversion.plugin.core.cp.impl.cpConfigurationImpl#getCoreObjects Core Objects }
37 | *
38 | *
39 | * @generated
40 | */
41 | public class cpConfigurationImpl extends MinimalEObjectImpl.Container implements cpConfiguration {
42 | /**
43 | *
44 | *
45 | * @generated
46 | */
47 | public cpConfigurationImpl() {
48 | super();
49 | }
50 |
51 | /**
52 | *
53 | *
54 | * @generated
55 | */
56 | @Override
57 | protected EClass eStaticClass() {
58 | return CpPackage.Literals.CP_CONFIGURATION;
59 | }
60 |
61 | /**
62 | *
63 | *
64 | * @generated
65 | */
66 | @Override
67 | protected int eStaticFeatureCount() {
68 | return 0;
69 | }
70 |
71 | /**
72 | *
73 | *
74 | * @generated
75 | */
76 | public Object getConfigurationObject() {
77 | return (Object)eGet(CpPackage.Literals.CP_CONFIGURATION__CONFIGURATION_OBJECT, true);
78 | }
79 |
80 | /**
81 | *
82 | *
83 | * @generated
84 | */
85 | public void setConfigurationObject(Object newConfigurationObject) {
86 | eSet(CpPackage.Literals.CP_CONFIGURATION__CONFIGURATION_OBJECT, newConfigurationObject);
87 | }
88 |
89 | /**
90 | *
91 | *
92 | * @generated
93 | */
94 | public String getConfigurationName() {
95 | return (String)eGet(CpPackage.Literals.CP_CONFIGURATION__CONFIGURATION_NAME, true);
96 | }
97 |
98 | /**
99 | *
100 | *
101 | * @generated
102 | */
103 | public void setConfigurationName(String newConfigurationName) {
104 | eSet(CpPackage.Literals.CP_CONFIGURATION__CONFIGURATION_NAME, newConfigurationName);
105 | }
106 |
107 | /**
108 | *
109 | *
110 | * @generated
111 | */
112 | public String getStoreVersion() {
113 | return (String)eGet(CpPackage.Literals.CP_CONFIGURATION__STORE_VERSION, true);
114 | }
115 |
116 | /**
117 | *
118 | *
119 | * @generated
120 | */
121 | public void setStoreVersion(String newStoreVersion) {
122 | eSet(CpPackage.Literals.CP_CONFIGURATION__STORE_VERSION, newStoreVersion);
123 | }
124 |
125 | /**
126 | *
127 | *
128 | * @generated
129 | */
130 | @SuppressWarnings("unchecked")
131 | public EList getExtensions() {
132 | return (EList)eGet(CpPackage.Literals.CP_CONFIGURATION__EXTENSIONS, true);
133 | }
134 |
135 | /**
136 | *
137 | *
138 | * @generated
139 | */
140 | public ConfigurationStatus getStatus() {
141 | return (ConfigurationStatus)eGet(CpPackage.Literals.CP_CONFIGURATION__STATUS, true);
142 | }
143 |
144 | /**
145 | *
146 | *
147 | * @generated
148 | */
149 | public void setStatus(ConfigurationStatus newStatus) {
150 | eSet(CpPackage.Literals.CP_CONFIGURATION__STATUS, newStatus);
151 | }
152 |
153 | /**
154 | *
155 | *
156 | * @generated
157 | */
158 | @SuppressWarnings("unchecked")
159 | public EList getAvailableFormatVersions() {
160 | return (EList)eGet(CpPackage.Literals.CP_CONFIGURATION__AVAILABLE_FORMAT_VERSIONS, true);
161 | }
162 |
163 | /**
164 | *
165 | *
166 | * @generated
167 | */
168 | @SuppressWarnings("unchecked")
169 | public EList getCoreObjects() {
170 | return (EList)eGet(CpPackage.Literals.CP_CONFIGURATION__CORE_OBJECTS, true);
171 | }
172 |
173 | /**
174 | *
175 | *
176 | * @generated
177 | */
178 | public EList getVersions() {
179 | final BasicEList result = XcoreCollectionLiterals.newBasicEList();
180 | EList _availableFormatVersions = this.getAvailableFormatVersions();
181 | for (final cpFormatVersion formatVersion : _availableFormatVersions) {
182 | result.add(formatVersion.getVersion());
183 | }
184 | return result;
185 | }
186 |
187 | /**
188 | *
189 | *
190 | * @generated
191 | */
192 | @Override
193 | public Object eInvoke(int operationID, EList> arguments) throws InvocationTargetException {
194 | switch (operationID) {
195 | case CpPackage.CP_CONFIGURATION___GET_VERSIONS:
196 | return getVersions();
197 | }
198 | return super.eInvoke(operationID, arguments);
199 | }
200 |
201 | } //cpConfigurationImpl
202 |
--------------------------------------------------------------------------------
/repository/target/p2agent/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.artifact.repository.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | repositories/file\:_C\:_Users_papa_.m2_repository/description=
3 | repositories/file\:_C\:_Users_papa_.m2_repository/enabled=true
4 | repositories/file\:_C\:_Users_papa_.m2_repository/isSystem=false
5 | repositories/file\:_C\:_Users_papa_.m2_repository/provider=
6 | repositories/file\:_C\:_Users_papa_.m2_repository/suffix=.meta/p2-artifacts.properties
7 | repositories/file\:_C\:_Users_papa_.m2_repository/uri=file\:/C\:/Users/papa/.m2/repository/
8 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/description=
9 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/enabled=true
10 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/isSystem=false
11 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/provider=
12 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/suffix=p2artifacts.xml
13 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/
14 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/description=
15 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/enabled=true
16 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/isSystem=true
17 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/name=download cache
18 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/provider=
19 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
20 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/p2agent/org.eclipse.equinox.p2.core/cache/
21 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_p2agent_org.eclipse.equinox.p2.core_cache/version=1
22 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/description=
23 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/enabled=true
24 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/isSystem=false
25 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/name=\u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 20180825-1756
26 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/provider=
27 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
28 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/uri=file\:/C\:/git/ru.capralow.dt.conversion/repository/target/repository/
29 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_repository_target_repository/version=1.0.0
30 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/description=
31 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/enabled=true
32 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/isSystem=false
33 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/provider=
34 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/suffix=p2artifacts.xml
35 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.core_target/uri=file\:/C\:/git/ru.capralow.dt.conversion/ru.capralow.dt.conversion.plugin.core/target/
36 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/description=
37 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/enabled=true
38 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/isSystem=false
39 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/provider=
40 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/suffix=p2artifacts.xml
41 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.feature_target/uri=file\:/C\:/git/ru.capralow.dt.conversion/ru.capralow.dt.conversion.plugin.feature/target/
42 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/description=
43 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/enabled=true
44 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/isSystem=false
45 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/provider=
46 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/suffix=p2artifacts.xml
47 | repositories/file\:_C\:_git_ru.capralow.dt.conversion_ru.capralow.dt.conversion.plugin.ui_target/uri=file\:/C\:/git/ru.capralow.dt.conversion/ru.capralow.dt.conversion.plugin.ui/target/
48 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/description=Read-only repository adapter for org.eclipse.tycho.p2.target.TargetPlatformBundlePublisher$PublishedBundlesArtifactRepository@589bc446
49 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/enabled=true
50 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/isSystem=false
51 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/provider=
52 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/suffix=@memory
53 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/type=ProviderOnlyArtifactRepository
54 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/uri=file\:/resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository
55 | repositories/file\:_resolution-context-artifacts@C%253A%255Cgit%255Cru.capralow.dt.conversion%255Crepository/version=1.0
56 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/util/CpAdapterFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.util;
4 |
5 | import org.eclipse.emf.common.notify.Adapter;
6 | import org.eclipse.emf.common.notify.Notifier;
7 |
8 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
9 |
10 | import org.eclipse.emf.ecore.EObject;
11 |
12 | import ru.capralow.dt.conversion.plugin.core.cp.*;
13 |
14 | /**
15 | *
16 | * The Adapter Factory for the model.
17 | * It provides an adapter createXXX method for each class of the model.
18 | *
19 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage
20 | * @generated
21 | */
22 | public class CpAdapterFactory extends AdapterFactoryImpl {
23 | /**
24 | * The cached model package.
25 | *
26 | *
27 | * @generated
28 | */
29 | protected static CpPackage modelPackage;
30 |
31 | /**
32 | * Creates an instance of the adapter factory.
33 | *
34 | *
35 | * @generated
36 | */
37 | public CpAdapterFactory() {
38 | if (modelPackage == null) {
39 | modelPackage = CpPackage.eINSTANCE;
40 | }
41 | }
42 |
43 | /**
44 | * Returns whether this factory is applicable for the type of the object.
45 | *
46 | * This implementation returns true if the object is either the model's package or is an instance object of the model.
47 | *
48 | * @return whether this factory is applicable for the type of the object.
49 | * @generated
50 | */
51 | @Override
52 | public boolean isFactoryForType(Object object) {
53 | if (object == modelPackage) {
54 | return true;
55 | }
56 | if (object instanceof EObject) {
57 | return ((EObject)object).eClass().getEPackage() == modelPackage;
58 | }
59 | return false;
60 | }
61 |
62 | /**
63 | * The switch that delegates to the createXXX methods.
64 | *
65 | *
66 | * @generated
67 | */
68 | protected CpSwitch modelSwitch =
69 | new CpSwitch() {
70 | @Override
71 | public Adapter caseConversionPanel(ConversionPanel object) {
72 | return createConversionPanelAdapter();
73 | }
74 | @Override
75 | public Adapter casecpConfiguration(cpConfiguration object) {
76 | return createcpConfigurationAdapter();
77 | }
78 | @Override
79 | public Adapter casecpExtension(cpExtension object) {
80 | return createcpExtensionAdapter();
81 | }
82 | @Override
83 | public Adapter casecpFormatVersion(cpFormatVersion object) {
84 | return createcpFormatVersionAdapter();
85 | }
86 | @Override
87 | public Adapter casecpExchangePair(cpExchangePair object) {
88 | return createcpExchangePairAdapter();
89 | }
90 | @Override
91 | public Adapter defaultCase(EObject object) {
92 | return createEObjectAdapter();
93 | }
94 | };
95 |
96 | /**
97 | * Creates an adapter for the target.
98 | *
99 | *
100 | * @param target the object to adapt.
101 | * @return the adapter for the target.
102 | * @generated
103 | */
104 | @Override
105 | public Adapter createAdapter(Notifier target) {
106 | return modelSwitch.doSwitch((EObject)target);
107 | }
108 |
109 |
110 | /**
111 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel Conversion Panel }'.
112 | *
113 | * This default implementation returns null so that we can easily ignore cases;
114 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
115 | *
116 | * @return the new adapter.
117 | * @see ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel
118 | * @generated
119 | */
120 | public Adapter createConversionPanelAdapter() {
121 | return null;
122 | }
123 |
124 | /**
125 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration cp Configuration }'.
126 | *
127 | * This default implementation returns null so that we can easily ignore cases;
128 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
129 | *
130 | * @return the new adapter.
131 | * @see ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration
132 | * @generated
133 | */
134 | public Adapter createcpConfigurationAdapter() {
135 | return null;
136 | }
137 |
138 | /**
139 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension cp Extension }'.
140 | *
141 | * This default implementation returns null so that we can easily ignore cases;
142 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
143 | *
144 | * @return the new adapter.
145 | * @see ru.capralow.dt.conversion.plugin.core.cp.cpExtension
146 | * @generated
147 | */
148 | public Adapter createcpExtensionAdapter() {
149 | return null;
150 | }
151 |
152 | /**
153 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion cp Format Version }'.
154 | *
155 | * This default implementation returns null so that we can easily ignore cases;
156 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
157 | *
158 | * @return the new adapter.
159 | * @see ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion
160 | * @generated
161 | */
162 | public Adapter createcpFormatVersionAdapter() {
163 | return null;
164 | }
165 |
166 | /**
167 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair cp Exchange Pair }'.
168 | *
169 | * This default implementation returns null so that we can easily ignore cases;
170 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
171 | *
172 | * @return the new adapter.
173 | * @see ru.capralow.dt.conversion.plugin.core.cp.cpExchangePair
174 | * @generated
175 | */
176 | public Adapter createcpExchangePairAdapter() {
177 | return null;
178 | }
179 |
180 | /**
181 | * Creates a new adapter for the default case.
182 | *
183 | * This default implementation returns null.
184 | *
185 | * @return the new adapter.
186 | * @generated
187 | */
188 | public Adapter createEObjectAdapter() {
189 | return null;
190 | }
191 |
192 | } //CpAdapterFactory
193 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/impl/CpFactoryImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.impl;
4 |
5 | import org.eclipse.emf.ecore.EClass;
6 | import org.eclipse.emf.ecore.EDataType;
7 | import org.eclipse.emf.ecore.EObject;
8 | import org.eclipse.emf.ecore.EPackage;
9 |
10 | import org.eclipse.emf.ecore.impl.EFactoryImpl;
11 |
12 | import org.eclipse.emf.ecore.plugin.EcorePlugin;
13 |
14 | import ru.capralow.dt.conversion.plugin.core.cp.*;
15 |
16 | /**
17 | *
18 | * An implementation of the model Factory .
19 | *
20 | * @generated
21 | */
22 | public class CpFactoryImpl extends EFactoryImpl implements CpFactory {
23 | /**
24 | * Creates the default factory implementation.
25 | *
26 | *
27 | * @generated
28 | */
29 | public static CpFactory init() {
30 | try {
31 | CpFactory theCpFactory = (CpFactory)EPackage.Registry.INSTANCE.getEFactory(CpPackage.eNS_URI);
32 | if (theCpFactory != null) {
33 | return theCpFactory;
34 | }
35 | }
36 | catch (Exception exception) {
37 | EcorePlugin.INSTANCE.log(exception);
38 | }
39 | return new CpFactoryImpl();
40 | }
41 |
42 | /**
43 | * Creates an instance of the factory.
44 | *
45 | *
46 | * @generated
47 | */
48 | public CpFactoryImpl() {
49 | super();
50 | }
51 |
52 | /**
53 | *
54 | *
55 | * @generated
56 | */
57 | @Override
58 | public EObject create(EClass eClass) {
59 | switch (eClass.getClassifierID()) {
60 | case CpPackage.CONVERSION_PANEL: return createConversionPanel();
61 | case CpPackage.CP_CONFIGURATION: return createcpConfiguration();
62 | case CpPackage.CP_EXTENSION: return createcpExtension();
63 | case CpPackage.CP_FORMAT_VERSION: return createcpFormatVersion();
64 | case CpPackage.CP_EXCHANGE_PAIR: return createcpExchangePair();
65 | default:
66 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
67 | }
68 | }
69 |
70 | /**
71 | *
72 | *
73 | * @generated
74 | */
75 | @Override
76 | public Object createFromString(EDataType eDataType, String initialValue) {
77 | switch (eDataType.getClassifierID()) {
78 | case CpPackage.EXCHANGE_PAIR_STATUS:
79 | return createExchangePairStatusFromString(eDataType, initialValue);
80 | case CpPackage.CONFIGURATION_STATUS:
81 | return createConfigurationStatusFromString(eDataType, initialValue);
82 | default:
83 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
84 | }
85 | }
86 |
87 | /**
88 | *
89 | *
90 | * @generated
91 | */
92 | @Override
93 | public String convertToString(EDataType eDataType, Object instanceValue) {
94 | switch (eDataType.getClassifierID()) {
95 | case CpPackage.EXCHANGE_PAIR_STATUS:
96 | return convertExchangePairStatusToString(eDataType, instanceValue);
97 | case CpPackage.CONFIGURATION_STATUS:
98 | return convertConfigurationStatusToString(eDataType, instanceValue);
99 | default:
100 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
101 | }
102 | }
103 |
104 | /**
105 | *
106 | *
107 | * @generated
108 | */
109 | public ConversionPanel createConversionPanel() {
110 | ConversionPanelImpl conversionPanel = new ConversionPanelImpl();
111 | return conversionPanel;
112 | }
113 |
114 | /**
115 | *
116 | *
117 | * @generated
118 | */
119 | public cpConfiguration createcpConfiguration() {
120 | cpConfigurationImpl cpConfiguration = new cpConfigurationImpl();
121 | return cpConfiguration;
122 | }
123 |
124 | /**
125 | *
126 | *
127 | * @generated
128 | */
129 | public cpExtension createcpExtension() {
130 | cpExtensionImpl cpExtension = new cpExtensionImpl();
131 | return cpExtension;
132 | }
133 |
134 | /**
135 | *
136 | *
137 | * @generated
138 | */
139 | public cpFormatVersion createcpFormatVersion() {
140 | cpFormatVersionImpl cpFormatVersion = new cpFormatVersionImpl();
141 | return cpFormatVersion;
142 | }
143 |
144 | /**
145 | *
146 | *
147 | * @generated
148 | */
149 | public cpExchangePair createcpExchangePair() {
150 | cpExchangePairImpl cpExchangePair = new cpExchangePairImpl();
151 | return cpExchangePair;
152 | }
153 |
154 | /**
155 | *
156 | *
157 | * @generated
158 | */
159 | public ExchangePairStatus createExchangePairStatusFromString(EDataType eDataType, String initialValue) {
160 | ExchangePairStatus result = ExchangePairStatus.get(initialValue);
161 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
162 | return result;
163 | }
164 |
165 | /**
166 | *
167 | *
168 | * @generated
169 | */
170 | public String convertExchangePairStatusToString(EDataType eDataType, Object instanceValue) {
171 | return instanceValue == null ? null : instanceValue.toString();
172 | }
173 |
174 | /**
175 | *
176 | *
177 | * @generated
178 | */
179 | public ConfigurationStatus createConfigurationStatusFromString(EDataType eDataType, String initialValue) {
180 | ConfigurationStatus result = ConfigurationStatus.get(initialValue);
181 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
182 | return result;
183 | }
184 |
185 | /**
186 | *
187 | *
188 | * @generated
189 | */
190 | public String convertConfigurationStatusToString(EDataType eDataType, Object instanceValue) {
191 | return instanceValue == null ? null : instanceValue.toString();
192 | }
193 |
194 | /**
195 | *
196 | *
197 | * @generated
198 | */
199 | public CpPackage getCpPackage() {
200 | return (CpPackage)getEPackage();
201 | }
202 |
203 | /**
204 | *
205 | *
206 | * @deprecated
207 | * @generated
208 | */
209 | @Deprecated
210 | public static CpPackage getPackage() {
211 | return CpPackage.eINSTANCE;
212 | }
213 |
214 | } //CpFactoryImpl
215 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/util/RmAdapterFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.util;
4 |
5 | import org.eclipse.emf.common.notify.Adapter;
6 | import org.eclipse.emf.common.notify.Notifier;
7 |
8 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
9 |
10 | import org.eclipse.emf.ecore.EObject;
11 |
12 | import ru.capralow.dt.conversion.plugin.core.rm.*;
13 |
14 | /**
15 | *
16 | * The Adapter Factory for the model.
17 | * It provides an adapter createXXX method for each class of the model.
18 | *
19 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage
20 | * @generated
21 | */
22 | public class RmAdapterFactory extends AdapterFactoryImpl {
23 | /**
24 | * The cached model package.
25 | *
26 | *
27 | * @generated
28 | */
29 | protected static RmPackage modelPackage;
30 |
31 | /**
32 | * Creates an instance of the adapter factory.
33 | *
34 | *
35 | * @generated
36 | */
37 | public RmAdapterFactory() {
38 | if (modelPackage == null) {
39 | modelPackage = RmPackage.eINSTANCE;
40 | }
41 | }
42 |
43 | /**
44 | * Returns whether this factory is applicable for the type of the object.
45 | *
46 | * This implementation returns true if the object is either the model's package or is an instance object of the model.
47 | *
48 | * @return whether this factory is applicable for the type of the object.
49 | * @generated
50 | */
51 | @Override
52 | public boolean isFactoryForType(Object object) {
53 | if (object == modelPackage) {
54 | return true;
55 | }
56 | if (object instanceof EObject) {
57 | return ((EObject)object).eClass().getEPackage() == modelPackage;
58 | }
59 | return false;
60 | }
61 |
62 | /**
63 | * The switch that delegates to the createXXX methods.
64 | *
65 | *
66 | * @generated
67 | */
68 | protected RmSwitch modelSwitch =
69 | new RmSwitch() {
70 | @Override
71 | public Adapter caseRegistrationModule(RegistrationModule object) {
72 | return createRegistrationModuleAdapter();
73 | }
74 | @Override
75 | public Adapter caseExchangePlanContent(ExchangePlanContent object) {
76 | return createExchangePlanContentAdapter();
77 | }
78 | @Override
79 | public Adapter caseRegistrationRule(RegistrationRule object) {
80 | return createRegistrationRuleAdapter();
81 | }
82 | @Override
83 | public Adapter caseObjectSelectionRule(ObjectSelectionRule object) {
84 | return createObjectSelectionRuleAdapter();
85 | }
86 | @Override
87 | public Adapter caseExchangePlanSelectionRule(ExchangePlanSelectionRule object) {
88 | return createExchangePlanSelectionRuleAdapter();
89 | }
90 | @Override
91 | public Adapter defaultCase(EObject object) {
92 | return createEObjectAdapter();
93 | }
94 | };
95 |
96 | /**
97 | * Creates an adapter for the target.
98 | *
99 | *
100 | * @param target the object to adapt.
101 | * @return the adapter for the target.
102 | * @generated
103 | */
104 | @Override
105 | public Adapter createAdapter(Notifier target) {
106 | return modelSwitch.doSwitch((EObject)target);
107 | }
108 |
109 |
110 | /**
111 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.rm.RegistrationModule Registration Module }'.
112 | *
113 | * This default implementation returns null so that we can easily ignore cases;
114 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
115 | *
116 | * @return the new adapter.
117 | * @see ru.capralow.dt.conversion.plugin.core.rm.RegistrationModule
118 | * @generated
119 | */
120 | public Adapter createRegistrationModuleAdapter() {
121 | return null;
122 | }
123 |
124 | /**
125 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent Exchange Plan Content }'.
126 | *
127 | * This default implementation returns null so that we can easily ignore cases;
128 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
129 | *
130 | * @return the new adapter.
131 | * @see ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent
132 | * @generated
133 | */
134 | public Adapter createExchangePlanContentAdapter() {
135 | return null;
136 | }
137 |
138 | /**
139 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.rm.RegistrationRule Registration Rule }'.
140 | *
141 | * This default implementation returns null so that we can easily ignore cases;
142 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
143 | *
144 | * @return the new adapter.
145 | * @see ru.capralow.dt.conversion.plugin.core.rm.RegistrationRule
146 | * @generated
147 | */
148 | public Adapter createRegistrationRuleAdapter() {
149 | return null;
150 | }
151 |
152 | /**
153 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule Object Selection Rule }'.
154 | *
155 | * This default implementation returns null so that we can easily ignore cases;
156 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
157 | *
158 | * @return the new adapter.
159 | * @see ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule
160 | * @generated
161 | */
162 | public Adapter createObjectSelectionRuleAdapter() {
163 | return null;
164 | }
165 |
166 | /**
167 | * Creates a new adapter for an object of class '{@link ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule Exchange Plan Selection Rule }'.
168 | *
169 | * This default implementation returns null so that we can easily ignore cases;
170 | * it's useful to ignore a case when inheritance will catch all the cases anyway.
171 | *
172 | * @return the new adapter.
173 | * @see ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule
174 | * @generated
175 | */
176 | public Adapter createExchangePlanSelectionRuleAdapter() {
177 | return null;
178 | }
179 |
180 | /**
181 | * Creates a new adapter for the default case.
182 | *
183 | * This default implementation returns null.
184 | *
185 | * @return the new adapter.
186 | * @generated
187 | */
188 | public Adapter createEObjectAdapter() {
189 | return null;
190 | }
191 |
192 | } //RmAdapterFactory
193 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/ExchangePairStatus.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import java.util.Arrays;
6 | import java.util.Collections;
7 | import java.util.List;
8 |
9 | import org.eclipse.emf.common.util.Enumerator;
10 |
11 | /**
12 | *
13 | * A representation of the literals of the enumeration 'Exchange Pair Status ',
14 | * and utility methods for working with them.
15 | *
16 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getExchangePairStatus()
17 | * @model
18 | * @generated
19 | */
20 | public enum ExchangePairStatus implements Enumerator {
21 | /**
22 | * The 'No Shared Format Versions ' literal object.
23 | *
24 | *
25 | * @see #NO_SHARED_FORMAT_VERSIONS_VALUE
26 | * @generated
27 | * @ordered
28 | */
29 | NO_SHARED_FORMAT_VERSIONS(0, "NoSharedFormatVersions", "\u041d\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430"), //$NON-NLS-1$ //$NON-NLS-2$
30 |
31 | /**
32 | * The 'Ready ' literal object.
33 | *
34 | *
35 | * @see #READY_VALUE
36 | * @generated
37 | * @ordered
38 | */
39 | READY(1, "Ready", "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043e\u0431\u043c\u0435\u043d\u0443"); //$NON-NLS-1$ //$NON-NLS-2$
40 |
41 | /**
42 | * The 'No Shared Format Versions ' literal value.
43 | *
44 | *
45 | * If the meaning of 'No Shared Format Versions ' literal object isn't clear,
46 | * there really should be more of a description here...
47 | *
48 | *
49 | * @see #NO_SHARED_FORMAT_VERSIONS
50 | * @model name="NoSharedFormatVersions" literal="\u041d\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430"
51 | * @generated
52 | * @ordered
53 | */
54 | public static final int NO_SHARED_FORMAT_VERSIONS_VALUE = 0;
55 |
56 | /**
57 | * The 'Ready ' literal value.
58 | *
59 | *
60 | * If the meaning of 'Ready ' literal object isn't clear,
61 | * there really should be more of a description here...
62 | *
63 | *
64 | * @see #READY
65 | * @model name="Ready" literal="\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043e\u0431\u043c\u0435\u043d\u0443"
66 | * @generated
67 | * @ordered
68 | */
69 | public static final int READY_VALUE = 1;
70 |
71 | /**
72 | * An array of all the 'Exchange Pair Status ' enumerators.
73 | *
74 | *
75 | * @generated
76 | */
77 | private static final ExchangePairStatus[] VALUES_ARRAY =
78 | new ExchangePairStatus[] {
79 | NO_SHARED_FORMAT_VERSIONS,
80 | READY,
81 | };
82 |
83 | /**
84 | * A public read-only list of all the 'Exchange Pair Status ' enumerators.
85 | *
86 | *
87 | * @generated
88 | */
89 | public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
90 |
91 | /**
92 | * Returns the 'Exchange Pair Status ' literal with the specified literal value.
93 | *
94 | *
95 | * @param literal the literal.
96 | * @return the matching enumerator or null.
97 | * @generated
98 | */
99 | public static ExchangePairStatus get(String literal) {
100 | for (int i = 0; i < VALUES_ARRAY.length; ++i) {
101 | ExchangePairStatus result = VALUES_ARRAY[i];
102 | if (result.toString().equals(literal)) {
103 | return result;
104 | }
105 | }
106 | return null;
107 | }
108 |
109 | /**
110 | * Returns the 'Exchange Pair Status ' literal with the specified name.
111 | *
112 | *
113 | * @param name the name.
114 | * @return the matching enumerator or null.
115 | * @generated
116 | */
117 | public static ExchangePairStatus getByName(String name) {
118 | for (int i = 0; i < VALUES_ARRAY.length; ++i) {
119 | ExchangePairStatus result = VALUES_ARRAY[i];
120 | if (result.getName().equals(name)) {
121 | return result;
122 | }
123 | }
124 | return null;
125 | }
126 |
127 | /**
128 | * Returns the 'Exchange Pair Status ' literal with the specified integer value.
129 | *
130 | *
131 | * @param value the integer value.
132 | * @return the matching enumerator or null.
133 | * @generated
134 | */
135 | public static ExchangePairStatus get(int value) {
136 | switch (value) {
137 | case NO_SHARED_FORMAT_VERSIONS_VALUE: return NO_SHARED_FORMAT_VERSIONS;
138 | case READY_VALUE: return READY;
139 | }
140 | return null;
141 | }
142 |
143 | /**
144 | *
145 | *
146 | * @generated
147 | */
148 | private final int value;
149 |
150 | /**
151 | *
152 | *
153 | * @generated
154 | */
155 | private final String name;
156 |
157 | /**
158 | *
159 | *
160 | * @generated
161 | */
162 | private final String literal;
163 |
164 | /**
165 | * Only this class can construct instances.
166 | *
167 | *
168 | * @generated
169 | */
170 | private ExchangePairStatus(int value, String name, String literal) {
171 | this.value = value;
172 | this.name = name;
173 | this.literal = literal;
174 | }
175 |
176 | /**
177 | *
178 | *
179 | * @generated
180 | */
181 | public int getValue() {
182 | return value;
183 | }
184 |
185 | /**
186 | *
187 | *
188 | * @generated
189 | */
190 | public String getName() {
191 | return name;
192 | }
193 |
194 | /**
195 | *
196 | *
197 | * @generated
198 | */
199 | public String getLiteral() {
200 | return literal;
201 | }
202 |
203 | /**
204 | * Returns the literal value of the enumerator, which is its string representation.
205 | *
206 | *
207 | * @generated
208 | */
209 | @Override
210 | public String toString() {
211 | return literal;
212 | }
213 |
214 | } //ExchangePairStatus
215 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/util/CpSwitch.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp.util;
4 |
5 | import org.eclipse.emf.ecore.EObject;
6 | import org.eclipse.emf.ecore.EPackage;
7 |
8 | import org.eclipse.emf.ecore.util.Switch;
9 |
10 | import ru.capralow.dt.conversion.plugin.core.cp.*;
11 |
12 | /**
13 | *
14 | * The Switch for the model's inheritance hierarchy.
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
16 | * to invoke the caseXXX method for each class of the model,
17 | * starting with the actual class of the object
18 | * and proceeding up the inheritance hierarchy
19 | * until a non-null result is returned,
20 | * which is the result of the switch.
21 | *
22 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage
23 | * @generated
24 | */
25 | public class CpSwitch extends Switch {
26 | /**
27 | * The cached model package
28 | *
29 | *
30 | * @generated
31 | */
32 | protected static CpPackage modelPackage;
33 |
34 | /**
35 | * Creates an instance of the switch.
36 | *
37 | *
38 | * @generated
39 | */
40 | public CpSwitch() {
41 | if (modelPackage == null) {
42 | modelPackage = CpPackage.eINSTANCE;
43 | }
44 | }
45 |
46 | /**
47 | * Checks whether this is a switch for the given package.
48 | *
49 | *
50 | * @param ePackage the package in question.
51 | * @return whether this is a switch for the given package.
52 | * @generated
53 | */
54 | @Override
55 | protected boolean isSwitchFor(EPackage ePackage) {
56 | return ePackage == modelPackage;
57 | }
58 |
59 | /**
60 | * Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
61 | *
62 | *
63 | * @return the first non-null result returned by a caseXXX call.
64 | * @generated
65 | */
66 | @Override
67 | protected T doSwitch(int classifierID, EObject theEObject) {
68 | switch (classifierID) {
69 | case CpPackage.CONVERSION_PANEL: {
70 | ConversionPanel conversionPanel = (ConversionPanel)theEObject;
71 | T result = caseConversionPanel(conversionPanel);
72 | if (result == null) result = defaultCase(theEObject);
73 | return result;
74 | }
75 | case CpPackage.CP_CONFIGURATION: {
76 | cpConfiguration cpConfiguration = (cpConfiguration)theEObject;
77 | T result = casecpConfiguration(cpConfiguration);
78 | if (result == null) result = defaultCase(theEObject);
79 | return result;
80 | }
81 | case CpPackage.CP_EXTENSION: {
82 | cpExtension cpExtension = (cpExtension)theEObject;
83 | T result = casecpExtension(cpExtension);
84 | if (result == null) result = defaultCase(theEObject);
85 | return result;
86 | }
87 | case CpPackage.CP_FORMAT_VERSION: {
88 | cpFormatVersion cpFormatVersion = (cpFormatVersion)theEObject;
89 | T result = casecpFormatVersion(cpFormatVersion);
90 | if (result == null) result = defaultCase(theEObject);
91 | return result;
92 | }
93 | case CpPackage.CP_EXCHANGE_PAIR: {
94 | cpExchangePair cpExchangePair = (cpExchangePair)theEObject;
95 | T result = casecpExchangePair(cpExchangePair);
96 | if (result == null) result = defaultCase(theEObject);
97 | return result;
98 | }
99 | default: return defaultCase(theEObject);
100 | }
101 | }
102 |
103 | /**
104 | * Returns the result of interpreting the object as an instance of 'Conversion Panel '.
105 | *
106 | * This implementation returns null;
107 | * returning a non-null result will terminate the switch.
108 | *
109 | * @param object the target of the switch.
110 | * @return the result of interpreting the object as an instance of 'Conversion Panel '.
111 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
112 | * @generated
113 | */
114 | public T caseConversionPanel(ConversionPanel object) {
115 | return null;
116 | }
117 |
118 | /**
119 | * Returns the result of interpreting the object as an instance of 'cp Configuration '.
120 | *
121 | * This implementation returns null;
122 | * returning a non-null result will terminate the switch.
123 | *
124 | * @param object the target of the switch.
125 | * @return the result of interpreting the object as an instance of 'cp Configuration '.
126 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
127 | * @generated
128 | */
129 | public T casecpConfiguration(cpConfiguration object) {
130 | return null;
131 | }
132 |
133 | /**
134 | * Returns the result of interpreting the object as an instance of 'cp Extension '.
135 | *
136 | * This implementation returns null;
137 | * returning a non-null result will terminate the switch.
138 | *
139 | * @param object the target of the switch.
140 | * @return the result of interpreting the object as an instance of 'cp Extension '.
141 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
142 | * @generated
143 | */
144 | public T casecpExtension(cpExtension object) {
145 | return null;
146 | }
147 |
148 | /**
149 | * Returns the result of interpreting the object as an instance of 'cp Format Version '.
150 | *
151 | * This implementation returns null;
152 | * returning a non-null result will terminate the switch.
153 | *
154 | * @param object the target of the switch.
155 | * @return the result of interpreting the object as an instance of 'cp Format Version '.
156 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
157 | * @generated
158 | */
159 | public T casecpFormatVersion(cpFormatVersion object) {
160 | return null;
161 | }
162 |
163 | /**
164 | * Returns the result of interpreting the object as an instance of 'cp Exchange Pair '.
165 | *
166 | * This implementation returns null;
167 | * returning a non-null result will terminate the switch.
168 | *
169 | * @param object the target of the switch.
170 | * @return the result of interpreting the object as an instance of 'cp Exchange Pair '.
171 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
172 | * @generated
173 | */
174 | public T casecpExchangePair(cpExchangePair object) {
175 | return null;
176 | }
177 |
178 | /**
179 | * Returns the result of interpreting the object as an instance of 'EObject '.
180 | *
181 | * This implementation returns null;
182 | * returning a non-null result will terminate the switch, but this is the last case anyway.
183 | *
184 | * @param object the target of the switch.
185 | * @return the result of interpreting the object as an instance of 'EObject '.
186 | * @see #doSwitch(org.eclipse.emf.ecore.EObject)
187 | * @generated
188 | */
189 | @Override
190 | public T defaultCase(EObject object) {
191 | return null;
192 | }
193 |
194 | } //CpSwitch
195 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/util/RmSwitch.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.util;
4 |
5 | import org.eclipse.emf.ecore.EObject;
6 | import org.eclipse.emf.ecore.EPackage;
7 |
8 | import org.eclipse.emf.ecore.util.Switch;
9 |
10 | import ru.capralow.dt.conversion.plugin.core.rm.*;
11 |
12 | /**
13 | *
14 | * The Switch for the model's inheritance hierarchy.
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
16 | * to invoke the caseXXX method for each class of the model,
17 | * starting with the actual class of the object
18 | * and proceeding up the inheritance hierarchy
19 | * until a non-null result is returned,
20 | * which is the result of the switch.
21 | *
22 | * @see ru.capralow.dt.conversion.plugin.core.rm.RmPackage
23 | * @generated
24 | */
25 | public class RmSwitch extends Switch {
26 | /**
27 | * The cached model package
28 | *
29 | *
30 | * @generated
31 | */
32 | protected static RmPackage modelPackage;
33 |
34 | /**
35 | * Creates an instance of the switch.
36 | *
37 | *
38 | * @generated
39 | */
40 | public RmSwitch() {
41 | if (modelPackage == null) {
42 | modelPackage = RmPackage.eINSTANCE;
43 | }
44 | }
45 |
46 | /**
47 | * Checks whether this is a switch for the given package.
48 | *
49 | *
50 | * @param ePackage the package in question.
51 | * @return whether this is a switch for the given package.
52 | * @generated
53 | */
54 | @Override
55 | protected boolean isSwitchFor(EPackage ePackage) {
56 | return ePackage == modelPackage;
57 | }
58 |
59 | /**
60 | * Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
61 | *
62 | *
63 | * @return the first non-null result returned by a caseXXX call.
64 | * @generated
65 | */
66 | @Override
67 | protected T doSwitch(int classifierID, EObject theEObject) {
68 | switch (classifierID) {
69 | case RmPackage.REGISTRATION_MODULE: {
70 | RegistrationModule registrationModule = (RegistrationModule)theEObject;
71 | T result = caseRegistrationModule(registrationModule);
72 | if (result == null) result = defaultCase(theEObject);
73 | return result;
74 | }
75 | case RmPackage.EXCHANGE_PLAN_CONTENT: {
76 | ExchangePlanContent exchangePlanContent = (ExchangePlanContent)theEObject;
77 | T result = caseExchangePlanContent(exchangePlanContent);
78 | if (result == null) result = defaultCase(theEObject);
79 | return result;
80 | }
81 | case RmPackage.REGISTRATION_RULE: {
82 | RegistrationRule registrationRule = (RegistrationRule)theEObject;
83 | T result = caseRegistrationRule(registrationRule);
84 | if (result == null) result = defaultCase(theEObject);
85 | return result;
86 | }
87 | case RmPackage.OBJECT_SELECTION_RULE: {
88 | ObjectSelectionRule objectSelectionRule = (ObjectSelectionRule)theEObject;
89 | T result = caseObjectSelectionRule(objectSelectionRule);
90 | if (result == null) result = defaultCase(theEObject);
91 | return result;
92 | }
93 | case RmPackage.EXCHANGE_PLAN_SELECTION_RULE: {
94 | ExchangePlanSelectionRule exchangePlanSelectionRule = (ExchangePlanSelectionRule)theEObject;
95 | T result = caseExchangePlanSelectionRule(exchangePlanSelectionRule);
96 | if (result == null) result = defaultCase(theEObject);
97 | return result;
98 | }
99 | default: return defaultCase(theEObject);
100 | }
101 | }
102 |
103 | /**
104 | * Returns the result of interpreting the object as an instance of 'Registration Module '.
105 | *
106 | * This implementation returns null;
107 | * returning a non-null result will terminate the switch.
108 | *
109 | * @param object the target of the switch.
110 | * @return the result of interpreting the object as an instance of 'Registration Module '.
111 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
112 | * @generated
113 | */
114 | public T caseRegistrationModule(RegistrationModule object) {
115 | return null;
116 | }
117 |
118 | /**
119 | * Returns the result of interpreting the object as an instance of 'Exchange Plan Content '.
120 | *
121 | * This implementation returns null;
122 | * returning a non-null result will terminate the switch.
123 | *
124 | * @param object the target of the switch.
125 | * @return the result of interpreting the object as an instance of 'Exchange Plan Content '.
126 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
127 | * @generated
128 | */
129 | public T caseExchangePlanContent(ExchangePlanContent object) {
130 | return null;
131 | }
132 |
133 | /**
134 | * Returns the result of interpreting the object as an instance of 'Registration Rule '.
135 | *
136 | * This implementation returns null;
137 | * returning a non-null result will terminate the switch.
138 | *
139 | * @param object the target of the switch.
140 | * @return the result of interpreting the object as an instance of 'Registration Rule '.
141 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
142 | * @generated
143 | */
144 | public T caseRegistrationRule(RegistrationRule object) {
145 | return null;
146 | }
147 |
148 | /**
149 | * Returns the result of interpreting the object as an instance of 'Object Selection Rule '.
150 | *
151 | * This implementation returns null;
152 | * returning a non-null result will terminate the switch.
153 | *
154 | * @param object the target of the switch.
155 | * @return the result of interpreting the object as an instance of 'Object Selection Rule '.
156 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
157 | * @generated
158 | */
159 | public T caseObjectSelectionRule(ObjectSelectionRule object) {
160 | return null;
161 | }
162 |
163 | /**
164 | * Returns the result of interpreting the object as an instance of 'Exchange Plan Selection Rule '.
165 | *
166 | * This implementation returns null;
167 | * returning a non-null result will terminate the switch.
168 | *
169 | * @param object the target of the switch.
170 | * @return the result of interpreting the object as an instance of 'Exchange Plan Selection Rule '.
171 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
172 | * @generated
173 | */
174 | public T caseExchangePlanSelectionRule(ExchangePlanSelectionRule object) {
175 | return null;
176 | }
177 |
178 | /**
179 | * Returns the result of interpreting the object as an instance of 'EObject '.
180 | *
181 | * This implementation returns null;
182 | * returning a non-null result will terminate the switch, but this is the last case anyway.
183 | *
184 | * @param object the target of the switch.
185 | * @return the result of interpreting the object as an instance of 'EObject '.
186 | * @see #doSwitch(org.eclipse.emf.ecore.EObject)
187 | * @generated
188 | */
189 | @Override
190 | public T defaultCase(EObject object) {
191 | return null;
192 | }
193 |
194 | } //RmSwitch
195 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/RegistrationRuleImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import com._1c.g5.v8.bm.core.BmObject;
6 |
7 | import org.eclipse.emf.common.util.EList;
8 |
9 | import org.eclipse.emf.ecore.EClass;
10 |
11 | import ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanSelectionRule;
12 | import ru.capralow.dt.conversion.plugin.core.rm.ObjectSelectionRule;
13 | import ru.capralow.dt.conversion.plugin.core.rm.RegistrationRule;
14 | import ru.capralow.dt.conversion.plugin.core.rm.RmPackage;
15 |
16 | /**
17 | *
18 | * An implementation of the model object 'Registration Rule '.
19 | *
20 | *
21 | * The following features are implemented:
22 | *
23 | *
24 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getIsFolder Is Folder }
25 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getDisabled Disabled }
26 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getValid Valid }
27 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getCode Code }
28 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getName Name }
29 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getMdObject Md Object }
30 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getObjectName Object Name }
31 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getMdClass Md Class }
32 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getAttributeSendMode Attribute Send Mode }
33 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getObjectSelectionRules Object Selection Rules }
34 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationRuleImpl#getExchangePlanSelectionRules Exchange Plan Selection Rules }
35 | *
36 | *
37 | * @generated
38 | */
39 | public class RegistrationRuleImpl extends BmObject implements RegistrationRule {
40 | /**
41 | *
42 | *
43 | * @generated
44 | */
45 | public RegistrationRuleImpl() {
46 | super();
47 | }
48 |
49 | /**
50 | *
51 | *
52 | * @generated
53 | */
54 | @Override
55 | protected EClass eStaticClass() {
56 | return RmPackage.Literals.REGISTRATION_RULE;
57 | }
58 |
59 | /**
60 | *
61 | *
62 | * @generated
63 | */
64 | @Override
65 | protected int eStaticFeatureCount() {
66 | return 0;
67 | }
68 |
69 | /**
70 | *
71 | *
72 | * @generated
73 | */
74 | public Boolean getIsFolder() {
75 | return (Boolean)eGet(RmPackage.Literals.REGISTRATION_RULE__IS_FOLDER, true);
76 | }
77 |
78 | /**
79 | *
80 | *
81 | * @generated
82 | */
83 | public void setIsFolder(Boolean newIsFolder) {
84 | eSet(RmPackage.Literals.REGISTRATION_RULE__IS_FOLDER, newIsFolder);
85 | }
86 |
87 | /**
88 | *
89 | *
90 | * @generated
91 | */
92 | public Boolean getDisabled() {
93 | return (Boolean)eGet(RmPackage.Literals.REGISTRATION_RULE__DISABLED, true);
94 | }
95 |
96 | /**
97 | *
98 | *
99 | * @generated
100 | */
101 | public void setDisabled(Boolean newDisabled) {
102 | eSet(RmPackage.Literals.REGISTRATION_RULE__DISABLED, newDisabled);
103 | }
104 |
105 | /**
106 | *
107 | *
108 | * @generated
109 | */
110 | public Boolean getValid() {
111 | return (Boolean)eGet(RmPackage.Literals.REGISTRATION_RULE__VALID, true);
112 | }
113 |
114 | /**
115 | *
116 | *
117 | * @generated
118 | */
119 | public void setValid(Boolean newValid) {
120 | eSet(RmPackage.Literals.REGISTRATION_RULE__VALID, newValid);
121 | }
122 |
123 | /**
124 | *
125 | *
126 | * @generated
127 | */
128 | public String getCode() {
129 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__CODE, true);
130 | }
131 |
132 | /**
133 | *
134 | *
135 | * @generated
136 | */
137 | public void setCode(String newCode) {
138 | eSet(RmPackage.Literals.REGISTRATION_RULE__CODE, newCode);
139 | }
140 |
141 | /**
142 | *
143 | *
144 | * @generated
145 | */
146 | public String getName() {
147 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__NAME, true);
148 | }
149 |
150 | /**
151 | *
152 | *
153 | * @generated
154 | */
155 | public void setName(String newName) {
156 | eSet(RmPackage.Literals.REGISTRATION_RULE__NAME, newName);
157 | }
158 |
159 | /**
160 | *
161 | *
162 | * @generated
163 | */
164 | public String getMdObject() {
165 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__MD_OBJECT, true);
166 | }
167 |
168 | /**
169 | *
170 | *
171 | * @generated
172 | */
173 | public void setMdObject(String newMdObject) {
174 | eSet(RmPackage.Literals.REGISTRATION_RULE__MD_OBJECT, newMdObject);
175 | }
176 |
177 | /**
178 | *
179 | *
180 | * @generated
181 | */
182 | public String getObjectName() {
183 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__OBJECT_NAME, true);
184 | }
185 |
186 | /**
187 | *
188 | *
189 | * @generated
190 | */
191 | public void setObjectName(String newObjectName) {
192 | eSet(RmPackage.Literals.REGISTRATION_RULE__OBJECT_NAME, newObjectName);
193 | }
194 |
195 | /**
196 | *
197 | *
198 | * @generated
199 | */
200 | public String getMdClass() {
201 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__MD_CLASS, true);
202 | }
203 |
204 | /**
205 | *
206 | *
207 | * @generated
208 | */
209 | public void setMdClass(String newMdClass) {
210 | eSet(RmPackage.Literals.REGISTRATION_RULE__MD_CLASS, newMdClass);
211 | }
212 |
213 | /**
214 | *
215 | *
216 | * @generated
217 | */
218 | public String getAttributeSendMode() {
219 | return (String)eGet(RmPackage.Literals.REGISTRATION_RULE__ATTRIBUTE_SEND_MODE, true);
220 | }
221 |
222 | /**
223 | *
224 | *
225 | * @generated
226 | */
227 | public void setAttributeSendMode(String newAttributeSendMode) {
228 | eSet(RmPackage.Literals.REGISTRATION_RULE__ATTRIBUTE_SEND_MODE, newAttributeSendMode);
229 | }
230 |
231 | /**
232 | *
233 | *
234 | * @generated
235 | */
236 | @SuppressWarnings("unchecked")
237 | public EList getObjectSelectionRules() {
238 | return (EList)eGet(RmPackage.Literals.REGISTRATION_RULE__OBJECT_SELECTION_RULES, true);
239 | }
240 |
241 | /**
242 | *
243 | *
244 | * @generated
245 | */
246 | @SuppressWarnings("unchecked")
247 | public EList getExchangePlanSelectionRules() {
248 | return (EList)eGet(RmPackage.Literals.REGISTRATION_RULE__EXCHANGE_PLAN_SELECTION_RULES, true);
249 | }
250 |
251 | } //RegistrationRuleImpl
252 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/RmFactoryImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import java.text.ParseException;
6 | import java.text.SimpleDateFormat;
7 |
8 | import java.util.Date;
9 |
10 | import org.eclipse.emf.ecore.EClass;
11 | import org.eclipse.emf.ecore.EDataType;
12 | import org.eclipse.emf.ecore.EObject;
13 | import org.eclipse.emf.ecore.EPackage;
14 |
15 | import org.eclipse.emf.ecore.impl.EFactoryImpl;
16 |
17 | import org.eclipse.emf.ecore.plugin.EcorePlugin;
18 |
19 | import org.eclipse.xtext.xbase.lib.Exceptions;
20 |
21 | import ru.capralow.dt.conversion.plugin.core.rm.*;
22 |
23 | /**
24 | *
25 | * An implementation of the model Factory .
26 | *
27 | * @generated
28 | */
29 | public class RmFactoryImpl extends EFactoryImpl implements RmFactory {
30 | /**
31 | * Creates the default factory implementation.
32 | *
33 | *
34 | * @generated
35 | */
36 | public static RmFactory init() {
37 | try {
38 | RmFactory theRmFactory = (RmFactory)EPackage.Registry.INSTANCE.getEFactory(RmPackage.eNS_URI);
39 | if (theRmFactory != null) {
40 | return theRmFactory;
41 | }
42 | }
43 | catch (Exception exception) {
44 | EcorePlugin.INSTANCE.log(exception);
45 | }
46 | return new RmFactoryImpl();
47 | }
48 |
49 | /**
50 | * Creates an instance of the factory.
51 | *
52 | *
53 | * @generated
54 | */
55 | public RmFactoryImpl() {
56 | super();
57 | }
58 |
59 | /**
60 | *
61 | *
62 | * @generated
63 | */
64 | @Override
65 | public EObject create(EClass eClass) {
66 | switch (eClass.getClassifierID()) {
67 | case RmPackage.REGISTRATION_MODULE: return (EObject)createRegistrationModule();
68 | case RmPackage.EXCHANGE_PLAN_CONTENT: return (EObject)createExchangePlanContent();
69 | case RmPackage.REGISTRATION_RULE: return (EObject)createRegistrationRule();
70 | case RmPackage.OBJECT_SELECTION_RULE: return (EObject)createObjectSelectionRule();
71 | case RmPackage.EXCHANGE_PLAN_SELECTION_RULE: return (EObject)createExchangePlanSelectionRule();
72 | default:
73 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
74 | }
75 | }
76 |
77 | /**
78 | *
79 | *
80 | * @generated
81 | */
82 | @Override
83 | public Object createFromString(EDataType eDataType, String initialValue) {
84 | switch (eDataType.getClassifierID()) {
85 | case RmPackage.AUTO_REGISTRATION:
86 | return createAutoRegistrationFromString(eDataType, initialValue);
87 | case RmPackage.DATE:
88 | return createDateFromString(eDataType, initialValue);
89 | default:
90 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
91 | }
92 | }
93 |
94 | /**
95 | *
96 | *
97 | * @generated
98 | */
99 | @Override
100 | public String convertToString(EDataType eDataType, Object instanceValue) {
101 | switch (eDataType.getClassifierID()) {
102 | case RmPackage.AUTO_REGISTRATION:
103 | return convertAutoRegistrationToString(eDataType, instanceValue);
104 | case RmPackage.DATE:
105 | return convertDateToString(eDataType, instanceValue);
106 | default:
107 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
108 | }
109 | }
110 |
111 | /**
112 | *
113 | *
114 | * @generated
115 | */
116 | public RegistrationModule createRegistrationModule() {
117 | RegistrationModuleImpl registrationModule = new RegistrationModuleImpl();
118 | return registrationModule;
119 | }
120 |
121 | /**
122 | *
123 | *
124 | * @generated
125 | */
126 | public ExchangePlanContent createExchangePlanContent() {
127 | ExchangePlanContentImpl exchangePlanContent = new ExchangePlanContentImpl();
128 | return exchangePlanContent;
129 | }
130 |
131 | /**
132 | *
133 | *
134 | * @generated
135 | */
136 | public RegistrationRule createRegistrationRule() {
137 | RegistrationRuleImpl registrationRule = new RegistrationRuleImpl();
138 | return registrationRule;
139 | }
140 |
141 | /**
142 | *
143 | *
144 | * @generated
145 | */
146 | public ObjectSelectionRule createObjectSelectionRule() {
147 | ObjectSelectionRuleImpl objectSelectionRule = new ObjectSelectionRuleImpl();
148 | return objectSelectionRule;
149 | }
150 |
151 | /**
152 | *
153 | *
154 | * @generated
155 | */
156 | public ExchangePlanSelectionRule createExchangePlanSelectionRule() {
157 | ExchangePlanSelectionRuleImpl exchangePlanSelectionRule = new ExchangePlanSelectionRuleImpl();
158 | return exchangePlanSelectionRule;
159 | }
160 |
161 | /**
162 | *
163 | *
164 | * @generated
165 | */
166 | public AutoRegistration createAutoRegistrationFromString(EDataType eDataType, String initialValue) {
167 | AutoRegistration result = AutoRegistration.get(initialValue);
168 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
169 | return result;
170 | }
171 |
172 | /**
173 | *
174 | *
175 | * @generated
176 | */
177 | public String convertAutoRegistrationToString(EDataType eDataType, Object instanceValue) {
178 | return instanceValue == null ? null : instanceValue.toString();
179 | }
180 |
181 | /**
182 | *
183 | *
184 | * @generated
185 | */
186 | public Date createDate(final String it) {
187 | Date _xtrycatchfinallyexpression = null;
188 | try {
189 | Date _xifexpression = null;
190 | if ((it != null)) {
191 | _xifexpression = new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss").parse(it);
192 | }
193 | _xtrycatchfinallyexpression = _xifexpression;
194 | }
195 | catch (final Throwable _t) {
196 | if (_t instanceof ParseException) {
197 | final ParseException exception = (ParseException)_t;
198 | throw new RuntimeException(exception);
199 | }
200 | else {
201 | throw Exceptions.sneakyThrow(_t);
202 | }
203 | }
204 | return _xtrycatchfinallyexpression;
205 | }
206 |
207 | /**
208 | *
209 | *
210 | * @generated
211 | */
212 | public Date createDateFromString(EDataType eDataType, String initialValue) {
213 | return createDate(initialValue);
214 | }
215 |
216 | /**
217 | *
218 | *
219 | * @generated
220 | */
221 | public String convertDate(final Date it) {
222 | String _xifexpression = null;
223 | if ((it != null)) {
224 | _xifexpression = new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss").format(it);
225 | }
226 | return _xifexpression;
227 | }
228 |
229 | /**
230 | *
231 | *
232 | * @generated
233 | */
234 | public String convertDateToString(EDataType eDataType, Object instanceValue) {
235 | return convertDate((Date)instanceValue);
236 | }
237 |
238 | /**
239 | *
240 | *
241 | * @generated
242 | */
243 | public RmPackage getRmPackage() {
244 | return (RmPackage)getEPackage();
245 | }
246 |
247 | /**
248 | *
249 | *
250 | * @deprecated
251 | * @generated
252 | */
253 | @Deprecated
254 | public static RmPackage getPackage() {
255 | return RmPackage.eINSTANCE;
256 | }
257 |
258 | } //RmFactoryImpl
259 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/views/ConversionPanelView.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui.views;
2 |
3 | import java.util.Iterator;
4 |
5 | import org.eclipse.core.resources.IFile;
6 | import org.eclipse.core.resources.IProject;
7 | import org.eclipse.core.resources.IResourceChangeEvent;
8 | import org.eclipse.core.resources.IResourceChangeListener;
9 | import org.eclipse.core.resources.IResourceDelta;
10 | import org.eclipse.core.resources.ResourcesPlugin;
11 | import org.eclipse.core.runtime.IPath;
12 | import org.eclipse.emf.common.util.EList;
13 | import org.eclipse.emf.common.util.URI;
14 | import org.eclipse.emf.ecore.EObject;
15 | import org.eclipse.jface.viewers.DoubleClickEvent;
16 | import org.eclipse.jface.viewers.IDoubleClickListener;
17 | import org.eclipse.jface.viewers.ISelection;
18 | import org.eclipse.jface.viewers.IStructuredSelection;
19 | import org.eclipse.jface.viewers.TreeViewer;
20 | import org.eclipse.swt.layout.GridData;
21 | import org.eclipse.swt.layout.GridLayout;
22 | import org.eclipse.swt.widgets.Composite;
23 | import org.eclipse.swt.widgets.Display;
24 | import org.eclipse.ui.IViewSite;
25 | import org.eclipse.ui.PartInitException;
26 | import org.eclipse.ui.part.ViewPart;
27 | import org.eclipse.xtext.resource.IResourceServiceProvider;
28 |
29 | import com._1c.g5.v8.dt.bm.index.emf.IBmEmfIndexManager;
30 | import com._1c.g5.v8.dt.bsl.model.Module;
31 | import com._1c.g5.v8.dt.core.lifecycle.ProjectContext;
32 | import com._1c.g5.v8.dt.core.platform.IResourceLookup;
33 | import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
34 | import com._1c.g5.v8.dt.lifecycle.IServiceContextLifecycleListener;
35 | import com._1c.g5.v8.dt.lifecycle.IServicesOrchestrator;
36 | import com._1c.g5.v8.dt.lifecycle.ServiceState;
37 | import com._1c.g5.v8.dt.metadata.mdclass.CommonModule;
38 | import com._1c.g5.v8.dt.ui.util.OpenHelper;
39 | import com.google.inject.Inject;
40 |
41 | import ru.capralow.dt.conversion.plugin.core.cp.ConversionPanel;
42 | import ru.capralow.dt.conversion.plugin.core.cp.ConversionPanelAnalyzer;
43 | import ru.capralow.dt.conversion.plugin.core.cp.ConversionPanelContentProvider;
44 | import ru.capralow.dt.conversion.plugin.core.cp.ConversionPanelLabelProvider;
45 | import ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion;
46 |
47 | public class ConversionPanelView extends ViewPart {
48 | @Inject
49 | private IV8ProjectManager projectManager;
50 |
51 | @Inject
52 | private IBmEmfIndexManager bmEmfIndexManager;
53 |
54 | @Inject
55 | private IResourceLookup resourceLookup;
56 |
57 | private TreeViewer treeViewer;
58 |
59 | private ConversionPanelAnalyzer conversionPanelAnalyzer;
60 |
61 | private IServicesOrchestrator servicesOrchestrator;
62 |
63 | private IServiceContextLifecycleListener projectContextListener;
64 |
65 | private IResourceChangeListener objectsListener;
66 |
67 | @Override
68 | public void init(IViewSite site) throws PartInitException {
69 | setSite(site);
70 |
71 | this.conversionPanelAnalyzer = new ConversionPanelAnalyzer(projectManager, bmEmfIndexManager);
72 |
73 | IResourceServiceProvider provider = IResourceServiceProvider.Registry.INSTANCE
74 | .getResourceServiceProvider(URI.createURI("foo.bsl"));
75 | this.servicesOrchestrator = provider.get(IServicesOrchestrator.class);
76 |
77 | IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
78 |
79 | objectsListener = new IResourceChangeListener() {
80 |
81 | @Override
82 | public void resourceChanged(IResourceChangeEvent event) {
83 | IResourceDelta eventDelta = event.getDelta();
84 |
85 | ConversionPanel conversionPanel = conversionPanelAnalyzer.getConversionPanel();
86 |
87 | EList objects = conversionPanel.getObjects();
88 |
89 | boolean refreshUI = false;
90 | IProject project = null;
91 |
92 | Iterator itr = objects.iterator();
93 | while (itr.hasNext()) {
94 | EObject object = (EObject) itr.next();
95 |
96 | IFile file = resourceLookup.getPlatformResource(object.eResource());
97 |
98 | IPath path = file.getFullPath();
99 |
100 | IResourceDelta delta = eventDelta.findMember(path);
101 |
102 | if (delta != null) {
103 | refreshUI = true;
104 | project = projectManager.getProject(object).getProject();
105 | break;
106 | }
107 | }
108 |
109 | if (refreshUI) {
110 | updateTreeViewer(project);
111 | }
112 |
113 | }
114 |
115 | };
116 |
117 | for (int i = 0; i < projects.length; i++) {
118 | IProject project = projects[i];
119 |
120 | // проверяем инициализирован ли контекст
121 | if (servicesOrchestrator.getContextState(new ProjectContext(project)) != ServiceState.STARTED) {
122 |
123 | // если нет - ждем, пока UI инициализировать не нужно.
124 | // или опционально - инициализироватьк какой-то заглушкой, типа "загрузка
125 | // содержания..."
126 | servicesOrchestrator.addListener(this.projectContextListener = (context, state) -> {
127 | if (context instanceof ProjectContext && ((ProjectContext) context).getProject().equals(project)
128 | && state == ServiceState.STARTED) {
129 | Display.getDefault().asyncExec(new Runnable() {
130 | public void run() {
131 | updateTreeViewer(project);
132 | }
133 | });
134 |
135 | }
136 | // где-то нужно не забыть удалить этот listener в зависимости от жизненного
137 | // цикла вашего класса
138 | });
139 | } else {
140 | // если инициализирован - сразу инициализируем UI
141 | Display.getDefault().asyncExec(new Runnable() {
142 | public void run() {
143 | updateTreeViewer(project);
144 | }
145 | });
146 | }
147 | }
148 |
149 | ResourcesPlugin.getWorkspace().addResourceChangeListener(objectsListener, IResourceChangeEvent.POST_CHANGE);
150 |
151 | }
152 |
153 | private void updateTreeViewer(IProject project) {
154 | conversionPanelAnalyzer.Analyze(project);
155 | treeViewer.setInput(conversionPanelAnalyzer.getConversionPanel());
156 | treeViewer.expandAll();
157 | treeViewer.refresh();
158 |
159 | }
160 |
161 | @Override
162 | public void dispose() {
163 | servicesOrchestrator.removeListener(projectContextListener);
164 |
165 | ResourcesPlugin.getWorkspace().removeResourceChangeListener(objectsListener);
166 |
167 | super.dispose();
168 | }
169 |
170 | @Override
171 | public void createPartControl(Composite parent) {
172 | GridLayout layout = new GridLayout();
173 | layout.numColumns = 1;
174 | layout.verticalSpacing = 2;
175 | layout.marginWidth = 0;
176 | layout.marginHeight = 2;
177 | parent.setLayout(layout);
178 |
179 | treeViewer = new TreeViewer(parent);
180 | treeViewer.setContentProvider(new ConversionPanelContentProvider());
181 | ConversionPanelLabelProvider labelProvider = new ConversionPanelLabelProvider();
182 | treeViewer.setLabelProvider(labelProvider);
183 |
184 | treeViewer.setUseHashlookup(true);
185 |
186 | GridData layoutData = new GridData();
187 | layoutData.grabExcessHorizontalSpace = true;
188 | layoutData.grabExcessVerticalSpace = true;
189 | layoutData.horizontalAlignment = GridData.FILL;
190 | layoutData.verticalAlignment = GridData.FILL;
191 | treeViewer.getControl().setLayoutData(layoutData);
192 |
193 | treeViewer.setInput(conversionPanelAnalyzer.getConversionPanel());
194 | treeViewer.expandAll();
195 |
196 | hookListeners();
197 | }
198 |
199 | @Override
200 | public void setFocus() {
201 | // TODO Автоматически созданная заглушка метода
202 |
203 | }
204 |
205 | private void hookListeners() {
206 | treeViewer.addDoubleClickListener((new IDoubleClickListener() {
207 |
208 | @Override
209 | public void doubleClick(DoubleClickEvent event) {
210 | ISelection selection = event.getSelection();
211 |
212 | if (selection.isEmpty()) {
213 | return;
214 | }
215 |
216 | Object element = ((IStructuredSelection) selection).getFirstElement();
217 |
218 | if (element instanceof cpFormatVersion) {
219 | Module module = ((cpFormatVersion) element).getModule();
220 | CommonModule commonModule = (CommonModule) module.getOwner();
221 |
222 | URI uri = resourceLookup.getPlatformResourceUri(commonModule);
223 |
224 | OpenHelper openHelper = new OpenHelper();
225 | openHelper.openEditor(uri, null);
226 | }
227 |
228 | }
229 | }));
230 | }
231 |
232 | }
233 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/cp/cpConfiguration.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.cp;
4 |
5 | import org.eclipse.emf.common.util.EList;
6 |
7 | import org.eclipse.emf.ecore.EObject;
8 |
9 | /**
10 | *
11 | * A representation of the model object 'cp Configuration '.
12 | *
13 | *
14 | *
15 | * The following features are supported:
16 | *
17 | *
18 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getConfigurationObject Configuration Object }
19 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getConfigurationName Configuration Name }
20 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getStoreVersion Store Version }
21 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getExtensions Extensions }
22 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getStatus Status }
23 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getAvailableFormatVersions Available Format Versions }
24 | * {@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getCoreObjects Core Objects }
25 | *
26 | *
27 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration()
28 | * @model
29 | * @generated
30 | */
31 | public interface cpConfiguration extends EObject {
32 | /**
33 | * Returns the value of the 'Configuration Object ' attribute.
34 | *
35 | *
36 | * If the meaning of the 'Configuration Object ' attribute isn't clear,
37 | * there really should be more of a description here...
38 | *
39 | *
40 | * @return the value of the 'Configuration Object ' attribute.
41 | * @see #setConfigurationObject(Object)
42 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_ConfigurationObject()
43 | * @model unique="false"
44 | * @generated
45 | */
46 | Object getConfigurationObject();
47 |
48 | /**
49 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getConfigurationObject Configuration Object }' attribute.
50 | *
51 | *
52 | * @param value the new value of the 'Configuration Object ' attribute.
53 | * @see #getConfigurationObject()
54 | * @generated
55 | */
56 | void setConfigurationObject(Object value);
57 |
58 | /**
59 | * Returns the value of the 'Configuration Name ' attribute.
60 | *
61 | *
62 | * If the meaning of the 'Configuration Name ' attribute isn't clear,
63 | * there really should be more of a description here...
64 | *
65 | *
66 | * @return the value of the 'Configuration Name ' attribute.
67 | * @see #setConfigurationName(String)
68 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_ConfigurationName()
69 | * @model unique="false"
70 | * @generated
71 | */
72 | String getConfigurationName();
73 |
74 | /**
75 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getConfigurationName Configuration Name }' attribute.
76 | *
77 | *
78 | * @param value the new value of the 'Configuration Name ' attribute.
79 | * @see #getConfigurationName()
80 | * @generated
81 | */
82 | void setConfigurationName(String value);
83 |
84 | /**
85 | * Returns the value of the 'Store Version ' attribute.
86 | *
87 | *
88 | * If the meaning of the 'Store Version ' attribute isn't clear,
89 | * there really should be more of a description here...
90 | *
91 | *
92 | * @return the value of the 'Store Version ' attribute.
93 | * @see #setStoreVersion(String)
94 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_StoreVersion()
95 | * @model unique="false"
96 | * @generated
97 | */
98 | String getStoreVersion();
99 |
100 | /**
101 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getStoreVersion Store Version }' attribute.
102 | *
103 | *
104 | * @param value the new value of the 'Store Version ' attribute.
105 | * @see #getStoreVersion()
106 | * @generated
107 | */
108 | void setStoreVersion(String value);
109 |
110 | /**
111 | * Returns the value of the 'Extensions ' containment reference list.
112 | * The list contents are of type {@link ru.capralow.dt.conversion.plugin.core.cp.cpExtension}.
113 | *
114 | *
115 | * If the meaning of the 'Extensions ' containment reference list isn't clear,
116 | * there really should be more of a description here...
117 | *
118 | *
119 | * @return the value of the 'Extensions ' containment reference list.
120 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_Extensions()
121 | * @model containment="true"
122 | * @generated
123 | */
124 | EList getExtensions();
125 |
126 | /**
127 | * Returns the value of the 'Status ' attribute.
128 | * The literals are from the enumeration {@link ru.capralow.dt.conversion.plugin.core.cp.ConfigurationStatus}.
129 | *
130 | *
131 | * If the meaning of the 'Status ' attribute isn't clear,
132 | * there really should be more of a description here...
133 | *
134 | *
135 | * @return the value of the 'Status ' attribute.
136 | * @see ru.capralow.dt.conversion.plugin.core.cp.ConfigurationStatus
137 | * @see #setStatus(ConfigurationStatus)
138 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_Status()
139 | * @model unique="false"
140 | * @generated
141 | */
142 | ConfigurationStatus getStatus();
143 |
144 | /**
145 | * Sets the value of the '{@link ru.capralow.dt.conversion.plugin.core.cp.cpConfiguration#getStatus Status }' attribute.
146 | *
147 | *
148 | * @param value the new value of the 'Status ' attribute.
149 | * @see ru.capralow.dt.conversion.plugin.core.cp.ConfigurationStatus
150 | * @see #getStatus()
151 | * @generated
152 | */
153 | void setStatus(ConfigurationStatus value);
154 |
155 | /**
156 | * Returns the value of the 'Available Format Versions ' containment reference list.
157 | * The list contents are of type {@link ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion}.
158 | *
159 | *
160 | * If the meaning of the 'Available Format Versions ' containment reference list isn't clear,
161 | * there really should be more of a description here...
162 | *
163 | *
164 | * @return the value of the 'Available Format Versions ' containment reference list.
165 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_AvailableFormatVersions()
166 | * @model containment="true"
167 | * @generated
168 | */
169 | EList getAvailableFormatVersions();
170 |
171 | /**
172 | * Returns the value of the 'Core Objects ' attribute list.
173 | * The list contents are of type {@link java.lang.Object}.
174 | *
175 | *
176 | * If the meaning of the 'Core Objects ' attribute list isn't clear,
177 | * there really should be more of a description here...
178 | *
179 | *
180 | * @return the value of the 'Core Objects ' attribute list.
181 | * @see ru.capralow.dt.conversion.plugin.core.cp.CpPackage#getcpConfiguration_CoreObjects()
182 | * @model unique="false"
183 | * @generated
184 | */
185 | EList getCoreObjects();
186 |
187 | /**
188 | *
189 | *
190 | * @model kind="operation" unique="false"
191 | * annotation="http://www.eclipse.org/emf/2002/GenModel body='final <%org.eclipse.emf.common.util.BasicEList%><<%java.lang.String%>> result = <%org.eclipse.emf.ecore.xcore.lib.XcoreCollectionLiterals%>.<<%java.lang.String%>>newBasicEList();\n<%org.eclipse.emf.common.util.EList%><<%ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion%>> _availableFormatVersions = this.getAvailableFormatVersions();\nfor (final <%ru.capralow.dt.conversion.plugin.core.cp.cpFormatVersion%> formatVersion : _availableFormatVersions)\n{\n\tresult.add(formatVersion.getVersion());\n}\nreturn result;'"
192 | * @generated
193 | */
194 | EList getVersions();
195 |
196 | } // cpConfiguration
197 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.core/src-gen/ru/capralow/dt/conversion/plugin/core/rm/impl/RegistrationModuleImpl.java:
--------------------------------------------------------------------------------
1 | /**
2 | */
3 | package ru.capralow.dt.conversion.plugin.core.rm.impl;
4 |
5 | import com._1c.g5.v8.bm.core.BmObject;
6 |
7 | import java.util.Date;
8 |
9 | import org.eclipse.emf.common.util.EList;
10 |
11 | import org.eclipse.emf.ecore.EClass;
12 |
13 | import ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent;
14 | import ru.capralow.dt.conversion.plugin.core.rm.RegistrationModule;
15 | import ru.capralow.dt.conversion.plugin.core.rm.RegistrationRule;
16 | import ru.capralow.dt.conversion.plugin.core.rm.RmPackage;
17 |
18 | /**
19 | *
20 | * An implementation of the model object 'Registration Module '.
21 | *
22 | *
23 | * The following features are implemented:
24 | *
25 | *
26 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getModuleRef Module Ref }
27 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getModuleName Module Name }
28 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getModuleVersion Module Version }
29 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getModuleCreationDate Module Creation Date }
30 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getExchangePlanName Exchange Plan Name }
31 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getExchangePlanMdObject Exchange Plan Md Object }
32 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getRuntimeVersion Runtime Version }
33 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getConfigurationName Configuration Name }
34 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getConfigurationSynonym Configuration Synonym }
35 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getConfigurationVersion Configuration Version }
36 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getExchangePlanContent Exchange Plan Content }
37 | * {@link ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl#getRegistrationRules Registration Rules }
38 | *
39 | *
40 | * @generated
41 | */
42 | public class RegistrationModuleImpl extends BmObject implements RegistrationModule {
43 | /**
44 | *
45 | *
46 | * @generated
47 | */
48 | public RegistrationModuleImpl() {
49 | super();
50 | }
51 |
52 | /**
53 | *
54 | *
55 | * @generated
56 | */
57 | @Override
58 | protected EClass eStaticClass() {
59 | return RmPackage.Literals.REGISTRATION_MODULE;
60 | }
61 |
62 | /**
63 | *
64 | *
65 | * @generated
66 | */
67 | @Override
68 | protected int eStaticFeatureCount() {
69 | return 0;
70 | }
71 |
72 | /**
73 | *
74 | *
75 | * @generated
76 | */
77 | public String getModuleRef() {
78 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_REF, true);
79 | }
80 |
81 | /**
82 | *
83 | *
84 | * @generated
85 | */
86 | public void setModuleRef(String newModuleRef) {
87 | eSet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_REF, newModuleRef);
88 | }
89 |
90 | /**
91 | *
92 | *
93 | * @generated
94 | */
95 | public String getModuleName() {
96 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_NAME, true);
97 | }
98 |
99 | /**
100 | *
101 | *
102 | * @generated
103 | */
104 | public void setModuleName(String newModuleName) {
105 | eSet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_NAME, newModuleName);
106 | }
107 |
108 | /**
109 | *
110 | *
111 | * @generated
112 | */
113 | public String getModuleVersion() {
114 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_VERSION, true);
115 | }
116 |
117 | /**
118 | *
119 | *
120 | * @generated
121 | */
122 | public void setModuleVersion(String newModuleVersion) {
123 | eSet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_VERSION, newModuleVersion);
124 | }
125 |
126 | /**
127 | *
128 | *
129 | * @generated
130 | */
131 | public Date getModuleCreationDate() {
132 | return (Date)eGet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_CREATION_DATE, true);
133 | }
134 |
135 | /**
136 | *
137 | *
138 | * @generated
139 | */
140 | public void setModuleCreationDate(Date newModuleCreationDate) {
141 | eSet(RmPackage.Literals.REGISTRATION_MODULE__MODULE_CREATION_DATE, newModuleCreationDate);
142 | }
143 |
144 | /**
145 | *
146 | *
147 | * @generated
148 | */
149 | public String getExchangePlanName() {
150 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__EXCHANGE_PLAN_NAME, true);
151 | }
152 |
153 | /**
154 | *
155 | *
156 | * @generated
157 | */
158 | public void setExchangePlanName(String newExchangePlanName) {
159 | eSet(RmPackage.Literals.REGISTRATION_MODULE__EXCHANGE_PLAN_NAME, newExchangePlanName);
160 | }
161 |
162 | /**
163 | *
164 | *
165 | * @generated
166 | */
167 | public String getExchangePlanMdObject() {
168 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__EXCHANGE_PLAN_MD_OBJECT, true);
169 | }
170 |
171 | /**
172 | *
173 | *
174 | * @generated
175 | */
176 | public void setExchangePlanMdObject(String newExchangePlanMdObject) {
177 | eSet(RmPackage.Literals.REGISTRATION_MODULE__EXCHANGE_PLAN_MD_OBJECT, newExchangePlanMdObject);
178 | }
179 |
180 | /**
181 | *
182 | *
183 | * @generated
184 | */
185 | public String getRuntimeVersion() {
186 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__RUNTIME_VERSION, true);
187 | }
188 |
189 | /**
190 | *
191 | *
192 | * @generated
193 | */
194 | public void setRuntimeVersion(String newRuntimeVersion) {
195 | eSet(RmPackage.Literals.REGISTRATION_MODULE__RUNTIME_VERSION, newRuntimeVersion);
196 | }
197 |
198 | /**
199 | *
200 | *
201 | * @generated
202 | */
203 | public String getConfigurationName() {
204 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_NAME, true);
205 | }
206 |
207 | /**
208 | *
209 | *
210 | * @generated
211 | */
212 | public void setConfigurationName(String newConfigurationName) {
213 | eSet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_NAME, newConfigurationName);
214 | }
215 |
216 | /**
217 | *
218 | *
219 | * @generated
220 | */
221 | public String getConfigurationSynonym() {
222 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_SYNONYM, true);
223 | }
224 |
225 | /**
226 | *
227 | *
228 | * @generated
229 | */
230 | public void setConfigurationSynonym(String newConfigurationSynonym) {
231 | eSet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_SYNONYM, newConfigurationSynonym);
232 | }
233 |
234 | /**
235 | *
236 | *
237 | * @generated
238 | */
239 | public String getConfigurationVersion() {
240 | return (String)eGet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_VERSION, true);
241 | }
242 |
243 | /**
244 | *
245 | *
246 | * @generated
247 | */
248 | public void setConfigurationVersion(String newConfigurationVersion) {
249 | eSet(RmPackage.Literals.REGISTRATION_MODULE__CONFIGURATION_VERSION, newConfigurationVersion);
250 | }
251 |
252 | /**
253 | *
254 | *
255 | * @generated
256 | */
257 | @SuppressWarnings("unchecked")
258 | public EList getExchangePlanContent() {
259 | return (EList)eGet(RmPackage.Literals.REGISTRATION_MODULE__EXCHANGE_PLAN_CONTENT, true);
260 | }
261 |
262 | /**
263 | *
264 | *
265 | * @generated
266 | */
267 | @SuppressWarnings("unchecked")
268 | public EList getRegistrationRules() {
269 | return (EList)eGet(RmPackage.Literals.REGISTRATION_MODULE__REGISTRATION_RULES, true);
270 | }
271 |
272 | } //RegistrationModuleImpl
273 |
--------------------------------------------------------------------------------
/ru.capralow.dt.conversion.plugin.ui/src/ru/capralow/dt/conversion/plugin/ui/editors/RegistrationModuleEditor.java:
--------------------------------------------------------------------------------
1 | package ru.capralow.dt.conversion.plugin.ui.editors;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 | import java.util.InvalidPropertiesFormatException;
6 |
7 | import javax.xml.parsers.DocumentBuilder;
8 | import javax.xml.parsers.DocumentBuilderFactory;
9 | import javax.xml.parsers.ParserConfigurationException;
10 |
11 | import org.eclipse.core.resources.IFile;
12 | import org.eclipse.core.runtime.CoreException;
13 | import org.eclipse.core.runtime.IProgressMonitor;
14 | import org.eclipse.emf.common.util.EList;
15 | import org.eclipse.jface.viewers.TreeViewer;
16 | import org.eclipse.swt.layout.GridData;
17 | import org.eclipse.swt.layout.GridLayout;
18 | import org.eclipse.swt.widgets.Composite;
19 | import org.eclipse.ui.IEditorInput;
20 | import org.eclipse.ui.IEditorSite;
21 | import org.eclipse.ui.IFileEditorInput;
22 | import org.eclipse.ui.PartInitException;
23 | import org.eclipse.ui.editors.text.TextEditor;
24 | import org.eclipse.ui.part.FileEditorInput;
25 | import org.w3c.dom.Document;
26 | import org.w3c.dom.Element;
27 | import org.w3c.dom.NamedNodeMap;
28 | import org.w3c.dom.Node;
29 | import org.w3c.dom.NodeList;
30 | import org.xml.sax.SAXException;
31 |
32 | import com.google.common.base.Preconditions;
33 |
34 | import ru.capralow.dt.conversion.plugin.core.rm.AutoRegistration;
35 | import ru.capralow.dt.conversion.plugin.core.rm.ExchangePlanContent;
36 | import ru.capralow.dt.conversion.plugin.core.rm.RegistrationModule;
37 | import ru.capralow.dt.conversion.plugin.core.rm.RegistrationModuleContentProvider;
38 | import ru.capralow.dt.conversion.plugin.core.rm.impl.ExchangePlanContentImpl;
39 | import ru.capralow.dt.conversion.plugin.core.rm.impl.RegistrationModuleImpl;
40 |
41 | public class RegistrationModuleEditor extends TextEditor {
42 | // @Inject
43 | // private IConfigurationProvider configurationProvider;
44 |
45 | protected TreeViewer treeViewer;
46 | // protected RegistrationModuleLabelProvider labelProvider;
47 |
48 | // protected Action onlyBoardGamesAction, atLeatThreeItems;
49 | // protected Action booksBoxesGamesAction, noArticleAction;
50 | // protected Action addBookAction, removeAction;
51 | // protected ViewerFilter onlyBoardGamesFilter, atLeastThreeFilter;
52 | // protected ViewerSorter booksBoxesGamesSorter, noArticleSorter;
53 | //
54 | // protected MovingBox root;
55 |
56 | protected RegistrationModule registrationModule;
57 |
58 | @Override
59 | public void init(IEditorSite site, IEditorInput input) throws PartInitException {
60 | Preconditions.checkArgument(input instanceof IFileEditorInput, "IFileEditorInput expected, but actual: %s",
61 | input);
62 |
63 | setSite(site);
64 | setInput(input);
65 |
66 | readRegistrationModule(((FileEditorInput) input).getFile());
67 |
68 | // IProject project = ((FileEditorInput) input).getFile().getProject();
69 | // Configuration configuration = configurationProvider.getConfiguration(project);
70 | //
71 | // EList exchangePlans = configuration.getExchangePlans();
72 | // ExchangePlan currentObject = exchangePlans.get(5);
73 | // Template registrationModuleTemplate = currentObject.getTemplates().get(1);
74 | // FileAwareTextDocumentImpl templateContext = (FileAwareTextDocumentImpl) registrationModuleTemplate
75 | // .getTemplate();
76 |
77 | // ITextEditor editor = (ITextEditor) getAdapter(ITextEditor.class);
78 | // XtextDocumentProvider provider = (XtextDocumentProvider) editor.getDocumentProvider();
79 | // IXtextDocument document = (IXtextDocument) provider.getDocument(editor);
80 | //
81 | // // ������� ������ ����������, � �������� ����������� ������, ��
82 | // // �������� ���� ������� �������
83 | // EObject moduleOwner = getModuleOwner(document);
84 |
85 | }
86 |
87 | @Override
88 | public void doSave(IProgressMonitor monitor) {
89 | // TODO Автоматически созданная заглушка метода
90 |
91 | }
92 |
93 | @Override
94 | public void doSaveAs() {
95 | // TODO Автоматически созданная заглушка метода
96 |
97 | }
98 |
99 | @Override
100 | public boolean isDirty() {
101 | // TODO Автоматически созданная заглушка метода
102 | return false;
103 | }
104 |
105 | @Override
106 | public boolean isSaveAsAllowed() {
107 | // TODO Автоматически созданная заглушка метода
108 | return false;
109 | }
110 |
111 | @Override
112 | public void createPartControl(Composite parent) {
113 | GridLayout layout = new GridLayout();
114 | layout.numColumns = 1;
115 | layout.verticalSpacing = 2;
116 | layout.marginWidth = 0;
117 | layout.marginHeight = 2;
118 | parent.setLayout(layout);
119 |
120 | treeViewer = new TreeViewer(parent);
121 | treeViewer.setContentProvider(new RegistrationModuleContentProvider());
122 | // labelProvider = new MovingBoxLabelProvider();
123 | // treeViewer.setLabelProvider(labelProvider);
124 |
125 | treeViewer.setUseHashlookup(true);
126 |
127 | GridData layoutData = new GridData();
128 | layoutData.grabExcessHorizontalSpace = true;
129 | layoutData.grabExcessVerticalSpace = true;
130 | layoutData.horizontalAlignment = GridData.FILL;
131 | layoutData.verticalAlignment = GridData.FILL;
132 | treeViewer.getControl().setLayoutData(layoutData);
133 |
134 | treeViewer.setInput(registrationModule);
135 | treeViewer.expandAll();
136 | }
137 |
138 | @Override
139 | public void setFocus() {
140 | // TODO Автоматически созданная заглушка метода
141 |
142 | }
143 |
144 | private void readRegistrationModule(IFile file) {
145 | registrationModule = new RegistrationModuleImpl();
146 |
147 | InputStream fileInput;
148 | try {
149 | fileInput = file.getContents();
150 |
151 | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
152 | DocumentBuilder builder = factory.newDocumentBuilder();
153 | Document document = builder.parse(fileInput);
154 |
155 | Element documentElement = document.getDocumentElement();
156 |
157 | if (documentElement.getNodeName() != "������������������") {
158 | return;
159 | }
160 |
161 | NodeList nodeList = documentElement.getChildNodes();
162 | for (int i = 0; i < nodeList.getLength(); i++) {
163 | Node node = nodeList.item(i);
164 |
165 | String nodeName = node.getNodeName();
166 | if (nodeName == "�������������") {
167 | registrationModule.setModuleVersion(node.getFirstChild().getTextContent());
168 |
169 | } else if (nodeName == "��") {
170 | registrationModule.setModuleRef(node.getFirstChild().getTextContent());
171 |
172 | } else if (nodeName == "������������") {
173 | registrationModule.setModuleName(node.getFirstChild().getTextContent());
174 |
175 | } else if (nodeName == "�����������������") {
176 | // TODO: registrationModule.setModuleCreationDate(node.getNodeValue());
177 |
178 | } else if (nodeName == "����������") {
179 | registrationModule.setExchangePlanName(node.getAttributes().getNamedItem("���").getTextContent());
180 | registrationModule.setExchangePlanMdObject(node.getFirstChild().getTextContent());
181 |
182 | } else if (nodeName == "������������") {
183 | NamedNodeMap attributes = node.getAttributes();
184 | registrationModule.setConfigurationName(node.getFirstChild().getTextContent());
185 | registrationModule
186 | .setConfigurationSynonym(attributes.getNamedItem("�������������������").getTextContent());
187 | registrationModule
188 | .setConfigurationVersion(attributes.getNamedItem("������������������").getTextContent());
189 | registrationModule.setRuntimeVersion(attributes.getNamedItem("���������������").getTextContent());
190 |
191 | } else if (nodeName == "�����������������") {
192 | EList exchangePlanContent = registrationModule.getExchangePlanContent();
193 |
194 | NodeList childNodeList = node.getChildNodes();
195 | for (int ci = 0; ci < childNodeList.getLength(); ci++) {
196 | Node childNode = childNodeList.item(ci);
197 | if (childNode.getNodeName() != "�������") {
198 | continue;
199 | }
200 |
201 | ExchangePlanContentImpl exchangePlanContentElement = new ExchangePlanContentImpl();
202 |
203 | NodeList childChildNodeList = childNode.getChildNodes();
204 | for (int cci = 0; cci < childChildNodeList.getLength(); cci++) {
205 | Node childChildNode = childChildNodeList.item(cci);
206 | if (childChildNode.getNodeName() == "���") {
207 | exchangePlanContentElement.setMdObject(childChildNode.getFirstChild().getTextContent());
208 |
209 | } else if (childChildNode.getNodeName() == "���������������") {
210 | if (childChildNode.getFirstChild().getTextContent() == "true") {
211 | exchangePlanContentElement.setAutoRecord(AutoRegistration.ALLOW);
212 |
213 | } else {
214 | exchangePlanContentElement.setAutoRecord(AutoRegistration.DENY);
215 |
216 | }
217 | }
218 | }
219 |
220 | exchangePlanContent.add(exchangePlanContentElement);
221 | }
222 |
223 | } else if (nodeName == "��������������������������") {
224 | registrationModule.setExchangePlanName(node.getFirstChild().getTextContent());
225 |
226 | }
227 | }
228 | // fileInput.close();
229 |
230 | } catch (InvalidPropertiesFormatException e) {
231 | // TODO Автоматически созданная заглушка метода
232 | e.printStackTrace();
233 | } catch (IOException e) {
234 | // TODO Автоматически созданная заглушка метода
235 | e.printStackTrace();
236 | } catch (ParserConfigurationException e) {
237 | // TODO Автоматически созданная заглушка метода
238 | e.printStackTrace();
239 | } catch (CoreException e1) {
240 | // TODO Автоматически созданная заглушка метода
241 | e1.printStackTrace();
242 | } catch (SAXException e) {
243 | // TODO Автоматически созданная заглушка метода
244 | e.printStackTrace();
245 | }
246 | }
247 |
248 | // private static class CustomLabelProvider extends LabelProvider implements IStyledLabelProvider {
249 | // @Override
250 | // public String getText(Object element) {
251 | // return super.getText(element);
252 | // }
253 | //
254 | // @Override
255 | // public StyledString getStyledText(Object element) {
256 | // return new StyledString(super.getText(element));
257 | // }
258 | //
259 | // @Override
260 | // public Image getImage(Object element) {
261 | // return super.getImage(element);
262 | // }
263 | // }
264 | //
265 | // private EObject getModuleOwner(IXtextDocument doc) {
266 | // // ������ � ������������� ������� ����������� ����� ����� �������� ��������
267 | // // ������ ����� ����������� �����
268 | // // ������������� ������ �������� �������� � �������
269 | // return doc.readOnly(new IUnitOfWork() {
270 | // @Override
271 | // public EObject exec(XtextResource res) throws Exception {
272 | // // ������ ���������, ����������� ������������� ������ ����������� �����
273 | // if (res.getContents() != null && !res.getContents().isEmpty()) {
274 | // EObject obj = res.getContents().get(0);
275 | // if (obj instanceof Module) // ���������, ��� �������� � ���������� �������� ������������� ������
276 | // {
277 | // if (((Module) obj).getModuleType() != ModuleType.OBJECT_MODULE) // ���������� ������ ���������
278 | // // ������
279 | // return null;
280 | // Module module = (Module) obj;
281 | // return EcoreUtil.resolve(module.getOwner(), module);
282 | // }
283 | // }
284 | // return null;
285 | // }
286 | // });
287 | // }
288 | }
289 |
--------------------------------------------------------------------------------