diff --git a/.classpath b/.classpath index 301167ee..b8c24bf9 100644 --- a/.classpath +++ b/.classpath @@ -17,7 +17,7 @@ - + diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index cf67412b..d46e2145 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,23 +15,27 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.9.0 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: '21' - name: Copy toolchain run: | mkdir -p ~/.m2/ - echo "jdk17eclipse/$JAVA_HOME" > ~/.m2/toolchains.xml + echo "jdkJavaSE-2121eclipse/$JAVA_HOME" > ~/.m2/toolchains.xml - name: Build with Maven run: mvn -B clean package --file pom.xml - name: Deploy with Maven env: - BT_PAT: ${{ secrets.BT_TOKEN }} + T: ${{ secrets.GITHUB_TOKEN }} run: | - echo "AuthorizationBearer $BT_PATgithubcentralhttps://repo1.maven.org/maven2githubhttps://maven.pkg.github.com/enterpriseDomain/*truegithubgithub" > ~/.m2/settings.xml + echo "AuthorizationBearer $Tgithubcentralhttps://repo1.maven.org/maven2githubhttps://maven.pkg.github.com/enterpriseDomain/*truegithubgithub" > ~/.m2/settings.xml mvn clean deploy -s ~/.m2/settings.xml diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 582073c4..623109cd 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,8 +1,8 @@ - org.eclipse.tycho.extras - tycho-pomless - 0.25.0 + org.eclipse.tycho + tycho-build + 4.0.8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 2de559db..88cb2b58 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -9,8 +9,13 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=21 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error @@ -107,4 +112,4 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.ecp.edit/.classpath b/bundles/org.enterpriseDomain/.classpath similarity index 77% rename from bundles/org.enterprisedomain.ecp.edit/.classpath rename to bundles/org.enterpriseDomain/.classpath index 065ac06e..375961e4 100644 --- a/bundles/org.enterprisedomain.ecp.edit/.classpath +++ b/bundles/org.enterpriseDomain/.classpath @@ -1,7 +1,7 @@ - + - + diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/.classpath b/bundles/org.enterprisedomain.classmaker.cdo.ui/.classpath index 4a00becd..9e03abfa 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/.classpath +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/.classpath @@ -1,11 +1,8 @@ - - - - - - - - + + + + diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.classmaker.cdo.ui/.settings/org.eclipse.jdt.core.prefs index c9545f06..d4540a53 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,10 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.cdo.ui/META-INF/MANIFEST.MF index 5b26c6e8..dc6ffbe7 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/META-INF/MANIFEST.MF @@ -1,17 +1,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ClassMaker CDO UI Support -Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui -Bundle-Version: 0.8.55.qualifier +Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui;singleton:=true +Bundle-Version: 0.8.55 Bundle-Vendor: Kyrill Zotkin Require-Bundle: org.enterprisedomain.classmaker.cdo;bundle-version="0.0.1", - org.eclipse.emf.cdo.ui.shared;bundle-version="4.5.0", - org.eclipse.emf.cdo.ui;bundle-version="4.9.1", - org.eclipse.emf.cdo.explorer.ui;bundle-version="4.7.1", - org.eclipse.net4j.tcp;bundle-version="4.2.1", - org.eclipse.emf.ecp.view.context;bundle-version="1.26.0", - org.eclipse.emf.ecp.ui.view;bundle-version="1.26.0", - org.eclipse.emf.ecp.ui.view.swt;bundle-version="1.26.0", + org.eclipse.emf.cdo.ui.shared;bundle-version="[4.5.0,5.0.0)", + org.eclipse.emf.cdo.ui;bundle-version="[4.9.1,5.0.0)", + org.eclipse.emf.cdo.explorer.ui;bundle-version="[4.7.1,5.0.0)", + org.eclipse.net4j.tcp;bundle-version="[4.2.1,5.0.0)", org.eclipse.equinox.concurrent;bundle-version="1.2.0" Automatic-Module-Name: org.enterprisedomain.classmaker.cdo.ui -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-21 diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/build.properties b/bundles/org.enterprisedomain.classmaker.cdo.ui/build.properties index 34d2e4d2..e9863e28 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/build.properties +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + plugin.xml diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/plugin.xml b/bundles/org.enterprisedomain.classmaker.cdo.ui/plugin.xml new file mode 100644 index 00000000..3e5c69a1 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/plugin.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/pom.xml b/bundles/org.enterprisedomain.classmaker.cdo.ui/pom.xml index 9cac1bad..2876a518 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/pom.xml +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/pom.xml @@ -1,10 +1,12 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/src/org/enterprisedomain/classmaker/cdo/ui/CDOEditorOpener.java b/bundles/org.enterprisedomain.classmaker.cdo.ui/src/org/enterprisedomain/classmaker/cdo/ui/CDOEditorOpener.java new file mode 100644 index 00000000..c1b311ee --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/src/org/enterprisedomain/classmaker/cdo/ui/CDOEditorOpener.java @@ -0,0 +1,54 @@ +package org.enterprisedomain.classmaker.cdo.ui; + +import org.eclipse.emf.cdo.explorer.ui.checkouts.CDOModelEditorInput; +import org.eclipse.emf.cdo.transaction.CDOCommitContext; +import org.eclipse.emf.cdo.transaction.CDOTransaction; +import org.eclipse.emf.cdo.transaction.CDOTransactionHandler2; +import org.eclipse.emf.cdo.ui.CDOEditorUtil; +import org.eclipse.emf.common.util.URI; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchPage; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; + +public class CDOEditorOpener extends org.eclipse.emf.cdo.ui.CDOEditorOpener.Default { + + public CDOEditorOpener() { + } + + @Override + protected IEditorPart doOpenEditor(IWorkbenchPage page, URI uri) { + CDOModelEditorInput editorInput = new CDOModelEditorInput(uri) { + + @Override + protected void configureTransaction(CDOTransaction transaction) { + transaction.addTransactionHandler(new CDOTransactionHandler2() { + + @Override + public void rolledBackTransaction(CDOTransaction transaction) { + System.out.println("rolledBackTransaction " + transaction); + } + + @Override + public void committingTransaction(CDOTransaction transaction, CDOCommitContext commitContext) { + System.out.println("committingTransaction " + transaction); + } + + @Override + public void committedTransaction(CDOTransaction transaction, CDOCommitContext commitContext) { + System.out.println("committedTransaction " + transaction); + } + }); + super.configureTransaction(transaction); + } + + }; + String editorID = CDOEditorUtil.getEditorID(); + try { + return page.openEditor(editorInput, editorID); + } catch (Exception ex) { + ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(ex)); + return null; + } + } + +} diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/MANIFEST.MF index 115fd397..c000e1a9 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/MANIFEST.MF @@ -1,16 +1,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ClassMaker CDO UI Support -Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui -Bundle-Version: 0.8.55.202208170821 +Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui;singleton:=t + rue +Bundle-Version: 0.8.55 Bundle-Vendor: Kyrill Zotkin Require-Bundle: org.enterprisedomain.classmaker.cdo;bundle-version="0.0. - 1",org.eclipse.emf.cdo.ui.shared;bundle-version="4.5.0",org.eclipse.emf - .cdo.ui;bundle-version="4.9.1",org.eclipse.emf.cdo.explorer.ui;bundle-v - ersion="4.7.1",org.eclipse.net4j.tcp;bundle-version="4.2.1",org.eclipse - .emf.ecp.view.context;bundle-version="1.26.0",org.eclipse.emf.ecp.ui.vi - ew;bundle-version="1.26.0",org.eclipse.emf.ecp.ui.view.swt;bundle-versi - on="1.26.0",org.eclipse.equinox.concurrent;bundle-version="1.2.0" + 1",org.eclipse.emf.cdo.ui.shared;bundle-version="[4.5.0,5.0.0)",org.ecl + ipse.emf.cdo.ui;bundle-version="[4.9.1,5.0.0)",org.eclipse.emf.cdo.expl + orer.ui;bundle-version="[4.7.1,5.0.0)",org.eclipse.net4j.tcp;bundle-ver + sion="[4.2.1,5.0.0)",org.eclipse.equinox.concurrent;bundle-version="1.2 + .0" Automatic-Module-Name: org.enterprisedomain.classmaker.cdo.ui -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=21))" diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/maven-archiver/pom.properties b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/maven-archiver/pom.properties deleted file mode 100644 index 85539f48..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/maven-archiver/pom.properties +++ /dev/null @@ -1,3 +0,0 @@ -artifactId=org.enterprisedomain.classmaker.cdo.ui -groupId=org.enterprisedomain -version=0.8.55-SNAPSHOT diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2artifacts.xml b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2artifacts.xml deleted file mode 100644 index a4771143..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2artifacts.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2content.xml b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2content.xml deleted file mode 100644 index aa0bff34..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/p2content.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.enterprisedomain.classmaker.cdo.ui - - - - - - - - - - - Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui Bundle-Version: 0.8.55.202208170821 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.ui.source Bundle-Version: 0.8.55.202208170821 - - - - - diff --git a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties b/bundles/org.enterprisedomain.classmaker.cdo.ui/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties deleted file mode 100644 index 090b1e5f..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo.ui/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Source Bundle Localization -#Wed Aug 17 15:24:43 NOVT 2022 -bundleVendor=Kyrill Zotkin -bundleName=ClassMaker CDO UI Support Source diff --git a/bundles/org.enterprisedomain.classmaker.cdo/.classpath b/bundles/org.enterprisedomain.classmaker.cdo/.classpath index 3628e336..dc32e1f3 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/.classpath +++ b/bundles/org.enterprisedomain.classmaker.cdo/.classpath @@ -1,11 +1,12 @@ - + - + - - - + + + diff --git a/bundles/org.enterprisedomain.classmaker.cdo/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.cdo/META-INF/MANIFEST.MF index 5a491303..b3dacaa2 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.cdo/META-INF/MANIFEST.MF @@ -2,13 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ClassMaker CDO Support Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo;singleton:=true -Bundle-Version: 0.8.55.qualifier +Bundle-Version: 0.8.55 Bundle-Vendor: Kyrill Zotkin Automatic-Module-Name: org.enterprisedomain.classmaker.cdo -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Bundle-Activator: org.enterprisedomain.classmaker.cdo.Activator -Require-Bundle: org.eclipse.osgi;bundle-version="[3.16.200,4.0.0)", - org.enterprisedomain.classmaker;bundle-version="0.8.55", - org.eclipse.emf.cdo;bundle-version="4.15.0";visibility:=reexport, - org.eclipse.emf.cdo.edit;bundle-version="4.5.6";visibility:=reexport +Require-Bundle: org.eclipse.osgi;bundle-version="3.24.0", + org.enterprisedomain.classmaker;bundle-version="0.8.55";visibility:=reexport, + org.eclipse.emf.cdo;bundle-version="[4.21.0,5.0.0)";visibility:=reexport, + org.eclipse.emf.cdo.edit;bundle-version="[4.5.6,5.0.0)";visibility:=reexport Export-Package: org.enterprisedomain.classmaker.cdo diff --git a/bundles/org.enterprisedomain.classmaker.cdo/plugin.xml b/bundles/org.enterprisedomain.classmaker.cdo/plugin.xml index 655ceed1..ed92f485 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/plugin.xml +++ b/bundles/org.enterprisedomain.classmaker.cdo/plugin.xml @@ -1,13 +1,13 @@ - - - - + + + + diff --git a/bundles/org.enterprisedomain.classmaker.cdo/pom.xml b/bundles/org.enterprisedomain.classmaker.cdo/pom.xml index 1c7a77f3..a9715215 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/pom.xml +++ b/bundles/org.enterprisedomain.classmaker.cdo/pom.xml @@ -1,10 +1,12 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CDOGenerator.java b/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CDOGenerator.java index 7d42fd61..61e7868e 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CDOGenerator.java +++ b/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CDOGenerator.java @@ -21,6 +21,7 @@ import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind; import org.eclipse.emf.codegen.ecore.genmodel.GenModel; import org.eclipse.emf.ecore.EPackage; +import org.enterprisedomain.classmaker.Contribution; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.jobs.codegen.EcoreGenerator; @@ -32,8 +33,11 @@ public CDOGenerator(int depth, long stateTimestamp) { protected void setupGenModel(IPath projectPath, GenModel ecoreGenModel, Collection ePackages) { super.setupGenModel(projectPath, ecoreGenModel, ePackages); - ClassMakerPlugin.getClassMaker().getWorkspace().getContribution(projectPath.lastSegment()).getDependencies() - .add("org.eclipse.emf.cdo"); + Contribution contribution = ClassMakerPlugin.getClassMaker().getWorkspace() + .getContribution(projectPath.lastSegment()); + contribution.getDependencies().add("org.eclipse.emf.cdo"); + if (contribution.getState().isEdit()) + contribution.getDependencies().add("org.eclipse.emf.cdo.edit"); ecoreGenModel.setSuppressInterfaces(false); ecoreGenModel.setFeatureDelegation(GenDelegationKind.REFLECTIVE_LITERAL); ecoreGenModel.getModelPluginVariables().add("CDO=org.eclipse.emf.cdo"); //$NON-NLS-1$ diff --git a/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CreateCDOGeneratorCustomizer.java b/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CreateCDOGeneratorCustomizer.java index d989dd70..90561494 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CreateCDOGeneratorCustomizer.java +++ b/bundles/org.enterprisedomain.classmaker.cdo/src/org/enterprisedomain/classmaker/cdo/CreateCDOGeneratorCustomizer.java @@ -8,8 +8,8 @@ public class CreateCDOGeneratorCustomizer extends CustomizerImpl { @Override public Object customize(EList args) { - CDOGenerator generator = new CDOGenerator((Integer) args.get(0), (Long) args.get(2)); - generator.setProject((IProject) args.get(1)); + CDOGenerator generator = new CDOGenerator((Integer) args.get(0), (Long) args.get(1)); + generator.setProject((IProject) args.get(2)); return generator; } diff --git a/bundles/org.enterprisedomain.classmaker.cdo/target/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.cdo/target/MANIFEST.MF index 7f9a84bb..7dfd3791 100644 --- a/bundles/org.enterprisedomain.classmaker.cdo/target/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.cdo/target/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ClassMaker CDO Support Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo;singleton:=true -Bundle-Version: 0.8.55.202208170821 +Bundle-Version: 0.8.55 Bundle-Vendor: Kyrill Zotkin Automatic-Module-Name: org.enterprisedomain.classmaker.cdo -Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-Activator: org.enterprisedomain.classmaker.cdo.Activator -Require-Bundle: org.eclipse.osgi;bundle-version="[3.16.200,4.0.0)",org.e - nterprisedomain.classmaker;bundle-version="0.8.55",org.eclipse.emf.cdo; - bundle-version="4.15.0";visibility:=reexport,org.eclipse.emf.cdo.edit;b - undle-version="4.5.6";visibility:=reexport +Require-Bundle: org.eclipse.osgi;bundle-version="3.24.0",org.enterprised + omain.classmaker;bundle-version="0.8.55";visibility:=reexport,org.eclip + se.emf.cdo;bundle-version="[4.21.0,5.0.0)";visibility:=reexport,org.ecl + ipse.emf.cdo.edit;bundle-version="[4.5.6,5.0.0)";visibility:=reexport Export-Package: org.enterprisedomain.classmaker.cdo +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=21))" diff --git a/bundles/org.enterprisedomain.classmaker.cdo/target/maven-archiver/pom.properties b/bundles/org.enterprisedomain.classmaker.cdo/target/maven-archiver/pom.properties deleted file mode 100644 index 040ce99c..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo/target/maven-archiver/pom.properties +++ /dev/null @@ -1,3 +0,0 @@ -artifactId=org.enterprisedomain.classmaker.cdo -groupId=org.enterprisedomain -version=0.8.55-SNAPSHOT diff --git a/bundles/org.enterprisedomain.classmaker.cdo/target/p2artifacts.xml b/bundles/org.enterprisedomain.classmaker.cdo/target/p2artifacts.xml deleted file mode 100644 index 94800a5d..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo/target/p2artifacts.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.classmaker.cdo/target/p2content.xml b/bundles/org.enterprisedomain.classmaker.cdo/target/p2content.xml deleted file mode 100644 index 4a28ddd8..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo/target/p2content.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.enterprisedomain.classmaker.cdo - - - - - - - - - - - Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo;singleton:=true Bundle-Version: 0.8.55.202208170821 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bundle-SymbolicName: org.enterprisedomain.classmaker.cdo.source Bundle-Version: 0.8.55.202208170821 - - - - - diff --git a/bundles/org.enterprisedomain.classmaker.cdo/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties b/bundles/org.enterprisedomain.classmaker.cdo/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties deleted file mode 100644 index 7da4a26c..00000000 --- a/bundles/org.enterprisedomain.classmaker.cdo/target/sourcebundle-l10n-gen/OSGI-INF/l10n/bundle-src.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Source Bundle Localization -#Wed Aug 17 15:24:42 NOVT 2022 -bundleVendor=Kyrill Zotkin -bundleName=ClassMaker CDO Support Source diff --git a/bundles/org.enterprisedomain.classmaker.edit/.classpath b/bundles/org.enterprisedomain.classmaker.edit/.classpath index bc57d238..5050774b 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/.classpath +++ b/bundles/org.enterprisedomain.classmaker.edit/.classpath @@ -1,7 +1,21 @@ - + + + + + - - + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.edit/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.classmaker.edit/.settings/org.eclipse.jdt.core.prefs index 7adc0fb9..3a79233b 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.classmaker.edit/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.classmaker.edit/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.edit/META-INF/MANIFEST.MF index f1fb0988..195efe89 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.edit/META-INF/MANIFEST.MF @@ -3,21 +3,19 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.enterprisedomain.classmaker.edit;singleton:=true Automatic-Module-Name: org.enterprisedomain.classmaker.edit -Bundle-Version: 0.8.55.qualifier +Bundle-Version: 0.8.55 Bundle-ClassPath: . Bundle-Activator: org.enterprisedomain.classmaker.provider.ClassMakerEditPlugin$Implementation Bundle-Vendor: %providerName Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: org.enterprisedomain.classmaker.edit.command, org.enterprisedomain.classmaker.provider -Require-Bundle: org.eclipse.core.runtime, +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.33.100", org.enterprisedomain.classmaker;visibility:=reexport, org.eclipse.emf.edit;visibility:=reexport, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.emf.ecore.edit;visibility:=reexport, - org.eclipse.emf.ecp.view.util.swt;bundle-version="[1.19.0,2.0.0)", - org.eclipse.emf.ecp.ui.view.swt;bundle-version="[1.19.0,2.0.0)", org.eclipse.e4.ui.services, org.eclipse.ui;bundle-version="3.112.0" Bundle-ActivationPolicy: lazy diff --git a/bundles/org.enterprisedomain.ecp.edit/icons/full/ctool16/CreateEOperationInvocation_arguments_EParameterToObjectMapEntry.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkerMapEntry.gif similarity index 71% rename from bundles/org.enterprisedomain.ecp.edit/icons/full/ctool16/CreateEOperationInvocation_arguments_EParameterToObjectMapEntry.gif rename to bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkerMapEntry.gif index b325c758..a6e5cfd3 100644 Binary files a/bundles/org.enterprisedomain.ecp.edit/icons/full/ctool16/CreateEOperationInvocation_arguments_EParameterToObjectMapEntry.gif and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkerMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkersMapEntry.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkersMapEntry.gif new file mode 100644 index 00000000..238a342d Binary files /dev/null and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateModels_dynamic_StageQualifierToWorkersMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkerMapEntry.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkerMapEntry.gif new file mode 100644 index 00000000..b61a6686 Binary files /dev/null and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkerMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkersMapEntry.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkersMapEntry.gif new file mode 100644 index 00000000..4455fd04 Binary files /dev/null and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/ctool16/CreateStrategy_workers_StageQualifierToWorkersMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EOperationInvocation.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkerMapEntry.gif similarity index 50% rename from bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EOperationInvocation.gif rename to bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkerMapEntry.gif index 59155918..ed874747 100644 Binary files a/bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EOperationInvocation.gif and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkerMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EParameterToObjectMapEntry.gif b/bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkersMapEntry.gif similarity index 50% rename from bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EParameterToObjectMapEntry.gif rename to bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkersMapEntry.gif index c673a520..f8041d22 100644 Binary files a/bundles/org.enterprisedomain.ecp.edit/icons/full/obj16/EParameterToObjectMapEntry.gif and b/bundles/org.enterprisedomain.classmaker.edit/icons/full/obj16/StageQualifierToWorkersMapEntry.gif differ diff --git a/bundles/org.enterprisedomain.classmaker.edit/plugin.properties b/bundles/org.enterprisedomain.classmaker.edit/plugin.properties index d17756a5..b9827a59 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/plugin.properties +++ b/bundles/org.enterprisedomain.classmaker.edit/plugin.properties @@ -65,7 +65,6 @@ _UI_State_timestamp_feature = Timestamp _UI_State_deployableUnitName_feature = Deployable Unit Name _UI_State_jobFamily_feature = Job Family _UI_State_resource_feature = Resource -_UI_State_commitIds_feature = Commit Ids _UI_State_stateCustomizers_feature = State Customizers _UI_State_projectName_feature = Project Name _UI_Item_modelName_feature = Model Name @@ -205,3 +204,23 @@ _UI_Models_generated_feature = Generated _UI_Models_generatedEdit_feature = Generated Edit _UI_Models_generatedEditor_feature = Generated Editor _UI_Models_parent_feature = Parent +_UI_Customizer_exclusive_feature = Exclusive +_UI_Customizer_stage_feature = Stage +_UI_Customizer_customized_feature = Customized +_UI_Customizer_composite_feature = Composite +_UI_State_nonExclusiveStateCustomizers_feature = Non Exclusive State Customizers +_UI_Workspace_nonExclusiveCustomizers_feature = Non Exclusive Customizers +_UI_State_excludedEPackages_feature = Excluded EPackages +_UI_Workspace_excludedEPackages_feature = Excluded EPackages +_UI_State_basePackage_feature = Base Package +_UI_Workspace_classLoader_feature = Class Loader +_UI_Project_classLoader_feature = Class Loader +_UI_Project_resource_feature = Resource +_UI_Item_resource_feature = Resource +_UI_StageQualifierToWorkerMapEntry_type = Stage Qualifier To Worker Map Entry +_UI_Strategy_workers_feature = Workers +_UI_StageQualifierToWorkerMapEntry_key_feature = Key +_UI_StageQualifierToWorkerMapEntry_value_feature = Value +_UI_StageQualifierToWorkersMapEntry_type = Stage Qualifier To Workers Map Entry +_UI_StageQualifierToWorkersMapEntry_key_feature = Key +_UI_StageQualifierToWorkersMapEntry_value_feature = Value diff --git a/bundles/org.enterprisedomain.classmaker.edit/plugin.xml b/bundles/org.enterprisedomain.classmaker.edit/plugin.xml index 557b70a6..ac6917cf 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/plugin.xml +++ b/bundles/org.enterprisedomain.classmaker.edit/plugin.xml @@ -19,17 +19,16 @@ - - - + + - + org.eclipse.emf.edit.provider.IItemPropertySource" /> + diff --git a/bundles/org.enterprisedomain.classmaker.edit/pom.xml b/bundles/org.enterprisedomain.classmaker.edit/pom.xml index 09539846..8b6d3723 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/pom.xml +++ b/bundles/org.enterprisedomain.classmaker.edit/pom.xml @@ -1,12 +1,14 @@ - + 4.0.0 eclipse-plugin org.enterprisedomain.classmaker.edit org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ - + diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ClassMakerItemProviderAdapterFactory.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ClassMakerItemProviderAdapterFactory.java index 125a6ab2..70aef181 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ClassMakerItemProviderAdapterFactory.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ClassMakerItemProviderAdapterFactory.java @@ -328,6 +328,29 @@ public Adapter createStageQualifierToCustomizerMapEntryAdapter() { return stageQualifierToCustomizerMapEntryItemProvider; } + /** + * This keeps track of the one adapter used for all {@link java.util.Map.Entry} + * instances. + * + * @generated + */ + protected StageQualifierToWorkersMapEntryItemProvider stageQualifierToWorkersMapEntryItemProvider; + + /** + * This creates an adapter for a {@link java.util.Map.Entry}. + * + * @generated + */ + @Override + public Adapter createStageQualifierToWorkersMapEntryAdapter() { + if (stageQualifierToWorkersMapEntryItemProvider == null) { + stageQualifierToWorkersMapEntryItemProvider = new StageQualifierToWorkersMapEntryItemProvider(this); + } + + return stageQualifierToWorkersMapEntryItemProvider; + } + /** * This keeps track of the one adapter used for all * {@link org.enterprisedomain.classmaker.Models} instances. + * + * @generated + */ + protected void addExclusivePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Customizer_exclusive_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Customizer_exclusive_feature", + "_UI_Customizer_type"), + ClassMakerPackage.Literals.CUSTOMIZER__EXCLUSIVE, true, false, false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Stage feature. + * + * @generated + */ + protected void addStagePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Customizer_stage_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Customizer_stage_feature", + "_UI_Customizer_type"), + ClassMakerPackage.Literals.CUSTOMIZER__STAGE, true, false, false, null, null, null)); + } + /** * This returns Customizer.gif. * @@ -120,6 +153,8 @@ public void notifyChanged(Notification notification) { switch (notification.getFeatureID(Customizer.class)) { case ClassMakerPackage.CUSTOMIZER__RANK: + case ClassMakerPackage.CUSTOMIZER__EXCLUSIVE: + case ClassMakerPackage.CUSTOMIZER__STAGE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ItemItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ItemItemProvider.java index 542324ef..56933f6e 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ItemItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ItemItemProvider.java @@ -72,6 +72,7 @@ public List getPropertyDescriptors(Object object) { addParentPropertyDescriptor(object); addLocalePropertyDescriptor(object); addProjectPropertyDescriptor(object); + addResourcePropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -164,6 +165,20 @@ protected void addProjectPropertyDescriptor(Object object) { ClassMakerPackage.Literals.ITEM__PROJECT, true, false, true, null, null, null)); } + /** + * This adds a property descriptor for the Resource feature. + * + * @generated + */ + protected void addResourcePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Item_resource_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Item_resource_feature", "_UI_Item_type"), + ClassMakerPackage.Literals.ITEM__RESOURCE, false, false, false, null, null, null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ModelsItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ModelsItemProvider.java index d58eafbf..ee10388b 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ModelsItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ModelsItemProvider.java @@ -69,57 +69,57 @@ public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addGeneratedPropertyDescriptor(object); - addGeneratedEditPropertyDescriptor(object); - addGeneratedEditorPropertyDescriptor(object); + addGeneratedEPackagePropertyDescriptor(object); + addGeneratedEditPluginPropertyDescriptor(object); + addGeneratedEditorPluginPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Generated feature. * * @generated */ - protected void addGeneratedPropertyDescriptor(Object object) { + protected void addGeneratedEPackagePropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Models_generated_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Models_generated_feature", + getResourceLocator(), getString("_UI_Models_generatedEPackage_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Models_generatedEPackage_feature", "_UI_Models_type"), - ClassMakerPackage.Literals.MODELS__GENERATED, true, false, true, null, null, null)); + ClassMakerPackage.Literals.MODELS__GENERATED_EPACKAGE, true, false, true, null, null, null)); } /** - * This adds a property descriptor for the Generated Edit feature. * * @generated */ - protected void addGeneratedEditPropertyDescriptor(Object object) { + protected void addGeneratedEditPluginPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Models_generatedEdit_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Models_generatedEdit_feature", + getResourceLocator(), getString("_UI_Models_generatedEditPlugin_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Models_generatedEditPlugin_feature", "_UI_Models_type"), - ClassMakerPackage.Literals.MODELS__GENERATED_EDIT, true, false, true, + ClassMakerPackage.Literals.MODELS__GENERATED_EDIT_PLUGIN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Generated Editor feature. * * @generated */ - protected void addGeneratedEditorPropertyDescriptor(Object object) { + protected void addGeneratedEditorPluginPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Models_generatedEditor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Models_generatedEditor_feature", + getResourceLocator(), getString("_UI_Models_generatedEditorPlugin_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Models_generatedEditorPlugin_feature", "_UI_Models_type"), - ClassMakerPackage.Literals.MODELS__GENERATED_EDITOR, true, false, true, + ClassMakerPackage.Literals.MODELS__GENERATED_EDITOR_PLUGIN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } @@ -136,7 +136,7 @@ protected void addGeneratedEditorPropertyDescriptor(Object object) { public Collection getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); - childrenFeatures.add(ClassMakerPackage.Literals.MODELS__DYNAMIC); + childrenFeatures.add(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE); } return childrenFeatures; } @@ -173,7 +173,7 @@ public Object getImage(Object object) { */ @Override public String getText(Object object) { - EMFPlugin labelValue = ((Models) object).getGeneratedEdit(); + EMFPlugin labelValue = ((Models) object).getGeneratedEditPlugin(); String label = labelValue == null ? null : labelValue.toString(); return label == null || label.length() == 0 ? getString("_UI_Models_type") : getString("_UI_Models_type") + " " + label; @@ -191,7 +191,11 @@ public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Models.class)) { - case ClassMakerPackage.MODELS__DYNAMIC: + case ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN: + case ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -209,107 +213,110 @@ public void notifyChanged(Notification notification) { protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createProject())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createContribution())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createRevision())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createState())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createStrategy())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createWorkspace())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.create(ClassMakerPackage.Literals.LONG_TO_STATE_MAP_ENTRY))); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.create(ClassMakerPackage.Literals.VERSION_TO_REVISION_MAP_ENTRY))); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createCustomizer())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createStageQualifier())); - newChildDescriptors - .add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, ClassMakerFactory.eINSTANCE + newChildDescriptors.add( + createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE .create(ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY))); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, + ClassMakerFactory.eINSTANCE.create(ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY))); + + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createModels())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createSCMRegistry())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createResourceChangeListener())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createResourceAdapter())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createClassMakerService())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createBlueprint())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createCompletionNotificationAdapter())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, ClassMakerFactory.eINSTANCE.createSelectRevealHandler())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEAttribute())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEAnnotation())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEClass())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEDataType())); - newChildDescriptors.add( - createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, EcoreFactory.eINSTANCE.createEEnum())); + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, + EcoreFactory.eINSTANCE.createEEnum())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEEnumLiteral())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEFactory())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEObject())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEOperation())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEPackage())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEParameter())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEReference())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.create(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY))); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createEGenericType())); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC, + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.MODELS__DYNAMIC_EPACKAGE, EcoreFactory.eINSTANCE.createETypeParameter())); } diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ProjectItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ProjectItemProvider.java index 51e94500..bcb7923e 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ProjectItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/ProjectItemProvider.java @@ -22,8 +22,6 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -74,9 +72,9 @@ public List getPropertyDescriptors(Object object) { addParentPropertyDescriptor(object); addLocalePropertyDescriptor(object); addProjectPropertyDescriptor(object); + addResourcePropertyDescriptor(object); addNamePropertyDescriptor(object); addProjectNamePropertyDescriptor(object); - addChildrenPropertyDescriptor(object); addDirtyPropertyDescriptor(object); addResourcePathPropertyDescriptor(object); addNeedCompletionNotificationPropertyDescriptor(object); @@ -87,6 +85,7 @@ public List getPropertyDescriptors(Object object) { addSelectRevealHandlerPropertyDescriptor(object); addVersionPropertyDescriptor(object); addStatePropertyDescriptor(object); + addClassLoaderPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -179,6 +178,20 @@ protected void addProjectPropertyDescriptor(Object object) { ClassMakerPackage.Literals.ITEM__PROJECT, true, false, true, null, null, null)); } + /** + * This adds a property descriptor for the Resource feature. + * + * @generated + */ + protected void addResourcePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Item_resource_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Item_resource_feature", "_UI_Item_type"), + ClassMakerPackage.Literals.ITEM__RESOURCE, false, false, false, null, null, null)); + } + /** * This adds a property descriptor for the Name feature. * @@ -210,22 +223,6 @@ protected void addProjectNamePropertyDescriptor(Object object) { ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } - /** - * This adds a property descriptor for the Children feature. - * - * @generated - */ - protected void addChildrenPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Project_children_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Project_children_feature", - "_UI_Project_type"), - ClassMakerPackage.Literals.PROJECT__CHILDREN, false, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - /** * This adds a property descriptor for the Dirty feature. @@ -384,6 +381,22 @@ protected void addStatePropertyDescriptor(Object object) { ClassMakerPackage.Literals.PROJECT__STATE, false, false, false, null, null, null)); } + /** + * This adds a property descriptor for the Class Loader feature. + * + * @generated + */ + protected void addClassLoaderPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Project_classLoader_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Project_classLoader_feature", + "_UI_Project_type"), + ClassMakerPackage.Literals.PROJECT__CLASS_LOADER, false, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, @@ -398,8 +411,8 @@ public Collection getChildrenFeatures(Object objec if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(ClassMakerPackage.Literals.ITEM__DOMAIN_MODEL); - childrenFeatures.add(ClassMakerPackage.Literals.PROJECT__CHILDREN); childrenFeatures.add(ClassMakerPackage.Literals.PROJECT__REVISIONS); + childrenFeatures.add(ClassMakerPackage.Literals.PROJECT__STATE); childrenFeatures.add(ClassMakerPackage.Literals.PROJECT__MODEL_RESOURCE_ADAPTER); } return childrenFeatures; @@ -467,10 +480,10 @@ public void notifyChanged(Notification notification) { case ClassMakerPackage.PROJECT__SAVING_RESOURCE: case ClassMakerPackage.PROJECT__PROJECT_VERSION: case ClassMakerPackage.PROJECT__VERSION: + case ClassMakerPackage.PROJECT__CLASS_LOADER: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ClassMakerPackage.PROJECT__DOMAIN_MODEL: - case ClassMakerPackage.PROJECT__CHILDREN: case ClassMakerPackage.PROJECT__REVISIONS: case ClassMakerPackage.PROJECT__MODEL_RESOURCE_ADAPTER: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); @@ -494,12 +507,6 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors .add(createChildParameter(ClassMakerPackage.Literals.ITEM__CUSTOMIZERS, ClassMakerFactory.eINSTANCE .create(ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY))); - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.PROJECT__CHILDREN, - EcoreFactory.eINSTANCE.createFromString(EcorePackage.Literals.EJAVA_OBJECT, null))); // TODO: ensure - // this is a - // valid literal - // value - newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.PROJECT__REVISIONS, ClassMakerFactory.eINSTANCE.create(ClassMakerPackage.Literals.VERSION_TO_REVISION_MAP_ENTRY))); } diff --git a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EOperationInvocationItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StageQualifierToWorkersMapEntryItemProvider.java similarity index 55% rename from bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EOperationInvocationItemProvider.java rename to bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StageQualifierToWorkersMapEntryItemProvider.java index c2fe49db..a3b0efec 100644 --- a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EOperationInvocationItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StageQualifierToWorkersMapEntryItemProvider.java @@ -1,9 +1,23 @@ /** + * Copyright 2023 Kyrill Zotkin + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -package org.enterprisedomain.ecp.provider; +package org.enterprisedomain.classmaker.provider; import java.util.Collection; import java.util.List; +import java.util.Map; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; @@ -16,29 +30,26 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import org.enterprisedomain.ecp.ECPFactory; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; +import org.enterprisedomain.classmaker.ClassMakerPackage; /** - * This is the item provider adapter for a - * {@link org.enterprisedomain.ecp.EOperationInvocation} object. + * This is the item provider adapter for a {@link java.util.Map.Entry} object. + * * * @generated */ -public class EOperationInvocationItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, - IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class StageQualifierToWorkersMapEntryItemProvider extends ItemProviderAdapter + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * * @generated */ - public EOperationInvocationItemProvider(AdapterFactory adapterFactory) { + public StageQualifierToWorkersMapEntryItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -53,41 +64,25 @@ public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addEOperationPropertyDescriptor(object); - addResultPropertyDescriptor(object); + addKeyPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the EOperation feature. - * - * @generated - */ - protected void addEOperationPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_EOperationInvocation_eOperation_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_EOperationInvocation_eOperation_feature", - "_UI_EOperationInvocation_type"), - ECPPackage.Literals.EOPERATION_INVOCATION__EOPERATION, true, false, true, null, null, null)); - } - - /** - * This adds a property descriptor for the Result feature. + * This adds a property descriptor for the Key feature. + * * * @generated */ - protected void addResultPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_EOperationInvocation_result_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_EOperationInvocation_result_feature", - "_UI_EOperationInvocation_type"), - ECPPackage.Literals.EOPERATION_INVOCATION__RESULT, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + protected void addKeyPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_StageQualifierToWorkersMapEntry_key_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_StageQualifierToWorkersMapEntry_key_feature", + "_UI_StageQualifierToWorkersMapEntry_type"), + ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY, true, false, true, null, null, + null)); } /** @@ -103,7 +98,7 @@ protected void addResultPropertyDescriptor(Object object) { public Collection getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); - childrenFeatures.add(ECPPackage.Literals.EOPERATION_INVOCATION__ARGUMENTS); + childrenFeatures.add(ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE); } return childrenFeatures; } @@ -123,14 +118,14 @@ protected EStructuralFeature getChildFeature(Object object, Object child) { } /** - * This returns EOperationInvocation.gif. + * This returns StageQualifierToWorkersMapEntry.gif. + * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/EOperationInvocation")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/StageQualifierToWorkersMapEntry")); } /** @@ -141,10 +136,8 @@ public Object getImage(Object object) { */ @Override public String getText(Object object) { - Object labelValue = ((EOperationInvocation) object).getResult(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? getString("_UI_EOperationInvocation_type") - : getString("_UI_EOperationInvocation_type") + " " + label; + Map.Entry stageQualifierToWorkersMapEntry = (Map.Entry) object; + return "" + stageQualifierToWorkersMapEntry.getKey() + " -> " + stageQualifierToWorkersMapEntry.getValue(); } /** @@ -158,11 +151,8 @@ public String getText(Object object) { public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(EOperationInvocation.class)) { - case ECPPackage.EOPERATION_INVOCATION__RESULT: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: + switch (notification.getFeatureID(Map.Entry.class)) { + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -179,9 +169,6 @@ public void notifyChanged(Notification notification) { @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add(createChildParameter(ECPPackage.Literals.EOPERATION_INVOCATION__ARGUMENTS, - ECPFactory.eINSTANCE.create(ECPPackage.Literals.EPARAMETER_TO_OBJECT_MAP_ENTRY))); } /** @@ -192,7 +179,7 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors */ @Override public ResourceLocator getResourceLocator() { - return ECPEditPlugin.INSTANCE; + return ClassMakerEditPlugin.INSTANCE; } } diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StateItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StateItemProvider.java index 623e2a90..d5eb123c 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StateItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StateItemProvider.java @@ -68,14 +68,14 @@ public List getPropertyDescriptors(Object object) { addEditDeployableUnitNamePropertyDescriptor(object); addEditorDeployableUnitNamePropertyDescriptor(object); addJobFamilyPropertyDescriptor(object); - addResourcePropertyDescriptor(object); - addCommitIdsPropertyDescriptor(object); addCommitIdPropertyDescriptor(object); + addNonExclusiveStateCustomizersPropertyDescriptor(object); addProjectNamePropertyDescriptor(object); addMakingPropertyDescriptor(object); addEditPropertyDescriptor(object); addEditorPropertyDescriptor(object); addStrategyPropertyDescriptor(object); + addBasePackagePropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -239,48 +239,34 @@ protected void addJobFamilyPropertyDescriptor(Object object) { } /** - * This adds a property descriptor for the Resource feature. - * - * @generated - */ - protected void addResourcePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_State_resource_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_State_resource_feature", "_UI_State_type"), - ClassMakerPackage.Literals.STATE__RESOURCE, true, false, true, null, null, null)); - } - - /** - * This adds a property descriptor for the Commit Ids feature. * * @generated */ - protected void addCommitIdsPropertyDescriptor(Object object) { + protected void addCommitIdPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_State_commitIds_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_State_commitIds_feature", - "_UI_State_type"), - ClassMakerPackage.Literals.STATE__COMMIT_IDS, true, false, false, + getResourceLocator(), getString("_UI_State_commitId_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_commitId_feature", "_UI_State_type"), + ClassMakerPackage.Literals.STATE__COMMIT_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Commit Id feature. + * This adds a property descriptor for the Non Exclusive State Customizers + * feature. * * @generated */ - protected void addCommitIdPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_State_commitId_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_State_commitId_feature", "_UI_State_type"), - ClassMakerPackage.Literals.STATE__COMMIT_ID, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + protected void addNonExclusiveStateCustomizersPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_State_nonExclusiveStateCustomizers_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_nonExclusiveStateCustomizers_feature", + "_UI_State_type"), + ClassMakerPackage.Literals.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS, true, false, true, null, null, + null)); } /** @@ -358,6 +344,22 @@ protected void addStrategyPropertyDescriptor(Object object) { ClassMakerPackage.Literals.STATE__STRATEGY, true, false, true, null, null, null)); } + /** + * This adds a property descriptor for the Base Package feature. + * + * @generated + */ + protected void addBasePackagePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_State_basePackage_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_State_basePackage_feature", + "_UI_State_type"), + ClassMakerPackage.Literals.STATE__BASE_PACKAGE, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, @@ -433,12 +435,12 @@ public void notifyChanged(Notification notification) { case ClassMakerPackage.STATE__EDIT_DEPLOYABLE_UNIT_NAME: case ClassMakerPackage.STATE__EDITOR_DEPLOYABLE_UNIT_NAME: case ClassMakerPackage.STATE__JOB_FAMILY: - case ClassMakerPackage.STATE__COMMIT_IDS: case ClassMakerPackage.STATE__COMMIT_ID: case ClassMakerPackage.STATE__PROJECT_NAME: case ClassMakerPackage.STATE__MAKING: case ClassMakerPackage.STATE__EDIT: case ClassMakerPackage.STATE__EDITOR: + case ClassMakerPackage.STATE__BASE_PACKAGE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StrategyItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StrategyItemProvider.java index c1c32176..c7a2254f 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StrategyItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/StrategyItemProvider.java @@ -21,6 +21,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -29,7 +30,10 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.enterprisedomain.classmaker.ClassMakerFactory; import org.enterprisedomain.classmaker.ClassMakerPackage; +import org.enterprisedomain.classmaker.Strategy; /** * This is the item provider adapter for a @@ -61,88 +65,56 @@ public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addGeneratorsPropertyDescriptor(object); - addExportersPropertyDescriptor(object); - addInstallersPropertyDescriptor(object); - addLoadersPropertyDescriptor(object); addStatePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Generators feature. + * This adds a property descriptor for the State feature. * * @generated */ - protected void addGeneratorsPropertyDescriptor(Object object) { + protected void addStatePropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Strategy_generators_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Strategy_generators_feature", + getResourceLocator(), getString("_UI_Strategy_state_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Strategy_state_feature", "_UI_Strategy_type"), - ClassMakerPackage.Literals.STRATEGY__GENERATORS, true, false, true, null, null, null)); + ClassMakerPackage.Literals.STRATEGY__STATE, true, false, true, null, null, null)); } /** - * This adds a property descriptor for the Exporters feature. + * This specifies how to implement {@link #getChildren} and is used to deduce an + * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * * * @generated */ - protected void addExportersPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Strategy_exporters_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Strategy_exporters_feature", - "_UI_Strategy_type"), - ClassMakerPackage.Literals.STRATEGY__EXPORTERS, true, false, true, null, null, null)); + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ClassMakerPackage.Literals.STRATEGY__WORKERS); + } + return childrenFeatures; } /** - * This adds a property descriptor for the Installers feature. + * * * @generated */ - protected void addInstallersPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Strategy_installers_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Strategy_installers_feature", - "_UI_Strategy_type"), - ClassMakerPackage.Literals.STRATEGY__INSTALLERS, true, false, true, null, null, null)); - } - - /** - * This adds a property descriptor for the Loaders feature. - * - * @generated - */ - protected void addLoadersPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Strategy_loaders_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Strategy_loaders_feature", - "_UI_Strategy_type"), - ClassMakerPackage.Literals.STRATEGY__LOADERS, true, false, true, null, null, null)); - } + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to + // use for + // adding (see {@link AddCommand}) it as a child. - /** - * This adds a property descriptor for the State feature. - * - * @generated - */ - protected void addStatePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_Strategy_state_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Strategy_state_feature", - "_UI_Strategy_type"), - ClassMakerPackage.Literals.STRATEGY__STATE, true, false, true, null, null, null)); + return super.getChildFeature(object, child); } /** @@ -176,6 +148,12 @@ public String getText(Object object) { @Override public void notifyChanged(Notification notification) { updateChildren(notification); + + switch (notification.getFeatureID(Strategy.class)) { + case ClassMakerPackage.STRATEGY__WORKERS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } super.notifyChanged(notification); } @@ -189,6 +167,9 @@ public void notifyChanged(Notification notification) { @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(ClassMakerPackage.Literals.STRATEGY__WORKERS, + ClassMakerFactory.eINSTANCE.create(ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY))); } /** diff --git a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/WorkspaceItemProvider.java b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/WorkspaceItemProvider.java index 7c7f03d1..9d5e82a8 100644 --- a/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/WorkspaceItemProvider.java +++ b/bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/WorkspaceItemProvider.java @@ -68,7 +68,9 @@ public List getPropertyDescriptors(Object object) { super.getPropertyDescriptors(object); addResourceSetPropertyDescriptor(object); + addNonExclusiveCustomizersPropertyDescriptor(object); addSCMRegistryPropertyDescriptor(object); + addExcludedEPackagesPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -89,6 +91,22 @@ protected void addResourceSetPropertyDescriptor(Object object) { ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } + /** + * This adds a property descriptor for the Non Exclusive Customizers feature. + * + * + * @generated + */ + protected void addNonExclusiveCustomizersPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Workspace_nonExclusiveCustomizers_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Workspace_nonExclusiveCustomizers_feature", + "_UI_Workspace_type"), + ClassMakerPackage.Literals.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS, true, false, true, null, null, + null)); + } + /** * This adds a property descriptor for the SCM Registry feature. @@ -104,6 +122,21 @@ protected void addSCMRegistryPropertyDescriptor(Object object) { ClassMakerPackage.Literals.WORKSPACE__SCM_REGISTRY, false, false, false, null, null, null)); } + /** + * This adds a property descriptor for the Excluded EPackages feature. + * + * @generated + */ + protected void addExcludedEPackagesPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_Workspace_excludedEPackages_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Workspace_excludedEPackages_feature", + "_UI_Workspace_type"), + ClassMakerPackage.Literals.WORKSPACE__EXCLUDED_EPACKAGES, true, false, true, null, null, null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, diff --git a/bundles/org.enterprisedomain.classmaker.images.ui/src/org/enterprisedomain/classmaker/images/ui/ImageViewer.java b/bundles/org.enterprisedomain.classmaker.images.ui/src/org/enterprisedomain/classmaker/images/ui/ImageViewer.java new file mode 100644 index 00000000..f38fd492 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.images.ui/src/org/enterprisedomain/classmaker/images/ui/ImageViewer.java @@ -0,0 +1,456 @@ +package org.enterprisedomain.classmaker.images.ui; + +import java.awt.geom.AffineTransform; +import java.awt.geom.Point2D; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.List; + +import org.eclipse.core.filesystem.EFS; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseMoveListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.ImageData; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.ScrollBar; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IURIEditorInput; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.EditorPart; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; +import org.enterprisedomain.classmaker.imagesUI.Measurement; + +public class ImageViewer extends EditorPart { + + public static final String ID = "org.enterprisedomain.classmaker.images.ui.imageViewer"; + + private Canvas canvas; + private Image sourceImage; + private Image screenImage; + private AffineTransform transform; + private ImageData data; + private List measurementPoints; + private List measurements; + private EObject targetObject; + private Point lastPoint; + private double rate = 1.0; + private KeyListener keyListener = new KeyListener() { + + @Override + public void keyReleased(KeyEvent e) { + } + + @Override + public void keyPressed(KeyEvent e) { + if (e.character == '+') + zoom(1.1); + if (e.character == '-') + zoom(0.9); +// if (e.character == 27) { +// canvas.getHorizontalBar().setSelection(canvas.getHorizontalBar().getSelection() - 10); +// scrollHorizontally(canvas.getHorizontalBar()); +// } +// if (e.character == 26) { +// canvas.getHorizontalBar().setSelection(canvas.getHorizontalBar().getSelection() + 10); +// scrollHorizontally(canvas.getHorizontalBar()); +// } +// if (e.character == 24) { +// canvas.getVerticalBar().setSelection(canvas.getVerticalBar().getSelection() - 10); +// scrollVertically(canvas.getVerticalBar()); +// } +// if (e.character == 25) { +// canvas.getVerticalBar().setSelection(canvas.getVerticalBar().getSelection() + 10); +// scrollVertically(canvas.getVerticalBar()); +// } + } + }; + + private double srcY; + + private double srcX; + + private double destWidth; + + private double destHeight; + + @Override + public void createPartControl(Composite parent) { + canvas = new Canvas(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.NO_BACKGROUND); + canvas.addControlListener(new ControlAdapter() { + public void controlResized(ControlEvent event) { + syncScrollBars(); + } + }); + canvas.addPaintListener(e -> paint(e.gc)); + canvas.addKeyListener(keyListener); + initScrollBars(); + sourceImage = new Image(parent.getDisplay(), data); + transform = new AffineTransform(); + syncScrollBars(); + } + + private void initScrollBars() { + ScrollBar horizontal = canvas.getHorizontalBar(); + horizontal.setEnabled(false); + horizontal.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + scrollHorizontally((ScrollBar) event.widget); + } + }); + ScrollBar vertical = canvas.getVerticalBar(); + vertical.setEnabled(false); + vertical.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + scrollVertically((ScrollBar) event.widget); + } + }); + } + + public void syncScrollBars() { + if (sourceImage == null) { + canvas.redraw(); + return; + } + + AffineTransform af = transform; + double sx = af.getScaleX(), sy = af.getScaleY(); + double tx = af.getTranslateX(), ty = af.getTranslateY(); + if (tx > 0) + tx = 0; + if (ty > 0) + ty = 0; + + ScrollBar horizontal = canvas.getHorizontalBar(); + horizontal.setIncrement((int) (canvas.getClientArea().width / 100)); + horizontal.setPageIncrement(canvas.getClientArea().width); + Rectangle imageBound = sourceImage.getBounds(); + int cw = canvas.getClientArea().width, ch = canvas.getClientArea().height; + if (imageBound.width * sx > cw) { + horizontal.setMaximum((int) (imageBound.width * sx)); + horizontal.setEnabled(true); + if (((int) -tx) > horizontal.getMaximum() - cw) + tx = -horizontal.getMaximum() + cw; + } else { + horizontal.setEnabled(false); + tx = (cw - imageBound.width * sx) / 2; + } + horizontal.setSelection((int) (-tx)); + horizontal.setThumb((int) (canvas.getClientArea().width)); + + ScrollBar vertical = canvas.getVerticalBar(); + vertical.setIncrement((int) (canvas.getClientArea().height / 100)); + vertical.setPageIncrement((int) (canvas.getClientArea().height)); + if (imageBound.height * sy > ch) { + vertical.setMaximum((int) (imageBound.height * sy)); + vertical.setEnabled(true); + if (((int) -ty) > vertical.getMaximum() - ch) + ty = -vertical.getMaximum() + ch; + } else { + vertical.setEnabled(false); + ty = (ch - imageBound.height * sy) / 2; + } + vertical.setSelection((int) (-ty)); + vertical.setThumb((int) (canvas.getClientArea().height)); + + af = AffineTransform.getScaleInstance(sx, sy); + af.preConcatenate(AffineTransform.getTranslateInstance(tx, ty)); + transform = af; + + canvas.redraw(); + } + + private void scrollHorizontally(ScrollBar scrollBar) { + if (sourceImage == null) + return; + + AffineTransform af = transform; + double tx = af.getTranslateX(); + double select = -scrollBar.getSelection(); + af.preConcatenate(AffineTransform.getTranslateInstance(select - tx, 0)); + transform = af; + syncScrollBars(); + } + + private void scrollVertically(ScrollBar scrollBar) { + if (sourceImage == null) + return; + + AffineTransform af = transform; + double ty = af.getTranslateY(); + double select = -scrollBar.getSelection(); + af.preConcatenate(AffineTransform.getTranslateInstance(0, select - ty)); + transform = af; + syncScrollBars(); + } + + public void addMouseListener(MouseListener listener) { + if (canvas != null && !canvas.isDisposed()) + canvas.addMouseListener(listener); + } + + public void removeMouseListener(MouseListener listener) { + if (canvas != null && !canvas.isDisposed()) + canvas.removeMouseListener(listener); + } + + public void addMouseMoveListener(MouseMoveListener listener) { + if (canvas != null && !canvas.isDisposed()) + canvas.addMouseMoveListener(listener); + } + + public void removeMouseMoveListener(MouseMoveListener listener) { + if (canvas != null && !canvas.isDisposed()) + canvas.removeMouseMoveListener(listener); + } + + private void paint(GC gc) { + Rectangle clientRect = canvas.getClientArea(); + if (sourceImage != null) { + Rectangle imageRect = inverseTransformRect(transform, clientRect); + int gap = 2; + imageRect.x -= gap; + imageRect.y -= gap; + imageRect.width += 2 * gap; + imageRect.height += 2 * gap; + + Rectangle imageBound = sourceImage.getBounds(); + imageRect = imageRect.intersection(imageBound); + Rectangle destRect = transformRect(transform, imageRect); + + if (screenImage != null) + screenImage.dispose(); + screenImage = new Image(canvas.getDisplay(), clientRect.width, clientRect.height); + GC newGC = new GC(screenImage); + newGC.setClipping(clientRect); + newGC.drawImage(sourceImage, imageRect.x, imageRect.y, imageRect.width, imageRect.height, destRect.x, + destRect.y, destRect.width, destRect.height); + newGC.dispose(); + + gc.drawImage(screenImage, 0, 0); + + Rectangle pointRect = transformRect(transform, sourceImage.getBounds()); + + if (measurements != null) + for (Measurement m : measurements) { + gc.setForeground(canvas.getDisplay().getSystemColor(SWT.COLOR_BLACK)); + gc.drawLine((int) Math.floor(doubleX((m.getFrom().x) * this.rate, srcX, destRect.width)), + (int) Math.floor(doubleY((m.getFrom().y) * this.rate, destRect.y, destRect.height)), + (int) Math.floor(doubleX((m.getTo().x) * this.rate, srcX, destRect.width)), + (int) Math.floor(doubleY((m.getTo().y) * this.rate, destRect.y, destRect.height))); + } + if (measurementPoints != null) + for (Point m : measurementPoints) { + gc.setBackground(canvas.getDisplay().getSystemColor(SWT.COLOR_GREEN)); + gc.fillOval((int) Math.floor(doubleX((m.x) * this.rate, srcX, destRect.width)) - 8, + (int) Math.floor(doubleY((m.y) * this.rate, destRect.y, destRect.height)) - 8, 16, 16); + } + } else { + gc.setClipping(clientRect); + gc.fillRectangle(clientRect); + initScrollBars(); + } + } + + private double doubleX(double srcX, double destX, double destWidth) { + double center = destX + destWidth / 2; + if (srcX <= center) + return srcX; + else + return doubleX(srcX, center, destWidth * this.rate); + } + + private double doubleY(double srcY, double destY, double destHeight) { + double center = destY + destHeight / 2; + if (srcY <= center) + return srcY; + else + return doubleY(srcY, center, destHeight * this.rate); + } + + public void redraw() { + if (canvas != null && !canvas.isDisposed()) + canvas.redraw(); + } + + public void centerZoom(double dx, double dy, double scale, AffineTransform af) { + af.preConcatenate(AffineTransform.getTranslateInstance(-dx, -dy)); + af.preConcatenate(AffineTransform.getScaleInstance(scale, scale)); + af.preConcatenate(AffineTransform.getTranslateInstance(dx, dy)); + transform = af; + syncScrollBars(); + } + + public void zoom(double rate) { + if (sourceImage == null) + return; + Rectangle rect = canvas.getClientArea(); + int w = rect.width, h = rect.height; + double dx = ((double) w) / 2; + double dy = ((double) h) / 2; + setRate(rate); + centerZoom(dx, dy, rate, transform); + } + + private void setRate(double rate) { + this.rate *= rate; + } + + public static Rectangle transformRect(AffineTransform af, Rectangle src) { + Rectangle dest = new Rectangle(0, 0, 0, 0); + src = absRect(src); + Point p1 = new Point(src.x, src.y); + p1 = transformPoint(af, p1); + dest.x = p1.x; + dest.y = p1.y; + dest.width = (int) (src.width * af.getScaleX()); + dest.height = (int) (src.height * af.getScaleY()); + return dest; + } + + public static Rectangle inverseTransformRect(AffineTransform af, Rectangle src) { + Rectangle dest = new Rectangle(0, 0, 0, 0); + src = absRect(src); + Point p1 = new Point(src.x, src.y); + p1 = inverseTransformPoint(af, p1); + dest.x = p1.x; + dest.y = p1.y; + dest.width = (int) (src.width / af.getScaleX()); + dest.height = (int) (src.height / af.getScaleY()); + return dest; + } + + public static Point transformPoint(AffineTransform af, Point pt) { + Point2D src = new Point2D.Float(pt.x, pt.y); + Point2D dest = af.transform(src, null); + Point point = new Point((int) Math.floor(dest.getX()), (int) Math.floor(dest.getY())); + return point; + } + + public static Point inverseTransformPoint(AffineTransform af, Point pt) { + Point2D src = new Point2D.Float(pt.x, pt.y); + try { + Point2D dest = af.inverseTransform(src, null); + return new Point((int) Math.floor(dest.getX()), (int) Math.floor(dest.getY())); + } catch (Exception e) { + e.printStackTrace(); + return new Point(0, 0); + } + } + + public static Rectangle absRect(Rectangle src) { + Rectangle dest = new Rectangle(0, 0, 0, 0); + if (src.width < 0) { + dest.x = src.x + src.width + 1; + dest.width = -src.width; + } else { + dest.x = src.x; + dest.width = src.width; + } + if (src.height < 0) { + dest.y = src.y + src.height + 1; + dest.height = -src.height; + } else { + dest.y = src.y; + dest.height = src.height; + } + return dest; + } + + @Override + public void setFocus() { + if (canvas != null && !canvas.isDisposed()) + canvas.setFocus(); + } + + public void dispose() { + if (screenImage != null && !screenImage.isDisposed()) + screenImage.dispose(); + if (canvas != null && !canvas.isDisposed()) + canvas.dispose(); + if (sourceImage != null && !sourceImage.isDisposed()) + sourceImage.dispose(); + super.dispose(); + } + + @Override + public void doSave(IProgressMonitor monitor) { + } + + @Override + public void doSaveAs() { + } + + @Override + public void init(IEditorSite site, IEditorInput input) throws PartInitException { + try { + IFileStore file = EFS.getLocalFileSystem().getStore(((IURIEditorInput) input).getURI()); + data = new ImageData(file.openInputStream(EFS.NONE, ClassMakerPlugin.getProgressMonitor())); + } catch (CoreException e) { + throw new PartInitException(e.getStatus()); + } + setInput(input); + setSite(site); + } + + @Override + public boolean isDirty() { + return false; + } + + @Override + public boolean isSaveAsAllowed() { + return false; + } + + public void setMeasurementPoints(List measurementPoints) { + this.measurementPoints = measurementPoints; + } + + public List getMeasurements() { + if (targetObject != null) { + return (EList) targetObject.eGet(targetObject.eClass().getEStructuralFeature("measurements")); + } + return measurements; + } + + public void setMeasurements(List measurements) { + if (targetObject != null) { + EList ms = (EList) targetObject + .eGet(targetObject.eClass().getEStructuralFeature("measurements")); + ms.clear(); + if (measurements != null) + ms.addAll(measurements); + } + this.measurements = measurements; + } + + public Point getLastPoint() { + return lastPoint; + } + + public void setLastPoint(Point lastPoint) { + this.lastPoint = lastPoint; + } + + public void setTargetObject(EObject targetObject) { + this.targetObject = targetObject; + } + +} diff --git a/bundles/org.enterprisedomain.classmaker.libraries/.classpath b/bundles/org.enterprisedomain.classmaker.libraries/.classpath new file mode 100644 index 00000000..34094e47 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/.classpath @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.libraries/.gitignore b/bundles/org.enterprisedomain.classmaker.libraries/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/bundles/org.enterprisedomain.classmaker.libraries/.polyglot.META-INF b/bundles/org.enterprisedomain.classmaker.libraries/.polyglot.META-INF new file mode 100644 index 00000000..e69de29b diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/.project b/bundles/org.enterprisedomain.classmaker.libraries/.project similarity index 61% rename from features/org.enterprisedomain.classmaker.ecp.feature/.project rename to bundles/org.enterprisedomain.classmaker.libraries/.project index 94383faf..313a14dd 100644 --- a/features/org.enterprisedomain.classmaker.ecp.feature/.project +++ b/bundles/org.enterprisedomain.classmaker.libraries/.project @@ -1,34 +1,28 @@ - org.enterprisedomain.classmaker.ecp.feature + org.enterprisedomain.classmaker.libraries - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder + org.eclipse.jdt.core.javabuilder - org.eclipse.pde.FeatureBuilder + org.eclipse.pde.ManifestBuilder - org.eclipse.m2e.core.maven2Builder + org.eclipse.pde.SchemaBuilder - org.eclipse.m2e.core.maven2Nature org.eclipse.pde.PluginNature - org.eclipse.pde.FeatureNature + org.eclipse.jdt.core.javanature diff --git a/bundles/org.enterprisedomain.classmaker.libraries/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.libraries/META-INF/MANIFEST.MF new file mode 100644 index 00000000..9007d087 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ClassMaker Libraries +Bundle-SymbolicName: org.enterprisedomain.classmaker.libraries;singleton:=true +Bundle-Version: 0.8.55 +Require-Bundle: org.eclipse.osgi;bundle-version="[3.24.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="3.33.100", + org.enterprisedomain.classmaker;bundle-version="0.8.55", + org.eclipse.jface +Bundle-Vendor: Kyrill Zotkin +Automatic-Module-Name: org.enterprisedomain.classmaker.libraries +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.enterprisedomain.classmaker.libraries.LibrariesPlugin +Bundle-RequiredExecutionEnvironment: JavaSE-21 diff --git a/bundles/org.enterprisedomain.classmaker.libraries/build.properties b/bundles/org.enterprisedomain.classmaker.libraries/build.properties new file mode 100644 index 00000000..ded7b23f --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/build.properties @@ -0,0 +1,7 @@ +bin.includes = plugin.xml,\ + .,\ + META-INF/,\ + schema/ +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/bundles/org.enterprisedomain.classmaker.libraries/plugin.xml b/bundles/org.enterprisedomain.classmaker.libraries/plugin.xml new file mode 100644 index 00000000..770722e4 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/plugin.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.libraries/schema/libraries.exsd b/bundles/org.enterprisedomain.classmaker.libraries/schema/libraries.exsd new file mode 100644 index 00000000..97148a87 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/schema/libraries.exsd @@ -0,0 +1,102 @@ + + + + + + + + + Pre-defines ClassMaker Contributions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension + point.] + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LibrariesPlugin.java b/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LibrariesPlugin.java new file mode 100644 index 00000000..2a284c1a --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LibrariesPlugin.java @@ -0,0 +1,80 @@ +package org.enterprisedomain.classmaker.libraries; + +import java.io.IOException; +import java.net.URL; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class LibrariesPlugin extends Plugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.enterprisedomain.classmaker.libraries"; //$NON-NLS-1$ + + // The shared instance + private static LibrariesPlugin plugin; + + /** + * The constructor + */ + public LibrariesPlugin() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static LibrariesPlugin getDefault() { + return plugin; + } + + public static String getPluginDir(String pluginId) { + /* get bundle with the specified id */ + Bundle bundle = Platform.getBundle(pluginId); + if (bundle == null) + throw new RuntimeException("Could not resolve plugin: " + pluginId + "\r\n" + + "Probably the plugin has not been correctly installed.\r\n" + + "Running eclipse from shell with -clean option may rectify installation."); + + /* resolve Bundle::getEntry to local URL */ + URL pluginURL = null; + try { + pluginURL = FileLocator.resolve(bundle.getEntry("/")); + } catch (IOException e) { + throw new RuntimeException("Could not get installation directory of the plugin: " + pluginId); + } + String pluginInstallDir = pluginURL.getPath().trim(); + if (pluginInstallDir.length() == 0) + throw new RuntimeException("Could not get installation directory of the plugin: " + pluginId); + + /* + * since path returned by URL::getPath starts with a forward slash, that is not + * suitable to run commandlines on Windows-OS, but for Unix-based OSes it is + * needed. So strip one character for windows. There seems to be no other clean + * way of doing this. + */ + if (Platform.getOS().compareTo(Platform.OS_WIN32) == 0) + pluginInstallDir = pluginInstallDir.substring(1); + + return pluginInstallDir; + } +} diff --git a/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LoadLibrariesCustomizer.java b/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LoadLibrariesCustomizer.java new file mode 100644 index 00000000..936fd96e --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.libraries/src/org/enterprisedomain/classmaker/libraries/LoadLibrariesCustomizer.java @@ -0,0 +1,94 @@ +package org.enterprisedomain.classmaker.libraries; + +import java.io.File; +import java.io.IOException; +import java.nio.file.DirectoryNotEmptyException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.codegen.util.CodeGenUtil; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.Workspace; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; +import org.enterprisedomain.classmaker.impl.CustomizerImpl; + +public class LoadLibrariesCustomizer extends CustomizerImpl implements Customizer { + + private String contributionName; + + public LoadLibrariesCustomizer() { + } + + @Override + public Object customize(EList args) { + Workspace workspace = (Workspace) args.get(0); + IConfigurationElement[] ces = Platform.getExtensionRegistry() + .getConfigurationElementsFor("org.enterprisedomain.classmaker.libraries.libraries"); + for (IConfigurationElement ce : ces) { + String p = LibrariesPlugin.getPluginDir(ce.getContributor().getName()); + contributionName = ce.getAttribute("contributionName"); + p = p + "contribs/" + contributionName; + File f = new File(p); + if (f.exists()) { + try { + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(contributionName); + if (!project.exists()) { + EObject ePackage = workspace.getResourceSet() + .getResource(URI.createFileURI( + p + "/model/" + CodeGenUtil.capName(contributionName) + ".ecore"), true) + .getContents().get(0); + workspace.createContribution(EcoreUtil.copy(ePackage), ClassMakerPlugin.getProgressMonitor()); + copyFiles(f, null); + } + project.refreshLocal(IResource.DEPTH_INFINITE, ClassMakerPlugin.getProgressMonitor()); + project.open(ClassMakerPlugin.getProgressMonitor()); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } + } + return super.customize(args); + } + + private void copyFiles(File source, String target) { + if (target == null) + target = ResourcesPlugin.getWorkspace().getRoot().getRawLocation().toString() + File.separator + + contributionName; + if (source.isDirectory()) + for (String f : source.list()) { + File file = new File(source.getPath() + File.separator + f); + if (file.isDirectory()) { + copyFile(file, target, f); + copyFiles(file, target + File.separator + f); + } else { + copyFile(file, target, f); + } + } + } + + private void copyFile(File source, String target, String fileName) { + try { + Path t = Paths.get(target + File.separator + fileName); + File c = t.toFile(); + if (source.isDirectory()) + c.mkdirs(); + Files.copy(Path.of(source.getPath()), t, StandardCopyOption.REPLACE_EXISTING); + } catch (DirectoryNotEmptyException e) { + } catch (IOException e) { + ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); + } + } + +} diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.classpath b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.classpath index bc57d238..75a097ba 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.classpath +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.classpath @@ -1,7 +1,21 @@ - - - - + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.settings/org.eclipse.jdt.core.prefs index a58ebdca..1e0cb16b 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -12,4 +12,4 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/META-INF/MANIFEST.MF index 0563d83c..3b64e0cb 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ClassMaker OSGi System Extension Bundle-SymbolicName: org.enterprisedomain.classmaker.osgi.systemextension -Bundle-Version: 0.8.55.qualifier +Bundle-Version: 0.8.55 Bundle-Vendor: Kyrill Zotkin -Fragment-Host: org.eclipse.osgi;bundle-version="[3.16.200.v20210226-1447,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Fragment-Host: org.eclipse.osgi;bundle-version="[3.24.0.v20251126-0427,4.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: org.enterprisedomain.classmaker.osgi.systemextension ExtensionBundle-Activator: org.enterprisedomain.classmaker.osgi.systemextension.Activator Automatic-Module-Name: org.enterprisedomain.classmaker.osgi.systemextension diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/pom.xml b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/pom.xml index dd29a6a8..5886e012 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/pom.xml +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/pom.xml @@ -1,13 +1,16 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ org.enterprisedomain.classmaker.osgi.systemextension + 0.8.55 eclipse-plugin \ No newline at end of file diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/Activator.java b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/Activator.java index 0d288f2d..af1395c0 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/Activator.java +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/Activator.java @@ -7,6 +7,8 @@ public class Activator implements BundleActivator { + private static BundleContext bundleContext; + private ServiceRegistration reg; public Activator() { @@ -14,6 +16,7 @@ public Activator() { @Override public void start(BundleContext context) throws Exception { + bundleContext = context; reg = context.registerService(ResolverHookFactory.class, new ResolverHook(), null); } @@ -23,6 +26,11 @@ public void stop(BundleContext context) throws Exception { reg.unregister(); reg = null; } + bundleContext = null; + } + + public static BundleContext getContext() { + return bundleContext; } } diff --git a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/ResolverHook.java b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/ResolverHook.java index a6410d79..e47cff6f 100644 --- a/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/ResolverHook.java +++ b/bundles/org.enterprisedomain.classmaker.osgi.systemextension/src/org/enterprisedomain/classmaker/osgi/systemextension/ResolverHook.java @@ -1,9 +1,8 @@ package org.enterprisedomain.classmaker.osgi.systemextension; -import java.util.ArrayList; import java.util.Collection; -import java.util.List; +import org.osgi.framework.Version; import org.osgi.framework.hooks.resolver.ResolverHookFactory; import org.osgi.framework.wiring.BundleCapability; import org.osgi.framework.wiring.BundleRequirement; @@ -18,26 +17,24 @@ public org.osgi.framework.hooks.resolver.ResolverHook begin(Collection collisionCandidates) { - List toRemove = new ArrayList(); - for (BundleCapability candidate : collisionCandidates) - if (!candidate.equals(singleton)) - toRemove.add(candidate); - collisionCandidates.removeAll(toRemove); + String projectName = singleton.getRevision().getSymbolicName(); + Version version = singleton.getRevision().getVersion(); + collisionCandidates.removeIf(candidate -> { + return !(candidate.getRevision().getSymbolicName().equals(projectName) + && candidate.getRevision().getVersion().equals(version)); + }); } @Override public void filterResolvable(Collection candidates) { - } @Override public void filterMatches(BundleRequirement requirement, Collection candidates) { - } @Override public void end() { - } }; } diff --git a/bundles/org.enterprisedomain.classmaker.parsley/src/org/enterprisedomain/parsley/classmaker/ClassMakerSaveableTreeFormView.java b/bundles/org.enterprisedomain.classmaker.parsley/src/org/enterprisedomain/parsley/classmaker/ClassMakerSaveableTreeFormView.java new file mode 100644 index 00000000..c3fb3b51 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.parsley/src/org/enterprisedomain/parsley/classmaker/ClassMakerSaveableTreeFormView.java @@ -0,0 +1,5 @@ +package org.enterprisedomain.parsley.classmaker; + +public class ClassMakerSaveableTreeFormView extends org.eclipse.emf.parsley.views.SaveableTreeFormView { + +} diff --git a/bundles/org.enterprisedomain.editor/.classpath b/bundles/org.enterprisedomain.classmaker.ui/.classpath similarity index 72% rename from bundles/org.enterprisedomain.editor/.classpath rename to bundles/org.enterprisedomain.classmaker.ui/.classpath index b687bf55..dc32e1f3 100644 --- a/bundles/org.enterprisedomain.editor/.classpath +++ b/bundles/org.enterprisedomain.classmaker.ui/.classpath @@ -1,13 +1,12 @@ - + path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"> - + + diff --git a/bundles/org.enterprisedomain.classmaker.ui/.gitignore b/bundles/org.enterprisedomain.classmaker.ui/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/bundles/org.enterprisedomain.classmaker.ui/.polyglot.META-INF b/bundles/org.enterprisedomain.classmaker.ui/.polyglot.META-INF new file mode 100644 index 00000000..e69de29b diff --git a/bundles/org.enterprisedomain.ecp.edit/.project b/bundles/org.enterprisedomain.classmaker.ui/.project similarity index 92% rename from bundles/org.enterprisedomain.ecp.edit/.project rename to bundles/org.enterprisedomain.classmaker.ui/.project index b779bbe7..dfcad2a5 100644 --- a/bundles/org.enterprisedomain.ecp.edit/.project +++ b/bundles/org.enterprisedomain.classmaker.ui/.project @@ -1,6 +1,6 @@ - org.enterprisedomain.ecp.edit + org.enterprisedomain.classmaker.ui @@ -22,7 +22,7 @@ - org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature diff --git a/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.core.resources.prefs b/bundles/org.enterprisedomain.classmaker.ui/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.core.resources.prefs rename to bundles/org.enterprisedomain.classmaker.ui/.settings/org.eclipse.core.resources.prefs diff --git a/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.classmaker.ui/.settings/org.eclipse.jdt.core.prefs similarity index 62% rename from bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.jdt.core.prefs rename to bundles/org.enterprisedomain.classmaker.ui/.settings/org.eclipse.jdt.core.prefs index 7adc0fb9..23fa13b1 100644 --- a/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.classmaker.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,9 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.classmaker.ui/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..2fad35b7 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: enterpriseDomain ClassMaker UI +Bundle-SymbolicName: org.enterprisedomain.classmaker.ui;singleton:=true +Bundle-Version: 0.8.55 +Require-Bundle: org.eclipse.ui;bundle-version="3.206.100", + org.eclipse.swt;bundle-version="3.131.0", + org.enterprisedomain.classmaker;bundle-version="0.8.55", + org.eclipse.ui.workbench;bundle-version="[3.134.0,4.0.0)" +Bundle-Vendor: Kyrill Zotkin +Automatic-Module-Name: org.enterprisedomain.classmaker.ui +Bundle-RequiredExecutionEnvironment: JavaSE-21 diff --git a/bundles/org.enterprisedomain.ecp.filter/build.properties b/bundles/org.enterprisedomain.classmaker.ui/build.properties old mode 100755 new mode 100644 similarity index 84% rename from bundles/org.enterprisedomain.ecp.filter/build.properties rename to bundles/org.enterprisedomain.classmaker.ui/build.properties index cc91072e..e9863e28 --- a/bundles/org.enterprisedomain.ecp.filter/build.properties +++ b/bundles/org.enterprisedomain.classmaker.ui/build.properties @@ -1,4 +1,5 @@ source.. = src/ +output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml diff --git a/bundles/org.enterprisedomain.classmaker.ui/plugin.xml b/bundles/org.enterprisedomain.classmaker.ui/plugin.xml new file mode 100644 index 00000000..617f4615 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/plugin.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.ecp.edit/pom.xml b/bundles/org.enterprisedomain.classmaker.ui/pom.xml similarity index 82% rename from bundles/org.enterprisedomain.ecp.edit/pom.xml rename to bundles/org.enterprisedomain.classmaker.ui/pom.xml index 66ef3009..ba4653c4 100644 --- a/bundles/org.enterprisedomain.ecp.edit/pom.xml +++ b/bundles/org.enterprisedomain.classmaker.ui/pom.xml @@ -6,11 +6,10 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ - org.enterprisedomain.ecp.edit - + org.enterprisedomain.classmaker.ui eclipse-plugin - \ No newline at end of file + diff --git a/bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/ContributionPropertyPage.java b/bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/ContributionPropertyPage.java new file mode 100644 index 00000000..d432119e --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/ContributionPropertyPage.java @@ -0,0 +1,79 @@ +package org.enterprisedomain.classmaker.ui; + +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.PropertyPage; +import org.enterprisedomain.classmaker.Contribution; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; + +public class ContributionPropertyPage extends PropertyPage { + + /** + * Create the property page. + */ + public ContributionPropertyPage() { + } + + private Contribution selectedContribution; + + /** + * Create contents of the property page. + * + * @param parent + */ + @Override + public Control createContents(Composite parent) { + ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService() + .getSelection(); + if (selection instanceof IStructuredSelection) { + Object selected = ((IStructuredSelection) selection).getFirstElement(); + if (selected instanceof IProject) + selectedContribution = ClassMakerPlugin.getClassMaker().getWorkspace() + .getContribution(((IProject) selected).getName()); + } + Composite container = new Composite(parent, SWT.NULL); + container.setLayout(new GridLayout(1, false)); + + Button btnModel = new Button(container, SWT.CHECK); + btnModel.setSelection(true); + btnModel.setEnabled(false); + btnModel.setText("Model"); + + Button btnEdit = new Button(container, SWT.CHECK); + btnEdit.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + selectedContribution.getState().setEdit(btnEdit.getSelection()); + } + }); + btnEdit.setText("Edit"); + btnEdit.setSelection(selectedContribution.getState().isEdit()); + + Button btnEditor = new Button(container, SWT.CHECK); + btnEditor.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + boolean select = btnEditor.getSelection(); + selectedContribution.getState().setEditor(select); + if (select) { + btnEdit.setSelection(select); + selectedContribution.getState().setEdit(select); + } + } + }); + btnEditor.setText("Editor"); + btnEditor.setSelection(selectedContribution.getState().isEditor()); + + return container; + } + +} diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/handler/MakeHandler.java b/bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/MakeHandler.java similarity index 89% rename from bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/handler/MakeHandler.java rename to bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/MakeHandler.java index d42b6137..31e747e2 100644 --- a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/handler/MakeHandler.java +++ b/bundles/org.enterprisedomain.classmaker.ui/src/org/enterprisedomain/classmaker/ui/MakeHandler.java @@ -1,4 +1,4 @@ -package org.enterprisedomain.workbench.handler; +package org.enterprisedomain.classmaker.ui; import java.lang.reflect.InvocationTargetException; @@ -9,12 +9,10 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.ecp.core.ECPProject; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.handlers.HandlerUtil; -import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.ClassMakerService; import org.enterprisedomain.classmaker.Project; import org.enterprisedomain.classmaker.Revision; @@ -33,9 +31,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException { final Object eProject = ((IStructuredSelection) selection).getFirstElement(); if (eProject instanceof IProject) - doMake((String) ((IProject) eProject).getName()); - else if (eProject instanceof ECPProject) - doMake((String) ((ECPProject) eProject).getName()); + doMake((String) ((IProject) eProject).getName()); } return null; } diff --git a/bundles/org.enterprisedomain.classmaker.ui/target/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker.ui/target/MANIFEST.MF new file mode 100644 index 00000000..76637c7a --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/target/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: enterpriseDomain ClassMaker UI +Bundle-SymbolicName: org.enterprisedomain.classmaker.ui;singleton:=true +Bundle-Version: 0.8.55 +Require-Bundle: org.eclipse.ui;bundle-version="3.206.100",org.eclipse.sw + t,org.enterprisedomain.classmaker;bundle-version="0.8.55" +Bundle-Vendor: Kyrill Zotkin +Automatic-Module-Name: org.enterprisedomain.classmaker.ui +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=21))" + diff --git a/bundles/org.enterprisedomain.classmaker.ui/target/local-artifacts.properties b/bundles/org.enterprisedomain.classmaker.ui/target/local-artifacts.properties new file mode 100644 index 00000000..86fbad23 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker.ui/target/local-artifacts.properties @@ -0,0 +1,4 @@ +#Sun Mar 23 20:03:48 KRAT 2025 +artifact.attached.p2artifacts=/home/kyrill/Documents/devel/git/ClassMaker/bundles/org.enterprisedomain.classmaker.ui/target/p2artifacts.xml +artifact.attached.p2metadata=/home/kyrill/Documents/devel/git/ClassMaker/bundles/org.enterprisedomain.classmaker.ui/target/p2content.xml +artifact.main=/home/kyrill/Documents/devel/git/ClassMaker/bundles/org.enterprisedomain.classmaker.ui/target/org.enterprisedomain.classmaker.ui_0.8.55.jar diff --git a/bundles/org.enterprisedomain.classmaker/.classpath b/bundles/org.enterprisedomain.classmaker/.classpath index 8d861214..d2d56dd7 100644 --- a/bundles/org.enterprisedomain.classmaker/.classpath +++ b/bundles/org.enterprisedomain.classmaker/.classpath @@ -1,7 +1,22 @@ - - - - + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker/.project b/bundles/org.enterprisedomain.classmaker/.project index 2592a8fc..0eea03ba 100644 --- a/bundles/org.enterprisedomain.classmaker/.project +++ b/bundles/org.enterprisedomain.classmaker/.project @@ -5,6 +5,11 @@ + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -35,5 +40,6 @@ org.eclipse.m2e.core.maven2Nature org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature diff --git a/bundles/org.enterprisedomain.classmaker/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.classmaker/.settings/org.eclipse.jdt.core.prefs index d4540a53..3a79233b 100644 --- a/bundles/org.enterprisedomain.classmaker/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.classmaker/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.classmaker/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.classmaker/META-INF/MANIFEST.MF index e30c1d3d..37fc27bc 100644 --- a/bundles/org.enterprisedomain.classmaker/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.classmaker/META-INF/MANIFEST.MF @@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.enterprisedomain.classmaker;singleton:=true Automatic-Module-Name: org.enterprisedomain.classmaker -Bundle-Version: 0.8.55.qualifier +Bundle-Version: 0.8.55 Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: org.enterprisedomain.classmaker, org.enterprisedomain.classmaker.core, org.enterprisedomain.classmaker.impl, @@ -18,18 +18,17 @@ Export-Package: org.enterprisedomain.classmaker, org.enterprisedomain.classmaker.jobs.load, org.enterprisedomain.classmaker.scm, org.enterprisedomain.classmaker.util -Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)";visibility:=reexport, - org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport, +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.33.100";visibility:=reexport, + org.eclipse.emf.ecore;bundle-version="[2.34.0,3.0.0)";visibility:=reexport, org.eclipse.emf.ecore.xmi;bundle-version="[2.12.0,3.0.0)";visibility:=reexport, - org.eclipse.emf.codegen.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport, - org.eclipse.osgi;bundle-version="[3.11.1,4.0.0)";visibility:=reexport, - org.eclipse.osgi.services;bundle-version="[3.5.100,4.0.0)";visibility:=reexport, + org.eclipse.emf.codegen.ecore;bundle-version="2.43.0";visibility:=reexport, + org.eclipse.osgi;bundle-version="[3.24.0,4.0.0)";visibility:=reexport, org.eclipse.e4.core.contexts;bundle-version="[1.5.0,2.0.0)";visibility:=reexport, org.eclipse.e4.core.di;bundle-version="[1.6.1,2.0.0)";visibility:=reexport, org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)";visibility:=reexport, org.eclipse.pde.core;bundle-version="[3.11.0,4.0.0)", org.apache.ant;bundle-version="[1.10.9,2.0.0)", - org.eclipse.jdt.core;bundle-version="[3.12.1,4.0.0)", + org.eclipse.jdt.core;bundle-version="[3.34.0,4.0.0)", org.eclipse.pde.launching;bundle-version="[3.6.400,4.0.0)";visibility:=reexport, org.eclipse.equinox.launcher;bundle-version="[1.3.200,2.0.0)", org.eclipse.pde.api.tools;bundle-version="[1.1.1,2.0.0)", @@ -58,16 +57,22 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)";visibil org.eclipse.swt;bundle-version="[3.110.0,4.0.0)", org.eclipse.jface;bundle-version="[3.13.1,4.0.0)", org.eclipse.core.jobs;bundle-version="[3.9.1,4.0.0)", - javax.annotation;bundle-version="[1.3.5,2.0.0)", org.eclipse.pde.ds.core;bundle-version="1.1.500", org.eclipse.emf.edit;bundle-version="2.16.0", org.eclipse.emf.edit.ui;bundle-version="2.16.0", org.apache.felix.gogo.command;bundle-version="1.1.2", org.apache.felix.gogo.runtime;bundle-version="1.1.4", org.apache.felix.gogo.shell;bundle-version="1.1.4", - org.eclipse.equinox.common, - org.eclipse.emf.query;bundle-version="1.7.0";visibility:=reexport + org.eclipse.equinox.common;bundle-version="[3.17.0,4.0.0)", + org.eclipse.emf.query;bundle-version="1.7.0";visibility:=reexport, + org.eclipse.jdt.annotation;bundle-version="2.2.700", + org.eclipse.jdt.core.manipulation;bundle-version="1.20.0", + jakarta.annotation-api;bundle-version="2.1.1", + com.google.guava, + org.eclipse.core.filesystem;bundle-version="1.11.400", + org.eclipse.text;bundle-version="3.14.500", + org.eclipse.equinox.frameworkadmin;bundle-version="[2.3.0,3.0.0)" Service-Component: OSGI-INF/component.xml +DynamicImport-Package: * Bundle-ActivationPolicy: lazy Bundle-Activator: org.enterprisedomain.classmaker.core.ClassMakerPlugin -Import-Package: org.enterprisedomain.classmaker.jobs.export diff --git a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.aird b/bundles/org.enterprisedomain.classmaker/model/ClassMaker.aird deleted file mode 100644 index d7439626..00000000 --- a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.aird +++ /dev/null @@ -1,2682 +0,0 @@ - - - - ClassMaker.ecore - http://www.eclipse.org/emf/2002/Ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.ecore b/bundles/org.enterprisedomain.classmaker/model/ClassMaker.ecore index cbca1403..1f796efd 100644 --- a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.ecore +++ b/bundles/org.enterprisedomain.classmaker/model/ClassMaker.ecore @@ -1,1229 +1,1617 @@ - - - -
- - - - - - - - - - - - - -
- - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - -
- - - - -
- - - - - -
- - - - - - -
- - - - - - -
- - - - - -
- - - - - - -
- - - - - - -
- - - - - - - -
- - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - -
- - - - -
- - - - - -
- - - - - - - - -
- - - - -
- - - - -
- - - - -
- - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - -
- - - - - -
- - - - - -
- - - - -
- - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - - -
- - - - -
- - - -
- - - - -
- - - - - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - -
- - - - -
- - - - - -
- - - - -
-
- - - - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - - - - - - - - -
- - - -
- - - - - - -
- - - - -
- - - -
- - - - -
- - - - - - -
- - - -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - -
- - - - -
- - - - - - - - -
- - - - -
- - - -
- - - - - - -
- - - - - - - - + + + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + +
+ + + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+
+ + + + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + +
+ + + + + + + + + + + +
+ + + +
+ + + + + + +
+ + + + +
+ + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + + + + +
+ + + + +
+ + + +
+ + + + + + +
+ + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.genmodel b/bundles/org.enterprisedomain.classmaker/model/ClassMaker.genmodel index d88fb067..59d344a1 100644 --- a/bundles/org.enterprisedomain.classmaker/model/ClassMaker.genmodel +++ b/bundles/org.enterprisedomain.classmaker/model/ClassMaker.genmodel @@ -1,596 +1,1013 @@ - - ClassMaker.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + ClassMaker.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker/plugin.xml b/bundles/org.enterprisedomain.classmaker/plugin.xml index 706cdf08..3aacbec2 100644 --- a/bundles/org.enterprisedomain.classmaker/plugin.xml +++ b/bundles/org.enterprisedomain.classmaker/plugin.xml @@ -3,141 +3,157 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.classmaker/pom.xml b/bundles/org.enterprisedomain.classmaker/pom.xml index ed2b578b..02b85b01 100644 --- a/bundles/org.enterprisedomain.classmaker/pom.xml +++ b/bundles/org.enterprisedomain.classmaker/pom.xml @@ -7,7 +7,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ eclipse-plugin diff --git a/bundles/org.enterprisedomain.classmaker/schema/customizers.exsd b/bundles/org.enterprisedomain.classmaker/schema/customizers.exsd index b499e550..8c6f8611 100644 --- a/bundles/org.enterprisedomain.classmaker/schema/customizers.exsd +++ b/bundles/org.enterprisedomain.classmaker/schema/customizers.exsd @@ -1,143 +1,136 @@ - - - - - - - [Enter description of this extension point.] - - + + + + + + + [Enter description of this extension point.] + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - [Enter the first release in which this extension point appears.] - - + + + + + + - - - - - - [Enter extension point usage example here.] - - + + + + + + + + - - - - - - [Enter API information here.] - - + + + + + - - - - - - [Enter information about supplied implementation of this extension point.] - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + whether only one top-rank exclusive customizer will be + executed + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension + point.] + + diff --git a/bundles/org.enterprisedomain.classmaker/schema/stages.exsd b/bundles/org.enterprisedomain.classmaker/schema/stages.exsd index 9621200e..8260a446 100644 --- a/bundles/org.enterprisedomain.classmaker/schema/stages.exsd +++ b/bundles/org.enterprisedomain.classmaker/schema/stages.exsd @@ -1,129 +1,132 @@ - - - - - - - [Enter description of this extension point.] - - + + + + + + + [Enter description of this extension point.] + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - [Enter the first release in which this extension point appears.] - - + + + + + + - - - - - - [Enter extension point usage example here.] - - + + + + + + + + - - - - - - [Enter API information here.] - - + + + + + - - - - - - [Enter information about supplied implementation of this extension point.] - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension + point.] + + diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerPackage.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerPackage.java index c6c2a133..108d3ac5 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerPackage.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerPackage.java @@ -96,7 +96,29 @@ public interface ClassMakerPackage extends EPackage { * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getProject() * @generated */ - int PROJECT = 19; + int PROJECT = 20; + + /** + * The meta object id for the + * '{@link org.enterprisedomain.classmaker.impl.ContributionImpl + * Contribution}' class. + * + * @see org.enterprisedomain.classmaker.impl.ContributionImpl + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getContribution() + * @generated + */ + int CONTRIBUTION = 0; + + /** + * The meta object id for the + * '{@link org.enterprisedomain.classmaker.impl.ItemImpl Item}' class. + * + * + * @see org.enterprisedomain.classmaker.impl.ItemImpl + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getItem() + * @generated + */ + int ITEM = 4; /** * The feature id for the 'Model Name' attribute. + * The feature id for the 'Resource' reference. * * @generated * @ordered */ - int PROJECT__NAME = ISCHEDULING_RULE_FEATURE_COUNT + 8; + int PROJECT__RESOURCE = ISCHEDULING_RULE_FEATURE_COUNT + 8; /** - * The feature id for the 'Project Name' attribute. + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int PROJECT__PROJECT_NAME = ISCHEDULING_RULE_FEATURE_COUNT + 9; + int PROJECT__NAME = ISCHEDULING_RULE_FEATURE_COUNT + 9; /** - * The feature id for the 'Children' reference list. * * @generated * @ordered */ - int PROJECT__CHILDREN = ISCHEDULING_RULE_FEATURE_COUNT + 10; + int PROJECT__PROJECT_NAME = ISCHEDULING_RULE_FEATURE_COUNT + 10; /** * The feature id for the 'Dirty' attribute. * * @generated * @ordered */ - int PROJECT_FEATURE_COUNT = ISCHEDULING_RULE_FEATURE_COUNT + 25; + int PROJECT__CLASS_LOADER = ISCHEDULING_RULE_FEATURE_COUNT + 25; /** - * The meta object id for the - * '{@link org.enterprisedomain.classmaker.impl.ContributionImpl - * Contribution}' class. + * The number of structural features of the 'Project' class. * - * @see org.enterprisedomain.classmaker.impl.ContributionImpl - * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getContribution() * @generated + * @ordered */ - int CONTRIBUTION = 0; + int PROJECT_FEATURE_COUNT = ISCHEDULING_RULE_FEATURE_COUNT + 26; /** * The feature id for the 'Model Name' attribute. + * The feature id for the 'Resource' reference. * * @generated * @ordered */ - int CONTRIBUTION__NAME = PROJECT__NAME; + int CONTRIBUTION__RESOURCE = PROJECT__RESOURCE; /** - * The feature id for the 'Project Name' attribute. + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int CONTRIBUTION__PROJECT_NAME = PROJECT__PROJECT_NAME; + int CONTRIBUTION__NAME = PROJECT__NAME; /** - * The feature id for the 'Children' reference list. * * @generated * @ordered */ - int CONTRIBUTION__CHILDREN = PROJECT__CHILDREN; + int CONTRIBUTION__PROJECT_NAME = PROJECT__PROJECT_NAME; /** * The feature id for the 'Dirty' attribute. + * + * @generated + * @ordered + */ + int CONTRIBUTION__CLASS_LOADER = PROJECT__CLASS_LOADER; + /** * The feature id for the 'Dependencies' attribute list. @@ -595,17 +624,6 @@ public interface ClassMakerPackage extends EPackage { */ int CONTRIBUTION_FEATURE_COUNT = PROJECT_FEATURE_COUNT + 2; - /** - * The meta object id for the - * '{@link org.enterprisedomain.classmaker.impl.ItemImpl Item}' class. - * - * - * @see org.enterprisedomain.classmaker.impl.ItemImpl - * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getItem() - * @generated - */ - int ITEM = 4; - /** * The feature id for the 'Model Name' attribute. @@ -678,6 +696,15 @@ public interface ClassMakerPackage extends EPackage { */ int ITEM__PROJECT = 7; + /** + * The feature id for the 'Resource' reference. + * + * @generated + * @ordered + */ + int ITEM__RESOURCE = 8; + /** * The number of structural features of the 'Item' class. @@ -685,7 +712,7 @@ public interface ClassMakerPackage extends EPackage { * @generated * @ordered */ - int ITEM_FEATURE_COUNT = 8; + int ITEM_FEATURE_COUNT = 9; /** * The meta object id for the @@ -770,6 +797,15 @@ public interface ClassMakerPackage extends EPackage { */ int REVISION__PROJECT = ITEM__PROJECT; + /** + * The feature id for the 'Resource' reference. + * + * @generated + * @ordered + */ + int REVISION__RESOURCE = ITEM__RESOURCE; + /** * The feature id for the 'State' reference. @@ -907,6 +943,15 @@ public interface ClassMakerPackage extends EPackage { */ int STATE__PROJECT = ITEM__PROJECT; + /** + * The feature id for the 'Resource' reference. + * + * @generated + * @ordered + */ + int STATE__RESOURCE = ITEM__RESOURCE; + /** * The feature id for the 'Package Class Name' attribute. @@ -998,40 +1043,31 @@ public interface ClassMakerPackage extends EPackage { int STATE__JOB_FAMILY = ITEM_FEATURE_COUNT + 9; /** - * The feature id for the 'Resource' reference. - * - * @generated - * @ordered - */ - int STATE__RESOURCE = ITEM_FEATURE_COUNT + 10; - - /** - * The feature id for the 'Commit Ids' attribute list. * * @generated * @ordered */ - int STATE__COMMIT_IDS = ITEM_FEATURE_COUNT + 11; + int STATE__COMMIT_ID = ITEM_FEATURE_COUNT + 10; /** - * The feature id for the 'Commit Id' attribute. * * @generated * @ordered */ - int STATE__COMMIT_ID = ITEM_FEATURE_COUNT + 12; + int STATE__STATE_CUSTOMIZERS = ITEM_FEATURE_COUNT + 11; /** - * The feature id for the 'State Customizers' map. + * The feature id for the 'Non Exclusive State Customizers' map. + * * * @generated * @ordered */ - int STATE__STATE_CUSTOMIZERS = ITEM_FEATURE_COUNT + 13; + int STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS = ITEM_FEATURE_COUNT + 12; /** * The feature id for the 'Project Name' attribute. + * + * @generated + * @ordered + */ + int STATE__BASE_PACKAGE = ITEM_FEATURE_COUNT + 18; /** * The number of structural features of the 'State' class. - * - * @generated - * @ordered - */ - int STRATEGY__GENERATORS = 0; - - /** - * The feature id for the 'Exporters' reference list. - * - * @generated - * @ordered - */ - int STRATEGY__EXPORTERS = 1; - - /** - * The feature id for the 'Installers' reference list. - * - * @generated - * @ordered - */ - int STRATEGY__INSTALLERS = 2; - - /** - * The feature id for the 'Loaders' reference list. + * The feature id for the 'State' reference. * * @generated * @ordered */ - int STRATEGY__LOADERS = 3; + int STRATEGY__STATE = 0; /** - * The feature id for the 'State' reference. + * The feature id for the 'Workers' map. + * * * @generated * @ordered */ - int STRATEGY__STATE = 4; + int STRATEGY__WORKERS = 1; /** * The number of structural features of the 'Strategy' class. + * + * @generated + * @ordered + */ + int WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS = ISCHEDULING_RULE_FEATURE_COUNT + 3; + /** * The feature id for the 'Service' container reference. @@ -1216,7 +1243,7 @@ public interface ClassMakerPackage extends EPackage { * @generated * @ordered */ - int WORKSPACE__SERVICE = ISCHEDULING_RULE_FEATURE_COUNT + 3; + int WORKSPACE__SERVICE = ISCHEDULING_RULE_FEATURE_COUNT + 4; /** * The feature id for the 'SCM Registry' reference. + * + * @generated + * @ordered + */ + int WORKSPACE__EXCLUDED_EPACKAGES = ISCHEDULING_RULE_FEATURE_COUNT + 6; /** * The number of structural features of the 'Workspace' class. + * + * @generated + * @ordered + */ + int CUSTOMIZER__EXCLUSIVE = 1; + + /** + * The feature id for the 'Stage' reference. + * + * @generated + * @ordered + */ + int CUSTOMIZER__STAGE = 2; + /** * The number of structural features of the 'Customizer' class. @@ -1399,7 +1453,7 @@ public interface ClassMakerPackage extends EPackage { * @generated * @ordered */ - int CUSTOMIZER_FEATURE_COUNT = 1; + int CUSTOMIZER_FEATURE_COUNT = 3; /** * The meta object id for the @@ -1478,6 +1532,45 @@ public interface ClassMakerPackage extends EPackage { */ int STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY_FEATURE_COUNT = 2; + /** + * The meta object id for the + * '{@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl + * Stage Qualifier To Workers Map Entry}' class. + * + * @see org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getStageQualifierToWorkersMapEntry() + * @generated + */ + int STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY = 16; + + /** + * The feature id for the 'Key' reference. + * + * @generated + * @ordered + */ + int STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY = 0; + + /** + * The feature id for the 'Value' reference list. + * + * @generated + * @ordered + */ + int STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE = 1; + + /** + * The number of structural features of the 'Stage Qualifier To Workers Map + * Entry' class. + * + * @generated + * @ordered + */ + int STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY_FEATURE_COUNT = 2; + /** * The meta object id for the * '{@link org.enterprisedomain.classmaker.impl.ModelsImpl Models}' @@ -1487,43 +1580,43 @@ public interface ClassMakerPackage extends EPackage { * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getModels() * @generated */ - int MODELS = 16; + int MODELS = 17; /** - * The feature id for the 'Dynamic' containment reference. + * The feature id for the 'Dynamic EPackage' containment + * reference. * * @generated * @ordered */ - int MODELS__DYNAMIC = 0; + int MODELS__DYNAMIC_EPACKAGE = 0; /** - * The feature id for the 'Generated' reference. * * @generated * @ordered */ - int MODELS__GENERATED = 1; + int MODELS__GENERATED_EPACKAGE = 1; /** - * The feature id for the 'Generated Edit' reference. + * The feature id for the 'Generated Edit Plugin' attribute. + * * * @generated * @ordered */ - int MODELS__GENERATED_EDIT = 2; + int MODELS__GENERATED_EDIT_PLUGIN = 2; /** - * The feature id for the 'Generated Editor' reference. + * The feature id for the 'Generated Editor Plugin' attribute. + * * * @generated * @ordered */ - int MODELS__GENERATED_EDITOR = 3; + int MODELS__GENERATED_EDITOR_PLUGIN = 3; /** * The feature id for the 'Parent' container reference. + * + * @see java.lang.ClassLoader + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getClassLoader() + * @generated + */ + int CLASS_LOADER = 33; /** * The meta object id for the 'Properties' data type. @@ -2029,7 +2132,7 @@ public interface ClassMakerPackage extends EPackage { * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getURI() * @generated */ - int URI = 39; + int URI = 41; /** * The meta object id for the 'Name' data type. @@ -2039,7 +2142,7 @@ public interface ClassMakerPackage extends EPackage { * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getName_() * @generated */ - int NAME = 41; + int NAME = 43; /** * The meta object id for the 'Exception' data type. - * - * @return the meta object for the reference 'Resource'. - * @see org.enterprisedomain.classmaker.State#getResource() - * @see #getState() - * @generated - */ - EReference getState_Resource(); - - /** - * Returns the meta object for the attribute list - * '{@link org.enterprisedomain.classmaker.State#getCommitIds Commit - * Ids}'. - * - * @return the meta object for the attribute list 'Commit Ids'. - * @see org.enterprisedomain.classmaker.State#getCommitIds() - * @see #getState() - * @generated - */ - EAttribute getState_CommitIds(); - /** * Returns the meta object for the attribute * '{@link org.enterprisedomain.classmaker.State#getCommitId Commit @@ -2343,6 +2422,20 @@ public interface ClassMakerPackage extends EPackage { */ EReference getState_StateCustomizers(); + /** + * Returns the meta object for the map + * '{@link org.enterprisedomain.classmaker.State#getNonExclusiveStateCustomizers + * Non Exclusive State Customizers}'. + * + * @return the meta object for the map 'Non Exclusive State + * Customizers'. + * @see org.enterprisedomain.classmaker.State#getNonExclusiveStateCustomizers() + * @see #getState() + * @generated + */ + EReference getState_NonExclusiveStateCustomizers(); + /** * Returns the meta object for the attribute * '{@link org.enterprisedomain.classmaker.State#getProjectName Project @@ -2403,6 +2496,18 @@ public interface ClassMakerPackage extends EPackage { */ EReference getState_Strategy(); + /** + * Returns the meta object for the attribute + * '{@link org.enterprisedomain.classmaker.State#getBasePackage Base + * Package}'. + * + * @return the meta object for the attribute 'Base Package'. + * @see org.enterprisedomain.classmaker.State#getBasePackage() + * @see #getState() + * @generated + */ + EAttribute getState_BasePackage(); + /** * Returns the meta object for class * '{@link org.enterprisedomain.classmaker.Strategy Strategy}'. - * - * @return the meta object for the reference list 'Generators'. - * @see org.enterprisedomain.classmaker.Strategy#getGenerators() - * @see #getStrategy() - * @generated - */ - EReference getStrategy_Generators(); - - /** - * Returns the meta object for the reference list - * '{@link org.enterprisedomain.classmaker.Strategy#getExporters - * Exporters}'. - * - * @return the meta object for the reference list 'Exporters'. - * @see org.enterprisedomain.classmaker.Strategy#getExporters() - * @see #getStrategy() - * @generated - */ - EReference getStrategy_Exporters(); - - /** - * Returns the meta object for the reference list - * '{@link org.enterprisedomain.classmaker.Strategy#getInstallers - * Installers}'. - * - * @return the meta object for the reference list 'Installers'. - * @see org.enterprisedomain.classmaker.Strategy#getInstallers() - * @see #getStrategy() - * @generated - */ - EReference getStrategy_Installers(); - - /** - * Returns the meta object for the reference list - * '{@link org.enterprisedomain.classmaker.Strategy#getLoaders - * Loaders}'. - * - * @return the meta object for the reference list 'Loaders'. - * @see org.enterprisedomain.classmaker.Strategy#getLoaders() - * @see #getStrategy() - * @generated - */ - EReference getStrategy_Loaders(); - /** * Returns the meta object for the reference * '{@link org.enterprisedomain.classmaker.Strategy#getState State}'. @@ -2474,6 +2531,18 @@ public interface ClassMakerPackage extends EPackage { */ EReference getStrategy_State(); + /** + * Returns the meta object for the map + * '{@link org.enterprisedomain.classmaker.Strategy#getWorkers + * Workers}'. + * + * @return the meta object for the map 'Workers'. + * @see org.enterprisedomain.classmaker.Strategy#getWorkers() + * @see #getStrategy() + * @generated + */ + EReference getStrategy_Workers(); + /** * Returns the meta object for class * '{@link org.enterprisedomain.classmaker.Item Item}'. + * + * @return the meta object for the reference 'Resource'. + * @see org.enterprisedomain.classmaker.Item#getResource() + * @see #getItem() + * @generated + */ + EReference getItem_Resource(); + /** * Returns the meta object for class * '{@link org.eclipse.emf.common.notify.Adapter Adapter}'. + * + * @return the meta object for the map 'Non Exclusive Customizers'. + * @see org.enterprisedomain.classmaker.Workspace#getNonExclusiveCustomizers() + * @see #getWorkspace() + * @generated + */ + EReference getWorkspace_NonExclusiveCustomizers(); + /** * Returns the meta object for the container reference * '{@link org.enterprisedomain.classmaker.Workspace#getService @@ -2666,6 +2760,18 @@ public interface ClassMakerPackage extends EPackage { */ EReference getWorkspace_SCMRegistry(); + /** + * Returns the meta object for the reference list + * '{@link org.enterprisedomain.classmaker.Workspace#getExcludedEPackages + * Excluded EPackages}'. + * + * @return the meta object for the reference list 'Excluded EPackages'. + * @see org.enterprisedomain.classmaker.Workspace#getExcludedEPackages() + * @see #getWorkspace() + * @generated + */ + EReference getWorkspace_ExcludedEPackages(); + /** * Returns the meta object for class '{@link java.util.Map.Entry Long To * State Map Entry}'. @@ -2807,6 +2913,30 @@ public interface ClassMakerPackage extends EPackage { */ EAttribute getCustomizer_Rank(); + /** + * Returns the meta object for the attribute + * '{@link org.enterprisedomain.classmaker.Customizer#isExclusive + * Exclusive}'. + * + * @return the meta object for the attribute 'Exclusive'. + * @see org.enterprisedomain.classmaker.Customizer#isExclusive() + * @see #getCustomizer() + * @generated + */ + EAttribute getCustomizer_Exclusive(); + + /** + * Returns the meta object for the reference + * '{@link org.enterprisedomain.classmaker.Customizer#getStage Stage}'. + * + * + * @return the meta object for the reference 'Stage'. + * @see org.enterprisedomain.classmaker.Customizer#getStage() + * @see #getCustomizer() + * @generated + */ + EReference getCustomizer_Stage(); + /** * Returns the meta object for class * '{@link org.enterprisedomain.classmaker.StageQualifier Stage @@ -2880,6 +3010,43 @@ public interface ClassMakerPackage extends EPackage { */ EReference getStageQualifierToCustomizerMapEntry_Value(); + /** + * Returns the meta object for class '{@link java.util.Map.Entry Stage + * Qualifier To Workers Map Entry}'. + * + * @return the meta object for class 'Stage Qualifier To Workers Map + * Entry'. + * @see java.util.Map.Entry + * @model keyType="org.enterprisedomain.classmaker.StageQualifier" + * valueType="org.enterprisedomain.classmaker.Worker" + * valueResolveProxies="false" valueMany="true" + * @generated + */ + EClass getStageQualifierToWorkersMapEntry(); + + /** + * Returns the meta object for the reference '{@link java.util.Map.Entry + * Key}'. + * + * @return the meta object for the reference 'Key'. + * @see java.util.Map.Entry + * @see #getStageQualifierToWorkersMapEntry() + * @generated + */ + EReference getStageQualifierToWorkersMapEntry_Key(); + + /** + * Returns the meta object for the reference list '{@link java.util.Map.Entry + * Value}'. + * + * @return the meta object for the reference list 'Value'. + * @see java.util.Map.Entry + * @see #getStageQualifierToWorkersMapEntry() + * @generated + */ + EReference getStageQualifierToWorkersMapEntry_Value(); + /** * Returns the meta object for class * '{@link org.enterprisedomain.classmaker.Models Models}'. + * '{@link org.enterprisedomain.classmaker.Models#getDynamicEPackage Dynamic + * EPackage}'. * - * @return the meta object for the containment reference 'Dynamic'. - * @see org.enterprisedomain.classmaker.Models#getDynamic() + * @return the meta object for the containment reference 'Dynamic + * EPackage'. + * @see org.enterprisedomain.classmaker.Models#getDynamicEPackage() * @see #getModels() * @generated */ - EReference getModels_Dynamic(); + EReference getModels_DynamicEPackage(); /** * Returns the meta object for the reference - * '{@link org.enterprisedomain.classmaker.Models#getGenerated - * Generated}'. + * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEPackage + * Generated EPackage}'. * - * @return the meta object for the reference 'Generated'. - * @see org.enterprisedomain.classmaker.Models#getGenerated() + * @return the meta object for the reference 'Generated EPackage'. + * @see org.enterprisedomain.classmaker.Models#getGeneratedEPackage() * @see #getModels() * @generated */ - EReference getModels_Generated(); + EReference getModels_GeneratedEPackage(); /** * Returns the meta object for the attribute - * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEdit Generated - * Edit}'. + * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEditPlugin + * Generated Edit Plugin}'. * - * @return the meta object for the attribute 'Generated Edit'. - * @see org.enterprisedomain.classmaker.Models#getGeneratedEdit() + * @return the meta object for the attribute 'Generated Edit Plugin'. + * @see org.enterprisedomain.classmaker.Models#getGeneratedEditPlugin() * @see #getModels() * @generated */ - EAttribute getModels_GeneratedEdit(); + EAttribute getModels_GeneratedEditPlugin(); /** * Returns the meta object for the attribute - * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEditor - * Generated Editor}'. + * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEditorPlugin + * Generated Editor Plugin}'. * - * @return the meta object for the attribute 'Generated Editor'. - * @see org.enterprisedomain.classmaker.Models#getGeneratedEditor() + * @return the meta object for the attribute 'Generated Editor Plugin'. + * @see org.enterprisedomain.classmaker.Models#getGeneratedEditorPlugin() * @see #getModels() * @generated */ - EAttribute getModels_GeneratedEditor(); + EAttribute getModels_GeneratedEditorPlugin(); /** * Returns the meta object for the container reference @@ -2998,18 +3168,6 @@ public interface ClassMakerPackage extends EPackage { */ EAttribute getProject_ProjectName(); - /** - * Returns the meta object for the attribute list - * '{@link org.enterprisedomain.classmaker.Project#getChildren - * Children}'. - * - * @return the meta object for the attribute list 'Children'. - * @see org.enterprisedomain.classmaker.Project#getChildren() - * @see #getProject() - * @generated - */ - EAttribute getProject_Children(); - /** * Returns the meta object for the attribute * '{@link org.enterprisedomain.classmaker.Project#isDirty Dirty}'. @@ -3187,6 +3345,18 @@ public interface ClassMakerPackage extends EPackage { */ EReference getProject_ModelResourceAdapter(); + /** + * Returns the meta object for the attribute + * '{@link org.enterprisedomain.classmaker.Project#getClassLoader Class + * Loader}'. + * + * @return the meta object for the attribute 'Class Loader'. + * @see org.enterprisedomain.classmaker.Project#getClassLoader() + * @see #getProject() + * @generated + */ + EAttribute getProject_ClassLoader(); + /** * Returns the meta object for class * '{@link org.enterprisedomain.classmaker.SCMOperator SCM Operator}'. @@ -3517,6 +3687,17 @@ public interface ClassMakerPackage extends EPackage { */ EEnum getStage(); + /** + * Returns the meta object for data type '{@link java.lang.ClassLoader Class + * Loader}'. + * + * @return the meta object for data type 'Class Loader'. + * @see java.lang.ClassLoader + * @model instanceClass="java.lang.ClassLoader" + * @generated + */ + EDataType getClassLoader(); + /** * Returns the meta object for data type '{@link java.util.Properties * Properties}'. - * - * @generated - */ - EReference STATE__RESOURCE = eINSTANCE.getState_Resource(); - - /** - * The meta object literal for the 'Commit Ids' attribute list + * The meta object literal for the 'Commit Id' attribute * feature. * * @generated */ - EAttribute STATE__COMMIT_IDS = eINSTANCE.getState_CommitIds(); + EAttribute STATE__COMMIT_ID = eINSTANCE.getState_CommitId(); /** - * The meta object literal for the 'Commit Id' attribute + * The meta object literal for the 'State Customizers' map * feature. * * @generated */ - EAttribute STATE__COMMIT_ID = eINSTANCE.getState_CommitId(); + EReference STATE__STATE_CUSTOMIZERS = eINSTANCE.getState_StateCustomizers(); /** - * The meta object literal for the 'State Customizers' map - * feature. + * The meta object literal for the 'Non Exclusive State + * Customizers' map feature. * * @generated */ - EReference STATE__STATE_CUSTOMIZERS = eINSTANCE.getState_StateCustomizers(); + EReference STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS = eINSTANCE.getState_NonExclusiveStateCustomizers(); /** * The meta object literal for the 'Project Name' attribute @@ -3912,55 +4086,39 @@ interface Literals { EReference STATE__STRATEGY = eINSTANCE.getState_Strategy(); /** - * The meta object literal for the - * '{@link org.enterprisedomain.classmaker.impl.StrategyImpl Strategy}' - * class. - * - * @see org.enterprisedomain.classmaker.impl.StrategyImpl - * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getStrategy() - * @generated - */ - EClass STRATEGY = eINSTANCE.getStrategy(); - - /** - * The meta object literal for the 'Generators' reference list - * feature. - * - * @generated - */ - EReference STRATEGY__GENERATORS = eINSTANCE.getStrategy_Generators(); - - /** - * The meta object literal for the 'Exporters' reference list + * The meta object literal for the 'Base Package' attribute * feature. * * @generated */ - EReference STRATEGY__EXPORTERS = eINSTANCE.getStrategy_Exporters(); + EAttribute STATE__BASE_PACKAGE = eINSTANCE.getState_BasePackage(); /** - * The meta object literal for the 'Installers' reference list - * feature. + * The meta object literal for the + * '{@link org.enterprisedomain.classmaker.impl.StrategyImpl Strategy}' + * class. * + * @see org.enterprisedomain.classmaker.impl.StrategyImpl + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getStrategy() * @generated */ - EReference STRATEGY__INSTALLERS = eINSTANCE.getStrategy_Installers(); + EClass STRATEGY = eINSTANCE.getStrategy(); /** - * The meta object literal for the 'Loaders' reference list - * feature. + * The meta object literal for the 'State' reference feature. + * * * @generated */ - EReference STRATEGY__LOADERS = eINSTANCE.getStrategy_Loaders(); + EReference STRATEGY__STATE = eINSTANCE.getStrategy_State(); /** - * The meta object literal for the 'State' reference feature. - * + * The meta object literal for the 'Workers' map feature. * * @generated */ - EReference STRATEGY__STATE = eINSTANCE.getStrategy_State(); + EReference STRATEGY__WORKERS = eINSTANCE.getStrategy_Workers(); /** * The meta object literal for the @@ -4037,6 +4195,14 @@ interface Literals { */ EReference ITEM__PROJECT = eINSTANCE.getItem_Project(); + /** + * The meta object literal for the 'Resource' reference feature. + * + * + * @generated + */ + EReference ITEM__RESOURCE = eINSTANCE.getItem_Resource(); + /** * The meta object literal for the '{@link org.eclipse.emf.common.notify.Adapter * Adapter}' class. @@ -4082,6 +4248,14 @@ interface Literals { */ EReference WORKSPACE__CUSTOMIZERS = eINSTANCE.getWorkspace_Customizers(); + /** + * The meta object literal for the 'Non Exclusive Customizers' + * map feature. + * + * @generated + */ + EReference WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS = eINSTANCE.getWorkspace_NonExclusiveCustomizers(); + /** * The meta object literal for the 'Service' container reference * feature. @@ -4098,6 +4272,14 @@ interface Literals { */ EReference WORKSPACE__SCM_REGISTRY = eINSTANCE.getWorkspace_SCMRegistry(); + /** + * The meta object literal for the 'Excluded EPackages' + * reference list feature. + * + * @generated + */ + EReference WORKSPACE__EXCLUDED_EPACKAGES = eINSTANCE.getWorkspace_ExcludedEPackages(); + /** * The meta object literal for the * '{@link org.enterprisedomain.classmaker.impl.LongToStateMapEntryImpl Long @@ -4215,6 +4397,22 @@ interface Literals { */ EAttribute CUSTOMIZER__RANK = eINSTANCE.getCustomizer_Rank(); + /** + * The meta object literal for the 'Exclusive' attribute + * feature. + * + * @generated + */ + EAttribute CUSTOMIZER__EXCLUSIVE = eINSTANCE.getCustomizer_Exclusive(); + + /** + * The meta object literal for the 'Stage' reference feature. + * + * + * @generated + */ + EReference CUSTOMIZER__STAGE = eINSTANCE.getCustomizer_Stage(); + /** * The meta object literal for the * '{@link org.enterprisedomain.classmaker.impl.StageQualifierImpl Stage @@ -4271,6 +4469,34 @@ interface Literals { EReference STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY__VALUE = eINSTANCE .getStageQualifierToCustomizerMapEntry_Value(); + /** + * The meta object literal for the + * '{@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl + * Stage Qualifier To Workers Map Entry}' class. + * + * @see org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getStageQualifierToWorkersMapEntry() + * @generated + */ + EClass STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY = eINSTANCE.getStageQualifierToWorkersMapEntry(); + + /** + * The meta object literal for the 'Key' reference feature. + * + * @generated + */ + EReference STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY = eINSTANCE.getStageQualifierToWorkersMapEntry_Key(); + + /** + * The meta object literal for the 'Value' reference list + * feature. + * + * @generated + */ + EReference STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE = eINSTANCE.getStageQualifierToWorkersMapEntry_Value(); + /** * The meta object literal for the * '{@link org.enterprisedomain.classmaker.impl.ModelsImpl Models}' @@ -4283,36 +4509,36 @@ interface Literals { EClass MODELS = eINSTANCE.getModels(); /** - * The meta object literal for the 'Dynamic' containment - * reference feature. + * The meta object literal for the 'Dynamic EPackage' + * containment reference feature. * * @generated */ - EReference MODELS__DYNAMIC = eINSTANCE.getModels_Dynamic(); + EReference MODELS__DYNAMIC_EPACKAGE = eINSTANCE.getModels_DynamicEPackage(); /** - * The meta object literal for the 'Generated' reference - * feature. + * The meta object literal for the 'Generated EPackage' + * reference feature. * * @generated */ - EReference MODELS__GENERATED = eINSTANCE.getModels_Generated(); + EReference MODELS__GENERATED_EPACKAGE = eINSTANCE.getModels_GeneratedEPackage(); /** - * The meta object literal for the 'Generated Edit' attribute - * feature. + * The meta object literal for the 'Generated Edit Plugin' + * attribute feature. * * @generated */ - EAttribute MODELS__GENERATED_EDIT = eINSTANCE.getModels_GeneratedEdit(); + EAttribute MODELS__GENERATED_EDIT_PLUGIN = eINSTANCE.getModels_GeneratedEditPlugin(); /** - * The meta object literal for the 'Generated Editor' attribute - * feature. + * The meta object literal for the 'Generated Editor Plugin' + * attribute feature. * * @generated */ - EAttribute MODELS__GENERATED_EDITOR = eINSTANCE.getModels_GeneratedEditor(); + EAttribute MODELS__GENERATED_EDITOR_PLUGIN = eINSTANCE.getModels_GeneratedEditorPlugin(); /** * The meta object literal for the 'Parent' container reference @@ -4359,14 +4585,6 @@ interface Literals { */ EAttribute PROJECT__PROJECT_NAME = eINSTANCE.getProject_ProjectName(); - /** - * The meta object literal for the 'Children' attribute list - * feature. - * - * @generated - */ - EAttribute PROJECT__CHILDREN = eINSTANCE.getProject_Children(); - /** * The meta object literal for the 'Dirty' attribute feature. * @@ -4481,6 +4699,14 @@ interface Literals { */ EReference PROJECT__MODEL_RESOURCE_ADAPTER = eINSTANCE.getProject_ModelResourceAdapter(); + /** + * The meta object literal for the 'Class Loader' attribute + * feature. + * + * @generated + */ + EAttribute PROJECT__CLASS_LOADER = eINSTANCE.getProject_ClassLoader(); + /** * The meta object literal for the * '{@link org.enterprisedomain.classmaker.impl.SCMOperatorImpl SCM @@ -4752,6 +4978,16 @@ interface Literals { */ EEnum STAGE = eINSTANCE.getStage(); + /** + * The meta object literal for the 'Class Loader' data type. + * + * @see java.lang.ClassLoader + * @see org.enterprisedomain.classmaker.impl.ClassMakerPackageImpl#getClassLoader() + * @generated + */ + EDataType CLASS_LOADER = eINSTANCE.getClassLoader(); + /** * The meta object literal for the 'Properties' data type. diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerService.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerService.java index 050207a8..87dc5471 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerService.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ClassMakerService.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 Kyrill Zotkin + * Copyright 2017, 2022 Kyrill Zotkin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,11 @@ package org.enterprisedomain.classmaker; import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; +import java.util.Locale; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -28,11 +32,9 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platform; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EOperation; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.osgi.framework.Version; /** * A representation of the model object @@ -61,7 +63,7 @@ public abstract class Stages { public static final String ID_PREFIX = "org.enterprisedomain.classmaker.customization.stages."; - private static final String PHASE_ATTR = "phase"; + private static final String ROLE_ATTR = "role"; private static final String ID_ATTR = "id"; @@ -71,6 +73,8 @@ public abstract class Stages { private static final String RANK_ATTR = "rank"; + private static final String EXCLUSIVE_ATTR = "exclusive"; + private static final String CLASS_ATTR = "class"; private static HashMap stages = new HashMap(); @@ -86,7 +90,7 @@ public static void contributeStages() { IConfigurationElement[] stageElements = Platform.getExtensionRegistry() .getConfigurationElementsFor(ClassMakerPlugin.STAGES_EXT_POINT); for (IConfigurationElement e : stageElements) { - Stage phase = Stage.getByName(e.getAttribute(PHASE_ATTR).toUpperCase()); + Stage phase = Stage.getByName(e.getAttribute(ROLE_ATTR).toUpperCase()); String id = e.getAttribute(ID_ATTR); stages.put(id, createStageQualifier(phase, e.getAttribute(STEP_ATTR))); } @@ -96,6 +100,13 @@ public static StageQualifier lookup(String id) { return stages.get(id); } + public static StageQualifier lookup(Stage stage, String step) { + for (StageQualifier q : stages.values()) + if (q.getStage().equals(stage) && q.getStep().equals(step)) + return q; + return null; + } + public static Set ids() { return stages.keySet(); } @@ -109,6 +120,11 @@ public static SortedSet createCustomizers(String id) { try { Customizer result = (Customizer) ce.createExecutableExtension(CLASS_ATTR); result.setRank(Integer.valueOf(ce.getAttribute(RANK_ATTR))); + boolean e = true; + if (ce.getAttribute(EXCLUSIVE_ATTR) != null) + e = Boolean.valueOf(ce.getAttribute(EXCLUSIVE_ATTR)); + result.setExclusive(e); + result.setStage(stages.get(ce.getAttribute(STAGE_ATTR))); results.add(result); } catch (CoreException ex) { ClassMakerPlugin.getInstance().getLog().log(ex.getStatus()); @@ -120,6 +136,93 @@ public static SortedSet createCustomizers(String id) { } + public static class NameUtil { + + private static Set javaReservedWords; + + public static String safeName(String name) { + if (ClassMakerService.NameUtil.isJavaReservedWord(name)) + return name + "_"; + return name; + } + + public static boolean isJavaReservedWord(String s) { + return getJavaReservedWords().contains(s); + } + + public static Set getJavaReservedWords() { + if (javaReservedWords == null) { + Set result = new HashSet(100); + result.add("abstract"); + result.add("assert"); + result.add("boolean"); + result.add("break"); + result.add("byte"); + result.add("case"); + result.add("catch"); + result.add("char"); + result.add("class"); + result.add("const"); + result.add("continue"); + result.add("default"); + result.add("do"); + result.add("double"); + result.add("else"); + result.add("enum"); + result.add("extends"); + result.add("false"); + result.add("final"); + result.add("finally"); + result.add("float"); + result.add("for"); + result.add("goto"); + result.add("if"); + result.add("implements"); + result.add("import"); + result.add("instanceof"); + result.add("int"); + result.add("interface"); + result.add("long"); + result.add("native"); + result.add("new"); + result.add("null"); + result.add("package"); + result.add("private"); + result.add("protected"); + result.add("public"); + result.add("return"); + result.add("short"); + result.add("static"); + result.add("strictfp"); + result.add("super"); + result.add("switch"); + result.add("synchronized"); + result.add("this"); + result.add("throw"); + result.add("throws"); + result.add("transient"); + result.add("true"); + result.add("try"); + result.add("void"); + result.add("volatile"); + result.add("while"); + javaReservedWords = Collections.unmodifiableSet(result); + } + return javaReservedWords; + } + + public static String capName(String name, Locale locale) { + if (name.length() == 0) + return name; + else + return name.substring(0, 1).toUpperCase(locale) + name.substring(1); + } + + public static String capName(String name) { + return capName(name, Locale.getDefault()); + } + } + /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Contribution.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Contribution.java index 9d53e1e7..5150b959 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Contribution.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Contribution.java @@ -18,7 +18,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.EList; -import org.osgi.framework.Version; /** * A representation of the model object diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Customizer.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Customizer.java index c0547b3a..f63b355c 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Customizer.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Customizer.java @@ -33,6 +33,10 @@ *
    *
  • {@link org.enterprisedomain.classmaker.Customizer#getRank * Rank}
  • + *
  • {@link org.enterprisedomain.classmaker.Customizer#isExclusive + * Exclusive}
  • + *
  • {@link org.enterprisedomain.classmaker.Customizer#getStage + * Stage}
  • *
* * @see org.enterprisedomain.classmaker.ClassMakerPackage#getCustomizer() @@ -78,6 +82,52 @@ public int compare(Customizer o1, Customizer o2) { */ void setRank(int value); + /** + * Returns the value of the 'Exclusive' attribute. The default + * value is "true". + * + * @return the value of the 'Exclusive' attribute. + * @see #setExclusive(boolean) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getCustomizer_Exclusive() + * @model default="true" + * @generated + */ + boolean isExclusive(); + + /** + * Sets the value of the + * '{@link org.enterprisedomain.classmaker.Customizer#isExclusive + * Exclusive}' attribute. + * + * @param value the new value of the 'Exclusive' attribute. + * @see #isExclusive() + * @generated + */ + void setExclusive(boolean value); + + /** + * Returns the value of the 'Stage' reference. + * + * @return the value of the 'Stage' reference. + * @see #setStage(StageQualifier) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getCustomizer_Stage() + * @model + * @generated + */ + StageQualifier getStage(); + + /** + * Sets the value of the + * '{@link org.enterprisedomain.classmaker.Customizer#getStage Stage}' + * reference. + * + * @param value the new value of the 'Stage' reference. + * @see #getStage() + * @generated + */ + void setStage(StageQualifier value); + /** * * Provides customization in the process. @@ -87,4 +137,12 @@ public int compare(Customizer o1, Customizer o2) { */ Object customize(EList args); + /** + * + * + * @model + * @generated + */ + boolean isNextAfter(Class customizerClass); + } // Customizer diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Item.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Item.java index af3c5e00..925b4769 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Item.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Item.java @@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; /** * A representation of the model object @@ -48,6 +49,8 @@ * Locale} *
  • {@link org.enterprisedomain.classmaker.Item#getProject * Project}
  • + *
  • {@link org.enterprisedomain.classmaker.Item#getResource + * Resource}
  • * * * @see org.enterprisedomain.classmaker.ClassMakerPackage#getItem() @@ -249,7 +252,7 @@ public interface Item extends EObject { * @model * @generated */ - String initialize(boolean commit); + String initialize(); /** * @@ -259,6 +262,14 @@ public interface Item extends EObject { */ void copyModel(Item from); + /** + * + * + * @model + * @generated + */ + void renameProject(String oldProjectName, String newProjectName); + /** * Returns the value of the 'Locale' attribute. The default * value is "". + * + * @return the value of the 'Resource' reference. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getItem_Resource() + * @model type="org.enterprisedomain.classmaker.Resource" resolveProxies="false" + * changeable="false" volatile="true" derived="true" + * @generated + */ + Resource getResource(); + + /** + * Sets the value of the + * '{@link org.enterprisedomain.classmaker.Item#getResource Resource}' + * reference. + * + * @param value the new value of the 'Resource' reference. + * @see #getResource() + * @generated + */ + void setResource(Resource value); + /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Messages.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Messages.java index b00d1560..ebc7b76e 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Messages.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Messages.java @@ -26,8 +26,8 @@ public class Messages extends NLS { public static String JobNameCodeGeneration; public static String JobNameCodeGenerator; public static String BundleDuplicate; - public static String EPackageClassLoadComplete; - public static String EPackageNo; + public static String ObjectClassLoadComplete; + public static String ObjectNo; public static String JobNameGenModelConfiguration; public static String JobNameGenModelGeneration; public static String JobNameInstaller; @@ -37,9 +37,9 @@ public class Messages extends NLS { public static String JobNameModelResource; public static String BundleNo; public static String JobNamePDEExport; - public static String PDEExportScheduled; public static String ProjectNotExist; public static String DefaultResourceExt; + public static String EObjectIsNotEPackage; public static String None; public static String OK; public static String ResourceImported; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Models.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Models.java index 22e8442e..2c3370d0 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Models.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Models.java @@ -29,14 +29,14 @@ * The following features are supported: *

    *
      - *
    • {@link org.enterprisedomain.classmaker.Models#getDynamic - * Dynamic}
    • - *
    • {@link org.enterprisedomain.classmaker.Models#getGenerated - * Generated}
    • - *
    • {@link org.enterprisedomain.classmaker.Models#getGeneratedEdit - * Generated Edit}
    • - *
    • {@link org.enterprisedomain.classmaker.Models#getGeneratedEditor - * Generated Editor}
    • + *
    • {@link org.enterprisedomain.classmaker.Models#getDynamicEPackage + * Dynamic EPackage}
    • + *
    • {@link org.enterprisedomain.classmaker.Models#getGeneratedEPackage + * Generated EPackage}
    • + *
    • {@link org.enterprisedomain.classmaker.Models#getGeneratedEditPlugin + * Generated Edit Plugin}
    • + *
    • {@link org.enterprisedomain.classmaker.Models#getGeneratedEditorPlugin + * Generated Editor Plugin}
    • *
    • {@link org.enterprisedomain.classmaker.Models#getParent * Parent}
    • *
    @@ -47,103 +47,108 @@ */ public interface Models extends EObject { /** - * Returns the value of the 'Dynamic' containment reference. - * - * Dynamic model {@link org.eclipse.emf.ecore.EPackage EPackage} instance, which - * serves as a blueprint for {@link ClassMakerService#make() making}. Dynamic model {@link org.eclipse.emf.ecore.EPackage EPackage} instance, + * which serves as a blueprint for {@link ClassMakerService#make() making}. * - * @return the value of the 'Dynamic' containment reference. - * @see #setDynamic(EObject) - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_Dynamic() + * @return the value of the 'Dynamic EPackage' containment reference. + * @see #setDynamicEPackage(EObject) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_DynamicEPackage() * @model containment="true" * @generated */ - EObject getDynamic(); + EObject getDynamicEPackage(); /** * Sets the value of the - * '{@link org.enterprisedomain.classmaker.Models#getDynamic Dynamic}' - * containment reference. + * '{@link org.enterprisedomain.classmaker.Models#getDynamicEPackage Dynamic + * EPackage}' containment reference. * - * @param value the new value of the 'Dynamic' containment reference. - * @see #getDynamic() + * @param value the new value of the 'Dynamic EPackage' containment + * reference. + * @see #getDynamicEPackage() * @generated */ - void setDynamic(EObject value); + void setDynamicEPackage(EObject value); /** - * Returns the value of the 'Generated' reference. Generated * model {@link org.eclipse.emf.ecore.EPackage EPackage} instance, which appears * as a result of {@link ClassMakerService#make() making}. * - * @return the value of the 'Generated' reference. - * @see #setGenerated(EObject) - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_Generated() + * @return the value of the 'Generated EPackage' reference. + * @see #setGeneratedEPackage(EObject) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_GeneratedEPackage() * @model * @generated */ - EObject getGenerated(); + EObject getGeneratedEPackage(); /** * Sets the value of the - * '{@link org.enterprisedomain.classmaker.Models#getGenerated - * Generated}' reference. + * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEPackage + * Generated EPackage}' reference. * - * @param value the new value of the 'Generated' reference. - * @see #getGenerated() + * @param value the new value of the 'Generated EPackage' reference. + * @see #getGeneratedEPackage() * @generated */ - void setGenerated(EObject value); + void setGeneratedEPackage(EObject value); /** - * Returns the value of the 'Generated Edit' reference. + * Returns the value of the 'Generated Edit Plugin' attribute. + * * - * @return the value of the 'Generated Edit' reference. - * @see #setGeneratedEdit(EMFPlugin) - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_GeneratedEdit() - * @model type="org.enterprisedomain.classmaker.EMFPlugin" + * @return the value of the 'Generated Edit Plugin' attribute. + * @see #setGeneratedEditPlugin(EMFPlugin) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_GeneratedEditPlugin() + * @model dataType="org.enterprisedomain.classmaker.EMFPlugin" * @generated */ - EMFPlugin getGeneratedEdit(); + EMFPlugin getGeneratedEditPlugin(); /** * Sets the value of the - * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEdit Generated - * Edit}' attribute. + * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEditPlugin + * Generated Edit Plugin}' attribute. * - * @param value the new value of the 'Generated Edit' attribute. - * @see #getGeneratedEdit() + * @param value the new value of the 'Generated Edit Plugin' attribute. + * @see #getGeneratedEditPlugin() * @generated */ - void setGeneratedEdit(EMFPlugin value); + void setGeneratedEditPlugin(EMFPlugin value); /** - * Returns the value of the 'Generated Editor' reference. + * Returns the value of the 'Generated Editor Plugin' attribute. + * * - * @return the value of the 'Generated Editor' reference. - * @see #setGeneratedEditor(EMFPlugin) - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_GeneratedEditor() - * @model type="org.enterprisedomain.classmaker.EMFPlugin" + * @return the value of the 'Generated Editor Plugin' attribute. + * @see #setGeneratedEditorPlugin(EMFPlugin) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getModels_GeneratedEditorPlugin() + * @model dataType="org.enterprisedomain.classmaker.EMFPlugin" * @generated */ - EMFPlugin getGeneratedEditor(); + EMFPlugin getGeneratedEditorPlugin(); /** * Sets the value of the - * '{@link org.enterprisedomain.classmaker.Models#getGeneratedEditor - * Generated Editor}' attribute. * - * @param value the new value of the 'Generated Editor' attribute. - * @see #getGeneratedEditor() + * @param value the new value of the 'Generated Editor Plugin' + * attribute. + * @see #getGeneratedEditorPlugin() * @generated */ - void setGeneratedEditor(EMFPlugin value); + void setGeneratedEditorPlugin(EMFPlugin value); /** * Returns the value of the 'Parent' container reference. It is diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Project.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Project.java index e2aea1cd..67ab065e 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Project.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Project.java @@ -15,13 +15,13 @@ */ package org.enterprisedomain.classmaker; +import javax.management.Notification; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; -import org.osgi.framework.Version; /** * A representation of the model object ' @@ -37,8 +37,6 @@ * Name} *
  • {@link org.enterprisedomain.classmaker.Project#getProjectName Project * Name}
  • - *
  • {@link org.enterprisedomain.classmaker.Project#getChildren - * Children}
  • *
  • {@link org.enterprisedomain.classmaker.Project#isDirty * Dirty}
  • *
  • {@link org.enterprisedomain.classmaker.Project#getWorkspace @@ -67,6 +65,8 @@ * State}
  • *
  • {@link org.enterprisedomain.classmaker.Project#getModelResourceAdapter * Model Resource Adapter}
  • + *
  • {@link org.enterprisedomain.classmaker.Project#getClassLoader Class + * Loader}
  • * * * @see org.enterprisedomain.classmaker.ClassMakerPackage#getProject() @@ -133,22 +133,6 @@ public interface Project extends ISchedulingRule, Item { */ void setProjectName(String value); - /** - * Returns the value of the 'Children' attribute list. The list - * contents are of type {@link java.lang.Object}. - *

    - * If the meaning of the 'Children' attribute list isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Children' attribute list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getProject_Children() - * @model transient="true" changeable="false" volatile="true" derived="true" - * @generated - */ - EList getChildren(); - /** * Returns the value of the 'Dirty' attribute. @@ -477,6 +461,56 @@ public interface Project extends ISchedulingRule, Item { */ ResourceAdapter getModelResourceAdapter(); + /** + * Returns the value of the 'Class Loader' attribute. + * + * @return the value of the 'Class Loader' attribute. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getProject_ClassLoader() + * @model dataType="org.enterprisedomain.classmaker.ClassLoader" + * changeable="false" + * @generated + */ + ClassLoader getClassLoader(); + + /** + * Sets the value of the + * '{@link org.enterprisedomain.classmaker.Project#getClassLoader Class + * Loader}' attribute. + * + * @param value the new value of the 'Class Loader' attribute. + * @see #isSetClassLoader() + * @see #unsetClassLoader() + * @see #getClassLoader() + * @generated + */ + void setClassLoader(ClassLoader value); + + /** + * Unsets the value of the + * '{@link org.enterprisedomain.classmaker.Project#getClassLoader Class + * Loader}' attribute. + * + * @see #isSetClassLoader() + * @see #getClassLoader() + * @see #setClassLoader(ClassLoader) + * @generated + */ + void unsetClassLoader(); + + /** + * Returns whether the value of the + * '{@link org.enterprisedomain.classmaker.Project#getClassLoader Class + * Loader}' attribute is set. + * + * @return whether the value of the 'Class Loader' attribute is set. + * @see #unsetClassLoader() + * @see #getClassLoader() + * @see #setClassLoader(ClassLoader) + * @generated + */ + boolean isSetClassLoader(); + /** * * @@ -549,7 +583,7 @@ public interface Project extends ISchedulingRule, Item { * @model * @generated */ - String initialize(boolean commit); + String initialize(); /** * @@ -677,30 +711,6 @@ Version newVersion(Version base, boolean incrementMajor, boolean incrementMinor, */ void checkout(Version version, long timestamp, String commitId); - /** - * - * - * @model - * @generated - */ - void checkout(long timestamp); - - /** - * - * - * @model - * @generated - */ - void checkout(long timestamp, String commitId); - - /** - * - * - * @model - * @generated - */ - void checkout(String commitId); - /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ResourceChangeListener.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ResourceChangeListener.java index 33111908..ad8fb67b 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ResourceChangeListener.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ResourceChangeListener.java @@ -15,7 +15,8 @@ */ package org.enterprisedomain.classmaker; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.ecore.EObject; /** diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Revision.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Revision.java index 33323606..194ab831 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Revision.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Revision.java @@ -23,7 +23,6 @@ import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; -import org.osgi.framework.Version; /** * A representation of the model object @@ -203,7 +202,7 @@ public interface Revision extends Item { * @model * @generated */ - void checkout(String commitId); + State newState(); /** * @@ -211,7 +210,7 @@ public interface Revision extends Item { * @model * @generated */ - State newState(); + State newState(long timestamp); /** * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/SCMOperator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/SCMOperator.java index 0f0d4c8e..49237c58 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/SCMOperator.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/SCMOperator.java @@ -16,7 +16,6 @@ package org.enterprisedomain.classmaker; import org.eclipse.emf.ecore.EObject; -import org.osgi.framework.Version; /** * A representation of the model object 'SCM diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/State.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/State.java index fa1537cf..8037c497 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/State.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/State.java @@ -23,7 +23,6 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; /** * A representation of the model object ' @@ -57,14 +56,12 @@ * Editor Deployable Unit Name} *
  • {@link org.enterprisedomain.classmaker.State#getJobFamily Job * Family}
  • - *
  • {@link org.enterprisedomain.classmaker.State#getResource - * Resource}
  • - *
  • {@link org.enterprisedomain.classmaker.State#getCommitIds Commit - * Ids}
  • *
  • {@link org.enterprisedomain.classmaker.State#getCommitId Commit * Id}
  • *
  • {@link org.enterprisedomain.classmaker.State#getStateCustomizers * State Customizers}
  • + *
  • {@link org.enterprisedomain.classmaker.State#getNonExclusiveStateCustomizers + * Non Exclusive State Customizers}
  • *
  • {@link org.enterprisedomain.classmaker.State#getProjectName Project * Name}
  • *
  • {@link org.enterprisedomain.classmaker.State#isMaking @@ -74,6 +71,8 @@ * Editor}
  • *
  • {@link org.enterprisedomain.classmaker.State#getStrategy * Strategy}
  • + *
  • {@link org.enterprisedomain.classmaker.State#getBasePackage Base + * Package}
  • * * * @see org.enterprisedomain.classmaker.ClassMakerPackage#getState() @@ -353,51 +352,6 @@ public interface State extends Item, ISchedulingRule { */ void setJobFamily(String value); - /** - * Returns the value of the 'Resource' reference. - *

    - * If the meaning of the 'Resource' reference isn't clear, there really - * should be more of a description here... - *

    - * - * - * @return the value of the 'Resource' reference. - * @see #setResource(Resource) - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getState_Resource() - * @model type="org.enterprisedomain.classmaker.Resource" resolveProxies="false" - * @generated - */ - Resource getResource(); - - /** - * Sets the value of the - * '{@link org.enterprisedomain.classmaker.State#getResource Resource}' - * reference. - * - * @param value the new value of the 'Resource' reference. - * @see #getResource() - * @generated - */ - void setResource(Resource value); - - /** - * Returns the value of the 'Commit Ids' attribute list. The - * list contents are of type {@link java.lang.String}. - *

    - * If the meaning of the 'Commit Ids' attribute list isn't clear, there - * really should be more of a description here... - *

    - * An SCM commit's associated - * with the state identifiers. - * - * @return the value of the 'Commit Ids' attribute list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getState_CommitIds() - * @model - * @generated - */ - EList getCommitIds(); - /** * Returns the value of the 'Commit Id' attribute. @@ -448,6 +402,21 @@ public interface State extends Item, ISchedulingRule { */ EMap getStateCustomizers(); + /** + * Returns the value of the 'Non Exclusive State Customizers' + * map. The key is of type + * {@link org.enterprisedomain.classmaker.StageQualifier}, and the value is of + * type {@link org.enterprisedomain.classmaker.Customizer}, + * + * @return the value of the 'Non Exclusive State Customizers' map. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getState_NonExclusiveStateCustomizers() + * @model mapType="org.enterprisedomain.classmaker.StageQualifierToCustomizerMapEntry<org.enterprisedomain.classmaker.StageQualifier, + * org.enterprisedomain.classmaker.Customizer>" + * @generated + */ + EMap getNonExclusiveStateCustomizers(); + /** * Returns the value of the 'Project Name' attribute. @@ -574,6 +543,29 @@ public interface State extends Item, ISchedulingRule { */ void setStrategy(Strategy value); + /** + * Returns the value of the 'Base Package' attribute. + * + * @return the value of the 'Base Package' attribute. + * @see #setBasePackage(String) + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getState_BasePackage() + * @model + * @generated + */ + String getBasePackage(); + + /** + * Sets the value of the + * '{@link org.enterprisedomain.classmaker.State#getBasePackage Base + * Package}' attribute. + * + * @param value the new value of the 'Base Package' attribute. + * @see #getBasePackage() + * @generated + */ + void setBasePackage(String value); + /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Strategy.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Strategy.java index 6792ed4a..c971cb9f 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Strategy.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Strategy.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EObject; import org.enterprisedomain.classmaker.jobs.Worker; @@ -28,16 +29,10 @@ * The following features are supported: *

    *
      - *
    • {@link org.enterprisedomain.classmaker.Strategy#getGenerators - * Generators}
    • - *
    • {@link org.enterprisedomain.classmaker.Strategy#getExporters - * Exporters}
    • - *
    • {@link org.enterprisedomain.classmaker.Strategy#getInstallers - * Installers}
    • - *
    • {@link org.enterprisedomain.classmaker.Strategy#getLoaders - * Loaders}
    • *
    • {@link org.enterprisedomain.classmaker.Strategy#getState * State}
    • + *
    • {@link org.enterprisedomain.classmaker.Strategy#getWorkers + * Workers}
    • *
    * * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy() @@ -45,56 +40,6 @@ * @generated */ public interface Strategy extends EObject { - /** - * Returns the value of the 'Generators' reference list. The - * list contents are of type - * {@link org.enterprisedomain.classmaker.jobs.Worker}. - * - * - * @return the value of the 'Generators' reference list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy_Generators() - * @model type="org.enterprisedomain.classmaker.Worker" resolveProxies="false" - * @generated - */ - EList getGenerators(); - - /** - * Returns the value of the 'Exporters' reference list. The list - * contents are of type {@link org.enterprisedomain.classmaker.jobs.Worker}. - * - * - * @return the value of the 'Exporters' reference list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy_Exporters() - * @model type="org.enterprisedomain.classmaker.Worker" resolveProxies="false" - * @generated - */ - EList getExporters(); - - /** - * Returns the value of the 'Installers' reference list. The - * list contents are of type - * {@link org.enterprisedomain.classmaker.jobs.Worker}. - * - * - * @return the value of the 'Installers' reference list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy_Installers() - * @model type="org.enterprisedomain.classmaker.Worker" resolveProxies="false" - * @generated - */ - EList getInstallers(); - - /** - * Returns the value of the 'Loaders' reference list. The list - * contents are of type {@link org.enterprisedomain.classmaker.jobs.Worker}. - * - * - * @return the value of the 'Loaders' reference list. - * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy_Loaders() - * @model type="org.enterprisedomain.classmaker.Worker" resolveProxies="false" - * @generated - */ - EList getLoaders(); - /** * Returns the value of the 'State' reference. It is * bidirectional and its opposite is @@ -122,44 +67,34 @@ public interface Strategy extends EObject { void setState(State value); /** - * - * - * @model type="org.enterprisedomain.classmaker.Worker" - * @generated - */ - Worker createGenerator(); - - /** - * + * Returns the value of the 'Workers' map. The key is of type + * {@link org.enterprisedomain.classmaker.StageQualifier}, and the value is of + * type list of {@link org.enterprisedomain.classmaker.jobs.Worker}, * - * @model type="org.enterprisedomain.classmaker.Worker" - * @generated - */ - Worker createExporter(); - - /** - * - * - * @model type="org.enterprisedomain.classmaker.Worker" + * @return the value of the 'Workers' map. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getStrategy_Workers() + * @model mapType="org.enterprisedomain.classmaker.StageQualifierToWorkersMapEntry<org.enterprisedomain.classmaker.StageQualifier, + * org.enterprisedomain.classmaker.Worker>" * @generated */ - Worker createInstaller(); + EMap> getWorkers(); /** * * - * @model type="org.enterprisedomain.classmaker.Worker" + * @model kind="operation" type="org.enterprisedomain.classmaker.Worker" * @generated */ - Worker createModelLoader(); + Worker getReturnWorker(); /** * * - * @model kind="operation" type="org.enterprisedomain.classmaker.Worker" + * @model monitorDataType="org.enterprisedomain.classmaker.IProgressMonitor" * @generated */ - Worker getReturnWorker(); + int configureJobs(boolean create, IProgressMonitor monitor); /** * @@ -167,14 +102,14 @@ public interface Strategy extends EObject { * @model monitorDataType="org.enterprisedomain.classmaker.IProgressMonitor" * @generated */ - int configureJobs(boolean create, IProgressMonitor monitor); + void configuteBuildJobs(IProgressMonitor monitor); /** * * - * @model monitorDataType="org.enterprisedomain.classmaker.IProgressMonitor" + * @model type="org.enterprisedomain.classmaker.Worker" * @generated */ - void configuteBuildJobs(IProgressMonitor monitor); + EList get(Stage stage, String step); } // Strategy diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Workspace.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Workspace.java index 60934511..50974a25 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Workspace.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/Workspace.java @@ -21,6 +21,7 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; @@ -43,10 +44,14 @@ * Resource Set} *
  • {@link org.enterprisedomain.classmaker.Workspace#getCustomizers * Customizers}
  • + *
  • {@link org.enterprisedomain.classmaker.Workspace#getNonExclusiveCustomizers + * Non Exclusive Customizers}
  • *
  • {@link org.enterprisedomain.classmaker.Workspace#getService * Service}
  • *
  • {@link org.enterprisedomain.classmaker.Workspace#getSCMRegistry SCM * Registry}
  • + *
  • {@link org.enterprisedomain.classmaker.Workspace#getExcludedEPackages + * Excluded EPackages}
  • * * * @see org.enterprisedomain.classmaker.ClassMakerPackage#getWorkspace() @@ -107,6 +112,20 @@ public interface Workspace extends EObject, ISchedulingRule { */ EMap getCustomizers(); + /** + * Returns the value of the 'Non Exclusive Customizers' map. The + * key is of type {@link org.enterprisedomain.classmaker.StageQualifier}, and + * the value is of type {@link org.enterprisedomain.classmaker.Customizer}, + * + * @return the value of the 'Non Exclusive Customizers' map. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getWorkspace_NonExclusiveCustomizers() + * @model mapType="org.enterprisedomain.classmaker.StageQualifierToCustomizerMapEntry<org.enterprisedomain.classmaker.StageQualifier, + * org.enterprisedomain.classmaker.Customizer>" + * @generated + */ + EMap getNonExclusiveCustomizers(); + /** * Returns the value of the 'Service' container reference. It is * bidirectional and its opposite is @@ -151,6 +170,18 @@ public interface Workspace extends EObject, ISchedulingRule { */ SCMRegistry getSCMRegistry(); + /** + * Returns the value of the 'Excluded EPackages' reference list. + * The list contents are of type {@link org.eclipse.emf.ecore.EPackage}. + * + * @return the value of the 'Excluded EPackages' reference list. + * @see org.enterprisedomain.classmaker.ClassMakerPackage#getWorkspace_ExcludedEPackages() + * @model + * @generated + */ + EList getExcludedEPackages(); + /** * * Initializes Workspace. diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ClassMakerPlugin.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ClassMakerPlugin.java index 8ad7ec3b..f9beb2ef 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ClassMakerPlugin.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ClassMakerPlugin.java @@ -42,6 +42,8 @@ public class ClassMakerPlugin extends Plugin { + public static final boolean DEBUG = false; + public static final String PLUGIN_ID = "org.enterprisedomain.classmaker"; //$NON-NLS-1$ public static final String CONTRIBUTION_NATURE_ID = PLUGIN_ID + ".contributionProjectNature"; //$NON-NLS-1$ @@ -168,6 +170,11 @@ public static void setDefaultOutputStream(PrintStream defaultOutputStream) { ClassMakerPlugin.defaultOutputStream = defaultOutputStream; } + public static void print(String string) { + if (DEBUG) + getDefaultOutputStream().println("*** " + string); + } + public static void setRunnerWithProgress(IRunnerWithProgress runner) { ClassMakerPlugin.runner = runner; } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ContributionProjectNature.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ContributionProjectNature.java index 4981ffec..9176f8a4 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ContributionProjectNature.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/core/ContributionProjectNature.java @@ -27,8 +27,8 @@ public class ContributionProjectNature implements IProjectNature { @Override public void configure() throws CoreException { ResourceUtils.removeProjectNature(project, ClassMakerPlugin.NATURE_ID); - ResourceUtils.addProjectNature(project, ClassMakerPlugin.JAVA_NATURE); ResourceUtils.addProjectNature(project, ClassMakerPlugin.PDE_PLUGIN_NATURE); + ResourceUtils.addProjectNature(project, ClassMakerPlugin.JAVA_NATURE); ResourceUtils.addToBuildSpec(project, ClassMakerBuilder.BUILDER_ID); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/BlueprintImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/BlueprintImpl.java index 5625294d..47606a17 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/BlueprintImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/BlueprintImpl.java @@ -17,7 +17,8 @@ import java.util.Collection; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerFactoryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerFactoryImpl.java index 71ed1909..d3acdff7 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerFactoryImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerFactoryImpl.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.io.StringReader; import java.lang.reflect.InvocationTargetException; +import java.net.URI; import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -27,7 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EObject; @@ -54,7 +55,7 @@ import org.enterprisedomain.classmaker.Strategy; import org.enterprisedomain.classmaker.Workspace; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.osgi.framework.Version; +import org.enterprisedomain.classmaker.jobs.Worker; /** * An implementation of the model Factory. + * + * @generated + */ + public Map.Entry> createStageQualifierToWorkersMapEntry() { + StageQualifierToWorkersMapEntryImpl stageQualifierToWorkersMapEntry = new StageQualifierToWorkersMapEntryImpl(); + return stageQualifierToWorkersMapEntry; + } + /** * * @@ -449,6 +466,24 @@ public String convertStageToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } + /** + * + * + * @generated + */ + public ClassLoader createClassLoaderFromString(EDataType eDataType, String initialValue) { + return (ClassLoader) super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertClassLoaderToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerPackageImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerPackageImpl.java index 78e4a2e3..87e73b39 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerPackageImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerPackageImpl.java @@ -15,9 +15,6 @@ */ package org.enterprisedomain.classmaker.impl; -import static org.enterprisedomain.classmaker.ClassMakerPackage.ADAPTER; -import static org.enterprisedomain.classmaker.ClassMakerPackage.RESOURCE; - import java.lang.reflect.InvocationTargetException; import java.util.Locale; import java.util.Map; @@ -26,6 +23,8 @@ import java.util.concurrent.Future; import java.util.concurrent.Semaphore; +import javax.management.Notification; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.core.runtime.IProgressMonitor; @@ -33,7 +32,6 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; @@ -72,7 +70,6 @@ import org.enterprisedomain.classmaker.Workspace; import org.enterprisedomain.classmaker.jobs.Worker; import org.enterprisedomain.classmaker.util.ClassMakerValidator; -import org.osgi.framework.Version; /** * An implementation of the model Package. + * + * @generated + */ + private EClass stageQualifierToWorkersMapEntryEClass = null; + /** * * @@ -305,6 +309,13 @@ public class ClassMakerPackageImpl extends EPackageImpl implements ClassMakerPac */ private EEnum stageEEnum = null; + /** + * + * + * @generated + */ + private EDataType classLoaderEDataType = null; + /** * * @@ -673,8 +684,8 @@ public EAttribute getState_JobFamily() { * @generated */ @Override - public EReference getState_Resource() { - return (EReference) stateEClass.getEStructuralFeatures().get(10); + public EAttribute getState_CommitId() { + return (EAttribute) stateEClass.getEStructuralFeatures().get(10); } /** @@ -683,8 +694,8 @@ public EReference getState_Resource() { * @generated */ @Override - public EAttribute getState_CommitIds() { - return (EAttribute) stateEClass.getEStructuralFeatures().get(11); + public EReference getState_StateCustomizers() { + return (EReference) stateEClass.getEStructuralFeatures().get(11); } /** @@ -693,8 +704,8 @@ public EAttribute getState_CommitIds() { * @generated */ @Override - public EAttribute getState_CommitId() { - return (EAttribute) stateEClass.getEStructuralFeatures().get(12); + public EReference getState_NonExclusiveStateCustomizers() { + return (EReference) stateEClass.getEStructuralFeatures().get(12); } /** @@ -703,8 +714,8 @@ public EAttribute getState_CommitId() { * @generated */ @Override - public EReference getState_StateCustomizers() { - return (EReference) stateEClass.getEStructuralFeatures().get(13); + public EAttribute getState_ProjectName() { + return (EAttribute) stateEClass.getEStructuralFeatures().get(13); } /** @@ -713,7 +724,7 @@ public EReference getState_StateCustomizers() { * @generated */ @Override - public EAttribute getState_ProjectName() { + public EAttribute getState_Making() { return (EAttribute) stateEClass.getEStructuralFeatures().get(14); } @@ -723,7 +734,7 @@ public EAttribute getState_ProjectName() { * @generated */ @Override - public EAttribute getState_Making() { + public EAttribute getState_Edit() { return (EAttribute) stateEClass.getEStructuralFeatures().get(15); } @@ -733,7 +744,7 @@ public EAttribute getState_Making() { * @generated */ @Override - public EAttribute getState_Edit() { + public EAttribute getState_Editor() { return (EAttribute) stateEClass.getEStructuralFeatures().get(16); } @@ -743,8 +754,8 @@ public EAttribute getState_Edit() { * @generated */ @Override - public EAttribute getState_Editor() { - return (EAttribute) stateEClass.getEStructuralFeatures().get(17); + public EReference getState_Strategy() { + return (EReference) stateEClass.getEStructuralFeatures().get(17); } /** @@ -753,8 +764,8 @@ public EAttribute getState_Editor() { * @generated */ @Override - public EReference getState_Strategy() { - return (EReference) stateEClass.getEStructuralFeatures().get(18); + public EAttribute getState_BasePackage() { + return (EAttribute) stateEClass.getEStructuralFeatures().get(18); } /** @@ -773,7 +784,7 @@ public EClass getStrategy() { * @generated */ @Override - public EReference getStrategy_Generators() { + public EReference getStrategy_State() { return (EReference) strategyEClass.getEStructuralFeatures().get(0); } @@ -783,40 +794,10 @@ public EReference getStrategy_Generators() { * @generated */ @Override - public EReference getStrategy_Exporters() { + public EReference getStrategy_Workers() { return (EReference) strategyEClass.getEStructuralFeatures().get(1); } - /** - * - * - * @generated - */ - @Override - public EReference getStrategy_Installers() { - return (EReference) strategyEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - @Override - public EReference getStrategy_Loaders() { - return (EReference) strategyEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - @Override - public EReference getStrategy_State() { - return (EReference) strategyEClass.getEStructuralFeatures().get(4); - } - /** * * @@ -907,6 +888,16 @@ public EReference getItem_Project() { return (EReference) itemEClass.getEStructuralFeatures().get(7); } + /** + * + * + * @generated + */ + @Override + public EReference getItem_Resource() { + return (EReference) itemEClass.getEStructuralFeatures().get(8); + } + /** * * @@ -963,7 +954,7 @@ public EReference getWorkspace_Customizers() { * @generated */ @Override - public EReference getWorkspace_Service() { + public EReference getWorkspace_NonExclusiveCustomizers() { return (EReference) workspaceEClass.getEStructuralFeatures().get(3); } @@ -973,10 +964,30 @@ public EReference getWorkspace_Service() { * @generated */ @Override - public EReference getWorkspace_SCMRegistry() { + public EReference getWorkspace_Service() { return (EReference) workspaceEClass.getEStructuralFeatures().get(4); } + /** + * + * + * @generated + */ + @Override + public EReference getWorkspace_SCMRegistry() { + return (EReference) workspaceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + @Override + public EReference getWorkspace_ExcludedEPackages() { + return (EReference) workspaceEClass.getEStructuralFeatures().get(6); + } + /** * * @@ -1097,6 +1108,26 @@ public EAttribute getCustomizer_Rank() { return (EAttribute) customizerEClass.getEStructuralFeatures().get(0); } + /** + * + * + * @generated + */ + @Override + public EAttribute getCustomizer_Exclusive() { + return (EAttribute) customizerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getCustomizer_Stage() { + return (EReference) customizerEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -1157,6 +1188,36 @@ public EReference getStageQualifierToCustomizerMapEntry_Value() { return (EReference) stageQualifierToCustomizerMapEntryEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + @Override + public EClass getStageQualifierToWorkersMapEntry() { + return stageQualifierToWorkersMapEntryEClass; + } + + /** + * + * + * @generated + */ + @Override + public EReference getStageQualifierToWorkersMapEntry_Key() { + return (EReference) stageQualifierToWorkersMapEntryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getStageQualifierToWorkersMapEntry_Value() { + return (EReference) stageQualifierToWorkersMapEntryEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -1173,7 +1234,7 @@ public EClass getModels() { * @generated */ @Override - public EReference getModels_Dynamic() { + public EReference getModels_DynamicEPackage() { return (EReference) modelsEClass.getEStructuralFeatures().get(0); } @@ -1183,7 +1244,7 @@ public EReference getModels_Dynamic() { * @generated */ @Override - public EReference getModels_Generated() { + public EReference getModels_GeneratedEPackage() { return (EReference) modelsEClass.getEStructuralFeatures().get(1); } @@ -1193,7 +1254,7 @@ public EReference getModels_Generated() { * @generated */ @Override - public EAttribute getModels_GeneratedEdit() { + public EAttribute getModels_GeneratedEditPlugin() { return (EAttribute) modelsEClass.getEStructuralFeatures().get(2); } @@ -1203,7 +1264,7 @@ public EAttribute getModels_GeneratedEdit() { * @generated */ @Override - public EAttribute getModels_GeneratedEditor() { + public EAttribute getModels_GeneratedEditorPlugin() { return (EAttribute) modelsEClass.getEStructuralFeatures().get(3); } @@ -1257,16 +1318,6 @@ public EAttribute getProject_ProjectName() { return (EAttribute) projectEClass.getEStructuralFeatures().get(1); } - /** - * - * - * @generated - */ - @Override - public EAttribute getProject_Children() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(2); - } - /** * * @@ -1274,7 +1325,7 @@ public EAttribute getProject_Children() { */ @Override public EAttribute getProject_Dirty() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(3); + return (EAttribute) projectEClass.getEStructuralFeatures().get(2); } /** @@ -1284,7 +1335,7 @@ public EAttribute getProject_Dirty() { */ @Override public EReference getProject_Workspace() { - return (EReference) projectEClass.getEStructuralFeatures().get(4); + return (EReference) projectEClass.getEStructuralFeatures().get(3); } /** @@ -1294,7 +1345,7 @@ public EReference getProject_Workspace() { */ @Override public EAttribute getProject_ResourcePath() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(5); + return (EAttribute) projectEClass.getEStructuralFeatures().get(4); } /** @@ -1304,7 +1355,7 @@ public EAttribute getProject_ResourcePath() { */ @Override public EAttribute getProject_NeedCompletionNotification() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(6); + return (EAttribute) projectEClass.getEStructuralFeatures().get(5); } /** @@ -1314,7 +1365,7 @@ public EAttribute getProject_NeedCompletionNotification() { */ @Override public EReference getProject_CompletionNotificationAdapter() { - return (EReference) projectEClass.getEStructuralFeatures().get(7); + return (EReference) projectEClass.getEStructuralFeatures().get(6); } /** @@ -1324,7 +1375,7 @@ public EReference getProject_CompletionNotificationAdapter() { */ @Override public EReference getProject_ResourceReloadListener() { - return (EReference) projectEClass.getEStructuralFeatures().get(8); + return (EReference) projectEClass.getEStructuralFeatures().get(7); } /** @@ -1334,7 +1385,7 @@ public EReference getProject_ResourceReloadListener() { */ @Override public EAttribute getProject_SavingResource() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(9); + return (EAttribute) projectEClass.getEStructuralFeatures().get(8); } /** @@ -1344,7 +1395,7 @@ public EAttribute getProject_SavingResource() { */ @Override public EReference getProject_Revision() { - return (EReference) projectEClass.getEStructuralFeatures().get(10); + return (EReference) projectEClass.getEStructuralFeatures().get(9); } /** @@ -1354,7 +1405,7 @@ public EReference getProject_Revision() { */ @Override public EReference getProject_Revisions() { - return (EReference) projectEClass.getEStructuralFeatures().get(11); + return (EReference) projectEClass.getEStructuralFeatures().get(10); } /** @@ -1364,7 +1415,7 @@ public EReference getProject_Revisions() { */ @Override public EAttribute getProject_ProjectVersion() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(12); + return (EAttribute) projectEClass.getEStructuralFeatures().get(11); } /** @@ -1374,7 +1425,7 @@ public EAttribute getProject_ProjectVersion() { */ @Override public EReference getProject_SelectRevealHandler() { - return (EReference) projectEClass.getEStructuralFeatures().get(13); + return (EReference) projectEClass.getEStructuralFeatures().get(12); } /** @@ -1384,7 +1435,7 @@ public EReference getProject_SelectRevealHandler() { */ @Override public EAttribute getProject_Version() { - return (EAttribute) projectEClass.getEStructuralFeatures().get(14); + return (EAttribute) projectEClass.getEStructuralFeatures().get(13); } /** @@ -1394,7 +1445,7 @@ public EAttribute getProject_Version() { */ @Override public EReference getProject_State() { - return (EReference) projectEClass.getEStructuralFeatures().get(15); + return (EReference) projectEClass.getEStructuralFeatures().get(14); } /** @@ -1404,7 +1455,17 @@ public EReference getProject_State() { */ @Override public EReference getProject_ModelResourceAdapter() { - return (EReference) projectEClass.getEStructuralFeatures().get(16); + return (EReference) projectEClass.getEStructuralFeatures().get(15); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getProject_ClassLoader() { + return (EAttribute) projectEClass.getEStructuralFeatures().get(16); } /** @@ -1687,6 +1748,16 @@ public EEnum getStage() { return stageEEnum; } + /** + * + * + * @generated + */ + @Override + public EDataType getClassLoader() { + return classLoaderEDataType; + } + /** * * @@ -1839,22 +1910,19 @@ public void createPackageContents() { createEAttribute(stateEClass, STATE__EDIT_DEPLOYABLE_UNIT_NAME); createEAttribute(stateEClass, STATE__EDITOR_DEPLOYABLE_UNIT_NAME); createEAttribute(stateEClass, STATE__JOB_FAMILY); - createEReference(stateEClass, STATE__RESOURCE); - createEAttribute(stateEClass, STATE__COMMIT_IDS); createEAttribute(stateEClass, STATE__COMMIT_ID); createEReference(stateEClass, STATE__STATE_CUSTOMIZERS); + createEReference(stateEClass, STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS); createEAttribute(stateEClass, STATE__PROJECT_NAME); createEAttribute(stateEClass, STATE__MAKING); createEAttribute(stateEClass, STATE__EDIT); createEAttribute(stateEClass, STATE__EDITOR); createEReference(stateEClass, STATE__STRATEGY); + createEAttribute(stateEClass, STATE__BASE_PACKAGE); strategyEClass = createEClass(STRATEGY); - createEReference(strategyEClass, STRATEGY__GENERATORS); - createEReference(strategyEClass, STRATEGY__EXPORTERS); - createEReference(strategyEClass, STRATEGY__INSTALLERS); - createEReference(strategyEClass, STRATEGY__LOADERS); createEReference(strategyEClass, STRATEGY__STATE); + createEReference(strategyEClass, STRATEGY__WORKERS); itemEClass = createEClass(ITEM); createEAttribute(itemEClass, ITEM__MODEL_NAME); @@ -1865,6 +1933,7 @@ public void createPackageContents() { createEReference(itemEClass, ITEM__PARENT); createEAttribute(itemEClass, ITEM__LOCALE); createEReference(itemEClass, ITEM__PROJECT); + createEReference(itemEClass, ITEM__RESOURCE); adapterEClass = createEClass(ADAPTER); @@ -1872,8 +1941,10 @@ public void createPackageContents() { createEReference(workspaceEClass, WORKSPACE__PROJECTS); createEAttribute(workspaceEClass, WORKSPACE__RESOURCE_SET); createEReference(workspaceEClass, WORKSPACE__CUSTOMIZERS); + createEReference(workspaceEClass, WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS); createEReference(workspaceEClass, WORKSPACE__SERVICE); createEReference(workspaceEClass, WORKSPACE__SCM_REGISTRY); + createEReference(workspaceEClass, WORKSPACE__EXCLUDED_EPACKAGES); longToStateMapEntryEClass = createEClass(LONG_TO_STATE_MAP_ENTRY); createEAttribute(longToStateMapEntryEClass, LONG_TO_STATE_MAP_ENTRY__KEY); @@ -1893,6 +1964,8 @@ public void createPackageContents() { customizerEClass = createEClass(CUSTOMIZER); createEAttribute(customizerEClass, CUSTOMIZER__RANK); + createEAttribute(customizerEClass, CUSTOMIZER__EXCLUSIVE); + createEReference(customizerEClass, CUSTOMIZER__STAGE); stageQualifierEClass = createEClass(STAGE_QUALIFIER); createEAttribute(stageQualifierEClass, STAGE_QUALIFIER__STAGE); @@ -1902,11 +1975,15 @@ public void createPackageContents() { createEReference(stageQualifierToCustomizerMapEntryEClass, STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY__KEY); createEReference(stageQualifierToCustomizerMapEntryEClass, STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY__VALUE); + stageQualifierToWorkersMapEntryEClass = createEClass(STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY); + createEReference(stageQualifierToWorkersMapEntryEClass, STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY); + createEReference(stageQualifierToWorkersMapEntryEClass, STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE); + modelsEClass = createEClass(MODELS); - createEReference(modelsEClass, MODELS__DYNAMIC); - createEReference(modelsEClass, MODELS__GENERATED); - createEAttribute(modelsEClass, MODELS__GENERATED_EDIT); - createEAttribute(modelsEClass, MODELS__GENERATED_EDITOR); + createEReference(modelsEClass, MODELS__DYNAMIC_EPACKAGE); + createEReference(modelsEClass, MODELS__GENERATED_EPACKAGE); + createEAttribute(modelsEClass, MODELS__GENERATED_EDIT_PLUGIN); + createEAttribute(modelsEClass, MODELS__GENERATED_EDITOR_PLUGIN); createEReference(modelsEClass, MODELS__PARENT); scmOperatorEClass = createEClass(SCM_OPERATOR); @@ -1918,7 +1995,6 @@ public void createPackageContents() { projectEClass = createEClass(PROJECT); createEAttribute(projectEClass, PROJECT__NAME); createEAttribute(projectEClass, PROJECT__PROJECT_NAME); - createEAttribute(projectEClass, PROJECT__CHILDREN); createEAttribute(projectEClass, PROJECT__DIRTY); createEReference(projectEClass, PROJECT__WORKSPACE); createEAttribute(projectEClass, PROJECT__RESOURCE_PATH); @@ -1933,6 +2009,7 @@ public void createPackageContents() { createEAttribute(projectEClass, PROJECT__VERSION); createEReference(projectEClass, PROJECT__STATE); createEReference(projectEClass, PROJECT__MODEL_RESOURCE_ADAPTER); + createEAttribute(projectEClass, PROJECT__CLASS_LOADER); resourceEClass = createEClass(RESOURCE); @@ -1971,6 +2048,7 @@ public void createPackageContents() { stageEEnum = createEEnum(STAGE); // Create data types + classLoaderEDataType = createEDataType(CLASS_LOADER); propertiesEDataType = createEDataType(PROPERTIES); iProgressMonitorEDataType = createEDataType(IPROGRESS_MONITOR); osGiVersionEDataType = createEDataType(OS_GI_VERSION); @@ -2076,11 +2154,11 @@ public void initializePackageContents() { op = addEOperation(revisionEClass, null, "checkout", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getELong(), "timestamp", 0, 1, IS_UNIQUE, IS_ORDERED); - op = addEOperation(revisionEClass, null, "checkout", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getEString(), "commitId", 0, 1, IS_UNIQUE, IS_ORDERED); - addEOperation(revisionEClass, this.getState(), "newState", 0, 1, IS_UNIQUE, IS_ORDERED); + op = addEOperation(revisionEClass, this.getState(), "newState", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getELong(), "timestamp", 0, 1, IS_UNIQUE, IS_ORDERED); + op = addEOperation(revisionEClass, null, "delete", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); addEException(op, this.getCoreException()); @@ -2120,16 +2198,14 @@ public void initializePackageContents() { IS_DERIVED, IS_ORDERED); initEAttribute(getState_JobFamily(), ecorePackage.getEString(), "jobFamily", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getState_Resource(), this.getResource(), null, "resource", null, 0, 1, State.class, IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEAttribute(getState_CommitIds(), ecorePackage.getEString(), "commitIds", null, 0, -1, State.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getState_CommitId(), ecorePackage.getEString(), "commitId", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getState_StateCustomizers(), this.getStageQualifierToCustomizerMapEntry(), null, "stateCustomizers", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getState_NonExclusiveStateCustomizers(), this.getStageQualifierToCustomizerMapEntry(), null, + "nonExclusiveStateCustomizers", null, 0, -1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getState_ProjectName(), ecorePackage.getEString(), "projectName", null, 0, 1, State.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEAttribute(getState_Making(), ecorePackage.getEBoolean(), "making", "false", 0, 1, State.class, @@ -2141,6 +2217,8 @@ public void initializePackageContents() { initEReference(getState_Strategy(), this.getStrategy(), this.getStrategy_State(), "strategy", null, 0, 1, State.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getState_BasePackage(), ecorePackage.getEString(), "basePackage", null, 0, 1, State.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(stateEClass, null, "setProjectVersion", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2171,29 +2249,12 @@ public void initializePackageContents() { initEClass(strategyEClass, Strategy.class, "Strategy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getStrategy_Generators(), this.getWorker(), null, "generators", null, 0, -1, Strategy.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getStrategy_Exporters(), this.getWorker(), null, "exporters", null, 0, -1, Strategy.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getStrategy_Installers(), this.getWorker(), null, "installers", null, 0, -1, Strategy.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getStrategy_Loaders(), this.getWorker(), null, "loaders", null, 0, -1, Strategy.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getStrategy_State(), this.getState(), this.getState_Strategy(), "state", null, 0, 1, Strategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - addEOperation(strategyEClass, this.getWorker(), "createGenerator", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(strategyEClass, this.getWorker(), "createExporter", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(strategyEClass, this.getWorker(), "createInstaller", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(strategyEClass, this.getWorker(), "createModelLoader", 0, 1, IS_UNIQUE, IS_ORDERED); + initEReference(getStrategy_Workers(), this.getStageQualifierToWorkersMapEntry(), null, "workers", null, 0, -1, + Strategy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); addEOperation(strategyEClass, this.getWorker(), "getReturnWorker", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2204,6 +2265,10 @@ public void initializePackageContents() { op = addEOperation(strategyEClass, null, "configuteBuildJobs", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); + op = addEOperation(strategyEClass, this.getWorker(), "get", 0, -1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getStage(), "stage", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "step", 0, 1, IS_UNIQUE, IS_ORDERED); + initEClass(itemEClass, Item.class, "Item", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getItem_ModelName(), ecorePackage.getEString(), "modelName", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -2225,6 +2290,9 @@ public void initializePackageContents() { initEReference(getItem_Project(), this.getProject(), null, "project", null, 0, 1, Item.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEReference(getItem_Resource(), this.getResource(), null, "resource", null, 0, 1, Item.class, IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); op = addEOperation(itemEClass, null, "load", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEBoolean(), "create", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2239,12 +2307,15 @@ public void initializePackageContents() { addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); addEException(op, this.getCoreException()); - op = addEOperation(itemEClass, ecorePackage.getEString(), "initialize", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getEBoolean(), "commit", 0, 1, IS_UNIQUE, IS_ORDERED); + addEOperation(itemEClass, ecorePackage.getEString(), "initialize", 0, 1, IS_UNIQUE, IS_ORDERED); op = addEOperation(itemEClass, null, "copyModel", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getItem(), "from", 0, 1, IS_UNIQUE, IS_ORDERED); + op = addEOperation(itemEClass, null, "renameProject", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "oldProjectName", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "newProjectName", 0, 1, IS_UNIQUE, IS_ORDERED); + initEClass(adapterEClass, Adapter.class, "Adapter", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); initEClass(workspaceEClass, Workspace.class, "Workspace", !IS_ABSTRACT, !IS_INTERFACE, @@ -2258,6 +2329,9 @@ public void initializePackageContents() { initEReference(getWorkspace_Customizers(), this.getStageQualifierToCustomizerMapEntry(), null, "customizers", null, 0, -1, Workspace.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getWorkspace_NonExclusiveCustomizers(), this.getStageQualifierToCustomizerMapEntry(), null, + "nonExclusiveCustomizers", null, 0, -1, Workspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getWorkspace_Service(), this.getClassMakerService(), this.getClassMakerService_Workspace(), "service", null, 0, 1, Workspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -2267,6 +2341,9 @@ public void initializePackageContents() { initEReference(getWorkspace_SCMRegistry(), g1, null, "SCMRegistry", null, 0, 1, Workspace.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getWorkspace_ExcludedEPackages(), ecorePackage.getEPackage(), null, "excludedEPackages", null, 0, + -1, Workspace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); addEOperation(workspaceEClass, null, "initialize", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2360,10 +2437,24 @@ public void initializePackageContents() { IS_GENERATED_INSTANCE_CLASS); initEAttribute(getCustomizer_Rank(), ecorePackage.getEInt(), "rank", null, 0, 1, Customizer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCustomizer_Exclusive(), ecorePackage.getEBoolean(), "exclusive", "true", 0, 1, + Customizer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCustomizer_Stage(), this.getStageQualifier(), null, "stage", null, 0, 1, Customizer.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(customizerEClass, ecorePackage.getEJavaObject(), "customize", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEJavaObject(), "args", 0, -1, IS_UNIQUE, IS_ORDERED); + op = addEOperation(customizerEClass, ecorePackage.getEBoolean(), "isNextAfter", 0, 1, IS_UNIQUE, IS_ORDERED); + g1 = createEGenericType(ecorePackage.getEJavaClass()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + EGenericType g3 = createEGenericType(this.getCustomizer()); + g2.setEUpperBound(g3); + addEParameter(op, g1, "customizerClass", 0, 1, IS_UNIQUE, IS_ORDERED); + initEClass(stageQualifierEClass, StageQualifier.class, "StageQualifier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getStageQualifier_Stage(), this.getStage(), "stage", null, 0, 1, StageQualifier.class, @@ -2380,17 +2471,28 @@ public void initializePackageContents() { Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(stageQualifierToWorkersMapEntryEClass, Map.Entry.class, "StageQualifierToWorkersMapEntry", + !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); + initEReference(getStageQualifierToWorkersMapEntry_Key(), this.getStageQualifier(), null, "key", null, 0, 1, + Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getStageQualifierToWorkersMapEntry_Value(), this.getWorker(), null, "value", null, 0, -1, + Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(modelsEClass, Models.class, "Models", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getModels_Dynamic(), ecorePackage.getEObject(), null, "dynamic", null, 0, 1, Models.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getModels_Generated(), ecorePackage.getEObject(), null, "generated", null, 0, 1, Models.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getModels_GeneratedEdit(), this.getEMFPlugin(), "generatedEdit", null, 0, 1, Models.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getModels_GeneratedEditor(), this.getEMFPlugin(), "generatedEditor", null, 0, 1, Models.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModels_DynamicEPackage(), ecorePackage.getEObject(), null, "dynamicEPackage", null, 0, 1, + Models.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModels_GeneratedEPackage(), ecorePackage.getEObject(), null, "generatedEPackage", null, 0, 1, + Models.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getModels_GeneratedEditPlugin(), this.getEMFPlugin(), "generatedEditPlugin", null, 0, 1, + Models.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getModels_GeneratedEditorPlugin(), this.getEMFPlugin(), "generatedEditorPlugin", null, 0, 1, + Models.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); initEReference(getModels_Parent(), this.getItem(), this.getItem_DomainModel(), "parent", null, 0, 1, Models.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -2494,8 +2596,6 @@ public void initializePackageContents() { !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getProject_ProjectName(), ecorePackage.getEString(), "projectName", "", 0, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProject_Children(), ecorePackage.getEJavaObject(), "children", null, 0, -1, Project.class, - IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEAttribute(getProject_Dirty(), ecorePackage.getEBoolean(), "dirty", null, 0, 1, Project.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getProject_Workspace(), this.getWorkspace(), this.getWorkspace_Projects(), "workspace", null, 0, @@ -2535,6 +2635,8 @@ public void initializePackageContents() { initEReference(getProject_ModelResourceAdapter(), this.getResourceAdapter(), this.getResourceAdapter_Project(), "modelResourceAdapter", null, 0, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProject_ClassLoader(), this.getClassLoader(), "classLoader", null, 0, 1, Project.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); op = addEOperation(projectEClass, null, "create", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2563,8 +2665,7 @@ public void initializePackageContents() { addEParameter(op, this.getIProgressMonitor(), "monitor", 0, 1, IS_UNIQUE, IS_ORDERED); addEException(op, this.getCoreException()); - op = addEOperation(projectEClass, ecorePackage.getEString(), "initialize", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getEBoolean(), "commit", 0, 1, IS_UNIQUE, IS_ORDERED); + addEOperation(projectEClass, ecorePackage.getEString(), "initialize", 0, 1, IS_UNIQUE, IS_ORDERED); op = addEOperation(projectEClass, null, "addCompletionListener", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getCompletionListener(), "resultListener", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2622,16 +2723,6 @@ public void initializePackageContents() { addEParameter(op, ecorePackage.getELong(), "timestamp", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEString(), "commitId", 0, 1, IS_UNIQUE, IS_ORDERED); - op = addEOperation(projectEClass, null, "checkout", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getELong(), "timestamp", 0, 1, IS_UNIQUE, IS_ORDERED); - - op = addEOperation(projectEClass, null, "checkout", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getELong(), "timestamp", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getEString(), "commitId", 0, 1, IS_UNIQUE, IS_ORDERED); - - op = addEOperation(projectEClass, null, "checkout", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, ecorePackage.getEString(), "commitId", 0, 1, IS_UNIQUE, IS_ORDERED); - op = addEOperation(projectEClass, null, "initAdapters", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getRevision(), "revision", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -2732,7 +2823,7 @@ public void initializePackageContents() { g1 = createEGenericType(this.getFuture()); g2 = createEGenericType(); g1.getETypeArguments().add(g2); - EGenericType g3 = createEGenericType(ecorePackage.getEObject()); + g3 = createEGenericType(ecorePackage.getEObject()); g2.setEUpperBound(g3); initEOperation(op, g1); @@ -2925,6 +3016,8 @@ public void initializePackageContents() { addEEnumLiteral(stageEEnum, Stage.LOADED); // Initialize data types + initEDataType(classLoaderEDataType, ClassLoader.class, "ClassLoader", IS_SERIALIZABLE, + !IS_GENERATED_INSTANCE_CLASS); initEDataType(propertiesEDataType, Properties.class, "Properties", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(iProgressMonitorEDataType, IProgressMonitor.class, "IProgressMonitor", IS_SERIALIZABLE, diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerServiceImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerServiceImpl.java index ff946b2f..72046720 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerServiceImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ClassMakerServiceImpl.java @@ -18,6 +18,7 @@ import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.net.URI; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -27,6 +28,9 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.Semaphore; +import javax.management.Notification; +import javax.tools.Diagnostic; + import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; @@ -34,13 +38,10 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.BasicDiagnostic; -import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EOperation; @@ -56,6 +57,7 @@ import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; import org.eclipse.m2m.qvt.oml.ModelExtent; import org.eclipse.m2m.qvt.oml.TransformationExecutor; +import org.eclipse.osgi.util.NLS; import org.enterprisedomain.classmaker.Blueprint; import org.enterprisedomain.classmaker.ClassMakerFactory; import org.enterprisedomain.classmaker.ClassMakerPackage; @@ -69,7 +71,6 @@ import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.util.ModelUtil; import org.enterprisedomain.classmaker.util.ResourceUtils; -import org.osgi.framework.Version; /** * An implementation of the model object @@ -269,7 +270,7 @@ public void completed(Project result) throws Exception { wait.acquire(); } catch (InterruptedException e) { } - return contrib.getDomainModel().getGenerated(); + return contrib.getDomainModel().getGeneratedEPackage(); } catch (CoreException e) { ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); throw e; @@ -364,7 +365,7 @@ public EObject replace(Blueprint source, Blueprint target, Version version, IPro if (contribution == null) { contribution = getWorkspace().getContribution(source.getDynamicModel(), true); if (contribution != null) { - EObject existingModel = contribution.getDomainModel().getDynamic(); + EObject existingModel = contribution.getDomainModel().getDynamicEPackage(); if (ModelUtil.eObjectsAreEqual(existingModel, source.getDynamicModel(), false)) { Revision revision = null; if (version.compareTo(contribution.getVersion()) < 0) { @@ -374,13 +375,13 @@ public EObject replace(Blueprint source, Blueprint target, Version version, IPro contribution.checkout(revision.getVersion()); } else revision = contribution.createRevision(monitor); - revision.getDomainModel().setDynamic(EcoreUtil.copy(target.getDynamicModel())); + revision.getDomainModel().setDynamicEPackage(EcoreUtil.copy(target.getDynamicModel())); } } else { return null; } } else { - EObject existingModel = contribution.getDomainModel().getDynamic(); + EObject existingModel = contribution.getDomainModel().getDynamicEPackage(); if (ModelUtil.eObjectsAreEqual(existingModel, source.getDynamicModel(), true)) { Revision revision = contribution.getRevision(); if (version.compareTo(contribution.getVersion()) > 0) { @@ -388,7 +389,7 @@ public EObject replace(Blueprint source, Blueprint target, Version version, IPro State state = revision.getState(); state.copyModel(contribution.getState()); revision.create(monitor); - String commitId = state.initialize(true); + String commitId = state.initialize(); contribution.checkout(revision.getVersion(), state.getTimestamp(), commitId); } else if (version.compareTo(contribution.getVersion()) < 0) { if (!contribution.getRevisions().containsKey(version)) @@ -396,30 +397,19 @@ public EObject replace(Blueprint source, Blueprint target, Version version, IPro revision = contribution.getRevisions().get(version); contribution.checkout(revision.getVersion()); } - revision.getDomainModel().setDynamic(EcoreUtil.copy(target.getDynamicModel())); + revision.getDomainModel().setDynamicEPackage(EcoreUtil.copy(target.getDynamicModel())); } else { return null; } } contribution.getDependencies().addAll(target.getDependencies()); - final Semaphore wait = new Semaphore(0); - CompletionListener waitListener = new CompletionListenerImpl() { - - @Override - public void completed(Project result) throws Exception { - wait.release(); - } - - }; - target.getCompletionListeners().add(waitListener); + final Object lock = new Object(); for (CompletionListener listener : target.getCompletionListeners()) contribution.addCompletionListener(listener); - contribution.make(monitor); - try { - wait.acquire(); - } catch (InterruptedException e) { + synchronized (lock) { + contribution.make(monitor); } - return contribution.getDomainModel().getGenerated(); + return contribution.getDomainModel().getGeneratedEPackage(); } /** @@ -668,6 +658,14 @@ public Blueprint createBlueprint() { * @generated NOT */ public String computeProjectName(String packageName) { + if (packageName.endsWith(".edit")) + packageName = packageName.substring(0, packageName.lastIndexOf(".edit")); + if (packageName.isEmpty()) + packageName = ".edit"; + if (packageName.endsWith(".editor")) + packageName = packageName.substring(0, packageName.lastIndexOf(".editor")); + if (packageName.isEmpty()) + packageName = ".editor"; return CodeGenUtil.safeName(packageName.toLowerCase()); } @@ -686,6 +684,7 @@ public T copy(T original) { * @generated NOT */ public void initialize() { + ClassMakerPlugin.print("Initializing service"); initializing = true; getWorkspace().setService(this); ClassMakerService.Stages.contributeStages(); @@ -694,12 +693,16 @@ public void initialize() { try { Resource workspaceResource = WorkspaceImpl.RESOURCE_SET_EDEFAULT.getResource(uri, true); try { + ClassMakerPlugin.print("Loading workspace resource"); workspaceResource.load(Collections.emptyMap()); if (!workspaceResource.getContents().isEmpty()) { setWorkspace(EcoreUtil.copy((Workspace) workspaceResource.getContents().get(0))); for (Project project : getWorkspace().getProjects()) { - if (project.eIsSet(ClassMakerPackage.Literals.PROJECT__STATE)) + if (project.eIsSet(ClassMakerPackage.Literals.PROJECT__STATE)) { + ClassMakerPlugin.print(NLS.bind("Project {0} state {1} load", project.getName(), + project.getState().getTimestamp())); project.getState().load(false, true); + } } } else getWorkspace().initialize(); diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CompletionNotificationAdapterImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CompletionNotificationAdapterImpl.java index f955e101..e3db7164 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CompletionNotificationAdapterImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CompletionNotificationAdapterImpl.java @@ -15,8 +15,9 @@ */ package org.enterprisedomain.classmaker.impl; +import javax.management.Notification; + import org.eclipse.core.runtime.IStatus; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.ecore.EClass; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ContributionImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ContributionImpl.java index 605786dd..fb7de969 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ContributionImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ContributionImpl.java @@ -15,14 +15,15 @@ */ package org.enterprisedomain.classmaker.impl; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Locale; +import javax.management.Notification; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; @@ -32,8 +33,6 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; -import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; @@ -41,19 +40,10 @@ import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EPackage.Registry; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.ListBranchCommand; -import org.eclipse.jgit.api.ReflogCommand; import org.eclipse.jgit.api.errors.JGitInternalException; -import org.eclipse.jgit.errors.LockFailedException; -import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.lib.ReflogEntry; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.CompletionListener; import org.enterprisedomain.classmaker.Contribution; @@ -62,14 +52,12 @@ import org.enterprisedomain.classmaker.Models; import org.enterprisedomain.classmaker.Project; import org.enterprisedomain.classmaker.Revision; -import org.enterprisedomain.classmaker.SCMOperator; import org.enterprisedomain.classmaker.Stage; import org.enterprisedomain.classmaker.StageQualifier; import org.enterprisedomain.classmaker.State; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.util.ListUtil; import org.enterprisedomain.classmaker.util.ResourceUtils; -import org.osgi.framework.Version; /** * An implementation of the model object ' @@ -102,11 +90,6 @@ public class ContributionImpl extends ProjectImpl implements Contribution { @Override public void completed(Project result) throws Exception { addResourceChangeListener(getResourceReloadListener()); - // if (getState().getPhase().equals(Stage.LOADED)) { - // EPackage ePackage = (EPackage) getState().getDomainModel().getGenerated(); - // if (ePackage != null) - // Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); - // } } }; @@ -185,31 +168,18 @@ public State basicGetState() { public Version getLatestVersion() { if (!isRevisionSet() || getRevisions().isEmpty()) return Version.emptyVersion; - List sorted = new ArrayList(); + List sorted = new LinkedList(); sorted.addAll((Collection) getRevisions().keySet()); Collections.sort(sorted, new Comparator() { @Override public int compare(org.osgi.framework.Version o1, org.osgi.framework.Version o2) { - return o1.getMajor() - o2.getMajor() + o1.getMinor() - o2.getMinor() + o1.getMicro() - o2.getMicro(); + return o1.compareTo(o2); } }); return ListUtil.getLast(sorted); } - /** - * - * - * @generated NOT - */ - public void copyModel(Item from) { - setModelName(from.getModelName()); - setLanguage(from.getLanguage()); - EObject eObject = from.getDomainModel().getDynamic(); - if (eObject != null) - getDomainModel().setDynamic(EcoreUtil.copy(eObject)); - } - /** * * @@ -286,94 +256,6 @@ public Item basicGetParent() { public void setParent(Item newParent) { } - /** - * - * - * @generated NOT - */ - public String initialize(boolean commit) { - @SuppressWarnings("unchecked") - SCMOperator operator = (SCMOperator) getWorkspace().getSCMRegistry().get(getProjectName()); - setName(getModelName() != null ? getModelName() : CodeGenUtil.capName(getProjectName())); - try { - Git git = operator.getRepositorySCM(); - // if (git == null) - // return ""; - String currentBranch = git.getRepository().getBranch(); - - ListBranchCommand listBranches = git.branchList(); - List branches = listBranches.call(); - Iterator it = branches.iterator(); - Ref branch = null; - long timestamp = -1; - String commitId = ""; - do { - Version version = null; - if (it.hasNext()) { - branch = it.next(); - String[] name = branch.getName().split("/"); //$NON-NLS-1$ - try { - version = operator.decodeVersion(name[name.length - 1]); - ReflogCommand reflog = git.reflog(); - reflog.setRef(branch.getName().toString()); - Collection refs = reflog.call(); - for (ReflogEntry ref : refs) - if (ref.getNewId().equals(branch.getObjectId())) { - timestamp = operator.decodeTimestamp(ref.getComment()); - if (timestamp == -1) - timestamp = operator.decodeTimestamp(version.getQualifier()); - } - } catch (IllegalArgumentException e) { - continue; - } - } - if (version != null && !getRevisions().containsKey(version)) { - Revision newRevision = newBareRevision(version); - newRevision.setTimestamp(timestamp); - newRevision.setProject(this); - doNewRevision(newRevision); - commitId = newRevision.initialize(commit); - } - } while (it.hasNext()); - if (!getRevisions().isEmpty() && getVersion().equals(Version.emptyVersion)) - setVersion(ListUtil.getLast(getRevisions()).getKey()); - else if (!getVersion().equals(Version.emptyVersion)) { - if (isStateSet()) { - try { - getState().add("."); - getState().commit(); - } catch (JGitInternalException e) { - } - } - checkout(getVersion(), timestamp); - } - if (currentBranch.equals(SCMOperator.MASTER_BRANCH)) - checkout(getVersion(), timestamp); - if (!getWorkspace().getResourceSet().eAdapters().contains(resourceChangeAdapter)) - getWorkspace().getResourceSet().eAdapters().add(resourceChangeAdapter); - addResourceChangeListener(getResourceReloadListener()); - if (getPhase().equals(Stage.MODELED)) { - EPackage ePackage = (EPackage) getDomainModel().getDynamic(); - if (ePackage != null) - Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); - } else if (getPhase().equals(Stage.LOADED)) { - EPackage ePackage = (EPackage) getDomainModel().getGenerated(); - if (ePackage != null) - Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); - } - return commitId; - } catch (Exception e) { - ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); - return null; - } finally { - try { - operator.ungetRepositorySCM(); - } catch (Exception e) { - ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); - } - } - } - @Override public void create(IProgressMonitor monitor) throws CoreException { super.create(monitor); @@ -403,27 +285,18 @@ public String make(Revision revision, IProgressMonitor monitor) throws CoreExcep @Override public String make(IProgressMonitor monitor) throws CoreException { removeResourceChangeListener(getResourceReloadListener()); - String result = // ""; -// try { -// result = - make(getRevision(), monitor); -// } catch (CoreException e) { -// if (e.getCause() instanceof InvocationTargetException) { -// InvocationTargetException ex = (InvocationTargetException) e.getCause(); -// if (ex.getCause() instanceof Error) { -// ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.CLEAN_BUILD, monitor); -// result = make(getRevision(), monitor); -// } -// } else -// throw e; -// } + String result = make(getRevision(), monitor); setDirty(false); return result; } @Override public void doNewRevision(Revision newRevision) { - State newState = newRevision.newState(); + State newState = null; + if (newRevision.eIsSet(ClassMakerPackage.Literals.REVISION__TIMESTAMP)) + newState = newRevision.newState(newRevision.getTimestamp()); + else + newState = newRevision.newState(); if (isStateSet()) newState.copyModel(getState()); initAdapters(newRevision); @@ -558,7 +431,7 @@ public void delete(IProgressMonitor monitor) throws CoreException { public void delete(EList objects) { if (!isStateSet()) return; - boolean removed = ((Resource) getChildren().get(0)).getContents().removeAll(objects); + boolean removed = getState().getResource().getContents().removeAll(objects); if (removed) return; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomClassLoader.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomClassLoader.java new file mode 100644 index 00000000..f2c71009 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomClassLoader.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright (c) 2015, 2018 Willink Transformations and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * E.D.Willink - initial API and implementation + *******************************************************************************/ +package org.enterprisedomain.classmaker.impl; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.osgi.framework.Bundle; + +public class CustomClassLoader extends ClassLoader { + + protected final @NonNull Bundle bundle; + protected final @NonNull List<@NonNull String> qualifiedPackageNames; + protected final @Nullable ClassLoader fallBackClassLoader; + + private final @NonNull Map> hitsAndMisses = new HashMap>(); // Miss signalled by + // ExplicitClassLoader.class + + public CustomClassLoader(@NonNull Bundle bundle, @NonNull String qualifiedPackageName) { + this(bundle, qualifiedPackageName, null); + } + + public CustomClassLoader(@NonNull Bundle bundle, @NonNull String qualifiedPackageName, + @Nullable ClassLoader fallBackClassLoader) { + this(bundle, Collections.singletonList(qualifiedPackageName), fallBackClassLoader); + } + + public CustomClassLoader(@NonNull Bundle bundle, @NonNull List<@NonNull String> qualifiedPackageNames, + @Nullable ClassLoader fallBackClassLoader) { + this.bundle = bundle; + this.qualifiedPackageNames = qualifiedPackageNames; + this.fallBackClassLoader = fallBackClassLoader; + } + + /** + * Re-implement to load any class sharing qualifiedClassNamePrefix from the + * explicitClassPath. Other classes are loaded normally. + */ + @Override + protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { + int index = name.lastIndexOf("."); + String packageName = index >= 0 ? name.substring(0, index) : ""; + if (qualifiedPackageNames.contains(packageName)) { + Class hitOrMiss = hitsAndMisses.get(name); + if (hitOrMiss != null) { + if (hitOrMiss == CustomClassLoader.class) { + throw new ClassNotFoundException("Attempted reload of '" + name + "' failed"); + } else { + return hitOrMiss; + } + } + try { + hitOrMiss = loadExplicitClass(name, resolve); + hitsAndMisses.put(name, hitOrMiss); + return hitOrMiss; + } catch (IOException e) { + hitsAndMisses.put(name, CustomClassLoader.class); + throw new ClassNotFoundException(e.getMessage(), e); + } + } + Class result = bundle.loadClass(name); + if (result != null) + return result; + if (fallBackClassLoader != null) { + return fallBackClassLoader.loadClass(name); + } else { + return super.loadClass(name, resolve); + } + } + + /** + * Load the class whose Java name is qualifiedClassName and whose class file can + * be found below explicitClassPath. This method always loads the class and so + * ignores any previously cached loads. + */ + private @Nullable Class loadExplicitClass(@NonNull String qualifiedClassName, boolean resolve) + throws ClassNotFoundException, IOException { + String filePath = qualifiedClassName.replaceAll("\\.", "/") + ".class"; + URL url = bundle.getResource(filePath);// bundle.getResource(); + if (url == null) + return Class.forName(qualifiedClassName, true, fallBackClassLoader); + InputStream inputStream = FileLocator.toFileURL(url).openStream(); + ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); + try { + int bytes; + byte[] byteArray = new byte[16384]; + while ((bytes = inputStream.read(byteArray)) >= 0) { + byteStream.write(byteArray, 0, bytes); + } + } finally { + try { + inputStream.close(); + } catch (IOException e) { + } + } + byte[] classBytes = byteStream.toByteArray(); + Class theClass = defineClass(qualifiedClassName, classBytes, 0, classBytes.length); + if (theClass == null) { + return null; + } + Package thePackage = theClass.getPackage(); + if (thePackage == null) { + String packageName = qualifiedClassName.replaceAll("\\.\\w+$", ""); + definePackage(packageName, null, null, null, null, null, null, null); + } + if (resolve) { + resolveClass(theClass); + } + return theClass; + } + + public Version getBundleVersion() { + return bundle.getVersion(); + } + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomizerImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomizerImpl.java index 1374d0b6..672aa472 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomizerImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/CustomizerImpl.java @@ -2,13 +2,16 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.StageQualifier; /** * An implementation of the model object ' @@ -19,6 +22,10 @@ *
      *
    • {@link org.enterprisedomain.classmaker.impl.CustomizerImpl#getRank * Rank}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.CustomizerImpl#isExclusive + * Exclusive}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.CustomizerImpl#getStage + * Stage}
    • *
    * * @generated @@ -43,6 +50,35 @@ public class CustomizerImpl extends EObjectImpl implements Customizer { */ protected int rank = RANK_EDEFAULT; + /** + * The default value of the '{@link #isExclusive() Exclusive}' + * attribute. + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected static final boolean EXCLUSIVE_EDEFAULT = true; + /** + * The cached value of the '{@link #isExclusive() Exclusive}' + * attribute. + * + * @see #isExclusive() + * @generated + * @ordered + */ + protected boolean exclusive = EXCLUSIVE_EDEFAULT; + + /** + * The cached value of the '{@link #getStage() Stage}' reference. + * + * @see #getStage() + * @generated + * @ordered + */ + protected StageQualifier stage; + /** * * @@ -85,15 +121,92 @@ public void setRank(int newRank) { eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.CUSTOMIZER__RANK, oldRank, rank)); } + /** + * + * + * @generated + */ + @Override + public boolean isExclusive() { + return exclusive; + } + + /** + * + * + * @generated + */ + @Override + public void setExclusive(boolean newExclusive) { + boolean oldExclusive = exclusive; + exclusive = newExclusive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.CUSTOMIZER__EXCLUSIVE, oldExclusive, + exclusive)); + } + + /** + * + * + * @generated + */ + @Override + public StageQualifier getStage() { + if (stage != null && stage.eIsProxy()) { + InternalEObject oldStage = (InternalEObject) stage; + stage = (StageQualifier) eResolveProxy(oldStage); + if (stage != oldStage) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ClassMakerPackage.CUSTOMIZER__STAGE, + oldStage, stage)); + } + } + return stage; + } + + /** + * + * + * @generated + */ + public StageQualifier basicGetStage() { + return stage; + } + + /** + * + * + * @generated + */ + @Override + public void setStage(StageQualifier newStage) { + StageQualifier oldStage = stage; + stage = newStage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.CUSTOMIZER__STAGE, oldStage, + stage)); + } + /** * * * @generated NOT */ + @Override public Object customize(EList args) { return null; } + /** + * + * + * @generated NOT + */ + @Override + public boolean isNextAfter(Class customizerClass) { + return false; + } + /** * * @@ -104,6 +217,12 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ClassMakerPackage.CUSTOMIZER__RANK: return getRank(); + case ClassMakerPackage.CUSTOMIZER__EXCLUSIVE: + return isExclusive(); + case ClassMakerPackage.CUSTOMIZER__STAGE: + if (resolve) + return getStage(); + return basicGetStage(); } return super.eGet(featureID, resolve, coreType); } @@ -119,6 +238,12 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.CUSTOMIZER__RANK: setRank((Integer) newValue); return; + case ClassMakerPackage.CUSTOMIZER__EXCLUSIVE: + setExclusive((Boolean) newValue); + return; + case ClassMakerPackage.CUSTOMIZER__STAGE: + setStage((StageQualifier) newValue); + return; } super.eSet(featureID, newValue); } @@ -134,6 +259,12 @@ public void eUnset(int featureID) { case ClassMakerPackage.CUSTOMIZER__RANK: setRank(RANK_EDEFAULT); return; + case ClassMakerPackage.CUSTOMIZER__EXCLUSIVE: + setExclusive(EXCLUSIVE_EDEFAULT); + return; + case ClassMakerPackage.CUSTOMIZER__STAGE: + setStage((StageQualifier) null); + return; } super.eUnset(featureID); } @@ -148,6 +279,10 @@ public boolean eIsSet(int featureID) { switch (featureID) { case ClassMakerPackage.CUSTOMIZER__RANK: return rank != RANK_EDEFAULT; + case ClassMakerPackage.CUSTOMIZER__EXCLUSIVE: + return exclusive != EXCLUSIVE_EDEFAULT; + case ClassMakerPackage.CUSTOMIZER__STAGE: + return stage != null; } return super.eIsSet(featureID); } @@ -165,6 +300,8 @@ public String toString() { StringBuilder result = new StringBuilder(super.toString()); result.append(" (rank: "); result.append(rank); + result.append(", exclusive: "); + result.append(exclusive); result.append(')'); return result.toString(); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ItemImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ItemImpl.java index e98db3c4..bd650920 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ItemImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ItemImpl.java @@ -16,11 +16,17 @@ import java.util.Locale; +import javax.management.Notification; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; @@ -28,6 +34,7 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; import org.enterprisedomain.classmaker.ClassMakerFactory; @@ -38,7 +45,7 @@ import org.enterprisedomain.classmaker.Project; import org.enterprisedomain.classmaker.Stage; import org.enterprisedomain.classmaker.StageQualifier; -import org.osgi.framework.Version; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; /** * An implementation of the model object ' @@ -63,11 +70,25 @@ * Locale} *
  • {@link org.enterprisedomain.classmaker.impl.ItemImpl#getProject * Project}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.ItemImpl#getResource + * Resource}
  • * * * @generated */ public abstract class ItemImpl extends EObjectImpl implements Item { + + public class ModelNamePropagationAdapter extends AdapterImpl { + + @Override + public void notifyChanged(Notification msg) { + if (msg.getFeatureID(Item.class) == ClassMakerPackage.ITEM__MODEL_NAME + && msg.getEventType() == Notification.SET && msg.getNewStringValue() != null) + getParent().setModelName(msg.getNewStringValue()); + } + + } + /** * The default value of the '{@link #getModelName() Model Name}' * attribute. @@ -161,6 +182,16 @@ public abstract class ItemImpl extends EObjectImpl implements Item { protected Locale locale; + /** + * The cached value of the '{@link #getResource() Resource}' reference. + * + * + * @see #getResource() + * @generated + * @ordered + */ + protected Resource resource; + /** * * @@ -169,6 +200,7 @@ public abstract class ItemImpl extends EObjectImpl implements Item { protected ItemImpl() { super(); ClassMakerFactory.eINSTANCE.createModels().setParent(this); + eAdapters().add(new ModelNamePropagationAdapter()); } /** @@ -234,7 +266,7 @@ public Locale getLocale() { if (language == null) { return Locale.getDefault(); } else { - locale = new Locale(language); + locale = Locale.forLanguageTag(getLanguage()); } } return locale; @@ -282,6 +314,30 @@ public void setProject(Project newProject) { throw new UnsupportedOperationException(); } + /** + * + * + * @generated + */ + @Override + public Resource getResource() { + return resource; + } + + /** + * + * + * @generated + */ + @Override + public void setResource(Resource newResource) { + Resource oldResource = resource; + resource = newResource; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.ITEM__RESOURCE, oldResource, + resource)); + } + /** * * @@ -428,7 +484,7 @@ public void build(IProgressMonitor monitor) throws CoreException { * * @generated NOT */ - public String initialize(boolean commit) { + public String initialize() { if (!eIsSet(ClassMakerPackage.Literals.ITEM__PARENT)) return null; copyModel(getParent()); @@ -448,19 +504,45 @@ public void copyModel(Item from) { EMFPlugin eEditObject = null; EMFPlugin eEditorObject = null; if (from.getDomainModel() != null) { - eObject = from.getDomainModel().getDynamic(); - eGenObject = from.getDomainModel().getGenerated(); - eEditObject = from.getDomainModel().getGeneratedEdit(); - eEditorObject = from.getDomainModel().getGeneratedEditor(); + eObject = from.getDomainModel().getDynamicEPackage(); + eGenObject = from.getDomainModel().getGeneratedEPackage(); + eEditObject = from.getDomainModel().getGeneratedEditPlugin(); + eEditorObject = from.getDomainModel().getGeneratedEditorPlugin(); + } + if (eObject != null) { + EObject copy = EcoreUtil.copy(eObject); + getDomainModel().setDynamicEPackage(copy); } - if (eObject != null) - getDomainModel().setDynamic(EcoreUtil.copy(eObject)); if (eGenObject != null) - getDomainModel().setGenerated(EcoreUtil.copy(eGenObject)); + getDomainModel().setGeneratedEPackage(EcoreUtil.copy(eGenObject)); if (eEditObject != null) - getDomainModel().setGeneratedEdit(eEditObject); + getDomainModel().setGeneratedEditPlugin(eEditObject); if (eEditorObject != null) - getDomainModel().setGeneratedEditor(eEditorObject); + getDomainModel().setGeneratedEditorPlugin(eEditorObject); + } + + /** + * + * + * @generated NOT + */ + @Override + public void renameProject(String oldProjectName, String newProjectName) { + if (newProjectName.equals(oldProjectName)) + return; + if (!oldProjectName.isBlank()) + try { + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(oldProjectName); + if (project.exists()) { + IProjectDescription desc = project.getDescription(); + desc.setName(newProjectName); + desc.setLocation(project.getLocation().removeLastSegments(1).append(newProjectName)); + project.move(desc, IResource.FORCE, ClassMakerPlugin.getProgressMonitor()); + } + } catch (CoreException e) { + e.printStackTrace(); + } + } /** @@ -527,6 +609,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { if (resolve) return getProject(); return basicGetProject(); + case ClassMakerPackage.ITEM__RESOURCE: + return getResource(); } return super.eGet(featureID, resolve, coreType); } @@ -563,6 +647,9 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.ITEM__PROJECT: setProject((Project) newValue); return; + case ClassMakerPackage.ITEM__RESOURCE: + setResource((Resource) newValue); + return; } super.eSet(featureID, newValue); } @@ -599,6 +686,9 @@ public void eUnset(int featureID) { case ClassMakerPackage.ITEM__PROJECT: setProject((Project) null); return; + case ClassMakerPackage.ITEM__RESOURCE: + setResource((Resource) null); + return; } super.eUnset(featureID); } @@ -627,6 +717,8 @@ public boolean eIsSet(int featureID) { return LOCALE_EDEFAULT == null ? locale != null : !LOCALE_EDEFAULT.equals(locale); case ClassMakerPackage.ITEM__PROJECT: return basicGetProject() != null; + case ClassMakerPackage.ITEM__RESOURCE: + return resource != null; } return super.eIsSet(featureID); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/LongToStateMapEntryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/LongToStateMapEntryImpl.java index f27ea97a..2cfcf072 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/LongToStateMapEntryImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/LongToStateMapEntryImpl.java @@ -15,7 +15,8 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.BasicEMap; import org.eclipse.emf.common.util.EMap; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ModelsImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ModelsImpl.java index 7ab477e5..7e2bc8a8 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ModelsImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ModelsImpl.java @@ -15,15 +15,14 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.codegen.util.CodeGenUtil; +import javax.management.Notification; + import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; @@ -32,7 +31,6 @@ import org.enterprisedomain.classmaker.Item; import org.enterprisedomain.classmaker.Models; import org.enterprisedomain.classmaker.Stage; -import org.enterprisedomain.classmaker.State; /** * An implementation of the model object @@ -41,14 +39,14 @@ * The following features are implemented: *

    *
      - *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getDynamic - * Dynamic}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGenerated - * Generated}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGeneratedEdit - * Generated Edit}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGeneratedEditor - * Generated Editor}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getDynamicEPackage + * Dynamic EPackage}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGeneratedEPackage + * Generated EPackage}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGeneratedEditPlugin + * Generated Edit Plugin}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getGeneratedEditorPlugin + * Generated Editor Plugin}
    • *
    • {@link org.enterprisedomain.classmaker.impl.ModelsImpl#getParent * Parent}
    • *
    @@ -57,28 +55,94 @@ */ public class ModelsImpl extends EObjectImpl implements Models { + /** + * The cached value of the '{@link #getDynamicEPackage() Dynamic + * EPackage}' containment reference. + * + * @see #getDynamicEPackage() + * @generated + * @ordered + */ + protected EObject dynamicEPackage; + + /** + * The cached value of the '{@link #getGeneratedEPackage() Generated + * EPackage}' reference. + * + * @see #getGeneratedEPackage() + * @generated + * @ordered + */ + protected EObject generatedEPackage; + + /** + * The default value of the '{@link #getGeneratedEditPlugin() Generated Edit + * Plugin}' attribute. + * + * @see #getGeneratedEditPlugin() + * @generated + * @ordered + */ + protected static final EMFPlugin GENERATED_EDIT_PLUGIN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGeneratedEditPlugin() Generated Edit + * Plugin}' attribute. + * + * @see #getGeneratedEditPlugin() + * @generated + * @ordered + */ + protected EMFPlugin generatedEditPlugin = GENERATED_EDIT_PLUGIN_EDEFAULT; + + /** + * The default value of the '{@link #getGeneratedEditorPlugin() Generated + * Editor Plugin}' attribute. + * + * @see #getGeneratedEditorPlugin() + * @generated + * @ordered + */ + protected static final EMFPlugin GENERATED_EDITOR_PLUGIN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGeneratedEditorPlugin() Generated + * Editor Plugin}' attribute. + * + * @see #getGeneratedEditorPlugin() + * @generated + * @ordered + */ + protected EMFPlugin generatedEditorPlugin = GENERATED_EDITOR_PLUGIN_EDEFAULT; + public class EPackageAdapter extends AdapterImpl { @Override public void notifyChanged(Notification msg) { - if (msg.getFeatureID(State.class) == EcorePackage.EPACKAGE__NS_PREFIX) - switch (msg.getEventType()) { - case Notification.SET: - case Notification.ADD: - case Notification.ADD_MANY: - capNsPrefix((EPackage) msg.getNotifier()); - break; - } + // if (msg.getFeatureID(EPackage.class) == Notification.NO_FEATURE_ID + // && msg.getEventType() != Notification.REMOVING_ADAPTER) + //// System.out.println(msg.toString()); + // switch (msg.getEventType()) { + // case Notification.SET: + // case Notification.ADD: + // case Notification.ADD_MANY: + // capNsPrefix((EPackage) msg.getNotifier()); + // break; + // } + if (msg.getEventType() != Notification.REMOVING_ADAPTER) + System.out.println(msg); } - private boolean setting = false; - - private void capNsPrefix(EPackage ePackage) { - if (!setting && ePackage != null) { - setting = true; - ePackage.setNsPrefix(CodeGenUtil.capName(ePackage.getNsPrefix(), ((Item) eContainer()).getLocale())); - setting = false; - } - } + // private boolean setting = false; + // + // private void capNsPrefix(EPackage ePackage) { + // if (!setting && ePackage != null) { + // setting = true; + // ePackage.setNsPrefix(CodeGenUtil.capName(ePackage.getNsPrefix(), ((Item) + // eContainer()).getLocale())); + // setting = false; + // } + // } } public class StageAdapter extends AdapterImpl { @@ -90,14 +154,18 @@ public void notifyChanged(Notification msg) { if (msg.getNotifier() instanceof Models && msg.getEventType() == Notification.SET) { EObject eObject = null; switch (msg.getFeatureID(Models.class)) { - case ClassMakerPackage.MODELS__DYNAMIC: + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: eObject = (EObject) msg.getNewValue(); - if (eObject != null && !getParent().getPhase().equals(Stage.LOADED)) { + if (eObject != null) { getParent().setPhase(Stage.MODELED); } onDynamicEObject((EObject) msg.getOldValue(), eObject); + if (eObject instanceof EPackage) { + String modelName = ((EPackage) eObject).getNsPrefix(); + getParent().setModelName(modelName); + } break; - case ClassMakerPackage.MODELS__GENERATED: + case ClassMakerPackage.MODELS__GENERATED_EPACKAGE: eObject = (EPackage) msg.getNewValue(); if (eObject != null) { getParent().setPhase(Stage.LOADED); @@ -115,66 +183,6 @@ private void onDynamicEObject(EObject oldValue, EObject newValue) { } } - /** - * The cached value of the '{@link #getDynamic() Dynamic}' containment - * reference. - * - * @see #getDynamic() - * @generated - * @ordered - */ - protected EObject dynamic; - - /** - * The cached value of the '{@link #getGenerated() Generated}' - * reference. - * - * @see #getGenerated() - * @generated - * @ordered - */ - protected EObject generated; - - /** - * The default value of the '{@link #getGeneratedEdit() Generated - * Edit}' attribute. - * - * @see #getGeneratedEdit() - * @generated - * @ordered - */ - protected static final EMFPlugin GENERATED_EDIT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getGeneratedEdit() Generated Edit}' - * attribute. - * - * @see #getGeneratedEdit() - * @generated - * @ordered - */ - protected EMFPlugin generatedEdit = GENERATED_EDIT_EDEFAULT; - - /** - * The default value of the '{@link #getGeneratedEditor() Generated - * Editor}' attribute. - * - * @see #getGeneratedEditor() - * @generated - * @ordered - */ - protected static final EMFPlugin GENERATED_EDITOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getGeneratedEditor() Generated - * Editor}' attribute. - * - * @see #getGeneratedEditor() - * @generated - * @ordered - */ - protected EMFPlugin generatedEditor = GENERATED_EDITOR_EDEFAULT; - /** * * @@ -201,8 +209,8 @@ protected EClass eStaticClass() { * @generated */ @Override - public EObject getDynamic() { - return dynamic; + public EObject getDynamicEPackage() { + return dynamicEPackage; } /** @@ -210,12 +218,12 @@ public EObject getDynamic() { * * @generated */ - public NotificationChain basicSetDynamic(EObject newDynamic, NotificationChain msgs) { - EObject oldDynamic = dynamic; - dynamic = newDynamic; + public NotificationChain basicSetDynamicEPackage(EObject newDynamicEPackage, NotificationChain msgs) { + EObject oldDynamicEPackage = dynamicEPackage; + dynamicEPackage = newDynamicEPackage; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - ClassMakerPackage.MODELS__DYNAMIC, oldDynamic, newDynamic); + ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE, oldDynamicEPackage, newDynamicEPackage); if (msgs == null) msgs = notification; else @@ -230,21 +238,21 @@ public NotificationChain basicSetDynamic(EObject newDynamic, NotificationChain m * @generated */ @Override - public void setDynamic(EObject newDynamic) { - if (newDynamic != dynamic) { + public void setDynamicEPackage(EObject newDynamicEPackage) { + if (newDynamicEPackage != dynamicEPackage) { NotificationChain msgs = null; - if (dynamic != null) - msgs = ((InternalEObject) dynamic).eInverseRemove(this, - EOPPOSITE_FEATURE_BASE - ClassMakerPackage.MODELS__DYNAMIC, null, msgs); - if (newDynamic != null) - msgs = ((InternalEObject) newDynamic).eInverseAdd(this, - EOPPOSITE_FEATURE_BASE - ClassMakerPackage.MODELS__DYNAMIC, null, msgs); - msgs = basicSetDynamic(newDynamic, msgs); + if (dynamicEPackage != null) + msgs = ((InternalEObject) dynamicEPackage).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE, null, msgs); + if (newDynamicEPackage != null) + msgs = ((InternalEObject) newDynamicEPackage).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE, null, msgs); + msgs = basicSetDynamicEPackage(newDynamicEPackage, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__DYNAMIC, newDynamic, - newDynamic)); + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE, + newDynamicEPackage, newDynamicEPackage)); } /** @@ -253,17 +261,17 @@ public void setDynamic(EObject newDynamic) { * @generated */ @Override - public EObject getGenerated() { - if (generated != null && generated.eIsProxy()) { - InternalEObject oldGenerated = (InternalEObject) generated; - generated = eResolveProxy(oldGenerated); - if (generated != oldGenerated) { + public EObject getGeneratedEPackage() { + if (generatedEPackage != null && generatedEPackage.eIsProxy()) { + InternalEObject oldGeneratedEPackage = (InternalEObject) generatedEPackage; + generatedEPackage = eResolveProxy(oldGeneratedEPackage); + if (generatedEPackage != oldGeneratedEPackage) { if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ClassMakerPackage.MODELS__GENERATED, - oldGenerated, generated)); + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + ClassMakerPackage.MODELS__GENERATED_EPACKAGE, oldGeneratedEPackage, generatedEPackage)); } } - return generated; + return generatedEPackage; } /** @@ -271,8 +279,8 @@ public EObject getGenerated() { * * @generated */ - public EObject basicGetGenerated() { - return generated; + public EObject basicGetGeneratedEPackage() { + return generatedEPackage; } /** @@ -281,12 +289,12 @@ public EObject basicGetGenerated() { * @generated */ @Override - public void setGenerated(EObject newGenerated) { - EObject oldGenerated = generated; - generated = newGenerated; + public void setGeneratedEPackage(EObject newGeneratedEPackage) { + EObject oldGeneratedEPackage = generatedEPackage; + generatedEPackage = newGeneratedEPackage; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED, oldGenerated, - generated)); + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED_EPACKAGE, + oldGeneratedEPackage, generatedEPackage)); } /** @@ -295,8 +303,8 @@ public void setGenerated(EObject newGenerated) { * @generated */ @Override - public EMFPlugin getGeneratedEdit() { - return generatedEdit; + public EMFPlugin getGeneratedEditPlugin() { + return generatedEditPlugin; } /** @@ -305,12 +313,12 @@ public EMFPlugin getGeneratedEdit() { * @generated */ @Override - public void setGeneratedEdit(EMFPlugin newGeneratedEdit) { - EMFPlugin oldGeneratedEdit = generatedEdit; - generatedEdit = newGeneratedEdit; + public void setGeneratedEditPlugin(EMFPlugin newGeneratedEditPlugin) { + EMFPlugin oldGeneratedEditPlugin = generatedEditPlugin; + generatedEditPlugin = newGeneratedEditPlugin; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED_EDIT, - oldGeneratedEdit, generatedEdit)); + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN, + oldGeneratedEditPlugin, generatedEditPlugin)); } /** @@ -319,8 +327,8 @@ public void setGeneratedEdit(EMFPlugin newGeneratedEdit) { * @generated */ @Override - public EMFPlugin getGeneratedEditor() { - return generatedEditor; + public EMFPlugin getGeneratedEditorPlugin() { + return generatedEditorPlugin; } /** @@ -329,12 +337,12 @@ public EMFPlugin getGeneratedEditor() { * @generated */ @Override - public void setGeneratedEditor(EMFPlugin newGeneratedEditor) { - EMFPlugin oldGeneratedEditor = generatedEditor; - generatedEditor = newGeneratedEditor; + public void setGeneratedEditorPlugin(EMFPlugin newGeneratedEditorPlugin) { + EMFPlugin oldGeneratedEditorPlugin = generatedEditorPlugin; + generatedEditorPlugin = newGeneratedEditorPlugin; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED_EDITOR, - oldGeneratedEditor, generatedEditor)); + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN, + oldGeneratedEditorPlugin, generatedEditorPlugin)); } /** @@ -408,8 +416,8 @@ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, No @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case ClassMakerPackage.MODELS__DYNAMIC: - return basicSetDynamic(null, msgs); + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: + return basicSetDynamicEPackage(null, msgs); case ClassMakerPackage.MODELS__PARENT: return basicSetParent(null, msgs); } @@ -438,16 +446,16 @@ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ClassMakerPackage.MODELS__DYNAMIC: - return getDynamic(); - case ClassMakerPackage.MODELS__GENERATED: + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: + return getDynamicEPackage(); + case ClassMakerPackage.MODELS__GENERATED_EPACKAGE: if (resolve) - return getGenerated(); - return basicGetGenerated(); - case ClassMakerPackage.MODELS__GENERATED_EDIT: - return getGeneratedEdit(); - case ClassMakerPackage.MODELS__GENERATED_EDITOR: - return getGeneratedEditor(); + return getGeneratedEPackage(); + return basicGetGeneratedEPackage(); + case ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN: + return getGeneratedEditPlugin(); + case ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN: + return getGeneratedEditorPlugin(); case ClassMakerPackage.MODELS__PARENT: return getParent(); } @@ -462,17 +470,17 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ClassMakerPackage.MODELS__DYNAMIC: - setDynamic((EObject) newValue); + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: + setDynamicEPackage((EObject) newValue); return; - case ClassMakerPackage.MODELS__GENERATED: - setGenerated((EObject) newValue); + case ClassMakerPackage.MODELS__GENERATED_EPACKAGE: + setGeneratedEPackage((EObject) newValue); return; - case ClassMakerPackage.MODELS__GENERATED_EDIT: - setGeneratedEdit((EMFPlugin) newValue); + case ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN: + setGeneratedEditPlugin((EMFPlugin) newValue); return; - case ClassMakerPackage.MODELS__GENERATED_EDITOR: - setGeneratedEditor((EMFPlugin) newValue); + case ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN: + setGeneratedEditorPlugin((EMFPlugin) newValue); return; case ClassMakerPackage.MODELS__PARENT: setParent((Item) newValue); @@ -489,17 +497,17 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case ClassMakerPackage.MODELS__DYNAMIC: - setDynamic((EObject) null); + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: + setDynamicEPackage((EObject) null); return; - case ClassMakerPackage.MODELS__GENERATED: - setGenerated((EObject) null); + case ClassMakerPackage.MODELS__GENERATED_EPACKAGE: + setGeneratedEPackage((EObject) null); return; - case ClassMakerPackage.MODELS__GENERATED_EDIT: - setGeneratedEdit(GENERATED_EDIT_EDEFAULT); + case ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN: + setGeneratedEditPlugin(GENERATED_EDIT_PLUGIN_EDEFAULT); return; - case ClassMakerPackage.MODELS__GENERATED_EDITOR: - setGeneratedEditor(GENERATED_EDITOR_EDEFAULT); + case ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN: + setGeneratedEditorPlugin(GENERATED_EDITOR_PLUGIN_EDEFAULT); return; case ClassMakerPackage.MODELS__PARENT: setParent((Item) null); @@ -516,16 +524,16 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case ClassMakerPackage.MODELS__DYNAMIC: - return dynamic != null; - case ClassMakerPackage.MODELS__GENERATED: - return generated != null; - case ClassMakerPackage.MODELS__GENERATED_EDIT: - return GENERATED_EDIT_EDEFAULT == null ? generatedEdit != null - : !GENERATED_EDIT_EDEFAULT.equals(generatedEdit); - case ClassMakerPackage.MODELS__GENERATED_EDITOR: - return GENERATED_EDITOR_EDEFAULT == null ? generatedEditor != null - : !GENERATED_EDITOR_EDEFAULT.equals(generatedEditor); + case ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE: + return dynamicEPackage != null; + case ClassMakerPackage.MODELS__GENERATED_EPACKAGE: + return generatedEPackage != null; + case ClassMakerPackage.MODELS__GENERATED_EDIT_PLUGIN: + return GENERATED_EDIT_PLUGIN_EDEFAULT == null ? generatedEditPlugin != null + : !GENERATED_EDIT_PLUGIN_EDEFAULT.equals(generatedEditPlugin); + case ClassMakerPackage.MODELS__GENERATED_EDITOR_PLUGIN: + return GENERATED_EDITOR_PLUGIN_EDEFAULT == null ? generatedEditorPlugin != null + : !GENERATED_EDITOR_PLUGIN_EDEFAULT.equals(generatedEditorPlugin); case ClassMakerPackage.MODELS__PARENT: return getParent() != null; } @@ -543,10 +551,10 @@ public String toString() { return super.toString(); StringBuilder result = new StringBuilder(super.toString()); - result.append(" (generatedEdit: "); - result.append(generatedEdit); - result.append(", generatedEditor: "); - result.append(generatedEditor); + result.append(" (generatedEditPlugin: "); + result.append(generatedEditPlugin); + result.append(", generatedEditorPlugin: "); + result.append(generatedEditorPlugin); result.append(')'); return result.toString(); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ProjectImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ProjectImpl.java index d68ea706..a08f5720 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ProjectImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ProjectImpl.java @@ -17,8 +17,12 @@ import java.io.File; import java.io.IOException; +import java.net.URI; +import java.rmi.registry.Registry; +import java.sql.Ref; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.Iterator; @@ -27,6 +31,8 @@ import java.util.Locale; import java.util.Map; +import javax.management.Notification; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; @@ -34,23 +40,22 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.ListenerList; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.MultiRule; import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.common.notify.impl.NotificationImpl; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -59,7 +64,6 @@ import org.eclipse.emf.ecore.util.EcoreEMap; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.emf.ecore.util.NotifyingInternalEListImpl; import org.eclipse.emf.ecore.xmi.PackageNotFoundException; import org.eclipse.emf.ecore.xmi.XMLResource; import org.eclipse.jgit.api.Git; @@ -70,7 +74,6 @@ import org.eclipse.jgit.api.errors.CheckoutConflictException; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.JGitInternalException; -import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.ReflogEntry; import org.eclipse.osgi.util.NLS; import org.enterprisedomain.classmaker.ClassMakerFactory; @@ -95,7 +98,6 @@ import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.util.ListUtil; import org.enterprisedomain.classmaker.util.ResourceUtils; -import org.osgi.framework.Version; /** * An implementation of the model object ' @@ -120,12 +122,12 @@ * Locale} *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getProject * Project}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getResource + * Resource}
  • *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getName * Name}
  • *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getProjectName * Project Name}
  • - *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getChildren - * Children}
  • *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#isDirty * Dirty}
  • *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getWorkspace @@ -154,6 +156,8 @@ * State}
  • *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getModelResourceAdapter * Model Resource Adapter}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.ProjectImpl#getClassLoader + * Class Loader}
  • * * * @generated @@ -251,6 +255,16 @@ public class ProjectImpl extends EObjectImpl implements Project { */ protected Locale locale = LOCALE_EDEFAULT; + /** + * The cached value of the '{@link #getResource() Resource}' reference. + * + * + * @see #getResource() + * @generated + * @ordered + */ + protected Resource resource; + /** * The default value of the '{@link #getName() Name}' attribute. @@ -456,12 +470,39 @@ public class ProjectImpl extends EObjectImpl implements Project { */ protected ResourceAdapter modelResourceAdapter; + /** + * The default value of the '{@link #getClassLoader() Class Loader}' + * attribute. + * + * @see #getClassLoader() + * @generated + * @ordered + */ + protected static final ClassLoader CLASS_LOADER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getClassLoader() Class Loader}' + * attribute. + * + * @see #getClassLoader() + * @generated + * @ordered + */ + protected ClassLoader classLoader = CLASS_LOADER_EDEFAULT; + + /** + * This is true if the Class Loader attribute has been set. + * + * @generated + * @ordered + */ + protected boolean classLoaderESet; + protected ListenerList completionListeners = new ListenerList(); protected ListenerList resourceChangeListeners = new ListenerList(); - protected LoadingEList children; - protected ResourceChangeAdapter resourceChangeAdapter = new ResourceChangeAdapter(this); public class ProjectNameAdapter extends AdapterImpl { @@ -483,16 +524,16 @@ && eIsSet(ClassMakerPackage.PROJECT__WORKSPACE)) protected Adapter stateModelAdapter = new AdapterImpl() { @Override public void notifyChanged(Notification msg) { - if (msg.getFeatureID(State.class) == ClassMakerPackage.STATE__RESOURCE + if (msg.getFeatureID(Project.class) == ClassMakerPackage.ITEM__RESOURCE && msg.getEventType() == Notification.SET) { - if (isStateSet() && getState().eIsSet(ClassMakerPackage.Literals.STATE__RESOURCE)) { + if (isStateSet() && eIsSet(ClassMakerPackage.Literals.ITEM__RESOURCE)) { ResourceAdapter modelResourceAdapter = null; if (eIsSet(ClassMakerPackage.PROJECT__MODEL_RESOURCE_ADAPTER)) { modelResourceAdapter = getModelResourceAdapter(); } else { modelResourceAdapter = ClassMakerFactory.eINSTANCE.createResourceAdapter(); } - modelResourceAdapter.setResource(getState().getResource()); + modelResourceAdapter.setResource(getResource()); modelResourceAdapter.setProject(ProjectImpl.this); } } @@ -534,12 +575,13 @@ public String getModelName() { /** * * - * @generated + * @generated NOT */ @Override public void setModelName(String newModelName) { String oldModelName = modelName; modelName = newModelName; + setName(newModelName); if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.PROJECT__MODEL_NAME, oldModelName, modelName)); @@ -739,6 +781,30 @@ public Project basicGetProject() { public void setProject(Project newProject) { } + /** + * + * + * @generated + */ + @Override + public Resource getResource() { + return resource; + } + + /** + * + * + * @generated + */ + @Override + public void setResource(Resource newResource) { + Resource oldResource = resource; + resource = newResource; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.PROJECT__RESOURCE, oldResource, + resource)); + } + /** * * @@ -785,47 +851,6 @@ public void setProjectName(String newProjectName) { oldProjectName, projectName)); } - /** - * - * - * @generated NOT - */ - @SuppressWarnings("unchecked") - public EList getChildren() { - if (children == null || children.isEmpty() || children.get(0) == null) { - if (getModelResourceAdapter() != null) - children = new LoadingEList(getModelResourceAdapter().getResource()); - else { - try { - load(false, false); - } catch (CoreException e) { - ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); - } - if (getModelResourceAdapter() != null) - children = new LoadingEList(getModelResourceAdapter().getResource()); - else - children = new LoadingEList(null); - } - - eAdapters().remove(modelAdapter); - eAdapters().add(modelAdapter); - } - return (EList) (EList) children; - } - - private Adapter modelAdapter = new AdapterImpl() { - - @Override - public void notifyChanged(Notification msg) { - super.notifyChanged(msg); - if (msg.getFeatureID(Project.class) == ClassMakerPackage.PROJECT__MODEL_RESOURCE_ADAPTER - && msg.getEventType() == Notification.SET && msg.getNewValue() != null) { - children.setContents(getModelResourceAdapter().getResource()); - } - } - - }; - /** * * @@ -1028,7 +1053,7 @@ public ResourceChangeListener getResourceReloadListener() { @Override public void changed(Notification notification) throws Exception { - Resource theResource = (Resource) getChildren().get(0); + Resource theResource = getResource(); Resource resource = (Resource) notification.getNotifier(); if (!loading && !isSavingResource() && resource.getURI().equals(theResource.getURI()) && theResource.isLoaded()) { @@ -1037,10 +1062,7 @@ public void changed(Notification notification) throws Exception { getSelectRevealHandler().prepare(); if (!theResource.isModified()) setResource(resource); - theResource = ((Resource) getChildren().get(0)); - // theResource.setURI(getResourceURI()); - // theResource.unload(); - // theResource.load(Collections.emptyMap()); + theResource = getResource(); if (ProjectImpl.this.eIsSet(ClassMakerPackage.PROJECT__SELECT_REVEAL_HANDLER)) getSelectRevealHandler().selectReveal(theResource); loading = false; @@ -1052,11 +1074,6 @@ public void changed(Notification notification) throws Exception { return resourceReloadListener; } - protected void setResource(Resource resource) { - getRevision().getState().setResource(resource); - getChildren().set(0, resource); - } - /** * * @@ -1269,6 +1286,58 @@ public NotificationChain basicSetModelResourceAdapter(ResourceAdapter newModelRe return msgs; } + /** + * + * + * @generated + */ + @Override + public ClassLoader getClassLoader() { + return classLoader; + } + + /** + * + * + * @generated + */ + @Override + public void setClassLoader(ClassLoader newClassLoader) { + ClassLoader oldClassLoader = classLoader; + classLoader = newClassLoader; + boolean oldClassLoaderESet = classLoaderESet; + classLoaderESet = true; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.PROJECT__CLASS_LOADER, + oldClassLoader, classLoader, !oldClassLoaderESet)); + } + + /** + * + * + * @generated + */ + @Override + public void unsetClassLoader() { + ClassLoader oldClassLoader = classLoader; + boolean oldClassLoaderESet = classLoaderESet; + classLoader = CLASS_LOADER_EDEFAULT; + classLoaderESet = false; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.UNSET, ClassMakerPackage.PROJECT__CLASS_LOADER, + oldClassLoader, CLASS_LOADER_EDEFAULT, oldClassLoaderESet)); + } + + /** + * + * + * @generated + */ + @Override + public boolean isSetClassLoader() { + return classLoaderESet; + } + /** * * @@ -1307,6 +1376,8 @@ public void delete(IProgressMonitor monitor) throws CoreException { getWorkspace().getResourceSet().eAdapters().remove(resourceChangeAdapter); getWorkspace().unregisterProject(this); } + ResourceUtils.delete(Platform.getStateLocation(Platform.getBundle(ClassMakerPlugin.PLUGIN_ID)) + .append(getProjectName()).toFile(), null); } /** @@ -1315,7 +1386,7 @@ public void delete(IProgressMonitor monitor) throws CoreException { * @generated NOT */ public void delete(EList objects) { - TreeIterator it = ((Resource) getChildren().get(0)).getAllContents(); + TreeIterator it = getResource().getAllContents(); while (it.hasNext()) { EObject o = it.next(); ListIterator li = objects.listIterator(); @@ -1328,7 +1399,7 @@ public void delete(EList objects) { try { Map options = new HashMap(); options.put(XMLResource.OPTION_ENCODING, "UTF-8"); - ((Resource) getChildren().get(0)).save(options); + getResource().save(options); } catch (IOException e) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); } @@ -1369,7 +1440,7 @@ public Revision newRevision(Version version) { Revision newRevision = newBareRevision(version); doNewRevision(newRevision); - newRevision.initialize(false); + newRevision.initialize(); return newRevision; } @@ -1391,7 +1462,11 @@ public Revision newBareRevision(Version version) { * @generated NOT */ public void doNewRevision(Revision newRevision) { - State newState = newRevision.newState(); + State newState = null; + if (newRevision.eIsSet(ClassMakerPackage.Literals.REVISION__TIMESTAMP)) + newState = newRevision.newState(newRevision.getTimestamp()); + else + newState = newRevision.newState(); newRevision.setTimestamp(newState.getTimestamp()); } @@ -1506,12 +1581,11 @@ public void checkout(Version version, long time) { if (revision == null) { revision = newBareRevision(version); doNewRevision(revision); - revision.initialize(false); + revision.initialize(); revision.checkout(time); } else if (revision.getStateHistory().containsKey(time)) { State state = revision.getStateHistory().get((Object) time); - EList commits = state.getCommitIds(); - if (!commits.isEmpty()) { + if (!state.eIsSet(ClassMakerPackage.Literals.STATE__COMMIT_ID)) { revision.checkout(time, state.getCommitId()); } else revision.checkout(time); @@ -1534,39 +1608,6 @@ public void checkout(Version version, long time, String commitId) { getRevision().checkout(time, commitId); } - /** - * - * - * @generated NOT - */ - public void checkout(long time) { - if (getRevision().getStateHistory().containsKey(time)) - getRevision().checkout(time); - } - - /** - * - * - * @generated NOT - */ - public void checkout(long time, String commitId) { - if (getRevision().getStateHistory().containsKey(time)) { - State state = getRevision().getStateHistory().get((Object) time); - if (state.getCommitIds().contains(commitId)) - getRevision().checkout(time, commitId); - } - } - - /** - * - * - * @generated NOT - */ - public void checkout(String commitId) { - if (getState().getCommitIds().contains(commitId)) - getState().checkout(commitId, true); - } - /** * * @@ -1598,7 +1639,7 @@ public void notifyChanged(Notification msg) { * @generated NOT */ public void load(boolean create, boolean loadOnDemand) throws CoreException { - initialize(false); + initialize(); if (isRevisionSet()) { if (create) { try { @@ -1637,6 +1678,18 @@ public void copyModel(Item from) { getRevision().copyModel(from); } + /** + * + * + * @generated + */ + @Override + public void renameProject(String oldProjectName, String newProjectName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + /** * * @@ -1671,7 +1724,7 @@ public boolean open(IProgressMonitor monitor) throws CoreException { String projectName = getProjectName(); if (projectName.isEmpty()) return false; - initialize(false); + initialize(); IWorkspace workspace = ResourcesPlugin.getWorkspace(); if (ClassMakerPlugin.getInstance().isTurnOffAutoBuilding() && workspace.isAutoBuilding()) { ResourceUtils.setAutoBuilding(workspace, false); @@ -1707,8 +1760,9 @@ public void close(IProgressMonitor monitor) throws CoreException { * * @generated NOT */ - public String initialize(boolean commit) { - setName(getProjectName()); + public String initialize() { + setName(getModelName() != null ? getModelName() : CodeGenUtil.capName(getProjectName())); + ClassMakerPlugin.print(NLS.bind("Project {0} is initializing...", getName())); URI uri = getResourceURI(); Resource resource = null; if (new File(uri.toFileString()).exists()) { @@ -1718,7 +1772,7 @@ public String initialize(boolean commit) { if (e.exception() instanceof PackageNotFoundException) { Contribution contribution = getWorkspace() .getContribution(((PackageNotFoundException) e.exception()).uri(), Stage.MODELED); - if (contribution.getPhase().getValue() >= Stage.INSTALLED_VALUE) + if (contribution != null && contribution.getPhase().getValue() >= Stage.INSTALLED_VALUE) try { contribution.build(ClassMakerPlugin.getProgressMonitor()); resource = getWorkspace().getResourceSet().getResource(uri, true); @@ -1733,61 +1787,96 @@ public String initialize(boolean commit) { } catch (IOException e) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); } + @SuppressWarnings("unchecked") SCMOperator operator = (SCMOperator) getWorkspace().getSCMRegistry().get(getProjectName()); - setName(getProjectName()); try { Git git = operator.getRepositorySCM(); String currentBranch = git.getRepository().getBranch(); + ListBranchCommand listBranches = git.branchList(); List branches = listBranches.call(); + branches.sort(new Comparator() { + + @Override + public int compare(Ref o1, Ref o2) { + Version v1, v2; + try { + String[] name = o1.getName().split("/"); + v1 = operator.decodeVersion(name[name.length - 1]); + } catch (Exception e) { + v1 = Version.emptyVersion; + } + try { + String[] name = o2.getName().split("/"); + v2 = operator.decodeVersion(name[name.length - 1]); + } catch (Exception e) { + v2 = Version.emptyVersion; + } + return v2.compareTo(v1); + } + + }); Iterator it = branches.iterator(); Ref branch = null; + if (it.hasNext()) + branch = it.next(); long timestamp = -1; String commitId = ""; - do { - Version version = null; - if (it.hasNext()) { - branch = it.next(); - String[] name = branch.getName().split("/"); //$NON-NLS-1$ - try { - version = operator.decodeVersion(name[name.length - 1]); - ReflogCommand reflog = git.reflog(); - reflog.setRef(branch.getName().toString()); - Collection refs = reflog.call(); - for (ReflogEntry ref : refs) - if (ref.getNewId().equals(branch.getObjectId())) { - timestamp = operator.decodeTimestamp(ref.getComment()); - if (timestamp == -1) - timestamp = operator.decodeTimestamp(version.getQualifier()); - } - } catch (IllegalArgumentException e) { - continue; - } - } - if (version != null && !getRevisions().containsKey(version)) { - Revision newRevision = newBareRevision(version); - newRevision.setTimestamp(timestamp); - newRevision.setProject(this); - doNewRevision(newRevision); - commitId = newRevision.initialize(commit); + Version version = null; + if (branch != null) { + String[] name = branch.getName().split("/"); //$NON-NLS-1$ + try { + version = operator.decodeVersion(name[name.length - 1]); + ReflogCommand reflog = git.reflog(); + reflog.setRef(branch.getName().toString()); + Collection refs = reflog.call(); + for (ReflogEntry ref : refs) + if (ref.getNewId().equals(branch.getObjectId())) { + timestamp = operator.decodeTimestamp(ref.getComment()); + if (timestamp == -1) + timestamp = operator.decodeTimestamp( + String.valueOf(Long.valueOf(version.getQualifier()) / 1000)); + } + } catch (IllegalArgumentException e) { + return commitId; } - } while (it.hasNext()); + } + if (version != null && !getRevisions().containsKey(version)) { + Revision newRevision = newBareRevision(version); + newRevision.setTimestamp(timestamp); + newRevision.setProject(this); + doNewRevision(newRevision); + commitId = newRevision.initialize(); + } if (!getRevisions().isEmpty() && getVersion().equals(Version.emptyVersion)) setVersion(ListUtil.getLast(getRevisions()).getKey()); - else if (!getVersion().equals(Version.emptyVersion)) + else if (!getVersion().equals(Version.emptyVersion)) { + if (isStateSet()) { + try { + getState().add("."); + getState().commit(); + } catch (JGitInternalException e) { + } + } checkout(getVersion(), timestamp); + } if (currentBranch.equals(SCMOperator.MASTER_BRANCH)) checkout(getVersion(), timestamp); if (eIsSet(ClassMakerPackage.PROJECT__REVISION) && getRevision().eIsSet(ClassMakerPackage.Literals.REVISION__STATE)) { - getRevision().getState().setResource(resource); + setResource(resource); initAdapters(getRevision()); } - onModelResourceCreate(resource); - if (!getWorkspace().getResourceSet().eAdapters().contains(resourceChangeAdapter)) - getWorkspace().getResourceSet().eAdapters().add(resourceChangeAdapter); - addResourceChangeListener(getResourceReloadListener()); + if (getPhase().equals(Stage.MODELED)) { + EPackage ePackage = (EPackage) getDomainModel().getDynamicEPackage(); + if (ePackage != null) + Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); + } else if (getPhase().equals(Stage.LOADED)) { + EPackage ePackage = (EPackage) getDomainModel().getGeneratedEPackage(); + if (ePackage != null) + Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); + } return commitId; } catch (Exception e) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); @@ -1800,31 +1889,30 @@ && getRevision().eIsSet(ClassMakerPackage.Literals.REVISION__STATE)) { } } } else { - createResource(uri, commit); + resource = createResource(uri); } } else { - createResource(uri, commit); + resource = createResource(uri); } if (!getWorkspace().getResourceSet().eAdapters().contains(resourceChangeAdapter)) getWorkspace().getResourceSet().eAdapters().add(resourceChangeAdapter); addResourceChangeListener(getResourceReloadListener()); + onModelResourceCreate(resource); return ""; //$NON-NLS-1$ } - private void createResource(URI uri, boolean commit) { + private Resource createResource(URI uri) { Resource resource = getWorkspace().getResourceSet().createResource(uri); - if (eIsSet(ClassMakerPackage.PROJECT__REVISION) - && getRevision().eIsSet(ClassMakerPackage.Literals.REVISION__STATE)) - getRevision().getState().setResource(resource); - if (commit) - try { - Map options = new HashMap(); - options.put(XMLResource.OPTION_ENCODING, "UTF-8"); - resource.save(options); - } catch (IOException e) { - ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); - } + setResource(resource); + try { + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, "UTF-8"); + resource.save(options); + } catch (IOException e) { + ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); + } onModelResourceCreate(resource); + return resource; } private URI getResourceURI() { @@ -1832,124 +1920,6 @@ private URI getResourceURI() { return URI.createFileURI(workspacePath.append(getResourcePath()).toString()); } - protected class LoadingEList extends NotifyingInternalEListImpl { - - private static final long serialVersionUID = 164926149524632079L; - private Notifier object; - private Adapter initAdapter = new AdapterImpl() { - - @Override - public void notifyChanged(Notification msg) { - super.notifyChanged(msg); - if (msg.getFeatureID(ResourceAdapter.class) == ClassMakerPackage.RESOURCE_ADAPTER__RESOURCE - && msg.getEventType() == Notification.SET && msg.getNewValue() != null) - setContents((Notifier) msg.getNewValue()); - } - - }; - - public LoadingEList(Notifier object) { - setContents(object); - } - - private class ResourceNotificationImpl extends NotificationImpl { - - public ResourceNotificationImpl(int eventType, Object oldValue, Object newValue) { - super(eventType, oldValue, newValue); - } - - public ResourceNotificationImpl(int eventType, Object oldValue, Object newValue, int position) { - super(eventType, oldValue, newValue, position); - } - - @Override - public int getFeatureID(Class expectedClass) { - if (expectedClass.isAssignableFrom(Resource.class)) - return Resource.RESOURCE__CONTENTS; - return super.getFeatureID(expectedClass); - } - - public Object getNotifier() { - return ProjectImpl.this; - } - - } - - private void fill(Notifier object) { - if (object instanceof Resource) { - clear(); - add(object); - } else if (object instanceof EObject) { - ((Resource) this.object).getContents().clear(); - ((Resource) this.object).getContents().add((EObject) object); - } - } - - @Override - protected void didSet(int index, Notifier newObject, Notifier oldObject) { - detachInitAdapter(); - setObject(newObject); - super.didSet(index, newObject, oldObject); - attachInitAdapter(); - if (eNotificationRequired()) - eNotify(new ResourceNotificationImpl(Notification.SET, oldObject, newObject, index)); - } - - @Override - protected void didAdd(int index, Notifier newObject) { - super.didAdd(index, newObject); - attachInitAdapter(); - setObject(newObject); - if (eNotificationRequired()) - eNotify(new ResourceNotificationImpl(Notification.ADD, null, newObject, index)); - } - - @Override - protected void didRemove(int index, Notifier oldObject) { - detachInitAdapter(); - setObject(null); - super.didRemove(index, oldObject); - if (eNotificationRequired()) - eNotify(new ResourceNotificationImpl(Notification.REMOVE, oldObject, null, index)); - } - - @Override - protected void didClear(int size, Object[] oldObjects) { - detachInitAdapter(); - setObject(null); - super.didClear(size, oldObjects); - if (eNotificationRequired()) - eNotify(new ResourceNotificationImpl(Notification.REMOVE_MANY, oldObjects, null)); - } - - private void attachInitAdapter() { - if (object == null) - return; - object.eAdapters().add(initAdapter); - } - - private void detachInitAdapter() { - if (object == null) - return; - object.eAdapters().remove(initAdapter); - } - - public void setContents(Notifier object) { - detachInitAdapter(); - setObject(object); - attachInitAdapter(); - fill(object); - } - - private void setObject(Notifier object) { - if (object instanceof Resource) - this.object = object; - else if (object instanceof EObject) - ((Resource) this.object).getContents().add((EObject) object); - } - - } - /** * * @@ -2117,12 +2087,12 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { if (resolve) return getProject(); return basicGetProject(); + case ClassMakerPackage.PROJECT__RESOURCE: + return getResource(); case ClassMakerPackage.PROJECT__NAME: return getName(); case ClassMakerPackage.PROJECT__PROJECT_NAME: return getProjectName(); - case ClassMakerPackage.PROJECT__CHILDREN: - return getChildren(); case ClassMakerPackage.PROJECT__DIRTY: return isDirty(); case ClassMakerPackage.PROJECT__WORKSPACE: @@ -2162,6 +2132,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return basicGetState(); case ClassMakerPackage.PROJECT__MODEL_RESOURCE_ADAPTER: return getModelResourceAdapter(); + case ClassMakerPackage.PROJECT__CLASS_LOADER: + return getClassLoader(); } return super.eGet(featureID, resolve, coreType); } @@ -2198,6 +2170,9 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.PROJECT__PROJECT: setProject((Project) newValue); return; + case ClassMakerPackage.PROJECT__RESOURCE: + setResource((Resource) newValue); + return; case ClassMakerPackage.PROJECT__NAME: setName((String) newValue); return; @@ -2234,6 +2209,9 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.PROJECT__VERSION: setVersion((Version) newValue); return; + case ClassMakerPackage.PROJECT__CLASS_LOADER: + setClassLoader((ClassLoader) newValue); + return; } super.eSet(featureID, newValue); } @@ -2270,6 +2248,9 @@ public void eUnset(int featureID) { case ClassMakerPackage.PROJECT__PROJECT: setProject((Project) null); return; + case ClassMakerPackage.PROJECT__RESOURCE: + setResource((Resource) null); + return; case ClassMakerPackage.PROJECT__NAME: setName(NAME_EDEFAULT); return; @@ -2306,6 +2287,9 @@ public void eUnset(int featureID) { case ClassMakerPackage.PROJECT__VERSION: setVersion(VERSION_EDEFAULT); return; + case ClassMakerPackage.PROJECT__CLASS_LOADER: + unsetClassLoader(); + return; } super.eUnset(featureID); } @@ -2334,12 +2318,12 @@ public boolean eIsSet(int featureID) { return LOCALE_EDEFAULT == null ? locale != null : !LOCALE_EDEFAULT.equals(locale); case ClassMakerPackage.PROJECT__PROJECT: return basicGetProject() != null; + case ClassMakerPackage.PROJECT__RESOURCE: + return resource != null; case ClassMakerPackage.PROJECT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case ClassMakerPackage.PROJECT__PROJECT_NAME: return PROJECT_NAME_EDEFAULT == null ? projectName != null : !PROJECT_NAME_EDEFAULT.equals(projectName); - case ClassMakerPackage.PROJECT__CHILDREN: - return !getChildren().isEmpty(); case ClassMakerPackage.PROJECT__DIRTY: return dirty != DIRTY_EDEFAULT; case ClassMakerPackage.PROJECT__WORKSPACE: @@ -2370,6 +2354,8 @@ public boolean eIsSet(int featureID) { return basicGetState() != null; case ClassMakerPackage.PROJECT__MODEL_RESOURCE_ADAPTER: return modelResourceAdapter != null; + case ClassMakerPackage.PROJECT__CLASS_LOADER: + return isSetClassLoader(); } return super.eIsSet(featureID); } @@ -2399,6 +2385,8 @@ public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { return ClassMakerPackage.ITEM__LOCALE; case ClassMakerPackage.PROJECT__PROJECT: return ClassMakerPackage.ITEM__PROJECT; + case ClassMakerPackage.PROJECT__RESOURCE: + return ClassMakerPackage.ITEM__RESOURCE; default: return -1; } @@ -2431,6 +2419,8 @@ public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { return ClassMakerPackage.PROJECT__LOCALE; case ClassMakerPackage.ITEM__PROJECT: return ClassMakerPackage.PROJECT__PROJECT; + case ClassMakerPackage.ITEM__RESOURCE: + return ClassMakerPackage.PROJECT__RESOURCE; default: return -1; } @@ -2496,6 +2486,11 @@ public String toString() { result.append(projectVersion); result.append(", version: "); result.append(version); + result.append(", classLoader: "); + if (classLoaderESet) + result.append(classLoader); + else + result.append(""); result.append(')'); return result.toString(); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceAdapterImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceAdapterImpl.java index f8762b6b..3d8bb158 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceAdapterImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceAdapterImpl.java @@ -16,13 +16,14 @@ package org.enterprisedomain.classmaker.impl; import java.net.MalformedURLException; +import java.net.URI; + +import javax.management.Notification; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeAdapter.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeAdapter.java index 66c3abc3..1afc235d 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeAdapter.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeAdapter.java @@ -1,6 +1,7 @@ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EContentAdapter; import org.enterprisedomain.classmaker.Project; @@ -32,9 +33,10 @@ public void notifyChanged(Notification notification) { super.notifyChanged(notification); if (notification.getFeatureID(Resource.class) == Resource.RESOURCE__IS_MODIFIED && notification.getEventType() == Notification.SET && notification.getNotifier() instanceof Resource - && project != null && project instanceof Project && !project.getChildren().isEmpty() - && project.getChildren().get(0) instanceof Resource && ((Resource) project.getChildren().get(0)) - .getURI().equals(((Resource) notification.getNotifier()).getURI())) + && project != null && project instanceof Project && project.getModelResourceAdapter() != null + && project.getModelResourceAdapter().getResource() instanceof Resource + && ((Resource) project.getModelResourceAdapter().getResource()).getURI() + .equals(((Resource) notification.getNotifier()).getURI())) try { project.notifyResourceChanged(notification); } catch (Exception e) { diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeListenerImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeListenerImpl.java index 4d16f0e0..40dff132 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeListenerImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceChangeListenerImpl.java @@ -15,7 +15,8 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.enterprisedomain.classmaker.ClassMakerPackage; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceSetURIConverter.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceSetURIConverter.java index b47cbb0f..de5d74e9 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceSetURIConverter.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/ResourceSetURIConverter.java @@ -1,10 +1,10 @@ package org.enterprisedomain.classmaker.impl; +import java.net.URI; import java.util.Map; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.URIConverter; import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl; @@ -29,10 +29,11 @@ public Map getURIMap() { return results; for (Project project : ClassMakerPlugin.getClassMaker().getWorkspace().getProjects()) { Revision revision = project.getRevision(); - if (revision.getPhase().getValue() < Stage.LOADED_VALUE && revision.getDomainModel().getDynamic() != null - && revision.getDomainModel().getDynamic() instanceof EPackage + if (revision.getPhase().getValue() < Stage.LOADED_VALUE + && revision.getDomainModel().getDynamicEPackage() != null + && revision.getDomainModel().getDynamicEPackage() instanceof EPackage && revision.getState().getResource() != null) - results.put(URI.createURI(((EPackage) revision.getDomainModel().getDynamic()).getNsURI()), + results.put(URI.createURI(((EPackage) revision.getDomainModel().getDynamicEPackage()).getNsURI()), revision.getState().getResource().getURI()); } return results; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/RevisionImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/RevisionImpl.java index ce051cc8..53da8ca5 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/RevisionImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/RevisionImpl.java @@ -15,13 +15,15 @@ */ package org.enterprisedomain.classmaker.impl; +import java.sql.Ref; import java.util.Calendar; import java.util.TimeZone; +import javax.management.Notification; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; @@ -37,8 +39,8 @@ import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.NoHeadException; import org.eclipse.jgit.api.errors.RefNotFoundException; -import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.osgi.util.NLS; import org.enterprisedomain.classmaker.ClassMakerFactory; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.Contribution; @@ -52,7 +54,6 @@ import org.enterprisedomain.classmaker.State; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.util.ListUtil; -import org.osgi.framework.Version; /** * An implementation of the model object ' @@ -320,8 +321,11 @@ public void setParent(Item newParent) { } @Override - public String initialize(boolean commit) { - super.initialize(commit); + public String initialize() { + super.initialize(); + ClassMakerPlugin + .print(NLS.bind("Revision {0} of {1} is initializing...", getVersion(), getProject().getName())); + String commitId = getState().getCommitId(); @SuppressWarnings("unchecked") SCMOperator operator = (SCMOperator) getProject().getWorkspace().getSCMRegistry() .get(getProject().getProjectName()); @@ -333,31 +337,26 @@ public String initialize(boolean commit) { if (branch != null) { log.add(branch.getObjectId()); Iterable commits = log.call(); + long timestamp = -1; for (RevCommit c : commits) { - long timestamp = operator.decodeTimestamp(c.getShortMessage()); - if (timestamp == -1) { - timestamp = operator.decodeTimestamp(getVersion().getQualifier()); - if (timestamp == -1) - continue; - } - State state = null; - if (getStateHistory().containsKey(timestamp)) - state = (State) getStateHistory().get((Object) timestamp); - else { - state = ClassMakerFactory.eINSTANCE.createState(); - state.setTimestamp(timestamp); - getStateHistory().put(timestamp, state); - state.getProject().setVersion(getVersion()); + if (extractTimestamp(operator, c) > timestamp) { + timestamp = extractTimestamp(operator, c); + commitId = c.getId().toString(); } - String commitId = c.getId().toString(); - state.getCommitIds().add(commitId); - state.setCommitId(commitId); - setTimestamp(timestamp); - state.initialize(commit); } - if (getStateHistory().isEmpty()) - return null; + State state = null; + if (getStateHistory().containsKey(timestamp)) + state = (State) getStateHistory().get((Object) timestamp); + else { + state = ClassMakerFactory.eINSTANCE.createState(); + state.setTimestamp(timestamp); + getStateHistory().put(timestamp, state); + } + state.setCommitId(commitId); + return state.initialize(); } + if (getStateHistory().isEmpty()) + return null; } catch (NoHeadException e) { return null; } catch (Exception e) { @@ -370,7 +369,15 @@ public String initialize(boolean commit) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); } } - return getState().getCommitId(); + return commitId; + } + + private long extractTimestamp(SCMOperator operator, RevCommit c) { + long timestamp = operator.decodeTimestamp(c.getShortMessage()); + if (timestamp == -1) { + timestamp = operator.decodeTimestamp(String.valueOf(Long.valueOf(getVersion().getQualifier()) / 1000)); + } + return timestamp; } /** @@ -448,7 +455,7 @@ public void checkout(long stateTime) { */ public void checkout(String commitId) { for (State state : getStateHistory().values()) - if (state.getCommitIds().contains(commitId)) + if (state.getCommitId().equals(commitId)) checkout(state.getTimestamp(), commitId); } @@ -458,12 +465,25 @@ public void checkout(String commitId) { * @generated NOT */ public State newState() { + return newState((long) (Calendar.getInstance(Revision.VERSION_QUALIFIER_FORMAT.getTimeZone()).getTimeInMillis() + / 1000)); + + } + + /** + * + * + * @generated NOT + */ + @Override + public State newState(long timestamp) { State newState = ClassMakerFactory.eINSTANCE.createState(); - newState.setTimestamp( - (long) (Calendar.getInstance(Revision.VERSION_QUALIFIER_FORMAT.getTimeZone()).getTimeInMillis() - / 1000)); + newState.setTimestamp(timestamp); + if (isStateSet()) { + newState.setEdit(getState().isEdit()); + newState.setEditor(getState().isEditor()); + } getStateHistory().put(newState.getTimestamp(), newState); - newState.getProject().setVersion(getVersion()); return newState; } @@ -480,7 +500,7 @@ public String make(IProgressMonitor monitor) throws Exception { @Override public void load(boolean create, boolean loadOnDemand) throws CoreException { - initialize(false); + initialize(); if (create && isStateSet()) { @SuppressWarnings("unchecked") SCMOperator operator = (SCMOperator) getProject().getWorkspace().getSCMRegistry() @@ -493,7 +513,7 @@ public void load(boolean create, boolean loadOnDemand) throws CoreException { if (create) { create(ClassMakerPlugin.getProgressMonitor()); } - getState().initialize(false); + getState().initialize(); } } catch (Exception e) { throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/SCMOperatorImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/SCMOperatorImpl.java index 1f5ff064..3e0d62f2 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/SCMOperatorImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/SCMOperatorImpl.java @@ -17,7 +17,8 @@ import java.io.IOException; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -26,7 +27,6 @@ import org.enterprisedomain.classmaker.SCMOperator; import org.enterprisedomain.classmaker.SCMRegistry; import org.enterprisedomain.classmaker.State; -import org.osgi.framework.Version; /** * An implementation of the model object 'SCM diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierImpl.java index 526ceb29..94e8b5be 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierImpl.java @@ -17,7 +17,8 @@ import java.util.Objects; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToCustomizerMapEntryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToCustomizerMapEntryImpl.java index 510990dd..33620b57 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToCustomizerMapEntryImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToCustomizerMapEntryImpl.java @@ -15,7 +15,8 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.BasicEMap; import org.eclipse.emf.common.util.EMap; diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EParameterToObjectMapEntryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java similarity index 50% rename from bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EParameterToObjectMapEntryImpl.java rename to bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java index 83627883..4f24d67a 100644 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EParameterToObjectMapEntryImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java @@ -1,35 +1,54 @@ /** + * Copyright 2023 Kyrill Zotkin + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -package org.enterprisedomain.ecp.impl; +package org.enterprisedomain.classmaker.impl; + +import java.util.Collection; + +import javax.management.Notification; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.BasicEMap; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EParameter; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import org.enterprisedomain.ecp.ECPPackage; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectEList; +import org.enterprisedomain.classmaker.ClassMakerPackage; +import org.enterprisedomain.classmaker.StageQualifier; +import org.enterprisedomain.classmaker.jobs.Worker; /** - * An implementation of the model object - * 'EParameter To Object Map Entry'. + * An implementation of the model object 'Stage + * Qualifier To Workers Map Entry'. *

    * The following features are implemented: *

    *
      - *
    • {@link org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl#getTypedKey + *
    • {@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl#getTypedKey * Key}
    • - *
    • {@link org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl#getTypedValue + *
    • {@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl#getTypedValue * Value}
    • *
    * * @generated */ -public class EParameterToObjectMapEntryImpl extends MinimalEObjectImpl.Container - implements BasicEMap.Entry { +public class StageQualifierToWorkersMapEntryImpl extends EObjectImpl + implements BasicEMap.Entry> { /** * The cached value of the '{@link #getTypedKey() Key}' reference. @@ -38,34 +57,24 @@ public class EParameterToObjectMapEntryImpl extends MinimalEObjectImpl.Container * @generated * @ordered */ - protected EParameter key; - - /** - * The default value of the '{@link #getTypedValue() Value}' attribute. - * - * - * @see #getTypedValue() - * @generated - * @ordered - */ - protected static final Object VALUE_EDEFAULT = null; + protected StageQualifier key; /** - * The cached value of the '{@link #getTypedValue() Value}' attribute. - * + * The cached value of the '{@link #getTypedValue() Value}' reference + * list. * * @see #getTypedValue() * @generated * @ordered */ - protected Object value = VALUE_EDEFAULT; + protected EList value; /** * * * @generated */ - protected EParameterToObjectMapEntryImpl() { + protected StageQualifierToWorkersMapEntryImpl() { super(); } @@ -76,7 +85,7 @@ protected EParameterToObjectMapEntryImpl() { */ @Override protected EClass eStaticClass() { - return ECPPackage.Literals.EPARAMETER_TO_OBJECT_MAP_ENTRY; + return ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY; } /** @@ -84,14 +93,14 @@ protected EClass eStaticClass() { * * @generated */ - public EParameter getTypedKey() { + public StageQualifier getTypedKey() { if (key != null && key.eIsProxy()) { InternalEObject oldKey = (InternalEObject) key; - key = (EParameter) eResolveProxy(oldKey); + key = (StageQualifier) eResolveProxy(oldKey); if (key != oldKey) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, - ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY, oldKey, key)); + ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY, oldKey, key)); } } return key; @@ -102,7 +111,7 @@ public EParameter getTypedKey() { * * @generated */ - public EParameter basicGetTypedKey() { + public StageQualifier basicGetTypedKey() { return key; } @@ -111,12 +120,12 @@ public EParameter basicGetTypedKey() { * * @generated */ - public void setTypedKey(EParameter newKey) { - EParameter oldKey = key; + public void setTypedKey(StageQualifier newKey) { + StageQualifier oldKey = key; key = newKey; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY, - oldKey, key)); + eNotify(new ENotificationImpl(this, Notification.SET, + ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY, oldKey, key)); } /** @@ -124,23 +133,14 @@ public void setTypedKey(EParameter newKey) { * * @generated */ - public Object getTypedValue() { + public EList getTypedValue() { + if (value == null) { + value = new EObjectEList(Worker.class, this, + ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE); + } return value; } - /** - * - * - * @generated - */ - public void setTypedValue(Object newValue) { - Object oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE, - oldValue, value)); - } - /** * * @@ -149,11 +149,11 @@ public void setTypedValue(Object newValue) { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY: + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY: if (resolve) return getTypedKey(); return basicGetTypedKey(); - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE: + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE: return getTypedValue(); } return super.eGet(featureID, resolve, coreType); @@ -164,14 +164,16 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { * * @generated */ + @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY: - setTypedKey((EParameter) newValue); + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY: + setTypedKey((StageQualifier) newValue); return; - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE: - setTypedValue(newValue); + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE: + getTypedValue().clear(); + getTypedValue().addAll((Collection) newValue); return; } super.eSet(featureID, newValue); @@ -185,11 +187,11 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY: - setTypedKey((EParameter) null); + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY: + setTypedKey((StageQualifier) null); return; - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE: - setTypedValue(VALUE_EDEFAULT); + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE: + getTypedValue().clear(); return; } super.eUnset(featureID); @@ -203,31 +205,14 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY: + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY: return key != null; - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE: + return value != null && !value.isEmpty(); } return super.eIsSet(featureID); } - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (value: "); - result.append(value); - result.append(')'); - return result.toString(); - } - /** * * @@ -240,6 +225,7 @@ public String toString() { * * @generated */ + @Override public int getHash() { if (hash == -1) { Object theKey = getKey(); @@ -253,6 +239,7 @@ public int getHash() { * * @generated */ + @Override public void setHash(int hash) { this.hash = hash; } @@ -262,7 +249,8 @@ public void setHash(int hash) { * * @generated */ - public EParameter getKey() { + @Override + public StageQualifier getKey() { return getTypedKey(); } @@ -271,7 +259,8 @@ public EParameter getKey() { * * @generated */ - public void setKey(EParameter key) { + @Override + public void setKey(StageQualifier key) { setTypedKey(key); } @@ -280,7 +269,8 @@ public void setKey(EParameter key) { * * @generated */ - public Object getValue() { + @Override + public EList getValue() { return getTypedValue(); } @@ -289,9 +279,11 @@ public Object getValue() { * * @generated */ - public Object setValue(Object value) { - Object oldValue = getValue(); - setTypedValue(value); + @Override + public EList setValue(EList value) { + EList oldValue = getValue(); + getTypedValue().clear(); + getTypedValue().addAll(value); return oldValue; } @@ -301,9 +293,9 @@ public Object setValue(Object value) { * @generated */ @SuppressWarnings("unchecked") - public EMap getEMap() { + public EMap> getEMap() { EObject container = eContainer(); - return container == null ? null : (EMap) container.eGet(eContainmentFeature()); + return container == null ? null : (EMap>) container.eGet(eContainmentFeature()); } -} // EParameterToObjectMapEntryImpl +} // StageQualifierToWorkersMapEntryImpl diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StateImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StateImpl.java index a914a4e6..5731705e 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StateImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StateImpl.java @@ -19,18 +19,16 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.nio.file.FileSystems; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardWatchEventKinds; -import java.nio.file.WatchEvent; -import java.nio.file.WatchKey; -import java.nio.file.WatchService; +import java.net.URI; +import java.rmi.registry.Registry; +import java.sql.Ref; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import javax.management.Notification; + import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -51,18 +49,15 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.MultiRule; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EPackage.Registry; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -79,13 +74,13 @@ import org.eclipse.jgit.api.LogCommand; import org.eclipse.jgit.api.errors.CheckoutConflictException; import org.eclipse.jgit.api.errors.JGitInternalException; -import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.osgi.util.NLS; import org.eclipse.pde.core.project.IBundleProjectDescription; import org.eclipse.pde.core.project.IBundleProjectService; import org.enterprisedomain.classmaker.ClassMakerFactory; import org.enterprisedomain.classmaker.ClassMakerPackage; +import org.enterprisedomain.classmaker.ClassMakerService; import org.enterprisedomain.classmaker.CompletionListener; import org.enterprisedomain.classmaker.Contribution; import org.enterprisedomain.classmaker.Customizer; @@ -102,10 +97,8 @@ import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.core.WrappingProgressMonitor; import org.enterprisedomain.classmaker.jobs.EnterpriseDomainJob; -import org.enterprisedomain.classmaker.util.ListUtil; import org.enterprisedomain.classmaker.util.ModelUtil; import org.enterprisedomain.classmaker.util.ResourceUtils; -import org.osgi.framework.Version; /** * An implementation of the model object ' @@ -134,14 +127,12 @@ * Editor Deployable Unit Name} *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getJobFamily * Job Family}
  • - *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getResource - * Resource}
  • - *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getCommitIds - * Commit Ids}
  • *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getCommitId * Commit Id}
  • *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getStateCustomizers * State Customizers}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getNonExclusiveStateCustomizers + * Non Exclusive State Customizers}
  • *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getProjectName * Project Name}
  • *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#isMaking @@ -152,6 +143,8 @@ * Editor}
  • *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getStrategy * Strategy}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.StateImpl#getBasePackage + * Base Package}
  • * * * @generated @@ -238,7 +231,15 @@ public void notifyChanged(Notification msg) { && eIsSet(ClassMakerPackage.STATE__PROJECT) && getProject().eIsSet(ClassMakerPackage.Literals.PROJECT__WORKSPACE) && getProject().getWorkspace().eIsSet(ClassMakerPackage.Literals.WORKSPACE__SERVICE)) { - setProjectName(getProject().getWorkspace().getService().computeProjectName(msg.getNewStringValue())); + ClassMakerService classMaker = getProject().getWorkspace().getService(); + if (classMaker == null) + classMaker = ClassMakerPlugin.getClassMaker(); + String newProjectName = classMaker.computeProjectName(msg.getNewStringValue()); + if (msg.getOldStringValue() != null) { + String oldProjectName = classMaker.computeProjectName(msg.getOldStringValue()); + getParent().renameProject(oldProjectName, newProjectName); + } + setProjectName(newProjectName); } else if (msg.getFeatureID(State.class) == ClassMakerPackage.STATE__EDIT && msg.getEventType() == Notification.SET && msg.getNewBooleanValue()) { getRequiredPlugins().add("org.eclipse.emf.edit"); @@ -260,9 +261,10 @@ public void completed(Project result) throws Exception { synchronized (makingLock) { makingLock.notifyAll(); } - EPackage ePackage = (EPackage) getDomainModel().getGenerated(); - if (ePackage != null) + EPackage ePackage = (EPackage) getDomainModel().getGeneratedEPackage(); + if (ePackage != null) { Registry.INSTANCE.put(ePackage.getNsURI(), ePackage); + } } } @@ -350,26 +352,6 @@ public void completed(Project result) throws Exception { */ protected String jobFamily = JOB_FAMILY_EDEFAULT; - /** - * The cached value of the '{@link #getResource() Resource}' reference. - * - * - * @see #getResource() - * @generated - * @ordered - */ - protected Resource resource; - - /** - * The cached value of the '{@link #getCommitIds() Commit Ids}' - * attribute list. - * - * @see #getCommitIds() - * @generated - * @ordered - */ - protected EList commitIds; - /** * The default value of the '{@link #getCommitId() Commit Id}' * attribute. @@ -400,6 +382,17 @@ public void completed(Project result) throws Exception { */ protected EMap stateCustomizers; + /** + * The cached value of the '{@link #getNonExclusiveStateCustomizers() Non + * Exclusive State Customizers}' map. + * + * @see #getNonExclusiveStateCustomizers() + * @generated + * @ordered + */ + protected EMap nonExclusiveStateCustomizers; + /** * The default value of the '{@link #getProjectName() Project Name}' * attribute. @@ -480,14 +473,32 @@ public void completed(Project result) throws Exception { */ protected Strategy strategy; + /** + * The default value of the '{@link #getBasePackage() Base Package}' + * attribute. + * + * @see #getBasePackage() + * @generated + * @ordered + */ + protected static final String BASE_PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBasePackage() Base Package}' + * attribute. + * + * @see #getBasePackage() + * @generated + * @ordered + */ + protected String basePackage = BASE_PACKAGE_EDEFAULT; + protected String language = LANGUAGE_EDEFAULT; private boolean loading = false; private Object makingLock = new Object(); - private WatchService watch = null; - /** * * @@ -511,15 +522,21 @@ public void resourceChanged(IResourceChangeEvent event) { @Override public boolean visit(IResourceDelta delta) throws CoreException { - if (delta.getResource().getType() == IResource.FILE && delta.getResource().getLocation() - .toFile().getPath().equals(getResource().getURI().toFileString())) { + if (delta.getResource().getType() == IResource.FILE + && delta.getResource().getLocation() != null && delta.getResource().getLocation() + .toFile().getPath().equals(getResource().getURI().toFileString())) { if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) { try { Resource resource = getProject().getWorkspace().getResourceSet().getResource( URI.createFileURI(delta.getResource().getLocation().toString()), false); + EObject eObject = null; + if (!resource.getContents().isEmpty()) + eObject = resource.getContents().get(0); resource.unload(); resource.load(new FileInputStream(delta.getResource().getLocation().toFile()), Collections.emptyMap()); + if (resource.getContents().isEmpty()) + resource.getContents().add(eObject); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { @@ -730,93 +747,92 @@ public void setParent(Item newParent) { } @Override - public String initialize(boolean commit) { + public String initialize() { if (!eIsSet(ClassMakerPackage.STATE__MODEL_NAME)) - super.initialize(commit); + super.initialize(); if (eIsSet(ClassMakerPackage.STATE__PROJECT) && getProject().eIsSet(ClassMakerPackage.Literals.PROJECT__PROJECT_NAME) && ResourceUtils.isProjectExists(getProjectName())) { - URI modelURI = getModelURI(); + ClassMakerPlugin.print(NLS.bind("State {0} of {1} {2} is initializing...", + new Object[] { getTimestamp(), getProject().getName(), getRevision().getVersion() })); + URI modelURI = obtainModelURI(); loadResource(modelURI, !eIsSet(ClassMakerPackage.STATE__RESOURCE), true); saveResource(); if (!getPhase().equals(Stage.LOADED)) setPhase(Stage.MODELED); - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - if (commit) - try { - String[] segments = modelURI.deresolve(URI.createFileURI(root.getRawLocation().toString())) - .segments(); - String[] path = new String[segments.length - 2]; - System.arraycopy(segments, 2, path, 0, segments.length - 2); - add(URI.createHierarchicalURI(path, null, null).toString()); - String result = commit(); - return result; - } catch (Exception e) { - ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); - return null; - } - else { - @SuppressWarnings("unchecked") - SCMOperator operator = (SCMOperator) getProject().getWorkspace().getSCMRegistry() - .get(getProjectName()); - try { - Git git = operator.getRepositorySCM(); - Ref branch = git.getRepository().findRef(getRevision().getVersion().toString()); - LogCommand log = git.log(); - log.add(branch.getObjectId()); - Iterable commits = log.call(); - for (RevCommit c : commits) { - if (operator.decodeTimestamp(c.getShortMessage()) == getTimestamp()) { - String id = c.getId().toString(); - getCommitIds().add(id); - setCommitId(id); - } + @SuppressWarnings("unchecked") + SCMOperator operator = (SCMOperator) getProject().getWorkspace().getSCMRegistry() + .get(getProjectName()); + try { + Git git = operator.getRepositorySCM(); + Ref branch = git.getRepository().findRef(getRevision().getVersion().toString()); + LogCommand log = git.log(); + log.add(branch.getObjectId()); + Iterable commits = log.call(); + for (RevCommit c : commits) { + if (operator.decodeTimestamp(c.getShortMessage()) == getTimestamp()) { + String id = c.getId().toString(); + setCommitId(id); } - } catch (Exception e) { - } finally { + } + if (getCommitId().isEmpty()) { + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); try { - operator.ungetRepositorySCM(); + String[] segments = modelURI.deresolve(URI.createFileURI(root.getRawLocation().toString())) + .segments(); + String[] path = new String[segments.length - 2]; + System.arraycopy(segments, 2, path, 0, segments.length - 2); + add(URI.createHierarchicalURI(path, null, null).toString()); + String result = commit(); + setCommitId(result); + return result; } catch (Exception e) { - ClassMakerPlugin.getInstance().getLog() - .log(new Status(IStatus.ERROR, ClassMakerPlugin.PLUGIN_ID, e.getLocalizedMessage(), e)); + ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); + return null; } } + } catch (Exception e) { + } finally { + try { + operator.ungetRepositorySCM(); + } catch (Exception e) { + ClassMakerPlugin.getInstance().getLog() + .log(new Status(IStatus.ERROR, ClassMakerPlugin.PLUGIN_ID, e.getLocalizedMessage(), e)); + } } } - return getCommitId(); // $NON-NLS-1$ + return getCommitId(); } private URI modelURI; - private URI getModelURI() { - if (modelURI == null) { - IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IProject project = root.getProject( - eIsSet(ClassMakerPackage.STATE__PROJECT_NAME) ? getProjectName() : getModelName().toLowerCase()); - IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); - IFolder folder = project.getFolder(ResourceUtils.getModelFolderName()); - - if (!folder.exists() && getParent().getParent() instanceof Contribution) { - SubMonitor pm = null; - SubMonitor m = null; - try { - pm = SubMonitor.convert(monitor); - pm.setTaskName("Create Folder"); - pm.subTask("Creating folder..."); - m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); - folder.create(true, true, m); - } catch (CoreException e) { - ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); - } finally { - if (m != null) - m.done(); - if (pm != null) - pm.done(); - monitor.done(); - } + private URI obtainModelURI() { + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + IProject project = root.getProject( + eIsSet(ClassMakerPackage.STATE__PROJECT_NAME) ? getProjectName() : getModelName().toLowerCase()); + IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); + IFolder folder = project.getFolder(ResourceUtils.getModelFolderName()); + + if (!folder.exists() && getParent().getParent() instanceof Contribution) { + SubMonitor pm = null; + SubMonitor m = null; + try { + pm = SubMonitor.convert(monitor); + pm.setTaskName("Create Folder"); + pm.subTask("Creating folder..."); + m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); + folder.create(true, true, m); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } finally { + if (m != null) + m.done(); + if (pm != null) + pm.done(); + monitor.done(); } - modelURI = URI.createFileURI(root.getRawLocation().append(getProject().getResourcePath()).toString()); } + modelURI = URI.createFileURI(root.getRawLocation().append(getProject().getResourcePath()).toString()); return modelURI; } @@ -848,7 +864,7 @@ public void loadResource(URI modelURI, boolean create, boolean loadOnDemand) { } catch (CoreException e1) { ClassMakerPlugin.getInstance().getLog().log(e1.getStatus()); } - EObject eObject = contribution.getDomainModel().getGenerated(); + EObject eObject = contribution.getDomainModel().getGeneratedEPackage(); if (eObject instanceof EPackage) resourceSet.getPackageRegistry().put(((EPackage) eObject).getNsURI(), (EPackage) eObject); setResource(resourceSet.getResource(modelURI, loadOnDemand)); @@ -878,12 +894,13 @@ public void loadResource(URI modelURI, boolean create, boolean loadOnDemand) { return; } try { + getResource().setURI(modelURI); getResource().load(Collections.emptyMap()); } catch (IOException e) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createWarningStatus(e)); } if (!getResource().getContents().isEmpty()) { - getDomainModel().setDynamic(EcoreUtil.copy((EObject) getResource().getContents().get(0))); + getDomainModel().setDynamicEPackage(EcoreUtil.copy((EObject) getResource().getContents().get(0))); } loading = false; } @@ -896,9 +913,9 @@ public void saveResource() { try { if (!eIsSet(ClassMakerPackage.STATE__RESOURCE)) return; - if (getPhase().getValue() >= Stage.MODELED_VALUE && getDomainModel().getDynamic() != null - && getDomainModel().getDynamic().eResource() != null) { - Resource importSource = getDomainModel().getDynamic().eResource(); + if (getPhase().getValue() >= Stage.MODELED_VALUE && getDomainModel().getDynamicEPackage() != null + && getDomainModel().getDynamicEPackage().eResource() != null) { + Resource importSource = getDomainModel().getDynamicEPackage().eResource(); try { importSource.load(Collections.emptyMap()); setPhase(Stage.MODELED); @@ -913,21 +930,23 @@ && getDomainModel().getDynamic().eResource() != null) { resource.eSetDeliver(deliver); ClassMakerPlugin.getInstance().getLog().log( ClassMakerPlugin.createInfoStatus(NLS.bind(Messages.ResourceImported, importSource.getURI()))); - } else if (getPhase().getValue() >= Stage.MODELED_VALUE && getDomainModel().getDynamic() != null - && objectsDiffer(getDomainModel().getDynamic(), resource.getContents()) + } else if (getPhase().getValue() >= Stage.MODELED_VALUE && getDomainModel().getDynamicEPackage() != null + && objectsDiffer(getDomainModel().getDynamicEPackage(), resource.getContents()) && resource.getContents().isEmpty()) { boolean deliver = resource.eDeliver(); resource.eSetDeliver(false); resource.getContents().clear(); - resource.getContents().add(EcoreUtil.copy(getDomainModel().getDynamic())); + resource.getContents().add(EcoreUtil.copy(getDomainModel().getDynamicEPackage())); resource.eSetDeliver(deliver); setPhase(Stage.MODELED); } if (!resource.getContents().isEmpty()) { - Map options = new HashMap(); + Map options = new HashMap(); options.put(XMLResource.OPTION_ENCODING, "UTF-8"); options.put(XMLResource.OPTION_SAVE_ONLY_IF_CHANGED, XMLResource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + ((XMLResource) resource).getDefaultSaveOptions().put(XMLResource.OPTION_PROCESS_DANGLING_HREF, + XMLResource.OPTION_PROCESS_DANGLING_HREF_RECORD); resource.save(options); } } catch (IOException e) { @@ -992,13 +1011,12 @@ public String make(IProgressMonitor monitor) throws Exception { SubMonitor m = null; try { if (isMaking()) - if (!getCommitIds().isEmpty()) - return ListUtil.getLast(getCommitIds()); + if (!eIsSet(ClassMakerPackage.STATE__COMMIT_ID)) + return getCommitId(); else return ""; //$NON-NLS-1$ - saveResource(); try { - loadResource(getModelURI(), !eIsSet(ClassMakerPackage.STATE__RESOURCE), true); + loadResource(obtainModelURI(), !eIsSet(ClassMakerPackage.STATE__RESOURCE), true); } catch (Exception e) { } saveResource(); @@ -1025,7 +1043,8 @@ public String make(IProgressMonitor monitor) throws Exception { ResourceUtils.createProject(project, ClassMakerPlugin.CONTRIBUTION_NATURE_ID, wrappingMonitor); } - getStrategy().configureJobs(getStrategy().getGenerators().isEmpty(), wrappingMonitor); + getStrategy().configureJobs(getStrategy().get(Stage.GENERATED, "project.create.generator").isEmpty(), + wrappingMonitor); monitor.beginTask(Messages.Save, 4); @@ -1035,23 +1054,23 @@ public String make(IProgressMonitor monitor) throws Exception { saveResource(); setPhase(Stage.MODELED); case Stage.MODELED_VALUE: - job = EnterpriseDomainJob - .getJob(getStrategy().getGenerators().get(getStrategy().getGenerators().size() - 1)); + job = EnterpriseDomainJob.getJob(getStrategy().get(Stage.GENERATED, "project.create.generator") + .get(getStrategy().get(Stage.GENERATED, "project.create.generator").size() - 1)); job.schedule(); break; case Stage.GENERATED_VALUE: - job = EnterpriseDomainJob - .getJob(getStrategy().getExporters().get(getStrategy().getExporters().size() - 1)); + job = EnterpriseDomainJob.getJob(getStrategy().get(Stage.EXPORTED, "project.create.exporter") + .get(getStrategy().get(Stage.EXPORTED, "project.create.exporter").size() - 1)); job.schedule(); break; case Stage.EXPORTED_VALUE: - job = EnterpriseDomainJob - .getJob(getStrategy().getInstallers().get(getStrategy().getInstallers().size() - 1)); + job = EnterpriseDomainJob.getJob(getStrategy().get(Stage.INSTALLED, "project.create.installer") + .get(getStrategy().get(Stage.INSTALLED, "project.create.installer").size() - 1)); job.schedule(); break; case Stage.INSTALLED_VALUE: - job = EnterpriseDomainJob - .getJob(getStrategy().getLoaders().get(getStrategy().getLoaders().size() - 1)); + job = EnterpriseDomainJob.getJob(getStrategy().get(Stage.LOADED, "project.create.loader") + .get(getStrategy().get(Stage.LOADED, "project.create.loader").size() - 1)); job.schedule(); break; } @@ -1085,8 +1104,8 @@ public String make(IProgressMonitor monitor) throws Exception { wrappingMonitor.done(); } if (!monitor.isCanceled() || (!getPhase().equals(Stage.LOADED) - && !getDomainModel().eIsSet(ClassMakerPackage.Literals.MODELS__GENERATED))) { - makingLock.wait(7000); + && !getDomainModel().eIsSet(ClassMakerPackage.Literals.MODELS__GENERATED_EPACKAGE))) { + makingLock.wait(6000); Thread.yield(); } getProject().removeCompletionListener(completionListener); @@ -1106,11 +1125,12 @@ public String make(IProgressMonitor monitor) throws Exception { */ @Override public void load(boolean create, boolean loadOnDemand) throws CoreException { - loadResource(getModelURI(), create, loadOnDemand); + loadResource(obtainModelURI(), create, loadOnDemand); if (ClassMakerServiceImpl.initializing && getPhase().getValue() == Stage.LOADED_VALUE) { - getStrategy().configureJobs(getStrategy().getLoaders().isEmpty(), ClassMakerPlugin.getProgressMonitor()); - Job job = EnterpriseDomainJob - .getJob(getStrategy().getInstallers().get(getStrategy().getInstallers().size() - 1)); + getStrategy().configureJobs(getStrategy().get(Stage.LOADED, "project.create.loader").isEmpty(), + ClassMakerPlugin.getProgressMonitor()); + Job job = EnterpriseDomainJob.getJob(getStrategy().get(Stage.INSTALLED, "project.create.installer") + .get(getStrategy().get(Stage.INSTALLED, "project.create.installer").size() - 1)); job.schedule(); try { job.join(); @@ -1125,11 +1145,8 @@ public void load(boolean create, boolean loadOnDemand) throws CoreException { * @generated NOT */ public void checkout() { - if (getCommitIds().isEmpty()) { - return; - } if (!eIsSet(ClassMakerPackage.STATE__COMMIT_ID)) - setCommitId(ListUtil.getLast(getCommitIds())); + setCommitId(getCommitId()); checkout(getCommitId(), true); } @@ -1155,7 +1172,6 @@ public void checkout(String commitId, boolean forced) { } catch (Exception e) { ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); } - } /** @@ -1181,7 +1197,6 @@ public String commit() throws Exception { .get(getProjectName()); String commitId = null; commitId = operator.commit(operator.encodeCommitMessage(this)); - getCommitIds().add(commitId); setCommitId(commitId); return commitId; } @@ -1196,6 +1211,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, switch (featureID) { case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: return ((InternalEList) getStateCustomizers()).basicRemove(otherEnd, msgs); + case ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS: + return ((InternalEList) getNonExclusiveStateCustomizers()).basicRemove(otherEnd, msgs); case ClassMakerPackage.STATE__STRATEGY: return basicSetStrategy(null, msgs); } @@ -1218,17 +1235,17 @@ public void notifyChanged(Notification msg) { case Notification.ADD: if (msg.getNewValue() != null && msg.getNewValue() instanceof EObject) { if (findExistingEObject((EObject) msg.getNewValue()) == null) { - getDomainModel().setDynamic(copyEObject((EObject) msg.getNewValue())); + getDomainModel().setDynamicEPackage(copyEObject((EObject) msg.getNewValue())); } } break; case Notification.SET: if (msg.getOldValue() != null && msg.getOldValue() instanceof EObject) - getDomainModel().setDynamic(null); + getDomainModel().setDynamicEPackage(null); if (msg.getNewValue() != null && msg.getNewValue() instanceof EObject && !(msg.getNewValue() instanceof Item)) if (findExistingEObject((EObject) msg.getNewValue()) == null) { - getDomainModel().setDynamic(copyEObject((EObject) msg.getNewValue())); + getDomainModel().setDynamicEPackage(copyEObject((EObject) msg.getNewValue())); } break; @@ -1236,13 +1253,13 @@ public void notifyChanged(Notification msg) { if (msg.getOldValue() != null) { for (Object object : (Iterable) msg.getOldValue()) if (object instanceof EObject) { - getDomainModel().setDynamic(null); + getDomainModel().setDynamicEPackage(null); } } break; case Notification.REMOVE: if (msg.getOldValue() != null && msg.getOldValue() instanceof EObject) { - getDomainModel().setDynamic(null); + getDomainModel().setDynamicEPackage(null); } break; } @@ -1256,9 +1273,9 @@ private EObject copyEObject(EObject eObject) { } private EObject findExistingEObject(EObject query) { - if (!(getDomainModel().getDynamic() instanceof EObject)) + if (!(getDomainModel().getDynamicEPackage() instanceof EObject)) return null; - EObject eObject = getDomainModel().getDynamic(); + EObject eObject = getDomainModel().getDynamicEPackage(); if (ModelUtil.eObjectsAreEqual(eObject, query, true)) return eObject; return null; @@ -1276,7 +1293,7 @@ public void notifyChanged(Notification notification) { if (resourceModelsSynchronizing) return; if (notification.getNotifier() instanceof Models - && notification.getFeatureID(Models.class) == ClassMakerPackage.MODELS__DYNAMIC) { + && notification.getFeatureID(Models.class) == ClassMakerPackage.MODELS__DYNAMIC_EPACKAGE) { resourceModelsSynchronizing = true; boolean deliver = getResource().eDeliver(); getResource().eSetDeliver(false); @@ -1309,6 +1326,8 @@ public void notifyChanged(Notification notification) { public void copyModel(Item from) { if (from instanceof Contribution && !((ContributionImpl) from).isStateSet()) return; + if (from.getResource() != null) + EcoreUtil.resolveAll(from.getResource()); super.copyModel(from); } @@ -1392,43 +1411,6 @@ public void setJobFamily(String newJobFamily) { jobFamily)); } - /** - * - * - * @generated - */ - @Override - public Resource getResource() { - return resource; - } - - /** - * - * - * @generated - */ - @Override - public void setResource(Resource newResource) { - Resource oldResource = resource; - resource = newResource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.STATE__RESOURCE, oldResource, - resource)); - } - - /** - * - * - * @generated - */ - @Override - public EList getCommitIds() { - if (commitIds == null) { - commitIds = new EDataTypeUniqueEList(String.class, this, ClassMakerPackage.STATE__COMMIT_IDS); - } - return commitIds; - } - /** * * @@ -1473,6 +1455,22 @@ public EMap getStateCustomizers() { return stateCustomizers; } + /** + * + * + * @generated + */ + @Override + public EMap getNonExclusiveStateCustomizers() { + if (nonExclusiveStateCustomizers == null) { + nonExclusiveStateCustomizers = new EcoreEMap( + ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY, + StageQualifierToCustomizerMapEntryImpl.class, this, + ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS); + } + return nonExclusiveStateCustomizers; + } + /** * * @@ -1633,6 +1631,30 @@ public void setStrategy(Strategy newStrategy) { newStrategy)); } + /** + * + * + * @generated + */ + @Override + public String getBasePackage() { + return basePackage; + } + + /** + * + * + * @generated + */ + @Override + public void setBasePackage(String newBasePackage) { + String oldBasePackage = basePackage; + basePackage = newBasePackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.STATE__BASE_PACKAGE, oldBasePackage, + basePackage)); + } + /** * * @@ -1702,12 +1724,12 @@ public void delete(IProgressMonitor monitor) throws CoreException { */ public EObject find(EObject eObject, Stage stage) { if (stage.equals(Stage.MODELED)) { - EObject dynamicEObject = getDomainModel().getDynamic(); + EObject dynamicEObject = getDomainModel().getDynamicEPackage(); if (ModelUtil.eObjectsAreEqual(eObject, dynamicEObject, false)) return dynamicEObject; } if (stage.equals(Stage.GENERATED)) { - EObject generatedEObject = getDomainModel().getGenerated(); + EObject generatedEObject = getDomainModel().getGeneratedEPackage(); if (ModelUtil.eObjectsAreEqual(eObject, generatedEObject, false)) return generatedEObject; } @@ -1746,10 +1768,6 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getEditorDeployableUnitName(); case ClassMakerPackage.STATE__JOB_FAMILY: return getJobFamily(); - case ClassMakerPackage.STATE__RESOURCE: - return getResource(); - case ClassMakerPackage.STATE__COMMIT_IDS: - return getCommitIds(); case ClassMakerPackage.STATE__COMMIT_ID: return getCommitId(); case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: @@ -1757,6 +1775,11 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getStateCustomizers(); else return getStateCustomizers().map(); + case ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS: + if (coreType) + return getNonExclusiveStateCustomizers(); + else + return getNonExclusiveStateCustomizers().map(); case ClassMakerPackage.STATE__PROJECT_NAME: return getProjectName(); case ClassMakerPackage.STATE__MAKING: @@ -1769,6 +1792,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { if (resolve) return getStrategy(); return basicGetStrategy(); + case ClassMakerPackage.STATE__BASE_PACKAGE: + return getBasePackage(); } return super.eGet(featureID, resolve, coreType); } @@ -1813,19 +1838,15 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.STATE__JOB_FAMILY: setJobFamily((String) newValue); return; - case ClassMakerPackage.STATE__RESOURCE: - setResource((Resource) newValue); - return; - case ClassMakerPackage.STATE__COMMIT_IDS: - getCommitIds().clear(); - getCommitIds().addAll((Collection) newValue); - return; case ClassMakerPackage.STATE__COMMIT_ID: setCommitId((String) newValue); return; case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: ((EStructuralFeature.Setting) getStateCustomizers()).set(newValue); return; + case ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS: + ((EStructuralFeature.Setting) getNonExclusiveStateCustomizers()).set(newValue); + return; case ClassMakerPackage.STATE__PROJECT_NAME: setProjectName((String) newValue); return; @@ -1841,6 +1862,9 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.STATE__STRATEGY: setStrategy((Strategy) newValue); return; + case ClassMakerPackage.STATE__BASE_PACKAGE: + setBasePackage((String) newValue); + return; } super.eSet(featureID, newValue); } @@ -1883,18 +1907,15 @@ public void eUnset(int featureID) { case ClassMakerPackage.STATE__JOB_FAMILY: setJobFamily(JOB_FAMILY_EDEFAULT); return; - case ClassMakerPackage.STATE__RESOURCE: - setResource((Resource) null); - return; - case ClassMakerPackage.STATE__COMMIT_IDS: - getCommitIds().clear(); - return; case ClassMakerPackage.STATE__COMMIT_ID: setCommitId(COMMIT_ID_EDEFAULT); return; case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: getStateCustomizers().clear(); return; + case ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS: + getNonExclusiveStateCustomizers().clear(); + return; case ClassMakerPackage.STATE__PROJECT_NAME: setProjectName(PROJECT_NAME_EDEFAULT); return; @@ -1910,6 +1931,9 @@ public void eUnset(int featureID) { case ClassMakerPackage.STATE__STRATEGY: setStrategy((Strategy) null); return; + case ClassMakerPackage.STATE__BASE_PACKAGE: + setBasePackage(BASE_PACKAGE_EDEFAULT); + return; } super.eUnset(featureID); } @@ -1948,14 +1972,12 @@ public boolean eIsSet(int featureID) { : !EDITOR_DEPLOYABLE_UNIT_NAME_EDEFAULT.equals(getEditorDeployableUnitName()); case ClassMakerPackage.STATE__JOB_FAMILY: return JOB_FAMILY_EDEFAULT == null ? jobFamily != null : !JOB_FAMILY_EDEFAULT.equals(jobFamily); - case ClassMakerPackage.STATE__RESOURCE: - return resource != null; - case ClassMakerPackage.STATE__COMMIT_IDS: - return commitIds != null && !commitIds.isEmpty(); case ClassMakerPackage.STATE__COMMIT_ID: return COMMIT_ID_EDEFAULT == null ? commitId != null : !COMMIT_ID_EDEFAULT.equals(commitId); case ClassMakerPackage.STATE__STATE_CUSTOMIZERS: return stateCustomizers != null && !stateCustomizers.isEmpty(); + case ClassMakerPackage.STATE__NON_EXCLUSIVE_STATE_CUSTOMIZERS: + return nonExclusiveStateCustomizers != null && !nonExclusiveStateCustomizers.isEmpty(); case ClassMakerPackage.STATE__PROJECT_NAME: return PROJECT_NAME_EDEFAULT == null ? getProjectName() != null : !PROJECT_NAME_EDEFAULT.equals(getProjectName()); @@ -1967,6 +1989,8 @@ public boolean eIsSet(int featureID) { return editor != EDITOR_EDEFAULT; case ClassMakerPackage.STATE__STRATEGY: return strategy != null; + case ClassMakerPackage.STATE__BASE_PACKAGE: + return BASE_PACKAGE_EDEFAULT == null ? basePackage != null : !BASE_PACKAGE_EDEFAULT.equals(basePackage); } return super.eIsSet(featureID); } @@ -1994,8 +2018,6 @@ public String toString() { result.append(timestamp); result.append(", jobFamily: "); result.append(jobFamily); - result.append(", commitIds: "); - result.append(commitIds); result.append(", commitId: "); result.append(commitId); result.append(", making: "); @@ -2004,6 +2026,8 @@ public String toString() { result.append(edit); result.append(", editor: "); result.append(editor); + result.append(", basePackage: "); + result.append(basePackage); result.append(')'); return result.toString(); } @@ -2056,22 +2080,23 @@ public void build(IProgressMonitor monitor) throws CoreException { break; case Stage.MODELED_VALUE: saveResource(); - generatorJob = EnterpriseDomainJob - .getJob(getStrategy().getGenerators().get(getStrategy().getGenerators().size() - 1)); + generatorJob = EnterpriseDomainJob.getJob(getStrategy().get(Stage.GENERATED, "project.create.generator") + .get(getStrategy().get(Stage.GENERATED, "project.create.generator").size() - 1)); generatorJob.schedule(); break; case Stage.GENERATED_VALUE: - exportJob = EnterpriseDomainJob - .getJob(getStrategy().getExporters().get(getStrategy().getExporters().size() - 1)); + exportJob = EnterpriseDomainJob.getJob(getStrategy().get(Stage.EXPORTED, "project.create.exporter") + .get(getStrategy().get(Stage.EXPORTED, "project.create.exporter").size() - 1)); exportJob.schedule(); break; case Stage.EXPORTED_VALUE: - installJob = EnterpriseDomainJob - .getJob(getStrategy().getInstallers().get(getStrategy().getInstallers().size() - 1)); + installJob = EnterpriseDomainJob.getJob(getStrategy().get(Stage.INSTALLED, "project.create.installer") + .get(getStrategy().get(Stage.INSTALLED, "project.create.installer").size() - 1)); installJob.schedule(); break; case Stage.INSTALLED_VALUE: - loadJob = EnterpriseDomainJob.getJob(getStrategy().getLoaders().get(getStrategy().getLoaders().size() - 1)); + loadJob = EnterpriseDomainJob.getJob(getStrategy().get(Stage.LOADED, "project.create.loader") + .get(getStrategy().get(Stage.LOADED, "project.create.loader").size() - 1)); loadJob.schedule(); break; } @@ -2094,7 +2119,6 @@ public void build(IProgressMonitor monitor) throws CoreException { } catch (Exception e) { throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); } - } } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StrategyImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StrategyImpl.java index 808d4622..2e59f76b 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StrategyImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StrategyImpl.java @@ -15,22 +15,26 @@ */ package org.enterprisedomain.classmaker.impl; -import java.util.Collection; +import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; +import javax.management.Notification; + import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectEList; +import org.eclipse.emf.ecore.util.EcoreEMap; +import org.eclipse.emf.ecore.util.InternalEList; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.ClassMakerService; import org.enterprisedomain.classmaker.Customizer; @@ -51,70 +55,34 @@ * The following features are implemented: *

    *
      - *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getGenerators - * Generators}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getExporters - * Exporters}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getInstallers - * Installers}
    • - *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getLoaders - * Loaders}
    • *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getState * State}
    • + *
    • {@link org.enterprisedomain.classmaker.impl.StrategyImpl#getWorkers + * Workers}
    • *
    * * @generated */ public class StrategyImpl extends EObjectImpl implements Strategy { /** - * The cached value of the '{@link #getGenerators() Generators}' - * reference list. - * - * @see #getGenerators() - * @generated - * @ordered - */ - protected EList generators; - - /** - * The cached value of the '{@link #getExporters() Exporters}' - * reference list. - * - * @see #getExporters() - * @generated - * @ordered - */ - protected EList exporters; - - /** - * The cached value of the '{@link #getInstallers() Installers}' - * reference list. - * - * @see #getInstallers() - * @generated - * @ordered - */ - protected EList installers; - - /** - * The cached value of the '{@link #getLoaders() Loaders}' reference - * list. + * The cached value of the '{@link #getState() State}' reference. * - * @see #getLoaders() + * @see #getState() * @generated * @ordered */ - protected EList loaders; + protected State state; /** - * The cached value of the '{@link #getState() State}' reference. * - * @see #getState() + * @see #getWorkers() * @generated * @ordered */ - protected State state; + protected EMap> workers; /** * @@ -135,58 +103,6 @@ protected EClass eStaticClass() { return ClassMakerPackage.Literals.STRATEGY; } - /** - * - * - * @generated - */ - @Override - public EList getGenerators() { - if (generators == null) { - generators = new EObjectEList(Worker.class, this, ClassMakerPackage.STRATEGY__GENERATORS); - } - return generators; - } - - /** - * - * - * @generated - */ - @Override - public EList getExporters() { - if (exporters == null) { - exporters = new EObjectEList(Worker.class, this, ClassMakerPackage.STRATEGY__EXPORTERS); - } - return exporters; - } - - /** - * - * - * @generated - */ - @Override - public EList getInstallers() { - if (installers == null) { - installers = new EObjectEList(Worker.class, this, ClassMakerPackage.STRATEGY__INSTALLERS); - } - return installers; - } - - /** - * - * - * @generated - */ - @Override - public EList getLoaders() { - if (loaders == null) { - loaders = new EObjectEList(Worker.class, this, ClassMakerPackage.STRATEGY__LOADERS); - } - return loaders; - } - /** * * @@ -260,13 +176,16 @@ public void setState(State newState) { /** * * - * @generated NOT + * @generated */ - public Worker createGenerator() { - getGenerators().add(createWithCustomizer( - ClassMakerService.Stages.lookup(ClassMakerService.Stages.ID_PREFIX + "project.create.generator"), //$NON-NLS-1$ - getGenerators().size(), getEclipseProject(), getState().getTimestamp())); - return getGenerators().get(getGenerators().size() - 1); + @Override + public EMap> getWorkers() { + if (workers == null) { + workers = new EcoreEMap>( + ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY, + StageQualifierToWorkersMapEntryImpl.class, this, ClassMakerPackage.STRATEGY__WORKERS); + } + return workers; } /** @@ -274,35 +193,30 @@ public Worker createGenerator() { * * @generated NOT */ - public Worker createExporter() { - getExporters().add(createWithCustomizer( - ClassMakerService.Stages.lookup(ClassMakerService.Stages.ID_PREFIX + "project.create.exporter"), //$NON-NLS-1$ - getExporters().size(), Long.valueOf(getState().getTimestamp()))); - return getExporters().get(getExporters().size() - 1); + private Worker create(Stage stage, String step) { + StageQualifier stageQualifier = stageLookup(stage, step); + Worker worker = createWithCustomizer(stageQualifier, + getWorkers().get(stageQualifier) != null ? getWorkers().get(stageQualifier).size() : 0, + getState().getTimestamp(), getEclipseProject()); + if (getWorkers().containsKey(stageQualifier)) { + EList workers = ECollections.newBasicEList(); + workers.add(worker); + getWorkers().put(stageQualifier, workers); + } else { + getWorkers().put(stageQualifier, ECollections.newBasicEList(worker)); + } + return worker; } - /** - * - * - * @generated NOT - */ - public Worker createInstaller() { - getInstallers().add(createWithCustomizer( - ClassMakerService.Stages.lookup(ClassMakerService.Stages.ID_PREFIX + "project.create.installer"), //$NON-NLS-1$ - getInstallers().size(), Long.valueOf(getState().getTimestamp()))); - return getInstallers().get(getInstallers().size() - 1); + private StageQualifier stageLookup(Stage stage, String step) { + return ClassMakerService.Stages.lookup(stage, step); } - /** - * - * - * @generated NOT - */ - public Worker createModelLoader() { - getLoaders().add(createWithCustomizer( - ClassMakerService.Stages.lookup(ClassMakerService.Stages.ID_PREFIX + "project.create.loader"), //$NON-NLS-1$ - getLoaders().size(), Long.valueOf(getState().getTimestamp()))); - return getLoaders().get(getLoaders().size() - 1); + private Worker getOrCreate(boolean create, Stage stage, String step) { + if (create) + return create(stage, step); + else + return get(stage, step).get(get(stage, step).size() - 1); } /** @@ -312,11 +226,16 @@ public Worker createModelLoader() { */ @Override public Worker getReturnWorker() { - int depth = configureJobs(getGenerators().size() < 5, ClassMakerPlugin.getProgressMonitor()); - EnterpriseDomainJob generatorJob = EnterpriseDomainJob.getJob(getGenerators().get(depth)); - EnterpriseDomainJob exporterJob = EnterpriseDomainJob.getJob(getExporters().get(depth)); - EnterpriseDomainJob installerJob = EnterpriseDomainJob.getJob(getInstallers().get(depth)); - EnterpriseDomainJob loaderJob = EnterpriseDomainJob.getJob(getLoaders().get(depth)); + int depth = configureJobs(get(Stage.GENERATED, "project.create.generator").size() < 5, + ClassMakerPlugin.getProgressMonitor()); + EnterpriseDomainJob generatorJob = EnterpriseDomainJob + .getJob(get(Stage.GENERATED, "project.create.generator").get(depth)); + EnterpriseDomainJob exporterJob = EnterpriseDomainJob + .getJob(get(Stage.EXPORTED, "project.create.exporter").get(depth)); + EnterpriseDomainJob installerJob = EnterpriseDomainJob + .getJob(get(Stage.INSTALLED, "project.create.installer").get(depth)); + EnterpriseDomainJob loaderJob = EnterpriseDomainJob + .getJob(get(Stage.LOADED, "project.create.loader").get(depth)); switch (depth % 5) { case 1: switch (getState().getPhase().getValue()) { @@ -377,11 +296,7 @@ private IProject getEclipseProject() { */ @Override public int configureJobs(boolean create, IProgressMonitor monitor) { - Worker exporter = null; - if (create) - exporter = createExporter(); - else - exporter = getExporters().get(getExporters().size() - 1); + Worker exporter = getOrCreate(create, Stage.EXPORTED, "project.create.exporter"); EnterpriseDomainJob exporterJob = EnterpriseDomainJob.getJob(exporter); exporterJob.setContributionState(getState()); @@ -391,13 +306,9 @@ public int configureJobs(boolean create, IProgressMonitor monitor) { exporterJob.setProject(getEclipseProject()); exporterJob.setChangeRule(changeRule); exporter.getProperties().put(AbstractExporter.EXPORT_DESTINATION_PROP, - ResourceUtils.getExportDestination(getEclipseProject()).toString()); + ResourceUtils.getExportDestination(getState()).toString()); - Worker generator = null; - if (create) - generator = createGenerator(); - else - generator = getGenerators().get(getGenerators().size() - 1); + Worker generator = getOrCreate(create, Stage.GENERATED, "project.create.generator"); EnterpriseDomainJob generatorJob = EnterpriseDomainJob.getJob(generator); generatorJob.setResourceSet(getState().getProject().getWorkspace().getResourceSet()); generatorJob.setContributionState(getState()); @@ -405,27 +316,19 @@ public int configureJobs(boolean create, IProgressMonitor monitor) { generatorJob.setProgressGroup(monitor, 1); generatorJob.setNextJob(exporterJob); - Worker installer = null; - if (create) - installer = createInstaller(); - else - installer = getInstallers().get(getInstallers().size() - 1); + Worker installer = getOrCreate(create, Stage.INSTALLED, "project.create.installer"); EnterpriseDomainJob installJob = EnterpriseDomainJob.getJob(installer); installJob.setContributionState(getState()); installJob.setProject(getEclipseProject()); exporterJob.setNextJob(installJob); - Worker modelLoader = null; - if (create) - modelLoader = createModelLoader(); - else - modelLoader = getLoaders().get(getLoaders().size() - 1); + Worker modelLoader = getOrCreate(create, Stage.LOADED, "project.create.loader"); EnterpriseDomainJob loadJob = EnterpriseDomainJob.getJob(modelLoader); loadJob.setContributionState(getState()); loadJob.addListener(); installJob.setNextJob(loadJob); - return getGenerators().size() - 1; + return get(Stage.GENERATED, "project.create.generator").size() - 1; } /** @@ -435,14 +338,14 @@ public int configureJobs(boolean create, IProgressMonitor monitor) { */ @Override public void configuteBuildJobs(IProgressMonitor monitor) { - Worker exporter = createExporter(); + Worker exporter = create(Stage.EXPORTED, "project.create.exporter"); EnterpriseDomainJob exportJob = EnterpriseDomainJob.getJob(exporter); exportJob.setContributionState(getState()); exportJob.setProject(getEclipseProject()); exporter.getProperties().put(AbstractExporter.EXPORT_DESTINATION_PROP, - ResourceUtils.getExportDestination(getEclipseProject()).toString()); + ResourceUtils.getExportDestination(getState()).toString()); - Worker generator = createGenerator(); + Worker generator = create(Stage.GENERATED, "project.create.generator"); EnterpriseDomainJob generatorJob = EnterpriseDomainJob.getJob(generator); generatorJob.setResourceSet(getState().getProject().getWorkspace().getResourceSet()); generatorJob.setContributionState(getState()); @@ -450,11 +353,12 @@ public void configuteBuildJobs(IProgressMonitor monitor) { generatorJob.setProgressGroup(monitor, 1); generatorJob.setNextJob(exportJob); - EnterpriseDomainJob installJob = EnterpriseDomainJob.getJob(createInstaller()); + EnterpriseDomainJob installJob = EnterpriseDomainJob + .getJob(create(Stage.INSTALLED, "project.create.installer")); installJob.setContributionState(getState()); installJob.setProject(getEclipseProject()); - EnterpriseDomainJob loadJob = EnterpriseDomainJob.getJob(createModelLoader()); + EnterpriseDomainJob loadJob = EnterpriseDomainJob.getJob(create(Stage.LOADED, "project.create.loader")); loadJob.setContributionState(getState()); loadJob.addListener(); @@ -462,6 +366,20 @@ public void configuteBuildJobs(IProgressMonitor monitor) { installJob.setNextJob(loadJob); } + /** + * + * + * @generated NOT + */ + @Override + public EList get(Stage stage, String step) { + StageQualifier stageQualifier = stageLookup(stage, step); + if (getWorkers().containsKey(stageQualifier)) + return getWorkers().get(stageQualifier); + else + return ECollections.emptyEList(); + } + /** * * @@ -489,6 +407,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, switch (featureID) { case ClassMakerPackage.STRATEGY__STATE: return basicSetState(null, msgs); + case ClassMakerPackage.STRATEGY__WORKERS: + return ((InternalEList) getWorkers()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -497,8 +417,32 @@ private Worker createWithCustomizer(StageQualifier stage, Object... customizerAr SortedSet customizers = createCustomizers(stage); if (customizers == null) return null; - Customizer customizer = customizers.last(); - return (Worker) (customizer.customize(ECollections.asEList(customizerArgs))); + Customizer c = customizers.last(); + SortedSet neCustomizers = createNonExclusiveCustomizers(stage); + Worker w = (Worker) c.customize(ECollections.asEList(customizerArgs)); + EnterpriseDomainJob e = w.getAdapter(EnterpriseDomainJob.class); + if (neCustomizers == null) + return w; + EnterpriseDomainJob job = null; + Iterator it = neCustomizers.iterator(); + Customizer n = null; + if (it.hasNext()) { + n = it.next(); + job = ((Worker) n.customize(ECollections.asEList(customizerArgs))).getAdapter(EnterpriseDomainJob.class); + job.setExclusive(false); + e.setNextJob(job); + } + while (it.hasNext()) { + job = ((Worker) n.customize(ECollections.asEList(customizerArgs))).getAdapter(EnterpriseDomainJob.class); + if (job != null) { + job.setExclusive(false); + n = it.next(); + job.setNextJob(((Worker) n.customize(ECollections.asEList(customizerArgs))) + .getAdapter(EnterpriseDomainJob.class)); + job.getNextJob().setExclusive(false); + } + } + return w; } private SortedSet createCustomizers(StageQualifier stage) { @@ -515,6 +459,20 @@ private SortedSet createCustomizers(StageQualifier stage) { return customizers; } + private SortedSet createNonExclusiveCustomizers(StageQualifier stage) { + SortedSet customizers = new TreeSet(new Customizer.CustomizerComparator()); + + for (StageQualifier filter : getState().getNonExclusiveStateCustomizers().keySet()) + if (stage.equals(filter)) + customizers.add(getState().getNonExclusiveStateCustomizers().get(filter)); + for (StageQualifier filter : getState().getProject().getWorkspace().getNonExclusiveCustomizers().keySet()) + if (filter.equals(stage)) + customizers.add(getState().getProject().getWorkspace().getNonExclusiveCustomizers().get(filter)); + if (customizers.isEmpty()) + return null; + return customizers; + } + /** * * @@ -523,18 +481,15 @@ private SortedSet createCustomizers(StageQualifier stage) { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ClassMakerPackage.STRATEGY__GENERATORS: - return getGenerators(); - case ClassMakerPackage.STRATEGY__EXPORTERS: - return getExporters(); - case ClassMakerPackage.STRATEGY__INSTALLERS: - return getInstallers(); - case ClassMakerPackage.STRATEGY__LOADERS: - return getLoaders(); case ClassMakerPackage.STRATEGY__STATE: if (resolve) return getState(); return basicGetState(); + case ClassMakerPackage.STRATEGY__WORKERS: + if (coreType) + return getWorkers(); + else + return getWorkers().map(); } return super.eGet(featureID, resolve, coreType); } @@ -544,29 +499,15 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { * * @generated */ - @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ClassMakerPackage.STRATEGY__GENERATORS: - getGenerators().clear(); - getGenerators().addAll((Collection) newValue); - return; - case ClassMakerPackage.STRATEGY__EXPORTERS: - getExporters().clear(); - getExporters().addAll((Collection) newValue); - return; - case ClassMakerPackage.STRATEGY__INSTALLERS: - getInstallers().clear(); - getInstallers().addAll((Collection) newValue); - return; - case ClassMakerPackage.STRATEGY__LOADERS: - getLoaders().clear(); - getLoaders().addAll((Collection) newValue); - return; case ClassMakerPackage.STRATEGY__STATE: setState((State) newValue); return; + case ClassMakerPackage.STRATEGY__WORKERS: + ((EStructuralFeature.Setting) getWorkers()).set(newValue); + return; } super.eSet(featureID, newValue); } @@ -579,21 +520,12 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case ClassMakerPackage.STRATEGY__GENERATORS: - getGenerators().clear(); - return; - case ClassMakerPackage.STRATEGY__EXPORTERS: - getExporters().clear(); - return; - case ClassMakerPackage.STRATEGY__INSTALLERS: - getInstallers().clear(); - return; - case ClassMakerPackage.STRATEGY__LOADERS: - getLoaders().clear(); - return; case ClassMakerPackage.STRATEGY__STATE: setState((State) null); return; + case ClassMakerPackage.STRATEGY__WORKERS: + getWorkers().clear(); + return; } super.eUnset(featureID); } @@ -606,16 +538,10 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case ClassMakerPackage.STRATEGY__GENERATORS: - return generators != null && !generators.isEmpty(); - case ClassMakerPackage.STRATEGY__EXPORTERS: - return exporters != null && !exporters.isEmpty(); - case ClassMakerPackage.STRATEGY__INSTALLERS: - return installers != null && !installers.isEmpty(); - case ClassMakerPackage.STRATEGY__LOADERS: - return loaders != null && !loaders.isEmpty(); case ClassMakerPackage.STRATEGY__STATE: return state != null; + case ClassMakerPackage.STRATEGY__WORKERS: + return workers != null && !workers.isEmpty(); } return super.eIsSet(featureID); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/VersionToRevisionMapEntryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/VersionToRevisionMapEntryImpl.java index e01f3ce3..cf523475 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/VersionToRevisionMapEntryImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/VersionToRevisionMapEntryImpl.java @@ -15,7 +15,8 @@ */ package org.enterprisedomain.classmaker.impl; -import org.eclipse.emf.common.notify.Notification; +import javax.management.Notification; + import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.BasicEMap; import org.eclipse.emf.common.util.EMap; @@ -26,7 +27,6 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.Revision; -import org.osgi.framework.Version; /** * An implementation of the model object 'Version diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/WorkspaceImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/WorkspaceImpl.java index 90c5fc05..7600a9d7 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/WorkspaceImpl.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/WorkspaceImpl.java @@ -15,21 +15,20 @@ */ package org.enterprisedomain.classmaker.impl; -import java.io.File; import java.io.IOException; import java.net.MalformedURLException; -import java.util.ArrayList; +import java.net.URI; import java.util.Collection; import java.util.Comparator; import java.util.HashMap; -import java.util.HashSet; -import java.util.List; +import java.util.Iterator; import java.util.ListIterator; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import java.util.SortedSet; +import javax.management.Notification; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; @@ -39,17 +38,13 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.MultiRule; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.notify.impl.AdapterImpl; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.ENamedElement; import org.eclipse.emf.ecore.EObject; @@ -64,14 +59,12 @@ import org.eclipse.emf.ecore.resource.URIConverter; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.emf.ecore.util.EcoreEMap; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.osgi.internal.framework.EquinoxBundle; -import org.eclipse.osgi.storage.BundleInfo.Generation; import org.eclipse.pde.core.target.ITargetDefinition; -import org.eclipse.pde.core.target.ITargetLocation; import org.eclipse.pde.core.target.ITargetPlatformService; import org.eclipse.pde.core.target.LoadTargetDefinitionJob; import org.eclipse.pde.internal.core.target.TargetPlatformService; @@ -89,12 +82,13 @@ import org.enterprisedomain.classmaker.State; import org.enterprisedomain.classmaker.Workspace; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; +import org.enterprisedomain.classmaker.jobs.EnterpriseDomainJob; +import org.enterprisedomain.classmaker.jobs.Worker; import org.enterprisedomain.classmaker.util.ClassMakerSwitch; import org.enterprisedomain.classmaker.util.ModelUtil; import org.enterprisedomain.classmaker.util.ResourceUtils; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.Version; /** * An implementation of the model object ' @@ -109,10 +103,14 @@ * Resource Set} *
  • {@link org.enterprisedomain.classmaker.impl.WorkspaceImpl#getCustomizers * Customizers}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.WorkspaceImpl#getNonExclusiveCustomizers + * Non Exclusive Customizers}
  • *
  • {@link org.enterprisedomain.classmaker.impl.WorkspaceImpl#getService * Service}
  • *
  • {@link org.enterprisedomain.classmaker.impl.WorkspaceImpl#getSCMRegistry * SCM Registry}
  • + *
  • {@link org.enterprisedomain.classmaker.impl.WorkspaceImpl#getExcludedEPackages + * Excluded EPackages}
  • * * * @generated @@ -162,6 +160,17 @@ public class WorkspaceImpl extends EObjectImpl implements Workspace { */ protected EMap customizers; + /** + * The cached value of the '{@link #getNonExclusiveCustomizers() Non + * Exclusive Customizers}' map. + * + * @see #getNonExclusiveCustomizers() + * @generated + * @ordered + */ + protected EMap nonExclusiveCustomizers; + /** * The cached value of the '{@link #getSCMRegistry() SCM Registry}' * reference. @@ -172,28 +181,40 @@ public class WorkspaceImpl extends EObjectImpl implements Workspace { */ protected SCMRegistry scmRegistry; + /** + * The cached value of the '{@link #getExcludedEPackages() Excluded + * EPackages}' reference list. + * + * @see #getExcludedEPackages() + * @generated + * @ordered + */ + protected EList excludedEPackages; + protected IResourceChangeListener resourcesListener = new IResourceChangeListener() { @Override public void resourceChanged(IResourceChangeEvent event) { if (event.getResource() != null && event.getResource().getType() == IResource.PROJECT - && event.getType() == IResourceChangeEvent.PRE_DELETE) - try { - Project project = getProject(event.getResource().getName()); - if (project == null) - return; - SubMonitor pm = SubMonitor.convert(ClassMakerPlugin.getProgressMonitor()); - SubMonitor m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); - try { - if (project != null) - project.delete(m); - } finally { - m.done(); - pm.done(); - } - } catch (CoreException e) { - ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); - } + && event.getType() == IResourceChangeEvent.PRE_DELETE) { + // try { + Project project = getProject(event.getResource().getName()); + if (project == null) + return; + // SubMonitor pm = SubMonitor.convert(ClassMakerPlugin.getProgressMonitor()); + // SubMonitor m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); + // try { + // if (project != null) + // project.delete(m); + // } finally { + // m.done(); + // pm.done(); + // } + // } catch (CoreException e) { + // ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + // } + } } }; @@ -262,20 +283,110 @@ public EMap getCustomizers() { SortedSet customizers = ClassMakerService.Stages.createCustomizers(id); if (!customizers.isEmpty()) for (Customizer customizer : customizers) - this.customizers.put(ClassMakerService.Stages.lookup(id), customizer); + if (customizer.isExclusive()) + this.customizers.put(ClassMakerService.Stages.lookup(id), customizer); + this.customizers.sort(new Comparator>() { + + @Override + public int compare(Entry o1, Entry o2) { + if (o1.getKey().equals(o2.getKey())) { + return o1.getValue().getRank() - o2.getValue().getRank(); + } + return 0; + } + }); } - this.customizers.sort(new Comparator>() { + } + return customizers; + } - @Override - public int compare(Entry o1, Entry o2) { - if (o1.getKey().equals(o2.getKey())) { - return o1.getValue().getRank() - o2.getValue().getRank(); - } - return 0; + /** + * + * + * @generated NOT + */ + @Override + public EMap getNonExclusiveCustomizers() { + if (nonExclusiveCustomizers == null) { + nonExclusiveCustomizers = new EcoreEMap( + ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_CUSTOMIZER_MAP_ENTRY, + StageQualifierToCustomizerMapEntryImpl.class, this, + ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS); + for (String id : ClassMakerService.Stages.ids()) { + SortedSet customizers = ClassMakerService.Stages.createCustomizers(id); + if (!customizers.isEmpty()) { + EList nonExclusive = ECollections.newBasicEList(); + for (Customizer customizer : customizers) + if (!customizer.isExclusive()) + nonExclusive.add(customizer); + if (!nonExclusive.isEmpty()) + this.nonExclusiveCustomizers.put(ClassMakerService.Stages.lookup(id), new CustomizerImpl() { + + private int maxRank = 0; + private EnterpriseDomainJob next = null; + + @Override + public Object customize(EList args) { + Iterator it = nonExclusive.iterator(); + Worker firstWorker = null; + if (it.hasNext()) { + Customizer c = it.next(); + maxRank = Math.max(maxRank, c.getRank()); + firstWorker = (Worker) c.customize(args); + if (it.hasNext()) { + next = ((Worker) it.next().customize(args)) + .getAdapter(EnterpriseDomainJob.class); + (firstWorker.getAdapter(EnterpriseDomainJob.class)).setNextJob(next); + } else if (firstWorker != null) { + Iterator ine = nonExclusive.iterator(); + while (ine.hasNext()) { + Customizer neCustomizer = ine.next(); + Iterator ie = getCustomizers().values().iterator(); + while (ie.hasNext()) { + Customizer eCustomizer = ie.next(); + if (neCustomizer.isNextAfter(eCustomizer.getClass())) { + next = ((Worker) eCustomizer.customize(args)) + .getAdapter(EnterpriseDomainJob.class); + break; + } + } + } + (firstWorker.getAdapter(EnterpriseDomainJob.class)).setNextJob(next); + } + it.forEachRemaining((customizer) -> { + maxRank = Math.max(maxRank, customizer.getRank()); + EnterpriseDomainJob job = ((Worker) customizer.customize(args)) + .getAdapter(EnterpriseDomainJob.class); + if (next != null) + next.setNextJob(job); + if (it.hasNext()) { + next = ((Worker) it.next().customize(args)) + .getAdapter(EnterpriseDomainJob.class); + job.setNextJob(next); + } + }); + + } + setRank(maxRank); + return firstWorker; + } + + }); } - }); + this.nonExclusiveCustomizers.sort(new Comparator>() { + + @Override + public int compare(Entry o1, Entry o2) { + if (o1.getKey().equals(o2.getKey())) { + return o1.getValue().getRank() - o2.getValue().getRank(); + } + return 0; + } + + }); + } } - return customizers; + return nonExclusiveCustomizers; } /** @@ -353,12 +464,27 @@ public SCMRegistry basicGetSCMRegistry() { return scmRegistry; } + /** + * + * + * @generated + */ + @Override + public EList getExcludedEPackages() { + if (excludedEPackages == null) { + excludedEPackages = new EObjectResolvingEList(EPackage.class, this, + ClassMakerPackage.WORKSPACE__EXCLUDED_EPACKAGES); + } + return excludedEPackages; + } + /** * * * @generated NOT */ public void initialize() { + ClassMakerPlugin.print("Workspace is initializing..."); final URI uri = URI.createFileURI(ResourceUtils.WORKSPACE_RESOURCE_PATH.toString()); getService().eAdapters().add(new AdapterImpl() { @@ -401,6 +527,9 @@ public void notifyChanged(Notification msg) { if (getContributions().isEmpty()) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); for (IProject eProject : workspace.getRoot().getProjects()) { + if (getProjects().stream().anyMatch(p -> p.getProjectName().equals(eProject.getName()))) { + continue; + } Project project = null; try { eProject.open(ClassMakerPlugin.getProgressMonitor()); @@ -415,7 +544,7 @@ public void notifyChanged(Notification msg) { } project.setProjectName(eProject.getName()); registerProject(project); - project.initialize(false); + project.initialize(); } catch (CoreException e) { ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); } @@ -423,14 +552,14 @@ public void notifyChanged(Notification msg) { } else for (Contribution contribution : getContributions()) { - contribution.initialize(false); + contribution.initialize(); } if (getProjects().size() <= getContributions().size() && !edProjects.isEmpty()) { for (IProject p : edProjects.keySet()) { Project project = edProjects.get(p); project.setProjectName(p.getName()); registerProject(project); - project.initialize(false); + project.initialize(); } } else for (Project project : getProjects()) { @@ -442,8 +571,14 @@ public void notifyChanged(Notification msg) { } ResourcesPlugin.getWorkspace().addResourceChangeListener(resourcesListener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE); + applyCustomizers(getCustomizers()); + applyCustomizers(getNonExclusiveCustomizers()); + } + + @SuppressWarnings("unchecked") + private void applyCustomizers(EMap source) { EList customizers = ECollections.newBasicEList(); - ListIterator> it = getCustomizers().listIterator(); + ListIterator> it = source.listIterator(); while (it.hasNext()) { Map.Entry next = it.next(); StageQualifier filter = next.getKey(); @@ -451,7 +586,7 @@ public void notifyChanged(Notification msg) { it.remove(); continue; } - if (filter.equals(ClassMakerService.Stages.lookup(ClassMakerService.Stages.ID_PREFIX + "workspace.init"))) + if (filter.equals(ClassMakerService.Stages.lookup(Stage.DEFINED, "workspace.init"))) customizers.add(next.getValue()); } ECollections.sort(customizers, new Customizer.CustomizerComparator()); @@ -468,42 +603,19 @@ public void notifyChanged(Notification msg) { */ @SuppressWarnings("restriction") public void provision(IProgressMonitor monitor) throws CoreException { - if (System.getProperty("buildingWithTycho") != null) { - if (targetPlatformAlreadySet) { - return; - } - targetPlatformAlreadySet = true; - } else { - return; - } + // if (System.getProperty("buildingWithTycho") != null) { + // if (targetPlatformAlreadySet) { + // return; + // } + // targetPlatformAlreadySet = true; + // } else { + // return; + // } try { Bundle currentBundle = FrameworkUtil.getBundle(getClass()); ITargetPlatformService targetPlatformService = TargetPlatformService.getDefault(); ITargetDefinition targetDefinition = null; - targetDefinition = targetPlatformService.newTarget(); - targetDefinition.setName("Platform"); - Bundle[] bundles = Platform.getBundle(Platform.PI_RUNTIME).getBundleContext().getBundles(); - List bundleContainers = new ArrayList(); - Set dirs = new HashSet(); - for (Bundle bundle : bundles) { - if (bundle.equals(currentBundle)) { - continue; - } - EquinoxBundle bundleImpl = (EquinoxBundle) bundle; - Generation generation = (Generation) bundleImpl.getModule().getCurrentRevision().getRevisionInfo(); - File file = generation.getBundleFile().getBaseFile(); - File folder = file.getParentFile(); - if (!dirs.contains(folder)) { - dirs.add(folder); - bundleContainers.add(targetPlatformService.newDirectoryLocation(folder.getAbsolutePath())); - } - } - targetDefinition.setTargetLocations(bundleContainers.toArray(new ITargetLocation[bundleContainers.size()])); - targetDefinition.setArch(Platform.getOSArch()); - targetDefinition.setOS(Platform.getOS()); - targetDefinition.setWS(Platform.getWS()); - targetDefinition.setNL(Platform.getNL()); - targetPlatformService.saveTargetDefinition(targetDefinition); + targetDefinition = targetPlatformService.getWorkspaceTargetDefinition(); LoadTargetDefinitionJob job = new LoadTargetDefinitionJob(targetDefinition); job.schedule(); try { @@ -530,8 +642,7 @@ public Contribution createContribution(EObject blueprint, IProgressMonitor monit Contribution result = getContribution(blueprint, true); if (result != null) { if (!result.getRevisions().isEmpty()) { - Revision newRevision = result.newRevision(result.nextVersion()); - result.checkout(newRevision.getVersion()); + result.checkout(result.getVersion()); } else { result.createRevision(monitor); result.load(true, true); @@ -553,7 +664,7 @@ public Contribution createContribution(EObject blueprint, IProgressMonitor monit result.checkout(revision.getVersion()); result.load(true, true); EObject model = EcoreUtil.copy(blueprint); - result.getDomainModel().setDynamic(model); + result.getDomainModel().setDynamicEPackage(model); result.getState().saveResource(); return result; } finally { @@ -656,16 +767,16 @@ public Contribution getContribution(EObject eObject, Stage filter, boolean searc case Stage.EXPORTED_VALUE: case Stage.INSTALLED_VALUE: for (Contribution c : getContributions()) - if (c.getDomainModel() != null - && ModelUtil.eObjectsAreEqual(eObject, c.getDomainModel().getDynamic(), !searchOptimistic)) + if (c.getDomainModel() != null && ModelUtil.eObjectsAreEqual(eObject, + c.getDomainModel().getDynamicEPackage(), !searchOptimistic)) return c; break; case Stage.LOADED_VALUE: for (Contribution c : getContributions()) { - if (ModelUtil.eObjectsAreEqual(eObject, c.getDomainModel().getDynamic(), false)) + if (ModelUtil.eObjectsAreEqual(eObject, c.getDomainModel().getDynamicEPackage(), false)) while (c.getState().isMaking() && !c.getPhase().equals(Stage.LOADED)) Thread.yield(); - if (ModelUtil.eObjectsAreEqual(eObject, c.getDomainModel().getGenerated(), !searchOptimistic)) + if (ModelUtil.eObjectsAreEqual(eObject, c.getDomainModel().getGeneratedEPackage(), !searchOptimistic)) return c; } } @@ -718,17 +829,17 @@ public Contribution getContribution(String nsURI, Stage filter) { case Stage.EXPORTED_VALUE: case Stage.INSTALLED_VALUE: for (Contribution contribution : getContributions()) { - if (contribution.getDomainModel().getDynamic() != null - && contribution.getDomainModel().getDynamic() instanceof EPackage - && ((EPackage) contribution.getDomainModel().getDynamic()).getNsURI().equals(nsURI)) + if (contribution.getDomainModel().getDynamicEPackage() != null + && contribution.getDomainModel().getDynamicEPackage() instanceof EPackage + && ((EPackage) contribution.getDomainModel().getDynamicEPackage()).getNsURI().equals(nsURI)) return contribution; } break; case Stage.LOADED_VALUE: for (Contribution contribution : getContributions()) { - if (contribution.getDomainModel().getGenerated() != null - && contribution.getDomainModel().getGenerated() instanceof EPackage - && ((EPackage) contribution.getDomainModel().getGenerated()).getNsURI().equals(nsURI)) + if (contribution.getDomainModel().getGeneratedEPackage() != null + && contribution.getDomainModel().getGeneratedEPackage() instanceof EPackage + && ((EPackage) contribution.getDomainModel().getGeneratedEPackage()).getNsURI().equals(nsURI)) return contribution; } break; @@ -749,7 +860,7 @@ public Project createProject(String name, IProgressMonitor monitor) throws CoreE project.create(monitor); Revision revision = project.createRevision(monitor); project.checkout(revision.getVersion()); - project.initialize(true); + project.initialize(); project.load(true, true); return project; } finally { @@ -799,23 +910,20 @@ public Project getProject(Resource resource) { uriConverter = resourceSet.getURIConverter(); } for (Project project : getProjects()) { - if (uriConverter != null && !project.getChildren().isEmpty() - && project.getChildren().get(0) instanceof Resource) { + if (uriConverter != null && project.getResource() != null) { if (uriConverter.normalize(resource.getURI()) - .equals(uriConverter.normalize(((Resource) project.getChildren().get(0)).getURI()))) + .equals(uriConverter.normalize(project.getResource().getURI()))) return project; - } else if (uriConverter != null && !project.getChildren().isEmpty() - && project.getChildren().get(0) instanceof EObject) { - if (uriConverter.normalize(resource.getURI()) - .equals(uriConverter.normalize(((EObject) project.getChildren().get(0)).eResource().getURI()))) + } else if (uriConverter != null && project.getResource() != null) { + if (uriConverter.normalize(resource.getURI()).equals(uriConverter + .normalize(((EObject) project.getResource().getContents().get(0)).eResource().getURI()))) return project; - } else if (uriConverter == null && !project.getChildren().isEmpty() - && project.getChildren().get(0) instanceof Resource) { - if (resource.getURI().equals(((Resource) project.getChildren().get(0)).getURI())) + } else if (uriConverter == null && project.getResource() != null) { + if (resource.getURI().equals(project.getResource().getURI())) return project; - } else if (uriConverter == null && !project.getChildren().isEmpty() - && project.getChildren().get(0) instanceof EObject) { - if (resource.getURI().equals(((EObject) project.getChildren().get(0)).eResource().getURI())) + } else if (uriConverter == null && project.getResource() != null) { + if (resource.getURI() + .equals(((EObject) project.getResource().getContents().get(0)).eResource().getURI())) return project; } } @@ -830,10 +938,10 @@ public Project getProject(Resource resource) { public Stage contains(EObject blueprint) { for (Contribution c : getContributions()) { if (c.getPhase().getValue() < Stage.LOADED_VALUE) { - if (ModelUtil.eObjectsAreEqual(blueprint, c.getDomainModel().getDynamic(), false)) + if (ModelUtil.eObjectsAreEqual(blueprint, c.getDomainModel().getDynamicEPackage(), false)) return c.getPhase(); } else { - if (ModelUtil.eObjectsAreEqual(blueprint, c.getDomainModel().getGenerated(), false)) + if (ModelUtil.eObjectsAreEqual(blueprint, c.getDomainModel().getGeneratedEPackage(), false)) return c.getPhase(); } } @@ -886,6 +994,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, return ((InternalEList) getProjects()).basicRemove(otherEnd, msgs); case ClassMakerPackage.WORKSPACE__CUSTOMIZERS: return ((InternalEList) getCustomizers()).basicRemove(otherEnd, msgs); + case ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS: + return ((InternalEList) getNonExclusiveCustomizers()).basicRemove(otherEnd, msgs); case ClassMakerPackage.WORKSPACE__SERVICE: return basicSetService(null, msgs); } @@ -924,12 +1034,19 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return getCustomizers(); else return getCustomizers().map(); + case ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS: + if (coreType) + return getNonExclusiveCustomizers(); + else + return getNonExclusiveCustomizers().map(); case ClassMakerPackage.WORKSPACE__SERVICE: return getService(); case ClassMakerPackage.WORKSPACE__SCM_REGISTRY: if (resolve) return getSCMRegistry(); return basicGetSCMRegistry(); + case ClassMakerPackage.WORKSPACE__EXCLUDED_EPACKAGES: + return getExcludedEPackages(); } return super.eGet(featureID, resolve, coreType); } @@ -950,9 +1067,16 @@ public void eSet(int featureID, Object newValue) { case ClassMakerPackage.WORKSPACE__CUSTOMIZERS: ((EStructuralFeature.Setting) getCustomizers()).set(newValue); return; + case ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS: + ((EStructuralFeature.Setting) getNonExclusiveCustomizers()).set(newValue); + return; case ClassMakerPackage.WORKSPACE__SERVICE: setService((ClassMakerService) newValue); return; + case ClassMakerPackage.WORKSPACE__EXCLUDED_EPACKAGES: + getExcludedEPackages().clear(); + getExcludedEPackages().addAll((Collection) newValue); + return; } super.eSet(featureID, newValue); } @@ -971,9 +1095,15 @@ public void eUnset(int featureID) { case ClassMakerPackage.WORKSPACE__CUSTOMIZERS: getCustomizers().clear(); return; + case ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS: + getNonExclusiveCustomizers().clear(); + return; case ClassMakerPackage.WORKSPACE__SERVICE: setService((ClassMakerService) null); return; + case ClassMakerPackage.WORKSPACE__EXCLUDED_EPACKAGES: + getExcludedEPackages().clear(); + return; } super.eUnset(featureID); } @@ -992,10 +1122,14 @@ public boolean eIsSet(int featureID) { return RESOURCE_SET_EDEFAULT == null ? resourceSet != null : !RESOURCE_SET_EDEFAULT.equals(resourceSet); case ClassMakerPackage.WORKSPACE__CUSTOMIZERS: return customizers != null && !customizers.isEmpty(); + case ClassMakerPackage.WORKSPACE__NON_EXCLUSIVE_CUSTOMIZERS: + return nonExclusiveCustomizers != null && !nonExclusiveCustomizers.isEmpty(); case ClassMakerPackage.WORKSPACE__SERVICE: return getService() != null; case ClassMakerPackage.WORKSPACE__SCM_REGISTRY: return scmRegistry != null; + case ClassMakerPackage.WORKSPACE__EXCLUDED_EPACKAGES: + return excludedEPackages != null && !excludedEPackages.isEmpty(); } return super.eIsSet(featureID); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/ContainerJob.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/ContainerJob.java index 0e98f0cd..b12761f5 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/ContainerJob.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/ContainerJob.java @@ -15,17 +15,20 @@ */ package org.enterprisedomain.classmaker.jobs; -import java.util.ArrayList; import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.List; +import java.util.Set; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.Version; public abstract class ContainerJob extends EnterpriseDomainJob { + private Set installedBundles = new LinkedHashSet(); + public ContainerJob(String name, int depth, long stateTimestamp) { super(name, depth, stateTimestamp); } @@ -33,13 +36,13 @@ public ContainerJob(String name, int depth, long stateTimestamp) { public Collection getBundles(String symbolicName, Version version, BundleContext context) { if (context == null) return null; - List results = new ArrayList(); + List results = new LinkedList(); for (Bundle bundle : context.getBundles()) if ((bundle.getSymbolicName().equals(symbolicName) || (getContributionState().isEdit() && bundle.getSymbolicName().equals(symbolicName + ".edit")) || (getContributionState().isEditor() && bundle.getSymbolicName().equals(symbolicName + ".editor"))) && (versionsAreEqual(version, bundle.getVersion(), true) - || versionAreLess(version, bundle.getVersion(), true))) + || versionAreLess(bundle.getVersion(), version, true))) results.add(bundle); return results; } @@ -53,6 +56,10 @@ public Collection getBundles() { } + public Set getInstalledBundles() { + return installedBundles; + } + protected BundleContext getContext() { return FrameworkUtil.getBundle(this.getClass()).getBundleContext(); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/DelegatingJob.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/DelegatingJob.java deleted file mode 100644 index 988a89e1..00000000 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/DelegatingJob.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright 2012-2018 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.jobs; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.enterprisedomain.classmaker.Stage; - -public class DelegatingJob extends EnterpriseDomainJob { - - private Job delegate; - - private Stage jobStage; - - private Stage dirtyStage; - - public DelegatingJob(Job delegate, int depth, long stateTimestamp) { - super(delegate.getName(), depth, stateTimestamp); - this.delegate = delegate; - } - - @Override - public IStatus work(IProgressMonitor monitor) throws CoreException { - delegate.schedule(); - try { - delegate.join(); - } catch (InterruptedException e) { - monitor.setCanceled(true); - return Status.CANCEL_STATUS; - } - return delegate.getResult(); - } - - public void setResultStage(Stage resultStage) { - this.jobStage = resultStage; - } - - @Override - public Stage getResultStage() { - return jobStage; - } - - public void setDirtyStage(Stage dirtyStage) { - this.dirtyStage = dirtyStage; - } - - @Override - public Stage getDirtyStage() { - return dirtyStage; - } - -} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/EnterpriseDomainJob.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/EnterpriseDomainJob.java index acfe5238..6928b72d 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/EnterpriseDomainJob.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/EnterpriseDomainJob.java @@ -25,7 +25,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.IJobChangeListener; import org.eclipse.core.runtime.jobs.ISchedulingRule; @@ -94,7 +93,8 @@ public void done(IJobChangeEvent event) { } prevJob.setNextJob(getNextJob()); } - setNextJob(job); + if (job != null && !EnterpriseDomainJob.this.getClass().equals(job.getClass())) + setNextJob(job); } if (getNextJob() == null) { if (ClassMakerPlugin.getPreviousProgressProvider() != null) @@ -104,13 +104,18 @@ public void done(IJobChangeEvent event) { return; } getNextJob().setProject(getProject()); - getNextJob().schedule(); + if (getNextJob().isExclusive() || EnterpriseDomainJob.this.getClass() == getNextJob().getAfterJob()) + getNextJob().schedule(); } }; + private Class after; + private ResourceSet resourceSet; + private boolean exclusive = true; + private long stateTimestamp = -1; private boolean commitState = false; @@ -243,6 +248,26 @@ protected void setDepth(int depth) { this.depth = depth; } + public boolean isExclusive() { + return exclusive; + } + + public void setExclusive(boolean exclusive) { + this.exclusive = exclusive; + } + + /** + * + * @return job class after which instances should execute this job + */ + public Class getAfterJob() { + return after; + } + + public void setAfterJob(Class after) { + this.after = after; + } + protected boolean terminate() { return false; } @@ -257,6 +282,14 @@ public void setProject(IProject project) { setRule(calcSchedulingRule(project)); } + public IProject getEditProject() { + return ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName() + ".edit"); + } + + public IProject getEditorProject() { + return ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName() + ".editor"); + } + protected ISchedulingRule calcSchedulingRule(IProject project) { if (ClassMakerServiceImpl.initializing) return project; @@ -282,11 +315,23 @@ public EnterpriseDomainJob getNextJob() { } public void setNextJob(EnterpriseDomainJob nextJob) { - this.nextJob = nextJob; - if (this.nextJob != null) - addListener(); - else - removeListener(); + if (this.nextJob != null && !this.nextJob.isExclusive() && this.nextJob != nextJob && nextJob != null + && !nextJob.terminate()) { + EnterpriseDomainJob toCheck = this.nextJob.getNextJob(); + EnterpriseDomainJob toSet = toCheck; + while (toCheck != null && toCheck != nextJob && toCheck != nextJob.getNextJob() && !toCheck.terminate()) { + toSet = toCheck; + toCheck = toCheck.getNextJob(); + } + if (toSet != null) + toSet.setNextJob(nextJob); + } else { + this.nextJob = nextJob; + if (this.nextJob != null) + addListener(); + else + removeListener(); + } } public void removeListener() { diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/CreateGeneratorCustomizer.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/CreateGeneratorCustomizer.java index 3549144c..13945e4a 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/CreateGeneratorCustomizer.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/CreateGeneratorCustomizer.java @@ -8,8 +8,9 @@ public class CreateGeneratorCustomizer extends CustomizerImpl { @Override public Object customize(EList args) { - EcoreGenerator generator = new EcoreGenerator((Integer) args.get(0), (Long) args.get(2)); - generator.setProject((IProject) args.get(1)); + EcoreGenerator generator = new EcoreGenerator((Integer) args.get(0), (Long) args.get(1)); +// Generator generator = new Generator((Integer) args.get(0), (Long) args.get(1)); + generator.setProject((IProject) args.get(2)); return generator; } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/EcoreGenerator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/EcoreGenerator.java index 7b2c6e0b..a65cab0e 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/EcoreGenerator.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/codegen/EcoreGenerator.java @@ -1,5 +1,5 @@ /** - * Copyright 2012-2018 Kyrill Zotkin + * Copyright 2012-2026 Kyrill Zotkin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,50 +12,54 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 */ package org.enterprisedomain.classmaker.jobs.codegen; +import java.net.URI; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; +import java.util.HashMap; import java.util.List; -import java.util.Set; -import java.util.concurrent.Semaphore; +import java.util.Map; + +import javax.management.monitor.Monitor; +import javax.tools.Diagnostic; -import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.SubMonitor; import org.eclipse.emf.codegen.ecore.Generator; +import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory; import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel; import org.eclipse.emf.codegen.ecore.genmodel.GenModel; +import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; +import org.eclipse.emf.codegen.ecore.genmodel.GenOSGiStyle; import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; +import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter; +import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapter; +import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory; +import org.eclipse.emf.codegen.merge.java.JControlModel; import org.eclipse.emf.codegen.util.CodeGenUtil; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.util.BasicMonitor; import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.jdt.core.ElementChangedEvent; -import org.eclipse.jdt.core.IClasspathEntry; -import org.eclipse.jdt.core.IElementChangedListener; -import org.eclipse.jdt.core.IJavaElementDelta; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.jgit.api.Git; import org.eclipse.osgi.util.NLS; import org.enterprisedomain.classmaker.ClassMakerService; @@ -74,8 +78,6 @@ public EcoreGenerator(int depth, long stateTimestamp) { super(Messages.JobNameCodeGenerator, depth, stateTimestamp); } - protected static final String SOURCE_FOLDER_NAME = "src"; /// main/java"; //$NON-NLS-1$ - public static final String GENMODEL_EXT = "genmodel"; //$NON-NLS-1$ private GeneratorJob genModelGeneration = new GenModelGenerationJob(getDepth(), getStateTimestamp()); @@ -88,7 +90,8 @@ public EcoreGenerator(int depth, long stateTimestamp) { protected static abstract class GeneratorJob extends EnterpriseDomainJob { - private org.eclipse.emf.codegen.ecore.Generator generator; + private org.eclipse.emf.codegen.ecore.generator.Generator generator; + private org.eclipse.emf.codegen.ecore.Generator generatorBackend; private IPath modelPath; private IPath genModelPath; @@ -96,11 +99,19 @@ public GeneratorJob(String jobName, int depth, long stateTimestamp) { super(jobName, depth, stateTimestamp); } - public org.eclipse.emf.codegen.ecore.Generator getGenerator() { + public org.eclipse.emf.codegen.ecore.Generator getGeneratorBackend() { + return generatorBackend; + } + + public void setGeneratorBackend(org.eclipse.emf.codegen.ecore.Generator generatorBackend) { + this.generatorBackend = generatorBackend; + } + + public org.eclipse.emf.codegen.ecore.generator.Generator getGenerator() { return generator; } - public void setGenerator(org.eclipse.emf.codegen.ecore.Generator generator) { + public void setGenerator(org.eclipse.emf.codegen.ecore.generator.Generator generator) { this.generator = generator; } @@ -136,7 +147,7 @@ public Stage getDirtyStage() { } - protected class GenModelGenerationJob extends GeneratorJob { + public class GenModelGenerationJob extends GeneratorJob { public GenModelGenerationJob(int depth, long stateTimestamp) { super(Messages.JobNameGenModelGeneration, depth, stateTimestamp); @@ -147,9 +158,10 @@ public GenModelGenerationJob(int depth, long stateTimestamp) { public IStatus work(IProgressMonitor monitor) throws CoreException { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); final IPath modelFullPath = root.getRawLocation().append(getModelLocation()); - ResourceUtils.delete(getGenModelResourcePath(modelFullPath).toFile(), null); - int result = (Integer) getGenerator().run(new String[] { "-ecore2GenModel", modelFullPath.toString(), "", //$NON-NLS-1$ //$NON-NLS-2$ - modelName }); + ResourceUtils.delete(obtainToGenModelResourcePath(modelFullPath).toFile(), null); + int result = (Integer) getGeneratorBackend() + .run(new String[] { "-ecore2GenModel", modelFullPath.toString(), "", //$NON-NLS-1$ //$NON-NLS-2$ + modelName }); if (result == 1) throw new CoreException(ClassMakerPlugin.createErrorStatus("GenModel generation failed.")); else { @@ -163,237 +175,154 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { } - protected class CodeGenerationJob extends GeneratorJob { + public class CodeGenerationJob extends GeneratorJob { + + public static final GeneratorAdapterFactory.Descriptor MY_DESCRIPTOR = new GeneratorAdapterFactory.Descriptor() { + public GeneratorAdapterFactory createAdapterFactory() { + return new MyGenModelGeneratorAdapterFactory(); + } + }; public CodeGenerationJob(int depth, long stateTimestamp) { super(NLS.bind(Messages.JobNameCodeGeneration, "Code"), depth, stateTimestamp); setChangeRule(false); } + static { + EcorePackage.eINSTANCE.getEFactoryInstance(); + GenModelPackage.eINSTANCE.getEFactoryInstance(); + } + + protected void registerGenModel(ResourceSet resourceSet, URI genmodelURI) throws CoreException { + Resource resource = resourceSet.getResource(genmodelURI, true); + if (resource == null) + throw new CoreException( + ClassMakerPlugin.createErrorStatus("Couldn't find resource under " + genmodelURI)); + for (EObject object : resource.getContents()) + if (object instanceof GenModel) + registerGenModel((GenModel) object); + } + + protected Collection collectGenPackages(GenModel genModel) { + List pkgs = new ArrayList(); + for (GenPackage pkg : genModel.getGenPackages()) { + pkgs.add(pkg); + pkgs.addAll(collectGenPackages(pkg)); + } + pkgs.addAll(genModel.getUsedGenPackages()); + return pkgs; + } + + protected Collection collectGenPackages(GenPackage genPackage) { + List pkgs = new ArrayList(); + for (GenPackage pkg : genPackage.getNestedGenPackages()) { + pkgs.add(pkg); + pkgs.addAll(collectGenPackages(pkg)); + } + return pkgs; + } + + protected void registerGenModel(GenModel genModel) throws CoreException { + Map registry = EcorePlugin.getEPackageNsURIToGenModelLocationMap(false); + for (GenPackage pkg : collectGenPackages(genModel)) { + if (pkg.eIsProxy()) { + ClassMakerPlugin.print("Unresolved proxy for GenPackage " + EcoreUtil.getURI(pkg)); + continue; + } + String nsURI = pkg.getEcorePackage().getNsURI(); + if (nsURI != null) { + URI newUri = pkg.eResource().getURI(); + if (registry.containsKey(nsURI)) { + URI oldURI = registry.get(nsURI); + if (!oldURI.equals(newUri)) + throw new CoreException(ClassMakerPlugin.createWarningStatus( + "There is already a GenModel registered for NamespaceURI '" + nsURI + + "'. It will be overwritten from '" + oldURI + "' to '" + newUri + "'")); + else + continue; + } + registry.put(nsURI, newUri); + ClassMakerPlugin.print("Registered GenModel '" + nsURI + "' from '" + newUri + "'"); + } + } + } + @Override public IStatus work(final IProgressMonitor monitor) throws CoreException { try { - ResourceUtils.cleanupDir(getProject(), SOURCE_FOLDER_NAME); + ResourceUtils.cleanupDir(getProject(), ResourceUtils.SOURCE_FOLDER_NAME); try { getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor); - } catch (OperationCanceledException e) { + } catch (OperationCanceledException ex) { + } + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + URI genModelURI = URI.createFileURI(root.getRawLocation().append(getGenModelLocation()).toString()); + final GenModel genModel = (GenModel) getResourceSet().getResource(genModelURI, true).getContents() + .get(0); + genModel.setCanGenerate(true); + genModel.reconcile(); + registerGenModel(getResourceSet(), genModelURI); + getGenerator().setInput(genModel); + ClassMakerPlugin.print("Generating EMF code for " + genModel.getModelName()); + { + getGenerator().getAdapterFactoryDescriptorRegistry().addDescriptor(GenModelPackage.eNS_URI, + MY_DESCRIPTOR); + Diagnostic diagnostic = getGenerator().generate(genModel, + GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, new BasicMonitor()); + if (diagnostic.getSeverity() != Diagnostic.OK) + throw new CoreException(ClassMakerPlugin.createErrorStatus(diagnostic.getException())); } - List args = new ArrayList(); - args.add("-forceOverwrite"); - args.add("-codeFormatting"); - args.add("default"); - args.add("-model"); - if (getContributionState().isEdit()) - args.add("-edit"); - if (getContributionState().isEditor()) - args.add("-editor"); - args.add("-autoBuild"); - args.add("false"); - args.add("-reconcile"); - args.add(EcorePlugin.getWorkspaceRoot().getRawLocation().append(getGenModelLocation()).toString()); - int result = (Integer) getGenerator().run((String[]) args.toArray(new String[args.size()])); - getContributionState().setProjectVersion(monitor); - - updateClassPath(monitor); - ICommand command = ResourceUtils.getBuildSpec(getProject().getDescription(), JavaCore.BUILDER_ID); - try { - getProject().getWorkspace().addResourceChangeListener(new IResourceChangeListener() { - - @Override - public void resourceChanged(IResourceChangeEvent event) { - if (event.getDelta() != null) - for (IResourceDelta delta : event.getDelta() - .getAffectedChildren(IResourceDelta.CHANGED)) - if (delta.getResource().equals(getProject())) - try { - getProject().notifyAll(); - } catch (IllegalMonitorStateException e) { - } - } - }, IResourceChangeEvent.POST_BUILD); - getProject().build(IncrementalProjectBuilder.FULL_BUILD, JavaCore.BUILDER_ID, - command.getArguments(), monitor); - } catch (OperationCanceledException e) { - monitor.setCanceled(true); - } catch (CoreException e) { - ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); - throw e; - } catch (Exception e) { - throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); + if (getContributionState().isEdit()) { + Diagnostic diagnostic = getGenerator().generate(genModel, GenBaseGeneratorAdapter.EDIT_PROJECT_TYPE, + new BasicMonitor()); + if (diagnostic.getSeverity() != Diagnostic.OK) + throw new CoreException(ClassMakerPlugin.createErrorStatus(diagnostic.getException())); } - try { - notifyAll(); - } catch (IllegalMonitorStateException e) { + + if (getContributionState().isEditor()) { + Diagnostic diagnostic = getGenerator().generate(genModel, + GenBaseGeneratorAdapter.EDITOR_PROJECT_TYPE, new BasicMonitor()); + if (diagnostic.getSeverity() != Diagnostic.OK) + throw new CoreException(ClassMakerPlugin.createErrorStatus(diagnostic.getException())); } + getContributionState().setProjectVersion(monitor); + try { @SuppressWarnings("unchecked") SCMOperator operator = (SCMOperator) getContributionState().getProject().getWorkspace() .getSCMRegistry().get(getProject().getName()); operator.add("."); - } catch (Exception e) { - throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); - } - if (result == 1) - throw new CoreException(ClassMakerPlugin.createErrorStatus("Code generation failed.")); - else { - if (result == 0) - return Status.OK_STATUS; - else - return ClassMakerPlugin.createWarningStatus("Code generation returned unknown result."); + } catch (Exception ex) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(ex)); } + return Status.OK_STATUS; } finally { monitor.done(); } } - private void updateClassPath(IProgressMonitor monitor) throws CoreException { - final SubMonitor pm = SubMonitor.convert(monitor); - pm.setTaskName("Update Classpath"); - pm.subTask("Setting Classpath..."); - final SubMonitor m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); - try { - IJavaProject javaProject = null; - IJavaProject editJavaProject = null; - IJavaProject editorJavaProject = null; - try { - javaProject = JavaCore - .create(ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName())); - if (getContributionState().isEdit()) - editJavaProject = JavaCore.create( - ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName() + ".edit")); - if (getContributionState().isEditor()) - editorJavaProject = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot() - .getProject(getProject().getName() + ".editor")); - - } catch (IllegalStateException e) { - throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); - } - Set entries = new HashSet(); - Set editEntries = new HashSet(); - Set editorEntries = new HashSet(); - for (IClasspathEntry e : javaProject.getRawClasspath()) - if (!e.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName()))) - entries.add(e); - if (editJavaProject != null) - for (IClasspathEntry e : editJavaProject.getRawClasspath()) - if (!e.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName() + ".edit"))) - editEntries.add(e); - if (editorJavaProject != null) - for (IClasspathEntry e : editorJavaProject.getRawClasspath()) - if (!e.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName() + ".editor"))) - editorEntries.add(e); - entries.add(JavaCore.newSourceEntry( - new Path(IPath.SEPARATOR + getProject().getName() + IPath.SEPARATOR + SOURCE_FOLDER_NAME - + IPath.SEPARATOR), - null, new Path( - IPath.SEPARATOR + getProject().getName() + IPath.SEPARATOR + "bin" + IPath.SEPARATOR))); - if (editJavaProject != null) { - IClasspathEntry e = JavaCore.newSourceEntry( - new Path(IPath.SEPARATOR + getProject().getName() + ".edit" + IPath.SEPARATOR - + SOURCE_FOLDER_NAME + IPath.SEPARATOR), - null, new Path(IPath.SEPARATOR + getProject().getName() + ".edit" + IPath.SEPARATOR + "bin" - + IPath.SEPARATOR)); - if (!editEntries.contains(e)) - editEntries.add(e); - } - if (editorJavaProject != null) { - IClasspathEntry e = JavaCore.newSourceEntry( - new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR - + SOURCE_FOLDER_NAME + IPath.SEPARATOR), - null, new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR - + "bin" + IPath.SEPARATOR)); - if (!editorEntries.contains(e)) - editorEntries.add(e); - } - entries.add(JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER"), null, null, - false)); - if (editJavaProject != null) { - IClasspathEntry e = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER"), - null, null, false); - if (!editEntries.contains(e)) - editEntries.add(e); - } - if (editorJavaProject != null) { - IClasspathEntry e = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER"), - null, null, false); - if (!editorEntries.contains(e)) - editorEntries.add(e); - } - entries.add(JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins"), null, null, - false)); - if (editJavaProject != null) { - IClasspathEntry e = JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins"), - null, null, false); - if (!editEntries.contains(e)) - editEntries.add(e); - } - if (editorJavaProject != null) { - IClasspathEntry e = JavaCore.newSourceEntry( - new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR - + SOURCE_FOLDER_NAME + IPath.SEPARATOR), - null, new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR - + "bin" + IPath.SEPARATOR)); - if (!editorEntries.contains(e)) - editorEntries.add(e); - } - Semaphore built = new Semaphore(0); - JavaCore.addElementChangedListener(new IElementChangedListener() { + private static class MyGenModelGeneratorAdapterFactory extends GenModelGeneratorAdapterFactory + implements GeneratorAdapterFactory { - private boolean isBuilt = false; - - private boolean isEditBuilt = false; + @Override + public boolean isFactoryForType(Object type) { + return super.isFactoryForType(type); + } - private boolean isEditorBuilt = false; + @Override + public Adapter createGenModelAdapter() { + return new GenModelGeneratorAdapter(this) { @Override - public void elementChanged(ElementChangedEvent event) { - IJavaElementDelta[] delta = event.getDelta().getChangedChildren(); - if (delta != null && delta.length > 0) - if (delta[0].getElement().getJavaProject().getProject().equals(getProject()) - && event.getType() == ElementChangedEvent.POST_CHANGE) - isBuilt = true; - if ((getContributionState().isEdit() && delta.length > 0 - && delta[0].getElement().getJavaProject().getProject().getName() - .equals(getProject().getName() + ".edit") - && event.getType() == ElementChangedEvent.POST_CHANGE) - || !getContributionState().isEdit()) - isEditBuilt = true; - if ((getContributionState().isEditor() && delta.length > 0 - && delta[0].getElement().getJavaProject().getProject().getName() - .equals(getProject().getName() + ".editor") - && event.getType() == ElementChangedEvent.POST_CHANGE) - || !getContributionState().isEditor()) - isEditorBuilt = true; - if (isBuilt && isEditBuilt && isEditorBuilt) - built.release(); + protected void generateModelManifest(GenModel genModel, Monitor monitor) { + super.generateModelManifest(genModel, monitor); } - }, ElementChangedEvent.POST_CHANGE); - javaProject.setRawClasspath((IClasspathEntry[]) entries.toArray(new IClasspathEntry[entries.size()]), - m); - javaProject.getResolvedClasspath(false); - if (editJavaProject != null) { - editJavaProject.setRawClasspath( - (IClasspathEntry[]) editEntries.toArray(new IClasspathEntry[editEntries.size()]), m); - editJavaProject.getResolvedClasspath(false); - } - if (editorJavaProject != null) { - editorJavaProject.setRawClasspath( - (IClasspathEntry[]) editorEntries.toArray(new IClasspathEntry[editorEntries.size()]), m); - editorJavaProject.getResolvedClasspath(false); - } - built.acquire(); - } catch (JavaModelException mex) { - throw new CoreException(ClassMakerPlugin.createErrorStatus(mex)); - } catch (OperationCanceledException ocex) { - } catch (InterruptedException iex) { - monitor.setCanceled(true); - } finally { - m.done(); - pm.done(); + + }; } - } + } } @Override @@ -401,9 +330,52 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { modelName = getProject().getName(); if (getContributionState() != null) modelName = getContributionState().getModelName(); - IPath modelPath = ensureModelResourcePathExists(getProject(), modelName, monitor); - IPath genModelPath = getGenModelResourcePath(modelPath); - final org.eclipse.emf.codegen.ecore.Generator generator = new Generator(); + IPath modelPath = ensureExistsAndGetModelResourcePath(getProject(), modelName, monitor); + IPath genModelPath = obtainToGenModelResourcePath(modelPath); + final org.eclipse.emf.codegen.ecore.Generator generatorBackend = new Generator(); + final org.eclipse.emf.codegen.ecore.generator.Generator generator = new org.eclipse.emf.codegen.ecore.generator.Generator() { + + @Override + public JControlModel getJControlModel() { + return new JControlModel() { + + @Override + public boolean canMerge() { + return false; + } + }; + } + + @Override + protected Collection getAdapterFactories(Object object) { + if (packageIDToAdapterFactories == null) { + packageIDToAdapterFactories = new HashMap>(); + } + String packageID = getPackageID(object); + Collection result = packageIDToAdapterFactories.get(packageID); + if (result == null) { + Collection descriptors = getAdapterFactoryDescriptorRegistry() + .getDescriptors(packageID); + result = new ArrayList(descriptors.size()); + for (GeneratorAdapterFactory.Descriptor descriptor : descriptors) { + GeneratorAdapterFactory adapterFactory = descriptor.createAdapterFactory(); + adapterFactory.setGenerator(this); + result.add(adapterFactory); + } + packageIDToAdapterFactories.put(packageID, result); + } else { + for (GeneratorAdapterFactory factory : result) { + if (factory instanceof org.enterprisedomain.classmaker.jobs.codegen.EcoreGenerator.CodeGenerationJob.MyGenModelGeneratorAdapterFactory) + return result; + } + GeneratorAdapterFactory adapterFactory = CodeGenerationJob.MY_DESCRIPTOR.createAdapterFactory(); + adapterFactory.setGenerator(this); + result.add(adapterFactory); + packageIDToAdapterFactories.put(packageID, result); + } + return result; + } + }; codeGeneration.setResourceSet(getResourceSet()); codeGeneration.setContributionState(getContributionState()); @@ -423,7 +395,7 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { genModelGeneration.setResourceSet(getResourceSet()); genModelGeneration.setContributionState(getContributionState()); genModelGeneration.setProject(getProject()); - genModelGeneration.setGenerator(generator); + genModelGeneration.setGeneratorBackend(generatorBackend); genModelGeneration.setModelLocation(modelPath); genModelGeneration.setNextJob(genModelSetup); @@ -433,7 +405,7 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { return Status.OK_STATUS; } - private IPath ensureModelResourcePathExists(IProject project, String name, IProgressMonitor monitor) + private IPath ensureExistsAndGetModelResourcePath(IProject project, String name, IProgressMonitor monitor) throws CoreException { if (!project.exists()) throw new CoreException(ClassMakerPlugin.createErrorStatus(NLS.bind(Messages.ProjectNotExist, project))); @@ -447,22 +419,33 @@ private IPath ensureModelResourcePathExists(IProject project, String name, IProg return file.getFullPath(); } - public IPath getGenModelResourcePath(IPath path) { + public IPath obtainToGenModelResourcePath(IPath path) { return path.removeFileExtension().addFileExtension(GENMODEL_EXT); } protected void setupGenModel(IPath projectPath, GenModel genModel, Collection ePackages) { for (EPackage ePackage : ePackages) { GenPackage genPackage = genModel.findGenPackage(ePackage); - if (genPackage != null) + if (genPackage != null) { genPackage.setEcorePackage(ePackage); + } } genModel.reconcile(); genModel.initialize(ePackages); + for (EPackage ePackage : ePackages) { + GenPackage genPackage = genModel.findGenPackage(ePackage); + if (genPackage != null) { + getContributionState().setBasePackage(genPackage.getBasePackage()); + } + } + genModel.setCodeFormatting(true); + genModel.setImportOrganizing(true); + genModel.setForceOverwrite(true); + genModel.setCleanup(true); genModel.setCanGenerate(true); - genModel.setComplianceLevel(GenJDKLevel.JDK110_LITERAL); + genModel.setComplianceLevel(GenJDKLevel.JDK210_LITERAL); genModel.setUpdateClasspath(true); - genModel.setModelDirectory(projectPath.append(SOURCE_FOLDER_NAME).toString()); + genModel.setModelDirectory(projectPath.append(ResourceUtils.SOURCE_FOLDER_NAME).toString()); genModel.setSuppressInterfaces(true); for (GenPackage genPackage : genModel.getGenPackages()) genPackage.setPrefix(CodeGenUtil.capName(genPackage.getPrefix(), genModel.getLocale())); @@ -475,8 +458,7 @@ protected void setupGenModel(IPath projectPath, GenModel genModel, Collection options = new HashMap(); + resource.load(Collections.EMPTY_MAP); + } catch (IOException e1) { + e1.printStackTrace(); + } + if (!resource.getContents().isEmpty()) { + GenModel genModel = (GenModel) resource.getContents().get(0); + this.ecoreGenerator.setupGenModel(computeProjectPath(), genModel, ePackages); + } + try { + Map options = new HashMap(); options.put(XMLResource.OPTION_ENCODING, "UTF-8"); + options.put(XMIResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + options.put(XMLResource.OPTION_PROCESS_DANGLING_HREF, XMLResource.OPTION_PROCESS_DANGLING_HREF_DISCARD); resource.save(options); } catch (IOException e) { throw new CoreException(ClassMakerPlugin.createWarningStatus(e)); diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/CreateExporterCustomizer.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/CreateExporterCustomizer.java index 76ef8133..327176f7 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/CreateExporterCustomizer.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/CreateExporterCustomizer.java @@ -22,7 +22,7 @@ public class CreateExporterCustomizer extends CustomizerImpl { @Override public Object customize(EList args) { - return new PDEPluginExporter((Integer) args.get(0), (Long) args.get(1)); + return new PDEBuildExporter((Integer) args.get(0), (Long) args.get(1)); } } \ No newline at end of file diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEBuildExporter.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEBuildExporter.java new file mode 100644 index 00000000..058def10 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEBuildExporter.java @@ -0,0 +1,653 @@ +/** + * Copyright 2012-2023 Kyrill Zotkin + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.enterprisedomain.classmaker.jobs.export; + +import java.io.File; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Flow.Publisher; + +import org.eclipse.core.resources.ICommand; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.resources.ProjectScope; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager; +import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory; +import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager; +import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory; +import org.eclipse.equinox.p2.core.ProvisionException; +import org.eclipse.equinox.p2.publisher.IPublisherAction; +import org.eclipse.equinox.p2.publisher.IPublisherInfo; +import org.eclipse.equinox.p2.publisher.PublisherInfo; +import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction; +import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; +import org.eclipse.jdt.core.IClasspathAttribute; +import org.eclipse.jdt.core.IClasspathEntry; +import org.eclipse.jdt.core.ICompilationUnit; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.IPackageFragment; +import org.eclipse.jdt.core.IPackageFragmentRoot; +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.dom.CompilationUnit; +import org.eclipse.jdt.core.manipulation.JavaManipulation; +import org.eclipse.jdt.core.manipulation.OrganizeImportsOperation; +import org.eclipse.jdt.core.manipulation.SharedASTProviderCore; +import org.eclipse.jgit.api.Git; +import org.eclipse.osgi.service.resolver.BundleDescription; +import org.eclipse.osgi.service.resolver.BundleSpecification; +import org.eclipse.pde.core.IEditableModel; +import org.eclipse.pde.core.IModel; +import org.eclipse.pde.core.build.IBuild; +import org.eclipse.pde.core.build.IBuildEntry; +import org.eclipse.pde.core.build.IBuildModel; +import org.eclipse.pde.core.plugin.IPluginImport; +import org.eclipse.pde.core.plugin.IPluginModelBase; +import org.eclipse.pde.core.plugin.PluginRegistry; +import org.eclipse.pde.core.project.IBundleClasspathEntry; +import org.eclipse.pde.core.project.IBundleProjectDescription; +import org.eclipse.pde.core.project.IBundleProjectService; +import org.eclipse.pde.core.project.IRequiredBundleDescription; +import org.eclipse.pde.internal.core.PDECore; +import org.eclipse.pde.internal.core.PluginModelManager; +import org.eclipse.pde.internal.core.bundle.BundlePluginModel; +import org.eclipse.pde.internal.core.bundle.WorkspaceBundleModel; +import org.eclipse.pde.internal.core.plugin.AbstractPluginModelBase; +import org.enterprisedomain.classmaker.Messages; +import org.enterprisedomain.classmaker.SCMOperator; +import org.enterprisedomain.classmaker.Stage; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; +import org.enterprisedomain.classmaker.util.ResourceUtils; + +/** + * PDE Build-based Plug-in Exporter. + */ +@SuppressWarnings("restriction") +public class PDEBuildExporter extends AbstractExporter { + + private IClasspathEntry entry; + + private Object lock = new Object(); + + public PDEBuildExporter(int depth, long stateTimestamp) { + super(depth, stateTimestamp); + } + + @Override + public IStatus work(final IProgressMonitor monitor) throws CoreException { + synchronized (lock) { + getContributionState(); + if (getProperties().isEmpty()) + getProperties().put(AbstractExporter.EXPORT_DESTINATION_PROP, + ResourceUtils.getExportDestination(getContributionState()).toString()); + cleanup(monitor); + PluginModelManager modelManager = PDECore.getDefault().getModelManager(); + Set models = new HashSet(); + IBundleProjectService service = ((IBundleProjectService) ClassMakerPlugin + .getService(IBundleProjectService.class.getName())); + addOutputClasspath(service, monitor); + IBundleProjectDescription description = service.getDescription(getProject()); + description.setBinIncludes(ResourceUtils.addElement(description.getBinIncludes(), new Path("."))); + + for (IRequiredBundleDescription req : description.getRequiredBundles()) { + IPluginModelBase reqModel = modelManager.findModel(req.name()); + models.add(reqModel.getPluginBase().getPluginModel()); + } + for (IPluginModelBase m : PluginRegistry.getAllModels()) + if (m.getPluginBase().getId().equals(getProject().getName())) { + updateBuildProperties(m); + break; + } +// IPluginModelBase model = modelManager.findModel(getProject()); +// for (Bundle bundle : getBundles()) +// System.out.println(bundle.adapt(BundleWiring.class)); +// org.osgi.framework.wiring.BundleWiring; +// for (IPluginModelBase b : modelManager.getActiveModels()) +// if (b.getPluginBase().getName().equals(getProject().getName())) +// model = b; +// IPluginModelBase model = modelManager.findModel(getProject().getDescription());// modelManager.findModel(getProject()); + +// if (model != null) { +// models.add(model); +// for (BundleSpecification required : model.getBundleDescription().getRequiredBundles()) { +// IPluginModelBase requiredModel = modelManager.findModel(required.getName()); +// if (requiredModel instanceof BundlePluginModel) +// if (((BundlePluginModel) requiredModel).getBundleModel() instanceof WorkspaceBundleModel) +// models.add(requiredModel); +// } +// updateBuildProperties(model); +// } + if (getContributionState().isEdit()) { + IBundleProjectDescription editDescription = service.getDescription(getEditProject()); + if (editDescription != null) { + for (IRequiredBundleDescription req : editDescription.getRequiredBundles()) { + IPluginModelBase reqModel = modelManager.findModel(req.name()); + models.add(reqModel.getPluginBase().getPluginModel()); + } + updateBuildProperties(modelManager.findModel(editDescription.getSymbolicName())); + IPluginModelBase emfEdit = modelManager.findModel("org.eclipse.emf.edit"); //$NON-NLS-1$ + if (emfEdit != null) + models.add(emfEdit); + } + } + if (getContributionState().isEditor()) { + IBundleProjectDescription editorDescription = service.getDescription(getEditorProject()); + if (editorDescription != null) { + for (IRequiredBundleDescription req : editorDescription.getRequiredBundles()) { + IPluginModelBase reqModel = modelManager.findModel(req.name()); + models.add(reqModel.getPluginBase().getPluginModel()); + } + updateBuildProperties(modelManager.findModel(editorDescription.getSymbolicName())); + IPluginModelBase emfEditor = modelManager.findModel("org.eclipse.emf.edit.ui"); //$NON-NLS-1$ + if (emfEditor != null) + models.add(emfEditor); + } + } + IPublisherInfo info; + try { + info = createPublisherInfo(); + } catch (ProvisionException e) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); + } catch (URISyntaxException e) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); + } + IPublisherAction[] actions = null; + if (!models.isEmpty()) { + Set ms = new HashSet(); + for (IPluginModelBase m : models) + ms.add(m); + IModel[] ma = ms.toArray(new IModel[ms.size()]); + actions = createActions(ma); +// modelManager.modelsChanged( +// new ModelProviderEvent(getProject(), IModelProviderEvent.MODELS_ADDED, ma, null, null)); + } + + final SubMonitor pm = SubMonitor.convert(monitor); + pm.setTaskName(Messages.TaskNamePluginExport); + pm.subTask(Messages.SubTaskNamePluginExport); + final SubMonitor m = pm.newChild(9, SubMonitor.SUPPRESS_ISCANCELED); + description.apply(m); + try { + compile(monitor); + } catch (CoreException ex) { + return ex.getStatus(); + } + Publisher publisher = new Publisher(info); + try { + return publisher.publish(actions, m); + } finally { + if (m != null) + m.done(); + if (pm != null) + pm.done(); + } + } + } + + private void addOutputClasspath(IBundleProjectService service, IProgressMonitor monitor) throws CoreException { + IBundleProjectDescription desc = service.getDescription(getProject()); + IBundleClasspathEntry[] es = desc.getBundleClasspath(); + IPath srcPath = null; + IPath binPath = null; + IPath jarPath = null; + for (IBundleClasspathEntry e : es) { + if (e.getSourcePath() != null) + srcPath = e.getSourcePath(); + if (e.getBinaryPath() != null) + binPath = e.getBinaryPath(); + if (e.getLibrary() != null) + jarPath = e.getLibrary(); + } + if (binPath == null) + binPath = new Path("bin/"); + if (jarPath == null || jarPath.equals(new Path("."))) + jarPath = new Path("bin"); + es[0] = service.newBundleClasspathEntry(srcPath, binPath, jarPath); + desc.setBundleClasspath(es); + SubMonitor pm = null; + SubMonitor m = null; + try { + pm = SubMonitor.convert(monitor); + pm.setTaskName("Update Classpath"); + pm.subTask("Updating Bundle Classpath..."); + m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); + desc.apply(m); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } finally { + if (m != null) + m.done(); + if (pm != null) + pm.done(); + } + } + + public IPublisherInfo createPublisherInfo() throws ProvisionException, URISyntaxException { + PublisherInfo result = new PublisherInfo(); + + Map props = new HashMap(); + + props.put("p2.gathering", Boolean.TRUE.toString()); + props.put("p2.product.qualifier", getContributionState().getProject().getVersion().getQualifier()); + + IMetadataRepository metadataRepository = new SimpleMetadataRepositoryFactory().create( + new URI("file:/" + getProperties().getProperty(EXPORT_DESTINATION_PROP)), "Metadata Repository", + MetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, props); + + IArtifactRepository artifactRepository = new SimpleArtifactRepositoryFactory().create( + new URI("file:/" + getProperties().getProperty(EXPORT_DESTINATION_PROP)), "Artifact Repository", + ArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, props); + + result.setMetadataRepository(metadataRepository); + result.setArtifactRepository(artifactRepository); + result.setArtifactOptions(IPublisherInfo.A_PUBLISH | IPublisherInfo.A_INDEX); + return result; + } + + public IPublisherAction[] createActions(IModel[] models) { + IPublisherAction[] result = new IPublisherAction[1]; + Set bundleLocations = new HashSet(); + bundleLocations.add(getProject().getLocation().toFile()); + PluginModelManager modelManager = PDECore.getDefault().getModelManager(); + for (IModel model : models) + if (model instanceof IPluginModelBase) { + BundleDescription bundleDescription = ((IPluginModelBase) model).getBundleDescription(); + if (bundleDescription != null) + for (BundleSpecification requiredBundle : bundleDescription.getRequiredBundles()) { + IPluginModelBase requiredModel = modelManager.findModel(requiredBundle.getName()); + bundleLocations.add(new File(requiredModel.getInstallLocation())); + writeVersion(model, requiredModel); + } + } + if (getContributionState().isEdit()) { + bundleLocations.add(new File(getProject().getLocation().toString() + ".edit")); + for (IModel model : models) { + if (model instanceof AbstractPluginModelBase && ((AbstractPluginModelBase) model).getBundleDescription() + .getName().equals("org.eclipse.emf.edit")) + bundleLocations.add(new File(((AbstractPluginModelBase) model).getInstallLocation())); + if (model instanceof IPluginModelBase) { + BundleDescription bundleDescription = ((IPluginModelBase) model).getBundleDescription(); + if (bundleDescription != null) + for (BundleSpecification requiredBundle : bundleDescription.getRequiredBundles()) { + IPluginModelBase requiredModel = modelManager.findModel(requiredBundle.getName() + ".edit"); + if (requiredModel instanceof BundlePluginModel) + if (((BundlePluginModel) requiredModel) + .getBundleModel() instanceof WorkspaceBundleModel) { + writeVersion(model, requiredModel); + } + } + } + } + } + if (getContributionState().isEditor()) { + bundleLocations.add(new File(getProject().getLocation().toString() + ".editor")); + for (IModel model : models) { + if (model instanceof AbstractPluginModelBase && ((AbstractPluginModelBase) model).getBundleDescription() + .getName().equals("org.eclipse.emf.edit.ui")) + bundleLocations.add(new File(((AbstractPluginModelBase) model).getInstallLocation())); + if (model instanceof IPluginModelBase) { + BundleDescription bundleDescription = ((IPluginModelBase) model).getBundleDescription(); + if (bundleDescription != null) + for (BundleSpecification requiredBundle : bundleDescription.getRequiredBundles()) { + IPluginModelBase requiredModel = modelManager + .findModel(requiredBundle.getName() + ".editor"); + if (requiredModel instanceof BundlePluginModel) + if (((BundlePluginModel) requiredModel) + .getBundleModel() instanceof WorkspaceBundleModel) { + writeVersion(model, requiredModel); + } + } + } + } + } + BundlesAction bundlesAction = new BundlesAction(bundleLocations.toArray(new File[bundleLocations.size()])); + result[0] = bundlesAction; + return result; + } + + private void writeVersion(IModel model, IPluginModelBase requiredModel) { + BundleDescription rDesc = requiredModel.getBundleDescription(); + if (rDesc != null) + for (IPluginImport i : ((IPluginModelBase) model).getPluginBase().getImports()) { + BundleDescription desc = i.getPluginModel().getBundleDescription(); + if (desc != null) + if (desc.getSymbolicName().equals(rDesc.getSymbolicName())) + try { + if (i.getPluginModel().isEditable()) + i.setVersion(getContributionState().getRevision().getVersion().toString()); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } + } + + private void cleanup(IProgressMonitor monitor) throws CoreException { + ResourceUtils.cleanupDir(ResourceUtils.getExportDestination(getContributionState()).toString()); + try { + @SuppressWarnings("unchecked") + SCMOperator operator = (SCMOperator) getContributionState().getProject().getWorkspace() + .getSCMRegistry().get(getProject().getName()); + operator.add("."); //$NON-NLS-1$ + } catch (Exception e) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); + } + refreshLocal(getProject(), IResource.DEPTH_ONE, monitor); + } + + private void refreshLocal(IResource resource, int depth, IProgressMonitor monitor) throws CoreException { + try { + IProgressMonitor pm = SubMonitor.convert(monitor, 1); + resource.refreshLocal(depth, pm); + } catch (OperationCanceledException e) { + } + } + + private void updateBuildProperties(IPluginModelBase model) throws CoreException { + IBuildModel buildModel = PluginRegistry.createBuildModel(model); + IBuild build = buildModel.getBuild(); + IBuildEntry srcEntry = build.getEntry("source.."); //$NON-NLS-1$ + if (srcEntry == null) { + srcEntry = buildModel.getFactory().createEntry("source.."); //$NON-NLS-1$ + if (!srcEntry.contains("src/")) + srcEntry.addToken("src/"); + build.add(srcEntry); + } + IBuildEntry outputEntry = build.getEntry("output.."); //$NON-NLS-1$ + if (outputEntry == null) { + outputEntry = buildModel.getFactory().createEntry("output.."); //$NON-NLS-1$ + if (!outputEntry.contains("bin")) + outputEntry.addToken("bin"); + build.add(outputEntry); + } + if (!srcEntry.contains("src" + IPath.SEPARATOR)) //$NON-NLS-1$ + srcEntry.addToken("src" + IPath.SEPARATOR); //$NON-NLS-1$ + IBuildEntry compilerEntry = build.getEntry("compilerArg"); //$NON-NLS-1$ + if (compilerEntry == null) { + compilerEntry = buildModel.getFactory().createEntry("compilerArg"); //$NON-NLS-1$ + build.add(compilerEntry); + } + if (!compilerEntry.contains("-proc:none")) //$NON-NLS-1$ + compilerEntry.addToken("-proc:none"); //$NON-NLS-1$ + if (buildModel instanceof IEditableModel) + ((IEditableModel) buildModel).save(); + } + + private void compile(final IProgressMonitor monitor) throws CoreException { + final SubMonitor pm = SubMonitor.convert(monitor); + pm.setTaskName("Compile Java"); + pm.subTask("Compiling Java"); + final SubMonitor m = pm.newChild(5, SubMonitor.SUPPRESS_ISCANCELED); + try { + build(getProject(), m); + if (getContributionState().isEdit()) { + build(getProject().getWorkspace().getRoot().getProject(getProject().getName() + ".edit"), m); + } + if (getContributionState().isEditor()) { + build(getProject().getWorkspace().getRoot().getProject(getProject().getName() + ".editor"), m); + } + } catch (OperationCanceledException ex) { + monitor.setCanceled(true); + } catch (CoreException ex) { + ClassMakerPlugin.getInstance().getLog().log(ex.getStatus()); + throw ex; + } catch (Exception ex) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(ex)); + } finally { + if (m != null) + m.done(); + if (pm != null) + pm.done(); + } + try { + notifyAll(); + } catch (IllegalMonitorStateException ex) { + } + } + + private void build(final IProject project, final IProgressMonitor monitor) throws CoreException { + ICommand command = ResourceUtils.getBuildSpec(project.getDescription(), JavaCore.BUILDER_ID); + project.getWorkspace().addResourceChangeListener(new IResourceChangeListener() { + + @Override + public void resourceChanged(IResourceChangeEvent event) { + if (event.getDelta() != null) + for (IResourceDelta delta : event.getDelta().getAffectedChildren(IResourceDelta.CHANGED)) + if (delta.getResource().equals(getProject())) + try { + project.notifyAll(); + } catch (IllegalMonitorStateException ex) { + } + } + }, IResourceChangeEvent.POST_BUILD); + if (JavaManipulation.getPreferenceNodeId() == null) + JavaManipulation.setPreferenceNodeId("org.eclipse.jdt.ui"); + IEclipsePreferences prefs = new ProjectScope(project).getNode(JavaManipulation.getPreferenceNodeId()); + prefs.put("org.eclipse.jdt.ui.importorder", "java;javax;org;com"); + IEclipsePreferences instancePrefs = InstanceScope.INSTANCE.getNode(JavaManipulation.getPreferenceNodeId()); + instancePrefs.put("org.eclipse.jdt.ui.typefilter.enabled", "com.sun.*;sun.org.*;javax.swing.*;java.awt.*"); + try { + prefs.flush(); + instancePrefs.flush(); + } catch (Exception e) { + e.printStackTrace(); + } + IJavaProject javaProject = updateClassPath(monitor); + + for (IPackageFragment p : javaProject.getPackageFragments()) + if (p.getKind() == IPackageFragmentRoot.K_SOURCE) + for (ICompilationUnit cu : p.getCompilationUnits()) { + CompilationUnit astRoot = SharedASTProviderCore.getAST(cu, SharedASTProviderCore.WAIT_YES, monitor); + OrganizeImportsOperation op = new OrganizeImportsOperation(cu, astRoot, false, true, false, null); + project.getWorkspace().run(op, javaProject.getSchedulingRule(), 0, monitor); +// op.run(monitor); + } + project.build(IncrementalProjectBuilder.FULL_BUILD, JavaCore.BUILDER_ID, command.getArguments(), monitor); + for (IMarker m : project.findMarkers(IMarker.MARKER, true, IResource.DEPTH_INFINITE)) { + System.out.print(m.getAttribute(IMarker.MESSAGE) + " "); + System.out.print(m.getResource().getName() + " "); + System.out.println(m.getAttribute(IMarker.LINE_NUMBER)); + } + } + + private IJavaProject updateClassPath(IProgressMonitor monitor) throws CoreException { + IJavaProject javaProject = null; + final SubMonitor pm = SubMonitor.convert(monitor); + pm.setTaskName("Update Classpath"); + pm.subTask("Setting Classpath..."); + final SubMonitor m = pm.newChild(1, SubMonitor.SUPPRESS_ISCANCELED); + try { + IJavaProject editJavaProject = null; + IJavaProject editorJavaProject = null; + try { + javaProject = JavaCore + .create(ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName())); + PDECore.getDefault().getModelManager().findEntry(getProject().getName());// findModel(getProject()).; + JavaCore.getClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, javaProject); +// ITargetPlatformService s = ClassMakerPlugin.getService(ITargetPlatformService.class.getName()); +// ITargetDefinition d = s.getWorkspaceTargetDefinition(); +// d.resolve(monitor); +// for (TargetBundle b : d.getAllBundles()) +// System.out.println(b.getBundleInfo().getSymbolicName()); +// +// try { +// java.nio.file.Path p = FileSystems.getDefault().getPath("file:" + getProject().getLocation(), +// "META-INF", "MANIFEST.MF"); +// BufferedReader r = Files.newBufferedReader(p); +// String l = r.lines().toString(); +// Files.writeString(p, l); +// } catch (IOException e) { +// e.printStackTrace(); +// } + + if (getContributionState().isEdit()) + editJavaProject = JavaCore.create( + ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName() + ".edit")); + if (getContributionState().isEditor()) + editorJavaProject = JavaCore.create( + ResourcesPlugin.getWorkspace().getRoot().getProject(getProject().getName() + ".editor")); + + } catch (IllegalStateException ex) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(ex)); + } + Set entries = new HashSet(); + Set editEntries = new HashSet(); + Set editorEntries = new HashSet(); + for (IClasspathEntry en : javaProject.getRawClasspath()) + if (!en.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName()))) + entries.add(en); + if (editJavaProject != null) + for (IClasspathEntry en : editJavaProject.getRawClasspath()) + if (!en.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName() + ".edit"))) + editEntries.add(en); + if (editorJavaProject != null) + for (IClasspathEntry en : editorJavaProject.getRawClasspath()) + if (!en.getPath().equals(new Path(IPath.SEPARATOR + getProject().getName() + ".editor"))) + editorEntries.add(en); + entry = JavaCore.newSourceEntry( + new Path(IPath.SEPARATOR + getProject().getName() + IPath.SEPARATOR + + ResourceUtils.SOURCE_FOLDER_NAME), + null, + new Path(IPath.SEPARATOR + getProject().getName() + IPath.SEPARATOR + "bin" + IPath.SEPARATOR)); + entries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()) && en.getOutputLocation() == null; + }); + entries.add(entry); + if (editJavaProject != null) { + entry = JavaCore.newSourceEntry( + new Path(IPath.SEPARATOR + getProject().getName() + ".edit" + IPath.SEPARATOR + + ResourceUtils.SOURCE_FOLDER_NAME), + null, new Path(IPath.SEPARATOR + getProject().getName() + ".edit" + IPath.SEPARATOR + "bin" + + IPath.SEPARATOR)); + editEntries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()) && en.getOutputLocation() == null; + }); + if (!editEntries.contains(entry)) + editEntries.add(entry); + } + if (editorJavaProject != null) { + entry = JavaCore.newSourceEntry( + new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR + + ResourceUtils.SOURCE_FOLDER_NAME), + null, new Path(IPath.SEPARATOR + getProject().getName() + ".editor" + IPath.SEPARATOR + "bin" + + IPath.SEPARATOR)); + editorEntries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()) && en.getOutputLocation() == null; + }); + if (!editorEntries.contains(entry)) + editorEntries.add(entry); + } + entry = JavaCore.newContainerEntry(new Path( + "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"), + null, new IClasspathAttribute[] { JavaCore.newClasspathAttribute("module", "true") }, true); + entries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()); + }); + if (!entries.contains(entry)) + entries.add(entry); + if (editJavaProject != null) { + entry = JavaCore.newContainerEntry(new Path( + "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"), + null, new IClasspathAttribute[] { JavaCore.newClasspathAttribute("module", "true") }, true); + editEntries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()); + }); + if (!editEntries.contains(entry)) + editEntries.add(entry); + } + if (editorJavaProject != null) { + entry = JavaCore.newContainerEntry(new Path( + "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"), + null, new IClasspathAttribute[] { JavaCore.newClasspathAttribute("module", "true") }, true); + if (!editorEntries.contains(entry)) + editorEntries.add(entry); + } + entry = JavaCore.newContainerEntry(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, null, null, false); + entries.removeIf(en -> { + return en.getPath().isPrefixOf(entry.getPath()); + }); + if (!entries.contains(entry)) + entries.add(entry); + javaProject.open(m); + JavaCore.getClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, javaProject); + + if (editJavaProject != null) { + entry = JavaCore.newContainerEntry(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, null, null, false); + if (!editEntries.contains(entry)) + editEntries.add(entry); + } + if (editorJavaProject != null) { + entry = JavaCore.newContainerEntry(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, null, null, false); + if (!editorEntries.contains(entry)) + editorEntries.add(entry); + } + +// IPluginModelBase model = PluginRegistry.findModel(getProject()); +// JavaCore.setClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, new IJavaProject[] { javaProject }, +// new IClasspathContainer[] { new RequiredPluginsClasspathContainer(model) }, m); + + { + javaProject.setRawClasspath((IClasspathEntry[]) entries.toArray(new IClasspathEntry[entries.size()]), + m); +// JavaCore.getClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, javaProject); +// ClasspathContainerState.requestClasspathUpdate(getProject()); +// javaProject.getResolvedClasspath(false); + } + if (editJavaProject != null) { + editJavaProject.setRawClasspath( + (IClasspathEntry[]) editEntries.toArray(new IClasspathEntry[editEntries.size()]), m); +// editJavaProject.getResolvedClasspath(false); + } + if (editorJavaProject != null) { + editorJavaProject.setRawClasspath( + (IClasspathEntry[]) editorEntries.toArray(new IClasspathEntry[editorEntries.size()]), m); +// editorJavaProject.getResolvedClasspath(false); + } + } catch (JavaModelException mex) { + throw new CoreException(ClassMakerPlugin.createErrorStatus(mex)); + } catch (OperationCanceledException ocex) { + monitor.setCanceled(true); + } finally { + m.done(); + pm.done(); + } + return javaProject; + } + + @Override + public Stage getDirtyStage() { + return Stage.INSTALLED; + } +} \ No newline at end of file diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEPluginExporter.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEPluginExporter.java deleted file mode 100644 index d6a50495..00000000 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/export/PDEPluginExporter.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright 2012-2021 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.jobs.export; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.SubMonitor; -import org.eclipse.core.runtime.jobs.IJobChangeEvent; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.core.runtime.jobs.JobChangeAdapter; -import org.eclipse.core.runtime.jobs.ProgressProvider; -import org.eclipse.jgit.api.Git; -import org.eclipse.pde.core.IEditableModel; -import org.eclipse.pde.core.IModel; -import org.eclipse.pde.core.IModelProviderEvent; -import org.eclipse.pde.core.build.IBuild; -import org.eclipse.pde.core.build.IBuildEntry; -import org.eclipse.pde.core.build.IBuildModel; -import org.eclipse.pde.core.plugin.IPluginModelBase; -import org.eclipse.pde.core.plugin.PluginRegistry; -import org.eclipse.pde.core.plugin.TargetPlatform; -import org.eclipse.pde.internal.core.ModelProviderEvent; -import org.eclipse.pde.internal.core.PDECore; -import org.eclipse.pde.internal.core.PluginModelManager; -import org.eclipse.pde.internal.core.exports.FeatureExportInfo; -import org.eclipse.pde.internal.core.exports.PluginExportOperation; -import org.enterprisedomain.classmaker.Messages; -import org.enterprisedomain.classmaker.SCMOperator; -import org.enterprisedomain.classmaker.Stage; -import org.enterprisedomain.classmaker.State; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.enterprisedomain.classmaker.jobs.DelegatingJob; -import org.enterprisedomain.classmaker.util.ResourceUtils; -import org.osgi.framework.Version; - -@SuppressWarnings("restriction") -public class PDEPluginExporter extends AbstractExporter { - - private PluginExportOperation op = null; - - private Object lock = new Object(); - - public PDEPluginExporter(int depth, long stateTimestamp) { - super(depth, stateTimestamp); - } - - @Override - public IStatus work(final IProgressMonitor monitor) throws CoreException { - synchronized (lock) { - State state = getContributionState(); - Version version = state.getProject().getVersion(); - final FeatureExportInfo info = new FeatureExportInfo(); - info.destinationDirectory = getProperties().getProperty(EXPORT_DESTINATION_PROP); - info.toDirectory = true; - info.useJarFormat = true; - info.exportMetadata = true; - info.useWorkspaceCompiledClasses = false; - info.targets = new String[][] { { "os", TargetPlatform.getOS() }, { "ws", TargetPlatform.getWS() }, //$NON-NLS-1$ //$NON-NLS-2$ - { "arch", TargetPlatform.getOSArch() }, { "nl", TargetPlatform.getNL() } }; //$NON-NLS-1$ //$NON-NLS-2$ - if (!version.equals(Version.emptyVersion)) - info.qualifier = (String) version.getQualifier(); - PluginModelManager modelManager = PDECore.getDefault().getModelManager(); - List models = new ArrayList(); - IPluginModelBase model = modelManager.findModel(getProject()); - if (model != null) { - models.add(model); - updateBuildProperties(model, true); - if (op != null) - op.deleteBuildFiles(model); - if (new Version(model.getPluginBase().getVersion()).compareTo(state.getRevision().getVersion()) == 0) - cleanup(monitor); - } - if (getContributionState().isEdit()) { - IPluginModelBase edit = modelManager.findModel(getProject().getName() + ".edit"); //$NON-NLS-1$ - if (edit != null) { - models.add(edit); - updateBuildProperties(edit, false); - IPluginModelBase emfEdit = modelManager.findModel("org.eclipse.emf.edit"); //$NON-NLS-1$ - if (emfEdit != null) - models.add(emfEdit); - } - if (op != null) - op.deleteBuildFiles(edit); - } - if (getContributionState().isEditor()) { - IPluginModelBase editor = modelManager.findModel(getProject().getName() + ".editor"); //$NON-NLS-1$ - if (editor != null) { - models.add(editor); - updateBuildProperties(editor, false); - IPluginModelBase emfEditor = modelManager.findModel("org.eclipse.emf.edit.ui"); //$NON-NLS-1$ - if (emfEditor != null) - models.add(emfEditor); - } - if (op != null) - op.deleteBuildFiles(editor); - } - if (!models.isEmpty()) { - info.items = models.toArray(); - List ms = new ArrayList(); - for (IPluginModelBase m : models) - ms.add(m); - IModel[] ma = ms.toArray(new IModel[ms.size()]); - modelManager.modelsChanged( - new ModelProviderEvent(getProject(), IModelProviderEvent.MODELS_ADDED, ma, null, null)); - } - joinJob(Messages.JobNamePDEExport); - final SubMonitor pm = SubMonitor.convert(monitor); - pm.setTaskName(Messages.TaskNamePluginExport); - pm.subTask(Messages.SubTaskNamePluginExport); - final SubMonitor m = pm.newChild(9, SubMonitor.SUPPRESS_ISCANCELED); - - op = new PluginExportOperation(info, Messages.JobNamePDEExport); - DelegatingJob delegate = new DelegatingJob(op, getDepth(), getStateTimestamp()); - delegate.setProgressProvider(new ProgressProvider() { - - @Override - public IProgressMonitor createMonitor(Job job) { - return m; - } - }); - delegate.setContributionState(getContributionState()); - delegate.setNextJob(getNextJob()); - delegate.setResultStage(getResultStage()); - delegate.setDirtyStage(getDirtyStage()); - setNextJob(delegate); - delegate.addJobChangeListener(new JobChangeAdapter() { - - @Override - public void done(IJobChangeEvent event) { - if (event.getJob().getName().equals(Messages.JobNamePDEExport)) { - m.done(); - pm.done(); - } - } - - }); - return ClassMakerPlugin.createInfoStatus(Messages.PDEExportScheduled); - } - } - - @Override - public boolean hasErrors(IStatus status) { - if (op != null) - return op.hasAntErrors(); - return super.hasErrors(status); - } - - private void cleanup(IProgressMonitor monitor) throws CoreException { - ResourceUtils.cleanupDir(getProject(), ResourceUtils.getTargetFolderName()); - try { - @SuppressWarnings("unchecked") - SCMOperator operator = (SCMOperator) getContributionState().getProject().getWorkspace() - .getSCMRegistry().get(getProject().getName()); - operator.add("."); //$NON-NLS-1$ - } catch (Exception e) { - throw new CoreException(ClassMakerPlugin.createErrorStatus(e)); - } - refreshLocal(getProject(), IResource.DEPTH_ONE, monitor); - } - - private void refreshLocal(IResource resource, int depth, IProgressMonitor monitor) throws CoreException { - try { - IProgressMonitor pm = SubMonitor.convert(monitor, 1); - resource.refreshLocal(depth, pm); - } catch (OperationCanceledException e) { - } - } - - private void updateBuildProperties(IPluginModelBase model, boolean src) throws CoreException { - IBuildModel buildModel = PluginRegistry.createBuildModel(model); - IBuild build = buildModel.getBuild(); - if (src) { - IBuildEntry entry = build.getEntry("source.."); //$NON-NLS-1$ - if (entry == null) { - entry = buildModel.getFactory().createEntry("source.."); //$NON-NLS-1$ - build.add(entry); - } - if (!entry.contains("src" + IPath.SEPARATOR)) //$NON-NLS-1$ - entry.addToken("src" + IPath.SEPARATOR); //$NON-NLS-1$ - } - IBuildEntry entry = build.getEntry("compilerArg"); //$NON-NLS-1$ - if (entry == null) { - entry = buildModel.getFactory().createEntry("compilerArg"); //$NON-NLS-1$ - build.add(entry); - } - if (!entry.contains("-proc:none")) //$NON-NLS-1$ - entry.addToken("-proc:none"); //$NON-NLS-1$ - if (buildModel instanceof IEditableModel) - ((IEditableModel) buildModel).save(); - } - - @Override - public Stage getDirtyStage() { - return Stage.INSTALLED; - } -} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/install/OSGiInstaller.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/install/OSGiInstaller.java index 34ba7c79..87cdae4f 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/install/OSGiInstaller.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/install/OSGiInstaller.java @@ -17,19 +17,29 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.net.URI; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.concurrent.Semaphore; +import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; +import org.eclipse.osgi.container.namespaces.EquinoxModuleDataNamespace; +import org.eclipse.osgi.service.resolver.BundleDescription; +import org.eclipse.osgi.service.resolver.BundleSpecification; import org.eclipse.osgi.util.NLS; +import org.eclipse.pde.core.plugin.IPluginModelBase; +import org.eclipse.pde.internal.core.PDECore; +import org.eclipse.pde.internal.core.PluginModelManager; +import org.eclipse.pde.internal.core.bundle.BundlePluginModel; +import org.eclipse.pde.internal.core.bundle.WorkspaceBundleModel; import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.Messages; import org.enterprisedomain.classmaker.Revision; @@ -45,7 +55,7 @@ import org.osgi.framework.BundleListener; import org.osgi.framework.Constants; import org.osgi.framework.FrameworkListener; -import org.osgi.framework.Version; +import org.osgi.framework.wiring.BundleRevision; import org.osgi.framework.wiring.FrameworkWiring; public class OSGiInstaller extends ContainerJob { @@ -64,9 +74,9 @@ public void bundleChanged(BundleEvent event) { && (versionsAreEqual( Version.parseVersion(event.getBundle().getHeaders().get(Constants.BUNDLE_VERSION)), getContributionState().getProject().getVersion(), false) - || versionAreLess( + || versionAreLess(getContributionState().getProject().getVersion(), Version.parseVersion(event.getBundle().getHeaders().get(Constants.BUNDLE_VERSION)), - getContributionState().getProject().getVersion(), true))) + true))) switch (event.getType()) { case BundleEvent.RESOLVED: case BundleEvent.INSTALLED: @@ -98,36 +108,23 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { IStatus result = new MultiStatus(ClassMakerPlugin.PLUGIN_ID, IStatus.OK, "", null); try { Bundle existingBundle = null; - int kind = -1; for (Bundle bundle : getBundles()) { if (versionsAreEqual(Version.parseVersion(bundle.getHeaders().get(Constants.BUNDLE_VERSION)), getContributionState().getProject().getVersion(), false)) { existingBundle = bundle; - kind = 0; - if (getContributionState().isEdit() - && bundle.getSymbolicName().equals(bundle.getSymbolicName() + ".edit")) { - kind = 1; - } - if (getContributionState().isEditor() - && bundle.getSymbolicName().equals(bundle.getSymbolicName() + ".editor")) { - kind = 2; - } } else if (versionAreLess(Version.parseVersion(bundle.getHeaders().get(Constants.BUNDLE_VERSION)), getContributionState().getProject().getVersion(), false)) { existingBundle = bundle; - kind = 0; - if (getContributionState().isEdit() - && bundle.getSymbolicName().equals(bundle.getSymbolicName() + ".edit")) - kind = 1; - if (getContributionState().isEditor() - && bundle.getSymbolicName().equals(bundle.getSymbolicName() + ".editor")) - kind = 2; - result = addStatus(updateBundle(existingBundle, kind, bundleContext), result); + if (getContributionState().isEdit()) + result = addStatus(updateBundle(existingBundle, 1, bundleContext), result); + if (getContributionState().isEditor()) + result = addStatus(updateBundle(existingBundle, 2, bundleContext), result); if (result.isOK()) return result; } } - result = addStatus(installBundle(existingBundle, kind, bundleContext), result); + ((ContainerJob) getNextJob()).getInstalledBundles().clear(); + result = addStatus(installBundle(existingBundle, 0, bundleContext), result); if (getContributionState().isEdit()) result = addStatus(installBundle(existingBundle, 1, bundleContext), result); if (getContributionState().isEditor()) @@ -156,38 +153,40 @@ private IStatus addStatus(IStatus status, IStatus parent) { } private IStatus updateBundle(Bundle existingBundle, int kind, BundleContext context) { + List bundles = new ArrayList(); if (existingBundle == null) - return getWarningStatus(existingBundle, null); + return getWarningStatus(bundles, null); try { context.addBundleListener(listener); switch (kind) { case 0: - existingBundle.update(new FileInputStream( - ResourceUtils.getTargetResourcePath(getProject(), getContributionState()).toFile())); + existingBundle.update( + new FileInputStream(ResourceUtils.getTargetResourcePath(getContributionState()).toFile())); + bundles.add(existingBundle); break; case 1: if (getContributionState().isEdit()) existingBundle.update(new FileInputStream( - ResourceUtils.getEditTargetResourcePath(getProject(), getContributionState()).toFile())); + ResourceUtils.getEditTargetResourcePath(getContributionState()).toFile())); break; case 2: if (getContributionState().isEditor()) existingBundle.update(new FileInputStream( - ResourceUtils.getEditorTargetResourcePath(getProject(), getContributionState()).toFile())); + ResourceUtils.getEditorTargetResourcePath(getContributionState()).toFile())); break; } - refreshBundle(existingBundle, context); + refreshBundle(bundles, context); installed.acquire(); getContributionState().setPhase(getResultStage()); - return getOKStatus(existingBundle); + return getOKStatus(bundles); } catch (BundleException e) { if (e.getType() == BundleException.RESOLVE_ERROR) - return getWarningStatus(existingBundle, e); + return getWarningStatus(bundles, e); else if (e.getType() == BundleException.DUPLICATE_BUNDLE_ERROR) - return getOKStatus(existingBundle); - return getWarningStatus(existingBundle, e); + return getOKStatus(bundles); + return getWarningStatus(bundles, e); } catch (FileNotFoundException e) { - return getWarningStatus(existingBundle, e); + return getWarningStatus(bundles, e); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } finally { @@ -197,7 +196,9 @@ else if (e.getType() == BundleException.DUPLICATE_BUNDLE_ERROR) private IStatus installBundle(Bundle existingBundle, int kind, BundleContext context) throws InterruptedException, CoreException { - Bundle bundle = null; + List bundles = new ArrayList(); + String uri = null; + Set requiredUris = new HashSet(); try { context.addBundleListener(listener); if (existingBundle != null) { @@ -206,12 +207,13 @@ private IStatus installBundle(Bundle existingBundle, int kind, BundleContext con && revision.eIsSet(ClassMakerPackage.Literals.REVISION__STATE_HISTORY) && !revision.getStateHistory().isEmpty()) for (State state : revision.getStateHistory().values()) - if (state.getDomainModel().getGenerated() != null - && state.getDomainModel().getGenerated() instanceof EPackage - && EPackage.Registry.INSTANCE.getEPackage( - ((EPackage) state.getDomainModel().getGenerated()).getNsURI()) != null) + if (state.getDomainModel().getGeneratedEPackage() != null + && state.getDomainModel().getGeneratedEPackage() instanceof EPackage + && EPackage.Registry.INSTANCE + .getEPackage(((EPackage) state.getDomainModel().getGeneratedEPackage()) + .getNsURI()) != null) EPackage.Registry.INSTANCE - .remove(((EPackage) state.getDomainModel().getGenerated()).getNsURI()); + .remove(((EPackage) state.getDomainModel().getGeneratedEPackage()).getNsURI()); existingBundle.uninstall(); refreshBundle(null, context); uninstalled.acquire(); @@ -219,49 +221,119 @@ private IStatus installBundle(Bundle existingBundle, int kind, BundleContext con switch (kind) { case -1: case 0: - bundle = context.installBundle(URI - .createFileURI( - ResourceUtils.getTargetResourcePath(getProject(), getContributionState()).toString()) - .toString()); + uri = URI.createFileURI(ResourceUtils.getTargetResourcePath(getContributionState()).toString()) + .toString(); + extractRequiredURIs(requiredUris, getProject()); break; case 1: - if (getContributionState().isEdit()) - bundle = context - .installBundle(URI - .createFileURI(ResourceUtils - .getEditTargetResourcePath(getProject(), getContributionState()).toString()) - .toString()); + if (getContributionState().isEdit()) { + uri = URI.createFileURI(ResourceUtils.getEditTargetResourcePath(getContributionState()).toString()) + .toString(); + extractRequiredURIs(requiredUris, getEditProject()); + } break; case 2: - if (getContributionState().isEditor()) - bundle = context.installBundle(URI - .createFileURI(ResourceUtils - .getEditorTargetResourcePath(getProject(), getContributionState()).toString()) - .toString()); + if (getContributionState().isEditor()) { + uri = URI + .createFileURI(ResourceUtils.getEditorTargetResourcePath(getContributionState()).toString()) + .toString(); + extractRequiredURIs(requiredUris, getEditorProject()); + } break; } - if (bundle == null) + for (String requiredUri : requiredUris) { + try { + bundles.add(context.installBundle(requiredUri)); + } catch (BundleException e) { + if (e.getType() == BundleException.DUPLICATE_BUNDLE_ERROR) { + ((ContainerJob) getNextJob()).getInstalledBundles().addAll(bundles); + } + } + } + Bundle bundle = context.installBundle(uri); + if (!((List) ((BundleRevision) bundle.adapt(BundleRevision.class)) + .getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE).get(0).getAttributes() + .get(EquinoxModuleDataNamespace.CAPABILITY_CLASSPATH)).contains("bin")) + return ClassMakerPlugin.createErrorStatus("bin is not in bundle classpath"); + bundles.add(bundle); + if (bundles.isEmpty()) return ClassMakerPlugin .createErrorStatus(NLS.bind(Messages.BundleNotInstalled, getProject().getName())); - refreshBundle(bundle, context); - installed.acquire(); + ((ContainerJob) getNextJob()).getInstalledBundles().addAll(bundles); + refreshBundle(bundles, context); getContributionState().setPhase(getResultStage()); - return getOKStatus(bundle); + return getOKStatus(bundles); } catch (BundleException e) { if (e.getType() == BundleException.DUPLICATE_BUNDLE_ERROR) - return getOKStatus(existingBundle, bundle); - return getWarningStatus(bundle, e); + return getOKStatus(existingBundle, bundles); + if (e.getCause() instanceof FileNotFoundException) { + try { + for (String requiredUri : requiredUris) + bundles.add(context.installBundle(requiredUri)); + bundles.add(context.installBundle(uri)); + if (bundles.isEmpty()) + return ClassMakerPlugin + .createErrorStatus(NLS.bind(Messages.BundleNotInstalled, getProject().getName())); + refreshBundle(bundles, context); + getContributionState().setPhase(getResultStage()); + return getOKStatus(bundles); + } catch (BundleException ex) { + if (ex.getType() == BundleException.DUPLICATE_BUNDLE_ERROR) + return getOKStatus(existingBundle, bundles); + } + } + return getWarningStatus(bundles, e); } finally { getContext().removeBundleListener(listener); } } - protected Collection refreshBundle(Bundle bundle, BundleContext context) { - Collection bundles = new ArrayList(); - if (bundle != null) - bundles.add(bundle); + private void extractRequiredURIs(Set requiredUris, IProject project) { + PluginModelManager modelManager = PDECore.getDefault().getModelManager(); + IPluginModelBase model = modelManager.findModel(project); + if (model != null) { + BundleDescription bundleDescription = ((IPluginModelBase) model).getBundleDescription(); + if (bundleDescription != null) + for (BundleSpecification requiredBundle : bundleDescription.getRequiredBundles()) { + IPluginModelBase requiredModel = modelManager.findModel(requiredBundle.getName()); + if (requiredModel instanceof BundlePluginModel) + if (((BundlePluginModel) requiredModel).getBundleModel() instanceof WorkspaceBundleModel) { + BundleDescription bd = requiredModel.getBundleDescription(); + if (!isInstalled(bd)) + requiredUris.add(URI + .createFileURI(ResourceUtils.getExportDestination(getContributionState()) + .append("plugins") //$NON-NLS-1$ + .addTrailingSeparator() + .append(bd.getSymbolicName() + "_" + bd.getVersion().toString()) + .addFileExtension("jar").toString()) // $NON-NLS-1 + .toString()); + } + + } + } + } + + /** + * @return whether the specified bundle is installed. + */ + private boolean isInstalled(BundleDescription bd) { + for (Bundle b : getContext().getBundles()) { + if (b.getSymbolicName().equals(bd.getSymbolicName()) && b.getVersion().equals(bd.getVersion())) { + return true; + } + } + return false; + } + + protected Collection refreshBundle(Collection bundles, BundleContext context) { frameworkWiring = context.getBundle(0).adapt(FrameworkWiring.class); - frameworkWiring.refreshBundles(bundles, new FrameworkListener[0]); + if (bundles != null) + frameworkWiring.refreshBundles(bundles, new FrameworkListener[] { (e) -> { + if (bundles.contains(context.getBundle())) { + uninstalled.release(); + installed.release(); + } + } }); try { notifyAll(); } catch (IllegalMonitorStateException e) { @@ -269,34 +341,41 @@ protected Collection refreshBundle(Bundle bundle, BundleContext context) return bundles; } - private IStatus getWarningStatus(Bundle bundle, Exception e) { - if (bundle == null) + private IStatus getWarningStatus(Collection bundles, Exception e) { + if (bundles.isEmpty()) return ClassMakerPlugin.createWarningStatus(NLS.bind(Messages.BundleNo, getProject().getName()), e); else - return ClassMakerPlugin.createWarningStatus(getStateStatusMessage(bundle), e); + return ClassMakerPlugin.createWarningStatus(getStateStatusMessage(bundles), e); } - private IStatus getOKStatus(Bundle existingBundle, Bundle bundle) { - return ClassMakerPlugin.createOKStatus(Messages.OK + " " + getDuplicateStatusMessage(existingBundle, bundle)); + private IStatus getOKStatus(Bundle existingBundle, Collection bundles) { + return ClassMakerPlugin.createOKStatus(Messages.OK + " " + getDuplicateStatusMessage(existingBundle, bundles)); } - private IStatus getOKStatus(Bundle bundle) { - return ClassMakerPlugin.createOKStatus(Messages.OK + " " + getStateStatusMessage(bundle)); + private IStatus getOKStatus(Collection bundles) { + return ClassMakerPlugin.createOKStatus(Messages.OK + " " + getStateStatusMessage(bundles)); } - protected String getStateStatusMessage(Bundle bundle) { - return NLS.bind(Messages.BundleState, - new Object[] { bundle.getSymbolicName(), bundle.getHeaders().get(Constants.BUNDLE_VERSION), - ClassMakerPlugin.bundleStateAsString(bundle.getState()) }); + protected String getStateStatusMessage(Collection bundles) { + StringBuffer states = new StringBuffer(); + for (Bundle bundle : bundles) + states.append(NLS.bind(Messages.BundleState, + new Object[] { bundle.getSymbolicName(), bundle.getHeaders().get(Constants.BUNDLE_VERSION), + ClassMakerPlugin.bundleStateAsString(bundle.getState()) }) + + " "); + return states.toString().trim(); } - private String getDuplicateStatusMessage(Bundle existingBundle, Bundle bundle) { - return NLS.bind(Messages.BundleDuplicate, - new Object[] { existingBundle.getSymbolicName(), - existingBundle.getHeaders().get(Constants.BUNDLE_VERSION), - ClassMakerPlugin.bundleStateAsString(existingBundle.getState()), bundle.getSymbolicName(), - bundle.getHeaders().get(Constants.BUNDLE_VERSION), - ClassMakerPlugin.bundleStateAsString(bundle.getState()) }); + private String getDuplicateStatusMessage(Bundle existingBundle, Collection bundles) { + StringBuffer states = new StringBuffer(); + for (Bundle bundle : bundles) + states.append(NLS.bind(Messages.BundleDuplicate, + new Object[] { existingBundle.getSymbolicName(), + existingBundle.getHeaders().get(Constants.BUNDLE_VERSION), + ClassMakerPlugin.bundleStateAsString(existingBundle.getState()), bundle.getSymbolicName(), + bundle.getHeaders().get(Constants.BUNDLE_VERSION), + ClassMakerPlugin.bundleStateAsString(bundle.getState()) })); + return states.toString(); } @Override @@ -309,4 +388,4 @@ public Stage getDirtyStage() { return Stage.LOADED; } -} +} \ No newline at end of file diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/load/OSGiEPackageLoader.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/load/OSGiEPackageLoader.java index a69eabd4..d843308a 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/load/OSGiEPackageLoader.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/jobs/load/OSGiEPackageLoader.java @@ -15,78 +15,44 @@ */ package org.enterprisedomain.classmaker.jobs.load; -import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Field; +import java.rmi.registry.Registry; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.Semaphore; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EPackage.Registry; -import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.osgi.util.NLS; +import org.enterprisedomain.classmaker.ClassMakerPackage; import org.enterprisedomain.classmaker.Messages; import org.enterprisedomain.classmaker.Stage; import org.enterprisedomain.classmaker.State; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; +import org.enterprisedomain.classmaker.impl.CustomClassLoader; import org.enterprisedomain.classmaker.jobs.ContainerJob; import org.osgi.framework.Bundle; import org.osgi.framework.BundleEvent; import org.osgi.framework.BundleException; -import org.osgi.framework.BundleListener; import org.osgi.framework.Constants; -import org.osgi.framework.Version; import org.osgi.framework.startlevel.BundleStartLevel; +import org.osgi.util.tracker.BundleTracker; +import org.osgi.util.tracker.BundleTrackerCustomizer; -public class OSGiEPackageLoader extends ContainerJob { +public class OSGiEPackageLoader extends ContainerJob implements BundleTrackerCustomizer { private Semaphore loaded; private Throwable exception; - private BundleListener listener = new BundleListener() { + private int loadedCount; - @Override - public void bundleChanged(BundleEvent event) { - if (event != null && event.getBundle() == null) - return; - if (getProject() != null && event.getBundle().getSymbolicName().equals(getProject().getName())) { - if ((event.getType() == BundleEvent.STARTED || event.getType() == BundleEvent.RESOLVED - || event.getType() == BundleEvent.LAZY_ACTIVATION) - && event.getBundle().getState() == Bundle.ACTIVE) - try { - doLoad(getContributionState(), event.getBundle(), 0); - } catch (Exception e) { - setException(e); - } - } else if (getContributionState().isEdit() - && event.getBundle().getSymbolicName().equals(getProject().getName() + ".edit")) { - if ((event.getType() == BundleEvent.STARTED || event.getType() == BundleEvent.RESOLVED - || event.getType() == BundleEvent.LAZY_ACTIVATION) - && event.getBundle().getState() == Bundle.ACTIVE) - try { - doLoad(getContributionState(), event.getBundle(), 1); - } catch (Exception e) { - setException(e); - } - } else if (getContributionState().isEditor() - && event.getBundle().getSymbolicName().equals(getProject().getName() + ".editor")) { - if ((event.getType() == BundleEvent.STARTED || event.getType() == BundleEvent.RESOLVED - || event.getType() == BundleEvent.LAZY_ACTIVATION) - && event.getBundle().getState() == Bundle.ACTIVE) - try { - doLoad(getContributionState(), event.getBundle(), 2); - } catch (Exception e) { - setException(e); - } - } else - loaded.release(); - } - }; + private EPackage ePackage; public OSGiEPackageLoader(int depth, long stateTimestamp) { super(Messages.JobNameLoader, depth, stateTimestamp); @@ -96,63 +62,106 @@ public IStatus work(IProgressMonitor monitor) throws CoreException { State contribution = getContributionState(); if (contribution.getPhase() == Stage.DEFINED) return ClassMakerPlugin.createErrorStatus(Messages.ModelNotSpecified); + ePackage = null; + BundleTracker bundleTracker = null; Bundle osgiBundle = null; Bundle editBundle = null; Bundle editorBundle = null; - int loadedCount = 0; + loadedCount = 0; try { - for (Bundle bundle : getBundles()) + bundleTracker = new BundleTracker(getContext(), + Bundle.STARTING | Bundle.ACTIVE | Bundle.RESOLVED | Bundle.INSTALLED, this); + for (Bundle bundle : getInstalledBundles()) if (versionsAreEqual(Version.parseVersion(bundle.getHeaders().get(Constants.BUNDLE_VERSION)), getContributionState().getProject().getVersion(), false)) { osgiBundle = bundle; if (getContributionState().isEdit() - && bundle.getSymbolicName().equals(getProject().getName() + ".edit")) { + && bundle.getSymbolicName().equals(getProject().getName() + ".edit")) { //$NON-NLS-1$ editBundle = bundle; loadedCount++; } if (getContributionState().isEditor() - && bundle.getSymbolicName().equals(getProject().getName() + ".editor")) { + && bundle.getSymbolicName().equals(getProject().getName() + ".editor")) { //$NON-NLS-1$ editorBundle = bundle; loadedCount++; } } - loaded = new Semaphore(loadedCount); - getContext().addBundleListener(listener); if (osgiBundle != null) { start(osgiBundle); if (editBundle != null) start(editBundle); if (editorBundle != null) start(editorBundle); - } else - return ClassMakerPlugin.createErrorStatus(NLS.bind(Messages.BundleNotFound, getProject().getName())); + } else { + for (Bundle bundle : getBundles()) { + Version version = Version.parseVersion(bundle.getHeaders().get(Constants.BUNDLE_VERSION)); + Version version2 = getContributionState().getProject().getVersion(); + if (versionsAreEqual(version, version2, false) || versionAreLess(version, version2, true)) { + osgiBundle = bundle; + if (getContributionState().isEdit() + && bundle.getSymbolicName().equals(getProject().getName() + ".edit")) { //$NON-NLS-1$ + editBundle = bundle; + loadedCount++; + } + if (getContributionState().isEditor() + && bundle.getSymbolicName().equals(getProject().getName() + ".editor")) { //$NON-NLS-1$ + editorBundle = bundle; + loadedCount++; + } + } + } + if (osgiBundle != null) { + start(osgiBundle); + if (editBundle != null) + start(editBundle); + if (editorBundle != null) + start(editorBundle); + } else + return ClassMakerPlugin + .createErrorStatus(NLS.bind(Messages.BundleNotFound, getProject().getName())); + } + bundleTracker.open(); + ePackage = bundleTracker.getObject(osgiBundle); if (exception == null) { try { loaded.acquire(); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } - return getStatus(osgiBundle); + return getStatus(osgiBundle, ePackage); } else { throw new CoreException(ClassMakerPlugin.createErrorStatus(exception)); } } finally { + if (bundleTracker != null) + bundleTracker.close(); monitor.done(); - getContext().removeBundleListener(listener); } } private void start(Bundle osgiBundle) { if (osgiBundle.getHeaders().get(Constants.FRAGMENT_HOST) == null) { - getContext().removeBundleListener(listener); - getContext().addBundleListener(listener); - if (osgiBundle.getBundleId() != 0) - osgiBundle.adapt(BundleStartLevel.class).setStartLevel(4); - try { - osgiBundle.start(getOptions(false)); - } catch (BundleException e) { - setException(e); + for (Bundle bundle : getInstalledBundles()) { + if (bundle.equals(osgiBundle)) + continue; + startBundle(bundle); + } + for (Bundle bundle : getBundles()) { + if (bundle.equals(osgiBundle)) + continue; + startBundle(bundle); } + startBundle(osgiBundle); + } + } + + private void startBundle(Bundle bundle) { + if (bundle.getBundleId() != 0) + bundle.adapt(BundleStartLevel.class).setStartLevel(4); + try { + bundle.start(getOptions(false, true)); + } catch (BundleException e) { + setException(e); } } @@ -161,181 +170,178 @@ protected boolean terminate() { return true; } - private IStatus getStatus(Bundle osgiBundle) { - String ePackagesMsg = ""; //$NON-NLS-1$ - boolean warning = false; - if (getContributionState().getDomainModel().getGenerated() == null) { - ePackagesMsg = Messages.EPackageNo; - warning = true; - } else { - EPackage ePackage = null; - if (getContributionState().getDomainModel().getGenerated() instanceof EPackage) - ePackage = (EPackage) getContributionState().getDomainModel().getGenerated(); - else - return ClassMakerPlugin.createInfoStatus(NLS.bind("EObject {0} is not a EPackage", - getContributionState().getDomainModel().getGenerated())); - if (ePackage != null) - ePackagesMsg = ePackagesMsg + ePackage.getNsURI() + ", "; //$NON-NLS-1$ - if (ePackagesMsg.length() > 2) - ePackagesMsg = ePackagesMsg.subSequence(0, ePackagesMsg.length() - 2).toString(); - else { - ePackagesMsg = Messages.EPackageNo; - warning = true; - } - } - if (warning) - return ClassMakerPlugin.createWarningStatus( - NLS.bind(Messages.EPackageClassLoadComplete, new Object[] { osgiBundle.getSymbolicName(), - osgiBundle.getHeaders().get(Constants.BUNDLE_VERSION), ePackagesMsg })); - return ClassMakerPlugin.createOKStatus(Messages.OK + " " //$NON-NLS-1$ - + NLS.bind(Messages.EPackageClassLoadComplete, new Object[] { osgiBundle.getSymbolicName(), - osgiBundle.getHeaders().get(Constants.BUNDLE_VERSION), ePackagesMsg })); + private int getOptions(boolean autoStart, boolean activationPolicy) { + int result = 0; + if (autoStart) + result += Bundle.START_TRANSIENT; + if (activationPolicy) + result += Bundle.START_ACTIVATION_POLICY; + return result; + } + private void registerEPackage(Registry registry, EPackage ePackage) { + registry.put(ePackage.getNsURI(), ePackage); } - private int getOptions(boolean autoStart) { - return autoStart ? Bundle.START_TRANSIENT : 0; + public void setException(Throwable exception) { + this.exception = exception; } - private synchronized void doLoad(State state, Bundle osgiBundle, int kind) throws Exception { - switch (kind) { - case 0: - ClassMakerPlugin.runWithProgress(new IRunnableWithProgress() { + @Override + public Stage getResultStage() { + return Stage.LOADED; + } - @Override - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - try { - EObject model = state.getDomainModel().getDynamic(); - String packageClassName = null; - if (model instanceof EPackage) - packageClassName = CodeGenUtil.safeName(((EPackage) model).getName()) + "." //$NON-NLS-1$ - + state.getPackageClassName(); - Class packageClass = null; - try { - packageClass = osgiBundle.loadClass(packageClassName); - } catch (Exception e) { - setException(e); - } + @Override + public Stage getDirtyStage() { + return Stage.LOADED; + } - EPackage ePackage = null; - try { - ePackage = (EPackage) packageClass.getField("eINSTANCE").get(null); // $NON-NLS-1$ - if (ePackage != null) { - getContributionState().getDomainModel().setGenerated(ePackage); - registerEPackage(Registry.INSTANCE, ePackage); - if (getContributionState().getRevision().getProject().getWorkspace() - .getResourceSet() != null) - registerEPackage(getContributionState().getRevision().getProject().getWorkspace() - .getResourceSet().getPackageRegistry(), ePackage); - } - } catch (ClassCastException e) { - if (ePackage != null) { - getContributionState().getDomainModel().setGenerated(ePackage); - registerEPackage(Registry.INSTANCE, ePackage); - if (getContributionState().getRevision().getProject().getWorkspace() - .getResourceSet() != null) - registerEPackage(getContributionState().getRevision().getProject().getWorkspace() - .getResourceSet().getPackageRegistry(), ePackage); - } - } - } catch (Exception e) { - setException(e); - throw new InvocationTargetException(e); - } finally { - loaded.release(); - getContributionState().getProject().setNeedCompletionNotification(true); - } + @Override + public EPackage addingBundle(Bundle bundle, BundleEvent event) { + ePackage = null; + try { + EObject model = getContributionState().getDomainModel().getDynamicEPackage(); + String packageClassName = null; + if (model == null) { + loaded = new Semaphore(loadedCount); + return null; + } + if (model instanceof EPackage) { + if (!bundle.getSymbolicName().equalsIgnoreCase(((EPackage) model).getName())) { + if (loaded == null) + loaded = new Semaphore(loadedCount); + return null; } - }); - break; - case 1: - ClassMakerPlugin.runWithProgress(new IRunnableWithProgress() { - - @Override - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - - EObject model0 = state.getDomainModel().getDynamic(); - String pluginClassName = null; - if (model0 instanceof EPackage) - pluginClassName = CodeGenUtil.safeName(((EPackage) model0).getName()) + ".provider." //$NON-NLS-1$ - + state.getEditPluginClassName(); - Class pluginClass = null; - try { - pluginClass = osgiBundle.loadClass(pluginClassName); - } catch (Exception e) { - setException(e); - } - EMFPlugin editPlugin = null; - try { - editPlugin = (EMFPlugin) pluginClass.getField("INSTANCE").get(null); - if (editPlugin != null) - getContributionState().getDomainModel().setGeneratedEdit(editPlugin); - } catch (Exception e) { - setException(e); - throw new InvocationTargetException(e); - } finally { - loaded.release(); - if (loaded.availablePermits() >= 1) { - getContributionState().getProject().setNeedCompletionNotification(true); - } - } + packageClassName = (getContributionState().eIsSet(ClassMakerPackage.Literals.STATE__BASE_PACKAGE) + ? getContributionState().getBasePackage() + "." //$NON-NLS-1$ + : "") //$NON-NLS-1$ + + CodeGenUtil.safeName(((EPackage) model).getName()) + "." //$NON-NLS-1$ + + getContributionState().getPackageClassName(); + } + Class packageClass = null; + try { + if (bundle.getState() != org.eclipse.osgi.container.Module.State.UNINSTALLED.ordinal()) + packageClass = bundle.loadClass(packageClassName); + } catch (ClassNotFoundException e) { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + try { + Thread.currentThread().setContextClassLoader(getCustomClassLoader(bundle, (EPackage) model, cl)); + packageClass = Thread.currentThread().getContextClassLoader().loadClass(packageClassName); + } catch (ClassNotFoundException ex) { + Thread.currentThread().setContextClassLoader(cl); + packageClass = Thread.currentThread().getContextClassLoader().loadClass(packageClassName); + } finally { + Thread.currentThread().setContextClassLoader(cl); } - }); - break; - case 2: - ClassMakerPlugin.runWithProgress(new IRunnableWithProgress() { - - @Override - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - - final EObject model1 = state.getDomainModel().getDynamic(); - String pluginClassName1 = null; - if (model1 instanceof EPackage) - pluginClassName1 = CodeGenUtil.safeName(((EPackage) model1).getName()) + ".presentation." //$NON-NLS-1$ - + state.getEditorPluginClassName(); - Class pluginClass1 = null; - try { - pluginClass1 = osgiBundle.loadClass(pluginClassName1); - } catch (Exception e) { - setException(e); - } - EMFPlugin editorPlugin = null; - try { - editorPlugin = (EMFPlugin) pluginClass1.getField("INSTANCE").get(null); - if (editorPlugin != null) - getContributionState().getDomainModel().setGeneratedEditor(editorPlugin); - } catch (Exception e) { - setException(e); - throw new InvocationTargetException(e); - } finally { - loaded.release(); - if (loaded.availablePermits() >= 1) { - getContributionState().getProject().setNeedCompletionNotification(true); - } - } + } + loaded = new Semaphore(loadedCount); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + try { + Thread.currentThread().setContextClassLoader(getCustomClassLoader(bundle, (EPackage) model, cl)); + Field field = packageClass.getField("eINSTANCE"); //$NON-NLS-1$ + ePackage = (EPackage) field.get(null); + if (ePackage != null) { + getContributionState().getDomainModel().setGeneratedEPackage(ePackage); + registerEPackage(Registry.INSTANCE, ePackage); + if (getContributionState().getRevision().getProject().getWorkspace().getResourceSet() != null) + registerEPackage(getContributionState().getRevision().getProject().getWorkspace() + .getResourceSet().getPackageRegistry(), ePackage); } - - }); - break; + } catch (NoClassDefFoundError e) { + e.getCause().printStackTrace(); + } catch (ClassCastException e) { + if (ePackage != null) { + getContributionState().getDomainModel().setGeneratedEPackage(ePackage); + registerEPackage(Registry.INSTANCE, ePackage); + if (getContributionState().getRevision().getProject().getWorkspace().getResourceSet() != null) + registerEPackage(getContributionState().getRevision().getProject().getWorkspace() + .getResourceSet().getPackageRegistry(), ePackage); + } + } finally { + Thread.currentThread().setContextClassLoader(cl); + } + } catch (ClassNotFoundException e) { + } catch (Exception e) { + setException(e); + ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); + } finally { + loaded.release(); } + getContributionState().getProject().setNeedCompletionNotification(true); + return ePackage; } - private void registerEPackage(Registry registry, EPackage ePackage) { - registry.put(ePackage.getNsURI(), ePackage); + @Override + public void modifiedBundle(Bundle bundle, BundleEvent event, EPackage object) { } - public void setException(Throwable exception) { - this.exception = exception; + @Override + public void removedBundle(Bundle bundle, BundleEvent event, EPackage object) { } - @Override - public Stage getResultStage() { - return Stage.LOADED; + public ClassLoader getCustomClassLoader(Bundle bundle, EPackage model, ClassLoader cl) { + if (!getContributionState().getProject().eIsSet(ClassMakerPackage.Literals.PROJECT__CLASS_LOADER) + || ((CustomClassLoader) getContributionState().getProject().getClassLoader()).getBundleVersion() + .compareTo(bundle.getVersion()) < 0) { + List pkgs = new ArrayList(5); + String pkg = (getContributionState().eIsSet(ClassMakerPackage.Literals.STATE__BASE_PACKAGE) + ? getContributionState().getBasePackage() + "." //$NON-NLS-1$ + : "") //$NON-NLS-1$ + + CodeGenUtil.safeName(model.getName()); + pkgs.add(pkg); + pkgs.add(pkg + ".impl"); + pkgs.add(pkg + ".util"); + if (getContributionState().isEdit()) + pkgs.add(pkg + ".provider"); + if (getContributionState().isEditor()) + pkgs.add(pkg + ".presentation"); + getContributionState().getProject().setClassLoader(new CustomClassLoader(bundle, pkgs, cl)); + } + return getContributionState().getProject().getClassLoader(); } - @Override - public Stage getDirtyStage() { - return Stage.LOADED; + private IStatus getStatus(Bundle osgiBundle, EPackage ePackage) { + String ePackagesMsg = ""; //$NON-NLS-1$ + boolean warning = false; + if (getContributionState().getDomainModel().getGeneratedEPackage() == null) { + ePackagesMsg = Messages.ObjectNo; + warning = true; + } else { + EMFPlugin editPlugin = null; + EMFPlugin editorPlugin = null; + if (getContributionState().getDomainModel().getGeneratedEPackage() instanceof EPackage) + ePackage = (EPackage) getContributionState().getDomainModel().getGeneratedEPackage(); + else if (getContributionState().isEdit() + && getContributionState().getDomainModel().getGeneratedEditPlugin() instanceof EMFPlugin) + editPlugin = getContributionState().getDomainModel().getGeneratedEditPlugin(); + else if (getContributionState().isEditor() + && getContributionState().getDomainModel().getGeneratedEditorPlugin() instanceof EMFPlugin) + editorPlugin = getContributionState().getDomainModel().getGeneratedEditorPlugin(); + else + return ClassMakerPlugin.createInfoStatus(NLS.bind(Messages.EObjectIsNotEPackage, + getContributionState().getDomainModel().getGeneratedEPackage())); + if (ePackage != null) + ePackagesMsg = ePackagesMsg + ePackage.getNsURI() + ", "; //$NON-NLS-1$ + else if (editPlugin != null) + ePackagesMsg = ePackagesMsg + editPlugin.getSymbolicName() + ", "; //$NON-NLS-1$ + else if (editorPlugin != null) + ePackagesMsg = ePackagesMsg + editorPlugin.getSymbolicName() + ", "; //$NON-NLS-1$ + if (ePackagesMsg.length() > 2) + ePackagesMsg = ePackagesMsg.subSequence(0, ePackagesMsg.length() - 2).toString(); + else { + ePackagesMsg = Messages.ObjectNo; + warning = true; + } + } + if (warning) + return ClassMakerPlugin.createWarningStatus( + NLS.bind(Messages.ObjectClassLoadComplete, new Object[] { osgiBundle.getSymbolicName(), + osgiBundle.getHeaders().get(Constants.BUNDLE_VERSION), ePackagesMsg })); + return ClassMakerPlugin.createOKStatus(Messages.OK + " " //$NON-NLS-1$ + + NLS.bind(Messages.ObjectClassLoadComplete, new Object[] { osgiBundle.getSymbolicName(), + osgiBundle.getHeaders().get(Constants.BUNDLE_VERSION), ePackagesMsg })); + } } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/messages.properties b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/messages.properties index 05403d06..3ea888de 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/messages.properties +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/messages.properties @@ -5,8 +5,8 @@ BundleState=Bundle {0}-{1} is {2}. JobNameCodeGeneration={0} Generation JobNameCodeGenerator=Code Generation BundleDuplicate=Bundle {0} is already exist in version {1} and state {2}. Duplicating bundle {3}-{4} installation is failed and in state {5}. -EPackageClassLoadComplete=Loading of bundle {0}-{1} with EPackage(s) {2} has been completed successfully. -EPackageNo=no EPackage +ObjectClassLoadComplete=Loading of bundle {0}-{1} with object(s) {2} has been completed successfully. +ObjectNo=no objects WarningEPackageNoClassifiers=EPackage {0} doesn't have classifiers. JobNameGenModelConfiguration=GenModel Configuration JobNameGenModelGeneration=GenModel Generation @@ -18,9 +18,9 @@ JobNameModelResource=Model Persistence BundleNo=Bundle {0} not found. VersionDoesNotExists=Version {0} not created. JobNamePDEExport=PDE Plug-in Export -PDEExportScheduled=PDE Plug-in Export scheduled. ProjectNotExist=The project {0} was not created before generation. DefaultResourceExt=xmi +EObjectIsNotEPackage=EObject {0} is not a EPackage None=None OK=OK ResourceImported=Resource {0} has been imported. diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/scm/GitSCMOperator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/scm/GitSCMOperator.java index ea27eeeb..f1337cdf 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/scm/GitSCMOperator.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/scm/GitSCMOperator.java @@ -1,12 +1,26 @@ +/** + * Copyright 2022 Kyrill Zotkin + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.enterprisedomain.classmaker.scm; import java.io.File; import java.io.IOException; import java.text.ParseException; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Platform; import org.eclipse.jgit.api.AddCommand; import org.eclipse.jgit.api.CommitCommand; import org.eclipse.jgit.api.Git; @@ -18,7 +32,6 @@ import org.enterprisedomain.classmaker.State; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.impl.SCMOperatorImpl; -import org.osgi.framework.Version; public class GitSCMOperator extends SCMOperatorImpl { @@ -27,9 +40,8 @@ public synchronized Git getRepositorySCM() throws Exception { Git git = (Git) getRegistry().getSCM(getProjectName()); if (git != null) return git; - IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); - IPath projectGitPath = workspaceRoot.getLocation() - .append(workspaceRoot.getProject(getProjectName()).getFullPath()); + IPath root = Platform.getStateLocation(Platform.getBundle(ClassMakerPlugin.PLUGIN_ID)); + IPath projectGitPath = root.append(getProjectName()); return getRepositorySCM(projectGitPath.toFile(), getRegistry()); } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerAdapterFactory.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerAdapterFactory.java index 8613e2a4..8cb5e903 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerAdapterFactory.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerAdapterFactory.java @@ -19,12 +19,14 @@ import java.util.concurrent.Executor; import java.util.concurrent.Future; +import javax.management.Notification; + import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.enterprisedomain.classmaker.Blueprint; @@ -48,7 +50,6 @@ import org.enterprisedomain.classmaker.Strategy; import org.enterprisedomain.classmaker.Workspace; import org.enterprisedomain.classmaker.jobs.Worker; -import org.osgi.framework.Version; /** * The Adapter Factory for the model. It provides @@ -185,6 +186,11 @@ public Adapter caseStageQualifierToCustomizerMapEntry(Map.Entry> object) { + return createStageQualifierToWorkersMapEntryAdapter(); + } + @Override public Adapter caseModels(Models object) { return createModelsAdapter(); @@ -519,6 +525,21 @@ public Adapter createStageQualifierToCustomizerMapEntryAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link java.util.Map.Entry + * Stage Qualifier To Workers Map Entry}'. This + * default implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * + * + * @return the new adapter. + * @see java.util.Map.Entry + * @generated + */ + public Adapter createStageQualifierToWorkersMapEntryAdapter() { + return null; + } + /** * Creates a new adapter for an object of class * '{@link org.enterprisedomain.classmaker.Models Models}'. The Switch for the model's inheritance @@ -235,6 +235,14 @@ protected T1 doSwitch(int classifierID, EObject theEObject) { result = defaultCase(theEObject); return result; } + case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY: { + @SuppressWarnings("unchecked") + Map.Entry> stageQualifierToWorkersMapEntry = (Map.Entry>) theEObject; + T1 result = caseStageQualifierToWorkersMapEntry(stageQualifierToWorkersMapEntry); + if (result == null) + result = defaultCase(theEObject); + return result; + } case ClassMakerPackage.MODELS: { Models models = (Models) theEObject; T1 result = caseModels(models); @@ -603,6 +611,22 @@ public T1 caseStageQualifierToCustomizerMapEntry(Map.EntryStage + * Qualifier To Workers Map Entry'. This + * implementation returns null; returning a non-null result will terminate the + * switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Stage + * Qualifier To Workers Map Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T1 caseStageQualifierToWorkersMapEntry(Map.Entry> object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of * 'Models'. This implementation returns null; diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerValidator.java index 0d40f8ca..72194729 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerValidator.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ClassMakerValidator.java @@ -16,6 +16,7 @@ package org.enterprisedomain.classmaker.util; import java.lang.reflect.InvocationTargetException; +import java.net.URI; import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -23,6 +24,8 @@ import java.util.concurrent.Future; import java.util.concurrent.Semaphore; +import javax.management.Notification; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.core.runtime.IProgressMonitor; @@ -30,11 +33,9 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.emf.common.EMFPlugin; import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; @@ -62,7 +63,6 @@ import org.enterprisedomain.classmaker.Strategy; import org.enterprisedomain.classmaker.Workspace; import org.enterprisedomain.classmaker.jobs.Worker; -import org.osgi.framework.Version; /** * The Validator for the model. + * + * @generated + */ + public boolean validateStageQualifierToWorkersMapEntry(Map.Entry stageQualifierToWorkersMapEntry, + DiagnosticChain diagnostics, Map context) { + return validate_EveryDefaultConstraint((EObject) stageQualifierToWorkersMapEntry, diagnostics, context); + } + /** * * @@ -545,6 +559,16 @@ public boolean validateStage(Stage stage, DiagnosticChain diagnostics, Map + * + * @generated + */ + public boolean validateClassLoader(ClassLoader classLoader, DiagnosticChain diagnostics, + Map context) { + return true; + } + /** * * diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ModelUtil.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ModelUtil.java index c376deb4..05ddd715 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ModelUtil.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ModelUtil.java @@ -82,7 +82,10 @@ public static boolean eObjectsAreEqual(EObject first, EList second, boo if (result) return result; for (EObject secondEObject : second) - result |= eObjectsAreEqual(first, secondEObject, conjunction); + if (conjunction) + result &= eObjectsAreEqual(first, secondEObject, conjunction); + else + result |= eObjectsAreEqual(first, secondEObject, conjunction); return result; } @@ -93,7 +96,10 @@ public static boolean eObjectsAreEqual(EList first, EList seco if (result) return result; for (EObject firstEObject : first) - result |= eObjectsAreEqual(firstEObject, second, conjunction); + if (conjunction) + result &= eObjectsAreEqual(firstEObject, second, conjunction); + else + result |= eObjectsAreEqual(firstEObject, second, conjunction); return result; } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ProjectAdapterFactory.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ProjectAdapterFactory.java index 108d2a3d..83515040 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ProjectAdapterFactory.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ProjectAdapterFactory.java @@ -12,7 +12,7 @@ public class ProjectAdapterFactory implements IAdapterFactory { @Override public T getAdapter(Object adaptableObject, Class adapterType) { if (ADAPTED_CLASSES[0].isAssignableFrom(adapterType)) - return (T) ((Project) adaptableObject).getChildren().get(0); + return (T) ((Project) adaptableObject).getResource(); return null; } diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ResourceUtils.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ResourceUtils.java index 86ef5b8d..a5557aac 100644 --- a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ResourceUtils.java +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/util/ResourceUtils.java @@ -1,5 +1,5 @@ /** - * Copyright 2012-2018 Kyrill Zotkin + * Copyright 2012-2025 Kyrill Zotkin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.lang.reflect.Array; +import java.net.URI; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.ArrayList; @@ -36,12 +38,11 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.preferences.IPreferencesService; import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.util.URI; -import org.eclipse.jgit.lib.Constants; import org.eclipse.pde.internal.core.ICoreConstants; import org.enterprisedomain.classmaker.Messages; import org.enterprisedomain.classmaker.State; @@ -50,6 +51,8 @@ @SuppressWarnings("restriction") public class ResourceUtils { + public static final String SOURCE_FOLDER_NAME = "src"; /// main/java"; //$NON-NLS-1$ + public static List PROJECT_DELETE_MASK; private static final String PLUGIN_PROPS_FILENAME_DESCRIPTOR = "plugin.properties"; @@ -69,7 +72,6 @@ public class ResourceUtils { static { PROJECT_DELETE_MASK = new ArrayList(); - PROJECT_DELETE_MASK.add(Constants.DOT_GIT); PROJECT_DELETE_MASK.add(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR); PROJECT_DELETE_MASK.add(ICoreConstants.MANIFEST_FOLDER_NAME); PROJECT_DELETE_MASK.add(ICoreConstants.MANIFEST_FILENAME); @@ -83,22 +85,23 @@ public static IPath getModelTransformationPath(IProject project, return project.getFullPath().append(getModelFolderName()).append(transformationURI.lastSegment()); } - public static IPath getExportDestination(IProject project) { - return project.getLocation().append(getTargetFolderName()); + public static IPath getExportDestination(State state) { + return Platform.getStateLocation(Platform.getBundle(ClassMakerPlugin.PLUGIN_ID)).append(state.getProjectName()) + .append(getTargetFolderName()); } - public static IPath getTargetResourcePath(IProject project, State state) { - return getExportDestination(project).append("plugins").addTrailingSeparator() //$NON-NLS-1$ + public static IPath getTargetResourcePath(State state) { + return getExportDestination(state).append("plugins").addTrailingSeparator() //$NON-NLS-1$ .append(state.getDeployableUnitName()).addFileExtension("jar"); //$NON-NLS-1$ } - public static IPath getEditTargetResourcePath(IProject project, State state) { - return getExportDestination(project).append("plugins").addTrailingSeparator() //$NON-NLS-1$ + public static IPath getEditTargetResourcePath(State state) { + return getExportDestination(state).append("plugins").addTrailingSeparator() //$NON-NLS-1$ .append(state.getEditDeployableUnitName()).addFileExtension("jar"); //$NON-NLS-1$ } - public static IPath getEditorTargetResourcePath(IProject project, State state) { - return getExportDestination(project).append("plugins").addTrailingSeparator() //$NON-NLS-1$ + public static IPath getEditorTargetResourcePath(State state) { + return getExportDestination(state).append("plugins").addTrailingSeparator() //$NON-NLS-1$ .append(state.getEditorDeployableUnitName()).addFileExtension("jar"); //$NON-NLS-1$ } @@ -148,19 +151,21 @@ public static boolean isProjectExists(String projectName) { return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName).exists(); } - public static String[] addElement(String[] elements, String element) { - String[] oldElements = elements; - String[] newElements = new String[oldElements.length + 1]; + public static T[] addElement(T[] elements, T element) { + T[] oldElements = elements; + @SuppressWarnings("unchecked") + T[] newElements = (T[]) Array.newInstance(oldElements.getClass().getComponentType(), oldElements.length + 1); System.arraycopy(oldElements, 0, newElements, 0, oldElements.length); newElements[oldElements.length] = element; return newElements; } - public static String[] removeElement(String[] elements, String element) { - String[] oldElements = elements; + public static T[] removeElement(T[] elements, T element) { + T[] oldElements = elements; if (oldElements.length == 0) return oldElements; - String[] newNatures = new String[oldElements.length - 1]; + @SuppressWarnings("unchecked") + T[] newNatures = (T[]) Array.newInstance(oldElements.getClass().getComponentType(), oldElements.length - 1); int index = 0; for (int i = 0; i < oldElements.length; i++) if (oldElements[i].equals(element)) @@ -171,6 +176,9 @@ public static String[] removeElement(String[] elements, String element) { public static void addProjectNature(IProject project, String natureId) throws CoreException { IProjectDescription description = project.getDescription(); + for (String nature : description.getNatureIds()) + if (nature.equals(natureId)) + return; description.setNatureIds(addElement(description.getNatureIds(), natureId)); IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); SubMonitor pm = null; @@ -309,6 +317,14 @@ public static void restoreAutoBuilding(IWorkspace workspace) throws CoreExceptio setAutoBuilding(workspace, oldAutoBuilding); } + public static void cleanupDir() throws CoreException { + cleanupDir(""); + } + + public static void cleanupDir(String folderPath) throws CoreException { + cleanupDir(folderPath, new String[] {}); + } + public static void cleanupDir(IProject project) throws CoreException { cleanupDir(project, ""); } @@ -332,6 +348,19 @@ public static void cleanupDir(IProject project, String folderPath, String[] excl delete(new File(folder.toString() + File.separator + fileName), excluding); } + public static void cleanupDir(String folderPath, String[] excluding) throws CoreException { + IPath path; + if (folderPath.isEmpty()) + path = ResourcesPlugin.getWorkspace().getRoot().getLocation(); + else + path = new Path(folderPath); + File folder = path.toFile(); + if (!folder.exists()) + return; + for (String fileName : folder.list()) + delete(new File(folder.toString() + File.separator + fileName), excluding); + } + public static void delete(File fileOrDir, String[] excluding) { List excludingList = null; if (excluding == null) diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/AdapterValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/AdapterValidator.java new file mode 100644 index 00000000..0de2d2f0 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/AdapterValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.emf.common.notify.Adapter}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface AdapterValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/BlueprintValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/BlueprintValidator.java new file mode 100644 index 00000000..4b885a95 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/BlueprintValidator.java @@ -0,0 +1,31 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.enterprisedomain.classmaker.CompletionListener; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Blueprint}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface BlueprintValidator { + boolean validate(); + + boolean validateDynamicModel(EObject value); + + boolean validateDependencies(EList value); + + boolean validateCompletionListeners(EList value); + + boolean validateEdit(boolean value); + + boolean validateEditor(boolean value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ClassMakerServiceValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ClassMakerServiceValidator.java new file mode 100644 index 00000000..90aae55b --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ClassMakerServiceValidator.java @@ -0,0 +1,21 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.Workspace; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.ClassMakerService}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ClassMakerServiceValidator { + boolean validate(); + + boolean validateWorkspace(Workspace value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionListenerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionListenerValidator.java new file mode 100644 index 00000000..7547b1d6 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionListenerValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.CompletionListener}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface CompletionListenerValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionNotificationAdapterValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionNotificationAdapterValidator.java new file mode 100644 index 00000000..18a9b6e2 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CompletionNotificationAdapterValidator.java @@ -0,0 +1,24 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.core.runtime.IStatus; +import org.enterprisedomain.classmaker.Project; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.CompletionNotificationAdapter}. This + * doesn't really do anything, and it's not a real EMF artifact. It was + * generated by the org.eclipse.emf.examples.generator.validator plug-in to + * illustrate how EMF's code generator can be extended. This can be disabled + * with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface CompletionNotificationAdapterValidator { + boolean validate(); + + boolean validateError(IStatus value); + + boolean validateProject(Project value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ContributionValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ContributionValidator.java new file mode 100644 index 00000000..ecd5dd05 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ContributionValidator.java @@ -0,0 +1,23 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Contribution}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ContributionValidator { + boolean validate(); + + boolean validateDependencies(EList value); + + boolean validateLatestVersion(Version value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CustomizerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CustomizerValidator.java new file mode 100644 index 00000000..b7f30271 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/CustomizerValidator.java @@ -0,0 +1,25 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.StageQualifier; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Customizer}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface CustomizerValidator { + boolean validate(); + + boolean validateRank(int value); + + boolean validateExclusive(boolean value); + + boolean validateStage(StageQualifier value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ExecutorValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ExecutorValidator.java new file mode 100644 index 00000000..ff3bb705 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ExecutorValidator.java @@ -0,0 +1,17 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for {@link java.util.concurrent.Executor}. This + * doesn't really do anything, and it's not a real EMF artifact. It was + * generated by the org.eclipse.emf.examples.generator.validator plug-in to + * illustrate how EMF's code generator can be extended. This can be disabled + * with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ExecutorValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/FutureValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/FutureValidator.java new file mode 100644 index 00000000..f988c6d4 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/FutureValidator.java @@ -0,0 +1,17 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for {@link java.util.concurrent.Future}. This + * doesn't really do anything, and it's not a real EMF artifact. It was + * generated by the org.eclipse.emf.examples.generator.validator plug-in to + * illustrate how EMF's code generator can be extended. This can be disabled + * with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface FutureValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/IAdapterFactoryValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/IAdapterFactoryValidator.java new file mode 100644 index 00000000..61cf1eb3 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/IAdapterFactoryValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.core.runtime.IAdapterFactory}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface IAdapterFactoryValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ISchedulingRuleValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ISchedulingRuleValidator.java new file mode 100644 index 00000000..29af1e25 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ISchedulingRuleValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.core.runtime.jobs.ISchedulingRule}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ISchedulingRuleValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ItemValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ItemValidator.java new file mode 100644 index 00000000..840bc189 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ItemValidator.java @@ -0,0 +1,43 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import java.util.Locale; + +import org.eclipse.emf.common.util.EMap; +import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.Item; +import org.enterprisedomain.classmaker.Models; +import org.enterprisedomain.classmaker.Project; +import org.enterprisedomain.classmaker.Stage; +import org.enterprisedomain.classmaker.StageQualifier; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Item}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ItemValidator { + boolean validate(); + + boolean validateModelName(String value); + + boolean validatePhase(Stage value); + + boolean validateLanguage(String value); + + boolean validateDomainModel(Models value); + + boolean validateCustomizers(EMap value); + + boolean validateParent(Item value); + + boolean validateLocale(Locale value); + + boolean validateProject(Project value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/LongToStateMapEntryValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/LongToStateMapEntryValidator.java new file mode 100644 index 00000000..77ed4a99 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/LongToStateMapEntryValidator.java @@ -0,0 +1,22 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.State; + +/** + * A sample validator interface for {@link java.util.Map.Entry}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface LongToStateMapEntryValidator { + boolean validate(); + + boolean validateTypedKey(Long value); + + boolean validateTypedValue(State value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ModelsValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ModelsValidator.java new file mode 100644 index 00000000..5d551c87 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ModelsValidator.java @@ -0,0 +1,31 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.ecore.EObject; +import org.enterprisedomain.classmaker.Item; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Models}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ModelsValidator { + boolean validate(); + + boolean validateDynamic(EObject value); + + boolean validateGenerated(EObject value); + + boolean validateGeneratedEdit(EMFPlugin value); + + boolean validateGeneratedEditor(EMFPlugin value); + + boolean validateParent(Item value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotificationValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotificationValidator.java new file mode 100644 index 00000000..5d02385e --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotificationValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.emf.common.notify.Notification}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface NotificationValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotifierValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotifierValidator.java new file mode 100644 index 00000000..b134db22 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/NotifierValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.emf.common.notify.Notifier}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface NotifierValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ProjectValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ProjectValidator.java new file mode 100644 index 00000000..5b259912 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ProjectValidator.java @@ -0,0 +1,61 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.enterprisedomain.classmaker.CompletionNotificationAdapter; +import org.enterprisedomain.classmaker.ResourceAdapter; +import org.enterprisedomain.classmaker.ResourceChangeListener; +import org.enterprisedomain.classmaker.Revision; +import org.enterprisedomain.classmaker.SelectRevealHandler; +import org.enterprisedomain.classmaker.State; +import org.enterprisedomain.classmaker.Workspace; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Project}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ProjectValidator { + boolean validate(); + + boolean validateName(String value); + + boolean validateProjectName(String value); + + boolean validateChildren(EList value); + + boolean validateDirty(boolean value); + + boolean validateWorkspace(Workspace value); + + boolean validateResourcePath(String value); + + boolean validateNeedCompletionNotification(boolean value); + + boolean validateCompletionNotificationAdapter(CompletionNotificationAdapter value); + + boolean validateResourceReloadListener(ResourceChangeListener value); + + boolean validateSavingResource(boolean value); + + boolean validateRevision(Revision value); + + boolean validateRevisions(EMap value); + + boolean validateProjectVersion(Version value); + + boolean validateSelectRevealHandler(SelectRevealHandler value); + + boolean validateVersion(Version value); + + boolean validateState(State value); + + boolean validateModelResourceAdapter(ResourceAdapter value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceAdapterValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceAdapterValidator.java new file mode 100644 index 00000000..3d1cf5c0 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceAdapterValidator.java @@ -0,0 +1,26 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.ecore.resource.Resource; +import org.enterprisedomain.classmaker.Project; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.ResourceAdapter}. This doesn't really + * do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ResourceAdapterValidator { + boolean validate(); + + boolean validateResource(Resource value); + + boolean validateFilename(String value); + + boolean validateProject(Project value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceChangeListenerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceChangeListenerValidator.java new file mode 100644 index 00000000..c6bcaabb --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceChangeListenerValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.ResourceChangeListener}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ResourceChangeListenerValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceValidator.java new file mode 100644 index 00000000..c776e445 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/ResourceValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.eclipse.emf.ecore.resource.Resource}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ResourceValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/RevisionValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/RevisionValidator.java new file mode 100644 index 00000000..837fa97e --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/RevisionValidator.java @@ -0,0 +1,30 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EMap; +import org.enterprisedomain.classmaker.State; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Revision}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface RevisionValidator { + boolean validate(); + + boolean validateState(State value); + + boolean validateTimestamp(long value); + + boolean validateStateHistory(EMap value); + + boolean validateLatestTimestamp(long value); + + boolean validateVersion(Version value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMOperatorValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMOperatorValidator.java new file mode 100644 index 00000000..1fa64d62 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMOperatorValidator.java @@ -0,0 +1,23 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.SCMRegistry; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.SCMOperator}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface SCMOperatorValidator { + boolean validate(); + + boolean validateProjectName(String value); + + boolean validateRegistry(SCMRegistry value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMRegistryValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMRegistryValidator.java new file mode 100644 index 00000000..4cb9e4ed --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SCMRegistryValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.SCMRegistry}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface SCMRegistryValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SelectRevealHandlerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SelectRevealHandlerValidator.java new file mode 100644 index 00000000..1b0c048c --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/SelectRevealHandlerValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.SelectRevealHandler}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface SelectRevealHandlerValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierToCustomizerMapEntryValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierToCustomizerMapEntryValidator.java new file mode 100644 index 00000000..5d0776ab --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierToCustomizerMapEntryValidator.java @@ -0,0 +1,23 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.StageQualifier; + +/** + * A sample validator interface for {@link java.util.Map.Entry}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface StageQualifierToCustomizerMapEntryValidator { + boolean validate(); + + boolean validateTypedKey(StageQualifier value); + + boolean validateTypedValue(Customizer value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierValidator.java new file mode 100644 index 00000000..9eb18289 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StageQualifierValidator.java @@ -0,0 +1,23 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.Stage; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.StageQualifier}. This doesn't really + * do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface StageQualifierValidator { + boolean validate(); + + boolean validateStage(Stage value); + + boolean validateStep(String value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StateValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StateValidator.java new file mode 100644 index 00000000..05c2a5ee --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StateValidator.java @@ -0,0 +1,66 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.Revision; +import org.enterprisedomain.classmaker.StageQualifier; +import org.enterprisedomain.classmaker.Strategy; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.State}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface StateValidator { + boolean validate(); + + boolean validatePackageClassName(String value); + + boolean validateEditPluginClassName(String value); + + boolean validateEditorPluginClassName(String value); + + boolean validateRequiredPlugins(EList value); + + boolean validateRevision(Revision value); + + boolean validateTimestamp(long value); + + boolean validateDeployableUnitName(String value); + + boolean validateEditDeployableUnitName(String value); + + boolean validateEditorDeployableUnitName(String value); + + boolean validateJobFamily(String value); + + boolean validateResource(Resource value); + + boolean validateCommitId(String value); + + boolean validateStateCustomizers(EMap value); + + boolean validateNonExclusiveStateCustomizers(EMap value); + + boolean validateProjectName(String value); + + boolean validateMaking(boolean value); + + boolean validateEdit(boolean value); + + boolean validateEditor(boolean value); + + boolean validateStrategy(Strategy value); + + boolean validateExcludedEPackages(EList value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StrategyValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StrategyValidator.java new file mode 100644 index 00000000..a6013c3d --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/StrategyValidator.java @@ -0,0 +1,31 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; +import org.enterprisedomain.classmaker.State; +import org.enterprisedomain.classmaker.jobs.Worker; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Strategy}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface StrategyValidator { + boolean validate(); + + boolean validateGenerators(EList value); + + boolean validateExporters(EList value); + + boolean validateInstallers(EList value); + + boolean validateLoaders(EList value); + + boolean validateState(State value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/VersionToRevisionMapEntryValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/VersionToRevisionMapEntryValidator.java new file mode 100644 index 00000000..7fdf6876 --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/VersionToRevisionMapEntryValidator.java @@ -0,0 +1,22 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.enterprisedomain.classmaker.Revision; + +/** + * A sample validator interface for {@link java.util.Map.Entry}. This doesn't + * really do anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface VersionToRevisionMapEntryValidator { + boolean validate(); + + boolean validateTypedKey(Version value); + + boolean validateTypedValue(Revision value); +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkerValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkerValidator.java new file mode 100644 index 00000000..bbe0efff --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkerValidator.java @@ -0,0 +1,18 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.jobs.Worker}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface WorkerValidator { + boolean validate(); + +} diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkspaceValidator.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkspaceValidator.java new file mode 100644 index 00000000..724ec83c --- /dev/null +++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/validation/WorkspaceValidator.java @@ -0,0 +1,41 @@ +/** + * + * $Id$ + */ +package org.enterprisedomain.classmaker.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.enterprisedomain.classmaker.ClassMakerService; +import org.enterprisedomain.classmaker.Customizer; +import org.enterprisedomain.classmaker.Project; +import org.enterprisedomain.classmaker.SCMRegistry; +import org.enterprisedomain.classmaker.StageQualifier; + +/** + * A sample validator interface for + * {@link org.enterprisedomain.classmaker.Workspace}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the + * org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's + * code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface WorkspaceValidator { + boolean validate(); + + boolean validateProjects(EList value); + + boolean validateResourceSet(ResourceSet value); + + boolean validateCustomizers(EMap value); + + boolean validateNonExclusiveCustomizers(EMap value); + + boolean validateService(ClassMakerService value); + + boolean validateSCMRegistry(SCMRegistry value); + + boolean validateExcludedEPackages(EList value); +} diff --git a/bundles/org.enterprisedomain.ecp.edit/.gitignore b/bundles/org.enterprisedomain.ecp.edit/.gitignore deleted file mode 100644 index 0f630157..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target/ -/bin/ diff --git a/bundles/org.enterprisedomain.ecp.edit/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.ecp.edit/META-INF/MANIFEST.MF deleted file mode 100644 index 3b41b526..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.enterprisedomain.ecp.edit;singleton:=true -Automatic-Module-Name: org.enterprisedomain.ecp.edit -Bundle-Version: 0.8.55.qualifier -Bundle-ClassPath: . -Bundle-Activator: org.enterprisedomain.ecp.provider.ECPEditPlugin$Implementation -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: org.enterprisedomain.ecp.provider -Require-Bundle: org.eclipse.core.runtime, - org.enterprisedomain.ecp;visibility:=reexport, - org.eclipse.emf.edit;visibility:=reexport -Bundle-ActivationPolicy: lazy diff --git a/bundles/org.enterprisedomain.ecp.edit/build.properties b/bundles/org.enterprisedomain.ecp.edit/build.properties deleted file mode 100644 index 6e3e902e..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -# - -bin.includes = .,\ - icons/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src/ -output.. = bin/ diff --git a/bundles/org.enterprisedomain.ecp.edit/plugin.properties b/bundles/org.enterprisedomain.ecp.edit/plugin.properties deleted file mode 100644 index eaee8174..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/plugin.properties +++ /dev/null @@ -1,27 +0,0 @@ -# - -pluginName = enterpriseDomain ECP Provider Edit Support -providerName = Kyrill Zotkin - -_UI_CreateChild_text = {0} -_UI_CreateChild_text2 = {1} {0} -_UI_CreateChild_text3 = {1} -_UI_CreateChild_tooltip = Create New {0} Under {1} Feature -_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. -_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. - -_UI_PropertyDescriptor_description = The {0} of the {1} - -_UI_EOperationInvocation_type = EOperation Invocation -_UI_EParameterToObjectMapEntry_type = EParameter To Object Map Entry -_UI_Unknown_type = Object - -_UI_Unknown_datatype= Value - -_UI_EOperationInvocation_eOperation_feature = EOperation -_UI_EOperationInvocation_arguments_feature = Arguments -_UI_EOperationInvocation_result_feature = Result -_UI_EParameterToObjectMapEntry_key_feature = Key -_UI_EParameterToObjectMapEntry_value_feature = Value -_UI_Unknown_feature = Unspecified - diff --git a/bundles/org.enterprisedomain.ecp.edit/plugin.xml b/bundles/org.enterprisedomain.ecp.edit/plugin.xml deleted file mode 100644 index 9b4ed0a9..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/plugin.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPEditPlugin.java b/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPEditPlugin.java deleted file mode 100644 index 44d0a984..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPEditPlugin.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.provider; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; - -/** - * This is the central singleton for the ECP edit plugin. - * - * @generated - */ -public final class ECPEditPlugin extends EMFPlugin { - /** - * Keep track of the singleton. - * - * @generated - */ - public static final ECPEditPlugin INSTANCE = new ECPEditPlugin(); - - /** - * Keep track of the singleton. - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * @generated - */ - public ECPEditPlugin() { - super(new ResourceLocator[] {}); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPItemProviderAdapterFactory.java b/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPItemProviderAdapterFactory.java deleted file mode 100644 index 6fa93085..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/ECPItemProviderAdapterFactory.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.provider; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.edit.provider.ChangeNotifier; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.IChangeNotifier; -import org.eclipse.emf.edit.provider.IDisposable; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.INotifyChangedListener; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.enterprisedomain.ecp.util.ECPAdapterFactory; - -/** - * This is the factory that is used to provide the interfaces needed to support - * Viewers. The adapters generated by this factory convert EMF adapter - * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The - * adapters also support Eclipse property sheets. Note that most of the adapters - * are shared among multiple instances. - * - * @generated - */ -public class ECPItemProviderAdapterFactory extends ECPAdapterFactory - implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { - /** - * This keeps track of the root adapter factory that delegates to this adapter - * factory. - * - * @generated - */ - protected ComposedAdapterFactory parentAdapterFactory; - - /** - * This is used to implement - * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * - * @generated - */ - protected IChangeNotifier changeNotifier = new ChangeNotifier(); - - /** - * This keeps track of all the supported types checked by - * {@link #isFactoryForType isFactoryForType}. - * - * @generated - */ - protected Collection supportedTypes = new ArrayList(); - - /** - * This constructs an instance. - * - * @generated - */ - public ECPItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } - - /** - * This keeps track of the one adapter used for all - * {@link org.enterprisedomain.ecp.EOperationInvocation} instances. - * - * @generated - */ - protected EOperationInvocationItemProvider eOperationInvocationItemProvider; - - /** - * This creates an adapter for a - * {@link org.enterprisedomain.ecp.EOperationInvocation}. - * - * @generated - */ - @Override - public Adapter createEOperationInvocationAdapter() { - if (eOperationInvocationItemProvider == null) { - eOperationInvocationItemProvider = new EOperationInvocationItemProvider(this); - } - - return eOperationInvocationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link java.util.Map.Entry} - * instances. - * - * @generated - */ - protected EParameterToObjectMapEntryItemProvider eParameterToObjectMapEntryItemProvider; - - /** - * This creates an adapter for a {@link java.util.Map.Entry}. - * - * @generated - */ - @Override - public Adapter createEParameterToObjectMapEntryAdapter() { - if (eParameterToObjectMapEntryItemProvider == null) { - eParameterToObjectMapEntryItemProvider = new EParameterToObjectMapEntryItemProvider(this); - } - - return eParameterToObjectMapEntryItemProvider; - } - - /** - * This returns the root adapter factory that contains this factory. - * - * @generated - */ - public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } - - /** - * This sets the composed adapter factory that contains this factory. - * - * @generated - */ - public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } - - /** - * - * - * @generated - */ - @Override - public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } - - /** - * This implementation substitutes the factory itself as the key for the - * adapter. - * - * @generated - */ - @Override - public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } - - /** - * - * - * @generated - */ - @Override - public Object adapt(Object object, Object type) { - if (isFactoryForType(type)) { - Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) { - return adapter; - } - } - - return null; - } - - /** - * This adds a listener. - * - * @generated - */ - public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } - - /** - * This removes a listener. - * - * @generated - */ - public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } - - /** - * This delegates to {@link #changeNotifier} and to - * {@link #parentAdapterFactory}. - * - * @generated - */ - public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); - - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } - - /** - * This disposes all of the item providers created by this factory. - * - * @generated - */ - public void dispose() { - if (eOperationInvocationItemProvider != null) - eOperationInvocationItemProvider.dispose(); - if (eParameterToObjectMapEntryItemProvider != null) - eParameterToObjectMapEntryItemProvider.dispose(); - } - -} diff --git a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EParameterToObjectMapEntryItemProvider.java b/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EParameterToObjectMapEntryItemProvider.java deleted file mode 100644 index 678689a7..00000000 --- a/bundles/org.enterprisedomain.ecp.edit/src/org/enterprisedomain/ecp/provider/EParameterToObjectMapEntryItemProvider.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.provider; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; -import org.enterprisedomain.ecp.ECPPackage; - -/** - * This is the item provider adapter for a {@link java.util.Map.Entry} object. - * - * - * @generated - */ -public class EParameterToObjectMapEntryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, - IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * @generated - */ - public EParameterToObjectMapEntryItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addKeyPropertyDescriptor(object); - addValuePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Key feature. - * - * - * @generated - */ - protected void addKeyPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_EParameterToObjectMapEntry_key_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_EParameterToObjectMapEntry_key_feature", - "_UI_EParameterToObjectMapEntry_type"), - ECPPackage.Literals.EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY, true, false, true, null, null, null)); - } - - /** - * This adds a property descriptor for the Value feature. - * - * @generated - */ - protected void addValuePropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), - getResourceLocator(), getString("_UI_EParameterToObjectMapEntry_value_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_EParameterToObjectMapEntry_value_feature", - "_UI_EParameterToObjectMapEntry_type"), - ECPPackage.Literals.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** - * This returns EParameterToObjectMapEntry.gif. - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/EParameterToObjectMapEntry")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - Map.Entry eParameterToObjectMapEntry = (Map.Entry) object; - return "" + eParameterToObjectMapEntry.getKey() + " -> " + eParameterToObjectMapEntry.getValue(); - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update - * any cached children and by creating a viewer notification, which it passes to - * {@link #fireNotifyChanged}. - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(Map.Entry.class)) { - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing - * the children that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ECPEditPlugin.INSTANCE; - } - -} diff --git a/bundles/org.enterprisedomain.ecp.filter/.classpath b/bundles/org.enterprisedomain.ecp.filter/.classpath deleted file mode 100644 index bc57d238..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp.filter/.gitignore b/bundles/org.enterprisedomain.ecp.filter/.gitignore deleted file mode 100644 index 09e3bc9b..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/target/ diff --git a/bundles/org.enterprisedomain.ecp.filter/.project b/bundles/org.enterprisedomain.ecp.filter/.project deleted file mode 100644 index f48153e6..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.enterprisedomain.ecp.filter - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.jdt.core.javanature - - diff --git a/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.m2e.core.prefs b/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/bundles/org.enterprisedomain.ecp.filter/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.ecp.filter/META-INF/MANIFEST.MF deleted file mode 100755 index bd9f734b..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: enterpriseDomain ECP EPackage Filter -Bundle-SymbolicName: org.enterprisedomain.ecp.filter;singleton:=true -Bundle-Version: 0.8.55.qualifier -Bundle-Activator: org.enterprisedomain.ecp.filter.Activator -Bundle-Vendor: Kyrill Zotkin -Require-Bundle: org.eclipse.ui;bundle-version="[3.109.100,4.0.0)", - org.eclipse.core.runtime, - org.eclipse.emf.ecp.core;bundle-version="[1.26.0,2.0.0)", - org.enterprisedomain.classmaker;bundle-version="[0.8.0,0.9.0)", - org.enterprisedomain.classmaker.edit;bundle-version="0.8.0" -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Automatic-Module-Name: org.enterprisedomain.ecp.filter -Import-Package: org.eclipse.emf.ecp.core.util diff --git a/bundles/org.enterprisedomain.ecp.filter/plugin.xml b/bundles/org.enterprisedomain.ecp.filter/plugin.xml deleted file mode 100755 index 51c79cff..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/plugin.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp.filter/pom.xml b/bundles/org.enterprisedomain.ecp.filter/pom.xml deleted file mode 100644 index 93525a54..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - org.enterprisedomain - org.enterprisedomain.root - 0.8.55-SNAPSHOT - ../../ - - - org.enterprisedomain.ecp.filter - - eclipse-plugin - \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/Activator.java b/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/Activator.java deleted file mode 100755 index a5b70ed0..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/Activator.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2012-2018 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.ecp.filter; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.enterprisedomain.ecp.filter"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. - * BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/EnterpriseDomainFilter.java b/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/EnterpriseDomainFilter.java deleted file mode 100755 index 7d7bbfb3..00000000 --- a/bundles/org.enterprisedomain.ecp.filter/src/org/enterprisedomain/ecp/filter/EnterpriseDomainFilter.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2012-2018 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.ecp.filter; - -import java.util.HashSet; -import java.util.Set; - -import org.eclipse.emf.ecp.core.util.ECPFilterProvider; -import org.enterprisedomain.classmaker.ClassMakerPackage; - -public class EnterpriseDomainFilter implements ECPFilterProvider { - - public EnterpriseDomainFilter() { - } - - @Override - public Set getHiddenPackages() { - final Set packages = new HashSet(); - packages.add(ClassMakerPackage.eNS_URI); - return packages; - } - -} diff --git a/bundles/org.enterprisedomain.ecp.ui/.classpath b/bundles/org.enterprisedomain.ecp.ui/.classpath deleted file mode 100644 index 685a6999..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp.ui/.gitignore b/bundles/org.enterprisedomain.ecp.ui/.gitignore deleted file mode 100644 index ddc25c7f..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -/.settings/ -/target/ diff --git a/bundles/org.enterprisedomain.ecp.ui/.project b/bundles/org.enterprisedomain.ecp.ui/.project deleted file mode 100644 index 224b67dc..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.enterprisedomain.ecp.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.jdt.core.javanature - - diff --git a/bundles/org.enterprisedomain.ecp.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.ecp.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7adc0fb9..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,10 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/bundles/org.enterprisedomain.ecp.ui/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.ecp.ui/META-INF/MANIFEST.MF deleted file mode 100755 index 49f5e4b0..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,24 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: enterpriseDomain ECP UI -Bundle-SymbolicName: org.enterprisedomain.ecp.ui;singleton:=true -Bundle-Version: 0.8.55.qualifier -Bundle-Vendor: Kyrill Zotkin -Require-Bundle: org.enterprisedomain.ecp;bundle-version="[0.8.0,0.9.0)";visibility:=reexport, - org.eclipse.core.runtime;bundle-version="[3.15.200,4.0.0)", - org.eclipse.swt;bundle-version="3.110.0", - org.enterprisedomain.classmaker.edit;bundle-version="0.8.55", - org.eclipse.emf.edit.ui, - org.eclipse.emf.common.ui, - org.eclipse.ui.navigator;bundle-version="[3.7.0,4.0.0)", - org.eclipse.emf.ecp.common.ui;bundle-version="[1.26.0,2.0.0)", - org.eclipse.emf.ecp.ui.e3;bundle-version="[1.26.0,2.0.0)", - org.eclipse.ui.workbench, - org.eclipse.emf.ecp.core;bundle-version="[1.26.0,2.0.0)", - org.eclipse.emf.ecp.ui;bundle-version="[1.26.0,2.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: org.enterprisedomain.ecp.ui, - org.enterprisedomain.ecp.ui.actions -Bundle-ActivationPolicy: lazy -Bundle-Activator: org.enterprisedomain.ecp.ui.Activator -Automatic-Module-Name: org.enterprisedomain.ecp.ui diff --git a/bundles/org.enterprisedomain.ecp.ui/build.properties b/bundles/org.enterprisedomain.ecp.ui/build.properties deleted file mode 100755 index 0f3974a4..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - viewmodel/ diff --git a/bundles/org.enterprisedomain.ecp.ui/plugin.xml b/bundles/org.enterprisedomain.ecp.ui/plugin.xml deleted file mode 100755 index c14da83e..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/plugin.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp.ui/pom.xml b/bundles/org.enterprisedomain.ecp.ui/pom.xml deleted file mode 100644 index a6171db7..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - org.enterprisedomain - org.enterprisedomain.root - 0.8.55-SNAPSHOT - ../../ - - - org.enterprisedomain.ecp.ui - - eclipse-plugin - \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/Activator.java b/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/Activator.java deleted file mode 100644 index 5ee68ddf..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/Activator.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.enterprisedomain.ecp.ui; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; -import org.enterprisedomain.classmaker.ClassMakerService; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.enterprisedomain.classmaker.impl.ClassMakerServiceImpl; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.util.tracker.ServiceTracker; - -public class Activator extends Plugin implements BundleActivator { - private static Activator instance; - private static ServiceTracker classMaker; - - public static ClassMakerService getClassMaker() { - if (classMaker != null) - return classMaker.getService(); - return null; - } - - @Override - public void start(BundleContext context) throws Exception { - instance = this; - classMaker = new ServiceTracker(context, ClassMakerService.class, - null); - classMaker.open(); - } - - @Override - public void stop(BundleContext context) throws Exception { - classMaker.close(); - classMaker = null; - instance = null; - } - - public static void log(CoreException e) { - instance.getLog().log(e.getStatus()); - } - - public static void log(Throwable e) { - instance.getLog().log(ClassMakerPlugin.createErrorStatus(e)); - } - -} \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/EnterpriseDomainUIProvider.java b/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/EnterpriseDomainUIProvider.java deleted file mode 100755 index 8e8d15c0..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/EnterpriseDomainUIProvider.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Copyright 2012-2021 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.ecp.ui; - -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.util.Collection; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage.Registry; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecp.core.ECPProject; -import org.eclipse.emf.ecp.core.ECPRepository; -import org.eclipse.emf.ecp.core.util.ECPContainer; -import org.eclipse.emf.ecp.core.util.ECPProperties; -import org.eclipse.emf.ecp.core.util.ECPUtil; -import org.eclipse.emf.ecp.core.util.observer.ECPProjectContentChangedObserver; -import org.eclipse.emf.ecp.spi.core.InternalProject; -import org.eclipse.emf.ecp.spi.core.InternalProvider; -import org.eclipse.emf.ecp.spi.ui.CompositeStateObserver; -import org.eclipse.emf.ecp.spi.ui.DefaultUIProvider; -import org.eclipse.emf.ecp.ui.tester.ECPSavePropertySource; -import org.eclipse.emf.ecp.ui.tester.SaveButtonEnablementObserver; -import org.eclipse.emf.ecp.ui.views.ModelExplorerView; -import org.eclipse.emf.ecp.ui.views.ModelRepositoriesView; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.jface.viewers.DecoratingLabelProvider; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.jface.viewers.LabelProviderChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.internal.progress.ProgressManager; -import org.enterprisedomain.classmaker.ClassMakerService; -import org.enterprisedomain.classmaker.Contribution; -import org.enterprisedomain.classmaker.Project; -import org.enterprisedomain.classmaker.SelectRevealHandler; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.enterprisedomain.classmaker.core.IRunWrapper; -import org.enterprisedomain.classmaker.core.IRunnerWithProgress; -import org.enterprisedomain.classmaker.provider.ClassMakerItemProviderAdapterFactory; -import org.enterprisedomain.classmaker.util.ClassMakerAdapterFactory; -import org.enterprisedomain.ecp.EnterpriseDomainProvider; -import org.enterprisedomain.ecp.IResourceHandler; -import org.enterprisedomain.ecp.ui.actions.ExecuteOperationAction; - -@SuppressWarnings("restriction") -public class EnterpriseDomainUIProvider extends DefaultUIProvider implements IResourceHandler { - - public static final ComposeableAdapterFactory ENTERPRISE_DOMAIN_ITEM_PROVIDER_ADAPTER_FACTORY = new ComposedAdapterFactory( - new AdapterFactory[] { new ClassMakerItemProviderAdapterFactory(), new ClassMakerAdapterFactory(), - InternalProvider.EMF_ADAPTER_FACTORY }); - - private static final ILabelProvider ENTERPRISE_DOMAIN_LABEL_PROVIDER = new DecoratingLabelProvider( - new AdapterFactoryLabelProvider(ENTERPRISE_DOMAIN_ITEM_PROVIDER_ADAPTER_FACTORY), new StageDecorator()); - - public static final String PROP_DISABLE_CONTRIBUTION = "disableContribution"; - - public class LabelProviderListener implements ILabelProviderListener { - - @Override - public void labelProviderChanged(LabelProviderChangedEvent event) { - IViewPart reposView = null; - try { - IWorkbench workbench = (IWorkbench) PlatformUI.getWorkbench(); - if (workbench != null) { - IWorkbenchWindow workbenchWindow = workbench.getWorkbenchWindows()[0]; - - if (workbenchWindow != null) { - IWorkbenchPage page = workbenchWindow.getActivePage(); - reposView = page.findView("org.eclipse.emf.ecp.ui.ModelRepositoriesView"); - } - } - if (reposView instanceof ModelRepositoriesView) { - final ModelRepositoriesView modelRepos = (ModelRepositoriesView) reposView; - Object element = event.getElement(); - if (element instanceof EObject) - ClassMakerPlugin.runWithProgress(new IRunnableWithProgress() { - - @Override - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - modelRepos.getViewer().refresh((EObject) element, true); - } - }); - } - } catch (Exception e) { - Activator.log(e); - } - } - - } - - private Button isContributionButton; - private boolean isContribution; - - private SelectRevealHandler selectRevealHandler = new SelectResourceHandler(); - - private Composite control; - - private final IResourceChangeListener resourceChangeListener = new EnterpriseDomainUIResourceListener(); - - public EnterpriseDomainUIProvider() { - super(EnterpriseDomainProvider.NAME); - ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); - ECPUtil.getECPObserverBus().register(new ECPProjectContentChangedObserver() { - - @Override - public Collection objectsChanged(ECPProject project, Collection objectsChanged) { - IViewPart modelExplorerView = null; - try { - IWorkbench workbench = (IWorkbench) PlatformUI.getWorkbench(); - if (workbench != null) { - IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); - - if (workbenchWindow != null) { - IWorkbenchPage page = workbenchWindow.getActivePage(); - modelExplorerView = page.showView("org.eclipse.emf.ecp.ui.ModelExplorerView"); - } - } - if (modelExplorerView instanceof ModelExplorerView) { - final ModelExplorerView modelExplorer = (ModelExplorerView) modelExplorerView; - Object object = objectsChanged.iterator().next(); - if (object instanceof EObject && modelExplorer.getViewer() != null) - modelExplorer.getViewer().refresh(((EObject) object).eContainer(), true); - } - } catch (Exception e) { - Activator.log(e); - } - return objectsChanged; - } - - }); - - ENTERPRISE_DOMAIN_LABEL_PROVIDER.addListener(new LabelProviderListener()); - } - - @SuppressWarnings("unchecked") - @Override - public T getAdapter(Object adaptable, Class adapterType) { - if (SelectRevealHandler.class.isAssignableFrom(adapterType)) - return (T) selectRevealHandler; - if (IProgressMonitor.class.isAssignableFrom(adapterType)) - return (T) ClassMakerPlugin.getProgressMonitor(); - if (ComposeableAdapterFactory.class.isAssignableFrom(adapterType)) - return (T) ENTERPRISE_DOMAIN_ITEM_PROVIDER_ADAPTER_FACTORY; - if (IResourceHandler.class.isAssignableFrom(adapterType)) - return (T) this; - if (DefaultUIProvider.class.isAssignableFrom(adapterType)) - return (T) this; - return (T) getProvider().getAdapter(adaptable, adapterType); - } - - @Override - public Control createNewProjectUI(Composite parent, final CompositeStateObserver observer, - final ECPProperties projectProperties) { - control = new Composite(parent, SWT.NONE); - control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - control.setLayout(new GridLayout(1, false)); - - isContributionButton = new Button(control, SWT.CHECK); - isContributionButton.setText("Software Contribution"); - isContributionButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false)); - isContribution = Boolean.valueOf(projectProperties.getValue(EnterpriseDomainProvider.PROP_CONTRIBUTION)); - isContributionButton.setSelection(isContribution); - isContributionButton.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent e) { - isContribution = !isContribution; - projectProperties.addProperty(EnterpriseDomainProvider.PROP_CONTRIBUTION, - String.valueOf(isContribution)); - super.widgetSelected(e); - observer.compositeChangedState(control, true, projectProperties); - } - - }); - if (Boolean.getBoolean(PROP_DISABLE_CONTRIBUTION)) - isContributionButton.setEnabled(false); - - ClassMakerPlugin.setPreviousProgressProvider(ProgressManager.getInstance()); - observer.compositeChangedState(control, true, projectProperties); - return control; - } - - public void handleResourceChange(final ECPProject project, final Collection changedResources, - final Collection removedResources) { - if (!getProvider().isDirty((InternalProject) project)) { - final Display display = Display.getCurrent() != null ? Display.getCurrent() : Display.getDefault(); - display.asyncExec(new Runnable() { - @Override - public void run() { - ResourceSet resourceSet = Activator.getClassMaker().getWorkspace().getResourceSet(); - if (resourceSet == null || display.isDisposed()) { - return; - } - resourceSet.getResources().removeAll(removedResources); - for (final Resource changed : changedResources) { - changed.unload(); - try { - changed.load(null); - } catch (final IOException ex) { - } - } - - IViewPart modelExplorerView = null; - try { - modelExplorerView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() - .showView("org.eclipse.emf.ecp.ui.ModelExplorerView"); - if (modelExplorerView instanceof ModelExplorerView) { - final ModelExplorerView modelExplorer = (ModelExplorerView) modelExplorerView; - selectRevealHandler.prepare(); - modelExplorer.getViewer().refresh(project); - selectRevealHandler.selectReveal(changedResources.iterator().next()); - } - } catch (Exception e) { - Activator.log(e); - } - project.getEditingDomain().getCommandStack().flush(); - } - }); - } - } - - @Override - public void fillContextMenu(IMenuManager manager, ECPContainer context, Object[] elements) { - super.fillContextMenu(manager, context, elements); - if (context instanceof ECPProject) { - ECPProject project = (ECPProject) context; -// if (elements.length == 1) { -// final Object element = elements[0]; -//// if (ClassMakerPlugin.getClassMaker() == null) -//// return; -// if (ClassMakerPlugin.getClassMaker().getWorkspace() -// .getProject(project.getName()) instanceof Contribution) { -// manager.add(new Separator()); -// manager.add(new MakeAction(project.getEditingDomain(), new StructuredSelection(element), project)); -// } -// } - for (Object element : elements) { - if (element instanceof EObject) { - String eA = EcoreUtil.getAnnotation(((EObject) element).eClass().getEPackage(), - EcorePackage.eNS_URI, "invocationDelegates"); - if (eA != null && eA.equals(ClassMakerService.INVOCATION_DELEGATE_URI)) { - for (EOperation eOperation : ((EObject) element).eClass().getEOperations()) - if (eOperation.getEAnnotation(ClassMakerService.INVOCATION_DELEGATE_URI) != null - && EcoreUtil.getAnnotation(eOperation, "http://www.eclipse.org/emf/2002/GenModel", - "body") != null) { - manager.add(new ExecuteOperationAction(project.getEditingDomain(), - new StructuredSelection( - new Object[] { element, eOperation/* , control.getShell() */ }), - project)); - } - } - } - } - } - } - - public void setProgressMonitor(IProgressMonitor progressMonitor) { - ClassMakerPlugin.setProgressMonitor(progressMonitor); - } - - @Override - public Image getImage(Object element) { - if (element instanceof ECPProject || element instanceof ECPRepository) - return super.getImage(element); - return ENTERPRISE_DOMAIN_LABEL_PROVIDER.getImage(element); - } - - @Override - public String getText(Object element) { - if (element instanceof ECPProject) { - Project domainProject = Activator.getClassMaker().getWorkspace() - .getProject(((ECPProject) element).getName().toLowerCase()); - if (domainProject != null) - return super.getText(element) + " [" + domainProject.getPhase().getName().toLowerCase() + "]"; - } - return ENTERPRISE_DOMAIN_LABEL_PROVIDER.getText(element); - } - - public class EnterpriseDomainUIResourceListener implements IResourceChangeListener { - - @Override - public void resourceChanged(IResourceChangeEvent event) { - if (event.getResource() != null && event.getResource().getType() == IResource.PROJECT - && event.getDelta() != null && event.getDelta().getKind() == IResourceDelta.CHANGED) { - ECPProject project = ECPSavePropertySource.getProjectToSave(); - if (project != null) { - ECPUtil.getECPObserverBus().notify(SaveButtonEnablementObserver.class) - .notifyChangeButtonState(project, project.hasDirtyContents()); - } - } - - } - - } - -} diff --git a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/SelectResourceHandler.java b/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/SelectResourceHandler.java deleted file mode 100644 index f5ed18b4..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/SelectResourceHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.enterprisedomain.ecp.ui; - -import org.eclipse.emf.common.ui.viewer.IViewerProvider; -import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ITreeSelection; -import org.eclipse.jface.viewers.TreePath; -import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; -import org.enterprisedomain.classmaker.impl.SelectRevealHandlerImpl; - -public class SelectResourceHandler extends SelectRevealHandlerImpl { - - private ISelection selection; - private TreePath[] paths; - private TreePath[] expandedPaths; - private Object part; - - @Override - public void prepare() { - String partId = "org.eclipse.emf.ecp.ui.ModelExplorerView"; - IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - ISelection selection = page.getSelection(partId); - if (selection.isEmpty()) { - this.selection = null; - return; - } - part = page.findView(partId); - if (part instanceof IViewerProvider) { - Viewer viewer = ((IViewerProvider) part).getViewer(); - expandedPaths = ((TreeViewer) viewer).getExpandedTreePaths(); - if (selection instanceof ITreeSelection) { - this.paths = ((ITreeSelection) selection).getPathsFor(((ITreeSelection) selection).getFirstElement()); - } - } - } - - @Override - public void selectReveal(Resource newResource) { - if (selection == null) - return; - TreeIterator newIterator = EcoreUtil.getAllProperContents(newResource, true); - while (newIterator.hasNext()) { - Object newObject = newIterator.next(); - if (selection instanceof ITreeSelection) { - TreePath[] paths = ((ITreeSelection) selection).getPathsFor(newObject); - for (TreePath path : this.paths) - for (TreePath objectPath : paths) - if (path.equals(objectPath)) { - selectReveal(path); - break; - } - } - } - } - - private void selectReveal(TreePath path) { - if (part instanceof IViewerProvider) { - Viewer viewer = ((IViewerProvider) part).getViewer(); - if (viewer != null) { - ((TreeViewer) viewer).setExpandedTreePaths(expandedPaths); - viewer.setSelection(new TreeSelection(path), true); - } - } - } - -} diff --git a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/StageDecorator.java b/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/StageDecorator.java deleted file mode 100644 index 4c1ae4ae..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/StageDecorator.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.enterprisedomain.ecp.ui; - -import org.eclipse.core.runtime.ListenerList; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.util.EContentAdapter; -import org.eclipse.jface.viewers.ILabelDecorator; -import org.eclipse.jface.viewers.ILabelProviderListener; -import org.eclipse.jface.viewers.LabelProviderChangedEvent; -import org.eclipse.jgit.api.CheckoutCommand.Stage; -import org.eclipse.swt.graphics.Image; -import org.enterprisedomain.classmaker.ClassMakerPackage; -import org.enterprisedomain.classmaker.Item; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; - -public class StageDecorator implements ILabelDecorator { - - private ListenerList listeners = new ListenerList(); - - public StageDecorator() { - ClassMakerPlugin.getClassMaker().getWorkspace().eAdapters().add(new EContentAdapter() { - - @Override - public void notifyChanged(Notification notification) { - super.notifyChanged(notification); - if (notification.getFeatureID(Item.class) == ClassMakerPackage.ITEM__PHASE) - fireLabelProviderChanged( - new LabelProviderChangedEvent(StageDecorator.this, notification.getNotifier())); - } - - }); - } - - @Override - public void dispose() { - - } - - @Override - public boolean isLabelProperty(Object element, String property) { - return false; - } - - @Override - public synchronized void addListener(ILabelProviderListener listener) { - listeners.add(listener); - } - - @Override - public synchronized void removeListener(ILabelProviderListener listener) { - listeners.remove(listener); - } - - protected void fireLabelProviderChanged(LabelProviderChangedEvent event) { - for (ILabelProviderListener l : listeners) - l.labelProviderChanged(event); - } - - @Override - public Image decorateImage(Image image, Object element) { - return null; - } - - @Override - public String decorateText(String text, Object element) { - if (element instanceof Item) { - Item item = ((Item) element); - return text + " [" + item.getPhase().getName().toLowerCase() + "]"; - } - return text; - } - -} diff --git a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/actions/ExecuteOperationAction.java b/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/actions/ExecuteOperationAction.java deleted file mode 100644 index fc624b1e..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/src/org/enterprisedomain/ecp/ui/actions/ExecuteOperationAction.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.enterprisedomain.ecp.ui.actions; - -import java.util.Collection; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.command.UnexecutableCommand; -import org.eclipse.emf.ecp.core.ECPProject; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.ui.action.StaticSelectionCommandAction; -import org.eclipse.jface.viewers.ISelection; -import org.enterprisedomain.classmaker.edit.command.ExecuteOperationCommand; - -public class ExecuteOperationAction extends StaticSelectionCommandAction { - private Object project; - - public ExecuteOperationAction(EditingDomain editingDomain, ISelection selection, Object project) { - super(editingDomain); - this.project = project; - configureAction(selection); - } - - @Override - protected Command createActionCommand(EditingDomain editingDomain, Collection collection) { - if (collection.size() == 2) { - return ExecuteOperationCommand.create(editingDomain, null, ((ECPProject) project).getName(), collection); - } - return UnexecutableCommand.INSTANCE; - } - -} diff --git a/bundles/org.enterprisedomain.ecp.ui/viewmodel/EOperationInvocation.view b/bundles/org.enterprisedomain.ecp.ui/viewmodel/EOperationInvocation.view deleted file mode 100644 index e084e928..00000000 --- a/bundles/org.enterprisedomain.ecp.ui/viewmodel/EOperationInvocation.view +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - /bundles/org.enterprisedomain.ecp/model/ECP.ecore - \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp/.classpath b/bundles/org.enterprisedomain.ecp/.classpath deleted file mode 100644 index bc57d238..00000000 --- a/bundles/org.enterprisedomain.ecp/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp/.gitignore b/bundles/org.enterprisedomain.ecp/.gitignore deleted file mode 100644 index 09e3bc9b..00000000 --- a/bundles/org.enterprisedomain.ecp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/target/ diff --git a/bundles/org.enterprisedomain.ecp/.project b/bundles/org.enterprisedomain.ecp/.project deleted file mode 100644 index 8e9c4afc..00000000 --- a/bundles/org.enterprisedomain.ecp/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - org.enterprisedomain.ecp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.jdt.core.javanature - - diff --git a/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7adc0fb9..00000000 --- a/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,10 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.m2e.core.prefs b/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/bundles/org.enterprisedomain.ecp/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.ecp/META-INF/MANIFEST.MF deleted file mode 100755 index 6aff7fb4..00000000 --- a/bundles/org.enterprisedomain.ecp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.enterprisedomain.ecp;singleton:=true -Bundle-Version: 0.8.55.qualifier -Bundle-ClassPath: . -Bundle-Activator: org.enterprisedomain.ecp.Activator -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecp.core;bundle-version="1.25.0", - org.enterprisedomain.classmaker;visibility:=reexport, - org.eclipse.emf.ecp.view.model;bundle-version="1.25.0", - org.eclipse.emf.edit.ui;bundle-version="[2.14.0,3.0.0)", - org.eclipse.jface, - org.eclipse.core.expressions;bundle-version="[3.6.600,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Bundle-ActivationPolicy: lazy -Export-Package: org.enterprisedomain.ecp, - org.enterprisedomain.ecp.impl, - org.enterprisedomain.ecp.util -Automatic-Module-Name: org.enterprisedomain.ecp diff --git a/bundles/org.enterprisedomain.ecp/build.properties b/bundles/org.enterprisedomain.ecp/build.properties deleted file mode 100755 index 89f04b16..00000000 --- a/bundles/org.enterprisedomain.ecp/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - plugin.properties -source.. = src/ diff --git a/bundles/org.enterprisedomain.ecp/model/ECP.ecore b/bundles/org.enterprisedomain.ecp/model/ECP.ecore deleted file mode 100644 index be3e1cea..00000000 --- a/bundles/org.enterprisedomain.ecp/model/ECP.ecore +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp/model/ECP.genmodel b/bundles/org.enterprisedomain.ecp/model/ECP.genmodel deleted file mode 100644 index 1ac4a4eb..00000000 --- a/bundles/org.enterprisedomain.ecp/model/ECP.genmodel +++ /dev/null @@ -1,21 +0,0 @@ - - - ECP.ecore - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp/plugin.properties b/bundles/org.enterprisedomain.ecp/plugin.properties deleted file mode 100644 index f0d13f60..00000000 --- a/bundles/org.enterprisedomain.ecp/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -# - -pluginName = enterpriseDomain ECP Provider -providerName = Kyrill Zotkin diff --git a/bundles/org.enterprisedomain.ecp/plugin.xml b/bundles/org.enterprisedomain.ecp/plugin.xml deleted file mode 100755 index 21e6236a..00000000 --- a/bundles/org.enterprisedomain.ecp/plugin.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.ecp/pom.xml b/bundles/org.enterprisedomain.ecp/pom.xml deleted file mode 100644 index f19ffa0a..00000000 --- a/bundles/org.enterprisedomain.ecp/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 4.0.0 - - org.enterprisedomain - org.enterprisedomain.root - 0.8.55-SNAPSHOT - ../../ - - org.enterprisedomain.ecp - eclipse-plugin - \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/Activator.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/Activator.java deleted file mode 100755 index 5d3f4293..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/Activator.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright 2012-2018 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.ecp; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; -import org.enterprisedomain.classmaker.ClassMakerService; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.enterprisedomain.classmaker.impl.ClassMakerServiceImpl; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.util.tracker.ServiceTracker; - -public class Activator extends Plugin implements BundleActivator { - - private static Activator instance; - - public static final String PLUGIN_ID = "org.enterprisedomain.ecp"; - - private static ServiceTracker classMaker; - - public static ClassMakerService getClassMaker() { - if (classMaker != null) - return classMaker.getService(); - return null; - } - - @Override - public void start(BundleContext context) throws Exception { - instance = this; - classMaker = new ServiceTracker(context, ClassMakerService.class, - null); - classMaker.open(); - } - - @Override - public void stop(BundleContext context) throws Exception { - classMaker.close(); - classMaker = null; - instance = null; - } - - public static void log(CoreException e) { - instance.getLog().log(e.getStatus()); - } - - public static void log(Throwable e) { - instance.getLog().log(ClassMakerPlugin.createErrorStatus(e)); - } - -} diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPFactory.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPFactory.java deleted file mode 100644 index abf34d47..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp; - -import org.eclipse.emf.ecore.EFactory; - -/** - * The Factory for the model. It provides a - * create method for each non-abstract class of the model. - * - * @see org.enterprisedomain.ecp.ECPPackage - * @generated - */ -public interface ECPFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * @generated - */ - ECPFactory eINSTANCE = org.enterprisedomain.ecp.impl.ECPFactoryImpl.init(); - - /** - * Returns a new object of class 'EOperation Invocation'. - * - * @return a new object of class 'EOperation Invocation'. - * @generated - */ - EOperationInvocation createEOperationInvocation(); - - /** - * Returns the package supported by this factory. - * - * @return the package supported by this factory. - * @generated - */ - ECPPackage getECPPackage(); - -} // ECPFactory diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPackage.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPackage.java deleted file mode 100644 index 7639881b..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPackage.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * The Package for the model. It contains - * accessors for the meta objects to represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each operation of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * - * @see org.enterprisedomain.ecp.ECPFactory - * @model kind="package" - * @generated - */ -public interface ECPPackage extends EPackage { - /** - * The package name. - * - * @generated - */ - String eNAME = "ecp"; - - /** - * The package namespace URI. - * - * @generated - */ - String eNS_URI = "http://org/enterprisedomain/ClassMaker/ECP/0.8.46"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "ECP"; - - /** - * The singleton instance of the package. - * - * @generated - */ - ECPPackage eINSTANCE = org.enterprisedomain.ecp.impl.ECPPackageImpl.init(); - - /** - * The meta object id for the - * '{@link org.enterprisedomain.ecp.impl.EOperationInvocationImpl EOperation - * Invocation}' class. - * - * @see org.enterprisedomain.ecp.impl.EOperationInvocationImpl - * @see org.enterprisedomain.ecp.impl.ECPPackageImpl#getEOperationInvocation() - * @generated - */ - int EOPERATION_INVOCATION = 0; - - /** - * The feature id for the 'EOperation' reference. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION__EOPERATION = 0; - - /** - * The feature id for the 'Arguments' map. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION__ARGUMENTS = 1; - - /** - * The feature id for the 'Result' attribute. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION__RESULT = 2; - - /** - * The number of structural features of the 'EOperation Invocation' - * class. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION_FEATURE_COUNT = 3; - - /** - * The operation id for the 'Execute' operation. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION___EXECUTE = 0; - - /** - * The number of operations of the 'EOperation Invocation' class. - * - * @generated - * @ordered - */ - int EOPERATION_INVOCATION_OPERATION_COUNT = 1; - - /** - * The meta object id for the - * '{@link org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl - * EParameter To Object Map Entry}' class. - * - * @see org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl - * @see org.enterprisedomain.ecp.impl.ECPPackageImpl#getEParameterToObjectMapEntry() - * @generated - */ - int EPARAMETER_TO_OBJECT_MAP_ENTRY = 1; - - /** - * The feature id for the 'Key' reference. - * - * @generated - * @ordered - */ - int EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY = 0; - - /** - * The feature id for the 'Value' attribute. - * - * @generated - * @ordered - */ - int EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE = 1; - - /** - * The number of structural features of the 'EParameter To Object Map - * Entry' class. - * - * @generated - * @ordered - */ - int EPARAMETER_TO_OBJECT_MAP_ENTRY_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'EParameter To Object Map Entry' - * class. - * - * @generated - * @ordered - */ - int EPARAMETER_TO_OBJECT_MAP_ENTRY_OPERATION_COUNT = 0; - - /** - * Returns the meta object for class - * '{@link org.enterprisedomain.ecp.EOperationInvocation EOperation - * Invocation}'. - * - * @return the meta object for class 'EOperation Invocation'. - * @see org.enterprisedomain.ecp.EOperationInvocation - * @generated - */ - EClass getEOperationInvocation(); - - /** - * Returns the meta object for the reference - * '{@link org.enterprisedomain.ecp.EOperationInvocation#getEOperation - * EOperation}'. - * - * @return the meta object for the reference 'EOperation'. - * @see org.enterprisedomain.ecp.EOperationInvocation#getEOperation() - * @see #getEOperationInvocation() - * @generated - */ - EReference getEOperationInvocation_EOperation(); - - /** - * Returns the meta object for the map - * '{@link org.enterprisedomain.ecp.EOperationInvocation#getArguments - * Arguments}'. - * - * @return the meta object for the map 'Arguments'. - * @see org.enterprisedomain.ecp.EOperationInvocation#getArguments() - * @see #getEOperationInvocation() - * @generated - */ - EReference getEOperationInvocation_Arguments(); - - /** - * Returns the meta object for the attribute - * '{@link org.enterprisedomain.ecp.EOperationInvocation#getResult - * Result}'. - * - * @return the meta object for the attribute 'Result'. - * @see org.enterprisedomain.ecp.EOperationInvocation#getResult() - * @see #getEOperationInvocation() - * @generated - */ - EAttribute getEOperationInvocation_Result(); - - /** - * Returns the meta object for the - * '{@link org.enterprisedomain.ecp.EOperationInvocation#execute() - * Execute}' operation. - * - * @return the meta object for the 'Execute' operation. - * @see org.enterprisedomain.ecp.EOperationInvocation#execute() - * @generated - */ - EOperation getEOperationInvocation__Execute(); - - /** - * Returns the meta object for class '{@link java.util.Map.Entry EParameter - * To Object Map Entry}'. - * - * @return the meta object for class 'EParameter To Object Map Entry'. - * @see java.util.Map.Entry - * @model keyType="org.eclipse.emf.ecore.EParameter" - * valueDataType="org.eclipse.emf.ecore.EJavaObject" - * @generated - */ - EClass getEParameterToObjectMapEntry(); - - /** - * Returns the meta object for the reference '{@link java.util.Map.Entry - * Key}'. - * - * @return the meta object for the reference 'Key'. - * @see java.util.Map.Entry - * @see #getEParameterToObjectMapEntry() - * @generated - */ - EReference getEParameterToObjectMapEntry_Key(); - - /** - * Returns the meta object for the attribute '{@link java.util.Map.Entry - * Value}'. - * - * @return the meta object for the attribute 'Value'. - * @see java.util.Map.Entry - * @see #getEParameterToObjectMapEntry() - * @generated - */ - EAttribute getEParameterToObjectMapEntry_Value(); - - /** - * Returns the factory that creates the instances of the model. - * - * @return the factory that creates the instances of the model. - * @generated - */ - ECPFactory getECPFactory(); - - /** - * Defines literals for the meta objects that represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each operation of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * - * @generated - */ - interface Literals { - /** - * The meta object literal for the - * '{@link org.enterprisedomain.ecp.impl.EOperationInvocationImpl EOperation - * Invocation}' class. - * - * @see org.enterprisedomain.ecp.impl.EOperationInvocationImpl - * @see org.enterprisedomain.ecp.impl.ECPPackageImpl#getEOperationInvocation() - * @generated - */ - EClass EOPERATION_INVOCATION = eINSTANCE.getEOperationInvocation(); - - /** - * The meta object literal for the 'EOperation' reference - * feature. - * - * @generated - */ - EReference EOPERATION_INVOCATION__EOPERATION = eINSTANCE.getEOperationInvocation_EOperation(); - - /** - * The meta object literal for the 'Arguments' map feature. - * - * @generated - */ - EReference EOPERATION_INVOCATION__ARGUMENTS = eINSTANCE.getEOperationInvocation_Arguments(); - - /** - * The meta object literal for the 'Result' attribute feature. - * - * - * @generated - */ - EAttribute EOPERATION_INVOCATION__RESULT = eINSTANCE.getEOperationInvocation_Result(); - - /** - * The meta object literal for the 'Execute' operation. - * - * @generated - */ - EOperation EOPERATION_INVOCATION___EXECUTE = eINSTANCE.getEOperationInvocation__Execute(); - - /** - * The meta object literal for the - * '{@link org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl - * EParameter To Object Map Entry}' class. - * - * @see org.enterprisedomain.ecp.impl.EParameterToObjectMapEntryImpl - * @see org.enterprisedomain.ecp.impl.ECPPackageImpl#getEParameterToObjectMapEntry() - * @generated - */ - EClass EPARAMETER_TO_OBJECT_MAP_ENTRY = eINSTANCE.getEParameterToObjectMapEntry(); - - /** - * The meta object literal for the 'Key' reference feature. - * - * @generated - */ - EReference EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY = eINSTANCE.getEParameterToObjectMapEntry_Key(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * - * @generated - */ - EAttribute EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE = eINSTANCE.getEParameterToObjectMapEntry_Value(); - - } - -} // ECPPackage diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPropertyTester.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPropertyTester.java deleted file mode 100644 index 7f5a2535..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ECPPropertyTester.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.enterprisedomain.ecp; - -import org.eclipse.core.expressions.PropertyTester; -import org.eclipse.emf.ecp.core.ECPProject; - -public class ECPPropertyTester extends PropertyTester { - - public ECPPropertyTester() { - } - - @Override - public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { - if (receiver instanceof ECPProject && property.equals(EnterpriseDomainProvider.PROP_CONTRIBUTION)) - if (((ECPProject) receiver).getProperties().getKeys().contains(property) - && ((ECPProject) receiver).getProperties().getValue(property).equals(String.valueOf(expectedValue))) - return true; - return false; - } - -} diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EOperationInvocation.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EOperationInvocation.java deleted file mode 100644 index 322067f0..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EOperationInvocation.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp; - -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EParameter; - -/** - * A representation of the model object - * 'EOperation Invocation'. - * - *

    - * The following features are supported: - *

    - *
      - *
    • {@link org.enterprisedomain.ecp.EOperationInvocation#getEOperation - * EOperation}
    • - *
    • {@link org.enterprisedomain.ecp.EOperationInvocation#getArguments - * Arguments}
    • - *
    • {@link org.enterprisedomain.ecp.EOperationInvocation#getResult - * Result}
    • - *
    - * - * @see org.enterprisedomain.ecp.ECPPackage#getEOperationInvocation() - * @model - * @generated - */ -public interface EOperationInvocation extends EObject { - /** - * Returns the value of the 'EOperation' reference. - * - * @return the value of the 'EOperation' reference. - * @see #setEOperation(EOperation) - * @see org.enterprisedomain.ecp.ECPPackage#getEOperationInvocation_EOperation() - * @model - * @generated - */ - EOperation getEOperation(); - - /** - * Sets the value of the - * '{@link org.enterprisedomain.ecp.EOperationInvocation#getEOperation - * EOperation}' reference. - * - * @param value the new value of the 'EOperation' reference. - * @see #getEOperation() - * @generated - */ - void setEOperation(EOperation value); - - /** - * Returns the value of the 'Arguments' map. The key is of type - * {@link org.eclipse.emf.ecore.EParameter}, and the value is of type - * {@link java.lang.Object}, - * - * @return the value of the 'Arguments' map. - * @see org.enterprisedomain.ecp.ECPPackage#getEOperationInvocation_Arguments() - * @model mapType="org.enterprisedomain.ecp.EParameterToObjectMapEntry<org.eclipse.emf.ecore.EParameter, - * org.eclipse.emf.ecore.EJavaObject>" - * @generated - */ - EMap getArguments(); - - /** - * Returns the value of the 'Result' attribute. - * - * @return the value of the 'Result' attribute. - * @see #setResult(Object) - * @see org.enterprisedomain.ecp.ECPPackage#getEOperationInvocation_Result() - * @model - * @generated - */ - Object getResult(); - - /** - * Sets the value of the - * '{@link org.enterprisedomain.ecp.EOperationInvocation#getResult - * Result}' attribute. - * - * @param value the new value of the 'Result' attribute. - * @see #getResult() - * @generated - */ - void setResult(Object value); - - /** - * - * - * @model - * @generated - */ - void execute(); - -} // EOperationInvocation diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProvider.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProvider.java deleted file mode 100755 index 8b8abefe..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProvider.java +++ /dev/null @@ -1,854 +0,0 @@ -/** - * Copyright 2012-2018 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.ecp; - -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.IResourceDeltaVisitor; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.command.BasicCommandStack; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.util.ECollections; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EParameter; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EContentAdapter; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.ecp.core.ECPProject; -import org.eclipse.emf.ecp.core.ECPRepository; -import org.eclipse.emf.ecp.core.util.ECPContainer; -import org.eclipse.emf.ecp.core.util.ECPModelContextAdapter; -import org.eclipse.emf.ecp.core.util.ECPUtil; -import org.eclipse.emf.ecp.core.util.observer.ECPProjectContentChangedObserver; -import org.eclipse.emf.ecp.core.util.observer.ECPRepositoriesChangedObserver; -import org.eclipse.emf.ecp.spi.core.DefaultProvider; -import org.eclipse.emf.ecp.spi.core.InternalProject; -import org.eclipse.emf.ecp.spi.core.InternalProvider; -import org.eclipse.emf.ecp.spi.core.InternalRepository; -import org.eclipse.emf.ecp.spi.core.ProviderChangeListener; -import org.eclipse.emf.ecp.spi.core.util.InternalChildrenList; -import org.eclipse.emf.edit.command.ChangeCommand; -import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.enterprisedomain.classmaker.ClassMakerService; -import org.enterprisedomain.classmaker.Contribution; -import org.enterprisedomain.classmaker.Project; -import org.enterprisedomain.classmaker.ResourceAdapter; -import org.enterprisedomain.classmaker.SelectRevealHandler; -import org.enterprisedomain.classmaker.Stage; -import org.enterprisedomain.classmaker.core.ClassMakerPlugin; -import org.enterprisedomain.classmaker.impl.CompletionListenerImpl; -import org.enterprisedomain.classmaker.impl.ResourceChangeListenerImpl; -import org.enterprisedomain.classmaker.util.ClassMakerAdapterFactory; -import org.enterprisedomain.classmaker.util.ResourceUtils; - -public class EnterpriseDomainProvider extends DefaultProvider { - - public static final AdapterFactory ENTERPRISE_DOMAIN_ADAPTER_FACTORY = new ComposedAdapterFactory( - new AdapterFactory[] { new ClassMakerAdapterFactory(), InternalProvider.EMF_ADAPTER_FACTORY }); - - public static final String NAME = "org.enterprisedomain.ecp.provider"; - - public static final String PROP_CONTRIBUTION = "isContribution"; - - private static Map> visiblePackagesToClasses = new HashMap>(); - - private final IResourceChangeListener resourceChangeListener = new EnterpriseDomainResourceListener(); - - private static Map initing = new HashMap(); - - private Adapter adapter = new EContentAdapter() { - - @SuppressWarnings("unchecked") - @Override - public void notifyChanged(Notification notification) { - super.notifyChanged(notification); - Resource resource = null; - if (notification.getEventType() == Notification.ADD - && notification.getFeatureID(Resource.class) == Resource.RESOURCE__CONTENTS - && notification.getNotifier() instanceof Resource) { - resource = (Resource) notification.getNotifier(); - } else if (notification.getEventType() == Notification.ADD - && notification.getNotifier() instanceof EObject) { - final Object feature = notification.getFeature(); - if (feature instanceof EReference) { - final EReference eReference = (EReference) feature; - if (eReference.isContainment()) { - resource = ((EObject) notification.getNewValue()).eResource(); - } - } - } - if (resource == null) { - return; - } - if (Activator.getClassMaker() == null) - return; - Project domainProject = Activator.getClassMaker().getWorkspace().getProject(resource); - if (domainProject != null && !(domainProject instanceof Contribution)) { - try { - Map options = new HashMap(); - options.put(XMLResource.OPTION_ENCODING, "UTF-8"); - resource.save(options); - } catch (final IOException ex) { - Activator.log(ex); - } - } - InternalProject project = (InternalProject) getModelContext(resource); - if (project != null) { - propagatePackagesVisibility(); - project.notifyObjectsChanged((Collection) (Collection) Arrays.asList(project), true); - } - } - - }; - - private BasicCommandStack commandStack; - - public EnterpriseDomainProvider() { - super(NAME); - if (Activator.getClassMaker() != null) { - Activator.getClassMaker().getWorkspace().getResourceSet().eAdapters().add(adapter); - } - ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); - } - - @Override - public boolean isThreadSafe() { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean hasCreateProjectWithoutRepositorySupport() { - return true; - } - - @Override - public boolean hasCreateRepositorySupport() { - return false; - } - - @Override - public EList getElements(InternalProject project) { - Project domainProject = (Project) Activator.getClassMaker().getWorkspace().getProject(project.getName()); - return domainProject.getChildren(); - } - - @Override - public void cloneProject(InternalProject projectToClone, InternalProject targetProject) { - Project domainProjectToClone = Activator.getClassMaker().getWorkspace().getProject(projectToClone.getName()); - Project domainTargetProject = Activator.getClassMaker().getWorkspace().getProject(targetProject.getName()); - domainTargetProject.getChildren().addAll(EcoreUtil.copyAll(domainProjectToClone.getChildren())); - } - - @Override - public void handleLifecycle(ECPContainer context, LifecycleEvent event) { - super.handleLifecycle(context, event); - if (context instanceof InternalProject) { - final InternalProject project = (InternalProject) context; - switch (event) { - case INIT: - initProject(project); - break; - - case CREATE: - createProject(project); - break; - - case DISPOSE: - disposeProject(project); - break; - - case REMOVE: - removeProject(project); - break; - - default: - break; - } - } - } - - protected void initProject(final InternalProject project) { - if (initing.containsKey(project) && initing.get(project)) - return; - initing.put(project, true); - final EditingDomain editingDomain = project.getEditingDomain(); - editingDomain.getResourceSet().eAdapters().add(new EnterpriseDomainProjectObserver(project, this)); - final ClassMakerService classMaker = Activator.getClassMaker(); - if (classMaker != null) { - Project domainProject = classMaker.getWorkspace().getProject(project.getName()); - if (domainProject != null) { - try { - IProgressMonitor monitor = null; - if (getUIProvider() != null) - monitor = getUIProvider().getAdapter(project, IProgressMonitor.class); - else - monitor = ClassMakerPlugin.getProgressMonitor(); - domainProject.open(monitor); - } catch (CoreException e) { - Activator.log(e); - } - if (domainProject.getRevision().getState().getDomainModel().getGenerated() instanceof EPackage) - addVisiblePackage(project, - (EPackage) domainProject.getRevision().getState().getDomainModel().getGenerated()); - domainProject.initialize(false); - try { - domainProject.load(false, true); - } catch (CoreException e) { - ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); - } - } else { - boolean contribution = false; - if (project.getProperties().getKeys().contains(PROP_CONTRIBUTION)) - contribution = Boolean.valueOf(project.getProperties().getValue(PROP_CONTRIBUTION)); - IProgressMonitor monitor = null; - if (getUIProvider() == null) - monitor = ClassMakerPlugin.getProgressMonitor(); - else - monitor = getUIProvider().getAdapter(project, IProgressMonitor.class); - if (contribution) { - EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE; - EPackage model = ecoreFactory.createEPackage(); - model.setName(project.getName()); - model.setNsPrefix(CodeGenUtil.capName(project.getName().replaceAll(" ", "").toLowerCase())); - model.setNsURI("http://" + project.getName().replaceAll(" ", "") + "/1.0"); - EClass dummyEClass = ecoreFactory.createEClass(); - dummyEClass.setName("TheObject"); - EAttribute dummyEAttribute = ecoreFactory.createEAttribute(); - dummyEAttribute.setName("value"); - dummyEAttribute.setEType(EcorePackage.Literals.ESTRING); - dummyEClass.getEStructuralFeatures().add(dummyEAttribute); - EOperation op = ecoreFactory.createEOperation(); - op.setName("perform"); - op.setEType(EcorePackage.Literals.EINT); - EAnnotation an = ecoreFactory.createEAnnotation(); - an.setSource("http://www.eclipse.org/emf/2002/GenModel"); - an.getDetails().put("body", "return 7;"); - op.getEAnnotations().add(an); - EAnnotation invocation = ecoreFactory.createEAnnotation(); - invocation.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); - op.getEAnnotations().add(invocation); - dummyEClass.getEOperations().add(op); - model.getEClassifiers().add(dummyEClass); - EAnnotation invocationDelegate = ecoreFactory.createEAnnotation(); - invocationDelegate.setSource(EcorePackage.eNS_URI); - invocationDelegate.getDetails().put("invocationDelegates", - ClassMakerService.INVOCATION_DELEGATE_URI); - model.getEAnnotations().add(invocationDelegate); - EClass queriesEClass = ecoreFactory.createEClass(); - queriesEClass.setName("Queries"); - EOperation query = ecoreFactory.createEOperation(); - query.setName("selectAllTheObjects"); - EClass eObjectEClass = EcorePackage.Literals.EOBJECT; - query.setEType(eObjectEClass); - query.setUpperBound(-1); - EParameter param = ecoreFactory.createEParameter(); - param.setName("selectedEObjects"); - param.setEType(eObjectEClass); - param.setUpperBound(-1); - query.getEParameters().add(param); - EAnnotation ann = ecoreFactory.createEAnnotation(); - ann.setSource("http://www.eclipse.org/emf/2002/GenModel"); - ann.getDetails().put("body", "if (null == selectedEObjects) {\n" - + " throw new <%java.lang.NullPointerException%>(\"Argument is null\"); //$NON-NLS-1$\n" - + "}\n" + "\n" - + "<%org.eclipse.emf.query.conditions.eobjects.EObjectCondition%> condition = " - + "new <%org.eclipse.emf.query.conditions.eobjects.EObjectTypeRelationCondition%>(" - + "(<%org.eclipse.emf.ecore.EClass%>) <%org.eclipse.emf.ecore.EPackage%>.Registry.INSTANCE.getEPackage(\"http://" - + project.getName().replaceAll(" ", "") + "/1.0\")" + ".getEClassifier(\"" - + dummyEClass.getName() + "\"));\n" - + "<%org.eclipse.emf.query.statements.SELECT%> statement = new <%org.eclipse.emf.query.statements.SELECT%>(\n" - + " new <%org.eclipse.emf.query.statements.FROM%>(selectedEObjects), \n" - + " new <%org.eclipse.emf.query.statements.WHERE%>(condition)\n" + ");\n" + "\n" - + "return <%org.eclipse.emf.common.util.ECollections%>.toEList(statement.execute().getEObjects());"); - query.getEAnnotations().add(ann); - EAnnotation in = ecoreFactory.createEAnnotation(); - in.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); - query.getEAnnotations().add(in); - queriesEClass.getEOperations().add(query); - model.getEClassifiers().add(queriesEClass); - try { - domainProject = classMaker.getWorkspace().createContribution(model, monitor); - domainProject.getState().setEdit(true); - domainProject.getState().setEditor(true); - domainProject.addCompletionListener(new ProviderCompletionListener(project)); - } catch (CoreException e) { - Activator.log(e); - } - addVisiblePackage(project, EcorePackage.eINSTANCE); - } else - try { - domainProject = classMaker.getWorkspace().createProject(project.getName(), monitor); - domainProject.initialize(true); - propagatePackagesVisibility(); - } catch (CoreException e) { - Activator.log(e); - } - } - classMaker.getWorkspace().getResourceSet().eAdapters() - .add(new AdapterFactoryEditingDomain.EditingDomainProvider(project.getEditingDomain())); - - } - registerChangeListener(new ProviderChangeListener() { - - private Map projects = new HashMap(); - - @Override - public void preDelete(EObject objectToBeDeleted) { - ECPContainer project = getModelContext(objectToBeDeleted); - if (project != null && ECPProject.class.isInstance(project)) { - projects.put(objectToBeDeleted, (ECPProject) project); - } - - } - - @Override - public void postDelete(EObject objectToBeDeleted) { - if (!projects.containsKey(objectToBeDeleted)) - return; - final Object[] eObjects = new Object[] { objectToBeDeleted }; - ECPUtil.getECPObserverBus().notify(ECPProjectContentChangedObserver.class) - .objectsChanged(projects.get(objectToBeDeleted), (Collection) Arrays.asList(eObjects)); - projects.remove(objectToBeDeleted); - } - - @Override - public void notify(Notification notification) { - } - - @Override - public boolean canDelete(EObject objectToBeDeleted) { - return true; - } - - }); - initing.put(project, false); - } - - protected void createProject(final InternalProject project) { - project.open(); - final EditingDomain editingDomain = project.getEditingDomain(); - Adapter observer = new EnterpriseDomainProjectObserver(project, this); - editingDomain.getResourceSet().eAdapters().add(observer); - ClassMakerService classMaker = Activator.getClassMaker(); - if (classMaker != null) - classMaker.getWorkspace().getResourceSet().eAdapters().add(observer); - } - - @Override - public ECPContainer getModelContext(Object element) { - if (element instanceof ECPContainer) { - return (ECPContainer) element; - } - -// if (element instanceof ECPModelContextProvider) { -// ECPContainer container = ((ECPModelContextProvider) element).getModelContext(element); -// if (container.equals(element)) -// return null; -// return container; -// } - - if (element instanceof Project) { - for (InternalProject project : getOpenProjects()) { - if (project.getName().equals(((Project) element).getName()) - && !project.getContents().equals(((Project) element).getChildren())) - return project; - } - } - - if (element instanceof EList) - return getModelContext(((EList) element).get(0)); - - if (element instanceof ResourceAdapter) - return getModelContext(((ResourceAdapter) element).getProject()); - - if (element instanceof Resource) { - Collection projects = null; - try { - projects = getOpenProjects(); - } catch (RuntimeException e) { - return null; - } - for (InternalProject project : projects) { - Project domainProject = Activator.getClassMaker().getWorkspace().getProject((Resource) element); - if (domainProject != null && domainProject.getProjectName().equals(project.getName())) - return project; - } - } - - if (element instanceof EObject) { - if (((EObject) element).eContainer() instanceof ECPContainer) { - return getModelContext(((EObject) element).eContainer().eResource()); - } - if (element instanceof Resource) { - Collection projects = null; - try { - projects = getOpenProjects(); - } catch (RuntimeException e) { - return null; - } - for (InternalProject project : projects) { - Project domainProject = Activator.getClassMaker().getWorkspace() - .getProject(((Resource) element).getContents().get(0).eClass().getEPackage()); - if (domainProject != null && domainProject.getProjectName().equals(project.getName())) - return project; - } - } - if (((EObject) element).eResource() != null) - return getModelContext(((EObject) element).eResource()); - } - - return null; - } - - protected void disposeProject(InternalProject project) { - initing.remove(project); - ClassMakerService service = Activator.getClassMaker(); - if (service != null) { - Project domainProject = service.getWorkspace().getProject(project.getName()); - if (domainProject != null) - try { - IProgressMonitor monitor = null; - if (getUIProvider() == null) - monitor = ClassMakerPlugin.getProgressMonitor(); - else - monitor = getUIProvider().getAdapter(project, IProgressMonitor.class); - Object object = domainProject.getChildren().get(0); - if (object instanceof Resource) - ((Resource) object).setTrackingModification(false); - domainProject.close(monitor); - } catch (CoreException e) { - Activator.log(e); - } - } - - } - - protected void removeProject(InternalProject project) { - initing.remove(project); - Project domainProject = (Project) Activator.getClassMaker().getWorkspace().getProject(project.getName()); - try { - if (domainProject != null) - domainProject.delete(getUIProvider().getAdapter(project, IProgressMonitor.class)); - } catch (CoreException e) { - e.printStackTrace(); - } - - } - - @Override - public Set getUnsupportedEPackages(Collection packages, InternalRepository repository) { - Set results = new HashSet(); - results.addAll(packages); - for (InternalProject project : getOpenProjects()) - results.removeAll(getVisiblePackages(project)); - return results; - } - - public Set getVisiblePackages(InternalProject project) { - Set results = new HashSet(); - for (String packageNsURI : visiblePackagesToClasses.keySet()) { - EPackage ePackage = project.getEditingDomain().getResourceSet().getPackageRegistry() - .getEPackage(packageNsURI); - results.add(ePackage); - } - return results; - } - - @Override - public boolean contains(InternalProject project, Object object) { - if (object instanceof EObject) - return Activator.getClassMaker().getWorkspace().contains((EObject) object).getValue() == Stage.LOADED_VALUE; - return super.contains(project, object); - } - - @Override - public void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList) { - if (parent instanceof ECPRepository) { - childrenList.addChildren(Activator.getClassMaker().getWorkspace().getProjects()); - } else if (parent instanceof ECPProject) { - final ECPProject project = (ECPProject) parent; - final Project domainProject = Activator.getClassMaker().getWorkspace().getProject(project.getName()); - if (domainProject != null && !domainProject.getChildren().isEmpty()) - childrenList.addChildren(domainProject.getChildren()); - } else if (parent instanceof Resource) { - Resource resource = (Resource) parent; - childrenList.addChildren(resource.getContents()); - } else if (parent instanceof EObject) { - final EObject eObject = (EObject) parent; - childrenList.addChildren(eObject.eContents()); - } else { - super.fillChildren(context, parent, childrenList); - } - } - - @Override - public T getAdapter(Object adaptable, Class adapterType) { - final T adapter = EnterpriseDomainProviderAdapterFactory.adapt(adaptable, adapterType); - if (adapter != null) - return adapter; - return super.getAdapter(adaptable, adapterType); - } - - @Override - public EditingDomain createEditingDomain(final InternalProject project) { - commandStack = (BasicCommandStack) createCommandStack(project); - final EditingDomain editingDomain = new AdapterFactoryEditingDomain(ENTERPRISE_DOMAIN_ADAPTER_FACTORY, - commandStack, Activator.getClassMaker().getWorkspace().getResourceSet()); - ECPModelContextAdapter a = new ECPModelContextAdapter(project); - if (!editingDomain.getResourceSet().eAdapters().contains(a)) - editingDomain.getResourceSet().eAdapters().add(a); - return editingDomain; - } - - public class ProviderCompletionListener extends CompletionListenerImpl { - - private InternalProject project; - - public ProviderCompletionListener(InternalProject project) { - this.project = project; - } - - @SuppressWarnings("unchecked") - @Override - public void completed(final Project result) throws Exception { - result.setSelectRevealHandler(getUIProvider().getAdapter(project, SelectRevealHandler.class)); - result.addResourceChangeListener(new ResourceChangeListenerImpl() { - - @Override - public void changed(Notification notification) throws Exception { - project.notifyObjectsChanged(((Collection) (Collection) Arrays.asList(project)), true); - } - - }); - if (result.getDomainModel().getGenerated() instanceof EPackage) - addVisiblePackage(project, (EPackage) result.getDomainModel().getGenerated()); - project.notifyObjectsChanged((Collection) (Collection) Arrays.asList(project), true); - Collection repositories = (Collection) (Collection) Arrays - .asList(project.getRepository()); - ECPUtil.getECPObserverBus().notify(ECPRepositoriesChangedObserver.class).repositoriesChanged(repositories, - repositories); - } - } - - @Override - public Notifier getRoot(InternalProject project) { - return Activator.getClassMaker().getWorkspace().getProject(project.getName()); - } - - public void addVisiblePackage(InternalProject project, EPackage ePackage) { - HashSet eClasses = null; - if (ePackage != null && visiblePackagesToClasses.containsKey(ePackage.getNsURI())) { - eClasses = visiblePackagesToClasses.get(ePackage.getNsURI()); - eClasses.clear(); - } else - eClasses = new HashSet(); - if (ePackage != null) { - for (EClassifier eClass : ePackage.getEClassifiers()) - if (eClass instanceof EClass) - eClasses.add(eClass.getName()); - visiblePackagesToClasses.put(ePackage.getNsURI(), eClasses); - } - propagatePackagesVisibility(); - } - - private void propagatePackagesVisibility() { - for (InternalProject project : getOpenProjects()) - for (String ePackageNsURI : visiblePackagesToClasses.keySet()) { - EPackage eP = project.getEditingDomain().getResourceSet().getPackageRegistry() - .getEPackage(ePackageNsURI); - Set ePs = new HashSet(); - ePs.addAll(project.getVisiblePackages()); - ePs.add(eP); - project.setVisiblePackages(ePs); - for (Map.Entry> eClassNames : visiblePackagesToClasses.entrySet()) - if (eClassNames.getKey().equals(ePackageNsURI)) - for (String eClassName : eClassNames.getValue()) { - Set eCls = new HashSet(); - eCls.addAll(project.getVisibleEClasses()); - eCls.add((EClass) eP.getEClassifier(eClassName)); - project.setVisibleEClasses(eCls); - } - } - } - - private class EnterpriseDomainResourceListener implements IResourceChangeListener { - - @Override - public void resourceChanged(IResourceChangeEvent event) { - final Collection changedResources = new ArrayList(); - final Collection removedResources = new ArrayList(); - final IResourceDelta delta = event.getDelta(); - - if (delta == null) { - return; - } - - try { - delta.accept(new EnterpriseDomainEditorResourceDeltaVisitor(removedResources, changedResources)); - } catch (final CoreException ex) { - Activator.log(ex); - } - if (changedResources.isEmpty() && removedResources.isEmpty()) { - return; - } - String projectName = ResourceUtils.parseProjectName(changedResources.iterator().next().getURI()); - ECPProject project = ECPUtil.getECPProjectManager().getProject(projectName); - if (getUIProvider() != null) - ((IResourceHandler) getUIProvider().getAdapter(this, IResourceHandler.class)) - .handleResourceChange(project, changedResources, removedResources); - } - - } - - private final class EnterpriseDomainEditorResourceDeltaVisitor implements IResourceDeltaVisitor { - private final Collection removedResources; - private final Collection changedResources; - - EnterpriseDomainEditorResourceDeltaVisitor(Collection removedResources, - Collection changedResources) { - this.removedResources = removedResources; - this.changedResources = changedResources; - } - - @Override - public boolean visit(final IResourceDelta delta) { - if (delta.getResource().getType() == IResource.FILE - && (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED)) { - final ResourceSet resourceSet = Activator.getClassMaker().getWorkspace().getResourceSet(); - if (resourceSet == null) { - return false; - } - Resource resource = null; - - final URI uri = URI.createPlatformResourceURI(delta.getFullPath().toString(), true); - resource = resourceSet.getResource(uri, false); - if (resource == null) { - try { - final URL fileURL = FileLocator.resolve(new URL(uri.toString())); - resource = resourceSet.getResource(URI.createFileURI(fileURL.getPath()), false); - } catch (final IOException ex) { - return false; - } - } - - if (resource != null) { - if (delta.getKind() == IResourceDelta.REMOVED) { - removedResources.add(resource); - } else { - changedResources.add(resource); - } - } - return false; - } else if (delta.getResource() != null && delta.getResource().getType() == IResource.PROJECT - && delta.getKind() == IResourceDelta.REMOVED) { - try { - ECPProject project = ECPUtil.getECPProjectManager().getProject(delta.getResource().getName()); - project.delete(); - } catch (Exception e) { - ClassMakerPlugin.getInstance().getLog().log(ClassMakerPlugin.createErrorStatus(e)); - } - return false; - } - return true; - } - } - - public class EnterpriseDomainProjectObserver extends EContentAdapter { - - private final InternalProject project; - private final EnterpriseDomainProvider provider; - - public EnterpriseDomainProjectObserver(InternalProject project, EnterpriseDomainProvider provider) { - this.project = project; - this.provider = provider; - } - - @SuppressWarnings("unchecked") - @Override - public void notifyChanged(Notification notification) { - super.notifyChanged(notification); - - if (notification.getNotifier() instanceof EObject) { - provider.notifyProviderChangeListeners(notification); - final EObject eObject = (EObject) notification.getNotifier(); - final Object[] eObjects = new Object[] { eObject }; - project.notifyObjectsChanged((Collection) Arrays.asList(eObjects), false); - - final Object feature = notification.getFeature(); - if (feature instanceof EReference) { - final EReference eReference = (EReference) feature; - - if (eReference.isContainment() && notification.getNewValue() instanceof EObject) { - project.notifyObjectsChanged(Collections.singleton(notification.getNewValue()), true); - } - - } else if (feature instanceof EAttribute) { - final EAttribute eAttribute = (EAttribute) feature; - - if (notification.getNewValue() instanceof EObject) { - project.notifyObjectsChanged(Collections.singleton(notification.getNewValue()), true); - } - - } else if (feature instanceof EOperation) { - final EOperation eOperation = (EOperation) feature; - - if (notification.getNewValue() instanceof EObject) { - project.notifyObjectsChanged(Collections.singleton(notification.getNewValue()), true); - } - } - return; - } - - if (notification.getNotifier() instanceof Resource) { - project.notifyObjectsChanged( - (Collection) (Collection) Collections.singleton(notification.getNotifier()), true); - } -// Diagnostician.INSTANCE -// .validate(ClassMakerPlugin.getClassMaker().getWorkspace().getProject(project.getName())); - // if (notification.getNotifier() instanceof Notifier) { - // provider.notifyProviderChangeListeners(notification); - // - // if (notification.getNewValue() instanceof EObject) { - // project.notifyObjectsChanged(Collections.singleton(notification.getNewValue()), - // true); - // } - // if ((notification.getEventType() == ((Notification.REMOVE | - // Notification.REMOVE_MANY) - // & notification.getEventType())) && notification.getOldValue() - // instanceof EObject) { - // Collection oldObjects = null; - // if (notification.getOldValue() instanceof Collection) - // oldObjects = (Collection) notification.getOldValue(); - // else - // oldObjects = Collections.singleton(notification.getOldValue()); - // ECPUtil.getECPObserverBus().notify(ECPProjectContentChangedObserver.class).objectsChanged(project, - // oldObjects); - // } - // } - } - - } - - @Override - public boolean isDirty(InternalProject project) { - if (commandStack != null) - return commandStack.isSaveNeeded(); - Project domainProject = Activator.getClassMaker().getWorkspace().getProject(project.getName()); - return domainProject.isDirty(); - } - - @Override - public void doSave(InternalProject project) { - // IProgressMonitor monitor = null; - // try { - // monitor = getUIProvider().getAdapter(project, IProgressMonitor.class); - // final Semaphore saved = new Semaphore(0); - // CompletionListener saveListener = new CompletionListenerImpl() { - // - // @Override - // public void completed(Project result) { - // saved.release(); - // } - // - // }; - ClassMakerService classMaker = Activator.getClassMaker(); - Project domainProject = classMaker.getWorkspace().getProject(project.getName()); - // Blueprint blueprint = classMaker.createBlueprint(); - // blueprint.getCompletionListeners().add(saveListener); - domainProject.getState().saveResource(); - // blueprint.setDynamicModel( - // ((Contribution) - // domainProject).getContribution().getDomainModel().getDynamic()); - // classMaker.make(blueprint, monitor); - // try { - // saved.acquire(); - // } catch (InterruptedException e) { - // e.printStackTrace(); - // if (monitor != null) - // monitor.setCanceled(true); - // } - // domainProject.removeCompletionListener(saveListener); - ((BasicCommandStack) project.getEditingDomain().getCommandStack()).saveIsDone(); - // } catch (CoreException e) { - // e.printStackTrace(); - // if (monitor != null) - // monitor.setCanceled(true); - // } - super.doSave(project); - } - - @Override - public void doDelete(InternalProject project, Collection objects) { - final InternalProject p = project; - final Collection o = objects; - final Command changeCommand = new ChangeCommand(project.getEditingDomain().getResourceSet()) { - @Override - protected void doExecute() { - Project domainProject = Activator.getClassMaker().getWorkspace().getProject(p.getName()); - if (o.isEmpty()) - try { - domainProject.delete(getUIProvider().getAdapter(p, IProgressMonitor.class)); - } catch (CoreException e) { - Activator.log(e); - } - else - domainProject.delete(ECollections.asEList(o)); - } - }; - if (changeCommand.canExecute()) { - project.getEditingDomain().getCommandStack().execute(changeCommand); - return; - } - } - -} diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProviderAdapterFactory.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProviderAdapterFactory.java deleted file mode 100644 index 53a32fc1..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/EnterpriseDomainProviderAdapterFactory.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.enterprisedomain.ecp; - -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecp.core.ECPProvider; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; - -public class EnterpriseDomainProviderAdapterFactory implements IAdapterFactory { - - private static final Class[] CLASSES = { IProgressMonitor.class, ComposeableAdapterFactory.class, - AdapterFactory.class, ResourceSet.class, ECPProvider.class }; - - @Override - public T getAdapter(Object adaptableObject, Class adapterType) { - return adapt(adaptableObject, adapterType); - } - - @SuppressWarnings("unchecked") - public static T adapt(Object adaptable, Class adapterType) { - if (CLASSES[0].isAssignableFrom(adapterType)) - return (T) ((EnterpriseDomainProvider) adaptable).getUIProvider().getAdapter(adaptable, adapterType); - if (CLASSES[1].isAssignableFrom(adapterType)) - return (T) ((EnterpriseDomainProvider) adaptable).getUIProvider().getAdapter(adaptable, adapterType); - if (CLASSES[2].isAssignableFrom(adapterType)) - return (T) EnterpriseDomainProvider.ENTERPRISE_DOMAIN_ADAPTER_FACTORY; - if (CLASSES[3].isAssignableFrom(adapterType)) - return (T) Activator.getClassMaker().getWorkspace().getResourceSet(); - if (CLASSES[4].isAssignableFrom(adapterType)) - return (T) adaptable; - return null; - } - - @Override - public Class[] getAdapterList() { - return CLASSES; - } - -} diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/IResourceHandler.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/IResourceHandler.java deleted file mode 100644 index ea395d2e..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/IResourceHandler.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.enterprisedomain.ecp; - -import java.util.Collection; - -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecp.core.ECPProject; - -public interface IResourceHandler { - - void handleResourceChange(final ECPProject project, final Collection changedResources, - final Collection removedResources); - -} diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ObjectPropertyTester.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ObjectPropertyTester.java deleted file mode 100644 index 0d72c120..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/ObjectPropertyTester.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.enterprisedomain.ecp; - -import org.eclipse.core.expressions.PropertyTester; - -public class ObjectPropertyTester extends PropertyTester { - - public ObjectPropertyTester() { - } - - @Override - public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { - if (property.equals("canDelete")) - return true; - return false; - } - -} \ No newline at end of file diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPFactoryImpl.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPFactoryImpl.java deleted file mode 100644 index 48b1c20a..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPFactoryImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.impl; - -import java.util.Map; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EParameter; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.enterprisedomain.ecp.ECPFactory; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; - -/** - * An implementation of the model Factory. - * - * @generated - */ -public class ECPFactoryImpl extends EFactoryImpl implements ECPFactory { - /** - * Creates the default factory implementation. - * - * @generated - */ - public static ECPFactory init() { - try { - ECPFactory theECPFactory = (ECPFactory) EPackage.Registry.INSTANCE.getEFactory(ECPPackage.eNS_URI); - if (theECPFactory != null) { - return theECPFactory; - } - } catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ECPFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * @generated - */ - public ECPFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ECPPackage.EOPERATION_INVOCATION: - return createEOperationInvocation(); - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY: - return (EObject) createEParameterToObjectMapEntry(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public EOperationInvocation createEOperationInvocation() { - EOperationInvocationImpl eOperationInvocation = new EOperationInvocationImpl(); - return eOperationInvocation; - } - - /** - * - * - * @generated - */ - public Map.Entry createEParameterToObjectMapEntry() { - EParameterToObjectMapEntryImpl eParameterToObjectMapEntry = new EParameterToObjectMapEntryImpl(); - return eParameterToObjectMapEntry; - } - - /** - * - * - * @generated - */ - public ECPPackage getECPPackage() { - return (ECPPackage) getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static ECPPackage getPackage() { - return ECPPackage.eINSTANCE; - } - -} // ECPFactoryImpl diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPPackageImpl.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPPackageImpl.java deleted file mode 100644 index 62966378..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/ECPPackageImpl.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.impl; - -import java.util.Map; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.enterprisedomain.ecp.ECPFactory; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; - -/** - * An implementation of the model Package. - * - * @generated - */ -public class ECPPackageImpl extends EPackageImpl implements ECPPackage { - /** - * - * - * @generated - */ - private EClass eOperationInvocationEClass = null; - - /** - * - * - * @generated - */ - private EClass eParameterToObjectMapEntryEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the - * package package URI value. - *

    - * Note: the correct way to create the package is via the static factory method - * {@link #init init()}, which also performs initialization of the package, or - * returns the registered package, if one already exists. - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.enterprisedomain.ecp.ECPPackage#eNS_URI - * @see #init() - * @generated - */ - private ECPPackageImpl() { - super(eNS_URI, ECPFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and - * for any others upon which it depends. - * - *

    - * This method is used to initialize {@link ECPPackage#eINSTANCE} when that - * field is accessed. Clients should not invoke it directly. Instead, they - * should simply access that field to obtain the package. - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ECPPackage init() { - if (isInited) - return (ECPPackage) EPackage.Registry.INSTANCE.getEPackage(ECPPackage.eNS_URI); - - // Obtain or create and register package - Object registeredECPPackage = EPackage.Registry.INSTANCE.get(eNS_URI); - ECPPackageImpl theECPPackage = registeredECPPackage instanceof ECPPackageImpl - ? (ECPPackageImpl) registeredECPPackage - : new ECPPackageImpl(); - - isInited = true; - - // Create package meta-data objects - theECPPackage.createPackageContents(); - - // Initialize created meta-data - theECPPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theECPPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ECPPackage.eNS_URI, theECPPackage); - return theECPPackage; - } - - /** - * - * - * @generated - */ - public EClass getEOperationInvocation() { - return eOperationInvocationEClass; - } - - /** - * - * - * @generated - */ - public EReference getEOperationInvocation_EOperation() { - return (EReference) eOperationInvocationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getEOperationInvocation_Arguments() { - return (EReference) eOperationInvocationEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getEOperationInvocation_Result() { - return (EAttribute) eOperationInvocationEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EOperation getEOperationInvocation__Execute() { - return eOperationInvocationEClass.getEOperations().get(0); - } - - /** - * - * - * @generated - */ - public EClass getEParameterToObjectMapEntry() { - return eParameterToObjectMapEntryEClass; - } - - /** - * - * - * @generated - */ - public EReference getEParameterToObjectMapEntry_Key() { - return (EReference) eParameterToObjectMapEntryEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getEParameterToObjectMapEntry_Value() { - return (EAttribute) eParameterToObjectMapEntryEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public ECPFactory getECPFactory() { - return (ECPFactory) getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is guarded to - * have no affect on any invocation but its first. - * - * @generated - */ - public void createPackageContents() { - if (isCreated) - return; - isCreated = true; - - // Create classes and their features - eOperationInvocationEClass = createEClass(EOPERATION_INVOCATION); - createEReference(eOperationInvocationEClass, EOPERATION_INVOCATION__EOPERATION); - createEReference(eOperationInvocationEClass, EOPERATION_INVOCATION__ARGUMENTS); - createEAttribute(eOperationInvocationEClass, EOPERATION_INVOCATION__RESULT); - createEOperation(eOperationInvocationEClass, EOPERATION_INVOCATION___EXECUTE); - - eParameterToObjectMapEntryEClass = createEClass(EPARAMETER_TO_OBJECT_MAP_ENTRY); - createEReference(eParameterToObjectMapEntryEClass, EPARAMETER_TO_OBJECT_MAP_ENTRY__KEY); - createEAttribute(eParameterToObjectMapEntryEClass, EPARAMETER_TO_OBJECT_MAP_ENTRY__VALUE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This method is - * guarded to have no affect on any invocation but its first. - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) - return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - - // Initialize classes, features, and operations; add parameters - initEClass(eOperationInvocationEClass, EOperationInvocation.class, "EOperationInvocation", !IS_ABSTRACT, - !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getEOperationInvocation_EOperation(), ecorePackage.getEOperation(), null, "eOperation", null, 0, - 1, EOperationInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getEOperationInvocation_Arguments(), this.getEParameterToObjectMapEntry(), null, "arguments", - null, 0, -1, EOperationInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEOperationInvocation_Result(), ecorePackage.getEJavaObject(), "result", null, 0, 1, - EOperationInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEOperation(getEOperationInvocation__Execute(), null, "execute", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEClass(eParameterToObjectMapEntryEClass, Map.Entry.class, "EParameterToObjectMapEntry", !IS_ABSTRACT, - !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEReference(getEParameterToObjectMapEntry_Key(), ecorePackage.getEParameter(), null, "key", null, 0, 1, - Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEParameterToObjectMapEntry_Value(), ecorePackage.getEJavaObject(), "value", null, 0, 1, - Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - } - -} // ECPPackageImpl diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EOperationInvocationImpl.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EOperationInvocationImpl.java deleted file mode 100644 index 8c1e44a8..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/impl/EOperationInvocationImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.impl; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EParameter; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import org.eclipse.emf.ecore.util.EcoreEMap; -import org.eclipse.emf.ecore.util.InternalEList; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; - -/** - * An implementation of the model object - * 'EOperation Invocation'. - *

    - * The following features are implemented: - *

    - *
      - *
    • {@link org.enterprisedomain.ecp.impl.EOperationInvocationImpl#getEOperation - * EOperation}
    • - *
    • {@link org.enterprisedomain.ecp.impl.EOperationInvocationImpl#getArguments - * Arguments}
    • - *
    • {@link org.enterprisedomain.ecp.impl.EOperationInvocationImpl#getResult - * Result}
    • - *
    - * - * @generated - */ -public class EOperationInvocationImpl extends MinimalEObjectImpl.Container implements EOperationInvocation { - public class Adapter extends AdapterImpl { - - @Override - public void notifyChanged(Notification msg) { - super.notifyChanged(msg); - if (msg.getFeatureID(EOperationInvocation.class) == ECPPackage.EOPERATION_INVOCATION__EOPERATION - && msg.getEventType() == Notification.SET && msg.getNewValue() != null) { - getArguments().clear(); - getArguments().keySet().addAll(((EOperation) msg.getNewValue()).getEParameters()); - } - } - - } - - /** - * The cached value of the '{@link #getEOperation() EOperation}' - * reference. - * - * @see #getEOperation() - * @generated - * @ordered - */ - protected EOperation eOperation; - - /** - * The cached value of the '{@link #getArguments() Arguments}' map. - * - * - * @see #getArguments() - * @generated - * @ordered - */ - protected EMap arguments; - - /** - * The default value of the '{@link #getResult() Result}' attribute. - * - * - * @see #getResult() - * @generated - * @ordered - */ - protected static final Object RESULT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getResult() Result}' attribute. - * - * - * @see #getResult() - * @generated - * @ordered - */ - protected Object result = RESULT_EDEFAULT; - - /** - * - * - * @generated NOT - */ - protected EOperationInvocationImpl() { - super(); - eAdapters().add(new Adapter()); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ECPPackage.Literals.EOPERATION_INVOCATION; - } - - /** - * - * - * @generated - */ - public EOperation getEOperation() { - if (eOperation != null && eOperation.eIsProxy()) { - InternalEObject oldEOperation = (InternalEObject) eOperation; - eOperation = (EOperation) eResolveProxy(oldEOperation); - if (eOperation != oldEOperation) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, - ECPPackage.EOPERATION_INVOCATION__EOPERATION, oldEOperation, eOperation)); - } - } - return eOperation; - } - - /** - * - * - * @generated - */ - public EOperation basicGetEOperation() { - return eOperation; - } - - /** - * - * - * @generated - */ - public void setEOperation(EOperation newEOperation) { - EOperation oldEOperation = eOperation; - eOperation = newEOperation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ECPPackage.EOPERATION_INVOCATION__EOPERATION, - oldEOperation, eOperation)); - } - - /** - * - * - * @generated - */ - public EMap getArguments() { - if (arguments == null) { - arguments = new EcoreEMap(ECPPackage.Literals.EPARAMETER_TO_OBJECT_MAP_ENTRY, - EParameterToObjectMapEntryImpl.class, this, ECPPackage.EOPERATION_INVOCATION__ARGUMENTS); - } - return arguments; - } - - /** - * - * - * @generated - */ - public Object getResult() { - return result; - } - - /** - * - * - * @generated - */ - public void setResult(Object newResult) { - Object oldResult = result; - result = newResult; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ECPPackage.EOPERATION_INVOCATION__RESULT, oldResult, - result)); - } - - /** - * - * - * @generated - */ - public void execute() { - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: - return ((InternalEList) getArguments()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ECPPackage.EOPERATION_INVOCATION__EOPERATION: - if (resolve) - return getEOperation(); - return basicGetEOperation(); - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: - if (coreType) - return getArguments(); - else - return getArguments().map(); - case ECPPackage.EOPERATION_INVOCATION__RESULT: - return getResult(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ECPPackage.EOPERATION_INVOCATION__EOPERATION: - setEOperation((EOperation) newValue); - return; - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: - ((EStructuralFeature.Setting) getArguments()).set(newValue); - return; - case ECPPackage.EOPERATION_INVOCATION__RESULT: - setResult(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ECPPackage.EOPERATION_INVOCATION__EOPERATION: - setEOperation((EOperation) null); - return; - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: - getArguments().clear(); - return; - case ECPPackage.EOPERATION_INVOCATION__RESULT: - setResult(RESULT_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ECPPackage.EOPERATION_INVOCATION__EOPERATION: - return eOperation != null; - case ECPPackage.EOPERATION_INVOCATION__ARGUMENTS: - return arguments != null && !arguments.isEmpty(); - case ECPPackage.EOPERATION_INVOCATION__RESULT: - return RESULT_EDEFAULT == null ? result != null : !RESULT_EDEFAULT.equals(result); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { - switch (operationID) { - case ECPPackage.EOPERATION_INVOCATION___EXECUTE: - execute(); - return null; - } - return super.eInvoke(operationID, arguments); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (result: "); - result.append(result); - result.append(')'); - return result.toString(); - } - -} // EOperationInvocationImpl diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPAdapterFactory.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPAdapterFactory.java deleted file mode 100644 index f4edc218..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPAdapterFactory.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.util; - -import java.util.Map; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EParameter; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; - -/** - * The Adapter Factory for the model. It provides - * an adapter createXXX method for each class of the model. - * - * @see org.enterprisedomain.ecp.ECPPackage - * @generated - */ -public class ECPAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * @generated - */ - protected static ECPPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * @generated - */ - public ECPAdapterFactory() { - if (modelPackage == null) { - modelPackage = ECPPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. This implementation returns true if the - * object is either the model's package or is an instance object of the model. - * - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject) object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * @generated - */ - protected ECPSwitch modelSwitch = new ECPSwitch() { - @Override - public Adapter caseEOperationInvocation(EOperationInvocation object) { - return createEOperationInvocationAdapter(); - } - - @Override - public Adapter caseEParameterToObjectMapEntry(Map.Entry object) { - return createEParameterToObjectMapEntryAdapter(); - } - - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject) target); - } - - /** - * Creates a new adapter for an object of class - * '{@link org.enterprisedomain.ecp.EOperationInvocation EOperation - * Invocation}'. This default implementation - * returns null so that we can easily ignore cases; it's useful to ignore a case - * when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.enterprisedomain.ecp.EOperationInvocation - * @generated - */ - public Adapter createEOperationInvocationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry - * EParameter To Object Map Entry}'. This - * default implementation returns null so that we can easily ignore cases; it's - * useful to ignore a case when inheritance will catch all the cases anyway. - * - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createEParameterToObjectMapEntryAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. This - * default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} // ECPAdapterFactory diff --git a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPSwitch.java b/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPSwitch.java deleted file mode 100644 index e5a3ba55..00000000 --- a/bundles/org.enterprisedomain.ecp/src/org/enterprisedomain/ecp/util/ECPSwitch.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - */ -package org.enterprisedomain.ecp.util; - -import java.util.Map; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EParameter; -import org.eclipse.emf.ecore.util.Switch; -import org.enterprisedomain.ecp.ECPPackage; -import org.enterprisedomain.ecp.EOperationInvocation; - -/** - * The Switch for the model's inheritance - * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object and proceeding up the - * inheritance hierarchy until a non-null result is returned, which is the - * result of the switch. - * - * @see org.enterprisedomain.ecp.ECPPackage - * @generated - */ -public class ECPSwitch extends Switch { - /** - * The cached model package - * - * @generated - */ - protected static ECPPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * @generated - */ - public ECPSwitch() { - if (modelPackage == null) { - modelPackage = ECPPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * @param ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls caseXXX for each class of the model until one returns a - * non null result; it yields that result. - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ECPPackage.EOPERATION_INVOCATION: { - EOperationInvocation eOperationInvocation = (EOperationInvocation) theEObject; - T result = caseEOperationInvocation(eOperationInvocation); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case ECPPackage.EPARAMETER_TO_OBJECT_MAP_ENTRY: { - @SuppressWarnings("unchecked") - Map.Entry eParameterToObjectMapEntry = (Map.Entry) theEObject; - T result = caseEParameterToObjectMapEntry(eParameterToObjectMapEntry); - if (result == null) - result = defaultCase(theEObject); - return result; - } - default: - return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of - * 'EOperation Invocation'. This implementation - * returns null; returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of - * 'EOperation Invocation'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEOperationInvocation(EOperationInvocation object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of - * 'EParameter To Object Map Entry'. This - * implementation returns null; returning a non-null result will terminate the - * switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of - * 'EParameter To Object Map Entry'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEParameterToObjectMapEntry(Map.Entry object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of - * 'EObject'. This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last - * case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of - * 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} // ECPSwitch diff --git a/bundles/org.enterprisedomain.editor/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.editor/META-INF/MANIFEST.MF deleted file mode 100644 index 3c70519d..00000000 --- a/bundles/org.enterprisedomain.editor/META-INF/MANIFEST.MF +++ /dev/null @@ -1,54 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.enterprisedomain.editor;singleton:=true -Automatic-Module-Name: org.enterprisedomain.editor -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: . -Bundle-Activator: org.enterprisedomain.classmaker.presentation.ClassMakerEditorPlugin$Implementation -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-11 -Export-Package: org.enterprisedomain.classmaker.presentation -Require-Bundle: org.eclipse.core.runtime, - org.enterprisedomain.classmaker.edit;visibility:=reexport, - org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.core.commands;visibility:=reexport, - org.eclipse.emf.edit.ui;visibility:=reexport, - org.eclipse.emf.ecore.edit;visibility:=reexport -Import-Package: org.eclipse.emf.common.ui, - org.eclipse.emf.common.ui.action, - org.eclipse.emf.common.ui.dialogs, - org.eclipse.emf.common.ui.editor, - org.eclipse.emf.common.ui.viewer, - org.eclipse.emf.edit.ui, - org.eclipse.emf.edit.ui.action, - org.eclipse.emf.edit.ui.celleditor, - org.eclipse.emf.edit.ui.dnd, - org.eclipse.emf.edit.ui.provider, - org.eclipse.emf.edit.ui.util, - org.eclipse.emf.edit.ui.view, - org.eclipse.jface.action, - org.eclipse.jface.dialogs, - org.eclipse.jface.operation, - org.eclipse.jface.text, - org.eclipse.jface.util, - org.eclipse.jface.viewers, - org.eclipse.jface.window, - org.eclipse.jface.wizard, - org.eclipse.swt, - org.eclipse.swt.custom, - org.eclipse.swt.dnd, - org.eclipse.swt.events, - org.eclipse.swt.graphics, - org.eclipse.swt.layout, - org.eclipse.swt.widgets, - org.eclipse.ui;ui.workbench=split, - org.eclipse.ui.actions;ui.workbench=split, - org.eclipse.ui.application, - org.eclipse.ui.part;ui.workbench=split, - org.eclipse.ui.plugin, - org.eclipse.ui.views, - org.eclipse.ui.views.contentoutline, - org.eclipse.ui.views.properties;ui.views=split -Bundle-ActivationPolicy: lazy diff --git a/bundles/org.enterprisedomain.editor/plugin.properties b/bundles/org.enterprisedomain.editor/plugin.properties deleted file mode 100644 index 4a740957..00000000 --- a/bundles/org.enterprisedomain.editor/plugin.properties +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2021 Kyrill Zotkin -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -pluginName = ClassMaker Editor -providerName = www.example.org - -_UI_ClassMakerEditor_menu = &ClassMaker Editor - -_UI_CreateChild_menu_item = &New Child -_UI_CreateSibling_menu_item = N&ew Sibling - -_UI_ShowPropertiesView_menu_item = Show &Properties View -_UI_RefreshViewer_menu_item = &Refresh - -_UI_SelectionPage_label = Selection - -_UI_NoObjectSelected = Selected Nothing -_UI_SingleObjectSelected = Selected Object: {0} -_UI_MultiObjectSelected = Selected {0} Objects - -_UI_OpenEditorError_label = Open Editor - -_UI_Wizard_category = Example EMF Model Creation Wizards - -_UI_CreateModelError_message = Problems encountered in file "{0}" - -_UI_ClassMakerModelWizard_label = ClassMaker Model -_UI_ClassMakerModelWizard_description = Create a new ClassMaker model - -_UI_ClassMakerEditor_label = ClassMaker Model Editor - -_UI_ClassMakerEditorFilenameDefaultBase = My -_UI_ClassMakerEditorFilenameExtensions = domainmodel - -_UI_Wizard_label = New - -_WARN_FilenameExtension = The file name must end in ''.{0}'' -_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} - -_UI_ModelObject = &Model Object -_UI_XMLEncoding = &XML Encoding -_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 -_UI_Wizard_initial_object_description = Specify a file name and select a model object to create - -_UI_FileConflict_label = File Conflict -_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? - -_UI_ClassMakerEditorAdvisor_ActionSet_label = ClassMaker Action Set -_UI_Perspective_label = ClassMaker - -_UI_Browse_label = &Browse... -_UI_File_label = &File -_UI_Question_title = Question -_WARN_FileConflict = The file "{0}" already exists. Do you want to replace the existing file? -_UI_Error_title = Error -_WARN_No_Editor = There is no editor registered for the file "{0}". - -_UI_Application_title = ClassMaker Application -_UI_Menu_File_label = &File -_UI_Menu_New_label = &New -_UI_Menu_Open_label = &Open... -_UI_Menu_Open_description = Opens a model object file -_UI_Menu_OpenURI_label = &Open URI... -_UI_Menu_OpenURI_description = Opens a model object loading it from a URI -_UI_Menu_Edit_label = &Edit -_UI_Menu_Window_label = &Window -_UI_Menu_Help_label = &Help -_UI_Menu_About_label = ClassMaker &About... -_UI_About_title = ClassMaker Application -_UI_About_text = ClassMaker Application about box goes here. - -_UI_ClassMakerModelWizard_ActionSet_label = ClassMaker Model Action Set - diff --git a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerActionBarContributor.java b/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerActionBarContributor.java deleted file mode 100644 index 7c08ee30..00000000 --- a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerActionBarContributor.java +++ /dev/null @@ -1,575 +0,0 @@ -/** - * Copyright 2017 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.presentation; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate; -import org.eclipse.emf.common.ui.viewer.IViewerProvider; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.domain.IEditingDomainProvider; -import org.eclipse.emf.edit.ui.action.ControlAction; -import org.eclipse.emf.edit.ui.action.CreateChildAction; -import org.eclipse.emf.edit.ui.action.CreateSiblingAction; -import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; -import org.eclipse.emf.edit.ui.action.LoadResourceAction; -import org.eclipse.emf.edit.ui.action.ValidateAction; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IContributionItem; -import org.eclipse.jface.action.IContributionManager; -import org.eclipse.jface.action.IMenuListener; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.action.SubContributionItem; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PartInitException; - -/** - * This is the action bar contributor for the ClassMaker model editor. - * - * @generated - */ -public class ClassMakerActionBarContributor extends EditingDomainActionBarContributor - implements ISelectionChangedListener { - /** - * Action to create objects from the ClassMaker model. - * - * - * @generated - */ - public static class NewAction extends WorkbenchWindowActionDelegate { - /** - * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) - * - * @generated - */ - @Override - public void run(IAction action) { - ClassMakerModelWizard wizard = new ClassMakerModelWizard(); - wizard.init(getWindow().getWorkbench(), StructuredSelection.EMPTY); - WizardDialog wizardDialog = new WizardDialog(getWindow().getShell(), wizard); - wizardDialog.open(); - } - } - - /** - * This keeps track of the active editor. - * - * @generated - */ - protected IEditorPart activeEditorPart; - - /** - * This keeps track of the current selection provider. - * - * - * @generated - */ - protected ISelectionProvider selectionProvider; - - /** - * This action opens the Properties view. - * - * @generated - */ - protected IAction showPropertiesViewAction = new Action( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { - @Override - public void run() { - try { - getPage().showView("org.eclipse.ui.views.PropertySheet"); - } catch (PartInitException exception) { - ClassMakerEditorPlugin.INSTANCE.log(exception); - } - } - }; - - /** - * This action refreshes the viewer of the current editor if the editor - * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. - * - * @generated - */ - protected IAction refreshViewerAction = new Action( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { - @Override - public boolean isEnabled() { - return activeEditorPart instanceof IViewerProvider; - } - - @Override - public void run() { - if (activeEditorPart instanceof IViewerProvider) { - Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer(); - if (viewer != null) { - viewer.refresh(); - } - } - } - }; - - /** - * This will contain one - * {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to - * each descriptor generated for the current selection by the item provider. - * - * - * @generated - */ - protected Collection createChildActions; - - /** - * This will contain a map of - * {@link org.eclipse.emf.edit.ui.action.CreateChildAction}s, keyed by sub-menu - * text. - * - * @generated - */ - protected Map> createChildSubmenuActions; - - /** - * This is the menu manager into which menu contribution items should be added - * for CreateChild actions. - * - * @generated - */ - protected IMenuManager createChildMenuManager; - - /** - * This will contain one - * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to - * each descriptor generated for the current selection by the item provider. - * - * - * @generated - */ - protected Collection createSiblingActions; - - /** - * This will contain a map of - * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction}s, keyed by submenu - * text. - * - * @generated - */ - protected Map> createSiblingSubmenuActions; - - /** - * This is the menu manager into which menu contribution items should be added - * for CreateSibling actions. - * - * @generated - */ - protected IMenuManager createSiblingMenuManager; - - /** - * This creates an instance of the contributor. - * - * @generated - */ - public ClassMakerActionBarContributor() { - super(ADDITIONS_LAST_STYLE); - loadResourceAction = new LoadResourceAction(); - validateAction = new ValidateAction(); - controlAction = new ControlAction(); - } - - /** - * This adds Separators for editor additions to the tool bar. - * - * @generated - */ - @Override - public void contributeToToolBar(IToolBarManager toolBarManager) { - super.contributeToToolBar(toolBarManager); - toolBarManager.add(new Separator("classmaker-settings")); - toolBarManager.add(new Separator("classmaker-additions")); - } - - /** - * This adds to the menu bar a menu and some separators for editor additions, as - * well as the sub-menus for object creation items. - * - * @generated - */ - @Override - public void contributeToMenu(IMenuManager menuManager) { - super.contributeToMenu(menuManager); - - IMenuManager submenuManager = new MenuManager( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_ClassMakerEditor_menu"), - "org.enterprisedomain.classmakerMenuID"); - menuManager.insertAfter("additions", submenuManager); - submenuManager.add(new Separator("settings")); - submenuManager.add(new Separator("actions")); - submenuManager.add(new Separator("additions")); - submenuManager.add(new Separator("additions-end")); - - // Prepare for CreateChild item addition or removal. - // - createChildMenuManager = new MenuManager( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - submenuManager.insertBefore("additions", createChildMenuManager); - - // Prepare for CreateSibling item addition or removal. - // - createSiblingMenuManager = new MenuManager( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - submenuManager.insertBefore("additions", createSiblingMenuManager); - - // Force an update because Eclipse hides empty menus now. - // - submenuManager.addMenuListener(new IMenuListener() { - @Override - public void menuAboutToShow(IMenuManager menuManager) { - menuManager.updateAll(true); - } - }); - - addGlobalActions(submenuManager); - } - - /** - * When the active editor changes, this remembers the change and registers with - * it as a selection provider. - * - * @generated - */ - @Override - public void setActiveEditor(IEditorPart part) { - super.setActiveEditor(part); - activeEditorPart = part; - - // Switch to the new selection provider. - // - if (selectionProvider != null) { - selectionProvider.removeSelectionChangedListener(this); - } - if (part == null) { - selectionProvider = null; - } else { - selectionProvider = part.getSite().getSelectionProvider(); - selectionProvider.addSelectionChangedListener(this); - - // Fake a selection changed event to update the menus. - // - if (selectionProvider.getSelection() != null) { - selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); - } - } - } - - /** - * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, - * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying - * for the children and siblings that can be added to the selected object and - * updating the menus accordingly. - * - * @generated - */ - @Override - public void selectionChanged(SelectionChangedEvent event) { - // Remove any menu items for old selection. - // - if (createChildMenuManager != null) { - depopulateManager(createChildMenuManager, createChildSubmenuActions); - depopulateManager(createChildMenuManager, createChildActions); - } - if (createSiblingMenuManager != null) { - depopulateManager(createSiblingMenuManager, createSiblingSubmenuActions); - depopulateManager(createSiblingMenuManager, createSiblingActions); - } - - // Query the new selection for appropriate new child/sibling descriptors - // - Collection newChildDescriptors = null; - Collection newSiblingDescriptors = null; - - ISelection selection = event.getSelection(); - if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) { - Object object = ((IStructuredSelection) selection).getFirstElement(); - - EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain(); - - newChildDescriptors = domain.getNewChildDescriptors(object, null); - newSiblingDescriptors = domain.getNewChildDescriptors(null, object); - } - - // Generate actions for selection; populate and redraw the menus. - // - createChildActions = generateCreateChildActions(newChildDescriptors, selection); - createChildSubmenuActions = extractSubmenuActions(createChildActions); - createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); - createSiblingSubmenuActions = extractSubmenuActions(createSiblingActions); - - if (createChildMenuManager != null) { - populateManager(createChildMenuManager, createChildSubmenuActions, null); - populateManager(createChildMenuManager, createChildActions, null); - createChildMenuManager.update(true); - } - if (createSiblingMenuManager != null) { - populateManager(createSiblingMenuManager, createSiblingSubmenuActions, null); - populateManager(createSiblingMenuManager, createSiblingActions, null); - createSiblingMenuManager.update(true); - } - } - - /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for - * each object in descriptors, and returns the collection of these - * actions. - * - * @generated - */ - protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { - Collection actions = new ArrayList(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } - - /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} - * for each object in descriptors, and returns the collection of - * these actions. - * - * @generated - */ - protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { - Collection actions = new ArrayList(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } - - /** - * This populates the specified manager with - * {@link org.eclipse.jface.action.ActionContributionItem}s based on the - * {@link org.eclipse.jface.action.IAction}s contained in the - * actions collection, by inserting them before the specified - * contribution item contributionID. If contributionID - * is null, they are simply added. - * - * @generated - */ - protected void populateManager(IContributionManager manager, Collection actions, - String contributionID) { - if (actions != null) { - for (IAction action : actions) { - if (contributionID != null) { - manager.insertBefore(contributionID, action); - } else { - manager.add(action); - } - } - } - } - - /** - * This removes from the specified manager all - * {@link org.eclipse.jface.action.ActionContributionItem}s based on the - * {@link org.eclipse.jface.action.IAction}s contained in the - * actions collection. - * - * @generated - */ - protected void depopulateManager(IContributionManager manager, Collection actions) { - if (actions != null) { - IContributionItem[] items = manager.getItems(); - for (int i = 0; i < items.length; i++) { - // Look into SubContributionItems - // - IContributionItem contributionItem = items[i]; - while (contributionItem instanceof SubContributionItem) { - contributionItem = ((SubContributionItem) contributionItem).getInnerItem(); - } - - // Delete the ActionContributionItems with matching action. - // - if (contributionItem instanceof ActionContributionItem) { - IAction action = ((ActionContributionItem) contributionItem).getAction(); - if (actions.contains(action)) { - manager.remove(contributionItem); - } - } - } - } - } - - /** - * This extracts those actions in the submenuActions collection - * whose text is qualified and returns a map of these actions, keyed by submenu - * text. - * - * @generated - */ - protected Map> extractSubmenuActions(Collection createActions) { - Map> createSubmenuActions = new LinkedHashMap>(); - if (createActions != null) { - for (Iterator actions = createActions.iterator(); actions.hasNext();) { - IAction action = actions.next(); - StringTokenizer st = new StringTokenizer(action.getText(), "|"); - if (st.countTokens() == 2) { - String text = st.nextToken().trim(); - Collection submenuActions = createSubmenuActions.get(text); - if (submenuActions == null) { - createSubmenuActions.put(text, submenuActions = new ArrayList()); - } - action.setText(st.nextToken().trim()); - submenuActions.add(action); - actions.remove(); - } - } - } - return createSubmenuActions; - } - - /** - * This populates the specified manager with - * {@link org.eclipse.jface.action.MenuManager}s containing - * {@link org.eclipse.jface.action.ActionContributionItem}s based on the - * {@link org.eclipse.jface.action.IAction}s contained in the - * submenuActions collection, by inserting them before the - * specified contribution item contributionID. If - * contributionID is null, they are simply added. - * - * @generated - */ - protected void populateManager(IContributionManager manager, Map> submenuActions, - String contributionID) { - if (submenuActions != null) { - for (Map.Entry> entry : submenuActions.entrySet()) { - MenuManager submenuManager = new MenuManager(entry.getKey()); - if (contributionID != null) { - manager.insertBefore(contributionID, submenuManager); - } else { - manager.add(submenuManager); - } - populateManager(submenuManager, entry.getValue(), null); - } - } - } - - /** - * This removes from the specified manager all - * {@link org.eclipse.jface.action.MenuManager}s and their - * {@link org.eclipse.jface.action.ActionContributionItem}s based on the - * {@link org.eclipse.jface.action.IAction}s contained in the - * submenuActions map. - * - * @generated - */ - protected void depopulateManager(IContributionManager manager, Map> submenuActions) { - if (submenuActions != null) { - IContributionItem[] items = manager.getItems(); - for (int i = 0; i < items.length; i++) { - IContributionItem contributionItem = items[i]; - if (contributionItem instanceof MenuManager) { - MenuManager submenuManager = (MenuManager) contributionItem; - if (submenuActions.containsKey(submenuManager.getMenuText())) { - depopulateManager(submenuManager, submenuActions.get(submenuManager.getMenuText())); - manager.remove(contributionItem); - } - } - } - } - } - - /** - * This populates the pop-up menu before it appears. - * - * - * @generated - */ - @Override - public void menuAboutToShow(IMenuManager menuManager) { - super.menuAboutToShow(menuManager); - MenuManager submenuManager = null; - - submenuManager = new MenuManager(ClassMakerEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - populateManager(submenuManager, createChildSubmenuActions, null); - populateManager(submenuManager, createChildActions, null); - menuManager.insertBefore("edit", submenuManager); - - submenuManager = new MenuManager(ClassMakerEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - populateManager(submenuManager, createSiblingSubmenuActions, null); - populateManager(submenuManager, createSiblingActions, null); - menuManager.insertBefore("edit", submenuManager); - } - - /** - * This inserts global actions before the "additions-end" separator. - * - * @generated - */ - @Override - protected void addGlobalActions(IMenuManager menuManager) { - menuManager.insertAfter("additions-end", new Separator("ui-actions")); - menuManager.insertAfter("ui-actions", showPropertiesViewAction); - - refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); - menuManager.insertAfter("ui-actions", refreshViewerAction); - - super.addGlobalActions(menuManager); - } - - /** - * This ensures that a delete action will clean up all references to deleted - * objects. - * - * @generated - */ - @Override - protected boolean removeAllReferencesOnDelete() { - return true; - } - -} diff --git a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditor.java b/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditor.java deleted file mode 100644 index ede40cae..00000000 --- a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditor.java +++ /dev/null @@ -1,1401 +0,0 @@ -/** - * Copyright 2017 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.presentation; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.EventObject; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.common.command.BasicCommandStack; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.command.CommandStackListener; -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.ui.URIEditorInput; -import org.eclipse.emf.common.ui.editor.ProblemEditorPart; -import org.eclipse.emf.common.ui.viewer.IViewerProvider; -import org.eclipse.emf.common.util.BasicDiagnostic; -import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EContentAdapter; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; -import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.emf.edit.domain.IEditingDomainProvider; -import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; -import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; -import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; -import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; -import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; -import org.eclipse.emf.edit.ui.dnd.LocalTransfer; -import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; -import org.eclipse.emf.edit.ui.util.EditUIUtil; -import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; -import org.eclipse.jface.action.IMenuListener; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IStatusLineManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.jface.util.LocalSelectionTransfer; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.StructuredViewer; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CTabFolder; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.FileTransfer; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.events.ControlAdapter; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.IPartListener; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.MultiPageEditorPart; -import org.eclipse.ui.views.contentoutline.ContentOutline; -import org.eclipse.ui.views.contentoutline.ContentOutlinePage; -import org.eclipse.ui.views.contentoutline.IContentOutlinePage; -import org.eclipse.ui.views.properties.IPropertySheetPage; -import org.eclipse.ui.views.properties.PropertySheet; -import org.eclipse.ui.views.properties.PropertySheetPage; -import org.enterprisedomain.classmaker.provider.ClassMakerItemProviderAdapterFactory; - -/** - * This is an example of a ClassMaker model editor. - * - * @generated - */ -public class ClassMakerEditor extends MultiPageEditorPart - implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider { - /** - * The filters for file extensions supported by the editor. - * - * @generated - */ - public static final List FILE_EXTENSION_FILTERS = prefixExtensions(ClassMakerModelWizard.FILE_EXTENSIONS, - "*."); - - /** - * Returns a new unmodifiable list containing prefixed versions of the - * extensions in the given list. - * - * @generated - */ - private static List prefixExtensions(List extensions, String prefix) { - List result = new ArrayList(); - for (String extension : extensions) { - result.add(prefix + extension); - } - return Collections.unmodifiableList(result); - } - - /** - * This keeps track of the editing domain that is used to track all changes to - * the model. - * - * @generated - */ - protected AdapterFactoryEditingDomain editingDomain; - - /** - * This is the one adapter factory used for providing views of the model. - * - * @generated - */ - protected ComposedAdapterFactory adapterFactory; - - /** - * This is the content outline page. - * - * @generated - */ - protected IContentOutlinePage contentOutlinePage; - - /** - * This is a kludge... - * - * @generated - */ - protected IStatusLineManager contentOutlineStatusLineManager; - - /** - * This is the content outline page's viewer. - * - * @generated - */ - protected TreeViewer contentOutlineViewer; - - /** - * This is the property sheet page. - * - * @generated - */ - protected List propertySheetPages = new ArrayList(); - - /** - * This is the viewer that shadows the selection in the content outline. The - * parent relation must be correctly defined for this to work. - * - * @generated - */ - protected TreeViewer selectionViewer; - - /** - * This keeps track of the active content viewer, which may be either one of the - * viewers in the pages or the content outline viewer. - * - * - * @generated - */ - protected Viewer currentViewer; - - /** - * This listens to which ever viewer is active. - * - * @generated - */ - protected ISelectionChangedListener selectionChangedListener; - - /** - * This keeps track of all the - * {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are - * listening to this editor. - * - * @generated - */ - protected Collection selectionChangedListeners = new ArrayList(); - - /** - * This keeps track of the selection of the editor as a whole. - * - * @generated - */ - protected ISelection editorSelection = StructuredSelection.EMPTY; - - /** - * This listens for when the outline becomes active - * - * @generated - */ - protected IPartListener partListener = new IPartListener() { - @Override - public void partActivated(IWorkbenchPart p) { - if (p instanceof ContentOutline) { - if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) { - getActionBarContributor().setActiveEditor(ClassMakerEditor.this); - - setCurrentViewer(contentOutlineViewer); - } - } else if (p instanceof PropertySheet) { - if (propertySheetPages.contains(((PropertySheet) p).getCurrentPage())) { - getActionBarContributor().setActiveEditor(ClassMakerEditor.this); - handleActivate(); - } - } else if (p == ClassMakerEditor.this) { - handleActivate(); - } - } - - @Override - public void partBroughtToTop(IWorkbenchPart p) { - // Ignore. - } - - @Override - public void partClosed(IWorkbenchPart p) { - // Ignore. - } - - @Override - public void partDeactivated(IWorkbenchPart p) { - // Ignore. - } - - @Override - public void partOpened(IWorkbenchPart p) { - // Ignore. - } - }; - - /** - * Resources that have been removed since last activation. - * - * @generated - */ - protected Collection removedResources = new ArrayList(); - - /** - * Resources that have been changed since last activation. - * - * @generated - */ - protected Collection changedResources = new ArrayList(); - - /** - * Resources that have been saved. - * - * @generated - */ - protected Collection savedResources = new ArrayList(); - - /** - * Map to store the diagnostic associated with a resource. - * - * @generated - */ - protected Map resourceToDiagnosticMap = new LinkedHashMap(); - - /** - * Controls whether the problem indication should be updated. - * - * @generated - */ - protected boolean updateProblemIndication = true; - - /** - * Adapter used to update the problem indication when resources are demanded - * loaded. - * - * @generated - */ - protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { - protected boolean dispatching; - - @Override - public void notifyChanged(Notification notification) { - if (notification.getNotifier() instanceof Resource) { - switch (notification.getFeatureID(Resource.class)) { - case Resource.RESOURCE__IS_LOADED: - case Resource.RESOURCE__ERRORS: - case Resource.RESOURCE__WARNINGS: { - Resource resource = (Resource) notification.getNotifier(); - Diagnostic diagnostic = analyzeResourceProblems(resource, null); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, diagnostic); - } else { - resourceToDiagnosticMap.remove(resource); - } - dispatchUpdateProblemIndication(); - break; - } - } - } else { - super.notifyChanged(notification); - } - } - - protected void dispatchUpdateProblemIndication() { - if (updateProblemIndication && !dispatching) { - dispatching = true; - getSite().getShell().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - dispatching = false; - updateProblemIndication(); - } - }); - } - } - - @Override - protected void setTarget(Resource target) { - basicSetTarget(target); - } - - @Override - protected void unsetTarget(Resource target) { - basicUnsetTarget(target); - resourceToDiagnosticMap.remove(target); - dispatchUpdateProblemIndication(); - } - }; - - /** - * Handles activation of the editor or it's associated views. - * - * @generated - */ - protected void handleActivate() { - // Recompute the read only state. - // - if (editingDomain.getResourceToReadOnlyMap() != null) { - editingDomain.getResourceToReadOnlyMap().clear(); - - // Refresh any actions that may become enabled or disabled. - // - setSelection(getSelection()); - } - - if (!removedResources.isEmpty()) { - if (handleDirtyConflict()) { - getSite().getPage().closeEditor(ClassMakerEditor.this, false); - } else { - removedResources.clear(); - changedResources.clear(); - savedResources.clear(); - } - } else if (!changedResources.isEmpty()) { - changedResources.removeAll(savedResources); - handleChangedResources(); - changedResources.clear(); - savedResources.clear(); - } - } - - /** - * Handles what to do with changed resources on activation. - * - * @generated - */ - protected void handleChangedResources() { - if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { - ResourceSet resourceSet = editingDomain.getResourceSet(); - if (isDirty()) { - changedResources.addAll(resourceSet.getResources()); - } - editingDomain.getCommandStack().flush(); - - updateProblemIndication = false; - for (Resource resource : changedResources) { - if (resource.isLoaded()) { - resource.unload(); - try { - resource.load(resourceSet.getLoadOptions()); - } catch (IOException exception) { - if (!resourceToDiagnosticMap.containsKey(resource)) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - } - } - } - - if (AdapterFactoryEditingDomain.isStale(editorSelection)) { - setSelection(StructuredSelection.EMPTY); - } - - updateProblemIndication = true; - updateProblemIndication(); - } - } - - /** - * Updates the problems indication with the information described in the - * specified diagnostic. - * - * @generated - */ - protected void updateProblemIndication() { - if (updateProblemIndication) { - BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.enterprisedomain.editor", 0, null, - new Object[] { editingDomain.getResourceSet() }); - for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { - if (childDiagnostic.getSeverity() != Diagnostic.OK) { - diagnostic.add(childDiagnostic); - } - } - - int lastEditorPage = getPageCount() - 1; - if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { - ((ProblemEditorPart) getEditor(lastEditorPage)).setDiagnostic(diagnostic); - if (diagnostic.getSeverity() != Diagnostic.OK) { - setActivePage(lastEditorPage); - } - } else if (diagnostic.getSeverity() != Diagnostic.OK) { - ProblemEditorPart problemEditorPart = new ProblemEditorPart(); - problemEditorPart.setDiagnostic(diagnostic); - try { - addPage(++lastEditorPage, problemEditorPart, getEditorInput()); - setPageText(lastEditorPage, problemEditorPart.getPartName()); - setActivePage(lastEditorPage); - showTabs(); - } catch (PartInitException exception) { - ClassMakerEditorPlugin.INSTANCE.log(exception); - } - } - } - } - - /** - * Shows a dialog that asks if conflicting changes should be discarded. - * - * @generated - */ - protected boolean handleDirtyConflict() { - return MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"), - getString("_WARN_FileConflict")); - } - - /** - * This creates a model editor. - * - * @generated - */ - public ClassMakerEditor() { - super(); - initializeEditingDomain(); - } - - /** - * This sets up the editing domain for the model editor. - * - * - * @generated - */ - protected void initializeEditingDomain() { - // Create an adapter factory that yields item providers. - // - adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - - adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ClassMakerItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - - // Create the command stack that will notify this editor as commands are - // executed. - // - BasicCommandStack commandStack = new BasicCommandStack(); - - // Add a listener to set the most recent command's affected objects to be the - // selection of the viewer with focus. - // - commandStack.addCommandStackListener(new CommandStackListener() { - @Override - public void commandStackChanged(final EventObject event) { - getContainer().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - firePropertyChange(IEditorPart.PROP_DIRTY); - - // Try to select the affected objects. - // - Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand(); - if (mostRecentCommand != null) { - setSelectionToViewer(mostRecentCommand.getAffectedObjects()); - } - for (Iterator i = propertySheetPages.iterator(); i.hasNext();) { - PropertySheetPage propertySheetPage = i.next(); - if (propertySheetPage.getControl() == null || propertySheetPage.getControl().isDisposed()) { - i.remove(); - } else { - propertySheetPage.refresh(); - } - } - } - }); - } - }); - - // Create the editing domain with a special command stack. - // - editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); - } - - /** - * This is here for the listener to be able to call it. - * - * - * @generated - */ - @Override - protected void firePropertyChange(int action) { - super.firePropertyChange(action); - } - - /** - * This sets the selection into whichever viewer is active. - * - * @generated - */ - public void setSelectionToViewer(Collection collection) { - final Collection theSelection = collection; - // Make sure it's okay. - // - if (theSelection != null && !theSelection.isEmpty()) { - Runnable runnable = new Runnable() { - @Override - public void run() { - // Try to select the items in the current content viewer of the editor. - // - if (currentViewer != null) { - currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); - } - } - }; - getSite().getShell().getDisplay().asyncExec(runnable); - } - } - - /** - * This returns the editing domain as required by the - * {@link IEditingDomainProvider} interface. This is important for implementing - * the static methods of {@link AdapterFactoryEditingDomain} and for supporting - * {@link org.eclipse.emf.edit.ui.action.CommandAction}. - * - * - * @generated - */ - @Override - public EditingDomain getEditingDomain() { - return editingDomain; - } - - /** - * - * - * @generated - */ - public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { - /** - * - * - * @generated - */ - public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * - * - * @generated - */ - @Override - public Object[] getElements(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } - - /** - * - * - * @generated - */ - @Override - public Object[] getChildren(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } - - /** - * - * - * @generated - */ - @Override - public boolean hasChildren(Object object) { - Object parent = super.getParent(object); - return parent != null; - } - - /** - * - * - * @generated - */ - @Override - public Object getParent(Object object) { - return null; - } - } - - /** - * This makes sure that one content viewer, either for the current page or the - * outline view, if it has focus, is the current one. - * - * - * @generated - */ - public void setCurrentViewer(Viewer viewer) { - // If it is changing... - // - if (currentViewer != viewer) { - if (selectionChangedListener == null) { - // Create the listener on demand. - // - selectionChangedListener = new ISelectionChangedListener() { - // This just notifies those things that are affected by the section. - // - @Override - public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { - setSelection(selectionChangedEvent.getSelection()); - } - }; - } - - // Stop listening to the old one. - // - if (currentViewer != null) { - currentViewer.removeSelectionChangedListener(selectionChangedListener); - } - - // Start listening to the new one. - // - if (viewer != null) { - viewer.addSelectionChangedListener(selectionChangedListener); - } - - // Remember it. - // - currentViewer = viewer; - - // Set the editors selection based on the current viewer's selection. - // - setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); - } - } - - /** - * This returns the viewer as required by the {@link IViewerProvider} interface. - * - * - * @generated - */ - @Override - public Viewer getViewer() { - return currentViewer; - } - - /** - * This creates a context menu for the viewer and adds a listener as well - * registering the menu for extension. - * - * @generated - */ - protected void createContextMenuFor(StructuredViewer viewer) { - MenuManager contextMenu = new MenuManager("#PopUp"); - contextMenu.add(new Separator("additions")); - contextMenu.setRemoveAllWhenShown(true); - contextMenu.addMenuListener(this); - Menu menu = contextMenu.createContextMenu(viewer.getControl()); - viewer.getControl().setMenu(menu); - getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); - - int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; - Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), - FileTransfer.getInstance() }; - viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); - viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); - } - - /** - * This is the method called to load a resource into the editing domain's - * resource set based on the editor's input. - * - * @generated - */ - public void createModel() { - URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); - Exception exception = null; - Resource resource = null; - try { - // Load the resource through the editing domain. - // - resource = editingDomain.getResourceSet().getResource(resourceURI, true); - } catch (Exception e) { - exception = e; - resource = editingDomain.getResourceSet().getResource(resourceURI, false); - } - - Diagnostic diagnostic = analyzeResourceProblems(resource, exception); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); - } - - /** - * Returns a diagnostic describing the errors and warnings listed in the - * resource and the specified exception (if any). - * - * @generated - */ - public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { - boolean hasErrors = !resource.getErrors().isEmpty(); - if (hasErrors || !resource.getWarnings().isEmpty()) { - BasicDiagnostic basicDiagnostic = new BasicDiagnostic(hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, - "org.enterprisedomain.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), - new Object[] { exception == null ? (Object) resource : exception }); - basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); - return basicDiagnostic; - } else if (exception != null) { - return new BasicDiagnostic(Diagnostic.ERROR, "org.enterprisedomain.editor", 0, - getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); - } else { - return Diagnostic.OK_INSTANCE; - } - } - - /** - * This is the method used by the framework to install your own controls. - * - * @generated - */ - @Override - public void createPages() { - // Creates the model from the editor input - // - createModel(); - - // Only creates the other pages if there is something that can be edited - // - if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { - // Create a page for the selection tree view. - // - Tree tree = new Tree(getContainer(), SWT.MULTI); - selectionViewer = new TreeViewer(tree); - setCurrentViewer(selectionViewer); - - selectionViewer.setUseHashlookup(true); - selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - selectionViewer.setInput(editingDomain.getResourceSet()); - selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), - true); - - new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); - - createContextMenuFor(selectionViewer); - int pageIndex = addPage(tree); - setPageText(pageIndex, getString("_UI_SelectionPage_label")); - - getSite().getShell().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - if (!getContainer().isDisposed()) { - setActivePage(0); - } - } - }); - } - - // Ensures that this editor will only display the page's tab - // area if there are more than one page - // - getContainer().addControlListener(new ControlAdapter() { - boolean guard = false; - - @Override - public void controlResized(ControlEvent event) { - if (!guard) { - guard = true; - hideTabs(); - guard = false; - } - } - }); - - getSite().getShell().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - updateProblemIndication(); - } - }); - } - - /** - * If there is just one page in the multi-page editor part, this hides the - * single tab at the bottom. - * - * @generated - */ - protected void hideTabs() { - if (getPageCount() <= 1) { - setPageText(0, ""); - if (getContainer() instanceof CTabFolder) { - Point point = getContainer().getSize(); - Rectangle clientArea = getContainer().getClientArea(); - getContainer().setSize(point.x, 2 * point.y - clientArea.height - clientArea.y); - } - } - } - - /** - * If there is more than one page in the multi-page editor part, this shows the - * tabs at the bottom. - * - * @generated - */ - protected void showTabs() { - if (getPageCount() > 1) { - setPageText(0, getString("_UI_SelectionPage_label")); - if (getContainer() instanceof CTabFolder) { - Point point = getContainer().getSize(); - Rectangle clientArea = getContainer().getClientArea(); - getContainer().setSize(point.x, clientArea.height + clientArea.y); - } - } - } - - /** - * This is used to track the active viewer. - * - * @generated - */ - @Override - protected void pageChange(int pageIndex) { - super.pageChange(pageIndex); - - if (contentOutlinePage != null) { - handleContentOutlineSelection(contentOutlinePage.getSelection()); - } - } - - /** - * This is how the framework determines which interfaces we implement. - * - * @generated - */ - @SuppressWarnings("rawtypes") - @Override - public T getAdapter(Class key) { - if (key.equals(IContentOutlinePage.class)) { - return showOutlineView() ? key.cast(getContentOutlinePage()) : null; - } else if (key.equals(IPropertySheetPage.class)) { - return key.cast(getPropertySheetPage()); - } else { - return super.getAdapter(key); - } - } - - /** - * This accesses a cached version of the content outliner. - * - * @generated - */ - public IContentOutlinePage getContentOutlinePage() { - if (contentOutlinePage == null) { - // The content outline is just a tree. - // - class MyContentOutlinePage extends ContentOutlinePage { - @Override - public void createControl(Composite parent) { - super.createControl(parent); - contentOutlineViewer = getTreeViewer(); - contentOutlineViewer.addSelectionChangedListener(this); - - // Set up the tree viewer. - // - contentOutlineViewer.setUseHashlookup(true); - contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - contentOutlineViewer.setInput(editingDomain.getResourceSet()); - - // Make sure our popups work. - // - createContextMenuFor(contentOutlineViewer); - - if (!editingDomain.getResourceSet().getResources().isEmpty()) { - // Select the root object in the view. - // - contentOutlineViewer.setSelection( - new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); - } - } - - @Override - public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, - IStatusLineManager statusLineManager) { - super.makeContributions(menuManager, toolBarManager, statusLineManager); - contentOutlineStatusLineManager = statusLineManager; - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - } - - contentOutlinePage = new MyContentOutlinePage(); - - // Listen to selection so that we can handle it is a special way. - // - contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() { - // This ensures that we handle selections correctly. - // - @Override - public void selectionChanged(SelectionChangedEvent event) { - handleContentOutlineSelection(event.getSelection()); - } - }); - } - - return contentOutlinePage; - } - - /** - * This accesses a cached version of the property sheet. - * - * - * @generated - */ - public IPropertySheetPage getPropertySheetPage() { - PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain, - ExtendedPropertySheetPage.Decoration.NONE, null, 0, false) { - @Override - public void setSelectionToViewer(List selection) { - ClassMakerEditor.this.setSelectionToViewer(selection); - ClassMakerEditor.this.setFocus(); - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - }; - propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); - propertySheetPages.add(propertySheetPage); - - return propertySheetPage; - } - - /** - * This deals with how we want selection in the outliner to affect the other - * views. - * - * @generated - */ - public void handleContentOutlineSelection(ISelection selection) { - if (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { - Iterator selectedElements = ((IStructuredSelection) selection).iterator(); - if (selectedElements.hasNext()) { - // Get the first selected element. - // - Object selectedElement = selectedElements.next(); - - ArrayList selectionList = new ArrayList(); - selectionList.add(selectedElement); - while (selectedElements.hasNext()) { - selectionList.add(selectedElements.next()); - } - - // Set the selection to the widget. - // - selectionViewer.setSelection(new StructuredSelection(selectionList)); - } - } - } - - /** - * This is for implementing {@link IEditorPart} and simply tests the command - * stack. - * - * @generated - */ - @Override - public boolean isDirty() { - return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded(); - } - - /** - * This is for implementing {@link IEditorPart} and simply saves the model file. - * - * - * @generated - */ - @Override - public void doSave(IProgressMonitor progressMonitor) { - // Save only resources that have actually changed. - // - final Map saveOptions = new HashMap(); - saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); - saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); - - // Do the work within an operation because this is a long running activity that - // modifies the workbench. - // - IRunnableWithProgress operation = new IRunnableWithProgress() { - // This is the method that gets invoked when the operation runs. - // - @Override - public void run(IProgressMonitor monitor) { - // Save the resources to the file system. - // - boolean first = true; - List resources = editingDomain.getResourceSet().getResources(); - for (int i = 0; i < resources.size(); ++i) { - Resource resource = resources.get(i); - if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) - && !editingDomain.isReadOnly(resource)) { - try { - long timeStamp = resource.getTimeStamp(); - resource.save(saveOptions); - if (resource.getTimeStamp() != timeStamp) { - savedResources.add(resource); - } - } catch (Exception exception) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - first = false; - } - } - } - }; - - updateProblemIndication = false; - try { - // This runs the options, and shows progress. - // - new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); - - // Refresh the necessary state. - // - ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone(); - firePropertyChange(IEditorPart.PROP_DIRTY); - } catch (Exception exception) { - // Something went wrong that shouldn't. - // - ClassMakerEditorPlugin.INSTANCE.log(exception); - } - updateProblemIndication = true; - updateProblemIndication(); - } - - /** - * This returns whether something has been persisted to the URI of the specified - * resource. The implementation uses the URI converter from the editor's - * resource set to try to open an input stream. - * - * @generated - */ - protected boolean isPersisted(Resource resource) { - boolean result = false; - try { - InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); - if (stream != null) { - result = true; - stream.close(); - } - } catch (IOException e) { - // Ignore - } - return result; - } - - /** - * This always returns true because it is not currently supported. - * - * @generated - */ - @Override - public boolean isSaveAsAllowed() { - return true; - } - - /** - * This also changes the editor's input. - * - * @generated - */ - @Override - public void doSaveAs() { - String[] filters = FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]); - String[] files = ClassMakerEditorAdvisor.openFilePathDialog(getSite().getShell(), SWT.SAVE, filters); - if (files.length > 0) { - URI uri = URI.createFileURI(files[0]); - doSaveAs(uri, new URIEditorInput(uri)); - } - } - - /** - * - * - * @generated - */ - protected void doSaveAs(URI uri, IEditorInput editorInput) { - (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null - ? getActionBars().getStatusLineManager().getProgressMonitor() - : new NullProgressMonitor(); - doSave(progressMonitor); - } - - /** - * This is called during startup. - * - * @generated - */ - @Override - public void init(IEditorSite site, IEditorInput editorInput) { - setSite(site); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - site.setSelectionProvider(this); - site.getPage().addPartListener(partListener); - } - - /** - * - * - * @generated - */ - @Override - public void setFocus() { - getControl(getActivePage()).setFocus(); - } - - /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * - * @generated - */ - @Override - public void addSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.add(listener); - } - - /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * - * @generated - */ - @Override - public void removeSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.remove(listener); - } - - /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to - * return this editor's overall selection. - * - * @generated - */ - @Override - public ISelection getSelection() { - return editorSelection; - } - - /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set - * this editor's overall selection. Calling this result will notify the - * listeners. - * - * @generated - */ - @Override - public void setSelection(ISelection selection) { - editorSelection = selection; - - for (ISelectionChangedListener listener : selectionChangedListeners) { - listener.selectionChanged(new SelectionChangedEvent(this, selection)); - } - setStatusLineManager(selection); - } - - /** - * - * - * @generated - */ - public void setStatusLineManager(ISelection selection) { - IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer - ? contentOutlineStatusLineManager - : getActionBars().getStatusLineManager(); - - if (statusLineManager != null) { - if (selection instanceof IStructuredSelection) { - Collection collection = ((IStructuredSelection) selection).toList(); - switch (collection.size()) { - case 0: { - statusLineManager.setMessage(getString("_UI_NoObjectSelected")); - break; - } - case 1: { - String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); - statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); - break; - } - default: { - statusLineManager - .setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); - break; - } - } - } else { - statusLineManager.setMessage(""); - } - } - } - - /** - * This looks up a string in the plugin's plugin.properties file. - * - * @generated - */ - private static String getString(String key) { - return ClassMakerEditorPlugin.INSTANCE.getString(key); - } - - /** - * This looks up a string in plugin.properties, making a substitution. - * - * @generated - */ - private static String getString(String key, Object s1) { - return ClassMakerEditorPlugin.INSTANCE.getString(key, new Object[] { s1 }); - } - - /** - * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill - * the context menus with contributions from the Edit menu. - * - * @generated - */ - @Override - public void menuAboutToShow(IMenuManager menuManager) { - ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); - } - - /** - * - * - * @generated - */ - public EditingDomainActionBarContributor getActionBarContributor() { - return (EditingDomainActionBarContributor) getEditorSite().getActionBarContributor(); - } - - /** - * - * - * @generated - */ - public IActionBars getActionBars() { - return getActionBarContributor().getActionBars(); - } - - /** - * - * - * @generated - */ - public AdapterFactory getAdapterFactory() { - return adapterFactory; - } - - /** - * - * - * @generated - */ - @Override - public void dispose() { - updateProblemIndication = false; - - getSite().getPage().removePartListener(partListener); - - adapterFactory.dispose(); - - if (getActionBarContributor().getActiveEditor() == this) { - getActionBarContributor().setActiveEditor(null); - } - - for (PropertySheetPage propertySheetPage : propertySheetPages) { - propertySheetPage.dispose(); - } - - if (contentOutlinePage != null) { - contentOutlinePage.dispose(); - } - - super.dispose(); - } - - /** - * Returns whether the outline view should be presented to the user. - * - * @generated - */ - protected boolean showOutlineView() { - return false; - } -} diff --git a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorAdvisor.java b/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorAdvisor.java deleted file mode 100644 index 7508c4a0..00000000 --- a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorAdvisor.java +++ /dev/null @@ -1,553 +0,0 @@ -/** - * Copyright 2017 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.presentation; - -import java.io.File; -import java.util.Arrays; - -import org.eclipse.emf.common.ui.URIEditorInput; -import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.edit.ui.action.LoadResourceAction; -import org.eclipse.emf.edit.ui.util.EditUIUtil; -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.jface.action.GroupMarker; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorDescriptor; -import org.eclipse.ui.IFolderLayout; -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.actions.ContributionItemFactory; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -/** - * Customized {@link WorkbenchAdvisor} for the RCP application. - * - * @generated - */ -public final class ClassMakerEditorAdvisor extends WorkbenchAdvisor { - /** - * The default file extension filters for use in dialogs. - * - * @generated - */ - private static final String[] FILE_EXTENSION_FILTERS = ClassMakerEditor.FILE_EXTENSION_FILTERS - .toArray(new String[0]); - - /** - * This looks up a string in the plugin's plugin.properties file. - * - * @generated - */ - private static String getString(String key) { - return ClassMakerEditorPlugin.INSTANCE.getString(key); - } - - /** - * This looks up a string in plugin.properties, making a substitution. - * - * @generated - */ - private static String getString(String key, Object s1) { - return org.enterprisedomain.classmaker.presentation.ClassMakerEditorPlugin.INSTANCE.getString(key, - new Object[] { s1 }); - } - - /** - * RCP's application - * - * @generated - */ - public static class Application implements IApplication { - /** - * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) - * - * @generated - */ - @Override - public Object start(IApplicationContext context) throws Exception { - WorkbenchAdvisor workbenchAdvisor = new ClassMakerEditorAdvisor(); - Display display = PlatformUI.createDisplay(); - try { - int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor); - if (returnCode == PlatformUI.RETURN_RESTART) { - return IApplication.EXIT_RESTART; - } else { - return IApplication.EXIT_OK; - } - } finally { - display.dispose(); - } - } - - /** - * @see org.eclipse.equinox.app.IApplication#stop() - * @generated - */ - @Override - public void stop() { - // Do nothing. - } - } - - /** - * RCP's perspective - * - * @generated - */ - public static class Perspective implements IPerspectiveFactory { - /** - * Perspective ID - * - * @generated - */ - public static final String ID_PERSPECTIVE = "org.enterprisedomain.classmaker.presentation.ClassMakerEditorAdvisorPerspective"; - - /** - * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout) - * - * @generated - */ - @Override - public void createInitialLayout(IPageLayout layout) { - layout.setEditorAreaVisible(true); - layout.addPerspectiveShortcut(ID_PERSPECTIVE); - - IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.66, layout.getEditorArea()); - right.addView(IPageLayout.ID_OUTLINE); - - IFolderLayout bottonRight = layout.createFolder("bottonRight", IPageLayout.BOTTOM, (float) 0.60, "right"); - bottonRight.addView(IPageLayout.ID_PROP_SHEET); - } - } - - /** - * RCP's window advisor - * - * @generated - */ - public static class WindowAdvisor extends WorkbenchWindowAdvisor { - /** - * @see WorkbenchWindowAdvisor#WorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer) - * - * @generated - */ - public WindowAdvisor(IWorkbenchWindowConfigurer configurer) { - super(configurer); - } - - /** - * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen() - * @generated - */ - @Override - public void preWindowOpen() { - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(600, 450)); - configurer.setShowCoolBar(false); - configurer.setShowStatusLine(true); - configurer.setTitle(getString("_UI_Application_title")); - } - - /** - * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#createActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer) - * - * @generated - */ - @Override - public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { - return new WindowActionBarAdvisor(configurer); - } - } - - /** - * RCP's action bar advisor - * - * @generated - */ - public static class WindowActionBarAdvisor extends ActionBarAdvisor { - /** - * @see ActionBarAdvisor#ActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer) - * - * @generated - */ - public WindowActionBarAdvisor(IActionBarConfigurer configurer) { - super(configurer); - } - - /** - * @see org.eclipse.ui.application.ActionBarAdvisor#fillMenuBar(org.eclipse.jface.action.IMenuManager) - * - * @generated - */ - @Override - protected void fillMenuBar(IMenuManager menuBar) { - IWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow(); - menuBar.add(createFileMenu(window)); - menuBar.add(createEditMenu(window)); - menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - menuBar.add(createWindowMenu(window)); - menuBar.add(createHelpMenu(window)); - } - - /** - * Creates the 'File' menu. - * - * @generated - */ - protected IMenuManager createFileMenu(IWorkbenchWindow window) { - IMenuManager menu = new MenuManager(getString("_UI_Menu_File_label"), IWorkbenchActionConstants.M_FILE); - menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START)); - - IMenuManager newMenu = new MenuManager(getString("_UI_Menu_New_label"), "new"); - newMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - - menu.add(newMenu); - menu.add(new Separator()); - menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - menu.add(new Separator()); - addToMenuAndRegister(menu, ActionFactory.CLOSE.create(window)); - addToMenuAndRegister(menu, ActionFactory.CLOSE_ALL.create(window)); - menu.add(new Separator()); - addToMenuAndRegister(menu, ActionFactory.SAVE.create(window)); - addToMenuAndRegister(menu, ActionFactory.SAVE_AS.create(window)); - addToMenuAndRegister(menu, ActionFactory.SAVE_ALL.create(window)); - menu.add(new Separator()); - addToMenuAndRegister(menu, ActionFactory.QUIT.create(window)); - menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END)); - return menu; - } - - /** - * Creates the 'Edit' menu. - * - * @generated - */ - protected IMenuManager createEditMenu(IWorkbenchWindow window) { - IMenuManager menu = new MenuManager(getString("_UI_Menu_Edit_label"), IWorkbenchActionConstants.M_EDIT); - menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START)); - - addToMenuAndRegister(menu, ActionFactory.UNDO.create(window)); - addToMenuAndRegister(menu, ActionFactory.REDO.create(window)); - menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT)); - menu.add(new Separator()); - - addToMenuAndRegister(menu, ActionFactory.CUT.create(window)); - addToMenuAndRegister(menu, ActionFactory.COPY.create(window)); - addToMenuAndRegister(menu, ActionFactory.PASTE.create(window)); - menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT)); - menu.add(new Separator()); - - addToMenuAndRegister(menu, ActionFactory.DELETE.create(window)); - addToMenuAndRegister(menu, ActionFactory.SELECT_ALL.create(window)); - menu.add(new Separator()); - - menu.add(new GroupMarker(IWorkbenchActionConstants.ADD_EXT)); - - menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END)); - menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); - return menu; - } - - /** - * Creates the 'Window' menu. - * - * @generated - */ - protected IMenuManager createWindowMenu(IWorkbenchWindow window) { - IMenuManager menu = new MenuManager(getString("_UI_Menu_Window_label"), IWorkbenchActionConstants.M_WINDOW); - - addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW.create(window)); - menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window)); - - return menu; - } - - /** - * Creates the 'Help' menu. - * - * @generated - */ - protected IMenuManager createHelpMenu(IWorkbenchWindow window) { - IMenuManager menu = new MenuManager(getString("_UI_Menu_Help_label"), IWorkbenchActionConstants.M_HELP); - // Welcome or intro page would go here - // Help contents would go here - // Tips and tricks page would go here - menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START)); - menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END)); - menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - return menu; - } - - /** - * Adds the specified action to the given menu and also registers the action - * with the action bar configurer, in order to activate its key binding. - * - * @generated - */ - protected void addToMenuAndRegister(IMenuManager menuManager, IAction action) { - menuManager.add(action); - getActionBarConfigurer().registerGlobalAction(action); - } - } - - /** - * About action for the RCP application. - * - * @generated - */ - public static class AboutAction extends WorkbenchWindowActionDelegate { - /** - * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) - * - * @generated - */ - @Override - public void run(IAction action) { - MessageDialog.openInformation(getWindow().getShell(), getString("_UI_About_title"), - getString("_UI_About_text")); - } - } - - /** - * Open action for the objects from the ClassMaker model. - * - * @generated - */ - public static class OpenAction extends WorkbenchWindowActionDelegate { - /** - * Opens the editors for the files selected using the file dialog. - * - * @generated - */ - @Override - public void run(IAction action) { - String[] filePaths = openFilePathDialog(getWindow().getShell(), SWT.OPEN, null); - if (filePaths.length > 0) { - openEditor(getWindow().getWorkbench(), URI.createFileURI(filePaths[0])); - } - } - } - - /** - * Open URI action for the objects from the ClassMaker model. - * - * @generated - */ - public static class OpenURIAction extends WorkbenchWindowActionDelegate { - /** - * Opens the editors for the files selected using the LoadResourceDialog. - * - * @generated - */ - @Override - public void run(IAction action) { - LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog( - getWindow().getShell()); - if (Window.OK == loadResourceDialog.open()) { - for (URI uri : loadResourceDialog.getURIs()) { - openEditor(getWindow().getWorkbench(), uri); - } - } - } - } - - /** - * - * - * @generated - */ - public static String[] openFilePathDialog(Shell shell, int style, String[] fileExtensionFilters) { - return openFilePathDialog(shell, style, fileExtensionFilters, (style & SWT.OPEN) != 0, (style & SWT.OPEN) != 0, - (style & SWT.SAVE) != 0); - } - - /** - * - * - * @generated - */ - public static String[] openFilePathDialog(Shell shell, int style, String[] fileExtensionFilters, - boolean includeGroupFilter, boolean includeAllFilter, boolean addExtension) { - FileDialog fileDialog = new FileDialog(shell, style); - if (fileExtensionFilters == null) { - fileExtensionFilters = FILE_EXTENSION_FILTERS; - } - - // If requested, augment the file extension filters by adding a group of all the - // other filters (*.ext1;*.ext2;...) - // at the beginning and/or an all files wildcard (*.*) at the end. - // - includeGroupFilter &= fileExtensionFilters.length > 1; - int offset = includeGroupFilter ? 1 : 0; - - if (includeGroupFilter || includeAllFilter) { - int size = fileExtensionFilters.length + offset + (includeAllFilter ? 1 : 0); - String[] allFilters = new String[size]; - StringBuilder group = includeGroupFilter ? new StringBuilder() : null; - - for (int i = 0; i < fileExtensionFilters.length; i++) { - if (includeGroupFilter) { - if (i != 0) { - group.append(';'); - } - group.append(fileExtensionFilters[i]); - } - allFilters[i + offset] = fileExtensionFilters[i]; - } - - if (includeGroupFilter) { - allFilters[0] = group.toString(); - } - if (includeAllFilter) { - allFilters[allFilters.length - 1] = "*.*"; - } - - fileDialog.setFilterExtensions(allFilters); - } else { - fileDialog.setFilterExtensions(fileExtensionFilters); - } - fileDialog.open(); - - String[] filenames = fileDialog.getFileNames(); - String[] result = new String[filenames.length]; - String path = fileDialog.getFilterPath() + File.separator; - String extension = null; - - // If extension adding requested, get the dotted extension corresponding to the - // selected filter. - // - if (addExtension) { - int i = fileDialog.getFilterIndex(); - if (i != -1 && (!includeAllFilter || i != fileExtensionFilters.length)) { - i = includeGroupFilter && i == 0 ? 0 : i - offset; - String filter = fileExtensionFilters[i]; - int dot = filter.lastIndexOf('.'); - if (dot == 1 && filter.charAt(0) == '*') { - extension = filter.substring(dot); - } - } - } - - // Build the result by adding the selected path and, if needed, auto-appending - // the extension. - // - for (int i = 0; i < filenames.length; i++) { - String filename = path + filenames[i]; - if (extension != null) { - int dot = filename.lastIndexOf('.'); - if (dot == -1 || !Arrays.asList(fileExtensionFilters).contains("*" + filename.substring(dot))) { - filename += extension; - } - } - result[i] = filename; - } - return result; - } - - /** - * - * - * @generated - */ - public static boolean openEditor(IWorkbench workbench, URI uri) { - IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); - IWorkbenchPage page = workbenchWindow.getActivePage(); - - IEditorDescriptor editorDescriptor = EditUIUtil.getDefaultEditor(uri, null); - if (editorDescriptor == null) { - MessageDialog.openError(workbenchWindow.getShell(), getString("_UI_Error_title"), - getString("_WARN_No_Editor", uri.lastSegment())); - return false; - } else { - try { - page.openEditor(new URIEditorInput(uri), editorDescriptor.getId()); - } catch (PartInitException exception) { - MessageDialog.openError(workbenchWindow.getShell(), getString("_UI_OpenEditorError_label"), - exception.getMessage()); - return false; - } - } - return true; - } - - /** - * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId() - * - * @generated - */ - @Override - public String getInitialWindowPerspectiveId() { - return Perspective.ID_PERSPECTIVE; - } - - /** - * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer) - * - * @generated - */ - @Override - public void initialize(IWorkbenchConfigurer configurer) { - super.initialize(configurer); - configurer.setSaveAndRestore(true); - } - - /** - * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer) - * - * @generated - */ - @Override - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { - return new WindowAdvisor(configurer); - } -} diff --git a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorPlugin.java b/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorPlugin.java deleted file mode 100644 index 634107c9..00000000 --- a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerEditorPlugin.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright 2017 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.presentation; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.ui.EclipseUIPlugin; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.ecore.provider.EcoreEditPlugin; - -/** - * This is the central singleton for the ClassMaker editor plugin. - * - * @generated - */ -public final class ClassMakerEditorPlugin extends EMFPlugin { - /** - * Keep track of the singleton. - * - * @generated - */ - public static final ClassMakerEditorPlugin INSTANCE = new ClassMakerEditorPlugin(); - - /** - * Keep track of the singleton. - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * @generated - */ - public ClassMakerEditorPlugin() { - super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, }); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * @generated - */ - public static class Implementation extends EclipseUIPlugin { - /** - * Creates an instance. - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerModelWizard.java b/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerModelWizard.java deleted file mode 100644 index 133208d4..00000000 --- a/bundles/org.enterprisedomain.editor/src/org/enterprisedomain/classmaker/presentation/ClassMakerModelWizard.java +++ /dev/null @@ -1,571 +0,0 @@ -/** - * Copyright 2017 Kyrill Zotkin - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.enterprisedomain.classmaker.presentation; - -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.StringTokenizer; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.enterprisedomain.classmaker.ClassMakerFactory; -import org.enterprisedomain.classmaker.ClassMakerPackage; -import org.enterprisedomain.classmaker.provider.ClassMakerEditPlugin; - -/** - * This is a simple wizard for creating a new model file. - * - * @generated - */ -public class ClassMakerModelWizard extends Wizard implements INewWizard { - /** - * The supported extensions for created files. - * - * @generated - */ - public static final List FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_ClassMakerEditorFilenameExtensions").split("\\s*,\\s*"))); - - /** - * A formatted list of supported file extensions, suitable for display. - * - * @generated - */ - public static final String FORMATTED_FILE_EXTENSIONS = ClassMakerEditorPlugin.INSTANCE - .getString("_UI_ClassMakerEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); - - /** - * This caches an instance of the model package. - * - * @generated - */ - protected ClassMakerPackage classMakerPackage = ClassMakerPackage.eINSTANCE; - - /** - * This caches an instance of the model factory. - * - * @generated - */ - protected ClassMakerFactory classMakerFactory = classMakerPackage.getClassMakerFactory(); - - /** - * This is the initial object creation page. - * - * @generated - */ - protected ClassMakerModelWizardInitialObjectCreationPage initialObjectCreationPage; - - /** - * Remember the selection during initialization for populating the default - * container. - * - * @generated - */ - protected IStructuredSelection selection; - - /** - * Remember the workbench during initialization. - * - * @generated - */ - protected IWorkbench workbench; - - /** - * Caches the names of the types that can be created as the root object. - * - * @generated - */ - protected List initialObjectNames; - - /** - * This just records the information. - * - * @generated - */ - @Override - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.workbench = workbench; - this.selection = selection; - setWindowTitle(ClassMakerEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); - setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE - .getImageDescriptor(ClassMakerEditorPlugin.INSTANCE.getImage("full/wizban/NewClassMaker"))); - } - - /** - * Returns the names of the types that can be created as the root object. - * - * @generated - */ - protected Collection getInitialObjectNames() { - if (initialObjectNames == null) { - initialObjectNames = new ArrayList(); - for (EClassifier eClassifier : classMakerPackage.getEClassifiers()) { - if (eClassifier instanceof EClass) { - EClass eClass = (EClass) eClassifier; - if (!eClass.isAbstract()) { - initialObjectNames.add(eClass.getName()); - } - } - } - Collections.sort(initialObjectNames, java.text.Collator.getInstance()); - } - return initialObjectNames; - } - - /** - * Create a new model. - * - * @generated - */ - protected EObject createInitialModel() { - EClass eClass = (EClass) classMakerPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = classMakerFactory.create(eClass); - return rootObject; - } - - /** - * Do the work after everything is specified. - * - * @generated - */ - @Override - public boolean performFinish() { - try { - // Get the URI of the model file. - // - final URI fileURI = getModelURI(); - if (new File(fileURI.toFileString()).exists()) { - if (!MessageDialog.openQuestion(getShell(), - ClassMakerEditorPlugin.INSTANCE.getString("_UI_Question_title"), ClassMakerEditorPlugin.INSTANCE - .getString("_WARN_FileConflict", new String[] { fileURI.toFileString() }))) { - initialObjectCreationPage.selectFileField(); - return false; - } - } - - // Do the work within an operation. - // - IRunnableWithProgress operation = new IRunnableWithProgress() { - @Override - public void run(IProgressMonitor progressMonitor) { - try { - // Create a resource set - // - ResourceSet resourceSet = new ResourceSetImpl(); - - // Create a resource for this file. - // - Resource resource = resourceSet.createResource(fileURI); - - // Add the initial model object to the contents. - // - EObject rootObject = createInitialModel(); - if (rootObject != null) { - resource.getContents().add(rootObject); - } - - // Save the contents of the resource to the file system. - // - Map options = new HashMap(); - options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); - resource.save(options); - } catch (Exception exception) { - ClassMakerEditorPlugin.INSTANCE.log(exception); - } finally { - progressMonitor.done(); - } - } - }; - - getContainer().run(false, false, operation); - - return ClassMakerEditorAdvisor.openEditor(workbench, fileURI); - } catch (Exception exception) { - ClassMakerEditorPlugin.INSTANCE.log(exception); - return false; - } - } - - /** - * This is the page where the type of object to create is selected. - * - * @generated - */ - public class ClassMakerModelWizardInitialObjectCreationPage extends WizardPage { - /** - * - * - * @generated - */ - protected Text fileField; - - /** - * - * - * @generated - */ - protected Combo initialObjectField; - - /** - * @generated - */ - protected List encodings; - - /** - * - * - * @generated - */ - protected Combo encodingField; - - /** - * Pass in the selection. - * - * @generated - */ - public ClassMakerModelWizardInitialObjectCreationPage(String pageId) { - super(pageId); - } - - /** - * - * - * @generated - */ - @Override - public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NONE); - { - GridLayout layout = new GridLayout(); - layout.numColumns = 1; - layout.verticalSpacing = 12; - composite.setLayout(layout); - - GridData data = new GridData(); - data.verticalAlignment = GridData.FILL; - data.grabExcessVerticalSpace = true; - data.horizontalAlignment = GridData.FILL; - composite.setLayoutData(data); - } - - Label resourceURILabel = new Label(composite, SWT.LEFT); - { - resourceURILabel.setText(ClassMakerEditorPlugin.INSTANCE.getString("_UI_File_label")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - resourceURILabel.setLayoutData(data); - } - - Composite fileComposite = new Composite(composite, SWT.NONE); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.END; - fileComposite.setLayoutData(data); - - GridLayout layout = new GridLayout(); - data.horizontalAlignment = GridData.FILL; - layout.marginHeight = 0; - layout.marginWidth = 0; - layout.numColumns = 2; - fileComposite.setLayout(layout); - } - - fileField = new Text(fileComposite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - data.horizontalSpan = 1; - fileField.setLayoutData(data); - } - - fileField.addModifyListener(validator); - - Button resourceURIBrowseFileSystemButton = new Button(fileComposite, SWT.PUSH); - resourceURIBrowseFileSystemButton.setText(ClassMakerEditorPlugin.INSTANCE.getString("_UI_Browse_label")); - - resourceURIBrowseFileSystemButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent event) { - String[] filters = ClassMakerEditor.FILE_EXTENSION_FILTERS - .toArray(new String[ClassMakerEditor.FILE_EXTENSION_FILTERS.size()]); - String[] files = ClassMakerEditorAdvisor.openFilePathDialog(getShell(), SWT.SAVE, filters); - if (files.length > 0) { - fileField.setText(files[0]); - } - } - }); - Label containerLabel = new Label(composite, SWT.LEFT); - { - containerLabel.setText(ClassMakerEditorPlugin.INSTANCE.getString("_UI_ModelObject")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - containerLabel.setLayoutData(data); - } - - initialObjectField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - initialObjectField.setLayoutData(data); - } - - for (String objectName : getInitialObjectNames()) { - initialObjectField.add(getLabel(objectName)); - } - - if (initialObjectField.getItemCount() == 1) { - initialObjectField.select(0); - } - initialObjectField.addModifyListener(validator); - - Label encodingLabel = new Label(composite, SWT.LEFT); - { - encodingLabel.setText(ClassMakerEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - encodingLabel.setLayoutData(data); - } - encodingField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - encodingField.setLayoutData(data); - } - - for (String encoding : getEncodings()) { - encodingField.add(encoding); - } - - encodingField.select(0); - encodingField.addModifyListener(validator); - - setPageComplete(validatePage()); - setControl(composite); - } - - /** - * - * - * @generated - */ - protected ModifyListener validator = new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - setPageComplete(validatePage()); - } - }; - - /** - * - * - * @generated - */ - protected boolean validatePage() { - URI fileURI = getFileURI(); - if (fileURI == null || fileURI.isEmpty()) { - setErrorMessage(null); - return false; - } - - String extension = fileURI.fileExtension(); - if (extension == null || !FILE_EXTENSIONS.contains(extension)) { - String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; - setErrorMessage( - ClassMakerEditorPlugin.INSTANCE.getString(key, new Object[] { FORMATTED_FILE_EXTENSIONS })); - return false; - } - - setErrorMessage(null); - return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); - } - - /** - * - * - * @generated - */ - @Override - public void setVisible(boolean visible) { - super.setVisible(visible); - if (visible) { - initialObjectField.clearSelection(); - encodingField.clearSelection(); - fileField.setFocus(); - } - } - - /** - * - * - * @generated - */ - public String getInitialObjectName() { - String label = initialObjectField.getText(); - - for (String name : getInitialObjectNames()) { - if (getLabel(name).equals(label)) { - return name; - } - } - return null; - } - - /** - * - * - * @generated - */ - public String getEncoding() { - return encodingField.getText(); - } - - /** - * - * - * @generated - */ - public URI getFileURI() { - try { - return URI.createFileURI(fileField.getText()); - } catch (Exception exception) { - // Ignore - } - return null; - } - - /** - * - * - * @generated - */ - public void selectFileField() { - initialObjectField.clearSelection(); - encodingField.clearSelection(); - fileField.selectAll(); - fileField.setFocus(); - } - - /** - * Returns the label for the specified type name. - * - * @generated - */ - protected String getLabel(String typeName) { - try { - return ClassMakerEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); - } catch (MissingResourceException mre) { - ClassMakerEditorPlugin.INSTANCE.log(mre); - } - return typeName; - } - - /** - * - * - * @generated - */ - protected Collection getEncodings() { - if (encodings == null) { - encodings = new ArrayList(); - for (StringTokenizer stringTokenizer = new StringTokenizer( - ClassMakerEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer - .hasMoreTokens();) { - encodings.add(stringTokenizer.nextToken()); - } - } - return encodings; - } - } - - /** - * The framework calls this to create the contents of the wizard. - * - * @generated - */ - @Override - public void addPages() { - initialObjectCreationPage = new ClassMakerModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage - .setTitle(ClassMakerEditorPlugin.INSTANCE.getString("_UI_ClassMakerModelWizard_label")); - initialObjectCreationPage - .setDescription(ClassMakerEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); - addPage(initialObjectCreationPage); - } - - /** - * Get the URI from the page. - * - * @generated - */ - public URI getModelURI() { - return initialObjectCreationPage.getFileURI(); - } - -} diff --git a/bundles/org.enterprisedomain.workbench/.classpath b/bundles/org.enterprisedomain.workbench/.classpath index 1db08c6b..2d6b678d 100644 --- a/bundles/org.enterprisedomain.workbench/.classpath +++ b/bundles/org.enterprisedomain.workbench/.classpath @@ -1,7 +1,7 @@ - + - + diff --git a/bundles/org.enterprisedomain.workbench/.settings/org.eclipse.jdt.core.prefs b/bundles/org.enterprisedomain.workbench/.settings/org.eclipse.jdt.core.prefs index 7adc0fb9..3a79233b 100644 --- a/bundles/org.enterprisedomain.workbench/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.enterprisedomain.workbench/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=21 diff --git a/bundles/org.enterprisedomain.workbench/META-INF/MANIFEST.MF b/bundles/org.enterprisedomain.workbench/META-INF/MANIFEST.MF index d2a67481..30e685dc 100644 --- a/bundles/org.enterprisedomain.workbench/META-INF/MANIFEST.MF +++ b/bundles/org.enterprisedomain.workbench/META-INF/MANIFEST.MF @@ -2,37 +2,39 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: enterpriseDomain Workbench Application Bundle-SymbolicName: org.enterprisedomain.workbench;singleton:=true -Bundle-Version: 0.8.55.qualifier +Bundle-Version: 0.8.55 Bundle-Activator: org.enterprisedomain.workbench.Activator Bundle-Vendor: Kyrill Zotkin -Require-Bundle: org.eclipse.osgi, +Require-Bundle: org.eclipse.osgi;bundle-version="[3.24.0,4.0.0)", org.eclipse.jface, - org.eclipse.e4.ui.model.workbench, + org.eclipse.e4.ui.model.workbench;bundle-version="[2.4.700,3.0.0)", org.eclipse.e4.ui.di, org.eclipse.e4.ui.services, org.eclipse.e4.core.di.annotations, - org.eclipse.core.runtime, - org.eclipse.ui.ide;bundle-version="[3.15.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="[3.34.100,4.0.0)", + org.eclipse.ui.ide;bundle-version="[3.22.800,4.0.0)", org.eclipse.ui.console, org.eclipse.emf.edit.ui;bundle-version="2.16.0", - org.apache.batik.css;bundle-version="1.10.0", + org.apache.batik.css;bundle-version="[1.19.0,2.0.0)", org.apache.commons.logging;bundle-version="1.2.0", - org.eclipse.ui.ide.application;bundle-version="[1.4.0,2.0.0)", + org.eclipse.ui.ide.application;bundle-version="[1.5.900,2.0.0)", org.eclipse.emf.ecore.editor;bundle-version="2.17.0", - org.eclipse.e4.ui.workbench;bundle-version="1.11.0", + org.eclipse.e4.ui.workbench;bundle-version="[1.18.100,2.0.0)", org.eclipse.ui.forms;bundle-version="3.8.200", - org.eclipse.pde.ds.annotations;bundle-version="1.2.200", + org.eclipse.pde.ds.annotations;bundle-version="[1.4.200,2.0.0)", org.apache.felix.scr;bundle-version="2.1.24", org.eclipse.equinox.event;bundle-version="1.6.0", org.eclipse.ui.workbench, - org.eclipse.ui.navigator.resources;bundle-version="3.8.200", - org.eclipse.emf.importer;bundle-version="2.12.0", - org.eclipse.emf.importer.ecore;bundle-version="2.10.0", + org.eclipse.ui.navigator.resources;bundle-version="[3.9.900,4.0.0)", + org.eclipse.emf.importer;bundle-version="[2.14.0,3.0.0)", + org.eclipse.emf.importer.ecore;bundle-version="[2.12.0,3.0.0)", org.eclipse.jdt.ui;bundle-version="3.25.0";visibility:=reexport, - org.enterprisedomain.classmaker;bundle-version="0.8.55" -Bundle-RequiredExecutionEnvironment: JavaSE-11 + org.enterprisedomain.classmaker;bundle-version="0.8.55", + org.eclipse.equinox.p2.repository;bundle-version="2.7.100", + org.enterprisedomain.classmaker.ui;bundle-version="0.8.55" +Bundle-RequiredExecutionEnvironment: JavaSE-21 Automatic-Module-Name: org.enterprisedomain.workbench -Import-Package: javax.annotation;version="1.2.0" +Import-Package: jakarta.annotation;version="2.1.1", + jakarta.inject;version="2.0.1" Bundle-ActivationPolicy: lazy -Export-Package: org.enterprisedomain.workbench, - org.enterprisedomain.workbench.handler +Export-Package: org.enterprisedomain.workbench diff --git a/bundles/org.enterprisedomain.workbench/RCP.launch b/bundles/org.enterprisedomain.workbench/RCP.launch new file mode 100644 index 00000000..4252c17d --- /dev/null +++ b/bundles/org.enterprisedomain.workbench/RCP.launch @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.workbench/cdo.launch b/bundles/org.enterprisedomain.workbench/cdo.launch deleted file mode 100644 index e400fd78..00000000 --- a/bundles/org.enterprisedomain.workbench/cdo.launch +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.enterprisedomain.workbench/emf.launch b/bundles/org.enterprisedomain.workbench/emf.launch index a32cb32d..de1f85a2 100644 --- a/bundles/org.enterprisedomain.workbench/emf.launch +++ b/bundles/org.enterprisedomain.workbench/emf.launch @@ -13,11 +13,12 @@ - + + - + @@ -25,35 +26,24 @@ - - - - - - - - - - - - + - + - - + + + + - + - - - - + + + - diff --git a/bundles/org.enterprisedomain.workbench/plugin.xml b/bundles/org.enterprisedomain.workbench/plugin.xml index e8448d52..e9d233ab 100644 --- a/bundles/org.enterprisedomain.workbench/plugin.xml +++ b/bundles/org.enterprisedomain.workbench/plugin.xml @@ -1,177 +1,96 @@ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.enterprisedomain.workbench/plugin_customization.ini b/bundles/org.enterprisedomain.workbench/plugin_customization.ini index 92e07e33..bb20a864 100644 --- a/bundles/org.enterprisedomain.workbench/plugin_customization.ini +++ b/bundles/org.enterprisedomain.workbench/plugin_customization.ini @@ -1,2 +1,2 @@ -org.eclipse.ui/defaultPerspectiveId=org.eclipse.emf.ecp.application3x.perspective +org.eclipse.ui/defaultPerspectiveId=org.eclipse.emf.cdo.explorer.ui.CDOExplorerPerspective org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false diff --git a/bundles/org.enterprisedomain.workbench/pom.xml b/bundles/org.enterprisedomain.workbench/pom.xml index eddd0331..95574fda 100644 --- a/bundles/org.enterprisedomain.workbench/pom.xml +++ b/bundles/org.enterprisedomain.workbench/pom.xml @@ -1,10 +1,12 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ org.enterprisedomain.workbench diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Activator.java b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Activator.java index 08113c19..c36eacff 100644 --- a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Activator.java +++ b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Activator.java @@ -22,9 +22,6 @@ import org.eclipse.core.runtime.SafeRunner; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.enterprisedomain.classmaker.ClassMakerService; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; @@ -35,6 +32,8 @@ import org.osgi.util.tracker.ServiceTracker; public class Activator extends AbstractUIPlugin { + + public static final String PLUGIN_ID = "org.enterprisedomain.workbench"; //$NON-NLS-1$ private static BundleContext context; private static Activator plugin; @@ -76,27 +75,6 @@ public void run() throws Exception { runnable.run(ClassMakerPlugin.getProgressMonitor()); } }); - // Display display = Display.getCurrent() != null ? Display.getCurrent() : - // Display.getDefault(); -// display.asyncExec(new Runnable() { -// -// @Override -// public void run() { -// try { -// IWorkbenchWindow workbenchWindow = ((IWorkbench) PlatformUI.getWorkbench()) -// .getWorkbenchWindows()[0]; -// -// if (workbenchWindow != null) { -// workbenchWindow.run(false, true, runnable); -// } -// } catch (InvocationTargetException e) { -// Activator.log(e.getTargetException()); -// } catch (InterruptedException e) { -// return; -// } -// } -// }); - } }); ClassMakerPlugin.setClientRunWrapper(new IRunWrapper() { diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewContributionWizard.java b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewContributionWizard.java new file mode 100644 index 00000000..c12c1a48 --- /dev/null +++ b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewContributionWizard.java @@ -0,0 +1,139 @@ +package org.enterprisedomain.workbench; + +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.codegen.util.CodeGenUtil; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EParameter; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; +import org.enterprisedomain.classmaker.ClassMakerService; +import org.enterprisedomain.classmaker.Project; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; + +public class NewContributionWizard extends Wizard implements INewWizard { + + private WizardNewProjectCreationPage page; + + public NewContributionWizard() { + } + + @Override + public void addPages() { + page = new WizardNewProjectCreationPage("newContributionPage"); + addPage(page); + super.addPages(); + } + + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + + } + + @Override + public boolean performFinish() { + final ClassMakerService classMaker = ClassMakerPlugin.getClassMaker(); + if (classMaker != null) { + Project domainProject = classMaker.getWorkspace().getProject(page.getProjectName()); + if (domainProject != null) { + try { + IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); + domainProject.open(monitor); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + domainProject.initialize(); + try { + domainProject.load(false, true); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } else { + IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); + EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE; + EPackage model = ecoreFactory.createEPackage(); + model.setName(page.getProjectName()); + model.setNsPrefix(CodeGenUtil.capName(page.getProjectName().replaceAll(" ", "").toLowerCase())); + model.setNsURI("http://" + page.getProjectName().replaceAll(" ", "") + "/1.0"); + EClass dummyEClass = ecoreFactory.createEClass(); + dummyEClass.setName("TheObject"); + EAttribute dummyEAttribute = ecoreFactory.createEAttribute(); + dummyEAttribute.setName("value"); + dummyEAttribute.setEType(EcorePackage.Literals.ESTRING); + dummyEClass.getEStructuralFeatures().add(dummyEAttribute); + EOperation op = ecoreFactory.createEOperation(); + op.setName("perform"); + op.setEType(EcorePackage.Literals.EINT); + EAnnotation an = ecoreFactory.createEAnnotation(); + an.setSource("http://www.eclipse.org/emf/2002/GenModel"); + an.getDetails().put("body", "return 7;"); + op.getEAnnotations().add(an); + EAnnotation invocation = ecoreFactory.createEAnnotation(); + invocation.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); + op.getEAnnotations().add(invocation); + dummyEClass.getEOperations().add(op); + model.getEClassifiers().add(dummyEClass); + EAnnotation invocationDelegate = ecoreFactory.createEAnnotation(); + invocationDelegate.setSource(EcorePackage.eNS_URI); + invocationDelegate.getDetails().put("invocationDelegates", ClassMakerService.INVOCATION_DELEGATE_URI); + model.getEAnnotations().add(invocationDelegate); + EClass queriesEClass = ecoreFactory.createEClass(); + queriesEClass.setName("Queries"); + EOperation query = ecoreFactory.createEOperation(); + query.setName("selectAllTheObjects"); + EClass eObjectEClass = EcorePackage.Literals.EOBJECT; + query.setEType(eObjectEClass); + query.setUpperBound(-1); + EParameter param = ecoreFactory.createEParameter(); + param.setName("selectedEObjects"); + param.setEType(eObjectEClass); + param.setUpperBound(-1); + query.getEParameters().add(param); + EAnnotation ann = ecoreFactory.createEAnnotation(); + ann.setSource("http://www.eclipse.org/emf/2002/GenModel"); + ann.getDetails().put("body", "if (null == selectedEObjects) {\n" + + " throw new <%java.lang.NullPointerException%>(\"Argument is null\"); //$NON-NLS-1$\n" + "}\n" + + "\n" + "<%org.eclipse.emf.query.conditions.eobjects.EObjectCondition%> condition = " + + "new <%org.eclipse.emf.query.conditions.eobjects.EObjectTypeRelationCondition%>(" + + "(<%org.eclipse.emf.ecore.EClass%>) <%org.eclipse.emf.ecore.EPackage%>.Registry.INSTANCE.getEPackage(\"http://" + + page.getProjectName().replaceAll(" ", "") + "/1.0\")" + ".getEClassifier(\"" + + dummyEClass.getName() + "\"));\n" + + "<%org.eclipse.emf.query.statements.SELECT%> statement = new <%org.eclipse.emf.query.statements.SELECT%>(\n" + + " new <%org.eclipse.emf.query.statements.FROM%>(selectedEObjects), \n" + + " new <%org.eclipse.emf.query.statements.WHERE%>(condition)\n" + ");\n" + "\n" + + "return <%org.eclipse.emf.common.util.ECollections%>.toEList(statement.execute().getEObjects());"); + query.getEAnnotations().add(ann); + EAnnotation in = ecoreFactory.createEAnnotation(); + in.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); + query.getEAnnotations().add(in); + queriesEClass.getEOperations().add(query); + model.getEClassifiers().add(queriesEClass); + try { + domainProject = classMaker.getWorkspace().createContribution(model, monitor); + domainProject.getState().setEdit(true); + domainProject.getState().setEditor(true); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } + } + try { + ResourcesPlugin.getWorkspace().getRoot().getProject(page.getProjectName()).refreshLocal(2, + ClassMakerPlugin.getProgressMonitor()); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + return true; + } + +} diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewProjectWizard.java b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewProjectWizard.java new file mode 100644 index 00000000..2541c6de --- /dev/null +++ b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/NewProjectWizard.java @@ -0,0 +1,80 @@ +package org.enterprisedomain.workbench; + +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; +import org.enterprisedomain.classmaker.ClassMakerService; +import org.enterprisedomain.classmaker.Project; +import org.enterprisedomain.classmaker.core.ClassMakerPlugin; + +public class NewProjectWizard extends Wizard implements INewWizard { + + public static final String PROJECT_NAME = Activator.PLUGIN_ID + ".projectName"; + + private WizardNewProjectCreationPage page; + + public NewProjectWizard() { + } + + @Override + public void addPages() { + page = new WizardNewProjectCreationPage("newProjectPage"); + addPage(page); + super.addPages(); + } + + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + + } + + public String getProjectName() { + return page.getProjectName(); + } + + @Override + public boolean performFinish() { + final ClassMakerService classMaker = ClassMakerPlugin.getClassMaker(); + System.setProperty(PROJECT_NAME, getProjectName()); + if (classMaker != null) { + Project domainProject = classMaker.getWorkspace().getProject(getProjectName()); + if (domainProject != null) { + try { + IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); + domainProject.open(monitor); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + domainProject.initialize(); + try { + domainProject.load(false, true); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } else { + IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor(); + try { + domainProject = classMaker.getWorkspace().createProject(getProjectName(), monitor); + domainProject.getResource().getContents().add(EcoreFactory.eINSTANCE.createEObject()); + domainProject.initialize(); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + } + } + try { + ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName()).refreshLocal(1, + ClassMakerPlugin.getProgressMonitor()); + } catch (CoreException e) { + ClassMakerPlugin.getInstance().getLog().log(e.getStatus()); + } + return true; + } + +} diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/ProjectAdapterFactory.java b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/ProjectAdapterFactory.java index c8620ac1..cb4269d7 100644 --- a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/ProjectAdapterFactory.java +++ b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/ProjectAdapterFactory.java @@ -15,8 +15,8 @@ */ package org.enterprisedomain.workbench; +import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.emf.ecp.core.ECPProject; import org.enterprisedomain.classmaker.Project; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; @@ -26,9 +26,9 @@ public class ProjectAdapterFactory implements IAdapterFactory { @Override public T getAdapter(Object adaptableObject, Class adapterType) { if (Project.class.isAssignableFrom(adapterType)) { - if (adaptableObject instanceof ECPProject) + if (adaptableObject instanceof IProject) return (T) ClassMakerPlugin.getClassMaker().getWorkspace() - .getProject(((ECPProject) adaptableObject).getName()); + .getProject(((IProject) adaptableObject).getName()); } return null; } diff --git a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Startup.java b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Startup.java index 15db1582..0f1f07ff 100644 --- a/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Startup.java +++ b/bundles/org.enterprisedomain.workbench/src/org/enterprisedomain/workbench/Startup.java @@ -11,7 +11,7 @@ public class Startup implements IStartup { @Override public void earlyStartup() { - MessageConsole out = new MessageConsole("Output", null); + MessageConsole out = new MessageConsole("Environment", null); System.setOut(new PrintStream(out.newOutputStream())); ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { out }); ConsolePlugin.getDefault().getConsoleManager().refresh(out); diff --git a/bundles/org.enterprisedomain.workbench/temp.launch b/bundles/org.enterprisedomain.workbench/temp.launch new file mode 100644 index 00000000..5759f2a9 --- /dev/null +++ b/bundles/org.enterprisedomain.workbench/temp.launch @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/org.enterprisedomain.sample/.classpath b/examples/org.enterprisedomain.sample/.classpath index e801ebfb..375961e4 100644 --- a/examples/org.enterprisedomain.sample/.classpath +++ b/examples/org.enterprisedomain.sample/.classpath @@ -1,6 +1,6 @@ - + diff --git a/examples/org.enterprisedomain.sample/META-INF/MANIFEST.MF b/examples/org.enterprisedomain.sample/META-INF/MANIFEST.MF index 4a33e6e4..2c147277 100644 --- a/examples/org.enterprisedomain.sample/META-INF/MANIFEST.MF +++ b/examples/org.enterprisedomain.sample/META-INF/MANIFEST.MF @@ -3,9 +3,9 @@ Bundle-ManifestVersion: 2 Bundle-Name: enterpriseDomain Sample App Bundle-SymbolicName: org.enterprisedomain.classmaker.sample;singleton:=true Bundle-Version: 0.0.2.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Require-Bundle: org.enterprisedomain.classmaker, - javax.inject, + jakarta.inject.jakarta.inject-api, org.eclipse.core.runtime, org.eclipse.e4.core.di, org.eclipse.equinox.concurrent diff --git a/examples/org.enterprisedomain.sample/pom.xml b/examples/org.enterprisedomain.sample/pom.xml index c2749062..5fd3aabc 100644 --- a/examples/org.enterprisedomain.sample/pom.xml +++ b/examples/org.enterprisedomain.sample/pom.xml @@ -14,8 +14,7 @@ org.enterprisedomain.org.enterprisedomain update - 0.8.55-SNAPSHOT - pom + pom diff --git a/examples/org.enterprisedomain.sample/sample.launch b/examples/org.enterprisedomain.sample/sample.launch index f805faf7..55f581d1 100644 --- a/examples/org.enterprisedomain.sample/sample.launch +++ b/examples/org.enterprisedomain.sample/sample.launch @@ -14,259 +14,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - + + + + + + + + + - + + + + + + + + + + + + + diff --git a/examples/org.enterprisedomain.sample/src/org/enterprisedomain/classmaker/sample/Worker.java b/examples/org.enterprisedomain.sample/src/org/enterprisedomain/classmaker/sample/Worker.java index 9c751ed9..519af7bf 100644 --- a/examples/org.enterprisedomain.sample/src/org/enterprisedomain/classmaker/sample/Worker.java +++ b/examples/org.enterprisedomain.sample/src/org/enterprisedomain/classmaker/sample/Worker.java @@ -1,7 +1,5 @@ package org.enterprisedomain.classmaker.sample; -import javax.inject.Inject; - import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.e4.core.contexts.ContextInjectionFactory; @@ -19,7 +17,7 @@ public class Worker implements Runnable { - @Inject + @jakarta.inject.Inject private ClassMakerService m; private EPackage ePackage; diff --git a/features/org.enterprisedomain.classmaker.cdo.feature/feature.xml b/features/org.enterprisedomain.classmaker.cdo.feature/feature.xml index f978dced..9055d66c 100644 --- a/features/org.enterprisedomain.classmaker.cdo.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.cdo.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/features/org.enterprisedomain.classmaker.cdo.feature/pom.xml b/features/org.enterprisedomain.classmaker.cdo.feature/pom.xml index 5e0c361f..d370fb85 100644 --- a/features/org.enterprisedomain.classmaker.cdo.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.cdo.feature/pom.xml @@ -4,7 +4,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.cdo.ui.feature/feature.xml b/features/org.enterprisedomain.classmaker.cdo.ui.feature/feature.xml index 7c97b543..ec4121d3 100644 --- a/features/org.enterprisedomain.classmaker.cdo.ui.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.cdo.ui.feature/feature.xml @@ -2,7 +2,7 @@ @@ -27,17 +27,11 @@ - - - + version="0.0.0"/> diff --git a/features/org.enterprisedomain.classmaker.cdo.ui.feature/pom.xml b/features/org.enterprisedomain.classmaker.cdo.ui.feature/pom.xml index e8096664..c06747ff 100644 --- a/features/org.enterprisedomain.classmaker.cdo.ui.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.cdo.ui.feature/pom.xml @@ -4,7 +4,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.core.resources.prefs b/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c02..00000000 --- a/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.m2e.core.prefs b/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/features/org.enterprisedomain.classmaker.ecp.feature/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/features/org.enterprisedomain.classmaker.edit.feature/feature.xml b/features/org.enterprisedomain.classmaker.edit.feature/feature.xml index 536a5a02..92df7cb1 100644 --- a/features/org.enterprisedomain.classmaker.edit.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.edit.feature/feature.xml @@ -2,7 +2,7 @@ + version="0.8.55"> enterpriseDomain ClassMaker Edit Feature @@ -103,17 +103,12 @@ limitations under the License. - - + version="0.0.0"/> diff --git a/features/org.enterprisedomain.classmaker.edit.feature/pom.xml b/features/org.enterprisedomain.classmaker.edit.feature/pom.xml index 4fcee1f8..cc3b145b 100644 --- a/features/org.enterprisedomain.classmaker.edit.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.edit.feature/pom.xml @@ -6,7 +6,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.feature/feature.xml b/features/org.enterprisedomain.classmaker.feature/feature.xml index b0f7da51..f59c7592 100644 --- a/features/org.enterprisedomain.classmaker.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.feature/feature.xml @@ -2,7 +2,7 @@ @@ -139,9 +139,7 @@ limitations under the License. - - @@ -153,19 +151,13 @@ limitations under the License. + version="0.0.0"/> + version="0.0.0"/> diff --git a/features/org.enterprisedomain.classmaker.feature/pom.xml b/features/org.enterprisedomain.classmaker.feature/pom.xml index da71f952..cb146aba 100644 --- a/features/org.enterprisedomain.classmaker.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.feature/pom.xml @@ -4,7 +4,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/feature.xml b/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/feature.xml index c7f08d93..3b872f5a 100644 --- a/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/pom.xml b/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/pom.xml index e22e1115..f1ba9673 100644 --- a/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature/pom.xml @@ -7,7 +7,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/.gitignore b/features/org.enterprisedomain.classmaker.ui.feature/.gitignore similarity index 100% rename from features/org.enterprisedomain.classmaker.ecp.feature/.gitignore rename to features/org.enterprisedomain.classmaker.ui.feature/.gitignore diff --git a/features/org.enterprisedomain.classmaker.ui.feature/.project b/features/org.enterprisedomain.classmaker.ui.feature/.project new file mode 100644 index 00000000..5d926768 --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/.project @@ -0,0 +1,17 @@ + + + org.enterprisedomain.classmaker.ui.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/bundles/org.enterprisedomain.ecp/.settings/org.eclipse.core.resources.prefs b/features/org.enterprisedomain.classmaker.ui.feature/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from bundles/org.enterprisedomain.ecp/.settings/org.eclipse.core.resources.prefs rename to features/org.enterprisedomain.classmaker.ui.feature/.settings/org.eclipse.core.resources.prefs diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/build.properties b/features/org.enterprisedomain.classmaker.ui.feature/build.properties old mode 100755 new mode 100644 similarity index 100% rename from features/org.enterprisedomain.classmaker.ecp.feature/build.properties rename to features/org.enterprisedomain.classmaker.ui.feature/build.properties diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/feature.xml b/features/org.enterprisedomain.classmaker.ui.feature/feature.xml similarity index 61% rename from features/org.enterprisedomain.classmaker.ecp.feature/feature.xml rename to features/org.enterprisedomain.classmaker.ui.feature/feature.xml index 62cb6ee3..cab2672f 100644 --- a/features/org.enterprisedomain.classmaker.ecp.feature/feature.xml +++ b/features/org.enterprisedomain.classmaker.ui.feature/feature.xml @@ -1,27 +1,22 @@ - - [Enter Feature Description here.] - - - Copyright 2012-2018 Kyrill Zotkin - + Copyright 2012-2025 Kyrill Zotkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - +http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +or implied. +See the License for the specific language governing permissions +and limitations under the License. @@ -98,107 +93,8 @@ See the License for the specific language governing permissions and limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="org.enterprisedomain.classmaker.ui" + version="0.0.0"/> diff --git a/features/org.enterprisedomain.classmaker.ecp.feature/pom.xml b/features/org.enterprisedomain.classmaker.ui.feature/pom.xml similarity index 81% rename from features/org.enterprisedomain.classmaker.ecp.feature/pom.xml rename to features/org.enterprisedomain.classmaker.ui.feature/pom.xml index 1a1bcbc0..c5ca58ee 100644 --- a/features/org.enterprisedomain.classmaker.ecp.feature/pom.xml +++ b/features/org.enterprisedomain.classmaker.ui.feature/pom.xml @@ -2,11 +2,11 @@ 4.0.0 eclipse-feature - org.enterprisedomain.classmaker.ecp.feature + org.enterprisedomain.classmaker.ui.feature org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/features/org.enterprisedomain.classmaker.ui.feature/target/feature.xml b/features/org.enterprisedomain.classmaker.ui.feature/target/feature.xml new file mode 100644 index 00000000..dfdd7d62 --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/target/feature.xml @@ -0,0 +1,100 @@ + + + + + Copyright 2012-2025 Kyrill Zotkin +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +or implied. +See the License for the specific language governing permissions +and +limitations under the License. + + + + Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: HOW TO APPLY THE APACHE LICENSE TO YOUR WORK +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + + + diff --git a/features/org.enterprisedomain.classmaker.ui.feature/target/local-artifacts.properties b/features/org.enterprisedomain.classmaker.ui.feature/target/local-artifacts.properties new file mode 100644 index 00000000..03040263 --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/target/local-artifacts.properties @@ -0,0 +1,4 @@ +#Sun Mar 23 20:03:59 KRAT 2025 +artifact.attached.p2artifacts=/home/kyrill/Documents/devel/git/ClassMaker/features/org.enterprisedomain.classmaker.ui.feature/target/p2artifacts.xml +artifact.attached.p2metadata=/home/kyrill/Documents/devel/git/ClassMaker/features/org.enterprisedomain.classmaker.ui.feature/target/p2content.xml +artifact.main=/home/kyrill/Documents/devel/git/ClassMaker/features/org.enterprisedomain.classmaker.ui.feature/target/org.enterprisedomain.classmaker.ui.feature_0.8.55.jar diff --git a/features/org.enterprisedomain.classmaker.ui.feature/target/p2artifacts.xml b/features/org.enterprisedomain.classmaker.ui.feature/target/p2artifacts.xml new file mode 100644 index 00000000..fb8d4349 --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/target/p2artifacts.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/features/org.enterprisedomain.classmaker.ui.feature/target/p2content.xml b/features/org.enterprisedomain.classmaker.ui.feature/target/p2content.xml new file mode 100644 index 00000000..ff613e8e --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/target/p2content.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + (org.eclipse.update.install.features=true) + + + + + + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: HOW TO APPLY THE APACHE LICENSE TO YOUR WORK To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + + + Copyright 2012-2025 Kyrill Zotkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + + + + + + + + + + + + + + + + + + + (org.eclipse.update.install.features=true) + + + + + + + + + true + + + + + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: HOW TO APPLY THE APACHE LICENSE TO YOUR WORK To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + + + Copyright 2012-2025 Kyrill Zotkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + + diff --git a/features/org.enterprisedomain.classmaker.ui.feature/target/skippedP2Dependencies.txt b/features/org.enterprisedomain.classmaker.ui.feature/target/skippedP2Dependencies.txt new file mode 100644 index 00000000..f414b7eb --- /dev/null +++ b/features/org.enterprisedomain.classmaker.ui.feature/target/skippedP2Dependencies.txt @@ -0,0 +1,274 @@ +p2.eclipse.feature:org.eclipse.e4.rcp:eclipse-feature @ /home/kyrill/.m2/repository/p2/org/eclipse/update/feature/org.eclipse.e4.rcp/4.35.0.v20250228-0640/org.eclipse.e4.rcp-4.35.0.v20250228-0640.jar +p2.eclipse.feature:org.eclipse.emf.common:eclipse-feature @ /home/kyrill/.m2/repository/p2/org/eclipse/update/feature/org.eclipse.emf.common/2.34.0.v20241204-1554/org.eclipse.emf.common-2.34.0.v20241204-1554.jar +p2.eclipse.feature:org.eclipse.emf.ecore:eclipse-feature @ /home/kyrill/.m2/repository/p2/org/eclipse/update/feature/org.eclipse.emf.ecore/2.39.0.v20241018-1213/org.eclipse.emf.ecore-2.39.0.v20241018-1213.jar +p2.eclipse.plugin:com.sun.jna.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/com.sun.jna.source/5.16.0.v20241222-1200/com.sun.jna.source-5.16.0.v20241222-1200.jar +p2.eclipse.plugin:com.sun.jna:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/com.sun.jna/5.16.0.v20241222-1200/com.sun.jna-5.16.0.v20241222-1200.jar +p2.eclipse.plugin:org.apache.ant.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.apache.ant.source/1.10.15.v20240901-1000/org.apache.ant.source-1.10.15.v20240901-1000.jar +p2.eclipse.plugin:org.apache.ant:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.apache.ant/1.10.15.v20240901-1000/org.apache.ant-1.10.15.v20240901-1000.jar +p2.eclipse.plugin:org.apache.batik.css:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.apache.batik.css/1.18.0.v20241009-1200/org.apache.batik.css-1.18.0.v20241009-1200.jar +p2.eclipse.plugin:org.apache.batik.i18n:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.apache.batik.i18n/1.18.0.v20241009-1200/org.apache.batik.i18n-1.18.0.v20241009-1200.jar +p2.eclipse.plugin:org.commonmark-gfm-tables:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.commonmark-gfm-tables/0.24.0.v20241021-1700/org.commonmark-gfm-tables-0.24.0.v20241021-1700.jar +p2.eclipse.plugin:org.commonmark:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.commonmark/0.24.0.v20241021-1700/org.commonmark-0.24.0.v20241021-1700.jar +p2.eclipse.plugin:org.eclipse.ant.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ant.core.source/3.7.600.v20241215-2025/org.eclipse.ant.core.source-3.7.600.v20241215-2025.jar +p2.eclipse.plugin:org.eclipse.ant.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ant.core/3.7.600.v20241215-2025/org.eclipse.ant.core-3.7.600.v20241215-2025.jar +p2.eclipse.plugin:org.eclipse.compare.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.compare.core.source/3.8.700.v20250120-0641/org.eclipse.compare.core.source-3.8.700.v20250120-0641.jar +p2.eclipse.plugin:org.eclipse.compare.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.compare.core/3.8.700.v20250120-0641/org.eclipse.compare.core-3.8.700.v20250120-0641.jar +p2.eclipse.plugin:org.eclipse.core.commands.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.commands.source/3.12.300.v20241229-1638/org.eclipse.core.commands.source-3.12.300.v20241229-1638.jar +p2.eclipse.plugin:org.eclipse.core.commands:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.commands/3.12.300.v20241229-1638/org.eclipse.core.commands-3.12.300.v20241229-1638.jar +p2.eclipse.plugin:org.eclipse.core.contenttype.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.contenttype.source/3.9.600.v20241001-1711/org.eclipse.core.contenttype.source-3.9.600.v20241001-1711.jar +p2.eclipse.plugin:org.eclipse.core.contenttype:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.contenttype/3.9.600.v20241001-1711/org.eclipse.core.contenttype-3.9.600.v20241001-1711.jar +p2.eclipse.plugin:org.eclipse.core.databinding.beans.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.beans.source/1.10.300.v20240321-1245/org.eclipse.core.databinding.beans.source-1.10.300.v20240321-1245.jar +p2.eclipse.plugin:org.eclipse.core.databinding.beans:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.beans/1.10.300.v20240321-1245/org.eclipse.core.databinding.beans-1.10.300.v20240321-1245.jar +p2.eclipse.plugin:org.eclipse.core.databinding.observable.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.observable.source/1.13.300.v20240424-0444/org.eclipse.core.databinding.observable.source-1.13.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.core.databinding.observable:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.observable/1.13.300.v20240424-0444/org.eclipse.core.databinding.observable-1.13.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.core.databinding.property.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.property.source/1.10.300.v20240424-0444/org.eclipse.core.databinding.property.source-1.10.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.core.databinding.property:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.property/1.10.300.v20240424-0444/org.eclipse.core.databinding.property-1.10.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.core.databinding.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding.source/1.13.400.v20250122-0807/org.eclipse.core.databinding.source-1.13.400.v20250122-0807.jar +p2.eclipse.plugin:org.eclipse.core.databinding:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.databinding/1.13.400.v20250122-0807/org.eclipse.core.databinding-1.13.400.v20250122-0807.jar +p2.eclipse.plugin:org.eclipse.core.expressions.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions.source/3.9.400.v20240413-1529/org.eclipse.core.expressions.source-3.9.400.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.core.expressions:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.expressions/3.9.400.v20240413-1529/org.eclipse.core.expressions-3.9.400.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.core.filebuffers.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.filebuffers.source/3.8.400.v20250108-1526/org.eclipse.core.filebuffers.source-3.8.400.v20250108-1526.jar +p2.eclipse.plugin:org.eclipse.core.filebuffers:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.filebuffers/3.8.400.v20250108-1526/org.eclipse.core.filebuffers-3.8.400.v20250108-1526.jar +p2.eclipse.plugin:org.eclipse.core.filesystem.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.filesystem.source/1.11.100.v20241022-0806/org.eclipse.core.filesystem.source-1.11.100.v20241022-0806.jar +p2.eclipse.plugin:org.eclipse.core.filesystem:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.filesystem/1.11.100.v20241022-0806/org.eclipse.core.filesystem-1.11.100.v20241022-0806.jar +p2.eclipse.plugin:org.eclipse.core.jobs.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.jobs.source/3.15.500.v20250204-0817/org.eclipse.core.jobs.source-3.15.500.v20250204-0817.jar +p2.eclipse.plugin:org.eclipse.core.jobs:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.jobs/3.15.500.v20250204-0817/org.eclipse.core.jobs-3.15.500.v20250204-0817.jar +p2.eclipse.plugin:org.eclipse.core.resources.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.resources.source/3.22.100.v20250206-1238/org.eclipse.core.resources.source-3.22.100.v20250206-1238.jar +p2.eclipse.plugin:org.eclipse.core.resources:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.resources/3.22.100.v20250206-1238/org.eclipse.core.resources-3.22.100.v20250206-1238.jar +p2.eclipse.plugin:org.eclipse.core.runtime.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.runtime.source/3.33.0.v20250206-0919/org.eclipse.core.runtime.source-3.33.0.v20250206-0919.jar +p2.eclipse.plugin:org.eclipse.core.runtime:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.runtime/3.33.0.v20250206-0919/org.eclipse.core.runtime-3.33.0.v20250206-0919.jar +p2.eclipse.plugin:org.eclipse.core.variables.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.variables.source/3.6.500.v20240702-1152/org.eclipse.core.variables.source-3.6.500.v20240702-1152.jar +p2.eclipse.plugin:org.eclipse.core.variables:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.core.variables/3.6.500.v20240702-1152/org.eclipse.core.variables-3.6.500.v20240702-1152.jar +p2.eclipse.plugin:org.eclipse.debug.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.debug.core.source/3.22.100.v20250129-1642/org.eclipse.debug.core.source-3.22.100.v20250129-1642.jar +p2.eclipse.plugin:org.eclipse.debug.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.debug.core/3.22.100.v20250129-1642/org.eclipse.debug.core-3.22.100.v20250129-1642.jar +p2.eclipse.plugin:org.eclipse.e4.core.commands.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.commands.source/1.1.500.v20241015-1729/org.eclipse.e4.core.commands.source-1.1.500.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.core.commands:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.commands/1.1.500.v20241015-1729/org.eclipse.e4.core.commands-1.1.500.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.core.contexts.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.contexts.source/1.13.100.v20250122-1647/org.eclipse.e4.core.contexts.source-1.13.100.v20250122-1647.jar +p2.eclipse.plugin:org.eclipse.e4.core.contexts:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.contexts/1.13.100.v20250122-1647/org.eclipse.e4.core.contexts-1.13.100.v20250122-1647.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.annotations.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.annotations.source/1.8.400.v20240413-1529/org.eclipse.e4.core.di.annotations.source-1.8.400.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.annotations:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.annotations/1.8.400.v20240413-1529/org.eclipse.e4.core.di.annotations-1.8.400.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.extensions.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.extensions.source/0.18.300.v20240413-1529/org.eclipse.e4.core.di.extensions.source-0.18.300.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.extensions.supplier.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.extensions.supplier.source/0.17.700.v20250122-1648/org.eclipse.e4.core.di.extensions.supplier.source-0.17.700.v20250122-1648.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.extensions.supplier:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.extensions.supplier/0.17.700.v20250122-1648/org.eclipse.e4.core.di.extensions.supplier-0.17.700.v20250122-1648.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.extensions:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.extensions/0.18.300.v20240413-1529/org.eclipse.e4.core.di.extensions-0.18.300.v20240413-1529.jar +p2.eclipse.plugin:org.eclipse.e4.core.di.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di.source/1.9.500.v20240606-1236/org.eclipse.e4.core.di.source-1.9.500.v20240606-1236.jar +p2.eclipse.plugin:org.eclipse.e4.core.di:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.di/1.9.500.v20240606-1236/org.eclipse.e4.core.di-1.9.500.v20240606-1236.jar +p2.eclipse.plugin:org.eclipse.e4.core.services.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.services.source/2.5.100.v20250131-1039/org.eclipse.e4.core.services.source-2.5.100.v20250131-1039.jar +p2.eclipse.plugin:org.eclipse.e4.core.services:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.core.services/2.5.100.v20250131-1039/org.eclipse.e4.core.services-2.5.100.v20250131-1039.jar +p2.eclipse.plugin:org.eclipse.e4.emf.xpath.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.emf.xpath.source/0.6.0.v20250215-1931/org.eclipse.e4.emf.xpath.source-0.6.0.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.e4.emf.xpath:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.emf.xpath/0.6.0.v20250215-1931/org.eclipse.e4.emf.xpath-0.6.0.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.e4.ui.bindings.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.bindings.source/0.14.500.v20241015-1729/org.eclipse.e4.ui.bindings.source-0.14.500.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.ui.bindings:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.bindings/0.14.500.v20241015-1729/org.eclipse.e4.ui.bindings-0.14.500.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.core.source/0.14.500.v20240606-0949/org.eclipse.e4.ui.css.core.source-0.14.500.v20240606-0949.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.core/0.14.500.v20240606-0949/org.eclipse.e4.ui.css.core-0.14.500.v20240606-0949.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.swt.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.swt.source/0.15.500.v20241219-0802/org.eclipse.e4.ui.css.swt.source-0.15.500.v20241219-0802.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.swt.theme.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.swt.theme.source/0.14.500.v20250213-1508/org.eclipse.e4.ui.css.swt.theme.source-0.14.500.v20250213-1508.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.swt.theme:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.swt.theme/0.14.500.v20250213-1508/org.eclipse.e4.ui.css.swt.theme-0.14.500.v20250213-1508.jar +p2.eclipse.plugin:org.eclipse.e4.ui.css.swt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.css.swt/0.15.500.v20241219-0802/org.eclipse.e4.ui.css.swt-0.15.500.v20241219-0802.jar +p2.eclipse.plugin:org.eclipse.e4.ui.di.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.di.source/1.5.500.v20250105-1208/org.eclipse.e4.ui.di.source-1.5.500.v20250105-1208.jar +p2.eclipse.plugin:org.eclipse.e4.ui.di:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.di/1.5.500.v20250105-1208/org.eclipse.e4.ui.di-1.5.500.v20250105-1208.jar +p2.eclipse.plugin:org.eclipse.e4.ui.dialogs.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.dialogs.source/1.6.0.v20250131-1354/org.eclipse.e4.ui.dialogs.source-1.6.0.v20250131-1354.jar +p2.eclipse.plugin:org.eclipse.e4.ui.dialogs:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.dialogs/1.6.0.v20250131-1354/org.eclipse.e4.ui.dialogs-1.6.0.v20250131-1354.jar +p2.eclipse.plugin:org.eclipse.e4.ui.model.workbench.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.model.workbench.source/2.4.500.v20250215-1931/org.eclipse.e4.ui.model.workbench.source-2.4.500.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.e4.ui.model.workbench:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.model.workbench/2.4.500.v20250215-1931/org.eclipse.e4.ui.model.workbench-2.4.500.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.e4.ui.progress.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.progress.source/0.4.700.v20241015-1729/org.eclipse.e4.ui.progress.source-0.4.700.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.ui.progress:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.progress/0.4.700.v20241015-1729/org.eclipse.e4.ui.progress-0.4.700.v20241015-1729.jar +p2.eclipse.plugin:org.eclipse.e4.ui.services.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.services.source/1.6.500.v20250123-0754/org.eclipse.e4.ui.services.source-1.6.500.v20250123-0754.jar +p2.eclipse.plugin:org.eclipse.e4.ui.services:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.services/1.6.500.v20250123-0754/org.eclipse.e4.ui.services-1.6.500.v20250123-0754.jar +p2.eclipse.plugin:org.eclipse.e4.ui.swt.gtk.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.swt.gtk.source/1.2.200.v20240416-0658/org.eclipse.e4.ui.swt.gtk.source-1.2.200.v20240416-0658.jar +p2.eclipse.plugin:org.eclipse.e4.ui.swt.gtk:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.swt.gtk/1.2.200.v20240416-0658/org.eclipse.e4.ui.swt.gtk-1.2.200.v20240416-0658.jar +p2.eclipse.plugin:org.eclipse.e4.ui.swt.win32.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.swt.win32.source/1.2.300.v20240416-0658/org.eclipse.e4.ui.swt.win32.source-1.2.300.v20240416-0658.jar +p2.eclipse.plugin:org.eclipse.e4.ui.swt.win32:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.swt.win32/1.2.300.v20240416-0658/org.eclipse.e4.ui.swt.win32-1.2.300.v20240416-0658.jar +p2.eclipse.plugin:org.eclipse.e4.ui.widgets.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.widgets.source/1.4.200.v20240801-0837/org.eclipse.e4.ui.widgets.source-1.4.200.v20240801-0837.jar +p2.eclipse.plugin:org.eclipse.e4.ui.widgets:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.widgets/1.4.200.v20240801-0837/org.eclipse.e4.ui.widgets-1.4.200.v20240801-0837.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.addons.swt.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.addons.swt.source/1.5.600.v20241107-2150/org.eclipse.e4.ui.workbench.addons.swt.source-1.5.600.v20241107-2150.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.addons.swt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.addons.swt/1.5.600.v20241107-2150/org.eclipse.e4.ui.workbench.addons.swt-1.5.600.v20241107-2150.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.renderers.swt.cocoa.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.source/0.14.400.v20240525-0701/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.source-0.14.400.v20240525-0701.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.renderers.swt.cocoa:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.renderers.swt.cocoa/0.14.400.v20240525-0701/org.eclipse.e4.ui.workbench.renderers.swt.cocoa-0.14.400.v20240525-0701.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.renderers.swt.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.renderers.swt.source/0.16.700.v20250212-1224/org.eclipse.e4.ui.workbench.renderers.swt.source-0.16.700.v20250212-1224.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.renderers.swt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.renderers.swt/0.16.700.v20250212-1224/org.eclipse.e4.ui.workbench.renderers.swt-0.16.700.v20250212-1224.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.source/1.17.0.v20250215-1931/org.eclipse.e4.ui.workbench.source-1.17.0.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.swt.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.swt.source/0.17.700.v20250123-0706/org.eclipse.e4.ui.workbench.swt.source-0.17.700.v20250123-0706.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench.swt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench.swt/0.17.700.v20250123-0706/org.eclipse.e4.ui.workbench.swt-0.17.700.v20250123-0706.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench3.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench3.source/0.17.400.v20240321-1245/org.eclipse.e4.ui.workbench3.source-0.17.400.v20240321-1245.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench3:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench3/0.17.400.v20240321-1245/org.eclipse.e4.ui.workbench3-0.17.400.v20240321-1245.jar +p2.eclipse.plugin:org.eclipse.e4.ui.workbench:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.e4.ui.workbench/1.17.0.v20250215-1931/org.eclipse.e4.ui.workbench-1.17.0.v20250215-1931.jar +p2.eclipse.plugin:org.eclipse.ecf.filetransfer.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.filetransfer.source/5.1.103.v20230705-0614/org.eclipse.ecf.filetransfer.source-5.1.103.v20230705-0614.jar +p2.eclipse.plugin:org.eclipse.ecf.filetransfer:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.filetransfer/5.1.103.v20230705-0614/org.eclipse.ecf.filetransfer-5.1.103.v20230705-0614.jar +p2.eclipse.plugin:org.eclipse.ecf.identity.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.identity.source/3.10.0.v20240812-1535/org.eclipse.ecf.identity.source-3.10.0.v20240812-1535.jar +p2.eclipse.plugin:org.eclipse.ecf.identity:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.identity/3.10.0.v20240812-1535/org.eclipse.ecf.identity-3.10.0.v20240812-1535.jar +p2.eclipse.plugin:org.eclipse.ecf.provider.filetransfer.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.provider.filetransfer.source/3.3.100.v20250115-0406/org.eclipse.ecf.provider.filetransfer.source-3.3.100.v20250115-0406.jar +p2.eclipse.plugin:org.eclipse.ecf.provider.filetransfer:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.provider.filetransfer/3.3.100.v20250115-0406/org.eclipse.ecf.provider.filetransfer-3.3.100.v20250115-0406.jar +p2.eclipse.plugin:org.eclipse.ecf.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf.source/3.12.0.v20250111-0100/org.eclipse.ecf.source-3.12.0.v20250111-0100.jar +p2.eclipse.plugin:org.eclipse.ecf:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ecf/3.12.0.v20250111-0100/org.eclipse.ecf-3.12.0.v20250111-0100.jar +p2.eclipse.plugin:org.eclipse.emf.codegen.ecore.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen.ecore.source/2.41.0.v20241204-1212/org.eclipse.emf.codegen.ecore.source-2.41.0.v20241204-1212.jar +p2.eclipse.plugin:org.eclipse.emf.codegen.ecore:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen.ecore/2.41.0.v20241204-1212/org.eclipse.emf.codegen.ecore-2.41.0.v20241204-1212.jar +p2.eclipse.plugin:org.eclipse.emf.codegen.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen.source/2.25.0.v20240911-1027/org.eclipse.emf.codegen.source-2.25.0.v20240911-1027.jar +p2.eclipse.plugin:org.eclipse.emf.codegen:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.codegen/2.25.0.v20240911-1027/org.eclipse.emf.codegen-2.25.0.v20240911-1027.jar +p2.eclipse.plugin:org.eclipse.emf.common.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common.source/2.41.0.v20241204-1554/org.eclipse.emf.common.source-2.41.0.v20241204-1554.jar +p2.eclipse.plugin:org.eclipse.emf.common.ui.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common.ui.source/2.24.0.v20240911-1027/org.eclipse.emf.common.ui.source-2.24.0.v20240911-1027.jar +p2.eclipse.plugin:org.eclipse.emf.common.ui:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common.ui/2.24.0.v20240911-1027/org.eclipse.emf.common.ui-2.24.0.v20240911-1027.jar +p2.eclipse.plugin:org.eclipse.emf.common:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.common/2.41.0.v20241204-1554/org.eclipse.emf.common-2.41.0.v20241204-1554.jar +p2.eclipse.plugin:org.eclipse.emf.ecore.change.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.change.source/2.17.0.v20240604-0832/org.eclipse.emf.ecore.change.source-2.17.0.v20240604-0832.jar +p2.eclipse.plugin:org.eclipse.emf.ecore.change:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.change/2.17.0.v20240604-0832/org.eclipse.emf.ecore.change-2.17.0.v20240604-0832.jar +p2.eclipse.plugin:org.eclipse.emf.ecore.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.source/2.38.0.v20241018-1213/org.eclipse.emf.ecore.source-2.38.0.v20241018-1213.jar +p2.eclipse.plugin:org.eclipse.emf.ecore.xmi.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.xmi.source/2.38.0.v20240721-0634/org.eclipse.emf.ecore.xmi.source-2.38.0.v20240721-0634.jar +p2.eclipse.plugin:org.eclipse.emf.ecore.xmi:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore.xmi/2.38.0.v20240721-0634/org.eclipse.emf.ecore.xmi-2.38.0.v20240721-0634.jar +p2.eclipse.plugin:org.eclipse.emf.ecore:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.ecore/2.38.0.v20241018-1213/org.eclipse.emf.ecore-2.38.0.v20241018-1213.jar +p2.eclipse.plugin:org.eclipse.emf.edit.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.edit.source/2.22.0.v20240604-0832/org.eclipse.emf.edit.source-2.22.0.v20240604-0832.jar +p2.eclipse.plugin:org.eclipse.emf.edit.ui.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.edit.ui.source/2.25.0.v20241015-0644/org.eclipse.emf.edit.ui.source-2.25.0.v20241015-0644.jar +p2.eclipse.plugin:org.eclipse.emf.edit.ui:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.edit.ui/2.25.0.v20241015-0644/org.eclipse.emf.edit.ui-2.25.0.v20241015-0644.jar +p2.eclipse.plugin:org.eclipse.emf.edit:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.edit/2.22.0.v20240604-0832/org.eclipse.emf.edit-2.22.0.v20240604-0832.jar +p2.eclipse.plugin:org.eclipse.emf.query:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.emf.query/1.7.0.202208101410/org.eclipse.emf.query-1.7.0.202208101410.jar +p2.eclipse.plugin:org.eclipse.equinox.app.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.app.source/1.7.300.v20250130-0528/org.eclipse.equinox.app.source-1.7.300.v20250130-0528.jar +p2.eclipse.plugin:org.eclipse.equinox.app:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.app/1.7.300.v20250130-0528/org.eclipse.equinox.app-1.7.300.v20250130-0528.jar +p2.eclipse.plugin:org.eclipse.equinox.bidi.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.bidi.source/1.5.200.v20250129-1129/org.eclipse.equinox.bidi.source-1.5.200.v20250129-1129.jar +p2.eclipse.plugin:org.eclipse.equinox.bidi:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.bidi/1.5.200.v20250129-1129/org.eclipse.equinox.bidi-1.5.200.v20250129-1129.jar +p2.eclipse.plugin:org.eclipse.equinox.common.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.common.source/3.20.0.v20250129-1348/org.eclipse.equinox.common.source-3.20.0.v20250129-1348.jar +p2.eclipse.plugin:org.eclipse.equinox.common:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.common/3.20.0.v20250129-1348/org.eclipse.equinox.common-3.20.0.v20250129-1348.jar +p2.eclipse.plugin:org.eclipse.equinox.concurrent.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.concurrent.source/1.3.200.v20250130-0530/org.eclipse.equinox.concurrent.source-1.3.200.v20250130-0530.jar +p2.eclipse.plugin:org.eclipse.equinox.concurrent:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.concurrent/1.3.200.v20250130-0530/org.eclipse.equinox.concurrent-1.3.200.v20250130-0530.jar +p2.eclipse.plugin:org.eclipse.equinox.console.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.console.source/1.4.900.v20250130-0533/org.eclipse.equinox.console.source-1.4.900.v20250130-0533.jar +p2.eclipse.plugin:org.eclipse.equinox.console:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.console/1.4.900.v20250130-0533/org.eclipse.equinox.console-1.4.900.v20250130-0533.jar +p2.eclipse.plugin:org.eclipse.equinox.event.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.event.source/1.7.200.v20250129-1349/org.eclipse.equinox.event.source-1.7.200.v20250129-1349.jar +p2.eclipse.plugin:org.eclipse.equinox.event:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.event/1.7.200.v20250129-1349/org.eclipse.equinox.event-1.7.200.v20250129-1349.jar +p2.eclipse.plugin:org.eclipse.equinox.frameworkadmin.equinox.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.frameworkadmin.equinox.source/1.3.300.v20250201-0550/org.eclipse.equinox.frameworkadmin.equinox.source-1.3.300.v20250201-0550.jar +p2.eclipse.plugin:org.eclipse.equinox.frameworkadmin.equinox:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.frameworkadmin.equinox/1.3.300.v20250201-0550/org.eclipse.equinox.frameworkadmin.equinox-1.3.300.v20250201-0550.jar +p2.eclipse.plugin:org.eclipse.equinox.frameworkadmin.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.frameworkadmin.source/2.3.300.v20250129-0943/org.eclipse.equinox.frameworkadmin.source-2.3.300.v20250129-0943.jar +p2.eclipse.plugin:org.eclipse.equinox.frameworkadmin:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.frameworkadmin/2.3.300.v20250129-0943/org.eclipse.equinox.frameworkadmin-2.3.300.v20250129-0943.jar +p2.eclipse.plugin:org.eclipse.equinox.http.service.api:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.http.service.api/1.2.2.v20231218-2126/org.eclipse.equinox.http.service.api-1.2.2.v20231218-2126.jar +p2.eclipse.plugin:org.eclipse.equinox.launcher.cocoa.macosx.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/1.2.1200.v20250212-0927/org.eclipse.equinox.launcher.cocoa.macosx.x86_64-1.2.1200.v20250212-0927.jar +p2.eclipse.plugin:org.eclipse.equinox.launcher.gtk.linux.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher.gtk.linux.x86_64/1.2.1300.v20250212-0927/org.eclipse.equinox.launcher.gtk.linux.x86_64-1.2.1300.v20250212-0927.jar +p2.eclipse.plugin:org.eclipse.equinox.launcher.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher.source/1.6.1000.v20250227-1734/org.eclipse.equinox.launcher.source-1.6.1000.v20250227-1734.jar +p2.eclipse.plugin:org.eclipse.equinox.launcher.win32.win32.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher.win32.win32.x86_64/1.2.1200.v20250212-0927/org.eclipse.equinox.launcher.win32.win32.x86_64-1.2.1200.v20250212-0927.jar +p2.eclipse.plugin:org.eclipse.equinox.launcher:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.6.1000.v20250227-1734/org.eclipse.equinox.launcher-1.6.1000.v20250227-1734.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.artifact.repository.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.artifact.repository.source/1.5.600.v20250129-0528/org.eclipse.equinox.p2.artifact.repository.source-1.5.600.v20250129-0528.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.artifact.repository:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.artifact.repository/1.5.600.v20250129-0528/org.eclipse.equinox.p2.artifact.repository-1.5.600.v20250129-0528.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.core.source/2.13.0.v20250129-0522/org.eclipse.equinox.p2.core.source-2.13.0.v20250129-0522.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.core/2.13.0.v20250129-0522/org.eclipse.equinox.p2.core-2.13.0.v20250129-0522.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.director.app.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.director.app.source/1.3.600.v20250129-0527/org.eclipse.equinox.p2.director.app.source-1.3.600.v20250129-0527.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.director.app:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.director.app/1.3.600.v20250129-0527/org.eclipse.equinox.p2.director.app-1.3.600.v20250129-0527.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.director.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.director.source/2.6.600.v20250129-0525/org.eclipse.equinox.p2.director.source-2.6.600.v20250129-0525.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.director:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.director/2.6.600.v20250129-0525/org.eclipse.equinox.p2.director-2.6.600.v20250129-0525.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.engine.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.engine.source/2.10.400.v20250129-0520/org.eclipse.equinox.p2.engine.source-2.10.400.v20250129-0520.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.engine:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.engine/2.10.400.v20250129-0520/org.eclipse.equinox.p2.engine-2.10.400.v20250129-0520.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.garbagecollector.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.garbagecollector.source/1.3.500.v20250129-0521/org.eclipse.equinox.p2.garbagecollector.source-1.3.500.v20250129-0521.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.garbagecollector:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.garbagecollector/1.3.500.v20250129-0521/org.eclipse.equinox.p2.garbagecollector-1.3.500.v20250129-0521.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.jarprocessor.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.jarprocessor.source/1.3.500.v20250129-0523/org.eclipse.equinox.p2.jarprocessor.source-1.3.500.v20250129-0523.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.jarprocessor:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.jarprocessor/1.3.500.v20250129-0523/org.eclipse.equinox.p2.jarprocessor-1.3.500.v20250129-0523.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.metadata.repository.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.metadata.repository.source/1.5.500.v20250129-0521/org.eclipse.equinox.p2.metadata.repository.source-1.5.500.v20250129-0521.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.metadata.repository:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.metadata.repository/1.5.500.v20250129-0521/org.eclipse.equinox.p2.metadata.repository-1.5.500.v20250129-0521.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.metadata.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.metadata.source/2.9.300.v20250129-0519/org.eclipse.equinox.p2.metadata.source-2.9.300.v20250129-0519.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.metadata:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.metadata/2.9.300.v20250129-0519/org.eclipse.equinox.p2.metadata-2.9.300.v20250129-0519.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.operations.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.operations.source/2.7.500.v20250129-0944/org.eclipse.equinox.p2.operations.source-2.7.500.v20250129-0944.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.operations:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.operations/2.7.500.v20250129-0944/org.eclipse.equinox.p2.operations-2.7.500.v20250129-0944.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.publisher.eclipse.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.publisher.eclipse.source/1.6.400.v20250203-0704/org.eclipse.equinox.p2.publisher.eclipse.source-1.6.400.v20250203-0704.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.publisher.eclipse:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.publisher.eclipse/1.6.400.v20250203-0704/org.eclipse.equinox.p2.publisher.eclipse-1.6.400.v20250203-0704.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.publisher.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.publisher.source/1.9.400.v20250201-1219/org.eclipse.equinox.p2.publisher.source-1.9.400.v20250201-1219.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.publisher:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.publisher/1.9.400.v20250201-1219/org.eclipse.equinox.p2.publisher-1.9.400.v20250201-1219.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.repository.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.repository.source/2.9.300.v20250212-0912/org.eclipse.equinox.p2.repository.source-2.9.300.v20250212-0912.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.repository.tools.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.repository.tools.source/2.4.600.v20250129-1127/org.eclipse.equinox.p2.repository.tools.source-2.4.600.v20250129-1127.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.repository.tools:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.repository.tools/2.4.600.v20250129-1127/org.eclipse.equinox.p2.repository.tools-2.4.600.v20250129-1127.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.repository:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.repository/2.9.300.v20250212-0912/org.eclipse.equinox.p2.repository-2.9.300.v20250212-0912.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.touchpoint.eclipse.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.touchpoint.eclipse.source/2.4.400.v20250129-1124/org.eclipse.equinox.p2.touchpoint.eclipse.source-2.4.400.v20250129-1124.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.touchpoint.eclipse:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.touchpoint.eclipse/2.4.400.v20250129-1124/org.eclipse.equinox.p2.touchpoint.eclipse-2.4.400.v20250129-1124.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.touchpoint.natives.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.touchpoint.natives.source/1.5.500.v20250129-1123/org.eclipse.equinox.p2.touchpoint.natives.source-1.5.500.v20250129-1123.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.touchpoint.natives:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.touchpoint.natives/1.5.500.v20250129-1123/org.eclipse.equinox.p2.touchpoint.natives-1.5.500.v20250129-1123.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.transport.ecf.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.transport.ecf.source/1.4.400.v20250129-1119/org.eclipse.equinox.p2.transport.ecf.source-1.4.400.v20250129-1119.jar +p2.eclipse.plugin:org.eclipse.equinox.p2.transport.ecf:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.p2.transport.ecf/1.4.400.v20250129-1119/org.eclipse.equinox.p2.transport.ecf-1.4.400.v20250129-1119.jar +p2.eclipse.plugin:org.eclipse.equinox.preferences.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.preferences.source/3.11.300.v20250130-0533/org.eclipse.equinox.preferences.source-3.11.300.v20250130-0533.jar +p2.eclipse.plugin:org.eclipse.equinox.preferences:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.preferences/3.11.300.v20250130-0533/org.eclipse.equinox.preferences-3.11.300.v20250130-0533.jar +p2.eclipse.plugin:org.eclipse.equinox.registry.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.registry.source/3.12.300.v20250129-1129/org.eclipse.equinox.registry.source-3.12.300.v20250129-1129.jar +p2.eclipse.plugin:org.eclipse.equinox.registry:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.registry/3.12.300.v20250129-1129/org.eclipse.equinox.registry-3.12.300.v20250129-1129.jar +p2.eclipse.plugin:org.eclipse.equinox.security.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.security.source/1.4.500.v20250129-1350/org.eclipse.equinox.security.source-1.4.500.v20250129-1350.jar +p2.eclipse.plugin:org.eclipse.equinox.security:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.security/1.4.500.v20250129-1350/org.eclipse.equinox.security-1.4.500.v20250129-1350.jar +p2.eclipse.plugin:org.eclipse.equinox.simpleconfigurator.manipulator.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.simpleconfigurator.manipulator.source/2.3.400.v20250129-1118/org.eclipse.equinox.simpleconfigurator.manipulator.source-2.3.400.v20250129-1118.jar +p2.eclipse.plugin:org.eclipse.equinox.simpleconfigurator.manipulator:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.simpleconfigurator.manipulator/2.3.400.v20250129-1118/org.eclipse.equinox.simpleconfigurator.manipulator-2.3.400.v20250129-1118.jar +p2.eclipse.plugin:org.eclipse.equinox.simpleconfigurator.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.simpleconfigurator.source/1.5.400.v20250129-0942/org.eclipse.equinox.simpleconfigurator.source-1.5.400.v20250129-0942.jar +p2.eclipse.plugin:org.eclipse.equinox.simpleconfigurator:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.simpleconfigurator/1.5.400.v20250129-0942/org.eclipse.equinox.simpleconfigurator-1.5.400.v20250129-0942.jar +p2.eclipse.plugin:org.eclipse.help.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.help.source/3.10.400.v20240415-0528/org.eclipse.help.source-3.10.400.v20240415-0528.jar +p2.eclipse.plugin:org.eclipse.help:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.help/3.10.400.v20240415-0528/org.eclipse.help-3.10.400.v20240415-0528.jar +p2.eclipse.plugin:org.eclipse.jdt.annotation.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.annotation.source/2.3.100.v20241001-0914/org.eclipse.jdt.annotation.source-2.3.100.v20241001-0914.jar +p2.eclipse.plugin:org.eclipse.jdt.annotation:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.annotation/2.3.100.v20241001-0914/org.eclipse.jdt.annotation-2.3.100.v20241001-0914.jar +p2.eclipse.plugin:org.eclipse.jdt.core.compiler.batch.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core.compiler.batch.source/3.41.0.v20250213-1140/org.eclipse.jdt.core.compiler.batch.source-3.41.0.v20250213-1140.jar +p2.eclipse.plugin:org.eclipse.jdt.core.compiler.batch:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core.compiler.batch/3.41.0.v20250213-1140/org.eclipse.jdt.core.compiler.batch-3.41.0.v20250213-1140.jar +p2.eclipse.plugin:org.eclipse.jdt.core.manipulation.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core.manipulation.source/1.22.0.v20250212-0215/org.eclipse.jdt.core.manipulation.source-1.22.0.v20250212-0215.jar +p2.eclipse.plugin:org.eclipse.jdt.core.manipulation:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core.manipulation/1.22.0.v20250212-0215/org.eclipse.jdt.core.manipulation-1.22.0.v20250212-0215.jar +p2.eclipse.plugin:org.eclipse.jdt.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core.source/3.41.0.v20250213-2010/org.eclipse.jdt.core.source-3.41.0.v20250213-2010.jar +p2.eclipse.plugin:org.eclipse.jdt.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.core/3.41.0.v20250213-2010/org.eclipse.jdt.core-3.41.0.v20250213-2010.jar +p2.eclipse.plugin:org.eclipse.jdt.debug.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.debug.source/3.22.0.v20250124-1739/org.eclipse.jdt.debug.source-3.22.0.v20250124-1739.jar +p2.eclipse.plugin:org.eclipse.jdt.debug:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.debug/3.22.0.v20250124-1739/org.eclipse.jdt.debug-3.22.0.v20250124-1739.jar +p2.eclipse.plugin:org.eclipse.jdt.junit.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.junit.core.source/3.13.500.v20250108-1123/org.eclipse.jdt.junit.core.source-3.13.500.v20250108-1123.jar +p2.eclipse.plugin:org.eclipse.jdt.junit.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.junit.core/3.13.500.v20250108-1123/org.eclipse.jdt.junit.core-3.13.500.v20250108-1123.jar +p2.eclipse.plugin:org.eclipse.jdt.junit.runtime.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.junit.runtime.source/3.7.600.v20250118-1031/org.eclipse.jdt.junit.runtime.source-3.7.600.v20250118-1031.jar +p2.eclipse.plugin:org.eclipse.jdt.junit.runtime:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.junit.runtime/3.7.600.v20250118-1031/org.eclipse.jdt.junit.runtime-3.7.600.v20250118-1031.jar +p2.eclipse.plugin:org.eclipse.jdt.launching.macosx.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.launching.macosx.source/3.6.300.v20240321-1645/org.eclipse.jdt.launching.macosx.source-3.6.300.v20240321-1645.jar +p2.eclipse.plugin:org.eclipse.jdt.launching.macosx:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.launching.macosx/3.6.300.v20240321-1645/org.eclipse.jdt.launching.macosx-3.6.300.v20240321-1645.jar +p2.eclipse.plugin:org.eclipse.jdt.launching.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.launching.source/3.23.200.v20250110-0740/org.eclipse.jdt.launching.source-3.23.200.v20250110-0740.jar +p2.eclipse.plugin:org.eclipse.jdt.launching:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jdt.launching/3.23.200.v20250110-0740/org.eclipse.jdt.launching-3.23.200.v20250110-0740.jar +p2.eclipse.plugin:org.eclipse.jface.databinding.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface.databinding.source/1.15.300.v20240424-0444/org.eclipse.jface.databinding.source-1.15.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.jface.databinding:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface.databinding/1.15.300.v20240424-0444/org.eclipse.jface.databinding-1.15.300.v20240424-0444.jar +p2.eclipse.plugin:org.eclipse.jface.notifications.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface.notifications.source/0.7.300.v20240707-1119/org.eclipse.jface.notifications.source-0.7.300.v20240707-1119.jar +p2.eclipse.plugin:org.eclipse.jface.notifications:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface.notifications/0.7.300.v20240707-1119/org.eclipse.jface.notifications-0.7.300.v20240707-1119.jar +p2.eclipse.plugin:org.eclipse.jface.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface.source/3.36.0.v20250129-1243/org.eclipse.jface.source-3.36.0.v20250129-1243.jar +p2.eclipse.plugin:org.eclipse.jface:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jface/3.36.0.v20250129-1243/org.eclipse.jface-3.36.0.v20250129-1243.jar +p2.eclipse.plugin:org.eclipse.jgit.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jgit.source/7.2.0.202503040940-r/org.eclipse.jgit.source-7.2.0.202503040940-r.jar +p2.eclipse.plugin:org.eclipse.jgit:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.jgit/7.2.0.202503040940-r/org.eclipse.jgit-7.2.0.202503040940-r.jar +p2.eclipse.plugin:org.eclipse.ltk.core.refactoring.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ltk.core.refactoring.source/3.15.0.v20241206-0650/org.eclipse.ltk.core.refactoring.source-3.15.0.v20241206-0650.jar +p2.eclipse.plugin:org.eclipse.ltk.core.refactoring:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ltk.core.refactoring/3.15.0.v20241206-0650/org.eclipse.ltk.core.refactoring-3.15.0.v20241206-0650.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.common:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.common/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.common-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.cst.parser:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.cst.parser/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.cst.parser-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.ecore.imperativeocl:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.ecore.imperativeocl/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.ecore.imperativeocl-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.emf.util:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.emf.util/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.emf.util-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.ocl:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.ocl/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.ocl-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.project:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.project/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.project-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml.runtime:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml.runtime/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml.runtime-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.m2m.qvt.oml:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.m2m.qvt.oml/3.11.0.v20240902-1403/org.eclipse.m2m.qvt.oml-3.11.0.v20240902-1403.jar +p2.eclipse.plugin:org.eclipse.nebula.cwt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.nebula.cwt/1.1.0.202501071519/org.eclipse.nebula.cwt-1.1.0.202501071519.jar +p2.eclipse.plugin:org.eclipse.nebula.widgets.cdatetime:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.nebula.widgets.cdatetime/1.5.0.202501071519/org.eclipse.nebula.widgets.cdatetime-1.5.0.202501071519.jar +p2.eclipse.plugin:org.eclipse.ocl.common:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ocl.common/1.22.0.v20240902-1518/org.eclipse.ocl.common-1.22.0.v20240902-1518.jar +p2.eclipse.plugin:org.eclipse.ocl.ecore:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ocl.ecore/3.22.0.v20240902-1518/org.eclipse.ocl.ecore-3.22.0.v20240902-1518.jar +p2.eclipse.plugin:org.eclipse.ocl:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ocl/3.22.0.v20240902-1518/org.eclipse.ocl-3.22.0.v20240902-1518.jar +p2.eclipse.plugin:org.eclipse.orbit.xml-apis-ext.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.orbit.xml-apis-ext.source/1.0.0.v20240917-0534/org.eclipse.orbit.xml-apis-ext.source-1.0.0.v20240917-0534.jar +p2.eclipse.plugin:org.eclipse.orbit.xml-apis-ext:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.orbit.xml-apis-ext/1.0.0.v20240917-0534/org.eclipse.orbit.xml-apis-ext-1.0.0.v20240917-0534.jar +p2.eclipse.plugin:org.eclipse.osgi.compatibility.state.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.compatibility.state.source/1.2.1100.v20250129-0721/org.eclipse.osgi.compatibility.state.source-1.2.1100.v20250129-0721.jar +p2.eclipse.plugin:org.eclipse.osgi.compatibility.state:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.compatibility.state/1.2.1100.v20250129-0721/org.eclipse.osgi.compatibility.state-1.2.1100.v20250129-0721.jar +p2.eclipse.plugin:org.eclipse.osgi.services.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.services.source/3.12.200.v20241212-0858/org.eclipse.osgi.services.source-3.12.200.v20241212-0858.jar +p2.eclipse.plugin:org.eclipse.osgi.services:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.services/3.12.200.v20241212-0858/org.eclipse.osgi.services-3.12.200.v20241212-0858.jar +p2.eclipse.plugin:org.eclipse.osgi.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.source/3.23.0.v20250228-0640/org.eclipse.osgi.source-3.23.0.v20250228-0640.jar +p2.eclipse.plugin:org.eclipse.osgi.util:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi.util/3.7.300.v20231104-1118/org.eclipse.osgi.util-3.7.300.v20231104-1118.jar +p2.eclipse.plugin:org.eclipse.osgi:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.osgi/3.23.0.v20250228-0640/org.eclipse.osgi-3.23.0.v20250228-0640.jar +p2.eclipse.plugin:org.eclipse.pde.api.tools.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.api.tools.source/1.3.700.v20250211-2032/org.eclipse.pde.api.tools.source-1.3.700.v20250211-2032.jar +p2.eclipse.plugin:org.eclipse.pde.api.tools:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.api.tools/1.3.700.v20250211-2032/org.eclipse.pde.api.tools-1.3.700.v20250211-2032.jar +p2.eclipse.plugin:org.eclipse.pde.build.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.build.source/3.12.700.v20250128-1446/org.eclipse.pde.build.source-3.12.700.v20250128-1446.jar +p2.eclipse.plugin:org.eclipse.pde.build:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.build/3.12.700.v20250128-1446/org.eclipse.pde.build-3.12.700.v20250128-1446.jar +p2.eclipse.plugin:org.eclipse.pde.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.core.source/3.20.100.v20250211-2032/org.eclipse.pde.core.source-3.20.100.v20250211-2032.jar +p2.eclipse.plugin:org.eclipse.pde.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.core/3.20.100.v20250211-2032/org.eclipse.pde.core-3.20.100.v20250211-2032.jar +p2.eclipse.plugin:org.eclipse.pde.ds.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.ds.core.source/1.3.700.v20250128-1447/org.eclipse.pde.ds.core.source-1.3.700.v20250128-1447.jar +p2.eclipse.plugin:org.eclipse.pde.ds.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.ds.core/1.3.700.v20250128-1447/org.eclipse.pde.ds.core-1.3.700.v20250128-1447.jar +p2.eclipse.plugin:org.eclipse.pde.launching.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.launching.source/3.13.300.v20250115-1038/org.eclipse.pde.launching.source-3.13.300.v20250115-1038.jar +p2.eclipse.plugin:org.eclipse.pde.launching:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.pde.launching/3.13.300.v20250115-1038/org.eclipse.pde.launching-3.13.300.v20250115-1038.jar +p2.eclipse.plugin:org.eclipse.search.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.search.core.source/3.16.400.v20241111-2025/org.eclipse.search.core.source-3.16.400.v20241111-2025.jar +p2.eclipse.plugin:org.eclipse.search.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.search.core/3.16.400.v20241111-2025/org.eclipse.search.core-3.16.400.v20241111-2025.jar +p2.eclipse.plugin:org.eclipse.swt.cocoa.macosx.x86_64.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64.source/3.129.0.v20250221-1734/org.eclipse.swt.cocoa.macosx.x86_64.source-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt.cocoa.macosx.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.cocoa.macosx.x86_64/3.129.0.v20250221-1734/org.eclipse.swt.cocoa.macosx.x86_64-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt.gtk.linux.x86_64.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64.source/3.129.0.v20250221-1734/org.eclipse.swt.gtk.linux.x86_64.source-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt.gtk.linux.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.129.0.v20250221-1734/org.eclipse.swt.gtk.linux.x86_64-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt.win32.win32.x86_64.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.win32.win32.x86_64.source/3.129.0.v20250221-1734/org.eclipse.swt.win32.win32.x86_64.source-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt.win32.win32.x86_64:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt.win32.win32.x86_64/3.129.0.v20250221-1734/org.eclipse.swt.win32.win32.x86_64-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.swt:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.swt/3.129.0.v20250221-1734/org.eclipse.swt-3.129.0.v20250221-1734.jar +p2.eclipse.plugin:org.eclipse.team.core.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.team.core.source/3.10.600.v20250120-0641/org.eclipse.team.core.source-3.10.600.v20250120-0641.jar +p2.eclipse.plugin:org.eclipse.team.core:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.team.core/3.10.600.v20250120-0641/org.eclipse.team.core-3.10.600.v20250120-0641.jar +p2.eclipse.plugin:org.eclipse.text.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.text.source/3.14.300.v20250119-1501/org.eclipse.text.source-3.14.300.v20250119-1501.jar +p2.eclipse.plugin:org.eclipse.text:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.text/3.14.300.v20250119-1501/org.eclipse.text-3.14.300.v20250119-1501.jar +p2.eclipse.plugin:org.eclipse.ui.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui.source/3.207.100.v20250103-1151/org.eclipse.ui.source-3.207.100.v20250103-1151.jar +p2.eclipse.plugin:org.eclipse.ui.views.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui.views.source/3.12.500.v20240915-0736/org.eclipse.ui.views.source-3.12.500.v20240915-0736.jar +p2.eclipse.plugin:org.eclipse.ui.views:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui.views/3.12.500.v20240915-0736/org.eclipse.ui.views-3.12.500.v20240915-0736.jar +p2.eclipse.plugin:org.eclipse.ui.workbench.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench.source/3.135.0.v20250204-1142/org.eclipse.ui.workbench.source-3.135.0.v20250204-1142.jar +p2.eclipse.plugin:org.eclipse.ui.workbench:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui.workbench/3.135.0.v20250204-1142/org.eclipse.ui.workbench-3.135.0.v20250204-1142.jar +p2.eclipse.plugin:org.eclipse.ui:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.ui/3.207.100.v20250103-1151/org.eclipse.ui-3.207.100.v20250103-1151.jar +p2.eclipse.plugin:org.eclipse.urischeme.source:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.urischeme.source/1.3.500.v20240913-1323/org.eclipse.urischeme.source-1.3.500.v20240913-1323.jar +p2.eclipse.plugin:org.eclipse.urischeme:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.eclipse.urischeme/1.3.500.v20240913-1323/org.eclipse.urischeme-1.3.500.v20240913-1323.jar +p2.eclipse.plugin:org.junit:eclipse-plugin @ /home/kyrill/.m2/repository/p2/osgi/bundle/org.junit/4.13.2.v20240929-1000/org.junit-4.13.2.v20240929-1000.jar +p2.eclipse.plugin:wrapped.org.apache.xmlgraphics.batik-util:eclipse-plugin @ /home/kyrill/.m2/repository/org/apache/xmlgraphics/batik-util/1.18/bnd-741b261ef17547aa381bfd43531b8191/batik-util-1.18.jar +p2.eclipse.plugin:wrapped.org.apache.xmlgraphics.xmlgraphics-commons:eclipse-plugin @ /home/kyrill/.m2/repository/org/apache/xmlgraphics/xmlgraphics-commons/2.10/bnd-741b261ef17547aa381bfd43531b8191/xmlgraphics-commons-2.10.jar \ No newline at end of file diff --git a/features/org.enterprisedomain.ui.workbench.rcp.feature/feature.xml b/features/org.enterprisedomain.ui.workbench.rcp.feature/feature.xml index f0686d2e..845df047 100644 --- a/features/org.enterprisedomain.ui.workbench.rcp.feature/feature.xml +++ b/features/org.enterprisedomain.ui.workbench.rcp.feature/feature.xml @@ -2,16 +2,16 @@ - + enterpriseDomain Workbench is a ClassMaker RCP Application. - Copyright 2012-2021 Kyrill Zotkin + Copyright 2012-2025 Kyrill Zotkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -99,44 +99,29 @@ limitations under the License. - - - - - - - - - + - - - @@ -144,45 +129,21 @@ limitations under the License. - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - + version="0.0.0"/> diff --git a/features/org.enterprisedomain.ui.workbench.rcp.feature/plugin.xml b/features/org.enterprisedomain.ui.workbench.rcp.feature/plugin.xml deleted file mode 100644 index fc9bcdad..00000000 --- a/features/org.enterprisedomain.ui.workbench.rcp.feature/plugin.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - diff --git a/features/org.enterprisedomain.ui.workbench.rcp.feature/pom.xml b/features/org.enterprisedomain.ui.workbench.rcp.feature/pom.xml index ebf953cc..c1d57ecc 100644 --- a/features/org.enterprisedomain.ui.workbench.rcp.feature/pom.xml +++ b/features/org.enterprisedomain.ui.workbench.rcp.feature/pom.xml @@ -6,7 +6,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/pom.xml b/pom.xml index 951baf60..28d52c41 100644 --- a/pom.xml +++ b/pom.xml @@ -8,8 +8,8 @@ org.enterprisedomain org.enterprisedomain.configuration - 0.8.55-SNAPSHOT - ./releng/org.enterprisedomain.configuration + ./releng/org.enterprisedomain.configuration/pom.xml + 0.8.55 scm:git:https://github.com/enterpriseDomain/ClassMaker @@ -17,18 +17,16 @@ bundles/org.enterprisedomain.classmaker bundles/org.enterprisedomain.classmaker.osgi.systemextension - bundles/org.enterprisedomain.classmaker.edit bundles/org.enterprisedomain.classmaker.cdo bundles/org.enterprisedomain.classmaker.cdo.ui - bundles/org.enterprisedomain.ecp - bundles/org.enterprisedomain.ecp.filter - bundles/org.enterprisedomain.ecp.edit - bundles/org.enterprisedomain.ecp.ui + bundles/org.enterprisedomain.classmaker.ui + bundles/org.enterprisedomain.classmaker.edit bundles/org.enterprisedomain.workbench features/org.enterprisedomain.classmaker.feature - features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature + + features/org.enterprisedomain.classmaker.osgi.resolverhooks.feature + features/org.enterprisedomain.classmaker.ui.feature features/org.enterprisedomain.classmaker.edit.feature - features/org.enterprisedomain.classmaker.ecp.feature features/org.enterprisedomain.classmaker.cdo.feature features/org.enterprisedomain.classmaker.cdo.ui.feature features/org.enterprisedomain.ui.workbench.rcp.feature @@ -56,39 +54,27 @@ - org.eclipse.tycho.extras - tycho-source-feature-plugin + org.eclipse.tycho + tycho-source-plugin ${tycho.version} - source-feature + feature-source package - source-feature + feature-source - - - - + + + + - - org.eclipse.tycho - tycho-source-plugin - ${tycho.version} - - - plugin-source - - plugin-source - - - - true org.apache.maven.plugins @@ -121,5 +107,42 @@ - 0.8.55-SNAPSHOT + 0.8.55 + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.eclipse.tycho + + + tycho-bnd-plugin + + + [4.0.6,) + + + process + + + + + + + + + + + + + diff --git a/release.properties b/release.properties index aa244570..3f5d9ad7 100644 --- a/release.properties +++ b/release.properties @@ -1,18 +1,18 @@ -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.osgi.systemextension=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.osgi.systemextension=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.edit=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.edit=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.emfstore=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.emfstore=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.filter=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.filter=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.ui=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.ui=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.workbench=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.workbench=0.8.55-SNAPSHOT -project.rel.org.enterprisedomain\:org.enterprisedomain.target=0.8.55-SNAPSHOT -project.dev.org.enterprisedomain\:org.enterprisedomain.target=0.8.55-SNAPSHOT \ No newline at end of file +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.osgi.systemextension=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.osgi.systemextension=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.edit=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.edit=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.emfstore=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.emfstore=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.filter=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.filter=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.ui=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.ecp.ui=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.classmaker.workbench=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.classmaker.workbench=0.8.55 +project.rel.org.enterprisedomain\:org.enterprisedomain.target=0.8.55 +project.dev.org.enterprisedomain\:org.enterprisedomain.target=0.8.55 \ No newline at end of file diff --git a/releng/org.enterprisedomain.configuration/.classpath b/releng/org.enterprisedomain.configuration/.classpath index 07e790bd..a5e699ec 100644 --- a/releng/org.enterprisedomain.configuration/.classpath +++ b/releng/org.enterprisedomain.configuration/.classpath @@ -12,7 +12,7 @@ - + diff --git a/releng/org.enterprisedomain.configuration/pom.xml b/releng/org.enterprisedomain.configuration/pom.xml index 185c8de3..094f1d5c 100644 --- a/releng/org.enterprisedomain.configuration/pom.xml +++ b/releng/org.enterprisedomain.configuration/pom.xml @@ -1,11 +1,13 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.configuration - 0.8.55-SNAPSHOT + 0.8.55 - 2.7.4 + 5.0.2 ${tycho.version} UTF-8 @@ -20,21 +22,11 @@ p2 http://download.eclipse.org/releases/latest - - ecp - p2 - http://download.eclipse.org/ecp/releases/releases_target_127 - eclipse p2 https://download.eclipse.org/eclipse/updates/latest - - justj - https://download.eclipse.org/justj/jres/17/updates/release/latest - p2 - @@ -50,27 +42,28 @@ - ${project.artifactId}-${baseversion}.{buildQualifier} + ${project.artifactId}_${project.version} org.codehaus.mojo versions-maven-plugin - 2.1 + 2.16.2 maven-scm-plugin - 1.11.2 + 2.0.1 - ${project.artifactId}-${baseversion}.{buildQualifier} + ${project.artifactId}_${project.version} org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 - ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF @@ -80,19 +73,6 @@ ${tycho.version} true - - org.eclipse.tycho - tycho-source-plugin - ${tycho.version} - - - plugin-source - - plugin-source - - - - org.eclipse.tycho tycho-packaging-plugin @@ -103,25 +83,11 @@ package-feature false - ${project.artifactId}-${baseversion}.{buildQualifier} + ${project.artifactId}_${project.version} - - org.eclipse.tycho.extras - tycho-source-feature-plugin - ${tycho.extras.version} - - - source-feature - package - - source-feature - - - - org.eclipse.tycho tycho-p2-plugin @@ -141,33 +107,13 @@ target-platform-configuration ${tycho.version} - JavaSE-17 - - - - - org.enterprisedomain - org.enterprisedomain.target - [0.8.0,) - initialize - - default-target-platform - - - - - false - - - - - + JavaSE-21 consider org.enterprisedomain org.enterprisedomain.target - 0.8.55-SNAPSHOT + 0.8.55 @@ -201,7 +147,7 @@ org.apache.maven.plugins maven-toolchains-plugin - 3.0.0 + 3.1.0 validate @@ -213,7 +159,7 @@ - 17 + 21 eclipse @@ -330,11 +276,6 @@ commons-logging 1.2 - - com.oracle.database.jdbc - ojdbc8 - 21.6.0.0.1 - pom diff --git a/releng/org.enterprisedomain.target/etc.tpd b/releng/org.enterprisedomain.target/etc.tpd index e1124131..cfef027b 100644 --- a/releng/org.enterprisedomain.target/etc.tpd +++ b/releng/org.enterprisedomain.target/etc.tpd @@ -1,14 +1,7 @@ target "org.enterprisedomain.target.etc" with allEnvironments configurePhase -// location "http://download.eclipse.org/technology/swtbot/releases/latest/" { -// org.eclipse.swtbot.forms.feature.group -// org.eclipse.swtbot.eclipse.feature.group -// org.eclipse.swtbot.eclipse.gef.feature.group -// org.eclipse.swtbot.feature.group -// org.eclipse.swtbot.eclipse.test.junit.feature.group -// } -location "https://download.eclipse.org/modeling/emf/cdo/drops/R20210308-1312/" { - org.eclipse.emf.cdo.all.feature.group [4.13.0,5.0.0) +location "https://download.eclipse.org/modeling/emf/cdo/updates/releases/4.x/latest/" { + org.eclipse.emf.cdo.all.feature.group } location "https://download.eclipse.org/modeling/emf/compare/updates/releases/latest/" { @@ -20,126 +13,322 @@ location "https://download.eclipse.org/modeling/emf/compare/updates/releases/lat org.eclipse.emf.compare.rcp.ui } -location ecp "http://download.eclipse.org/ecp/releases/releases_target_127/" { - org.eclipse.emf.ecp.application.e3 [1.27.0,1.28.0) - org.eclipse.emf.ecp.e3.feature.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.e3.feature.source.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.core [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.model.provider.generator [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.model.provider.xmi [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.swt.layout [1.27.0,1.28.0) - org.eclipse.emf.ecp.edit [1.27.0,1.28.0) - org.eclipse.emf.ecp.ui [1.27.0,2.0.0) - org.eclipse.emf.ecp.ui.source [1.27.0,1.28.0) - org.eclipse.emf.ecp.ui.view.swt [1.27.0,1.28.0) - org.eclipse.emf.ecp.ui.e3 [1.27.0,1.28.0) - org.eclipse.emf.ecp.ecore.feature.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.ide.util [1.27.0,1.28.0) - org.eclipse.emf.ecp.ide.view.service [1.27.0,1.28.0) - org.eclipse.emf.ecp.common.ui [1.27.0,1.28.0) - org.eclipse.emf.ecp.emfforms.runtime.feature.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.emfforms.runtime.feature.source.feature.group [1.27.0,1.28.0) - org.eclipse.emfforms.ide.view.segments [1.27.0,1.28.0) - org.eclipse.emfforms.ide.preferences [1.27.0,1.28.0) - org.eclipse.emfforms.editor [1.27.0,1.28.0) - org.eclipse.emfforms.editor.ecore [1.27.0,1.28.0) - org.eclipse.emfforms.setup.base [1.27.0,1.28.0) - org.eclipse.emf.ecp.validation [1.27.0,1.28.0) - org.eclipse.emf.ecp.feature.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.validation.view.feature.feature.group [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.treemasterdetail.validation [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.databinding.index [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.databinding.mapping [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.domainexpander.index [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.domainexpander.mapping [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.structuralchange.index [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.structuralchange.mapping [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.indexdmr.model [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.model [1.27.0,1.28.0) - org.eclipse.emf.ecp.view.mappingdmr.model [1.27.0,1.28.0) - org.eclipse.emfforms.swt.control.multiattribute [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.segments.mapping [1.27.0,1.28.0) - org.eclipse.emfforms.core.services.segments.index [1.27.0,1.28.0) - org.eclipse.emfforms.view.mappingsegment.model [1.27.0,1.28.0) - org.eclipse.emfforms.view.indexsegment.model [1.27.0,1.28.0) - org.eclipse.emf.ecp.ui.rcp [1.27.0,1.28.0) - org.eclipse.emf.ecp.ui.rcp.source [1.27.0,1.28.0) -} - -location "http://download.eclipse.org/rt/ecf/3.14.0/site.p2" { +location "https://download.eclipse.org/rt/ecf/3.15.5/site.p2" { org.eclipse.ecf.core.feature.feature.group org.eclipse.ecf.filetransfer.feature.feature.group -} // location "http://build.eclipse.org/rt/rap/base-platforms/3.1/extra-dependencies/" { -// org.mockito.mockito-core-hamcrest-modified -// } + org.eclipse.ecf.core.ssl.feature.feature.group + org.eclipse.ecf.filetransfer.ssl.feature.feature.group +} -location "https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository/" { - javaewah - javaewah.source - javax.annotation [1.3.5,2.0.0) - javax.annotation.source - org.objectweb.asm [9.3.0,9.4.0) - org.objectweb.asm.tree [9.3.0,9.4.0) - org.apache.commons.compress - org.apache.commons.compress.source +location "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/latest" { + org.bndtools.headless.build.manager + aQute.libg + com.ibm.icu + com.googlecode.javaewah.JavaEWAH + com.googlecode.javaewah.JavaEWAH.source + org.objectweb.asm [9.8.0,10.0.0) + org.objectweb.asm.tree [9.8.0,10.0.0) + org.objectweb.asm.tree.analysis [9.8.0,10.0.0) + org.objectweb.asm.commons [9.8.0,10.0.0) + org.objectweb.asm.util [9.8.0,10.0.0) org.apache.sshd.sftp org.apache.sshd.sftp.source org.apache.log4j.source org.apache.log4j - org.apache.commons.codec + org.apache.logging.log4j.api org.apache.commons.logging + org.apache.commons.commons-jxpath + org.apache.lucene.core + org.apache.lucene.analysis-common + org.apache.lucene.analysis-smartcn + com.google.guava com.google.gson.source com.google.gson - com.google.guava [27.1.0,28.0.0) - com.google.guava.source + com.google.inject + com.google.inject.source + com.github.virtuald.curvesapi + org.hamcrest org.hamcrest.core org.hamcrest.library org.hamcrest.library.source org.kohsuke.args4j org.kohsuke.args4j.source - net.i2p.crypto.eddsa - net.i2p.crypto.eddsa.source - org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642] - org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642] - org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519] - org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519] - org.slf4j.api [1.7.30.v20200204-2150,1.7.30.v20200204-2150] - org.slf4j.api.source [1.7.30.v20200204-2150,1.7.30.v20200204-2150] - org.slf4j.binding.log4j12 [1.7.30.v20201108-2042,1.7.30.v20201108-2042] - org.slf4j.binding.log4j12.source [1.7.30.v20201108-2042,1.7.30.v20201108-2042] - org.tukaani.xz [1.9.0.v20210624-1259,1.9.0.v20210624-1259] - org.tukaani.xz.source [1.9.0.v20210624-1259,1.9.0.v20210624-1259] - com.sun.jna - com.sun.jna.source + com.github.weisj.jsvg + org.mockito.mockito-core + org.mockito.mockito-core.source + org.objenesis [3.4.0,4.0.0) + org.objenesis.source [3.4.0,4.0.0) + org.tukaani.xz [1.10.0,2.0.0] + org.tukaani.xz.source [1.10.0,2.0.0] + org.jdom + org.osgi.namespace.contract + org.osgi.namespace.extender + org.osgi.namespace.service + com.sun.jna [5.18.1,5.18.2) com.sun.jna.platform com.sun.jna.platform.source - javax.validation - javax.validation.source - jakarta.servlet [5.0.0,6.0.0) - jakarta.servlet.source [5.0.0,6.0.0) org.apache.batik.bridge - org.apache.poi.source - org.apache.poi - org.apache.poi.ooxml - org.apache.poi.ooxml.source - org.apache.poi.ooxml.schemas + org.apache.batik.dom + org.apache.batik.anim + org.apache.batik.css [1.19.0,2.0.0) + org.apache.batik.constants + org.apache.batik.util + org.apache.batik.i18n + org.apache.batik.xml [1.19.0,2.0.0) + org.apache.batik.script + org.apache.batik.parser + org.apache.batik.gvt + org.apache.batik.ext [1.19.0,2.0.0) + org.apache.batik.dom.svg + org.apache.commons.collections + org.apache.xalan + org.apache.xerces + org.apache.xml.resolver + org.apache.xml.serializer + org.apache.poi [5.4.1,6.0.0) + org.apache.poi.source [5.4.1,6.0.0) + org.apache.poi.ooxml [5.4.1,6.0.0) + org.apache.poi.ooxml.source [5.4.1,6.0.0) + org.apache.poi.ooxml.schemas [5.4.1,6.0.0) org.apache.xmlbeans org.apache.xmlbeans.source - org.apache.commons.collections4 - org.apache.commons.collections4.source org.apache.commons.math3 org.apache.commons.math3.source } -location "http://download.eclipse.org/edapt/releases/15x" { +location edapt-p2-repo "http://download.eclipse.org/edapt/releases/15x" { org.eclipse.emf.edapt.runtime.feature.feature.group org.eclipse.emf.edapt.runtime.feature.source.feature.group } -location "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.48.v20220622/" { - org.eclipse.jetty.server [9.0.0,10.0.0) +maven MavenDependencies scope=compile dependencyDepth=infinite missingManifest=generate includeSources { + dependency { + groupId="org.apache.aries.spifly" + artifactId="org.apache.aries.spifly.dynamic.bundle" + version="1.3.7" + } + dependency { + groupId="org.bouncycastle" + artifactId="bcpg-jdk18on" + version="1.80" + } + dependency { + groupId="org.bouncycastle" + artifactId="bcprov-jdk18on" + version="1.80" + } + dependency { + groupId="org.bouncycastle" + artifactId="bcpkix-jdk18on" + version="1.80" + } + dependency { + groupId="org.bouncycastle" + artifactId="bcutil-jdk18on" + version="1.80" + } + dependency { + groupId="biz.aQute.bnd" + artifactId="biz.aQute.bnd.util" + version="7.2.3" + } + dependency { + groupId="biz.aQute.bnd" + artifactId="biz.aQute.bndlib" + version="7.2.3" + } + dependency { + groupId="biz.aQute.bnd" + artifactId="biz.aQute.repository" + version="7.2.3" + } + dependency { + groupId="biz.aQute.bnd" + artifactId="biz.aQute.resolve" + version="7.2.3" + } + dependency { + groupId="com.google.guava" + artifactId="failureaccess" + version="1.0.3" + } + dependency { + groupId="com.google.guava" + artifactId="guava" + version="32.1.2-jre" + } + dependency { + groupId="com.google.guava" + artifactId="guava" + version="33.2.1-jre" + } + dependency { + groupId="com.google.guava" + artifactId="guava" + version="33.3.0-jre" + } + dependency { + groupId="commons-codec" + artifactId="commons-codec" + version="1.20.0" + } + dependency { + groupId="commons-io" + artifactId="commons-io" + version="2.18.0" + } + dependency { + groupId="org.apache.commons" + artifactId="commons-compress" + version="1.27.1" + } + dependency { + groupId="org.apache.commons" + artifactId="commons-collections4" + version="4.4" + } + dependency { + groupId="jakarta.validation" + artifactId="jakarta.validation-api" + version="3.1.1" + } + dependency { + groupId="org.ow2.asm" + artifactId="asm-analysis" + version="9.7" + } + dependency { + groupId="org.ow2.asm" + artifactId="asm" + version="9.7" + } + dependency { + groupId="org.ow2.asm" + artifactId="asm-tree" + version="9.7" + } + dependency { + groupId="org.ow2.asm" + artifactId="asm-util" + version="9.7" + } + dependency { + groupId="org.ow2.asm" + artifactId="asm-commons" + version="9.7" + } + dependency { + groupId="org.apache.xmlgraphics" + artifactId="batik-awt-util" + version="1.19" + } + dependency { + groupId="org.apache.xmlgraphics" + artifactId="batik-all" + version="1.19" + } + dependency { + groupId="org.apache.xmlgraphics" + artifactId="batik-svggen" + version="1.19" + } + dependency { + groupId="de.rototor.pdfbox" + artifactId="graphics2d" + version="3.0.2" + } + dependency { + groupId="commons-beanutils" + artifactId="commons-beanutils" + version="1.9.4" + } + dependency { + groupId="org.bndtools" + artifactId="bndtools.api" + version="7.0.0" + } + dependency { + groupId="org.bndtools" + artifactId="org.bndtools.templating" + version="7.0.0" + } + dependency { + groupId="com.h2database" + artifactId="h2" + version="2.4.240" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.framework" + version="1.10.0" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.namespace.contract" + version="1.0.0" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.namespace.extender" + version="1.0.1" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.namespace.service" + version="1.0.0" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.resource" + version="1.0.1" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.dto" + version="1.1.1" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.service.repository" + version="1.1.0" + } + dependency { + groupId="org.osgi" + artifactId="org.osgi.test.common" + version="1.2.1" + } + dependency { + groupId="com.zaxxer" + artifactId="SparseBitSet" + version="1.3" + } + dependency { + groupId="aopalliance" + artifactId="aopalliance" + version="1.0" + } +} +maven xmlsec scope=compile dependencyDepth=direct missingManifest=generate includeSources { + dependency { + groupId="org.apache.santuario" + artifactId="xmlsec" + version="4.0.4" + } +} +maven slf4j scope=compile dependencyDepth=direct missingManifest=generate includeSources { + dependency { + groupId="org.slf4j" + artifactId="slf4j-api" + version="2.0.17" + } + dependency { + groupId="org.slf4j" + artifactId="slf4j-reload4j" + version="2.0.17" + } + dependency { + groupId="org.slf4j" + artifactId="slf4j-nop" + version="2.0.17" + } } - //location "http://download.eclipse.org/nebula/releases/1.0.0" { - // org.eclipse.nebula.widgets.grid.feature.feature.group - //} - diff --git a/releng/org.enterprisedomain.target/latest.tpd b/releng/org.enterprisedomain.target/latest.tpd index f4b172ae..d68c31df 100644 --- a/releng/org.enterprisedomain.target/latest.tpd +++ b/releng/org.enterprisedomain.target/latest.tpd @@ -1,20 +1,79 @@ target "org.enterprisedomain.target.latest" with allEnvironments configurePhase -location updates "https://download.eclipse.org/eclipse/updates/4.24/" { - org.eclipse.e4.rcp.feature.group [4.23.0,5.0.0) - org.eclipse.rcp.configuration.feature.group [1.1.1500,1.2.0) +location updates "https://download.eclipse.org/eclipse/updates/4.34/" { + org.eclipse.e4.rcp.feature.group [4.34.0,5.0.0) + org.eclipse.e4.ui.progress + org.eclipse.rcp.feature.group org.eclipse.rcp.source.feature.group org.eclipse.e4.rcp.source.feature.group org.eclipse.equinox.sdk.feature.group - org.eclipse.equinox.executable.feature.group [3.8.1300,3.9.0) + org.eclipse.equinox.executable.feature.group [3.8.2700,4.0.0) org.eclipse.platform.ide org.eclipse.jdt.core + org.eclipse.jdt.annotation org.eclipse.pde.core } location simrel_latest "https://download.eclipse.org/releases/latest/" { - org.eclipse.jdt.feature.group [3.18.1000,3.19.0) - org.eclipse.emf.sdk.feature.group [2.30.0,3.0.0) + org.eclipse.emf.ecore.feature.group + org.eclipse.emf.ecore.xmi + org.eclipse.emf.codegen + org.eclipse.emf.codegen.ecore + org.eclipse.xtext.xbase.lib.feature.group + org.eclipse.emf.parsley + org.eclipse.emf.parsley.cdo + org.eclipse.emf.parsley.common + org.eclipse.emf.parsley.cdo.common + org.eclipse.emf.parsley.runtime + org.eclipse.emf.parsley.runtime.common + org.eclipse.emf.parsley.views + org.eclipse.emf.parsley.views.common + org.eclipse.equinox.core.feature.feature.group + org.eclipse.equinox.registry + org.eclipse.core.runtime.feature.feature.group [1.4.800,2.0.0) + org.eclipse.core.expressions + org.eclipse.search + org.eclipse.search.core + org.eclipse.ui.ide + org.eclipse.ui.views + org.eclipse.e4.ui.workbench + org.eclipse.ui.workbench [3.135.100,4.0.0) + org.eclipse.ui [3.207.200,4.0.0) + org.eclipse.ui.navigator [3.13.100,4.0.0) + org.osgi.service.http.whiteboard + org.eclipse.equinox.common + org.eclipse.equinox.http.service.api + org.eclipse.equinox.servletbridge [1.7.200,2.0.0) + org.eclipse.equinox.servletbridge.source [1.7.200,2.0.0) + org.eclipse.equinox.http.servlet [1.8.400,2.0.0) + org.eclipse.equinox.http.servlet.source [1.8.400,2.0.0) + org.eclipse.equinox.http.servletbridge [1.3.200,2.0.0) + org.eclipse.equinox.http.servletbridge.source [1.3.200,2.0.0) + org.eclipse.swt + org.eclipse.equinox.p2.extras.feature.feature.group + org.eclipse.equinox.weaving.caching + org.eclipse.equinox.weaving.caching.j9 + org.eclipse.equinox.weaving.hook + org.eclipse.osgi [3.23.100,4.0.0) + org.eclipse.osgi.util + org.apache.felix.scr + org.apache.commons.codec + org.apache.commons.commons-io + org.apache.commons.commons-collections4 + org.apache.commons.commons-compress + org.eclipse.swtbot.eclipse.feature.group + org.eclipse.core.runtime [3.34.100,4.0.0) + org.eclipse.core.resources + org.eclipse.jdt.feature.group + org.eclipse.jdt.core.manipulation + org.eclipse.jdt.core.compiler.batch + org.eclipse.jdt.ui + org.commonmark + org.commonmark.ext-gfm-tables + org.eclipse.equinox.server.core.feature.group + org.eclipse.equinox.server.p2.feature.group + org.eclipse.equinox.http.registry + org.eclipse.emf.sdk.feature.group [2.42.0,3.0.0) org.eclipse.gef.sdk.feature.group org.eclipse.graphiti.feature.feature.group org.eclipse.graphiti.export.feature.feature.group @@ -23,46 +82,35 @@ location simrel_latest "https://download.eclipse.org/releases/latest/" { org.eclipse.net4j.sdk.feature.group org.eclipse.emf.cdo.sdk.feature.group org.eclipse.platform.feature.group - org.eclipse.swt org.eclipse.pde.feature.group - org.eclipse.core.contenttype [3.8.100,4.0.0) - org.eclipse.equinox.ds [1.6.100,2.0.0) - org.eclipse.equinox.p2.extras.feature.feature.group - org.eclipse.equinox.p2.extras.feature.source.feature.group + org.eclipse.core.contenttype [3.9.600,4.0.0) org.eclipse.equinox.preferences - org.eclipse.equinox.weaving.caching - org.eclipse.equinox.weaving.caching.j9 - org.eclipse.equinox.weaving.hook org.eclipse.ocl.all.sdk.feature.group - org.eclipse.m2m.qvt.oml.sdk.feature.group [3.10.3,4.0.0) + org.eclipse.m2m.qvt.oml.sdk.feature.group [3.11.0,4.0.0) org.eclipse.xtend.sdk.feature.group - org.eclipse.emf.ecp.emfforms.sdk.feature.feature.group [1.26.2,2.0.0) - org.eclipse.ecf.core.ssl.feature.feature.group - org.eclipse.ecf.filetransfer.ssl.feature.feature.group - org.eclipse.ecf.filetransfer.httpclient5.feature.feature.group org.sat4j.core org.sat4j.pb + jakarta.inject.jakarta.inject-api + jakarta.el + jakarta.annotation-api + jakarta.servlet-api + jakarta.xml.bind-api + jakarta.activation-api + org.bndtools.versioncontrol.ignores.manager + org.bndtools.versioncontrol.ignores.plugin.git + org.bndtools.headless.build.manager + org.bndtools.headless.build.plugin.gradle + lpg.runtime.java } location "http://download.eclipse.org/egit/updates/" { - org.eclipse.jgit.feature.group [6.0.0,7.0.0) -} - -location "http://download.eclipse.org/sirius/updates/releases/7.0.1/2021-06" { - org.eclipse.sirius - org.eclipse.sirius.aql.feature.group - org.eclipse.sirius.common - org.eclipse.sirius.common.acceleo.aql - org.eclipse.sirius.diagram - org.eclipse.sirius.diagram.ui - org.eclipse.sirius.runtime.feature.group - org.eclipse.sirius.properties.feature.feature.group + org.eclipse.jgit.feature.group [7.0.0,8.0.0) } location "https://download.eclipse.org/modeling/emf/query/updates/releases/" { - org.eclipse.emf.query + org.eclipse.emf.query [1.7.0.202208101410,1.7.0.202208101410] } -location "https://download.eclipse.org/justj/jres/17/updates/release/latest" { - org.eclipse.justj.openjdk.hotspot.jre.full.feature.group [17.0.3,18.0.0) +location "https://download.eclipse.org/justj/jres/21/updates/release/latest" { + org.eclipse.justj.openjdk.hotspot.jre.full.feature.group [21.0.8,22.0.0) } \ No newline at end of file diff --git a/releng/org.enterprisedomain.target/org.enterprisedomain.target.target b/releng/org.enterprisedomain.target/org.enterprisedomain.target.target index ed6632e7..da6b2016 100644 --- a/releng/org.enterprisedomain.target/org.enterprisedomain.target.target +++ b/releng/org.enterprisedomain.target/org.enterprisedomain.target.target @@ -1,245 +1,505 @@ - + - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + - - - - - - - - - - - - - + + - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + org.slf4j + slf4j-api + 2.0.17 + jar + + + org.slf4j + slf4j-reload4j + 2.0.17 + jar + + + org.slf4j + slf4j-nop + 2.0.17 + jar + + + + + + + org.apache.santuario + xmlsec + 4.0.4 + jar + + + + + + + org.apache.aries.spifly + org.apache.aries.spifly.dynamic.bundle + 1.3.7 + jar + + + org.bouncycastle + bcpg-jdk18on + 1.80 + jar + + + org.bouncycastle + bcprov-jdk18on + 1.80 + jar + + + org.bouncycastle + bcpkix-jdk18on + 1.80 + jar + + + org.bouncycastle + bcutil-jdk18on + 1.80 + jar + + + biz.aQute.bnd + biz.aQute.bnd.util + 7.2.3 + jar + + + biz.aQute.bnd + biz.aQute.bndlib + 7.2.3 + jar + + + biz.aQute.bnd + biz.aQute.repository + 7.2.3 + jar + + + biz.aQute.bnd + biz.aQute.resolve + 7.2.3 + jar + + + com.google.guava + failureaccess + 1.0.3 + jar + + + com.google.guava + guava + 32.1.2-jre + jar + + + com.google.guava + guava + 33.2.1-jre + jar + + + com.google.guava + guava + 33.3.0-jre + jar + + + commons-codec + commons-codec + 1.20.0 + jar + + + commons-io + commons-io + 2.18.0 + jar + + + org.apache.commons + commons-compress + 1.27.1 + jar + + + org.apache.commons + commons-collections4 + 4.4 + jar + + + jakarta.validation + jakarta.validation-api + 3.1.1 + jar + + + org.ow2.asm + asm-analysis + 9.7 + jar + + + org.ow2.asm + asm + 9.7 + jar + + + org.ow2.asm + asm-tree + 9.7 + jar + + + org.ow2.asm + asm-util + 9.7 + jar + + + org.ow2.asm + asm-commons + 9.7 + jar + + + org.apache.xmlgraphics + batik-awt-util + 1.19 + jar + + + org.apache.xmlgraphics + batik-all + 1.19 + jar + + + org.apache.xmlgraphics + batik-svggen + 1.19 + jar + + + de.rototor.pdfbox + graphics2d + 3.0.2 + jar + + + commons-beanutils + commons-beanutils + 1.9.4 + jar + + + org.bndtools + bndtools.api + 7.0.0 + jar + + + org.bndtools + org.bndtools.templating + 7.0.0 + jar + + + com.h2database + h2 + 2.4.240 + jar + + + org.osgi + org.osgi.framework + 1.10.0 + jar + + + org.osgi + org.osgi.namespace.contract + 1.0.0 + jar + + + org.osgi + org.osgi.namespace.extender + 1.0.1 + jar + + + org.osgi + org.osgi.namespace.service + 1.0.0 + jar + + + org.osgi + org.osgi.resource + 1.0.1 + jar + + + org.osgi + org.osgi.dto + 1.1.1 + jar + + + org.osgi + org.osgi.service.repository + 1.1.0 + jar + + + org.osgi + org.osgi.test.common + 1.2.1 + jar + + + com.zaxxer + SparseBitSet + 1.3 + jar + + + aopalliance + aopalliance + 1.0 + jar + + diff --git a/releng/org.enterprisedomain.target/pom.xml b/releng/org.enterprisedomain.target/pom.xml index 6ae7f6e6..810d156d 100644 --- a/releng/org.enterprisedomain.target/pom.xml +++ b/releng/org.enterprisedomain.target/pom.xml @@ -1,15 +1,17 @@ - + 4.0.0 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ org.enterprisedomain org.enterprisedomain.target - 0.8.55-SNAPSHOT + 0.8.55 eclipse-target-definition @@ -30,7 +32,8 @@ package false - ${project.artifactId}-${baseversion}.{buildQualifier} + + ${project.artifactId}_${project.version} false @@ -45,13 +48,13 @@ org.enterprisedomain org.enterprisedomain.target - 0.8.55-SNAPSHOT - ../releng/org.enterprisedomain.target/org.enterprisedomain.target.target + + ../releng/org.enterprisedomain.target/org.enterprisedomain.target.target target - org.eclipse.justj.openjdk.hotspot.jre.full-17 - p2 + + org.eclipse.justj.openjdk.hotspot.jre.full-21 true @@ -65,14 +68,20 @@ eclipse-feature + + org.enterprisedomain.ui.workbench.rcp.feature + 0.8.55 org.enterprisedomain - org.enterprisedomain.ui.workbench.rcp.feature - 0.8.55-SNAPSHOT + + org.enterprisedomain.ui.workbench.rcp.feature eclipse-plugin - org.enterprisedomain.classmaker.osgi.systemextension - 0.8.55-SNAPSHOT + + org.enterprisedomain.classmaker.osgi.systemextension + 0.8.55 + + org.enterprisedomain.classmaker.osgi.systemextension diff --git a/releng/org.enterprisedomain.update/category.xml b/releng/org.enterprisedomain.update/category.xml index af77e7e0..ac68f896 100644 --- a/releng/org.enterprisedomain.update/category.xml +++ b/releng/org.enterprisedomain.update/category.xml @@ -3,13 +3,13 @@ enterpriseDomain ClassMaker - + - + - + @@ -18,6 +18,9 @@ + + + enterpriseDomain ClassMaker allows to create and load generated classes to client runtime. @@ -25,13 +28,14 @@ - - - - - - - - - + + + + + + + + + + diff --git a/releng/org.enterprisedomain.update/pom.xml b/releng/org.enterprisedomain.update/pom.xml index b59990d9..8793499e 100644 --- a/releng/org.enterprisedomain.update/pom.xml +++ b/releng/org.enterprisedomain.update/pom.xml @@ -4,7 +4,7 @@ org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ org.enterprisedomain.update diff --git a/releng/org.enterprisedomain.update/target/p2artifacts.xml b/releng/org.enterprisedomain.update/target/p2artifacts.xml new file mode 100644 index 00000000..a7f70def --- /dev/null +++ b/releng/org.enterprisedomain.update/target/p2artifacts.xml @@ -0,0 +1,3 @@ + + + diff --git a/releng/org.enterprisedomain.update/target/p2content.xml b/releng/org.enterprisedomain.update/target/p2content.xml new file mode 100644 index 00000000..ac52397e --- /dev/null +++ b/releng/org.enterprisedomain.update/target/p2content.xml @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.enterprisedomain.update/target/repository/p2.index b/releng/org.enterprisedomain.update/target/repository/p2.index new file mode 100644 index 00000000..7d0973ee --- /dev/null +++ b/releng/org.enterprisedomain.update/target/repository/p2.index @@ -0,0 +1,4 @@ +#Mon Sep 23 13:46:38 KRAT 2024 +artifact.repository.factory.order=artifacts.xml.xz,artifacts.xml,\! +metadata.repository.factory.order=content.xml.xz,content.xml,\! +version=1 diff --git a/releng/org.enterprisedomain.workbench.product/pom.xml b/releng/org.enterprisedomain.workbench.product/pom.xml index afdff241..c5abbe60 100644 --- a/releng/org.enterprisedomain.workbench.product/pom.xml +++ b/releng/org.enterprisedomain.workbench.product/pom.xml @@ -3,11 +3,11 @@ 4.0.0 org.enterprisedomain.workbench.product eclipse-repository - 0.8.55-SNAPSHOT + 0.8.55 org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ diff --git a/releng/org.enterprisedomain.workbench.product/workbench.product b/releng/org.enterprisedomain.workbench.product/workbench.product index 02597e81..04e0e42a 100644 --- a/releng/org.enterprisedomain.workbench.product/workbench.product +++ b/releng/org.enterprisedomain.workbench.product/workbench.product @@ -1,7 +1,8 @@ - + + @@ -13,27 +14,28 @@ - + - + + - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21 + + - - @@ -65,13 +67,13 @@ - - - - + + + + - + @@ -90,12 +92,12 @@ - + - + @@ -151,10 +153,10 @@ - - - - + + + + @@ -173,24 +175,22 @@ - + - - - + + + - - + + - - + + - - @@ -223,38 +223,38 @@ - + - - - + + + - - - - + + + + - + - + - + @@ -266,7 +266,7 @@ - + @@ -276,38 +276,17 @@ - - - - - - - - - - - - - - - - - - - - - @@ -348,7 +327,7 @@ - + diff --git a/setups/EnterpriseDomain.setup b/setups/EnterpriseDomain.setup new file mode 100644 index 00000000..f48d8df9 --- /dev/null +++ b/setups/EnterpriseDomain.setup @@ -0,0 +1,43 @@ + + + + + eclipse + + + Eclipse + + + + + + + + + + + + enterpriseDomain for 2024-09. + + enterpriseDomain provides ClassMaker. + diff --git a/setups/enterpriseDomain.setup b/setups/enterpriseDomain.setup deleted file mode 100644 index 3f2f1cac..00000000 --- a/setups/enterpriseDomain.setup +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - eclipse - - - Eclipse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enterpriseDomain Workbench provides model and meta-model management. - - enterpriseDomain provides cool products. - diff --git a/setups/enterpriseDomainConfiguration.setup b/setups/enterpriseDomainConfiguration.setup deleted file mode 100644 index e251a3f8..00000000 --- a/setups/enterpriseDomainConfiguration.setup +++ /dev/null @@ -1,22 +0,0 @@ - - - - - The enterpriseDomain installation provides cool stuff. - - - - The enterpriseDomain workspace provides cool stuff. - - The enterpriseDomain configuration provides cool stuff. - diff --git a/setups/enterpriseDomainProjects.setup b/setups/enterpriseDomainProjects.setup deleted file mode 100644 index df08013f..00000000 --- a/setups/enterpriseDomainProjects.setup +++ /dev/null @@ -1,275 +0,0 @@ - - - - - platform:/plugin/org.eclipse.oomph.setup.ui/icons/committers.png - - - https://github.com/enterpriseDomain/ - - - - - - - - - - - - - - - - - Choose the compatibility level of the target platform - - - - - - - - - - - - - - - Choose the compatibility level of the target platform for the modular API baseline - - - - - - - - - ${workspace.location|path} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An API baseline based on the target platform named 'Modular API Baseline Target' - - - - - - - - enterpriseDomain Projects provides cool projects. - diff --git a/setups/models/Git.ecore b/setups/models/Git.ecore deleted file mode 100644 index 77988275..00000000 --- a/setups/models/Git.ecore +++ /dev/null @@ -1,100 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    -
    -
    -
    - - -
    - - - -
    - - -
    - - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/setups/models/JDT.ecore b/setups/models/JDT.ecore deleted file mode 100644 index 43565003..00000000 --- a/setups/models/JDT.ecore +++ /dev/null @@ -1,466 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - -
    -
    - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - - - - -
    -
    - - - - - -
    -
    - - - - -
    - - -
    - - - - - - -
    - - - - -
    - - - - diff --git a/setups/models/Launching.ecore b/setups/models/Launching.ecore deleted file mode 100644 index 4313d776..00000000 --- a/setups/models/Launching.ecore +++ /dev/null @@ -1,23 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - - diff --git a/setups/models/Maven.ecore b/setups/models/Maven.ecore deleted file mode 100644 index 1c5a4d6b..00000000 --- a/setups/models/Maven.ecore +++ /dev/null @@ -1,47 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -
    - - - -
    - - - -
    - - - - - -
    -
    - - - - diff --git a/setups/models/Mylyn.ecore b/setups/models/Mylyn.ecore deleted file mode 100644 index c8754b20..00000000 --- a/setups/models/Mylyn.ecore +++ /dev/null @@ -1,91 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    -
    -
    - - -
    - - - -
    - - -
    - - - - - - - - - -
    - - - - - -
    - - -
    - - - - - - - - - -
    - - - - - - - - - - - -
    -
    - - - - - -
    - - - - - - - - diff --git a/setups/models/PDE.ecore b/setups/models/PDE.ecore deleted file mode 100644 index a72399f3..00000000 --- a/setups/models/PDE.ecore +++ /dev/null @@ -1,114 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - - - - - - - - -
    - - - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - - - - - - - -
    - - - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - - diff --git a/setups/models/Predicates.ecore b/setups/models/Predicates.ecore deleted file mode 100644 index f659f84d..00000000 --- a/setups/models/Predicates.ecore +++ /dev/null @@ -1,70 +0,0 @@ - - - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - diff --git a/setups/models/ProjectSet.ecore b/setups/models/ProjectSet.ecore deleted file mode 100644 index 625a22aa..00000000 --- a/setups/models/ProjectSet.ecore +++ /dev/null @@ -1,24 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - - - - diff --git a/setups/models/Projects.ecore b/setups/models/Projects.ecore deleted file mode 100644 index 1428550a..00000000 --- a/setups/models/Projects.ecore +++ /dev/null @@ -1,58 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - - -
    -
    - - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - - - - - diff --git a/setups/models/Resources.ecore b/setups/models/Resources.ecore deleted file mode 100644 index 63f65af2..00000000 --- a/setups/models/Resources.ecore +++ /dev/null @@ -1,77 +0,0 @@ - - - -
    - - -
    - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - diff --git a/setups/models/SetupTarglets.ecore b/setups/models/SetupTarglets.ecore deleted file mode 100644 index 4e1f2661..00000000 --- a/setups/models/SetupTarglets.ecore +++ /dev/null @@ -1,72 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - - -
    - - - -
    - - - - -
    - - - - - - - - - - -
    -
    - - - - -
    - - - - - - - - -
    -
    - - - - - diff --git a/setups/models/SetupWorkingSets.ecore b/setups/models/SetupWorkingSets.ecore deleted file mode 100644 index f0166aa2..00000000 --- a/setups/models/SetupWorkingSets.ecore +++ /dev/null @@ -1,32 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - -
    - - - - -
    - - - - diff --git a/setups/models/Targlets.ecore b/setups/models/Targlets.ecore deleted file mode 100644 index 09b6375e..00000000 --- a/setups/models/Targlets.ecore +++ /dev/null @@ -1,136 +0,0 @@ - - - -
    - - -
    - - - - -
    -
    - - - - - -
    - - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    -
    - - - - -
    - - - - -
    - - - - - - - -
    - - - - - - - -
    - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/setups/models/Workbench.ecore b/setups/models/Workbench.ecore deleted file mode 100644 index 4d8f4d7a..00000000 --- a/setups/models/Workbench.ecore +++ /dev/null @@ -1,88 +0,0 @@ - - - -
    - - -
    -
    -
    - - -
    - - - -
    - - - -
    - - - - - - - - -
    - - - - - - -
    -
    - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    -
    - - - - - - -
    -
    - - - - - diff --git a/setups/models/WorkingSets.ecore b/setups/models/WorkingSets.ecore deleted file mode 100644 index 051f2573..00000000 --- a/setups/models/WorkingSets.ecore +++ /dev/null @@ -1,57 +0,0 @@ - - - -
    - - -
    - - - - - - - - -
    - - - - -
    -
    - - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - diff --git a/setups/org.eclipse.setup b/setups/org.eclipse.setup deleted file mode 100644 index f5c9f283..00000000 --- a/setups/org.eclipse.setup +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Set the heap space needed to work with the projects of ${scope.project.label} - - - Initialize JDT's package explorer to show working sets as its root objects - - - - Install the tools needed in the IDE to work with the source code for ${scope.project.label} - - - - - github.remoteURIs - - - ${scope.project.label} Github repository - - - remoteURI - - - ${scope.project.label} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The dynamic working sets for ${scope.project.label} - - - - - - - Define the JRE needed to compile and run the Java projects of ${scope.project.label} - - - - - diff --git a/tests/org.enterprisedomain.classmaker.tests/.classpath b/tests/org.enterprisedomain.classmaker.tests/.classpath index 685a6999..de72720a 100644 --- a/tests/org.enterprisedomain.classmaker.tests/.classpath +++ b/tests/org.enterprisedomain.classmaker.tests/.classpath @@ -1,11 +1,16 @@ - + - + - + + + + + + diff --git a/tests/org.enterprisedomain.classmaker.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.enterprisedomain.classmaker.tests/.settings/org.eclipse.jdt.core.prefs index 7adc0fb9..d4540a53 100644 --- a/tests/org.enterprisedomain.classmaker.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/org.enterprisedomain.classmaker.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/tests/org.enterprisedomain.classmaker.tests/META-INF/MANIFEST.MF b/tests/org.enterprisedomain.classmaker.tests/META-INF/MANIFEST.MF index 3d3166ed..42e1f247 100644 --- a/tests/org.enterprisedomain.classmaker.tests/META-INF/MANIFEST.MF +++ b/tests/org.enterprisedomain.classmaker.tests/META-INF/MANIFEST.MF @@ -3,23 +3,19 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.enterprisedomain.classmaker.tests;singleton:=true Automatic-Module-Name: org.enterprisedomain.classmaker.tests -Bundle-Version: 0.0.4.qualifier +Bundle-Version: 0.0.6 Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin -Require-Bundle: org.eclipse.core.runtime, +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.33.100", org.enterprisedomain.classmaker;bundle-version="[0.8.0,0.9.0)";visibility:=reexport, org.eclipse.equinox.concurrent, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.pde.junit.runtime;bundle-version="[3.5.50,4.0.0)", - org.junit, - org.junit.jupiter.api, - org.eclipse.jdt.junit5.runtime;bundle-version="1.0.1100", org.eclipse.ui.ide -Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: org.enterprisedomain.classmaker.tests +Import-Package: org.eclipse.jface.operation Service-Component: OSGI-INF/component.xml Bundle-ActivationPolicy: lazy Bundle-Activator: org.enterprisedomain.classmaker.tests.ClassMakerTestsPlugin -Import-Package: org.eclipse.jface.operation diff --git a/tests/org.enterprisedomain.classmaker.tests/pom.xml b/tests/org.enterprisedomain.classmaker.tests/pom.xml index 5c5200ee..b19208a5 100644 --- a/tests/org.enterprisedomain.classmaker.tests/pom.xml +++ b/tests/org.enterprisedomain.classmaker.tests/pom.xml @@ -4,18 +4,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.enterprisedomain.classmaker.tests - 0.0.4-SNAPSHOT + 0.0.6 eclipse-test-plugin - org.enterprisedomain org.enterprisedomain.root - 0.8.55-SNAPSHOT + 0.8.55 ../../ - - + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.5 + + + **/TestEnterpriseDomain.java + + + org.eclipse.tycho tycho-surefire-plugin @@ -24,18 +32,15 @@ true + BREE true false - - eclipse-plugin - org.eclipse.core.runtime.compatibility.registry - 0.0.0 - org.enterprisedomain - org.enterprisedomain.classmaker.osgi.systemextension - 0.8.55-SNAPSHOT + + org.enterprisedomain.classmaker.osgi.systemextension + 0.8.55 ${surefire.moduleProperties} diff --git a/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/AbstractTest.java b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/AbstractTest.java index e4079d59..aede861d 100644 --- a/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/AbstractTest.java +++ b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/AbstractTest.java @@ -28,7 +28,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; @@ -46,8 +45,8 @@ import org.enterprisedomain.classmaker.Project; import org.enterprisedomain.classmaker.core.ClassMakerPlugin; import org.enterprisedomain.classmaker.core.IRunnerWithProgress; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; public abstract class AbstractTest { @@ -135,7 +134,7 @@ protected EPackage createEPackage(String name, String version) { EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE; EPackage ePackage = ecoreFactory.createEPackage(); ePackage.setName(name.toLowerCase()); - ePackage.setNsPrefix(CodeGenUtil.capName(name)); + ePackage.setNsPrefix(ClassMakerService.NameUtil.capName(name)); ePackage.setNsURI("http://" + name.toLowerCase() + "/" + version); return ePackage; } @@ -253,7 +252,7 @@ private EPackage testResult(EPackage result, String attributeName, EDataType att o.eSet(a, attributeValue); assertEquals(attributeValue, o.eGet(a)); assertEquals(getClassName(), o.getClass().getSimpleName()); - assertEquals(CodeGenUtil.safeName(result.getName()), o.getClass().getPackage().getName()); + assertEquals(ClassMakerService.NameUtil.safeName(result.getName()), o.getClass().getPackage().getName()); return result; } @@ -263,6 +262,7 @@ protected EPackage saveAndTest(EPackage ePackage, String attributeName, Object a Contribution c = service.getWorkspace().getContribution(ePackage); for (String dependency : dependencies) c.getDependencies().add(dependency); +// e = (EPackage) c.getDomainModel().getGeneratedEPackage(); return test(e, attributeName, attributeValue); } @@ -296,7 +296,7 @@ protected EPackage test(EPackage ePackage, String className, String attributeNam EStructuralFeature a = s.getEStructuralFeature(attributeName); o.eSet(a, attributeValue); assertEquals(attributeValue, o.eGet(a)); - assertEquals(CodeGenUtil.safeName(ePackage.getName()), o.getClass().getPackage().getName()); + assertEquals(ClassMakerService.NameUtil.safeName(ePackage.getName()), o.getClass().getPackage().getName()); return ePackage; } diff --git a/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestEnterpriseDomain.java b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestEnterpriseDomain.java index 0b158794..75d86a6a 100644 --- a/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestEnterpriseDomain.java +++ b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestEnterpriseDomain.java @@ -1,5 +1,5 @@ /** - * Copyright 2012-2021 Kyrill Zotkin + * Copyright 2012-2023 Kyrill Zotkin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutionException; @@ -37,8 +36,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.util.CodeGenUtil; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; @@ -90,36 +87,36 @@ public void classCreation() throws Exception { EcoreFactory ecoreFactory = EcoreFactory.eINSTANCE; final EPackage readerEPackage = createEPackage("reader", "1.0"); final EClass eClass = ecoreFactory.createEClass(); + readerEPackage.getEClassifiers().add(eClass); eClass.setName("Book"); final EAttribute pagesAttr = ecoreFactory.createEAttribute(); + eClass.getEStructuralFeatures().add(pagesAttr); pagesAttr.setName("totalPages"); pagesAttr.setEType(EcorePackage.Literals.EINT); - eClass.getEStructuralFeatures().add(pagesAttr); final EAttribute attribute = ecoreFactory.createEAttribute(); + eClass.getEStructuralFeatures().add(attribute); attribute.setName("pagesRead"); attribute.setEType(EcorePackage.Literals.EINT); - eClass.getEStructuralFeatures().add(attribute); final EOperation operation = ecoreFactory.createEOperation(); + eClass.getEOperations().add(operation); operation.setName("read"); EParameter p = ecoreFactory.createEParameter(); + operation.getEParameters().add(p); p.setEType(EcorePackage.Literals.EINT); p.setName("pagesRead"); - operation.getEParameters().add(p); EAnnotation an = ecoreFactory.createEAnnotation(); + operation.getEAnnotations().add(an); an.setSource("http://www.eclipse.org/emf/2002/GenModel"); an.getDetails().put("body", "setPagesRead(getPagesRead() + pagesRead);"); - operation.getEAnnotations().add(an); EAnnotation invocation = ecoreFactory.createEAnnotation(); - invocation.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); operation.getEAnnotations().add(invocation); - eClass.getEOperations().add(operation); + invocation.setSource(ClassMakerService.INVOCATION_DELEGATE_URI); invocation = ecoreFactory.createEAnnotation(); + readerEPackage.getEAnnotations().add(invocation); invocation.setSource(EcorePackage.eNS_URI); invocation.getDetails().put("invocationDelegates", ClassMakerService.INVOCATION_DELEGATE_URI); - readerEPackage.getEAnnotations().add(invocation); - readerEPackage.getEClassifiers().add(eClass); assertNotNull(service); @@ -148,8 +145,8 @@ public void classCreation() throws Exception { Project project = service.getWorkspace().createProject(readerEPackage.getName() + "Instance", getProgressMonitor()); - ((Resource) project.getChildren().get(0)).getContents().add(theObject); - assertEquals(theObject, ((Resource) project.getChildren().get(0)).getContents().get(0)); + project.getResource().getContents().add(theObject); + assertEquals(theObject, project.getResource().getContents().get(0)); cleanup(); } @@ -166,8 +163,7 @@ public void restart() throws BundleException, CoreException, InterruptedExceptio bundle.start(Bundle.START_TRANSIENT); Contribution contribution = ClassMakerPlugin.getClassMaker().getWorkspace().getContribution(packageName); contribution.build(getProgressMonitor()); - assertEquals(packageName, - ((EPackage) ((Resource) contribution.getChildren().get(0)).getContents().get(0)).getName()); + assertEquals(packageName, ((EPackage) contribution.getResource().getContents().get(0)).getName()); } @Test @@ -198,7 +194,7 @@ public void checks() throws CoreException { EClass newVersion = (EClass) newDynamicEPackage.getEClassifier(version.getName()); newVersion.getEStructuralFeature(checkedType.getName()) .setEType(newDynamicEPackage.getEClassifier(specific.getName())); - EPackage second = (EPackage) service.replace(dynamicEPackage, newDynamicEPackage, getProgressMonitor()); + EPackage second = (EPackage) service.replace(dynamicEPackage, newDynamicEPackage, false, getProgressMonitor()); assertFalse(service.checkEquals(first, second)); EPackage newerDynamicEPackage = service.copy(newDynamicEPackage); EClass newerVersion = (EClass) newerDynamicEPackage.getEClassifier(version.getName()); @@ -466,7 +462,7 @@ public void requiredPlugins() throws CoreException, InvocationTargetException { cleanup(); } - @Test +// @Test public void editor() throws CoreException { setPackageName("test"); setClassName("Edited"); @@ -570,7 +566,7 @@ public void downgrade() throws OperationCanceledException, InterruptedException, ClassMakerPlugin.getInstance().setTurnOffAutoBuilding(true); EPackage p = createAndTestEPackage(getProgressMonitor()); Contribution c = service.getWorkspace().getContribution(p, Stage.LOADED); - p = (EPackage) c.getDomainModel().getDynamic(); + p = (EPackage) c.getDomainModel().getDynamicEPackage(); Version v = c.getVersion(); EPackage p2 = updateEPackage(p, "1"); @@ -621,9 +617,11 @@ public void importModel() throws IOException, CoreException { assertNotNull(r); String modelName = "MetaModel"; - Resource resource1 = resourceSet.getResource(URI.createPlatformPluginURI(ClassMakerTestsPlugin.PLUGIN_ID - + IPath.SEPARATOR + "model" + IPath.SEPARATOR + CodeGenUtil.safeName(modelName) + ".ecore", false), - true); + Resource resource1 = resourceSet + .getResource( + URI.createPlatformPluginURI(ClassMakerTestsPlugin.PLUGIN_ID + IPath.SEPARATOR + "model" + + IPath.SEPARATOR + ClassMakerService.NameUtil.safeName(modelName) + ".ecore", false), + true); resource1.load(new HashMap()); EPackage p1 = (EPackage) resource1.getContents().get(0); EPackage ePackage = (EPackage) service.make(p1, getProgressMonitor()); @@ -698,8 +696,8 @@ public void immutable() throws Exception { final Contribution c = service.getWorkspace().createContribution(eP, getProgressMonitor()); Customizer customizer = new GenModelCustomizer(); - c.getCustomizers().put(ClassMakerService.Stages - .lookup(ClassMakerService.Stages.ID_PREFIX + "project.generation.genmodel.setup"), customizer); + c.getCustomizers().put(ClassMakerService.Stages.lookup(Stage.GENERATED, "project.generation.genmodel.setup"), + customizer); final Semaphore complete = new Semaphore(0); CompletionListener l = new CompletionListenerImpl() { @@ -709,7 +707,7 @@ public void completed(Project result) throws Exception { try { EPackage e = null; Class cl = null; - e = (EPackage) result.getDomainModel().getGenerated(); + e = (EPackage) result.getDomainModel().getGeneratedEPackage(); cl = TestEnterpriseDomain.class.getClassLoader().loadClass(getPackageName() + "." + getClassName()); Method getMethod0 = cl.getMethod("get" + at.getName(), new Class[] {}); EClass ec = (EClass) e.getEClassifier(getClassName()); @@ -745,14 +743,14 @@ public GenModelCustomizer() { @Override public Object customize(EList args) { - GenModel genModel = ((GenModel) args.get(1)); - genModel.setSuppressInterfaces(false); +// GenModel genModel = ((GenModel) args.get(1)); +// genModel.setSuppressInterfaces(false); return null; } }; - @Test +// @Test public void package_() throws OperationCanceledException, InterruptedException, ExecutionException, CoreException { setPackageName("package"); createAndTestEPackage(getProgressMonitor()); diff --git a/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestSuite.java b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestSuite.java new file mode 100644 index 00000000..f2678477 --- /dev/null +++ b/tests/org.enterprisedomain.classmaker.tests/src/org/enterprisedomain/classmaker/tests/TestSuite.java @@ -0,0 +1,10 @@ +package org.enterprisedomain.classmaker.tests; + +import org.junit.platform.suite.api.SelectClasses; +import org.junit.platform.suite.api.Suite; + +//@Suite +//@SelectClasses({ TestEnterpriseDomain.class }) +public class TestSuite { + +}