Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfeatures/org.eclipse.emf.eef.indigo-feature/epl-v10.html262
-rwxr-xr-xfeatures/org.eclipse.emf.eef.indigo-feature/feature.properties160
-rwxr-xr-xfeatures/org.eclipse.emf.eef.indigo-feature/license.html116
-rwxr-xr-xfeatures/org.eclipse.emf.eef.indigo-feature/license.txt87
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/build.acceleo2
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/pom.xml4
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEdit.java97
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEditor.java97
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenModel.java97
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.javajetinc11
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.jetinc1
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.propertiesjetinc9
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.xmljetinc11
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Images.javajet46
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProvider.javajet476
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProviderAdapterFactory.javajet561
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Plugin.javajet232
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Properties.javajet190
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/build.propertiesjet37
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/manifest.mfjet46
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/module.gwt.xmljet31
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.propertiesjet67
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.xmljet125
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ActionBarContributor.javajet704
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Advisor.javajet715
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Editor.javajet2397
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/EntryPoint.javajet90
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ModelWizard.javajet976
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Plugin.javajet139
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/appengine-web.xmljet24
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/build.propertiesjet35
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/home.htmljet86
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/manifest.mfjet80
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/module.gwt.xmljet35
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.propertiesjet118
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.xmljet253
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/web.xmljet36
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/emf-merge.xml233
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/ModelTestSuite.javajet79
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageExample.javajet205
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageTestSuite.javajet79
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/TestCase.javajet318
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/build.propertiesjet33
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/manifest.mfjet43
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.propertiesjet22
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.xmljet50
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/AdapterFactoryClass.javajet172
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/Class.javajet2335
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/EnumClass.javajet319
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/FactoryClass.javajet707
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/PackageClass.javajet1231
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/Plugin.javajet133
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/ResourceClass.javajet459
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/ResourceFactoryClass.javajet117
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/SwitchClass.javajet230
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/ValidatorClass.javajet664
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/XMLProcessorClass.javajet81
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/build.propertiesjet38
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/manifest.mfjet46
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/module.gwt.xmljet31
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/plugin.propertiesjet30
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/plugin.xmljet101
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.extended/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.extended/build.acceleo2
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.extended/pom.xml4
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.extended/src/org/eclipse/emf/eef/codegen/extended/launcher/EEFEditorLauncher.java102
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.launcher/pom.xml19
-rw-r--r--plugins/org.eclipse.emf.eef.codegen.uml/build.acceleo39
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/build.acceleo2
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/pom.xml4
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.java102
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/src/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.java102
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/build.properties10
-rw-r--r--[-rwxr-xr-x]plugins/org.eclipse.emf.eef.runtime.ui.gwt/icons/full/dlcl16/LocateValue.gifbin149 -> 149 bytes
-rw-r--r--[-rwxr-xr-x]plugins/org.eclipse.emf.eef.runtime.ui.gwt/icons/full/elcl16/LocateValue.gifbin212 -> 212 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/EEFEditorEntryPoint.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/command/CreateObjectCommand.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/command/CreateResourceCommand.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/command/SaveCommand.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/command/UpdateURIConverterCommand.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/dialog/CreateObjectDialog.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/dialog/CreateResourceDialog.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/dialog/ErrorDialog.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/EEFEditor.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/part/EEFEditorToolbar.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/part/EEFPropertiesPanel.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/property/FeatureEditor.java10
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/property/ItemPropertyDescriptorFeatureEditor.java10
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/util/EditorToolbarListener.java10
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/util/EventProcess.java10
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/util/NavigationManager.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/widget/EEFTreeViewer.java10
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/widget/EEFTreeViewerContentProvider.java13
-rw-r--r--plugins/org.eclipse.emf.eef.runtime.ui.gwt/src/org/eclipse/emf/eef/runtime/ui/gwt/editor/widget/ModelViewerCell.java13
-rw-r--r--tests/org.eclipse.emf.eef.non-reg.edit/.gitignore1
-rw-r--r--tests/org.eclipse.emf.eef.non-reg.editor/.gitignore1
-rw-r--r--tests/org.eclipse.emf.eef.non-reg/.gitignore1
-rw-r--r--tests/org.eclipse.emf.eef.tests.nonreg.edit/.gitignore1
-rw-r--r--tests/org.eclipse.emf.eef.tests.nonreg.editor/.gitignore1
-rw-r--r--tests/org.eclipse.emf.eef.tests.nonreg/.gitignore1
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.edit/.gitignore1
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/.gitignore1
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/build.properties9
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/plugin.properties9
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src-gen/org/eclipse/emf/samples/eef/tarot/presentation/TarotActionBarContributor.java11
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src-gen/org/eclipse/emf/samples/eef/tarot/presentation/TarotEditor.java11
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src-gen/org/eclipse/emf/samples/eef/tarot/presentation/TarotEditorAdvisor.java11
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src-gen/org/eclipse/emf/samples/eef/tarot/presentation/TarotEditorPlugin.java11
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src-gen/org/eclipse/emf/samples/eef/tarot/presentation/TarotModelWizard.java11
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot.editor/src/org/eclipse/emf/samples/eef/tarot/presentation/TarotPlayersView.java10
-rw-r--r--tests/org.eclipse.emf.samples.eef.tarot/.gitignore1
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/.gitignore1
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/build.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/plugin.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/FinalScorePropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/ForecastDayPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/ForecastPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/GroupStageMatchPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/MatchDayPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/OtherKnockoutStageMatchPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/PlayerPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/RoundOfSixteenMatchPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/TeamPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/ThirdPlaceMatchPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupForecastPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupForecastWorldCupForecastGroupPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupForecastWorldCupForecastMatchDayPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupForecastWorldCupForecastPLayerPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupForecastWorldCupForecastPlayersRatingPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/components/WorldCupGroupPropertiesEditionComponent.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/FinalScorePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/ForecastDayPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/ForecastPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/GameDayPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/GamePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/GroupeStageGamePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/GroupeStageMatchPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/KnockoutStageGamePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/MatchDayPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/OtherKnockoutStageGamePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/PlayerForecastDaysPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/PlayerNamePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/PlayerPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/PlayerScorePropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/RoundOfSixteenMatchPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/TeamPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/ThirdPlaceMatchPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupForecastGameDayPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupForecastGroupPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupForecastMatchDayPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupForecastPLayerPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupForecastPlayersRatingPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldCupGroupPropertiesEditionPart.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/WorldcupforecastViewsRepository.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/FinalScorePropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/ForecastDayPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/ForecastPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/GroupeStageMatchPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/MatchDayPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/OtherKnockoutStageGamePropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/PlayerPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/RoundOfSixteenMatchPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/TeamPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/ThirdPlaceMatchPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastGroupPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastMatchDayPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastPLayerPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastPlayersRatingPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/forms/WorldCupGroupPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/FinalScorePropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/ForecastDayPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/ForecastPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/GroupeStageMatchPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/MatchDayPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/OtherKnockoutStageGamePropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/PlayerPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/RoundOfSixteenMatchPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/TeamPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/ThirdPlaceMatchPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/WorldCupForecastGroupPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/WorldCupForecastMatchDayPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/WorldCupForecastPLayerPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/WorldCupForecastPlayersRatingPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/parts/impl/WorldCupGroupPropertiesEditionPartImpl.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/DayItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/FinalScoreItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/ForecastDayItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/ForecastItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/GroupStageMatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/KnockoutStageMatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/MatchDayItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/MatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/OtherKnockoutStageMatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/PlayerItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/RoundOfSixteenMatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/ScoreItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/TeamItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/ThirdPlaceMatchItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/ValidatePlayerItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/WorldCupForecastItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/WorldCupGroupItemProvider.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/WorldcupforecastEditPlugin.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/provider/WorldcupforecastItemProviderAdapterFactory.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/FinalScorePropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/ForecastDayPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/ForecastPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/GroupStageMatchPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/MatchDayPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/OtherKnockoutStageMatchPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/PlayerPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/RoundOfSixteenMatchPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/TeamPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/ThirdPlaceMatchPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldCupForecastPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldCupGroupPropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldcupforecastMessages.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldcupforecastPackagePropertiesEditionPolicyProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldcupforecastPackagePropertiesEditionProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/WorldcupforecastPropertiesEditionPartProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/worldcupforecastMessages.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src-gen/org/eclipse/worldcupforecast/providers/worldcupforecastMessages_fr.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/parts/forms/ForecastPropertiesEditionPartFormCustom.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/parts/forms/TeamPropertiesEditionPartFormCustom.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastPLayerSpecificPropertiesEditionPartForm.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/parts/forms/WorldCupForecastPlayersRatingPropertiesEditionPartFormCustom.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/providers/WorldcupforecastPropertiesEditionPartProviderCustom.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.edit/src/org/eclipse/worldcupforecast/providers/WorldcupforecastSpecificPropertiesEditionPartProvider.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/.gitignore1
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/build.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/plugin.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/editor/splashHandlers/ExtensibleSplashHandler.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/presentation/WorldcupforecastActionBarContributor.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/presentation/WorldcupforecastEditor.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/presentation/WorldcupforecastEditorAdvisor.java14
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/presentation/WorldcupforecastEditorPlugin.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src-gen/org/eclipse/worldcupforecast/presentation/WorldcupforecastModelWizard.java12
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/GenerateForecasts.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/GenerateForecastsCommand.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/ImportPlayerAction.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/ImportPlayerCommand.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/NewPlayerAction.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/OpenModelAction.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/SendForecastAction.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/ValidateForecasts.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/actions/ValidateForecastsCommand.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/presentation/WorldcupforecastModelPlayerWizard.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/send/ClientHttpRequest.java17
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/utils/Urls.java4
-rw-r--r--tests/org.eclipse.worldcupforecast.editor/src/org/eclipse/worldcupforecast/utils/urls.properties10
-rw-r--r--tests/org.eclipse.worldcupforecast/.gitignore1
-rw-r--r--tests/org.eclipse.worldcupforecast/build.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast/plugin.properties4
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Day.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/FinalScore.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Forecast.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/ForecastDay.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/GroupStageMatch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/KnockoutStageMatch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Match.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/MatchDay.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/MatchType.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/OtherKnockoutStageMatch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Player.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/RoundOfSixteenMatch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Score.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/Team.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/ThirdPlaceMatch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/ValidatePlayer.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/WorldCupForecast.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/WorldCupGroup.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/WorldcupforecastFactory.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/WorldcupforecastPackage.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/DayImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/FinalScoreImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/ForecastDayImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/ForecastImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/GroupStageMatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/KnockoutStageMatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/MatchDayImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/MatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/OtherKnockoutStageMatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/PlayerImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/RoundOfSixteenMatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/ScoreImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/TeamImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/ThirdPlaceMatchImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/ValidatePlayerImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/WorldCupForecastImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/WorldCupGroupImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/WorldcupforecastFactoryImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/impl/WorldcupforecastPackageImpl.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/util/WorldcupforecastAdapterFactory.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src-gen/org/eclipse/worldcupforecast/util/WorldcupforecastSwitch.java10
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/FinalScoreHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/ForecastHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/GroupHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/MatchHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/PlayerHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/helper/TeamHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/utils/WorldCupForecastHelper.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/utils/XMIResourceFactoryImplCustom.java4
-rw-r--r--tests/org.eclipse.worldcupforecast/src/org/eclipse/worldcupforecast/utils/XMIResourceImplCustom.java4
304 files changed, 1319 insertions, 16844 deletions
diff --git a/features/org.eclipse.emf.eef.indigo-feature/epl-v10.html b/features/org.eclipse.emf.eef.indigo-feature/epl-v10.html
deleted file mode 100755
index 0d34dd06a..000000000
--- a/features/org.eclipse.emf.eef.indigo-feature/epl-v10.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Public License - Version 1.0</title>
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style>
-
-</head>
-
-<body lang="EN-US">
-
-<h2>Eclipse Public License - v 1.0</h2>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>&quot;Contribution&quot; means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>&quot;Contributor&quot; means any person or entity that distributes
-the Program.</p>
-
-<p>&quot;Licensed Patents&quot; mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>&quot;Program&quot; means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>&quot;Recipient&quot; means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-(&quot;Commercial Contributor&quot;) hereby agrees to defend and
-indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
-against any losses, damages and costs (collectively &quot;Losses&quot;)
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN &quot;AS IS&quot; 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. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.emf.eef.indigo-feature/feature.properties b/features/org.eclipse.emf.eef.indigo-feature/feature.properties
deleted file mode 100755
index 74947aa17..000000000
--- a/features/org.eclipse.emf.eef.indigo-feature/feature.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2012 Obeo.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Obeo - initial API and implementation
-###############################################################################
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Modeling Project
-
-# "featureName" property - name of the feature
-featureName=Extended Editing Framework - SDK for Indigo
-
-# "updateSiteName" property - label for the update site (on download.eclipse.org)
-modelingUpdateSiteName=Eclipse Modeling Project Updates
-
-# "description" property - description of the feature
-description=Extended Editing Framework - SDK for Indigo.\n\
-This includes :\n\
-- EEF metamodels\n\
-- EEF editors\n\
-- EEF models initializer\n\
-- EEF Acceleo generators\n\
-- EEF Documentation\n\
-- all sources\n\
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-February 1, 2011\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.emf.eef.indigo-feature/license.html b/features/org.eclipse.emf.eef.indigo-feature/license.html
deleted file mode 100755
index a1fe5ea3f..000000000
--- a/features/org.eclipse.emf.eef.indigo-feature/license.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>February 1, 2011</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
-
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
-
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-
-</body>
-</html>
diff --git a/features/org.eclipse.emf.eef.indigo-feature/license.txt b/features/org.eclipse.emf.eef.indigo-feature/license.txt
deleted file mode 100755
index 24937b64c..000000000
--- a/features/org.eclipse.emf.eef.indigo-feature/license.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
-
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.eef.codegen.ecore/META-INF/MANIFEST.MF
index f724019ce..970d4cf92 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.emf.eef.codegen.ecore;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.emf.eef.codegen.ecore.EMFCodegenPlugin
Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
org.eclipse.emf.codegen;bundle-version="2.4.0",
org.eclipse.emf.codegen.ecore;bundle-version="2.4.0",
org.eclipse.emf.ecore;bundle-version="2.4.0",
@@ -14,11 +14,11 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ocl.ecore;bundle-version="1.2.0",
org.eclipse.acceleo.model;bundle-version="3.1.0",
org.eclipse.acceleo.engine;bundle-version="3.1.0",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="3.4.0",
+ org.eclipse.ui;bundle-version="3.4.0",
+ org.eclipse.ui.ide;bundle-version="3.4.0",
org.eclipse.acceleo.parser;bundle-version="3.1.0";resolution:=optional,
- org.eclipse.emf.eef.codegen.launcher;bundle-version="1.0.0"
+ org.eclipse.emf.eef.codegen.launcher;bundle-version="1.1.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/build.acceleo b/plugins/org.eclipse.emf.eef.codegen.ecore/build.acceleo
index b494d2fb1..3c0291aa9 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/build.acceleo
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.emf.eef.codegen;${target.folder}/../../org.eclipse.emf.eef.runtime;"
+ dependencies="${target.folder}/../../org.eclipse.emf.eef.codegen.launcher;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/pom.xml b/plugins/org.eclipse.emf.eef.codegen.ecore/pom.xml
index 0b8f91318..bc8272982 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/pom.xml
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/pom.xml
@@ -50,10 +50,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
</plugins>
</build>
</project>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEdit.java b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEdit.java
index 885e87f7a..3ec9a0fad 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEdit.java
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEdit.java
@@ -151,6 +151,13 @@ public class GenEdit extends AbstractAcceleoGenerator {
List<String> arguments = new ArrayList<String>();
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* Add in this list all the arguments used by the starting point of the generation
* If your main template is called on an element of your model and a String, you can
* add in "arguments" this "String" attribute.
@@ -287,15 +294,38 @@ public class GenEdit extends AbstractAcceleoGenerator {
@Override
public List<String> getProperties() {
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO if your generation module requires access to properties files, add their qualified path to the list here.
- * Properties files are expected to be in source folders, and the path here to be the qualified path as if referring
- * to a Java class. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample",
- * the path that needs be added to this list is "/org/eclipse/acceleo/sample/messages.properties". If you want to change the
- * contentof this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation of
- * this class will revert your modifications.
*
- * To learn more about Properties Files, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse
+ * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties
+ * files to the "propertiesFiles" list:
+ *
+ * final String prefix = "platform:/plugin/";
+ * final String pluginName = "org.eclipse.acceleo.module.sample";
+ * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/";
+ * final String fileName = "default.properties";
+ * propertiesFiles.add(prefix + pluginName + packagePath + fileName);
+ *
+ * With this mechanism, you can load properties files from your plugin or from another plugin.
+ *
+ * You may want to load properties files from the file system, for that you need to add the absolute path of the file:
+ *
+ * propertiesFiles.add("C:\Users\MyName\MyFile.properties");
+ *
+ * If you want to let your users add properties files located in the same folder as the model:
+ *
+ * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) {
+ * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource()));
+ * }
+ *
+ * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents).
*/
return propertiesFiles;
}
@@ -342,24 +372,35 @@ public class GenEdit extends AbstractAcceleoGenerator {
}
/*
- * TODO If you need additional package registrations, you can register them here. The following line
- * (in comment) is an example of the package registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
- * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications. You can use the method
- * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
- * To register a package properly, please follow the following conventions:
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
+ * If you need additional package registrations, you can register them here. The following line
+ * (in comment) is an example of the package registration for UML.
+ *
+ * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to
+ * register is in the workspace.
*
+ * To register a package properly, please follow the following conventions:
+ *
+ * If the package is located in another plug-in, already installed in Eclipse. The following content should
+ * have been generated at the beginning of this method. Do not register the package using this mechanism if
+ * the metamodel is located in the workspace.
+ *
* if (!isInWorkspace(UMLPackage.class)) {
* // The normal package registration if your metamodel is in a plugin.
* resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- * } else {
- * // The package registration that will be used if the metamodel is not deployed in a plugin.
- * // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
- * resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
* }
*
- * To learn more about Package Registration, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * If the package is located in another project in your workspace, the plugin containing the package has not
+ * been register by EMF and Acceleo should register it automatically. If you want to use the generator in
+ * stand alone, the regular registration (seen a couple lines before) is needed.
+ *
+ * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents).
*/
}
@@ -374,13 +415,19 @@ public class GenEdit extends AbstractAcceleoGenerator {
public void registerResourceFactories(ResourceSet resourceSet) {
super.registerResourceFactories(resourceSet);
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO If you need additional resource factories registrations, you can register them here. the following line
- * (in comment) is an example of the resource factory registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation
- * of this class will revert your modifications.
- *
- * To learn more about the registration of Resource Factories, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * (in comment) is an example of the resource factory registration for UML.
+ *
+ * If you want to use the generator in stand alone, the resource factory registration will be required.
+ *
+ * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents).
*/
// resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEditor.java b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEditor.java
index cd83f3360..1d4922eaf 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEditor.java
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenEditor.java
@@ -151,6 +151,13 @@ public class GenEditor extends AbstractAcceleoGenerator {
List<String> arguments = new ArrayList<String>();
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* Add in this list all the arguments used by the starting point of the generation
* If your main template is called on an element of your model and a String, you can
* add in "arguments" this "String" attribute.
@@ -288,15 +295,38 @@ public class GenEditor extends AbstractAcceleoGenerator {
@Override
public List<String> getProperties() {
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO if your generation module requires access to properties files, add their qualified path to the list here.
- * Properties files are expected to be in source folders, and the path here to be the qualified path as if referring
- * to a Java class. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample",
- * the path that needs be added to this list is "/org/eclipse/acceleo/sample/messages.properties". If you want to change the
- * contentof this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation of
- * this class will revert your modifications.
*
- * To learn more about Properties Files, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse
+ * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties
+ * files to the "propertiesFiles" list:
+ *
+ * final String prefix = "platform:/plugin/";
+ * final String pluginName = "org.eclipse.acceleo.module.sample";
+ * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/";
+ * final String fileName = "default.properties";
+ * propertiesFiles.add(prefix + pluginName + packagePath + fileName);
+ *
+ * With this mechanism, you can load properties files from your plugin or from another plugin.
+ *
+ * You may want to load properties files from the file system, for that you need to add the absolute path of the file:
+ *
+ * propertiesFiles.add("C:\Users\MyName\MyFile.properties");
+ *
+ * If you want to let your users add properties files located in the same folder as the model:
+ *
+ * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) {
+ * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource()));
+ * }
+ *
+ * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents).
*/
return propertiesFiles;
}
@@ -343,24 +373,35 @@ public class GenEditor extends AbstractAcceleoGenerator {
}
/*
- * TODO If you need additional package registrations, you can register them here. The following line
- * (in comment) is an example of the package registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
- * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications. You can use the method
- * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
- * To register a package properly, please follow the following conventions:
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
+ * If you need additional package registrations, you can register them here. The following line
+ * (in comment) is an example of the package registration for UML.
+ *
+ * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to
+ * register is in the workspace.
*
+ * To register a package properly, please follow the following conventions:
+ *
+ * If the package is located in another plug-in, already installed in Eclipse. The following content should
+ * have been generated at the beginning of this method. Do not register the package using this mechanism if
+ * the metamodel is located in the workspace.
+ *
* if (!isInWorkspace(UMLPackage.class)) {
* // The normal package registration if your metamodel is in a plugin.
* resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- * } else {
- * // The package registration that will be used if the metamodel is not deployed in a plugin.
- * // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
- * resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
* }
*
- * To learn more about Package Registration, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * If the package is located in another project in your workspace, the plugin containing the package has not
+ * been register by EMF and Acceleo should register it automatically. If you want to use the generator in
+ * stand alone, the regular registration (seen a couple lines before) is needed.
+ *
+ * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents).
*/
}
@@ -375,13 +416,19 @@ public class GenEditor extends AbstractAcceleoGenerator {
public void registerResourceFactories(ResourceSet resourceSet) {
super.registerResourceFactories(resourceSet);
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO If you need additional resource factories registrations, you can register them here. the following line
- * (in comment) is an example of the resource factory registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation
- * of this class will revert your modifications.
- *
- * To learn more about the registration of Resource Factories, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * (in comment) is an example of the resource factory registration for UML.
+ *
+ * If you want to use the generator in stand alone, the resource factory registration will be required.
+ *
+ * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents).
*/
// resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenModel.java b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenModel.java
index 0942fd3a5..7349903cc 100644
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenModel.java
+++ b/plugins/org.eclipse.emf.eef.codegen.ecore/src/org/eclipse/emf/eef/codegen/ecore/main/GenModel.java
@@ -162,6 +162,13 @@ public class GenModel extends AbstractAcceleoGenerator {
List<String> arguments = new ArrayList<String>();
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* Add in this list all the arguments used by the starting point of the generation
* If your main template is called on an element of your model and a String, you can
* add in "arguments" this "String" attribute.
@@ -331,15 +338,38 @@ public class GenModel extends AbstractAcceleoGenerator {
@Override
public List<String> getProperties() {
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO if your generation module requires access to properties files, add their qualified path to the list here.
- * Properties files are expected to be in source folders, and the path here to be the qualified path as if referring
- * to a Java class. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample",
- * the path that needs be added to this list is "/org/eclipse/acceleo/sample/messages.properties". If you want to change the
- * contentof this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation of
- * this class will revert your modifications.
*
- * To learn more about Properties Files, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse
+ * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties
+ * files to the "propertiesFiles" list:
+ *
+ * final String prefix = "platform:/plugin/";
+ * final String pluginName = "org.eclipse.acceleo.module.sample";
+ * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/";
+ * final String fileName = "default.properties";
+ * propertiesFiles.add(prefix + pluginName + packagePath + fileName);
+ *
+ * With this mechanism, you can load properties files from your plugin or from another plugin.
+ *
+ * You may want to load properties files from the file system, for that you need to add the absolute path of the file:
+ *
+ * propertiesFiles.add("C:\Users\MyName\MyFile.properties");
+ *
+ * If you want to let your users add properties files located in the same folder as the model:
+ *
+ * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) {
+ * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource()));
+ * }
+ *
+ * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents).
*/
return propertiesFiles;
}
@@ -389,24 +419,35 @@ public class GenModel extends AbstractAcceleoGenerator {
}
/*
- * TODO If you need additional package registrations, you can register them here. The following line
- * (in comment) is an example of the package registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
- * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications. You can use the method
- * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
- * To register a package properly, please follow the following conventions:
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
+ * If you need additional package registrations, you can register them here. The following line
+ * (in comment) is an example of the package registration for UML.
+ *
+ * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to
+ * register is in the workspace.
*
+ * To register a package properly, please follow the following conventions:
+ *
+ * If the package is located in another plug-in, already installed in Eclipse. The following content should
+ * have been generated at the beginning of this method. Do not register the package using this mechanism if
+ * the metamodel is located in the workspace.
+ *
* if (!isInWorkspace(UMLPackage.class)) {
* // The normal package registration if your metamodel is in a plugin.
* resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- * } else {
- * // The package registration that will be used if the metamodel is not deployed in a plugin.
- * // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
- * resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
* }
*
- * To learn more about Package Registration, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * If the package is located in another project in your workspace, the plugin containing the package has not
+ * been register by EMF and Acceleo should register it automatically. If you want to use the generator in
+ * stand alone, the regular registration (seen a couple lines before) is needed.
+ *
+ * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents).
*/
}
@@ -422,13 +463,19 @@ public class GenModel extends AbstractAcceleoGenerator {
public void registerResourceFactories(ResourceSet resourceSet) {
super.registerResourceFactories(resourceSet);
/*
+ * If you want to change the content of this method, do NOT forget to change the "@generated"
+ * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
+ * of the Acceleo module with the main template that has caused the creation of this class will
+ * revert your modifications.
+ */
+
+ /*
* TODO If you need additional resource factories registrations, you can register them here. the following line
- * (in comment) is an example of the resource factory registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation
- * of this class will revert your modifications.
- *
- * To learn more about the registration of Resource Factories, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
+ * (in comment) is an example of the resource factory registration for UML.
+ *
+ * If you want to use the generator in stand alone, the resource factory registration will be required.
+ *
+ * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents).
*/
// resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.javajetinc b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.javajetinc
deleted file mode 100644
index 3c2ca6918..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.javajetinc
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
-<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
-<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
- * <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
-<%} else {%>
- * <copyright>
- * </copyright>
- *
- * <%="$"%>Id<%="$"%>
-<%}}%>
- */
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.jetinc b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.jetinc
deleted file mode 100644
index b6a343a6d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.jetinc
+++ /dev/null
@@ -1 +0,0 @@
-<%@ include file="Header.javajetinc"%> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.propertiesjetinc b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.propertiesjetinc
deleted file mode 100644
index 345416ba3..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.propertiesjetinc
+++ /dev/null
@@ -1,9 +0,0 @@
-<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
-<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
-# <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
-<%} else {%>
-# <copyright>
-# </copyright>
-#
-# <%="$"%>Id<%="$"%>
-<%}}%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.xmljetinc b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.xmljetinc
deleted file mode 100644
index 74c32c053..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/Header.xmljetinc
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
-<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
- <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
-<%} else {%>
- <copyright>
- </copyright>
-
- <%="$"%>Id<%="$"%>
-<%}}%>
--->
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Images.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Images.javajet
deleted file mode 100644
index 868e44b50..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Images.javajet
+++ /dev/null
@@ -1,46 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Images" version="$Id: Images.javajet,v 1.2 2011/02/01 15:42:01 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditPluginPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public interface <%=genModel.getEditPluginClassName()%>Images extends <%=genModel.getImportedName("com.google.gwt.resources.client.ClientBundle")%>
-{
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%for (GenClass genClass : genPackage.getGenClasses()) {%>
- <%if (genClass.isImage()) { String image = genClass.getItemIconFileName(); image = image.substring(image.lastIndexOf("/icons/") + 1); %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Source("<%=image%>")
- <%=genModel.getImportedName("com.google.gwt.resources.client.ImageResource")%> <%=genClass.getItemIconAccessorName()%>();
-
- <%}%>
- <%}%>
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProvider.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProvider.javajet
deleted file mode 100644
index 4cffbeaa0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProvider.javajet
+++ /dev/null
@@ -1,476 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ItemProvider" version="$Id: ItemProvider.javajet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenClass genClass = (GenClass)argument; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getProviderPackageName()%>;
-
-
-<%genModel.addImport("org.eclipse.emf.common.notify.AdapterFactory");%>
-<%genModel.addImport("org.eclipse.emf.common.notify.Notification");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IEditingDomainItemProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IItemLabelProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IItemPropertySource");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IStructuredItemContentProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.ITreeItemContentProvider");%>
-<%String _List = genModel.getImportedName(genModel.useGenerics() ? "java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor>" : "java.util.List");%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * This is the item provider adapter for a {@link <%=genClass.getQualifiedInterfaceName()%>} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genClass.getProviderClassName()%>
- extends <%=genClass.getProviderBaseClassName() != null ? genClass.getProviderBaseClassName() : genModel.getImportedName("org.eclipse.emf.edit.provider.ItemProviderAdapter")%>
- implements
-<%for (Iterator<String> i = genPackage.getProviderSupportedTypes().iterator(); i.hasNext(); ) {%>
- <%=genModel.getImportedName(i.next())%><%if (i.hasNext()){%>,<%}%>
-<%}%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genClass.getProviderClassName()%>(AdapterFactory adapterFactory)
- {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public <%=_List%> getPropertyDescriptors(Object object)
- {
- if (itemPropertyDescriptors == null)
- {
- super.getPropertyDescriptors(object);
-
-<%for (GenFeature genFeature : genClass.getPropertyFeatures()) { %>
- add<%=genFeature.getCapName()%>PropertyDescriptor(object);
-<%}%>
- }
- return itemPropertyDescriptors;
- }
-
-<%for (GenFeature genFeature : genClass.getPropertyFeatures()) { %>
- /**
- * This adds a property descriptor for the <%=genFeature.getFormattedName()%> feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void add<%=genFeature.getCapName()%>PropertyDescriptor(Object object)
- {
-<%@ include file="ItemProvider/addPropertyDescriptor.override.javajetinc" fail="alternative" %>
-<%@ start %>
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((<%=genModel.getImportedName("org.eclipse.emf.edit.provider.ComposeableAdapterFactory")%>)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_feature"),<%=genModel.getNonNLS()%>
- <%if (genFeature.getPropertyDescription() == null || genFeature.getPropertyDescription().length() == 0) {%>
- getString("_UI_PropertyDescriptor_description", "_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_feature", "_UI_<%=genFeature.getGenClass().getName()%>_type"),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
- <%} else {%>
- getString("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_description"),<%=genModel.getNonNLS()%>
- <%}%>
- <%=genFeature.getQualifiedFeatureAccessor()%>,
- <%=genFeature.getProperty() == GenPropertyKind.EDITABLE_LITERAL ? "true" : "false"%>,
- <%=genFeature.isPropertyMultiLine() ? "true" : "false"%>,
- <%=genFeature.isPropertySortChoices() ? "true" : "false"%>,
- <%if (genFeature.isReferenceType()) {%>
- null,
- <%} else {%>
- <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ItemPropertyDescriptor")%>.<%=genFeature.getPropertyImageName()%>,
- <%}%>
- <%if (genFeature.getPropertyCategory() == null || genFeature.getPropertyCategory().length() == 0) {%>
- null,
- <%} else {%>
- getString("<%=genModel.getPropertyCategoryKey(genFeature.getPropertyCategory())%>"),<%=genModel.getNonNLS()%>
- <%}%>
- <%if (genFeature.getPropertyFilterFlags().isEmpty()) {%>
- null));
- <%} else {%>
- new String[] {
- <%for (Iterator<String> j = genFeature.getPropertyFilterFlags().iterator(); j.hasNext();) { String filterFlag = j.next();%>
- <%if (filterFlag != null && filterFlag.length() > 0) {%>
- "<%=filterFlag%>"<%if (j.hasNext()) {%>,<%}%><%=genModel.getNonNLS()%>
- <%}%>
- <%}%>
- }));
- <%}%>
-<%@ end %><%//ItemProvider/addPropertyDescriptor.override.javajetinc%>
- }
-
-<%}%>
-<%if (!genClass.getChildrenFeatures().isEmpty()) {%>
- /**
- * 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}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public <%=genModel.getImportedName(genModel.useGenerics() ? "java.util.Collection<? extends org.eclipse.emf.ecore.EStructuralFeature>" : "java.util.Collection")%> getChildrenFeatures(Object object)
- {
- if (childrenFeatures == null)
- {
- super.getChildrenFeatures(object);
-<%for (GenFeature genFeature : genClass.getChildrenFeatures()) { %>
- childrenFeatures.add(<%=genFeature.getQualifiedFeatureAccessor()%>);
-<%}%>
- }
- return childrenFeatures;
- }
-
-<%if (!genClass.getChildrenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected <%=genModel.getImportedName("org.eclipse.emf.ecore.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.
-
- return super.getChildFeature(object, child);
- }
-
-<%}%>
-<%}%>
-<%if (genClass.needsHasChildrenMethodOverride()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, <%=genModel.isOptimizedHasChildren()%>);
- }
-
-<%}%>
-<%if (genClass.isImage()) {%>
- /**
- * This returns <%=genClass.getName()%>.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/<%=genClass.getName()%>"));<%=genModel.getNonNLS()%>
- }
-
-<%}%>
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && !genModel.isCreationIcons()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
-<%}%>
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public String getText(Object object)
- {
-<%@ include file="ItemProvider/getText.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (genClass.isMapEntry()) {%>
- <%=genClass.getImportedInterfaceName()%><%if (genModel.useGenerics()) {%><?, ?><%}%> <%=genClass.getSafeUncapName()%> = (<%=genClass.getImportedInterfaceName()%><%if (genModel.useGenerics()) {%><?, ?><%}%>)object;
- <%if (!genClass.getMapEntryKeyFeature().isPropertyMultiLine() && !genClass.getMapEntryValueFeature().isPropertyMultiLine()) {%>
- return "" + <%=genClass.getSafeUncapName()%>.getKey() + " -> " + <%=genClass.getSafeUncapName()%>.getValue();<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- <%} else {%>
- <%if (genClass.getMapEntryKeyFeature().isPropertyMultiLine()) {%>
- String key = crop("" + <%=genClass.getSafeUncapName()%>.getKey());<%=genModel.getNonNLS()%>
- <%} else {%>
- String key = "" + <%=genClass.getSafeUncapName()%>.getKey();<%=genModel.getNonNLS()%>
- <%}%>
- <%if (genClass.getMapEntryValueFeature().isPropertyMultiLine()) {%>
- String value = crop("" + <%=genClass.getSafeUncapName()%>.getValue());<%=genModel.getNonNLS()%>
- <%} else {%>
- String value = "" + <%=genClass.getSafeUncapName()%>.getValue();<%=genModel.getNonNLS()%>
- <%}%>
- return key + " -> " + value;<%=genModel.getNonNLS()%>
- <%}%>
-<%} else if (genClass.getLabelFeature() != null) { GenFeature labelFeature = genClass.getLabelFeature();%>
- <%if (labelFeature.isPrimitiveType() && !labelFeature.getGenClass().isDynamic() && !labelFeature.isSuppressedGetVisibility()) {%>
- <%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%> <%=genClass.getSafeUncapName()%> = (<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object;
- return getString("_UI_<%=genClass.getName()%>_type") + " " + <%=genClass.getSafeUncapName()%>.<%=genClass.getLabelFeature().getGetAccessor()%>();<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- <%} else {%>
- <%if (labelFeature.isStringType() && !labelFeature.getGenClass().isDynamic() && !labelFeature.isSuppressedGetVisibility()) {%>
- <%if (labelFeature.isPropertyMultiLine()) {%>
- String label = crop(((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>());
- <%} else {%>
- String label = ((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>();
- <%}%>
- <%} else {%>
- <%if (labelFeature.isSuppressedGetVisibility() || labelFeature.getGenClass().isDynamic()) {%>
- <%=genModel.getImportedName("java.lang.Object")%> labelValue = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%>)object).eGet(<%=labelFeature.getQualifiedFeatureAccessor()%>);
- <%} else {%>
- <%=labelFeature.getRawImportedType()%> labelValue = ((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>();
- <%}%>
- String label = labelValue == null ? null : labelValue.toString();
- <%}%>
- return label == null || label.length() == 0 ?
- getString("_UI_<%=genClass.getName()%>_type") :<%=genModel.getNonNLS()%>
- getString("_UI_<%=genClass.getName()%>_type") + " " + label;<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- <%}%>
-<%} else {%>
- return getString("_UI_<%=genClass.getName()%>_type");<%=genModel.getNonNLS()%>
-<%}%>
-<%@ end %><%//ItemProvider/getText.override.javajetinc%>
- }
-
- /**
- * 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}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void notifyChanged(Notification notification)
- {
- updateChildren(notification);
-<%if (!genClass.getLabelNotifyFeatures().isEmpty() || !genClass.getContentNotifyFeatures().isEmpty() || !genClass.getLabelAndContentNotifyFeatures().isEmpty()) {%>
-
- switch (notification.getFeatureID(<%=genClass.getRawImportedInterfaceName()%>.class))
- {
- <%if (!genClass.getLabelNotifyFeatures().isEmpty()) {%>
- <%for (GenFeature genFeature : genClass.getLabelNotifyFeatures()) { %>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%}%>
- fireNotifyChanged(new <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ViewerNotification")%>(notification, notification.getNotifier(), false, true));
- return;
- <%}%>
- <%if (!genClass.getContentNotifyFeatures().isEmpty()) {%>
- <%for (GenFeature genFeature : genClass.getContentNotifyFeatures()) { %>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%}%>
- fireNotifyChanged(new <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ViewerNotification")%>(notification, notification.getNotifier(), true, false));
- return;
- <%}%>
- <%if (!genClass.getLabelAndContentNotifyFeatures().isEmpty()) {%>
- <%for (GenFeature genFeature : genClass.getLabelAndContentNotifyFeatures()) { %>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%}%>
- fireNotifyChanged(new <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ViewerNotification")%>(notification, notification.getNotifier(), true, true));
- return;
- <%}%>
- }
-<%}%>
- super.notifyChanged(notification);
- }
-
-<%if (genModel.isCreationCommands()) {%>
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void collectNewChildDescriptors(<%=genModel.getImportedName(genModel.useGenerics() ? "java.util.Collection<java.lang.Object>" : "java.util.Collection")%> newChildDescriptors, Object object)
- {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- <%for (GenClass.ChildCreationData childCreationData : genClass.getChildCreationData()) { GenFeature createFeature = childCreationData.createFeature; GenFeature delegatedFeature = childCreationData.delegatedFeature; GenClassifier createClassifier = childCreationData.createClassifier;%>
- <%if (createFeature.isFeatureMapType()) {%>
- <%if (delegatedFeature.isReferenceType()) { GenClass createClass = (GenClass)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceDelegatedFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
-
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMapUtil")%>.createEntry
- (<%=delegatedFeature.getQualifiedFeatureAccessor()%>,
- <%if (createClass.isMapEntry()) { %>
- <%=createClass.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.create(<%=createClass.getQualifiedClassifierAccessor()%>))));
- <%} else {%>
- <%=createClass.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=createClass.getName()%>())));
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceDelegatedFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsReferenceDelegatedFeature.override.javajetinc%>
- <%} else { GenDataType createDataType = (GenDataType)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeDelegatedFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
-
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMapUtil")%>.createEntry
- (<%=delegatedFeature.getQualifiedFeatureAccessor()%>,
- <%if (delegatedFeature.isEnumBasedType()) {%>
- <%=delegatedFeature.getTypeGenEnum().getStaticValue(delegatedFeature.getEcoreFeature().getDefaultValueLiteral())%>)));
- <%} else if (delegatedFeature.isStringBasedType()) {%>
- <%=delegatedFeature.getCreateChildValueLiteral()%>)));<%=genModel.getNonNLS()%>
- <%} else { String literal = delegatedFeature.getCreateChildValueLiteral();%>
- <%=createDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=createDataType.getQualifiedClassifierAccessor()%>, <%=literal%>))));<%if (literal != null) {%><%=genModel.getNonNLS()%><%} else {%> // TODO: ensure this is a valid literal value<%}%>
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeDelegatedFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsAttributeDelegatedFeature.override.javajetinc%>
- <%}%>
- <%} else if (createFeature.isReferenceType()) { GenClass createClass = (GenClass)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
-
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%if (createClass.isMapEntry()) { %>
- <%=createClass.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.create(<%=createClass.getQualifiedClassifierAccessor()%>)));
- <%} else {%>
- <%=createClass.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=createClass.getName()%>()));
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsReferenceFeature.override.javajetinc %>
- <%} else { GenDataType createDataType = (GenDataType)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
-
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%if (createFeature.isEnumBasedType()) {%>
- <%=createFeature.getTypeGenEnum().getStaticValue(createFeature.getEcoreFeature().getDefaultValueLiteral())%>));
- <%} else if (createFeature.isStringBasedType()) {%>
- <%=createFeature.getCreateChildValueLiteral()%>));<%=genModel.getNonNLS()%>
- <%} else { String literal = createFeature.getCreateChildValueLiteral();%>
- <%=createDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=createDataType.getQualifiedClassifierAccessor()%>, <%=literal%>)));<%if (literal != null) {%><%=genModel.getNonNLS()%><%} else {%> // TODO: ensure this is a valid literal value<%}%>
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsAttributeFeature.override.javajetinc%>
- <%}%>
- <%}%>
- }
-
- <%if (!genClass.getSharedClassCreateChildFeatures().isEmpty()) {%>
- /**
- * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public String getCreateChildText(Object owner, Object feature, Object child, <%=genModel.getImportedName(genModel.useGenerics() ? "java.util.Collection<?>" : "java.util.Collection")%> selection)
- {
- Object childFeature = feature;
- Object childObject = child;
-
- <%if (genClass.hasFeatureMapCreateChildFeatures()) {%>
- if (childFeature instanceof <%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%> && <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMapUtil")%>.isFeatureMap((EStructuralFeature)childFeature))
- {
- <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Entry entry = (FeatureMap.Entry)childObject;
- childFeature = entry.getEStructuralFeature();
- childObject = entry.getValue();
- }
-
- <%}%>
- boolean qualify =
- <%for (Iterator<GenFeature> i = genClass.getSharedClassCreateChildFeatures().iterator(); i.hasNext();) { GenFeature createFeature = i.next();%>
- childFeature == <%=createFeature.getQualifiedFeatureAccessor()%><%=i.hasNext() ? " ||" : ";"%>
- <%}%>
-
- if (qualify)
- {
- return getString
- ("_UI_CreateChild_text2",<%=genModel.getNonNLS()%>
- new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
- }
- return super.getCreateChildText(owner, feature, child, selection);
- }
-
- <%}%>
-<%}%>
-<%if (genClass.getProviderExtendsGenClass() == null || genClass.getProviderExtendsGenClass().getGenPackage() != genPackage && (!genPackage.isExtensibleProviderFactory() || genClass.getProviderExtendsGenClass().getGenPackage().isExtensibleProviderFactory() != genPackage.isExtensibleProviderFactory())) {%>
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator")%> getResourceLocator()
- {
-<%if (genPackage.isExtensibleProviderFactory()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.edit.provider.IChildCreationExtender")%>)adapterFactory).getResourceLocator();
-<%} else {%>
- return <%=genPackage.getImportedEditPluginClassName()%>.INSTANCE;
-<%}%>
- }
-
-<%}%>
-<%@ include file="ItemProvider/insert.javajetinc" fail="silent" %>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProviderAdapterFactory.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProviderAdapterFactory.javajet
deleted file mode 100644
index 38b92b0c0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/ItemProviderAdapterFactory.javajet
+++ /dev/null
@@ -1,561 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ItemProviderAdapterFactory" version="$Id: ItemProviderAdapterFactory.javajet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getProviderPackageName()%>;
-
-<%genModel.addImport("org.eclipse.emf.common.notify.Adapter");%>
-<%genModel.addImport("org.eclipse.emf.common.notify.Notification");%>
-<%genModel.addImport("org.eclipse.emf.common.notify.Notifier");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.ChangeNotifier");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.ComposeableAdapterFactory");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.ComposedAdapterFactory");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IChangeNotifier");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IEditingDomainItemProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IItemLabelProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IItemPropertySource");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.INotifyChangedListener");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.IStructuredItemContentProvider");%>
-<%genModel.addImport("org.eclipse.emf.edit.provider.ITreeItemContentProvider");%>
-<%boolean useGenerics = genModel.useGenerics();%>
-<%String _ArrayList = genModel.getImportedName(useGenerics ? "java.util.ArrayList<java.lang.Object>" : "java.util.ArrayList");%>
-<%String _Collection = genModel.getImportedName(useGenerics ? "java.util.Collection<java.lang.Object>" : "java.util.Collection");%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getItemProviderAdapterFactoryClassName()%> extends <%=genPackage.getImportedAdapterFactoryClassName()%> implements ComposeableAdapterFactory, IChangeNotifier<%if (genPackage.isDisposableProviderFactory()) {%>, <%=genModel.getImportedName("org.eclipse.emf.edit.provider.IDisposable")%><%}%><%if (genPackage.isExtensibleProviderFactory()) {%>, <%=genModel.getImportedName("org.eclipse.emf.edit.provider.IChildCreationExtender")%><%}%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
-<%if (genPackage.isDisposableProviderFactory() && genPackage.hasStatefulProvider()) {%>
- /**
- * This keeps track of all the item providers created, so that they can be {@link #dispose disposed}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.emf.edit.provider.Disposable")%> disposable = new Disposable();
-
-<%}%>
-<%if (genPackage.isExtensibleProviderFactory()) {%>
- /**
- * This helps manage the child creation extenders.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ChildCreationExtenderManager")%> childCreationExtenderManager = new <%=genModel.getImportedName("org.eclipse.emf.edit.provider.ChildCreationExtenderManager")%>(<%=genPackage.getImportedEditPluginClassName()%>.INSTANCE, <%=genPackage.getImportedPackageInterfaceName()%>.eNS_URI);
-
-<%}%>
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_Collection%> supportedTypes = new <%=_ArrayList%>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getItemProviderAdapterFactoryClassName()%>()
- {
-<%for (String name : genPackage.getProviderSupportedTypes()) {%>
- supportedTypes.add(<%=genModel.getImportedName(name)%>.class);
-<%}%>
- }
-
-<%for (GenPackage genDelegate : genPackage.getAdapterDelegatePackages()) {%>
- /**
- * This keeps track of the factory to which to delegate adapter creation for objects from that package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genDelegate.getImportedAdapterFactoryClassName()%> <%=genPackage.getUncapAdapterFactoryDelegateName(genDelegate)%> = null;
-
- /**
- * This determines the delegate factory for the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genDelegate.getImportedAdapterFactoryClassName()%> get<%=genPackage.getAdapterFactoryDelegateName(genDelegate)%>()
- {
- if (<%=genPackage.getUncapAdapterFactoryDelegateName(genDelegate)%> == null)
- {
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")%> rootAdapterFactory = getRootAdapterFactory();
- if (rootAdapterFactory instanceof ComposedAdapterFactory)
- {
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.AdapterFactory")%> delegateAdapterFactory =
- ((ComposedAdapterFactory)rootAdapterFactory).getFactoryForType(<%=genDelegate.getImportedAdapterFactoryClassName()%>.getPackage());
- if (delegateAdapterFactory instanceof <%=genDelegate.getImportedAdapterFactoryClassName()%>)
- {
- <%=genPackage.getUncapAdapterFactoryDelegateName(genDelegate)%> = (<%=genDelegate.getImportedAdapterFactoryClassName()%>)delegateAdapterFactory;
- }
- }
- }
- return <%=genPackage.getUncapAdapterFactoryDelegateName(genDelegate)%>;
- }
-
-<%}%>
-<%for (GenClass genClass : genPackage.getGenClasses()) {%>
-<%if (!genClass.isAbstract() && genClass.getProvider() != GenProviderKind.NONE_LITERAL) {%>
-<%if (genClass.isProviderSingleton()) {%>
- /**
- * This keeps track of the one adapter used for all {@link <%=genClass.getQualifiedInterfaceName()%>} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genClass.getProviderClassName()%> <%=genClass.getUncapName()%>ItemProvider;
-
- /**
- * This creates an adapter for a {@link <%=genClass.getQualifiedInterfaceName()%>}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Adapter create<%=genClass.getName()%>Adapter()
- {
- if (<%=genClass.getUncapName()%>ItemProvider == null)
- {
- <%=genClass.getUncapName()%>ItemProvider = new <%=genClass.getProviderClassName()%>(this);
- }
-
- return <%=genClass.getUncapName()%>ItemProvider;
- }
-
-<%} else {%>
- /**
- * This creates an adapter for a {@link <%=genClass.getQualifiedInterfaceName()%>}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Adapter create<%=genClass.getName()%>Adapter()
- {
- return new <%=genClass.getProviderClassName()%>(this);
- }
-
-<%}%>
-<%}%>
-<%}%>
-<%for (GenClass genClass : genPackage.getAdapterDelegateSuperClasses()) {%>
- /**
- * <%=genClass.getName()%> of <%=genClass.getItemProviderAdapterFactoryClassName()%>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Adapter create<%=genClass.getName()%>Adapter()
- {
- return
- get<%=genClass.getItemProviderAdapterFactoryClassName()%>() == null ?
- null :
- get<%=genClass.getItemProviderAdapterFactoryClassName()%>().create<%=genClass.getName()%>Adapter();
- }
-
-<%}%>
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory()
- {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
- {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Adapter adapt(Notifier notifier, Object type)
- {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object adapt(Object object, Object type)
- {
- if (isFactoryForType(type))
- {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<%if (genModel.useGenerics()) {%><?><%}%>) || <%if (genModel.getRuntimePlatform() == GenRuntimePlatform.GWT) {%><%=genModel.getImportedName("org.eclipse.emf.common.util.Reflect")%>.isInstance((Class<%if (genModel.useGenerics()) {%><?><%}%>)type, adapter)<%} else {%>(((Class<%if (genModel.useGenerics()) {%><?><%}%>)type).isInstance(adapter))<%}%>)
- {
- return adapter;
- }
- }
-
- return null;
- }
-
-<%if (genPackage.isDisposableProviderFactory() && genPackage.hasStatefulProvider()) {%>
- /**
- * Associates an adapter with a notifier via the base implementation, then records it to ensure it will be disposed.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void associate(Adapter adapter, Notifier target)
- {
- super.associate(adapter, target);
- if (adapter != null)
- {
- disposable.add(adapter);
- }
- }
-
-<%}%>
-<%if (genPackage.isExtensibleProviderFactory()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName(useGenerics ? "java.util.List<org.eclipse.emf.edit.provider.IChildCreationExtender>" : "java.util.List")%> getChildCreationExtenders()
- {
- return childCreationExtenderManager.getChildCreationExtenders();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName(useGenerics ? "java.util.Collection<?>" : "java.util.Collection")%> getNewChildDescriptors(Object object, <%=genModel.getImportedName("org.eclipse.emf.edit.domain.EditingDomain")%> editingDomain)
- {
- return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator")%> getResourceLocator()
- {
- return childCreationExtenderManager;
- }
-
-<%}%>
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification)
- {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null)
- {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
-<%if (genPackage.isDisposableProviderFactory()) {%>
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose()
- {
-<%if (genPackage.hasStatefulProvider()) {%>
- disposable.dispose();
-<%} else {%>
-<%for (GenClass genClass : genPackage.getGenClasses()) {%>
-<%if (!genClass.isAbstract() && genClass.isProviderSingleton()) {%>
- if (<%=genClass.getUncapName()%>ItemProvider != null) <%=genClass.getUncapName()%>ItemProvider.dispose();
-<%}%>
-<%}%>
-<%}%>
- }
-
-<%}%>
-<%if (genPackage.isChildCreationExtenders()) {%>
- <%for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> packageEntry : genPackage.getExtendedChildCreationData().entrySet()) {%>
- /**
- * A child creation extender for the {@link <%=packageEntry.getKey().getImportedPackageInterfaceName()%>}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class <%=genPackage.getChildCreationExtenderName(packageEntry.getKey())%> implements <%=genModel.getImportedName("org.eclipse.emf.edit.provider.IChildCreationExtender")%>
- {
- /**
- * The switch for creating child descriptors specific to each extended class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static class CreationSwitch extends <%=genModel.getImportedName(packageEntry.getKey().getQualifiedSwitchClassName())%><%=useGenerics ? "<Object>" : ""%>
- {
- /**
- * The child descriptors being populated.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName(useGenerics ? "java.util.List<Object>" : "java.util.List")%> newChildDescriptors;
-
- /**
- * The domain in which to create the children.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.emf.edit.domain.EditingDomain")%> editingDomain;
-
- /**
- * Creates the a switch for populating child descriptors in the given domain.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- CreationSwitch(<%=genModel.getImportedName(useGenerics ? "java.util.List<Object>" : "java.util.List")%> newChildDescriptors, <%=genModel.getImportedName("org.eclipse.emf.edit.domain.EditingDomain")%> editingDomain)
- {
- this.newChildDescriptors = newChildDescriptors;
- this.editingDomain = editingDomain;
- }
- <%for (Map.Entry<GenClass, List<GenClass.ChildCreationData>> classEntry : packageEntry.getValue().entrySet()) { GenClass genClass = classEntry.getKey();%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public <%=genClass.getTypeParameters()%>Object case<%=genPackage.getClassUniqueName(genClass)%>(<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceTypeArguments()%> object)
- {
- <%for (GenClass.ChildCreationData childCreationData : classEntry.getValue()) { GenFeature createFeature = childCreationData.createFeature; GenFeature delegatedFeature = childCreationData.delegatedFeature; GenClassifier createClassifier = childCreationData.createClassifier;%>
- <%if (createFeature.isFeatureMapType()) {%>
- <%if (delegatedFeature.isReferenceType()) { GenClass createClass = (GenClass)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceDelegatedFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMapUtil")%>.createEntry
- (<%=delegatedFeature.getQualifiedFeatureAccessor()%>,
- <%if (createClass.isMapEntry()) { %>
- <%=createClass.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.create(<%=createClass.getQualifiedClassifierAccessor()%>))));
- <%} else {%>
- <%=createClass.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=createClass.getName()%>())));
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceDelegatedFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsReferenceDelegatedFeature.override.javajetinc%>
- <%} else { GenDataType createDataType = (GenDataType)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeDelegatedFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMapUtil")%>.createEntry
- (<%=delegatedFeature.getQualifiedFeatureAccessor()%>,
- <%if (delegatedFeature.isEnumBasedType()) {%>
- <%=delegatedFeature.getTypeGenEnum().getStaticValue(delegatedFeature.getEcoreFeature().getDefaultValueLiteral())%>)));
- <%} else if (delegatedFeature.isStringBasedType()) {%>
- <%=delegatedFeature.getCreateChildValueLiteral()%>)));<%=genModel.getNonNLS()%>
- <%} else { String literal = delegatedFeature.getCreateChildValueLiteral();%>
- <%=createDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=createDataType.getQualifiedClassifierAccessor()%>, <%=literal%>))));<%if (literal != null) {%><%=genModel.getNonNLS()%><%} else {%> // TODO: ensure this is a valid literal value<%}%>
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeDelegatedFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsAttributeDelegatedFeature.override.javajetinc%>
- <%}%>
- <%} else if (createFeature.isReferenceType()) { GenClass createClass = (GenClass)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%if (createClass.isMapEntry()) { %>
- <%=createClass.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.create(<%=createClass.getQualifiedClassifierAccessor()%>)));
- <%} else {%>
- <%=createClass.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=createClass.getName()%>()));
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsReferenceFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsReferenceFeature.override.javajetinc %>
- <%} else { GenDataType createDataType = (GenDataType)createClassifier;%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeFeature.override.javajetinc" fail="alternative"%>
-<%@ start %>
- newChildDescriptors.add
- (createChildParameter
- (<%=createFeature.getQualifiedFeatureAccessor()%>,
- <%if (createFeature.isEnumBasedType()) {%>
- <%=createFeature.getTypeGenEnum().getStaticValue(createFeature.getEcoreFeature().getDefaultValueLiteral())%>));
- <%} else if (createFeature.isStringBasedType()) {%>
- <%=createFeature.getCreateChildValueLiteral()%>));<%=genModel.getNonNLS()%>
- <%} else { String literal = createFeature.getCreateChildValueLiteral();%>
- <%=createDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=createDataType.getQualifiedClassifierAccessor()%>, <%=literal%>)));<%if (literal != null) {%><%=genModel.getNonNLS()%><%} else {%> // TODO: ensure this is a valid literal value<%}%>
- <%}%>
-<%@ include file="ItemProvider/newChildDescriptorsAttributeFeature.insert.javajetinc" fail="silent"%>
-<%@ end %><%//ItemProvider/newChildDescriptorsAttributeFeature.override.javajetinc%>
- <%}%>
-
- <%}%>
- return null;
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.emf.edit.command.CommandParameter")%> createChildParameter(Object feature, Object child)
- {
- return new <%=genModel.getImportedName("org.eclipse.emf.edit.command.CommandParameter")%>(null, feature, child);
- }
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=_Collection%> getNewChildDescriptors(Object object, <%=genModel.getImportedName("org.eclipse.emf.edit.domain.EditingDomain")%> editingDomain)
- {
- <%=_ArrayList%> result = new <%=_ArrayList%>();
- new CreationSwitch(result, editingDomain).doSwitch((<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%>)object);
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator")%> getResourceLocator()
- {
- return <%=genPackage.getImportedEditPluginClassName()%>.INSTANCE;
- }
- }
-
- <%}%>
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Plugin.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Plugin.javajet
deleted file mode 100644
index 36293982c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Plugin.javajet
+++ /dev/null
@@ -1,232 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Plugin" version="$Id: Plugin.javajet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditPluginPackageName()%>;
-
-<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%>
-<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * This is the central singleton for the <%=genModel.getModelName()%> edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class <%=genModel.getEditPluginClassName()%> extends EMFPlugin
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getEditPluginClassName()%> INSTANCE = new <%=genModel.getEditPluginClassName()%>();
-
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Implementation plugin;
-
-<%}%>
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getEditPluginClassName()%>()
- {
- super
- (new ResourceLocator []
- {
-<%for (String pluginClassName : genModel.getEditResourceDelegateImportedPluginClassNames()) {%>
- <%=pluginClassName%>.INSTANCE,
-<%}%>
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public ResourceLocator getPluginResourceLocator()
- {
-<%if (genModel.getRuntimePlatform() == GenRuntimePlatform.GWT) {%>
- return null;
-<%} else {%>
- return plugin;
-<%}%>
- }
-
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin()
- {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends EclipsePlugin
- {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
-<%if (genModel.needsRuntimeCompatibility()) {%>
- * @param descriptor the description of the plugin.
-<%}%>
- * @generated
- */
- public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>)
- {
- super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>);
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static final <%=genModel.getImportedName(genModel.getQualifiedEditPluginClassName() + "Properties")%> PROPERTIES = <%=genModel.getImportedName("com.google.gwt.core.client.GWT")%>.create(<%=genModel.getImportedName(genModel.getQualifiedEditPluginClassName() + "Properties")%>.class);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getString(String key, boolean translate)
- {
-<%boolean first = true; for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) { %>
- <%for (GenClass genClass : genPackage.getGenClasses()) {%>
- <%if (first) { first = false; } else {%>else <%}%>if ("_UI_<%=genClass.getName()%>_type".equals(key)) return PROPERTIES.<%=genClass.getUncapName()%>Type();
- <%}%>
- <%}%>
-<%}%>
- <%if (first) { first = false; } else {%>else <%}%> if ("_UI_Unknown_type".equals(key)) return PROPERTIES.unknownType();
- else if ("_UI_Unknown_datatype".equals(key)) return PROPERTIES.unknownDatatype();
-<%for (GenFeature genFeature : genModel.getFilteredAllGenFeatures()) { String description = genFeature.getPropertyDescription();%>
- else if ("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_feature".equals(key)) return PROPERTIES.<%=genFeature.getGenClass().getUncapName()%>_<%=genFeature.getCapName()%>Feature();
- <%if (description != null && description.length() > 0) {%>
- else if ("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_description".equals(key)) return PROPERTIES.<%=genFeature.getGenClass().getUncapName()%>_<%=genFeature.getCapName()%>Description();
- <%}%>
-<%}%>
- else if ("_UI_Unknown_feature".equals(key)) return PROPERTIES.unknownFeature();
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) {%>
- <%for (GenEnum genEnum : genPackage.getGenEnums()) {%>
- <%for (GenEnumLiteral genEnumLiteral : genEnum.getGenEnumLiterals()) {%>
- else if ("_UI_<%=genEnum.getName()%>_<%=genEnumLiteral.getName()%>_literal".equals(key)) return PROPERTIES.<%=genEnum.getSafeUncapName()%>_<%=genEnumLiteral.getName()%>Literal();
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%for (String category : genModel.getPropertyCategories()) {%>
-<%=genModel.getPropertyCategoryKey(category)%> = <%=category%>
- else if ("<%=genModel.getPropertyCategoryKey(category)%>".equals(key)) return PROPERTIES.<%=genModel.getPropertyCategoryKey(category)%>();
-<%}%>
- else return key;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getString(String key, Object [] substitutions, boolean translate)
- {
-<%if (genModel.isCreationCommands()) {%>
- if ("_UI_CreateChild_text".equals(key)) return PROPERTIES.createChildText(substitutions[0]);
- else if ("_UI_CreateChild_text2".equals(key)) return PROPERTIES.createChildText2(substitutions[0], substitutions[1]);
- else if ("_UI_CreateChild_text3".equals(key)) return PROPERTIES.createChildText3(substitutions[1]);
- else if ("_UI_CreateChild_tooltip".equals(key)) return PROPERTIES.createChildTooltip(substitutions[0], substitutions[1]);
- else if ("_UI_CreateChild_description".equals(key)) return PROPERTIES.createChildDescripition(substitutions[0], substitutions[1], substitutions[2]);
- else if ("_UI_CreateSibling_description".equals(key)) return PROPERTIES.createSiblingDescription(substitutions[0], substitutions[1], substitutions[2]);
-<%}%>
- <%if (!genModel.isCreationCommands()) {%>else <%}%>if ("_UI_PropertyDescriptor_description".equals(key)) return PROPERTIES.propertyDescriptorDescription(substitutions[0], substitutions[1]);
- else return key;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static final <%=genModel.getImportedName(genModel.getQualifiedEditPluginClassName() + "Images")%> IMAGES = <%=genModel.getImportedName("com.google.gwt.core.client.GWT")%>.create(<%=genModel.getImportedName(genModel.getQualifiedEditPluginClassName() + "Images")%>.class);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(String key)
- {
-<%first = true; for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%for (GenClass genClass : genPackage.getGenClasses()) {%>
- <%if (genClass.isImage()) { String image = genClass.getItemIconFileName(); image = image.substring(image.lastIndexOf("/icons/") + 7, image.length() - 4); %>
- <%if (first) { first = false; } else {%>else <%}%>if ("<%=image%>".equals(key)) return IMAGES.<%=genClass.getItemIconAccessorName()%>();
- <%}%>
- <%}%>
-<%}%>
- <%if (first) { first = false; } else {%>else <%}%>return key;
- }
-
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Properties.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Properties.javajet
deleted file mode 100644
index e4f1fdae1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/Properties.javajet
+++ /dev/null
@@ -1,190 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Properties" version="$Id: Properties.javajet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditPluginPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public interface <%=genModel.getEditPluginClassName()%>Properties extends <%=genModel.getImportedName("com.google.gwt.i18n.client.Messages")%>
-{
-<%if (genModel.isCreationCommands()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateChild_text")
- @DefaultMessage("{0}")
- String createChildText(Object type);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateChild_text2")
- @DefaultMessage("{1} <%if (genModel.isCreationSubmenus()) {%>| <%}%>{0}")
- String createChildText2(Object type, Object feature);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateChild_text3")
- @DefaultMessage("{0}")
- String createChildText3(Object feature);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateChild_tooltip")
- @DefaultMessage("Create New {0} Under {1} Feature")
- String createChildTooltip(Object type, Object feature);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateChild_description")
- @DefaultMessage("Create a new child of type {0} for the {1} feature of the selected {2}.")
- String createChildDescripition(Object type, Object feature, Object selection);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_CreateSibling_description")
- @DefaultMessage("Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.")
- String createSiblingDescription(Object type, Object feature, Object selection);
-
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_PropertyDescriptor_description")
- @DefaultMessage("The {0} of the {1}")
- String propertyDescriptorDescription(Object feature, Object type);
-
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) { %>
- <%for (GenClass genClass : genPackage.getGenClasses()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_<%=genClass.getName()%>_type")
- @DefaultMessage("<%=genClass.getFormattedName()%>")
- String <%=genClass.getUncapName()%>Type();
-
- <%}%>
- <%}%>
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_Unknown_type")
- @DefaultMessage("Object")
- String unknownType();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_Unknown_datatype")
- @DefaultMessage("Value")
- String unknownDatatype();
-
-<%for (GenFeature genFeature : genModel.getFilteredAllGenFeatures()) { String description = genFeature.getPropertyDescription();%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_feature")
- @DefaultMessage("<%=genFeature.getFormattedName()%>")
- String <%=genFeature.getGenClass().getUncapName()%>_<%=genFeature.getCapName()%>Feature();
-
- <%if (description != null && description.length() > 0) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_description")
- @DefaultMessage("<%=description%>")
- String <%=genFeature.getGenClass().getUncapName()%>_<%=genFeature.getCapName()%>Description();
-
- <%}%>
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_Unknown_feature")
- @DefaultMessage("Unspecified")
- String unknownFeature();
-
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) {%>
- <%for (GenEnum genEnum : genPackage.getGenEnums()) {%>
- <%for (GenEnumLiteral genEnumLiteral : genEnum.getGenEnumLiterals()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("_UI_<%=genEnum.getName()%>_<%=genEnumLiteral.getName()%>_literal")
- @DefaultMessage("<%=genEnumLiteral.getLiteral()%>")
- String <%=genEnum.getSafeUncapName()%>_<%=genEnumLiteral.getName()%>Literal();
-
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%for (String category : genModel.getPropertyCategories()) {%>
-<%=genModel.getPropertyCategoryKey(category)%> = <%=category%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Key("<%=genModel.getPropertyCategoryKey(category)%>")
- @DefaultMessage("<%=category%>")
- String <%=genModel.getPropertyCategoryKey(category)%>();
-
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/build.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/build.propertiesjet
deleted file mode 100644
index 89e53c154..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/build.propertiesjet
+++ /dev/null
@@ -1,37 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="org.eclipse.emf.codegen.ecore.genmodel.* java.util.*" class="BuildProperties" version="$Id: build.propertiesjet,v 1.2 2011/02/01 15:42:01 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<%String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getEditPluginID()+".jar" : ".";%>
-<%List<String> sourceFolders = genModel.getEditSourceFolders();%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-bin.includes = <%=pluginClassesLocation%>,\
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- icons/,\
-<%}%>
-<%if (genModel.isBundleManifest()) {%>
- META-INF/,\
-<%}%>
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- plugin.xml,\
-<%}%>
- plugin.properties
-jars.compile.order = <%=pluginClassesLocation%>
-<% boolean first=true; for (Iterator<String> i = sourceFolders.iterator(); i.hasNext();) { String sourceFolder = i.next(); if (i.hasNext()){sourceFolder +=",\\";} if (first) {%>
-source.<%=pluginClassesLocation%> = <%=sourceFolder%><%first=false;} else {%><%=sourceFolder%><%}}%>
-output.<%=pluginClassesLocation%> = bin/
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/manifest.mfjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/manifest.mfjet
deleted file mode 100644
index 1d8e441fb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/manifest.mfjet
+++ /dev/null
@@ -1,46 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: <%=genModel.getEditPluginID()%>;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getEditPluginID()%>.jar<%}else{%>.<%}%>
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
-Bundle-Activator: <%=genModel.getQualifiedEditPluginClassName()%>$Implementation
-<%}%>
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-<%}%>
-<%Iterator<String> packagesIterator = genModel.getEditQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
-Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
- <%=pack%><%}%>
-<%}%>
-<%Iterator<String> requiredPluginIterator = genModel.getEditRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
-Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
- <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
-<%}%>
-<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
-Eclipse-LazyStart: true
-<%}%>
-Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/module.gwt.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/module.gwt.xmljet
deleted file mode 100644
index 7696c398c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/module.gwt.xmljet
+++ /dev/null
@@ -1,31 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ModuleGWTXML" version="$Id: module.gwt.xmljet,v 1.2 2011/02/01 15:42:02 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd">
-
-<%@ include file="../Header.xmljetinc"%>
-
-<module>
-<%for (String inherits : genModel.getEditModuleInherits()) {%>
- <inherits name="<%=inherits%>" />
-<%}%>
-<%for (String source : genModel.getEditModuleSources()) {%>
- <source path="<%=source%>"/>
-<%}%>
-</module> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.propertiesjet
deleted file mode 100644
index 3627584b7..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.propertiesjet
+++ /dev/null
@@ -1,67 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginProperties" version="$Id: plugin.propertiesjet,v 1.3 2011/02/01 15:42:01 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-pluginName = <%=genModel.getModelName()%> Edit Support
-providerName = www.example.org
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
-
-<%if (genModel.isCreationCommands()) {%>
-_UI_CreateChild_text = {0}
-_UI_CreateChild_text2 = {1} <%if (genModel.isCreationSubmenus()) {%>| <%}%>{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}
-
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) { %>
- <%for (GenClass genClass : genPackage.getGenClasses()) {%>
-_UI_<%=genClass.getName()%>_type = <%=genClass.getFormattedName()%>
- <%}%>
- <%}%>
-<%}%>
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-<%for (GenFeature genFeature : genModel.getFilteredAllGenFeatures()) { String description = genFeature.getPropertyDescription();%>
-_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_feature = <%=genFeature.getFormattedName()%>
- <%if (description != null && description.length() > 0) {%>
-_UI_<%=genFeature.getGenClass().getName()%>_<%=genFeature.getName()%>_description = <%=description%>
- <%}%>
-<%}%>
-_UI_Unknown_feature = Unspecified
-
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- <%if (genPackage.getGenModel() == genModel || !genPackage.getGenModel().hasEditSupport()) {%>
- <%for (GenEnum genEnum : genPackage.getGenEnums()) {%>
- <%for (GenEnumLiteral genEnumLiteral : genEnum.getGenEnumLiterals()) {%>
-_UI_<%=genEnum.getName()%>_<%=genEnumLiteral.getName()%>_literal = <%=genEnumLiteral.getLiteral()%>
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%for (String category : genModel.getPropertyCategories()) {%>
-<%=genModel.getPropertyCategoryKey(category)%> = <%=category%>
-<%}%>
-<%}%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.xmljet
deleted file mode 100644
index 4a4740414..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/edit/plugin.xmljet
+++ /dev/null
@@ -1,125 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.2 2011/02/01 15:42:01 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<%@ include file="../Header.xmljetinc"%>
-
-<%if (genModel.isBundleManifest()) {%>
-<plugin>
-<%} else {%>
-<plugin
- name="%pluginName"
- id="<%=genModel.getEditPluginID()%>"
- version="1.0.0"
- provider-name="%providerName"
- class="<%=genModel.getQualifiedEditPluginClassName()%>$Implementation">
-
- <requires>
- <%for (String pluginID : genModel.getEditRequiredPlugins()) {%>
- <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
- <%}%>
- </requires>
-
- <runtime>
- <%if (genModel.isRuntimeJar()) {%>
- <library name="<%=genModel.getEditPluginID()%>.jar">
- <%} else {%>
- <library name=".">
- <%}%>
- <export name="*"/>
- </library>
- </runtime>
-<%}%>
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (!genPackage.getGenClasses().isEmpty()) {%>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri="<%=genPackage.getNSURI()%>"
- class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>"
- supportedTypes=
- <%for (ListIterator<?> j = genPackage.getProviderSupportedTypes().listIterator(); j.hasNext(); ) {%>
- <%=j.hasPrevious() ? " " : "\""%><%=j.next()%><%if (!j.hasNext()) {%>"/><%}%>
- <%}%>
- </extension>
- <%if (genPackage.isChildCreationExtenders()) { Map<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> extendedChildCreationData = genPackage.getExtendedChildCreationData();%>
- <%if (!extendedChildCreationData.isEmpty()) {%>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <%for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> entry : extendedChildCreationData.entrySet()) {%>
- <extender
- uri="<%=entry.getKey().getNSURI()%>"
- class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>$<%=genPackage.getChildCreationExtenderName(entry.getKey())%>"/>
- <%}%>
- </extension>
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%if (genModel.sameModelEditProject()) {%>
- <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="<%=genPackage.getNSURI()%>"
- <%if (genModel.hasLocalGenModel()) {%>
- class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
- genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
- <%} else {%>
- class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
- <%}%>
- </extension>
- <%if (genPackage.isContentType()) {%>
-
- <extension point="org.eclipse.emf.ecore.content_parser">
- <parser
- contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
- class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
- </extension>
-
- <extension point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
- file-extensions="<%=genPackage.getFileExtensions()%>"
- id="<%=genPackage.getContentTypeIdentifier()%>"
- name="%_UI_<%=genPackage.getPrefix()%>_content_type"
- priority="normal">
- <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
- <%if (genPackage.hasTargetNamespace()) {%>
- <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
- <%}%>
- <%if (genPackage.isXMIResource()) {%>
- <parameter name="kind" value="xmi"/>
- <%}%>
- </describer>
- </content-type>
- </extension>
- <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="<%=genPackage.getFileExtension()%>"
- class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
- </extension>
- <%}%>
- <%}%>
-<%}%>
-
-</plugin>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ActionBarContributor.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ActionBarContributor.javajet
deleted file mode 100644
index d99e1a221..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ActionBarContributor.javajet
+++ /dev/null
@@ -1,704 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="ActionBarContributor" version="$Id: ActionBarContributor.javajet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel();%>
-<%
-String _CollectionOfAnything = null;
-String _CollectionOfIAction = null;
-String _ArrayListOfIAction = null;
-String _CollectionOfExtendsIAction = null;
-String _IteratorOfIAction = null;
-String _MapOfStringToCollectionOfIAction = null;
-String _MapEntryOfStringToCollectionOfIAction = null;
-String _LinkedHashMapOfStringToCollectionOfIAction = null;
-if (genModel.isCreationCommands())
-{
- _CollectionOfAnything = genModel.getImportedName("Collection" + (genModel.useGenerics() ? "<?>" : ""));
- _CollectionOfIAction = genModel.getImportedName(genModel.useGenerics() ? "java.util.Collection<org.eclipse.jface.action.IAction>" : "java.util.Collection");
- _ArrayListOfIAction = genModel.getImportedName(genModel.useGenerics() ? "java.util.ArrayList<org.eclipse.jface.action.IAction>" : "java.util.ArrayList");
- _CollectionOfExtendsIAction = genModel.getImportedName(genModel.useGenerics() ? "java.util.Collection<? extends org.eclipse.jface.action.IAction>" : "java.util.Collection");
- if (genModel.isCreationSubmenus())
- {
- _IteratorOfIAction = genModel.getImportedName(genModel.useGenerics() ? "java.util.Iterator<org.eclipse.jface.action.IAction>" : "java.util.Iterator");
- _MapOfStringToCollectionOfIAction = genModel.getImportedName("java.util.Map") + (genModel.useGenerics() ? ("<String, " + _CollectionOfIAction + ">") : "");
- _MapEntryOfStringToCollectionOfIAction = genModel.getImportedName("java.util.Map") + ".Entry" + (genModel.useGenerics() ? ("<String, " + _CollectionOfIAction + ">") : "");
- _LinkedHashMapOfStringToCollectionOfIAction = genModel.getImportedName("java.util.LinkedHashMap") + (genModel.useGenerics() ? ("<String, " + _CollectionOfIAction + ">") : "");
- }
-}
-%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getPresentationPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * This is the action bar contributor for the <%=genPackage.getPrefix()%> model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getActionBarContributorClassName()%>
- extends <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor")%>
- implements <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelectionChangedListener")%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (genModel.isRichClientPlatform() && genPackage.isGenerateModelWizard()) {%>
- /**
- * Action to create objects from the <%=genPackage.getPrefix()%> model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class NewAction extends <%=genModel.getImportedName("org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate")%>
- {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void run(<%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> action)
- {
- <%=genPackage.getModelWizardClassName()%> wizard = new <%=genPackage.getModelWizardClassName()%>();
- wizard.init(getWindow().getWorkbench(), <%=genModel.getImportedName("org.eclipse.jface.viewers.StructuredSelection")%>.EMPTY);
- <%=genModel.getImportedName("org.eclipse.jface.wizard.WizardDialog")%> wizardDialog = new <%=genModel.getImportedName("org.eclipse.jface.wizard.WizardDialog")%>(getWindow().getShell(), wizard);
- wizardDialog.open();
- }
- }
-
-<%}%>
- /**
- * This keeps track of the active editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.ui.IEditorPart")%> activeEditorPart;
-
- /**
- * This keeps track of the current selection provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelectionProvider")%> selectionProvider;
-
- /**
- * This action opens the Properties view.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> showPropertiesViewAction =
- new <%=genModel.getImportedName("org.eclipse.jface.action.Action")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_ShowPropertiesView_menu_item"))<%=genModel.getNonNLS()%>
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void run()
- {
- try
- {
- getPage().showView("org.eclipse.ui.views.PropertySheet");<%=genModel.getNonNLS()%>
- }
- catch (<%=genModel.getImportedName("org.eclipse.ui.PartInitException")%> exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- }
- };
-
- /**
- * This action refreshes the viewer of the current editor if the editor
- * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> refreshViewerAction =
- new <%=genModel.getImportedName("org.eclipse.jface.action.Action")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_RefreshViewer_menu_item"))<%=genModel.getNonNLS()%>
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean isEnabled()
- {
- return activeEditorPart instanceof <%=genModel.getImportedName("org.eclipse.emf.common.ui.viewer.IViewerProvider")%>;
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void run()
- {
- if (activeEditorPart instanceof <%=genModel.getImportedName("org.eclipse.emf.common.ui.viewer.IViewerProvider")%>)
- {
- <%=genModel.getImportedName("org.eclipse.jface.viewers.Viewer")%> viewer = ((<%=genModel.getImportedName("org.eclipse.emf.common.ui.viewer.IViewerProvider")%>)activeEditorPart).getViewer();
- if (viewer != null)
- {
- viewer.refresh();
- }
- }
- }
- };
-
-<%if (genModel.isCreationCommands()) {%>
- /**
- * 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfIAction%> createChildActions;
-
- <%if (genModel.isCreationSubmenus()) {%>
- /**
- * This will contain a map of {@link org.eclipse.emf.edit.ui.action.CreateChildAction}s, keyed by sub-menu text.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_MapOfStringToCollectionOfIAction%> createChildSubmenuActions;
-
- <%}%>
- /**
- * This is the menu manager into which menu contribution items should be added for CreateChild actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.jface.action.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfIAction%> createSiblingActions;
-
- <%if (genModel.isCreationSubmenus()) {%>
- /**
- * This will contain a map of {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction}s, keyed by submenu text.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_MapOfStringToCollectionOfIAction%> createSiblingSubmenuActions;
-
- <%}%>
- /**
- * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> createSiblingMenuManager;
-
-<%}%>
- /**
- * This creates an instance of the contributor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getActionBarContributorClassName()%>()
- {
- super(ADDITIONS_LAST_STYLE);
- loadResourceAction = new <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.LoadResourceAction")%>();
- validateAction = new <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.ValidateAction")%>();
- controlAction = new <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.ControlAction")%>();
- }
-
- /**
- * This adds Separators for editor additions to the tool bar.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void contributeToToolBar(<%=genModel.getImportedName("org.eclipse.jface.action.IToolBarManager")%> toolBarManager)
- {
- toolBarManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("<%=genPackage.getPrefix().toLowerCase(genModel.getLocale())%>-settings"));<%=genModel.getNonNLS()%>
- toolBarManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("<%=genPackage.getPrefix().toLowerCase(genModel.getLocale())%>-additions"));<%=genModel.getNonNLS()%>
- }
-
- /**
- * This adds to the menu bar a menu and some separators for editor additions,
- * as well as the sub-menus for object creation items.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void contributeToMenu(<%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager)
- {
- super.contributeToMenu(menuManager);
-
- <%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> submenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>_menu"), "<%=genPackage.getInterfacePackageName()%>MenuID");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- menuManager.insertAfter("additions", submenuManager);<%=genModel.getNonNLS()%>
- submenuManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("settings"));<%=genModel.getNonNLS()%>
- submenuManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("actions"));<%=genModel.getNonNLS()%>
- submenuManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("additions"));<%=genModel.getNonNLS()%>
- submenuManager.add(new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("additions-end"));<%=genModel.getNonNLS()%>
-
-<%if (genModel.isCreationCommands()) {%>
- // Prepare for CreateChild item addition or removal.
- //
- createChildMenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_CreateChild_menu_item"));<%=genModel.getNonNLS()%>
- submenuManager.insertBefore("additions", createChildMenuManager);<%=genModel.getNonNLS()%>
-
- // Prepare for CreateSibling item addition or removal.
- //
- createSiblingMenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_CreateSibling_menu_item"));<%=genModel.getNonNLS()%>
- submenuManager.insertBefore("additions", createSiblingMenuManager);<%=genModel.getNonNLS()%>
-
- // Force an update because Eclipse hides empty menus now.
- //
- submenuManager.addMenuListener
- (new <%=genModel.getImportedName("org.eclipse.jface.action.IMenuListener")%>()
- {
- public void menuAboutToShow(<%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager)
- {
- menuManager.updateAll(true);
- }
- });
-
-<%} else {%>
- // Add your contributions.
- // Ensure that you remove @generated or mark it @generated NOT
-
-<%}%>
- addGlobalActions(submenuManager);
- }
-
- /**
- * When the active editor changes, this remembers the change and registers with it as a selection provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void setActiveEditor(<%=genModel.getImportedName("org.eclipse.ui.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 <%=genModel.getImportedName("org.eclipse.jface.viewers.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void selectionChanged(<%=genModel.getImportedName("org.eclipse.jface.viewers.SelectionChangedEvent")%> event)
- {
-<%if (genModel.isCreationCommands()) {%>
- // Remove any menu items for old selection.
- //
- if (createChildMenuManager != null)
- {
- <%if (genModel.isCreationSubmenus()) {%>
- depopulateManager(createChildMenuManager, createChildSubmenuActions);
- <%}%>
- depopulateManager(createChildMenuManager, createChildActions);
- }
- if (createSiblingMenuManager != null)
- {
- <%if (genModel.isCreationSubmenus()) {%>
- depopulateManager(createSiblingMenuManager, createSiblingSubmenuActions);
- <%}%>
- depopulateManager(createSiblingMenuManager, createSiblingActions);
- }
-
- // Query the new selection for appropriate new child/sibling descriptors
- //
- <%=_CollectionOfAnything%> newChildDescriptors = null;
- <%=_CollectionOfAnything%> newSiblingDescriptors = null;
-
- <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelection")%> selection = event.getSelection();
- if (selection instanceof <%=genModel.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")%> && ((IStructuredSelection)selection).size() == 1)
- {
- Object object = ((<%=genModel.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")%>)selection).getFirstElement();
-
- <%=genModel.getImportedName("org.eclipse.emf.edit.domain.EditingDomain")%> domain = ((<%=genModel.getImportedName("org.eclipse.emf.edit.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);
- <%if (genModel.isCreationSubmenus()) {%>
- createChildSubmenuActions = extractSubmenuActions(createChildActions);
- <%}%>
- createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
- <%if (genModel.isCreationSubmenus()) {%>
- createSiblingSubmenuActions = extractSubmenuActions(createSiblingActions);
- <%}%>
-
- if (createChildMenuManager != null)
- {
- <%if (genModel.isCreationSubmenus()) {%>
- populateManager(createChildMenuManager, createChildSubmenuActions, null);
- <%}%>
- populateManager(createChildMenuManager, createChildActions, null);
- createChildMenuManager.update(true);
- }
- if (createSiblingMenuManager != null)
- {
- <%if (genModel.isCreationSubmenus()) {%>
- populateManager(createSiblingMenuManager, createSiblingSubmenuActions, null);
- <%}%>
- populateManager(createSiblingMenuManager, createSiblingActions, null);
- createSiblingMenuManager.update(true);
- }
-<%} else {%>
- // Add your contributions.
- // Ensure that you remove @generated or mark it @generated NOT
-<%}%>
- }
-
-<%if (genModel.isCreationCommands()) {%>
- /**
- * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
- * and returns the collection of these actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfIAction%> generateCreateChildActions(<%=_CollectionOfAnything%> descriptors, <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelection")%> selection)
- {
- <%=_CollectionOfIAction%> actions = new <%=_ArrayListOfIAction%>();
- if (descriptors != null)
- {
-<%if (genModel.useGenerics()) {%>
- for (<%=genModel.getImportedName("java.lang.Object")%> descriptor : descriptors)
-<%} else {%>
- for (<%=genModel.getImportedName("java.util.Iterator")%> i = descriptors.iterator(); i.hasNext(); )
-<%}%>
- {
- actions.add(new <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.CreateChildAction")%>(activeEditorPart, selection, <%if (genModel.useGenerics()) {%>descriptor<%} else {%>i.next()<%}%>));
- }
- }
- return actions;
- }
-
- /**
- * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
- * and returns the collection of these actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfIAction%> generateCreateSiblingActions(<%=_CollectionOfAnything%> descriptors, <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelection")%> selection)
- {
- <%=_CollectionOfIAction%> actions = new <%=_ArrayListOfIAction%>();
- if (descriptors != null)
- {
-<%if (genModel.useGenerics()) {%>
- for (<%=genModel.getImportedName("java.lang.Object")%> descriptor : descriptors)
-<%} else {%>
- for (<%=genModel.getImportedName("java.util.Iterator")%> i = descriptors.iterator(); i.hasNext(); )
-<%}%>
- {
- actions.add(new <%=genModel.getImportedName("org.eclipse.emf.edit.ui.action.CreateSiblingAction")%>(activeEditorPart, selection, <%if (genModel.useGenerics()) {%>descriptor<%} else {%>i.next()<%}%>));
- }
- }
- return actions;
- }
-
- /**
- * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
- * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
- * by inserting them before the specified contribution item <code>contributionID</code>.
- * If <code>contributionID</code> is <code>null</code>, they are simply added.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void populateManager(<%=genModel.getImportedName("org.eclipse.jface.action.IContributionManager")%> manager, <%=_CollectionOfExtendsIAction%> actions, String contributionID)
- {
- if (actions != null)
- {
-<%if (genModel.useGenerics()) {%>
- for (<%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> action : actions)
-<%} else {%>
- for (<%=genModel.getImportedName("java.util.Iterator")%> i = actions.iterator(); i.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- <%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> action = (IAction)i.next();
-<%}%>
- if (contributionID != null)
- {
- manager.insertBefore(contributionID, action);
- }
- else
- {
- manager.add(action);
- }
- }
- }
- }
-
- /**
- * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
- * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void depopulateManager(<%=genModel.getImportedName("org.eclipse.jface.action.IContributionManager")%> manager, <%=_CollectionOfExtendsIAction%> actions)
- {
- if (actions != null)
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.IContributionItem")%>[] items = manager.getItems();
- for (int i = 0; i < items.length; i++)
- {
- // Look into SubContributionItems
- //
- <%=genModel.getImportedName("org.eclipse.jface.action.IContributionItem")%> contributionItem = items[i];
- while (contributionItem instanceof <%=genModel.getImportedName("org.eclipse.jface.action.SubContributionItem")%>)
- {
- contributionItem = ((<%=genModel.getImportedName("org.eclipse.jface.action.SubContributionItem")%>)contributionItem).getInnerItem();
- }
-
- // Delete the ActionContributionItems with matching action.
- //
- if (contributionItem instanceof <%=genModel.getImportedName("org.eclipse.jface.action.ActionContributionItem")%>)
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> action = ((<%=genModel.getImportedName("org.eclipse.jface.action.ActionContributionItem")%>)contributionItem).getAction();
- if (actions.contains(action))
- {
- manager.remove(contributionItem);
- }
- }
- }
- }
- }
-
- <%if (genModel.isCreationSubmenus()) {%>
- /**
- * This extracts those actions in the <code>submenuActions</code> collection whose text is qualified and returns
- * a map of these actions, keyed by submenu text.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_MapOfStringToCollectionOfIAction%> extractSubmenuActions(<%=_CollectionOfIAction%> createActions)
- {
- <%=_MapOfStringToCollectionOfIAction%> createSubmenuActions = new <%=_LinkedHashMapOfStringToCollectionOfIAction%>();
- if (createActions != null)
- {
- for (<%=_IteratorOfIAction%> actions = createActions.iterator(); actions.hasNext(); )
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.IAction")%> action = <%if (!genModel.useGenerics()) {%>(<%=genModel.getImportedName("org.eclipse.jface.action.IAction")%>)<%}%>actions.next();
- <%=genModel.getImportedName("java.util.StringTokenizer")%> st = new <%=genModel.getImportedName("java.util.StringTokenizer")%>(action.getText(), "|");<%=genModel.getNonNLS()%>
- if (st.countTokens() == 2)
- {
- String text = st.nextToken().trim();
- <%=_CollectionOfIAction%> submenuActions = <%if (!genModel.useGenerics()) {%>(<%=_CollectionOfIAction%>)<%}%>createSubmenuActions.get(text);
- if (submenuActions == null)
- {
- createSubmenuActions.put(text, submenuActions = new <%=_ArrayListOfIAction%>());
- }
- action.setText(st.nextToken().trim());
- submenuActions.add(action);
- actions.remove();
- }
- }
- }
- return createSubmenuActions;
- }
-
- /**
- * This populates the specified <code>manager</code> 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 <code>submenuActions</code> collection, by inserting them before the specified contribution
- * item <code>contributionID</code>.
- * If <code>contributionID</code> is <code>null</code>, they are simply added.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void populateManager(<%=genModel.getImportedName("org.eclipse.jface.action.IContributionManager")%> manager, <%=_MapOfStringToCollectionOfIAction%> submenuActions, String contributionID)
- {
- if (submenuActions != null)
- {
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) {%>
- for (<%=_MapEntryOfStringToCollectionOfIAction%> entry : submenuActions.entrySet())
- {
- <%} else {%>
- for (<%=genModel.getImportedName("java.util.Iterator")%> entries = submenuActions.entrySet().iterator(); entries.hasNext();)
- {
- <%=_MapEntryOfStringToCollectionOfIAction%> entry = (<%=_MapEntryOfStringToCollectionOfIAction%>)entries.next();
- <%}%>
- <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%> submenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%if (!genModel.useGenerics()) {%>(String)<%}%>entry.getKey());
- if (contributionID != null)
- {
- manager.insertBefore(contributionID, submenuManager);
- }
- else
- {
- manager.add(submenuManager);
- }
- populateManager(submenuManager, <%if (!genModel.useGenerics()) {%>(<%=_CollectionOfIAction%>)<%}%>entry.getValue(), null);
- }
- }
- }
-
- /**
- * This removes from the specified <code>manager</code> 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 <code>submenuActions</code> map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void depopulateManager(<%=genModel.getImportedName("org.eclipse.jface.action.IContributionManager")%> manager, <%=_MapOfStringToCollectionOfIAction%> submenuActions)
- {
- if (submenuActions != null)
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.IContributionItem")%>[] items = manager.getItems();
- for (int i = 0; i < items.length; i++)
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.IContributionItem")%> contributionItem = items[i];
- if (contributionItem instanceof <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>)
- {
- <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%> submenuManager = (<%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>)contributionItem;
- if (submenuActions.containsKey(submenuManager.getMenuText()))
- {
- depopulateManager(submenuManager, <%if (!genModel.useGenerics()) {%>(<%=_CollectionOfIAction%>)<%}%>submenuActions.get(contributionItem));
- manager.remove(contributionItem);
- }
- }
- }
- }
- }
-
- <%}%>
-<%}%>
- /**
- * This populates the pop-up menu before it appears.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void menuAboutToShow(<%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager)
- {
- super.menuAboutToShow(menuManager);
-<%if (genModel.isCreationCommands()) {%>
- <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%> submenuManager = null;
-
- submenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_CreateChild_menu_item"));<%=genModel.getNonNLS()%>
- <%if (genModel.isCreationSubmenus()) {%>
- populateManager(submenuManager, createChildSubmenuActions, null);
- <%}%>
- populateManager(submenuManager, createChildActions, null);
- menuManager.insertBefore("edit", submenuManager);<%=genModel.getNonNLS()%>
-
- submenuManager = new <%=genModel.getImportedName("org.eclipse.jface.action.MenuManager")%>(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_CreateSibling_menu_item"));<%=genModel.getNonNLS()%>
- <%if (genModel.isCreationSubmenus()) {%>
- populateManager(submenuManager, createSiblingSubmenuActions, null);
- <%}%>
- populateManager(submenuManager, createSiblingActions, null);
- menuManager.insertBefore("edit", submenuManager);<%=genModel.getNonNLS()%>
-<%}%>
- }
-
- /**
- * This inserts global actions before the "additions-end" separator.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void addGlobalActions(<%=genModel.getImportedName("org.eclipse.jface.action.IMenuManager")%> menuManager)
- {
- menuManager.insertAfter("additions-end", new <%=genModel.getImportedName("org.eclipse.jface.action.Separator")%>("ui-actions"));<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- menuManager.insertAfter("ui-actions", showPropertiesViewAction);<%=genModel.getNonNLS()%>
-
- refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
- menuManager.insertAfter("ui-actions", refreshViewerAction);<%=genModel.getNonNLS()%>
-
- super.addGlobalActions(menuManager);
- }
-
- /**
- * This ensures that a delete action will clean up all references to deleted objects.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected boolean removeAllReferencesOnDelete()
- {
- return true;
- }
-
-}
-<%genModel.emitSortedImports();%> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Advisor.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Advisor.javajet
deleted file mode 100644
index 5e7f691be..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Advisor.javajet
+++ /dev/null
@@ -1,715 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="Advisor" version="$Id: Advisor.javajet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2004-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<%String _ListOfString = "List" + (genModel.useGenerics() ? "<String>" : "");%>
-<%String _UniqueEListOfString = "UniqueEList" + (genModel.useGenerics() ? "<String>" : "");%>
-<%String _StringBuilder = genModel.getImportedName(genModel.useGenerics() ? "java.lang.StringBuilder" : "java.lang.StringBuffer");%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditorPluginPackageName()%>;
-
-<%if (!genModel.isRichAjaxPlatform()) {%>
-import java.io.File;
-import java.util.Arrays;
-<%}%>
-<%if (!genModel.useGenerics()) {%>
-import java.util.Iterator;
-<%}%>
-<%if (genModel.getAllGenPackagesWithConcreteClasses().size() > 1) {%>
-import java.util.List;
-<%}%>
-
-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;
-<%if (!genModel.isRichAjaxPlatform()) {%>
-import org.eclipse.swt.SWT;
-<%}%>
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-<%if (!genModel.isRichAjaxPlatform()) {%>
-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;
-<%if (!genModel.isRichAjaxPlatform()) {%>
-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;
-
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate;
-import org.eclipse.emf.common.util.URI;
-<%if (genModel.getAllGenPackagesWithConcreteClasses().size() > 1) {%>
-import org.eclipse.emf.common.util.UniqueEList;
-<%}%>
-import org.eclipse.emf.edit.ui.action.LoadResourceAction;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import <%=genModel.getQualifiedEditorPluginClassName()%>;
-<%genModel.markImportLocation(stringBuffer);%>
-
-
-/**
- * Customized {@link WorkbenchAdvisor} for the RCP application.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class <%=genModel.getEditorAdvisorClassName()%> extends WorkbenchAdvisor
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (!genModel.isRichAjaxPlatform()) {%>
- /**
- * The default file extension filters for use in dialogs.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.getAllGenPackagesWithConcreteClasses().size() == 1) {%>
- private static final String[] FILE_EXTENSION_FILTERS = <%if (!genModel.useGenerics()) {%>(String[])<%}%><%=genModel.getAllGenPackagesWithConcreteClasses().get(0).getImportedEditorClassName()%>.FILE_EXTENSION_FILTERS.toArray(new String[0]);
- <%} else {%>
- private static final String[] FILE_EXTENSION_FILTERS = getFileExtensionFilters();
-
- /**
- * Returns the default file extension filters. This method should only be used to initialize {@link #FILE_EXTENSION_FILTERS}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static String[] getFileExtensionFilters()
- {
- <%=_ListOfString%> result = new <%=_UniqueEListOfString%>();
- <%for (GenPackage genPackage : genModel.getAllGenPackagesWithConcreteClasses()) {%>
- result.addAll(<%=genPackage.getImportedEditorClassName()%>.FILE_EXTENSION_FILTERS);
- <%}%>
- return <%if (!genModel.useGenerics()) {%>(String[])<%}%>result.toArray(new String[0]);
- }
- <%}%>
-<%}%>
-
- /**
- * This looks up a string in the plugin's plugin.properties file.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static String getString(String key)
- {
- return <%=genModel.getEditorPluginClassName()%>.INSTANCE.getString(key);
- }
-
- /**
- * This looks up a string in plugin.properties, making a substitution.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static String getString(String key, Object s1)
- {
- return <%=genModel.getQualifiedEditorPluginClassName()%>.INSTANCE.getString(key, new Object [] { s1 });
- }
-
- /**
- * RCP's application
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Application implements IApplication
- {
- /**
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object start(IApplicationContext context) throws Exception
- {
- WorkbenchAdvisor workbenchAdvisor = new <%=genModel.getEditorAdvisorClassName()%>();
- 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()
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void stop()
- {
- // Do nothing.
- }
- }
-
- /**
- * RCP's perspective
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Perspective implements IPerspectiveFactory
- {
- /**
- * Perspective ID
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String ID_PERSPECTIVE = "<%=genModel.getQualifiedEditorAdvisorClassName()%>Perspective";<%=genModel.getNonNLS()%>
-
- /**
- * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createInitialLayout(IPageLayout layout)
- {
- layout.setEditorAreaVisible(true);
- layout.addPerspectiveShortcut(ID_PERSPECTIVE);
-
- IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float)0.66, layout.getEditorArea());<%=genModel.getNonNLS()%>
- right.addView(IPageLayout.ID_OUTLINE);
-
- IFolderLayout bottonRight = layout.createFolder("bottonRight", IPageLayout.BOTTOM, (float)0.60, "right");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- bottonRight.addView(IPageLayout.ID_PROP_SHEET);
- }
- }
-
- /**
- * RCP's window advisor
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class WindowAdvisor extends WorkbenchWindowAdvisor
- {
- /**
- * @see WorkbenchWindowAdvisor#WorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public WindowAdvisor(IWorkbenchWindowConfigurer configurer)
- {
- super(configurer);
- }
-
- /**
- * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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"));<%=genModel.getNonNLS()%>
- }
-
- /**
- * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#createActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer)
- {
- return new WindowActionBarAdvisor(configurer);
- }
- }
-
- /**
- * RCP's action bar advisor
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class WindowActionBarAdvisor extends ActionBarAdvisor
- {
- /**
- * @see ActionBarAdvisor#ActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public WindowActionBarAdvisor(IActionBarConfigurer configurer)
- {
- super(configurer);
- }
-
- /**
- * @see org.eclipse.ui.application.ActionBarAdvisor#fillMenuBar(org.eclipse.jface.action.IMenuManager)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IMenuManager createFileMenu(IWorkbenchWindow window)
- {
- IMenuManager menu = new MenuManager(getString("_UI_Menu_File_label"),<%=genModel.getNonNLS()%>
- IWorkbenchActionConstants.M_FILE);
- menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
-
- IMenuManager newMenu = new MenuManager(getString("_UI_Menu_New_label"), "new");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IMenuManager createEditMenu(IWorkbenchWindow window)
- {
- IMenuManager menu = new MenuManager(getString("_UI_Menu_Edit_label"),<%=genModel.getNonNLS()%>
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IMenuManager createWindowMenu(IWorkbenchWindow window)
- {
- IMenuManager menu = new MenuManager(getString("_UI_Menu_Window_label"),<%=genModel.getNonNLS()%>
- IWorkbenchActionConstants.M_WINDOW);
-
- addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW.create(window));
- menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-<%if (!genModel.isRichAjaxPlatform()) {%>
- menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window));
-<%}%>
-
- return menu;
- }
-
- /**
- * Creates the 'Help' menu.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IMenuManager createHelpMenu(IWorkbenchWindow window)
- {
- IMenuManager menu = new MenuManager(getString("_UI_Menu_Help_label"), IWorkbenchActionConstants.M_HELP);<%=genModel.getNonNLS()%>
- // 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addToMenuAndRegister(IMenuManager menuManager, IAction action)
- {
- menuManager.add(action);
- getActionBarConfigurer().registerGlobalAction(action);
- }
- }
-
- /**
- * About action for the RCP application.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class AboutAction extends WorkbenchWindowActionDelegate
- {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void run(IAction action)
- {
- MessageDialog.openInformation(getWindow().getShell(), getString("_UI_About_title"),<%=genModel.getNonNLS()%>
- getString("_UI_About_text"));<%=genModel.getNonNLS()%>
- }
- }
-
-<%if (!genModel.isRichAjaxPlatform()) {%>
- /**
- * Open action for the objects from the <%=genModel.getModelName()%> model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class OpenAction extends WorkbenchWindowActionDelegate
- {
- /**
- * Opens the editors for the files selected using the file dialog.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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 <%=genModel.getModelName()%> model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class OpenURIAction extends WorkbenchWindowActionDelegate
- {
- /**
- * Opens the editors for the files selected using the LoadResourceDialog.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void run(IAction action)
- {
- LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(getWindow().getShell());
- if (Window.OK == loadResourceDialog.open())
- {
-<%if (genModel.useGenerics()) {%>
- for (URI uri : loadResourceDialog.getURIs())
- {
- openEditor(getWindow().getWorkbench(), uri);
- }
-<%} else {%>
- for (Iterator i = loadResourceDialog.getURIs().iterator(); i.hasNext();)
- {
- openEditor(getWindow().getWorkbench(), (URI)i.next());
- }
-<%}%>
- }
- }
- }
-
-<%if (!genModel.isRichAjaxPlatform()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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] = "*.*";<%=genModel.getNonNLS()%>
- }
-
- 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)))<%=genModel.getNonNLS()%>
- {
- filename += extension;
- }
- }
- result[i] = filename;
- }
- return result;
- }
-<%}%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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"),<%=genModel.getNonNLS()%>
- getString("_WARN_No_Editor", uri.lastSegment()));<%=genModel.getNonNLS()%>
- return false;
- }
- else
- {
- try
- {
- page.openEditor(new URIEditorInput(uri), editorDescriptor.getId());
- }
- catch (PartInitException exception)
- {
- MessageDialog.openError(
- workbenchWindow.getShell(),
- getString("_UI_OpenEditorError_label"),<%=genModel.getNonNLS()%>
- exception.getMessage());
- return false;
- }
- }
- return true;
- }
-
- /**
- * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public String getInitialWindowPerspectiveId()
- {
- return Perspective.ID_PERSPECTIVE;
- }
-
- /**
- * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void initialize(IWorkbenchConfigurer configurer)
- {
- super.initialize(configurer);
- configurer.setSaveAndRestore(true);
- }
-
- /**
- * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)
- {
- return new WindowAdvisor(configurer);
- }
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Editor.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Editor.javajet
deleted file mode 100644
index 192f76f99..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Editor.javajet
+++ /dev/null
@@ -1,2397 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Editor" version="$Id: Editor.javajet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName(); %>
-<%String importedOperationClassName = genModel.getImportedName(genModel.isRichClientPlatform() ? "org.eclipse.jface.operation.IRunnableWithProgress" : "org.eclipse.ui.actions.WorkspaceModifyOperation");%>
-<%String operationMethodName = genModel.isRichClientPlatform() ? "run" : "execute";%>
-<%String _ArrayListOfObject = "ArrayList" + (genModel.useGenerics() ? "<Object>" : "");%>
-<%String _ArrayListOfSelectionChangedListener = "ArrayList" + (genModel.useGenerics() ? "<ISelectionChangedListener>" : "");%>
-<%String _CollectionOfSelectionChangedListener = "Collection" + (genModel.useGenerics() ? "<ISelectionChangedListener>" : "");%>
-<%String _ArrayListOfResource = "ArrayList" + (genModel.useGenerics() ? "<Resource>" : "");%>
-<%String _CollectionOfResource = "Collection" + (genModel.useGenerics() ? "<Resource>" : "");%>
-<%String _MapOfResourceToDiagnostic = "Map" + (genModel.useGenerics() ? "<Resource, Diagnostic>" : "");%>
-<%String _HashMapOfResourceToBoolean = "HashMap" + (genModel.useGenerics() ? "<Resource, Boolean>" : "");%>
-<%String _MapOfObjectToObject = "Map" + (genModel.useGenerics() ? "<Object, Object>" : "");%>
-<%String _HashMapOfObjectToObject = "HashMap" + (genModel.useGenerics() ? "<Object, Object>" : "");%>
-<%String _LinkedHashMapOfResourceToDiagnostic = "LinkedHashMap" + (genModel.useGenerics() ? "<Resource, Diagnostic>" : "");%>
-<%String _CollectionOfAnything = "Collection" + (genModel.useGenerics() ? "<?>" : "");%>
-<%String _ListOfAnything = "List" + (genModel.useGenerics() ? "<?>" : "");%>
-<%boolean useExtendedLabelProvider = genModel.isFontProviders() || genModel.isColorProviders();%>
-<%String _AdapterFactoryLabelProvider = "AdapterFactoryLabelProvider" + (genModel.isFontProviders() && genModel.isColorProviders() ? ".FontAndColorProvider" : genModel.isFontProviders() ? ".FontProvider" : genModel.isColorProviders() ? ".ColorProvider" : "");%>
-<%String _ArrayListOfString = "ArrayList" + (genModel.useGenerics() ? "<String>" : "");%>
-<%String _ListOfString = "List" + (genModel.useGenerics() ? "<String>" : "");%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getPresentationPackageName()%>;
-
-
-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;
-<%if (!genModel.isRichClientPlatform()) {%>
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-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;
-<%}%>
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-<%}%>
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-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;
-
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.jface.viewers.ColumnWeightData;
-<%}%>
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.jface.viewers.ListViewer;
-<%}%>
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-<%}%>
-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.Transfer;
-
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-
-import org.eclipse.swt.graphics.Point;
-<%if (genPackage.isMultipleEditorPages()) {%>
-
-import org.eclipse.swt.layout.FillLayout;
-<%}%>
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-<%}%>
-import org.eclipse.swt.widgets.Tree;
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.swt.widgets.TreeColumn;
-<%}%>
-
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-<%if (!genModel.isRichClientPlatform() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
-import org.eclipse.ui.IFileEditorInput;
-<%}%>
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-<%if (!genModel.isRichClientPlatform()) {%>
-
-import org.eclipse.ui.dialogs.SaveAsDialog;
-
-import org.eclipse.ui.ide.IGotoMarker;
-<%}%>
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.ui.part.FileEditorInput;
-<%}%>
-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.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;
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.emf.common.ui.MarkerHelper;
-<%}%>
-<%if (genPackage.isMultipleEditorPages()) {%>
-import org.eclipse.emf.common.ui.ViewerPane;
-<%}%>
-
-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;
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EValidator;
-<%}%>
-
-import org.eclipse.emf.ecore.resource.Resource;
-<%if (!genModel.isRichClientPlatform()) {%>
-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;
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {%>
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-<%}%>
-<%if (!genModel.isRichClientPlatform()) {%>
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-<%}%>
-<%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) {%>
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-<%}%>
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import <%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-
-/**
- * This is an example of a <%=genPackage.getPrefix()%> model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getEditorClassName()%>
- extends MultiPageEditorPart
- implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider<%if (!genModel.isRichClientPlatform()) {%>, IGotoMarker<%}%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (genModel.isRichClientPlatform()) {%>
- /**
- * The filters for file extensions supported by the editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */<%if (genPackage.isGenerateModelWizard()) {%>
- public static final <%=_ListOfString%> FILE_EXTENSION_FILTERS = prefixExtensions(<%=genPackage.getImportedModelWizardClassName()%>.FILE_EXTENSIONS, "*.");<%=genModel.getNonNLS()%>
- <%} else {%>
- public static final <%=_ListOfString%> FILE_EXTENSION_FILTERS = prefixExtensions(<%=genModel.getImportedName("java.util.Arrays")%>.asList(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>FilenameExtensions").split("\\s*,\\s*")), "*.");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
- <%}%>
- /**
- * Returns a new unmodifiable list containing prefixed versions of the extensions in the given list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static <%=_ListOfString%> prefixExtensions(<%=_ListOfString%> extensions, String prefix)
- {
- <%=_ListOfString%> result = new <%=_ArrayListOfString%>();
- <%if (genModel.useGenerics()) {%>
- for (String extension : extensions)
- {
- result.add(prefix + extension);
- <%} else {%>
- for (Iterator iterator = extensions.iterator() ; iterator.hasNext(); )
- {
- result.add(prefix + (String)iterator.next());
- <%}%>
- }
- return Collections.unmodifiableList(result);
- }
-
-<%}%>
- /**
- * This keeps track of the editing domain that is used to track all changes to the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AdapterFactoryEditingDomain editingDomain;
-
- /**
- * This is the one adapter factory used for providing views of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory adapterFactory;
-
- /**
- * This is the content outline page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IContentOutlinePage contentOutlinePage;
-
- /**
- * This is a kludge...
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IStatusLineManager contentOutlineStatusLineManager;
-
- /**
- * This is the content outline page's viewer.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TreeViewer contentOutlineViewer;
-
- /**
- * This is the property sheet page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PropertySheetPage propertySheetPage;
-
- /**
- * This is the viewer that shadows the selection in the content outline.
- * The parent relation must be correctly defined for this to work.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TreeViewer selectionViewer;
-<%if (genPackage.isMultipleEditorPages()) {%>
-
- /**
- * This inverts the roll of parent and child in the content provider and show parents as a tree.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TreeViewer parentViewer;
-
- /**
- * This shows how a tree view works.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TreeViewer treeViewer;
-
- /**
- * This shows how a list view works.
- * A list viewer doesn't support icons.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ListViewer listViewer;
-
- /**
- * This shows how a table view works.
- * A table can be used as a list with icons.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TableViewer tableViewer;
-
- /**
- * This shows how a tree view with columns works.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TreeViewer treeViewerWithColumns;
-
- /**
- * This keeps track of the active viewer pane, in the book.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ViewerPane currentViewerPane;
-<%}%>
-
- /**
- * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Viewer currentViewer;
-
- /**
- * This listens to which ever viewer is active.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ISelectionChangedListener selectionChangedListener;
-
- /**
- * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfSelectionChangedListener%> selectionChangedListeners = new <%=_ArrayListOfSelectionChangedListener%>();
-
- /**
- * This keeps track of the selection of the editor as a whole.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ISelection editorSelection = StructuredSelection.EMPTY;
-
-<%if (!genModel.isRichClientPlatform()) {%>
- /**
- * The MarkerHelper is responsible for creating workspace resource markers presented
- * in Eclipse's Problems View.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected MarkerHelper markerHelper = new EditUIMarkerHelper();
-
-<%}%>
- /**
- * This listens for when the outline becomes active
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IPartListener partListener =
- new IPartListener()
- {
- public void partActivated(IWorkbenchPart p)
- {
- if (p instanceof ContentOutline)
- {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage)
- {
- getActionBarContributor().setActiveEditor(<%=genPackage.getEditorClassName()%>.this);
-
- setCurrentViewer(contentOutlineViewer);
- }
- }
- else if (p instanceof PropertySheet)
- {
- if (((PropertySheet)p).getCurrentPage() == propertySheetPage)
- {
- getActionBarContributor().setActiveEditor(<%=genPackage.getEditorClassName()%>.this);
- handleActivate();
- }
- }
- else if (p == <%=genPackage.getEditorClassName()%>.this)
- {
- handleActivate();
- }
- }
- public void partBroughtToTop(IWorkbenchPart p)
- {
- // Ignore.
- }
- public void partClosed(IWorkbenchPart p)
- {
- // Ignore.
- }
- public void partDeactivated(IWorkbenchPart p)
- {
- // Ignore.
- }
- public void partOpened(IWorkbenchPart p)
- {
- // Ignore.
- }
- };
-
- /**
- * Resources that have been removed since last activation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfResource%> removedResources = new <%=_ArrayListOfResource%>();
-
- /**
- * Resources that have been changed since last activation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfResource%> changedResources = new <%=_ArrayListOfResource%>();
-
- /**
- * Resources that have been saved.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfResource%> savedResources = new <%=_ArrayListOfResource%>();
-
- /**
- * Map to store the diagnostic associated with a resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_MapOfResourceToDiagnostic%> resourceToDiagnosticMap = new <%=_LinkedHashMapOfResourceToDiagnostic%>();
-
- /**
- * Controls whether the problem indication should be updated.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean updateProblemIndication = true;
-
- /**
- * Adapter used to update the problem indication when resources are demanded loaded.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EContentAdapter problemIndicationAdapter =
- new EContentAdapter()
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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);
- }
-
- if (updateProblemIndication)
- {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- updateProblemIndication();
- }
- });
- }
- break;
- }
- }
- }
- else
- {
- super.notifyChanged(notification);
- }
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void setTarget(Resource target)
- {
- basicSetTarget(target);
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void unsetTarget(Resource target)
- {
- basicUnsetTarget(target);
- }
- };
-<%if (!genModel.isRichClientPlatform()) {%>
-
- /**
- * This listens for workspace changes.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IResourceChangeListener resourceChangeListener =
- new IResourceChangeListener()
- {
- public void resourceChanged(IResourceChangeEvent event)
- {
- IResourceDelta delta = event.getDelta();
- try
- {
- class ResourceDeltaVisitor implements IResourceDeltaVisitor
- {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
- protected <%=_CollectionOfResource%> changedResources = new <%=_ArrayListOfResource%>();
- protected <%=_CollectionOfResource%> removedResources = new <%=_ArrayListOfResource%>();
-
- public boolean visit(IResourceDelta delta)
- {
- if (delta.getResource().getType() == IResource.FILE)
- {
- if (delta.getKind() == IResourceDelta.REMOVED ||
- delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS)
- {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
- if (resource != null)
- {
- if (delta.getKind() == IResourceDelta.REMOVED)
- {
- removedResources.add(resource);
- }
- else if (!savedResources.remove(resource))
- {
- changedResources.add(resource);
- }
- }
- }
- }
-
- return true;
- }
-
- public <%=_CollectionOfResource%> getChangedResources()
- {
- return changedResources;
- }
-
- public <%=_CollectionOfResource%> getRemovedResources()
- {
- return removedResources;
- }
- }
-
- final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
- delta.accept(visitor);
-
- if (!visitor.getRemovedResources().isEmpty())
- {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- removedResources.addAll(visitor.getRemovedResources());
- if (!isDirty())
- {
- getSite().getPage().closeEditor(<%=genPackage.getEditorClassName()%>.this, false);
- }
- }
- });
- }
-
- if (!visitor.getChangedResources().isEmpty())
- {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- changedResources.addAll(visitor.getChangedResources());
- if (getSite().getPage().getActiveEditor() == <%=genPackage.getEditorClassName()%>.this)
- {
- handleActivate();
- }
- }
- });
- }
- }
- catch (CoreException exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- }
- };
-<%}%>
-
- /**
- * Handles activation of the editor or it's associated views.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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(<%=genPackage.getEditorClassName()%>.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void handleChangedResources()
- {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict()))
- {
- if (isDirty())
- {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
- }
- editingDomain.getCommandStack().flush();
-
- updateProblemIndication = false;
-<%if (genModel.useGenerics()) {%>
- for (Resource resource : changedResources)
-<%} else {%>
- for (Iterator i = changedResources.iterator(); i.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- Resource resource = (Resource)i.next();
-<%}%>
- if (resource.isLoaded())
- {
- resource.unload();
- try
- {
- resource.load(Collections.EMPTY_MAP);
- }
- catch (IOException exception)
- {
- if (!resourceToDiagnosticMap.containsKey(resource))
- {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
- }
- }
- }
- }
-
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
- if (AdapterFactoryEditingDomain.isStale(editorSelection))
- {
- setSelection(StructuredSelection.EMPTY);
- }
-<%}%>
-
- updateProblemIndication = true;
- updateProblemIndication();
- }
- }
-
- /**
- * Updates the problems indication with the information described in the specified diagnostic.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void updateProblemIndication()
- {
- if (updateProblemIndication)
- {
- BasicDiagnostic diagnostic =
- new BasicDiagnostic
- (Diagnostic.OK,
- "<%=genPackage.getGenModel().getEditorPluginID()%>",<%=genModel.getNonNLS()%>
- 0,
- null,
- new Object [] { editingDomain.getResourceSet() });
-<%if (genModel.useGenerics()) {%>
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values())
-<%} else {%>
- for (Iterator i = resourceToDiagnosticMap.values().iterator(); i.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- Diagnostic childDiagnostic = (Diagnostic)i.next();
-<%}%>
- 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);
-<%if (!genModel.isRichClientPlatform()) {%>
- problemEditorPart.setMarkerHelper(markerHelper);
-<%}%>
- try
- {
- addPage(++lastEditorPage, problemEditorPart, getEditorInput());
- setPageText(lastEditorPage, problemEditorPart.getPartName());
- setActivePage(lastEditorPage);
- showTabs();
- }
- catch (PartInitException exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- }
-<%if (!genModel.isRichClientPlatform()) {%>
-
- if (markerHelper.hasMarkers(editingDomain.getResourceSet()))
- {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
- if (diagnostic.getSeverity() != Diagnostic.OK)
- {
- try
- {
- markerHelper.createMarkers(diagnostic);
- }
- catch (CoreException exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- }
- }
-<%}%>
- }
- }
-
- /**
- * Shows a dialog that asks if conflicting changes should be discarded.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean handleDirtyConflict()
- {
- return
- MessageDialog.openQuestion
- (getSite().getShell(),
- getString("_UI_FileConflict_label"),<%=genModel.getNonNLS()%>
- getString("_WARN_FileConflict"));<%=genModel.getNonNLS()%>
- }
-
- /**
- * This creates a model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getEditorClassName()%>()
- {
- super();
- initializeEditingDomain();
- }
-
- /**
- * This sets up the editing domain for the model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void initializeEditingDomain()
- {
- // Create an adapter factory that yields item providers.
- //
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
-<%@ include file="Editor/addItemProviderFactories.override.javajetinc" fail="alternative"%>
-<%@ start%>
-<%for (GenPackage aGenPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (!aGenPackage.getGenClasses().isEmpty() && aGenPackage.getGenModel().hasEditSupport()) {%>
- adapterFactory.addAdapterFactory(new <%=aGenPackage.getImportedItemProviderAdapterFactoryClassName()%>());
- <%}%>
-<%}%>
-<%for (GenPackage aGenPackage : genModel.getAllUsedGenPackagesWithClassifiers()) {%>
- <%if (!aGenPackage.getGenClasses().isEmpty() && aGenPackage.getGenModel().hasEditSupport()) {%>
- adapterFactory.addAdapterFactory(new <%=aGenPackage.getImportedItemProviderAdapterFactoryClassName()%>());
- <%}%>
-<%}%>
-<%@ include file="Editor/addItemProviderFactories.insert.javajetinc" fail="silent"%>
-<%@end%><%//Editor/addItemproviderFactories.override.javajetinc"%>
- 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()
- {
- public void commandStackChanged(final EventObject event)
- {
- getContainer().getDisplay().asyncExec
- (new Runnable()
- {
- 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());
- }
- if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
- {
- propertySheetPage.refresh();
- }
- }
- });
- }
- });
-
- // Create the editing domain with a special command stack.
- //
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new <%=_HashMapOfResourceToBoolean%>());
- }
-
- /**
- * This is here for the listener to be able to call it.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void firePropertyChange(int action)
- {
- super.firePropertyChange(action);
- }
-
- /**
- * This sets the selection into whichever viewer is active.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSelectionToViewer(<%=_CollectionOfAnything%> collection)
- {
- final <%=_CollectionOfAnything%> theSelection = collection;
- // Make sure it's okay.
- //
- if (theSelection != null && !theSelection.isEmpty())
- {
- Runnable runnable =
- new Runnable()
- {
- 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}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EditingDomain getEditingDomain()
- {
- return editingDomain;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider
- {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory)
- {
- super(adapterFactory);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object [] getElements(Object object)
- {
- Object parent = super.getParent(object);
- return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object [] getChildren(Object object)
- {
- Object parent = super.getParent(object);
- return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean hasChildren(Object object)
- {
- Object parent = super.getParent(object);
- return parent != null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object getParent(Object object)
- {
- return null;
- }
- }
-<%if (genPackage.isMultipleEditorPages()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setCurrentViewerPane(ViewerPane viewerPane)
- {
- if (currentViewerPane != viewerPane)
- {
- if (currentViewerPane != null)
- {
- currentViewerPane.showFocus(false);
- }
- currentViewerPane = viewerPane;
- }
- setCurrentViewer(currentViewerPane.getViewer());
- }
-<%}%>
-
- /**
- * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
- * is the current one.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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.
- //
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Viewer getViewer()
- {
- return currentViewer;
- }
-
- /**
- * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createContextMenuFor(StructuredViewer viewer)
- {
- MenuManager contextMenu = new MenuManager("#PopUp");<%=genModel.getNonNLS()%>
- contextMenu.add(new Separator("additions"));<%=genModel.getNonNLS()%>
- contextMenu.setRemoveAllWhenShown(true);
- contextMenu.addMenuListener(this);
- Menu menu= contextMenu.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {%>
- getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
-<%} else {%>
- getSite().registerContextMenu(contextMenu, viewer);
-<%}%>
-
- int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
- Transfer[] transfers = new Transfer[] { LocalTransfer.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createModel()
- {
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {%>
- URI resourceURI = EditUIUtil.getURI(getEditorInput());
-<%} else if (genModel.isRichClientPlatform()) {%>
- URI resourceURI = URI.createURI(getEditorInput().getName());
-<%} else {%>
- // Assumes that the input is a file object.
- //
- IFileEditorInput modelFile = (IFileEditorInput)getEditorInput();
- URI resourceURI = URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString(), true);
-<%}%>
- 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).
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Diagnostic analyzeResourceProblems(Resource resource, Exception exception)
- {
- if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty())
- {
- BasicDiagnostic basicDiagnostic =
- new BasicDiagnostic
- (Diagnostic.ERROR,
- "<%=genPackage.getGenModel().getEditorPluginID()%>",<%=genModel.getNonNLS()%>
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()),<%=genModel.getNonNLS()%>
- new Object [] { exception == null ? (Object)resource : exception });
- basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
- return basicDiagnostic;
- }
- else if (exception != null)
- {
- return
- new BasicDiagnostic
- (Diagnostic.ERROR,
- "<%=genPackage.getGenModel().getEditorPluginID()%>",<%=genModel.getNonNLS()%>
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()),<%=genModel.getNonNLS()%>
- new Object[] { exception });
- }
- else
- {
- return Diagnostic.OK_INSTANCE;
- }
- }
-
- /**
- * This is the method used by the framework to install your own controls.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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.
- //
-<%if (genPackage.isMultipleEditorPages()) {%>
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
-
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
-
- selectionViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, selectionViewer<%}%>));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
-
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
-
- createContextMenuFor(selectionViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_SelectionPage_label"));<%=genModel.getNonNLS()%>
- }
-
- // Create a page for the parent tree view.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
-
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, parentViewer<%}%>));
-
- createContextMenuFor(parentViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_ParentPage_label"));<%=genModel.getNonNLS()%>
- }
-
- // This is the page for the list viewer
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- return new ListViewer(composite);
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, listViewer<%}%>));
-
- createContextMenuFor(listViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_ListPage_label"));<%=genModel.getNonNLS()%>
- }
-
- // This is the page for the tree viewer
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- return new TreeViewer(composite);
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, treeViewer<%}%>));
-
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
-
- createContextMenuFor(treeViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_TreePage_label"));<%=genModel.getNonNLS()%>
- }
-
- // This is the page for the table viewer.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- return new TableViewer(composite);
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
-
- Table table = tableViewer.getTable();
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
-
- TableColumn objectColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(3, 100, true));
- objectColumn.setText(getString("_UI_ObjectColumn_label"));<%=genModel.getNonNLS()%>
- objectColumn.setResizable(true);
-
- TableColumn selfColumn = new TableColumn(table, SWT.NONE);
- layout.addColumnData(new ColumnWeightData(2, 100, true));
- selfColumn.setText(getString("_UI_SelfColumn_label"));<%=genModel.getNonNLS()%>
- selfColumn.setResizable(true);
-
- tableViewer.setColumnProperties(new String [] {"a", "b"});<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, tableViewer<%}%>));
-
- createContextMenuFor(tableViewer);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_TablePage_label"));<%=genModel.getNonNLS()%>
- }
-
- // This is the page for the table tree viewer.
- //
- {
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), <%=genPackage.getEditorClassName()%>.this)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Viewer createViewer(Composite composite)
- {
- return new TreeViewer(composite);
- }
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void requestActivation()
- {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
- viewerPane.createControl(getContainer());
-
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
-
- Tree tree = treeViewerWithColumns.getTree();
- tree.setLayoutData(new FillLayout());
- tree.setHeaderVisible(true);
- tree.setLinesVisible(true);
-
- TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
- objectColumn.setText(getString("_UI_ObjectColumn_label"));<%=genModel.getNonNLS()%>
- objectColumn.setResizable(true);
- objectColumn.setWidth(250);
-
- TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
- selfColumn.setText(getString("_UI_SelfColumn_label"));<%=genModel.getNonNLS()%>
- selfColumn.setResizable(true);
- selfColumn.setWidth(200);
-
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, treeViewerWithColumns<%}%>));
-
- createContextMenuFor(treeViewerWithColumns);
- int pageIndex = addPage(viewerPane.getControl());
- setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));<%=genModel.getNonNLS()%>
- }
-<%} else {%>
- Tree tree = new Tree(getContainer(), SWT.MULTI);
- selectionViewer = new TreeViewer(tree);
- setCurrentViewer(selectionViewer);
-
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- selectionViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, selectionViewer<%}%>));
- 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"));<%=genModel.getNonNLS()%>
-<%}%>
-
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- 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;
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void controlResized(ControlEvent event)
- {
- if (!guard)
- {
- guard = true;
- hideTabs();
- guard = false;
- }
- }
- });
-
- getSite().getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- updateProblemIndication();
- }
- });
- }
-
- /**
- * If there is just one page in the multi-page editor part,
- * this hides the single tab at the bottom.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void hideTabs()
- {
- if (getPageCount() <= 1)
- {
- setPageText(0, "");<%=genModel.getNonNLS()%>
- if (getContainer() instanceof CTabFolder)
- {
- ((CTabFolder)getContainer()).setTabHeight(1);
- Point point = getContainer().getSize();
- getContainer().setSize(point.x, point.y + 6);
- }
- }
- }
-
- /**
- * If there is more than one page in the multi-page editor part,
- * this shows the tabs at the bottom.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void showTabs()
- {
- if (getPageCount() > 1)
- {
- setPageText(0, getString("_UI_SelectionPage_label"));<%=genModel.getNonNLS()%>
- if (getContainer() instanceof CTabFolder)
- {
- ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
- Point point = getContainer().getSize();
- getContainer().setSize(point.x, point.y - 6);
- }
- }
- }
-
- /**
- * This is used to track the active viewer.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useGenerics()) {%>
- @SuppressWarnings("<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE) {%>rawtypes<%} else {%>unchecked<%}%>")
-<%}%>
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public Object getAdapter(Class key)
- {
- if (key.equals(IContentOutlinePage.class))
- {
- return showOutlineView() ? getContentOutlinePage() : null;
- }
- else if (key.equals(IPropertySheetPage.class))
- {
- return getPropertySheetPage();
- }
-<%if (!genModel.isRichClientPlatform()) {%>
- else if (key.equals(IGotoMarker.class))
- {
- return this;
- }
-<%}%>
- else
- {
- return super.getAdapter(key);
- }
- }
-
- /**
- * This accesses a cached version of the content outliner.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IContentOutlinePage getContentOutlinePage()
- {
- if (contentOutlinePage == null)
- {
- // The content outline is just a tree.
- //
- class MyContentOutlinePage extends ContentOutlinePage
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void createControl(Composite parent)
- {
- super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
-
- // Set up the tree viewer.
- //
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new <%=_AdapterFactoryLabelProvider%>(adapterFactory<%if (useExtendedLabelProvider) {%>, contentOutlineViewer<%}%>));
- 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);
- }
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
- {
- super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @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.
- //
- public void selectionChanged(SelectionChangedEvent event)
- {
- handleContentOutlineSelection(event.getSelection());
- }
- });
- }
-
- return contentOutlinePage;
- }
-
- /**
- * This accesses a cached version of the property sheet.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IPropertySheetPage getPropertySheetPage()
- {
- if (propertySheetPage == null)
- {
- propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain)
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void setSelectionToViewer(<%=_ListOfAnything%> selection)
- {
- <%=genPackage.getEditorClassName()%>.this.setSelectionToViewer(selection);
- <%=genPackage.getEditorClassName()%>.this.setFocus();
- }
-
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void setActionBars(IActionBars actionBars)
- {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- }
-
- return propertySheetPage;
- }
-
- /**
- * This deals with how we want selection in the outliner to affect the other views.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void handleContentOutlineSelection(ISelection selection)
- {
-<%if (genPackage.isMultipleEditorPages()) {%>
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection)
-<%} else {%>
- if (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection)
-<%}%>
- {
- Iterator<%if (genModel.useGenerics()) {%><?><%}%> selectedElements = ((IStructuredSelection)selection).iterator();
- if (selectedElements.hasNext())
- {
- // Get the first selected element.
- //
- Object selectedElement = selectedElements.next();
-
-<%if (genPackage.isMultipleEditorPages()) {%>
- // If it's the selection viewer, then we want it to select the same selection as this selection.
- //
- if (currentViewerPane.getViewer() == selectionViewer)
- {
- <%=_ArrayListOfObject%> selectionList = new <%=_ArrayListOfObject%>();
- selectionList.add(selectedElement);
- while (selectedElements.hasNext())
- {
- selectionList.add(selectedElements.next());
- }
-
- // Set the selection to the widget.
- //
- selectionViewer.setSelection(new StructuredSelection(selectionList));
- }
- else
- {
- // Set the input to the widget.
- //
- if (currentViewerPane.getViewer().getInput() != selectedElement)
- {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
- }
- }
-<%} else {%>
- <%=_ArrayListOfObject%> selectionList = new <%=_ArrayListOfObject%>();
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean isDirty()
- {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
- }
-
- /**
- * This is for implementing {@link IEditorPart} and simply saves the model file.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void doSave(IProgressMonitor progressMonitor)
- {
- // Save only resources that have actually changed.
- //
- final <%=_MapOfObjectToObject%> saveOptions = new <%=_HashMapOfObjectToObject%>();
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF23_VALUE) {%>
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
-<%}%>
-
- // Do the work within an operation because this is a long running activity that modifies the workbench.
- //
- <%=importedOperationClassName%> operation =
- new <%=importedOperationClassName%>()
- {
- // This is the method that gets invoked when the operation runs.
- //
-<%if (!genModel.isRichClientPlatform() && genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void <%=operationMethodName%>(IProgressMonitor monitor)
- {
- // Save the resources to the file system.
- //
- boolean first = true;
-<%if (genModel.useGenerics()) {%>
- for (Resource resource : editingDomain.getResourceSet().getResources())
-<%} else {%>
- for (Iterator i = editingDomain.getResourceSet().getResources().iterator(); i.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- Resource resource = (Resource)i.next();
-<%}%>
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource))
- {
- try
- {
-<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
- long timeStamp = resource.getTimeStamp();
- resource.save(saveOptions);
- if (resource.getTimeStamp() != timeStamp)
- {
- savedResources.add(resource);
- }
-<%} else {%>
- resource.save(saveOptions);
- 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.
- //
- <%=genPackage.getImportedEditorPluginClassName()%>.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean isSaveAsAllowed()
- {
- return true;
- }
-
- /**
- * This also changes the editor's input.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void doSaveAs()
- {
-<%if (genModel.isRichClientPlatform()) {%>
- <%if (genModel.isRichAjaxPlatform()) {%>
- new <%=genModel.getImportedName("org.eclipse.emf.common.ui.dialogs.ResourceDialog")%>(getSite().getShell(), null, SWT.NONE)
- {
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected boolean isSave()
- {
- return true;
- }
-
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected boolean processResources()
- {
- <%="List" + (genModel.useGenerics() ? "<URI>" : "")%> uris = getURIs();
- if (uris.size() > 0)
- {
- URI uri = <%=genModel.useGenerics() ? "": "(URI)"%>uris.get(0);
- doSaveAs(uri, new <%=genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")%>(uri));
- return true;
- }
- else
- {
- return false;
- }
- }
- }.open();
- <%} else {%>
- String[] filters = <%if (!genModel.useGenerics()) {%>(String[])<%}%>FILE_EXTENSION_FILTERS.toArray(new String[FILE_EXTENSION_FILTERS.size()]);
- String[] files = <%=genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName())%>.openFilePathDialog(getSite().getShell(), <%=genModel.getImportedName("org.eclipse.swt.SWT")%>.SAVE, filters);
- if (files.length > 0)
- {
- URI uri = URI.createFileURI(files[0]);
- doSaveAs(uri, new <%=genModel.getImportedName("org.eclipse.emf.common.ui.URIEditorInput")%>(uri));
- }
- <%}%>
-<%} else {%>
- SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
- saveAsDialog.open();
- IPath path = saveAsDialog.getResult();
- if (path != null)
- {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (file != null)
- {
- doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
- }
- }
-<%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void doSaveAs(URI uri, IEditorInput editorInput)
- {
- (<%if (!genModel.useGenerics()) {%>(Resource)<%}%>editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
- setInputWithNotify(editorInput);
- setPartName(editorInput.getName());
- IProgressMonitor progressMonitor =
- getActionBars().getStatusLineManager() != null ?
- getActionBars().getStatusLineManager().getProgressMonitor() :
- new <%=genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor")%>();
- doSave(progressMonitor);
- }
-<%if (!genModel.isRichClientPlatform()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void gotoMarker(IMarker marker)
- {
- try
- {
- if (marker.getType().equals(EValidator.MARKER))
- {
- String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
- if (uriAttribute != null)
- {
- URI uri = URI.createURI(uriAttribute);
- EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
- if (eObject != null)
- {
- setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
- }
- }
- }
- }
- catch (CoreException exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- }
-<%}%>
-
- /**
- * This is called during startup.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void init(IEditorSite site, IEditorInput editorInput)
- {
- setSite(site);
- setInputWithNotify(editorInput);
- setPartName(editorInput.getName());
- site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
-<%if (!genModel.isRichClientPlatform()) {%>
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
-<%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void setFocus()
- {
-<%if (genPackage.isMultipleEditorPages()) {%>
- if (currentViewerPane != null)
- {
- currentViewerPane.setFocus();
- }
- else
- {
- getControl(getActivePage()).setFocus();
- }
-<%} else {%>
- getControl(getActivePage()).setFocus();
-<%}%>
- }
-
- /**
- * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener)
- {
- selectionChangedListeners.add(listener);
- }
-
- /**
- * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- selectionChangedListeners.remove(listener);
- }
-
- /**
- * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSelection(ISelection selection)
- {
- editorSelection = selection;
-
-<%if (genModel.useGenerics()) {%>
- for (ISelectionChangedListener listener : selectionChangedListeners)
-<%} else {%>
- for (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- ISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();
-<%}%>
- listener.selectionChanged(new SelectionChangedEvent(this, selection));
- }
- setStatusLineManager(selection);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStatusLineManager(ISelection selection)
- {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
-
- if (statusLineManager != null)
- {
- if (selection instanceof IStructuredSelection)
- {
- <%=_CollectionOfAnything%> collection = ((IStructuredSelection)selection).toList();
- switch (collection.size())
- {
- case 0:
- {
- statusLineManager.setMessage(getString("_UI_NoObjectSelected"));<%=genModel.getNonNLS()%>
- break;
- }
- case 1:
- {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
- statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));<%=genModel.getNonNLS()%>
- break;
- }
- default:
- {
- statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));<%=genModel.getNonNLS()%>
- break;
- }
- }
- }
- else
- {
- statusLineManager.setMessage("");<%=genModel.getNonNLS()%>
- }
- }
- }
-
- /**
- * This looks up a string in the plugin's plugin.properties file.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static String getString(String key)
- {
- return <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString(key);
- }
-
- /**
- * This looks up a string in plugin.properties, making a substitution.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static String getString(String key, Object s1)
- {
- return <%=genPackage.getImportedEditorPluginClassName()%>.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.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void menuAboutToShow(IMenuManager menuManager)
- {
- ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EditingDomainActionBarContributor getActionBarContributor()
- {
- return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IActionBars getActionBars()
- {
- return getActionBarContributor().getActionBars();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AdapterFactory getAdapterFactory()
- {
- return adapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void dispose()
- {
- updateProblemIndication = false;
-
-<%if (!genModel.isRichClientPlatform()) {%>
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
-
-<%}%>
- getSite().getPage().removePartListener(partListener);
-
- adapterFactory.dispose();
-
- if (getActionBarContributor().getActiveEditor() == this)
- {
- getActionBarContributor().setActiveEditor(null);
- }
-
- if (propertySheetPage != null)
- {
- propertySheetPage.dispose();
- }
-
- if (contentOutlinePage != null)
- {
- contentOutlinePage.dispose();
- }
-
- super.dispose();
- }
-
- /**
- * Returns whether the outline view should be presented to the user.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean showOutlineView()
- {
- return <%=genPackage.isMultipleEditorPages()%>;
- }
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/EntryPoint.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/EntryPoint.javajet
deleted file mode 100644
index 8f822e29d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/EntryPoint.javajet
+++ /dev/null
@@ -1,90 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="EntryPoint" version="$Id: EntryPoint.javajet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 20010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditorPluginPackageName()%>;
-
-import org.eclipse.emf.edit.ui.EditorEntryPoint;
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * This is the entry point.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genModel.getEditorEntryPointClassName()%> extends EditorEntryPoint
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void onModuleLoad()
- {
- super.onModuleLoad();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void registerPackages(<%=genModel.getImportedName("org.eclipse.emf.ecore.EPackage")%>.Registry packageRegistry)
- {
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- packageRegistry.put(<%=genPackage.getImportedPackageInterfaceName()%>.eNS_URI, <%=genPackage.getImportedPackageInterfaceName()%>.eINSTANCE);
-<%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void configureItemProviderAdapterFactories(<%=genModel.getImportedName("org.eclipse.emf.edit.provider.ComposedAdapterFactory")%> adapterFactory)
- {
-<%for (GenPackage genPackage : genModel.getAllGenAndUsedGenPackagesWithClassifiers()) {%>
- adapterFactory.addAdapterFactory(new <%=genPackage.getImportedItemProviderAdapterFactoryClassName()%>());
-<%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected String getApplicationTitle()
- {
- return "<%=genModel.getModelName()%> Application";<%=genModel.getNonNLS()%>
- }
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ModelWizard.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ModelWizard.javajet
deleted file mode 100644
index 5506636d4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/ModelWizard.javajet
+++ /dev/null
@@ -1,976 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="ModelWizard" version="$Id: ModelWizard.javajet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel();%>
-<%@ include file="../Header.javajetinc"%>
-<%String _ListOfString = "List" + (genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.String") + ">" : "");%>
-<%String _ArrayListOfString = "ArrayList" + (genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.String") + ">" : "");%>
-<%String _CollectionOfString = "Collection" + (genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.String") + ">" : "");%>
-<%String _MapOfObjectToObject = "Map" + (genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.Object") + ", " + genModel.getImportedName("java.lang.Object") + ">" : "");%>
-<%String _HashMapOfObjectToObject = "HashMap" + (genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.Object") + ", " + genModel.getImportedName("java.lang.Object") + ">" : "");%>
-package <%=genPackage.getPresentationPackageName()%>;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-<%if (!genModel.useGenerics()) {%>
-import java.util.Iterator;
-<%}%>
-import java.util.List;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.StringTokenizer;
-
-<%if (!genModel.isRichClientPlatform() && genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) {%>
-import org.eclipse.emf.common.CommonPlugin;
-
-<%}%>
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-
-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.EObject;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.core.resources.IContainer;
-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.ResourcesPlugin;
-
-<%}%>
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-
-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.ModifyListener;
-import org.eclipse.swt.events.ModifyEvent;
-
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-<%if (!genModel.isRichClientPlatform()) {%>
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-
-<%}%>
-<%if (!genModel.isSuppressEMFMetaData()) {%>
-import <%=genPackage.getQualifiedFactoryInterfaceName()%>;
-<%}%>
-import <%=genPackage.getQualifiedPackageInterfaceName()%>;
-import <%=genPackage.getQualifiedEditPluginClassName()%>;
-
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-
-/**
- * This is a simple wizard for creating a new model file.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getModelWizardClassName()%> extends Wizard implements INewWizard
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * The supported extensions for created files.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=_ListOfString%> FILE_EXTENSIONS =
- Collections.unmodifiableList(Arrays.asList(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>FilenameExtensions").split("\\s*,\\s*")));<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
-
- /**
- * A formatted list of supported file extensions, suitable for display.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String FORMATTED_FILE_EXTENSIONS =
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>FilenameExtensions").replaceAll("\\s*,\\s*", ", ");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
-
- /**
- * This caches an instance of the model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.isSuppressEMFMetaData() ? genModel.getImportedName("org.eclipse.emf.ecore.EPackage") : genPackage.getPackageInterfaceName()%> <%=genPackage.getUncapPackageName()%> = <%=genPackage.getPackageInterfaceName()%>.eINSTANCE;
-
- /**
- * This caches an instance of the model factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.isSuppressEMFMetaData() ? genModel.getImportedName("org.eclipse.emf.ecore.EFactory") : genPackage.getFactoryInterfaceName()%> <%=genPackage.getUncapFactoryName()%> = <%=genPackage.getUncapPackageName()%>.get<%=genModel.isSuppressEMFMetaData() ? "EFactoryInstance" : genPackage.getFactoryName()%>();
-
-<%if (!genModel.isRichClientPlatform()) {%>
- /**
- * This is the file creation page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genPackage.getModelWizardClassName()%>NewFileCreationPage newFileCreationPage;
-
-<%}%>
- /**
- * This is the initial object creation page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genPackage.getModelWizardClassName()%>InitialObjectCreationPage initialObjectCreationPage;
-
- /**
- * Remember the selection during initialization for populating the default container.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IStructuredSelection selection;
-
- /**
- * Remember the workbench during initialization.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IWorkbench workbench;
-
- /**
-<%if (!genPackage.hasDocumentRoot()) {%>
- * Caches the names of the types that can be created as the root object.
-<%} else {%>
- * Caches the names of the features representing global elements.
-<%}%>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_ListOfString%> initialObjectNames;
-
- /**
- * This just records the information.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void init(IWorkbench workbench, IStructuredSelection selection)
- {
- this.workbench = workbench;
- this.selection = selection;
- setWindowTitle(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_Wizard_label"));<%=genModel.getNonNLS()%>
- setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getImage("full/wizban/New<%=genPackage.getPrefix()%>")));<%=genModel.getNonNLS()%>
- }
-
- /**
-<%if (!genPackage.hasDocumentRoot()) {%>
- * Returns the names of the types that can be created as the root object.
-<%} else {%>
- * Returns the names of the features representing global elements.
-<%}%>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfString%> getInitialObjectNames()
- {
- if (initialObjectNames == null)
- {
- initialObjectNames = new <%=_ArrayListOfString%>();
-<%if (!genPackage.hasDocumentRoot()) {%>
- <%if (genModel.useGenerics()) {%>
- for (EClassifier eClassifier : <%=genPackage.getUncapPackageName()%>.getEClassifiers())
- <%} else {%>
- for (Iterator classifiers = <%=genPackage.getUncapPackageName()%>.getEClassifiers().iterator(); classifiers.hasNext(); )
- <%}%>
- {
- <%if (!genModel.useGenerics()) {%>
- EClassifier eClassifier = (EClassifier)classifiers.next();
- <%}%>
- if (eClassifier instanceof EClass)
- {
- EClass eClass = (EClass)eClassifier;
- if (!eClass.isAbstract())
- {
- initialObjectNames.add(eClass.getName());
- }
- }
- }
-<%} else {%>
- <%if (genModel.useGenerics()) {%>
- for (<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%> eStructuralFeature : <%=genModel.getImportedName("org.eclipse.emf.ecore.util.ExtendedMetaData")%>.INSTANCE.getAllElements(<%=genModel.getImportedName("org.eclipse.emf.ecore.util.ExtendedMetaData")%>.INSTANCE.getDocumentRoot(<%=genPackage.getUncapPackageName()%>)))
- <%} else {%>
- for (Iterator elements = <%=genModel.getImportedName("org.eclipse.emf.ecore.util.ExtendedMetaData")%>.INSTANCE.getAllElements(<%=genModel.getImportedName("org.eclipse.emf.ecore.util.ExtendedMetaData")%>.INSTANCE.getDocumentRoot(<%=genPackage.getUncapPackageName()%>)).iterator(); elements.hasNext(); )
- <%}%>
- {
- <%if (!genModel.useGenerics()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%> eStructuralFeature = (<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>)elements.next();
- <%}%>
- if (eStructuralFeature.isChangeable())
- {
- EClassifier eClassifier = eStructuralFeature.getEType();
- if (eClassifier instanceof EClass)
- {
- EClass eClass = (EClass)eClassifier;
- if (!eClass.isAbstract())
- {
- initialObjectNames.add(eStructuralFeature.getName());
- }
- }
- }
- }
-<%}%>
- Collections.sort(initialObjectNames, <%if (!genModel.isRichClientPlatform() && genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) {%>CommonPlugin.INSTANCE.getComparator()<%} else {%>java.text.Collator.getInstance()<%}%>);
- }
- return initialObjectNames;
- }
-
- /**
- * Create a new model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EObject createInitialModel()
- {
-<%if (!genPackage.hasDocumentRoot()) {%>
- EClass eClass = (EClass)<%=genPackage.getUncapPackageName()%>.getEClassifier(initialObjectCreationPage.getInitialObjectName());
- EObject rootObject = <%=genPackage.getUncapFactoryName()%>.create(eClass);
-<%} else {%>
- EClass eClass = <%=genModel.getImportedName("org.eclipse.emf.ecore.util.ExtendedMetaData")%>.INSTANCE.getDocumentRoot(<%=genPackage.getUncapPackageName()%>);
- EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName());
- EObject rootObject = <%=genPackage.getUncapFactoryName()%>.create(eClass);
- rootObject.eSet(eStructuralFeature, <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.create((EClass)eStructuralFeature.getEType()));
-<%}%>
- return rootObject;
- }
-
- /**
- * Do the work after everything is specified.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public boolean performFinish()
- {
- try
- {
-<%if (genModel.isRichClientPlatform()) {%>
- // Get the URI of the model file.
- //
- final URI fileURI = getModelURI();
- if (new <%=genModel.getImportedName("java.io.File")%>(fileURI.toFileString()).exists())
- {
- if (!MessageDialog.openQuestion
- (getShell(),
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_Question_title"),<%=genModel.getNonNLS()%>
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_WARN_FileConflict", new String []{ fileURI.toFileString() })))<%=genModel.getNonNLS()%>
- {
- initialObjectCreationPage.selectFileField();
- return false;
- }
- }
-
- // Do the work within an operation.
- //
- <%=genModel.getImportedName("org.eclipse.jface.operation.IRunnableWithProgress")%> operation = new <%=genModel.getImportedName("org.eclipse.jface.operation.IRunnableWithProgress")%>()
- {
- public void run(IProgressMonitor progressMonitor)
-<%} else {%>
- // Remember the file.
- //
- final IFile modelFile = getModelFile();
-
- // Do the work within an operation.
- //
- WorkspaceModifyOperation operation =
- new WorkspaceModifyOperation()
- {
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void execute(IProgressMonitor progressMonitor)
-<%}%>
- {
- try
- {
- // Create a resource set
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
-<%if (!genModel.isRichClientPlatform()) {%>
- // Get the URI of the model file.
- //
- URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
-
-<%}%>
- // Create a resource for this file.
- //
- Resource resource = resourceSet.createResource(fileURI<%if (genPackage.isContentType()) {%>, <%=genPackage.getImportedPackageInterfaceName()%>.eCONTENT_TYPE<%}%>);
-
- // 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.
- //
- <%=_MapOfObjectToObject%> options = new <%=_HashMapOfObjectToObject%>();
- options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
- resource.save(options);
- }
- catch (Exception exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- }
- finally
- {
- progressMonitor.done();
- }
- }
- };
-
- getContainer().run(false, false, operation);
-
-<%if (genModel.isRichClientPlatform()) {%>
- return <%=genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName())%>.openEditor(workbench, fileURI);
-<%} else {%>
- // Select the new file resource in the current view.
- //
- <%=genModel.getImportedName("org.eclipse.ui.IWorkbenchWindow")%> workbenchWindow = workbench.getActiveWorkbenchWindow();
- <%=genModel.getImportedName("org.eclipse.ui.IWorkbenchPage")%> page = workbenchWindow.getActivePage();
- final <%=genModel.getImportedName("org.eclipse.ui.IWorkbenchPart")%> activePart = page.getActivePart();
- if (activePart instanceof ISetSelectionTarget)
- {
- final <%=genModel.getImportedName("org.eclipse.jface.viewers.ISelection")%> targetSelection = new <%=genModel.getImportedName("org.eclipse.jface.viewers.StructuredSelection")%>(modelFile);
- getShell().getDisplay().asyncExec
- (new Runnable()
- {
- public void run()
- {
- ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
- }
- });
- }
-
- // Open an editor on the new file.
- //
- try
- {
- page.openEditor
- (new FileEditorInput(modelFile),
- workbench.getEditorRegistry().getDefaultEditor<%if (!genPackage.isContentType()) {%>(modelFile.getFullPath().toString()).getId());<%} else {%>
- (modelFile.getFullPath().toString(),
- <%=genModel.getImportedName("org.eclipse.core.runtime.Platform")%>.getContentTypeManager().getContentType(<%=genPackage.getImportedPackageInterfaceName()%>.eCONTENT_TYPE)).getId());
-<%}%>
- }
- catch (<%=genModel.getImportedName("org.eclipse.ui.PartInitException")%> exception)
- {
- MessageDialog.openError(workbenchWindow.getShell(), <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());<%=genModel.getNonNLS()%>
- return false;
- }
-
- return true;
-<%}%>
- }
- catch (Exception exception)
- {
- <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.log(exception);
- return false;
- }
- }
-
-<%if (!genModel.isRichClientPlatform()) {%>
- /**
- * This is the one page of the wizard.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public class <%=genPackage.getModelWizardClassName()%>NewFileCreationPage extends WizardNewFileCreationPage
- {
- /**
- * Pass in the selection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getModelWizardClassName()%>NewFileCreationPage(String pageId, IStructuredSelection selection)
- {
- super(pageId, selection);
- }
-
- /**
- * The framework calls this to see if the file is correct.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected boolean validatePage()
- {
- if (super.validatePage())
- {
- String extension = new <%=genModel.getImportedName("org.eclipse.core.runtime.Path")%>(getFileName()).getFileExtension();
- if (extension == null || !FILE_EXTENSIONS.contains(extension))
- {
- String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- setErrorMessage(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
- return false;
- }
- return true;
- }
- return false;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IFile getModelFile()
- {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
- }
- }
-
-<%}%>
- /**
- * This is the page where the type of object to create is selected.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public class <%=genPackage.getModelWizardClassName()%>InitialObjectCreationPage extends WizardPage
- {
-<%if (genModel.isRichClientPlatform()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genModel.getImportedName("org.eclipse.swt.widgets.Text")%> fileField;
-
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Combo initialObjectField;
-
- /**
- * @generated
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- */
- protected <%=_ListOfString%> encodings;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Combo encodingField;
-
- /**
- * Pass in the selection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getModelWizardClassName()%>InitialObjectCreationPage(String pageId)
- {
- super(pageId);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- 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);
- }
-
-<%if (genModel.isRichClientPlatform()) {%>
- Label resourceURILabel = new Label(composite, SWT.LEFT);
- {
- resourceURILabel.setText(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_File_label"));<%=genModel.getNonNLS()%>
-
- 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 <%=genModel.getImportedName("org.eclipse.swt.widgets.Text")%>(fileComposite, SWT.BORDER);
- {
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.horizontalSpan = 1;
- fileField.setLayoutData(data);
- }
-
- fileField.addModifyListener(validator);
-
- <%if (!genModel.isRichAjaxPlatform()) {%>
- <%=genModel.getImportedName("org.eclipse.swt.widgets.Button")%> resourceURIBrowseFileSystemButton = new <%=genModel.getImportedName("org.eclipse.swt.widgets.Button")%>(fileComposite, SWT.PUSH);
- resourceURIBrowseFileSystemButton.setText(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_Browse_label"));<%=genModel.getNonNLS()%>
-
- resourceURIBrowseFileSystemButton.addSelectionListener
- (new <%=genModel.getImportedName("org.eclipse.swt.events.SelectionAdapter")%>()
- {
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public void widgetSelected(<%=genModel.getImportedName("org.eclipse.swt.events.SelectionEvent")%> event)
- {
- String[] filters = <%if (!genModel.useGenerics()) {%>(String[])<%}%><%=genPackage.getImportedEditorClassName()%>.FILE_EXTENSION_FILTERS.toArray(new String[<%=genPackage.getImportedEditorClassName()%>.FILE_EXTENSION_FILTERS.size()]);
- String[] files = <%=genModel.getImportedName(genModel.getQualifiedEditorAdvisorClassName())%>.openFilePathDialog(getShell(), <%=genModel.getImportedName("org.eclipse.swt.SWT")%>.SAVE, filters);
- if (files.length > 0)
- {
- fileField.setText(files[0]);
- }
- }
- });
- <%}%>
-<%}%>
- Label containerLabel = new Label(composite, SWT.LEFT);
- {
- containerLabel.setText(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_ModelObject"));<%=genModel.getNonNLS()%>
-
- 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);
- }
-
- <%if (genModel.useGenerics()) {%>
- for (String objectName : getInitialObjectNames())
- {
- initialObjectField.add(getLabel(objectName));
- }
- <%} else {%>
- for (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); )
- {
- initialObjectField.add(getLabel((String)i.next()));
- }
- <%}%>
-
- if (initialObjectField.getItemCount() == 1)
- {
- initialObjectField.select(0);
- }
- initialObjectField.addModifyListener(validator);
-
- Label encodingLabel = new Label(composite, SWT.LEFT);
- {
- encodingLabel.setText(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_XMLEncoding"));<%=genModel.getNonNLS()%>
-
- 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);
- }
-
- <%if (genModel.useGenerics()) {%>
- for (String encoding : getEncodings())
- {
- encodingField.add(encoding);
- }
- <%} else {%>
- for (Iterator i = getEncodings().iterator(); i.hasNext(); )
- {
- encodingField.add((String)i.next());
- }
- <%}%>
-
- encodingField.select(0);
- encodingField.addModifyListener(validator);
-
- setPageComplete(validatePage());
- setControl(composite);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ModifyListener validator =
- new ModifyListener()
- {
- public void modifyText(ModifyEvent e)
- {
- setPageComplete(validatePage());
- }
- };
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected boolean validatePage()
- {
-<%if (genModel.isRichClientPlatform()) {%>
- 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";<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- setErrorMessage(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
- return false;
- }
-
- setErrorMessage(null);
-<%}%>
- return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void setVisible(boolean visible)
- {
- super.setVisible(visible);
- if (visible)
- {
-<%if (!genModel.isRichClientPlatform()) {%>
- if (initialObjectField.getItemCount() == 1)
- {
- initialObjectField.clearSelection();
- encodingField.setFocus();
- }
- else
- {
- encodingField.clearSelection();
- initialObjectField.setFocus();
- }
-<%} else {%>
- initialObjectField.clearSelection();
- encodingField.clearSelection();
- fileField.setFocus();
-<%}%>
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getInitialObjectName()
- {
- String label = initialObjectField.getText();
-
- <%if (genModel.useGenerics()) {%>
- for (String name : getInitialObjectNames())
- <%} else {%>
- for (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); )
- <%}%>
- {
- <%if (!genModel.useGenerics()) {%>
- String name = (String)i.next();
- <%}%>
- if (getLabel(name).equals(label))
- {
- return name;
- }
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getEncoding()
- {
- return encodingField.getText();
- }
-<%if (genModel.isRichClientPlatform()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public URI getFileURI()
- {
- try
- {
- return URI.createFileURI(fileField.getText());
- }
- catch (Exception exception)
- {
- // Ignore
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void selectFileField()
- {
- initialObjectField.clearSelection();
- encodingField.clearSelection();
- fileField.selectAll();
- fileField.setFocus();
- }
-<%}%>
-<%{ String type = genPackage.hasDocumentRoot() ? "feature" : "type"; String prefix = genPackage.hasDocumentRoot() ? "_UI_DocumentRoot_" : "_UI_";%>
-
- /**
- * Returns the label for the specified <%=type%> name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected String getLabel(String <%=type%>Name)
- {
- try
- {
- return <%=genPackage.getEditPluginClassName()%>.INSTANCE.getString("<%=prefix%>" + <%=type%>Name + "_<%=type%>");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- }
- catch(MissingResourceException mre)
- {
- <%=genModel.getImportedName(genModel.getQualifiedEditorPluginClassName())%>.INSTANCE.log(mre);
- }
- return <%=type%>Name;
- }
-<%}%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=_CollectionOfString%> getEncodings()
- {
- if (encodings == null)
- {
- encodings = new <%=_ArrayListOfString%>();
- for (StringTokenizer stringTokenizer = new StringTokenizer(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); )<%=genModel.getNonNLS()%>
- {
- encodings.add(stringTokenizer.nextToken());
- }
- }
- return encodings;
- }
- }
-
- /**
- * The framework calls this to create the contents of the wizard.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public void addPages()
- {
-<%if (!genModel.isRichClientPlatform()) {%>
- // Create a page, set the title, and the initial model file name.
- //
- newFileCreationPage = new <%=genPackage.getModelWizardClassName()%>NewFileCreationPage("Whatever", selection);<%=genModel.getNonNLS()%>
- newFileCreationPage.setTitle(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getModelWizardClassName()%>_label"));<%=genModel.getNonNLS()%>
- newFileCreationPage.setDescription(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getModelWizardClassName()%>_description"));<%=genModel.getNonNLS()%>
- newFileCreationPage.setFileName(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>FilenameDefaultBase") + "." + <%if (!genModel.useGenerics()) {%>(String)<%}%>FILE_EXTENSIONS.get(0));<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- addPage(newFileCreationPage);
-
- // Try and get the resource selection to determine a current directory for the file dialog.
- //
- if (selection != null && !selection.isEmpty())
- {
- // Get the resource...
- //
- Object selectedElement = selection.iterator().next();
- if (selectedElement instanceof IResource)
- {
- // Get the resource parent, if its a file.
- //
- IResource selectedResource = (IResource)selectedElement;
- if (selectedResource.getType() == IResource.FILE)
- {
- selectedResource = selectedResource.getParent();
- }
-
- // This gives us a directory...
- //
- if (selectedResource instanceof IFolder || selectedResource instanceof IProject)
- {
- // Set this for the container.
- //
- newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
-
- // Make up a unique new name here.
- //
- String defaultModelBaseFilename = <%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getEditorClassName()%>FilenameDefaultBase");<%=genModel.getNonNLS()%>
- String defaultModelFilenameExtension = <%if (!genModel.useGenerics()) {%>(String)<%}%>FILE_EXTENSIONS.get(0);
- String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;<%=genModel.getNonNLS()%>
- for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i)
- {
- modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;<%=genModel.getNonNLS()%>
- }
- newFileCreationPage.setFileName(modelFilename);
- }
- }
- }
-<%}%>
- initialObjectCreationPage = new <%=genPackage.getModelWizardClassName()%>InitialObjectCreationPage("Whatever2");<%=genModel.getNonNLS()%>
- initialObjectCreationPage.setTitle(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_<%=genPackage.getModelWizardClassName()%>_label"));<%=genModel.getNonNLS()%>
- initialObjectCreationPage.setDescription(<%=genPackage.getImportedEditorPluginClassName()%>.INSTANCE.getString("_UI_Wizard_initial_object_description"));<%=genModel.getNonNLS()%>
- addPage(initialObjectCreationPage);
- }
-
-<%if (genModel.isRichClientPlatform()) {%>
- /**
- * Get the URI from the page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public URI getModelURI()
- {
- return initialObjectCreationPage.getFileURI();
- }
-
-<%} else {%>
- /**
- * Get the file from the page.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public IFile getModelFile()
- {
- return newFileCreationPage.getModelFile();
- }
-
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Plugin.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Plugin.javajet
deleted file mode 100644
index 4f7650614..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/Plugin.javajet
+++ /dev/null
@@ -1,139 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Plugin" version="$Id: Plugin.javajet,v 1.3 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getEditorPluginPackageName()%>;
-
-<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%>
-<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * This is the central singleton for the <%=genModel.getModelName()%> editor plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class <%=genModel.getEditorPluginClassName()%> extends EMFPlugin
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getEditorPluginClassName()%> INSTANCE = new <%=genModel.getEditorPluginClassName()%>();
-
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Implementation plugin;
-
-<%}%>
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getEditorPluginClassName()%>()
- {
- super
- (new ResourceLocator []
- {
-<%for (String pluginClassName : genModel.getEditResourceDelegateImportedPluginClassNames()) {%>
- <%=pluginClassName%>.INSTANCE,
-<%}%>
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- public ResourceLocator getPluginResourceLocator()
- {
-<%if (genModel.getRuntimePlatform() == GenRuntimePlatform.GWT) {%>
- return null;
-<%} else {%>
- return plugin;
-<%}%>
- }
-
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin()
- {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends <%=genModel.getImportedName("org.eclipse.emf.common.ui.EclipseUIPlugin")%>
- {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
-<%if (genModel.needsRuntimeCompatibility()) {%>
- * @param descriptor the description of the plugin.
-<%}%>
- * @generated
- */
- public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>)
- {
- super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>);
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-<%}%>
-}
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/appengine-web.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/appengine-web.xmljet
deleted file mode 100644
index 004308efe..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/appengine-web.xmljet
+++ /dev/null
@@ -1,24 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="AppEngineWebXML" version="$Id: appengine-web.xmljet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<%@ include file="../Header.xmljetinc"%>
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
- <application><%=genModel.getModelName().toLowerCase().replaceAll("\\s", "-")%>-editor</application>
- <version>1</version>
-</appengine-web-app> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/build.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/build.propertiesjet
deleted file mode 100644
index 14e9c4b5f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/build.propertiesjet
+++ /dev/null
@@ -1,35 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="org.eclipse.emf.codegen.ecore.genmodel.* java.util.*" class="BuildProperties" version="$Id: build.propertiesjet,v 1.3 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<%String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getEditorPluginID()+".jar" : ".";%>
-<%List<String> sourceFolders = genModel.getEditorSourceFolders();%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-bin.includes = <%=pluginClassesLocation%>,\
- icons/,\
-<%if (genModel.isBundleManifest()) {%>
- META-INF/,\
-<%}%>
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
- plugin.xml,\
-<%}%>
- plugin.properties
-jars.compile.order = <%=pluginClassesLocation%>
-<% boolean first=true; for (Iterator<String> i = sourceFolders.iterator(); i.hasNext();) { String sourceFolder = i.next(); if (i.hasNext()){sourceFolder +=",\\";} if (first) {%>
-source.<%=pluginClassesLocation%> = <%=sourceFolder%><%first=false;} else {%><%=sourceFolder%><%}}%>
-output.<%=pluginClassesLocation%> = <%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>bin<%} else {%>war/WEB-INF/classes<%}%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/home.htmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/home.htmljet
deleted file mode 100644
index a8e955409..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/home.htmljet
+++ /dev/null
@@ -1,86 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="HomeHTML" version="$Id: home.htmljet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<!doctype html>
-<html style="height : 100%">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
- <!-- -->
- <!-- Any title is fine -->
- <!-- -->
- <title><%=genModel.getModelName()%> Application</title>
-
- <style TYPE="text/css">
- <!--
- .ToolBar
- {
- background-color: #d0e4f6;
- }
- .ToolBarButton
- {
- float: left;
- margin-top: 5px;
- }
- .ToolBarButtonLeftMargin
- {
- float: left;
- margin-left: 10px;
- margin-top: 5px;
- }
- .Header
- {
- background-color: #628cd5;
- color: #FFFFFF;
- float: left;
- font-weight: bold;
- font-size: xx-large;
- }
- .HeaderLabel
- {
- float: left;
- margin-left: 10px;
- }
- .PropertiesTitle
- {
- background-color: #628cd5;
- color: #FFFFFF;
- font-weight: bold;
- font-size: large;
- }
- .PropertiesTitleLabel
- {
- float: left;
- margin-left: 5px;
- }
- -->
- </style>
-
- <!-- -->
- <!-- This script loads your compiled module. -->
- <!-- If you add any GWT meta tags, they must -->
- <!-- be added before this line. -->
- <script type="text/javascript" language="javascript" src="<%=genModel.getQualifiedEditorModuleName()%>/<%=genModel.getQualifiedEditorModuleName()%>.nocache.js"></script>
- </head>
-
- <body style="height : 100%">
- <div id="main" style="height : 100%">
- </div>
- </body>
-</html>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/manifest.mfjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/manifest.mfjet
deleted file mode 100644
index 392b5d632..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/manifest.mfjet
+++ /dev/null
@@ -1,80 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.3 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: <%=genModel.getEditorPluginID()%>;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getEditorPluginID()%>.jar<%}else{%>.<%}%>
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
-Bundle-Activator: <%=genModel.getQualifiedEditorPluginClassName()%>$Implementation
-<%}%>
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-<%}%>
-<%Iterator<String> packagesIterator = genModel.getEditorQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
-Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
- <%=pack%><%}%>
-<%}%>
-<%Iterator<String> requiredPluginIterator = genModel.getEditorRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
-Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
- <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
-<%}%>
-<%if (genModel.isRichAjaxPlatform()) {%>
-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.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.views,
- org.eclipse.ui.views.contentoutline,
- org.eclipse.ui.views.properties;ui.views="split"
-<%}%>
-<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
-Eclipse-LazyStart: true
-<%}%>
-Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/module.gwt.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/module.gwt.xmljet
deleted file mode 100644
index fabb43773..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/module.gwt.xmljet
+++ /dev/null
@@ -1,35 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ModuleGWTXML" version="$Id: module.gwt.xmljet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd">
-
-<%@ include file="../Header.xmljetinc"%>
-
-<module>
- <inherits name='com.google.gwt.user.theme.standard.Standard'/>
-<%for (String inherits : genModel.getEditorModuleInherits()) {%>
- <inherits name="<%=inherits%>" />
-<%}%>
-
- <entry-point class='<%=genModel.getQualifiedEditorEntryPointClassName()%>'/>
-
-<%for (String source : genModel.getEditorModuleSources()) {%>
- <source path="<%=source%>"/>
-<%}%>
-</module> \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.propertiesjet
deleted file mode 100644
index 060ffec29..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.propertiesjet
+++ /dev/null
@@ -1,118 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginProperties" version="$Id: plugin.propertiesjet,v 1.3 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-pluginName = <%=genModel.getModelName()%> Editor
-providerName = www.example.org
-<%if (genModel.getRuntimePlatform() != GenRuntimePlatform.GWT) {%>
-
-<%boolean hasMultiPageEditor = false;%>
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {if (genPackage.isMultipleEditorPages()) { hasMultiPageEditor = true; }%>
-_UI_<%=genPackage.getEditorClassName()%>_menu = &<%=genPackage.getPrefix()%> Editor
-<%}%>
-
-<%if (genModel.isCreationCommands()) {%>
-_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
-<%if (hasMultiPageEditor) {%>
-_UI_ParentPage_label = Parent
-_UI_ListPage_label = List
-_UI_TreePage_label = Tree
-_UI_TablePage_label = Table
-_UI_TreeWithColumnsPage_label = Tree with Columns
-_UI_ObjectColumn_label = Object
-_UI_SelfColumn_label = Self
-<%}%>
-
-_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}"
-
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (genPackage.isGenerateModelWizard()) {%>
-_UI_<%=genPackage.getModelWizardClassName()%>_label = <%=genPackage.getPrefix()%> Model
-_UI_<%=genPackage.getModelWizardClassName()%>_description = Create a new <%=genPackage.getPrefix()%> model
-
- <%}%>
-_UI_<%=genPackage.getEditorClassName()%>_label = <%=genPackage.getPrefix()%> Model Editor
-
-_UI_<%=genPackage.getEditorClassName()%>FilenameDefaultBase = My
-_UI_<%=genPackage.getEditorClassName()%>FilenameExtensions = <%=genPackage.isMultipleFileExtensions() ? genPackage.getFileExtensions() : genPackage.getFileExtension()%>
-
-<%}%>
-_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 = <%=genModel.getXMLEncodingChoices()%>
-<%if (genModel.isRichClientPlatform()) {%>
-_UI_Wizard_initial_object_description = Specify a file name and select a model object to create
-<%} else {%>
-_UI_Wizard_initial_object_description = 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?
-
-<%if (genModel.isRichClientPlatform()) {%>
-_UI_<%=genModel.getEditorAdvisorClassName()%>_ActionSet_label = <%=genModel.getModelName()%> Action Set
-_UI_Perspective_label = <%=genModel.getModelName()%>
-
-_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 = <%=genModel.getModelName()%> 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 = <%=genModel.getModelName()%> &About...
-_UI_About_title = <%=genModel.getModelName()%> Application
-_UI_About_text = <%=genModel.getModelName()%> Application about box goes here.
-
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {if (genPackage.isGenerateModelWizard()) {%>
-_UI_<%=genPackage.getModelWizardClassName()%>_ActionSet_label = <%=genPackage.getPrefix()%> Model Action Set
-<%}}%>
-
-<%}%>
-<%}%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.xmljet
deleted file mode 100644
index 376079160..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/plugin.xmljet
+++ /dev/null
@@ -1,253 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<%@ include file="../Header.xmljetinc"%>
-
-<%if (genModel.isBundleManifest()) {%>
-<plugin>
-<%} else {%>
-<plugin
- name="%pluginName"
- id="<%=genModel.getEditorPluginID()%>"
- version="1.0.0"
- provider-name="%providerName"
- class="<%=genModel.getQualifiedEditorPluginClassName()%>$Implementation">
-
- <requires>
- <%for (String pluginID : genModel.getEditorRequiredPlugins()) { %>
- <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
- <%}%>
- </requires>
-
- <runtime>
- <%if (genModel.isRuntimeJar()) {%>
- <library name="<%=genModel.getEditorPluginID()%>.jar">
- <%} else {%>
- <library name=".">
- <%}%>
- <export name="*"/>
- </library>
- </runtime>
-<%}%>
-<%if (genModel.sameEditEditorProject()) {%>
- <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (!genPackage.getGenClasses().isEmpty()) {%>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri="<%=genPackage.getNSURI()%>"
- class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>"
- supportedTypes=
- <%for (ListIterator<?> j = genPackage.getProviderSupportedTypes().listIterator(); j.hasNext(); ) {%>
- <%=j.hasPrevious() ? " " : "\""%><%=j.next()%><%if (!j.hasNext()) {%>"/><%}%>
- <%}%>
- </extension>
- <%if (genPackage.isChildCreationExtenders()) { Map<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> extendedChildCreationData = genPackage.getExtendedChildCreationData();%>
- <%if (!extendedChildCreationData.isEmpty()) {%>
-
- <extension point="org.eclipse.emf.edit.childCreationExtenders">
- <%for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> entry : extendedChildCreationData.entrySet()) {%>
- <extender
- uri="<%=entry.getKey().getNSURI()%>"
- class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>$<%=genPackage.getChildCreationExtenderName(entry.getKey())%>"/>
- <%}%>
- </extension>
- <%}%>
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%if (genModel.sameModelEditorProject()) {%>
- <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="<%=genPackage.getNSURI()%>"
- <%if (genModel.hasLocalGenModel()) {%>
- class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
- genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
- <%} else {%>
- class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
- <%}%>
- </extension>
- <%if (genPackage.isContentType()) {%>
-
- <extension point="org.eclipse.emf.ecore.content_parser">
- <parser
- contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
- class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
- </extension>
-
- <extension point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
- file-extensions="<%=genPackage.getFileExtensions()%>"
- id="<%=genPackage.getContentTypeIdentifier()%>"
- name="%_UI_<%=genPackage.getPrefix()%>_content_type"
- priority="normal">
- <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
- <%if (genPackage.hasTargetNamespace()) {%>
- <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
- <%}%>
- <%if (genPackage.isXMIResource()) {%>
- <parameter name="kind" value="xmi"/>
- <%}%>
- </describer>
- </content-type>
- </extension>
- <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="<%=genPackage.getFileExtension()%>"
- class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
- </extension>
- <%}%>
- <%}%>
-<%}%>
-<%if (genModel.isRichClientPlatform()) {%>
-
- <extension
- point="org.eclipse.core.runtime.applications"
- id="<%=genModel.getEditorAdvisorClassName()%>Application">
- <application>
- <run class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$Application"/>
- </application>
- </extension>
-
- <extension point="org.eclipse.ui.perspectives">
- <perspective
- name="%_UI_Perspective_label"
- class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$Perspective"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>Perspective">
- </perspective>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <command
- name="%_UI_Menu_OpenURI_label"
- description="%_UI_Menu_OpenURI_description"
- categoryId="org.eclipse.ui.category.file"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"/>
- <%if (!genModel.isRichAjaxPlatform()) {%>
- <command
- name="%_UI_Menu_Open_label"
- description="%_UI_Menu_Open_description"
- categoryId="org.eclipse.ui.category.file"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"/>
- <%}%>
- </extension>
-
-<%if (!genModel.isRichAjaxPlatform()) {%>
- <extension point="org.eclipse.ui.bindings">
- <key
- commandId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"
- sequence="M1+U"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- <key
- commandId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"
- sequence="M1+O"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- </extension>
-<%}%>
-
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- label="%_UI_<%=genModel.getEditorAdvisorClassName()%>_ActionSet_label"
- visible="true"
- id="<%=genModel.getEditorAdvisorClassName()%>ActionSet">
- <action
- label="%_UI_Menu_About_label"
- class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$AboutAction"
- menubarPath="help/additions"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>AboutAction"/>
- <action
- label="%_UI_Menu_OpenURI_label"
- definitionId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"
- class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$OpenURIAction"
- menubarPath="file/additions"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURIAction"/>
- <%if (!genModel.isRichAjaxPlatform()) {%>
- <action
- label="%_UI_Menu_Open_label"
- definitionId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"
- class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$OpenAction"
- menubarPath="file/additions"
- id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenAction"/>
- <%}%>
- </actionSet>
- </extension>
-<%}%>
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (genPackage.hasConcreteClasses()){%>
- <%if (genPackage.isGenerateModelWizard()) {%>
- <%if (genModel.isRichClientPlatform()) {%>
-
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- label="%_UI_<%=genPackage.getModelWizardClassName()%>_ActionSet_label"
- visible="true"
- id="<%=genPackage.getQualifiedActionBarContributorClassName()%>ActionSet">
- <action
- label="%_UI_<%=genPackage.getModelWizardClassName()%>_label"
- class="<%=genPackage.getQualifiedActionBarContributorClassName()%>$NewAction"
- menubarPath="file/new/additions"
- id="<%=genPackage.getQualifiedActionBarContributorClassName()%>NewAction"/>
- </actionSet>
- </extension>
- <%} else {%>
-
- <extension point="org.eclipse.ui.newWizards">
- <category
- id="org.eclipse.emf.ecore.Wizard.category.ID"
- name="%_UI_Wizard_category"/>
- <wizard
- id="<%=genPackage.getQualifiedModelWizardClassName()%>ID"
- name="%_UI_<%=genPackage.getModelWizardClassName()%>_label"
- class="<%=genPackage.getQualifiedModelWizardClassName()%>"
- category="org.eclipse.emf.ecore.Wizard.category.ID"
- icon="icons/full/obj16/<%=genPackage.getPrefix()%>ModelFile.gif">
- <description>%_UI_<%=genPackage.getModelWizardClassName()%>_description</description>
- <selection class="org.eclipse.core.resources.IResource"/>
- </wizard>
- </extension>
- <%}%>
- <%}%>
-
- <extension point="org.eclipse.ui.editors">
- <editor
- id="<%=genPackage.getQualifiedEditorClassName()%>ID"
- name="%_UI_<%=genPackage.getEditorClassName()%>_label"
- icon="icons/full/obj16/<%=genPackage.getPrefix()%>ModelFile.gif"
- <%if (!genPackage.isContentType()) {%>
- extensions="<%=genPackage.getFileExtension()%>"
- <%}%>
- class="<%=genPackage.getQualifiedEditorClassName()%>"
- contributorClass="<%=genPackage.getQualifiedActionBarContributorClassName()%>">
- <%if (genPackage.isContentType()) {%>
- <contentTypeBinding contentTypeId="<%=genPackage.getQualifiedContentTypeIdentifier()%>"/>
- <%}%>
- </editor>
- </extension>
- <%}%>
-<%}%>
-
-</plugin>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/web.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/web.xmljet
deleted file mode 100644
index 39726356a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/editor/web.xmljet
+++ /dev/null
@@ -1,36 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="WebXML" version="$Id: web.xmljet,v 1.2 2011/02/01 15:53:14 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<%@ include file="../Header.xmljetinc"%>
-<web-app>
- <servlet>
- <servlet-name>uriServlet</servlet-name>
- <servlet-class>org.eclipse.emf.server.ecore.resource.URIServiceImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>uriServlet</servlet-name>
- <url-pattern>/<%=genModel.getQualifiedEditorModuleName()%>/uriService</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file><%=genModel.getEditorHomePageName()%>.html</welcome-file>
- </welcome-file-list>
-</web-app>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/emf-merge.xml b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/emf-merge.xml
deleted file mode 100644
index c6d592a52..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/emf-merge.xml
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<merge:options
- indent=" "
- braceStyle="matching"
- redirect="Gen"
- block="\s*@\s*generated\s*NOT\s*(?:\n\r?|\r\n?)"
- noImport="\s*//\s*import\s+([\w.*]*)\s*;\s*(?:\n\r?|\r\n?)"
- xmlns:merge="http://www.eclipse.org/org/eclipse/emf/codegen/jmerge/Options">
-
-<!-- Tabbed Standard
-
- indent="&#x9;"
- braceStyle="standard"
-
--->
-
- <!-- this accepts both new and old style markup. -->
-
- <merge:dictionaryPattern
- name="modelMembers"
- select="Member/getComment"
- match="@\s*(model)"/>
-
- <merge:dictionaryPattern
- name="generatedUnmodifiableMembers"
- select="Member/getComment"
- match="@\s*(gen)erated\s*(This field/method[^(?:\n\r?|\r\n?)]*)*(?:\n\r?|\r\n?)"/>
-
- <merge:dictionaryPattern
- name="generatedModifiableMembers"
- select="Member/getComment"
- match="@\s*generated\s*(modifiable)\s*(?:\n\r?|\r\n?)"/>
-
- <!-- This is like the above, but for backward compatibility -->
- <merge:dictionaryPattern
- name="generatedLastGenMembers"
- select="Member/getComment"
- match="@\s*(lastgen).*(?:\n\r?|\r\n?)"/>
-
- <merge:dictionaryPattern
- name="orderedMembers"
- select="Member/getComment"
- match="@\s*(ordered)\s*(?:\n\r?|\r\n?)"/>
-
- <!-- Only push Annotations for the Members marked by gen-->
- <merge:push targetParentMarkup="^gen$" select="Annotation"/>
-
- <merge:pull
- sourceMarkup="^modifiable$"
- sourceGet="Member/getComment"
- sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)(?:\n\r?|\r\n?)"
- targetMarkup="^modifiable$"
- targetPut="Member/setComment"/>
- <merge:pull
- sourceMarkup="^gen$"
- sourceGet="Member/getComment"
- sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)(?:\n\r?|\r\n?)"
- targetMarkup="^gen$"
- targetPut="Member/setComment"/>
- <merge:pull
- sourceGet="Member/getFlags"
- targetMarkup="^gen$"
- equals="Member/getName"
- targetPut="Member/setFlags"/>
-
- <merge:pull
- sourceMarkup="^gen$"
- sourceGet="AbstractType/getComment"
- sourceTransfer="(\s*&lt;!--\s*begin-user-doc.*?end-user-doc\s*-->\s*)(?:\n\r?|\r\n?)"
- targetMarkup="^modifiable$"
- targetPut="AbstractType/setComment"/>
-
- <merge:pull
- sourceGet="Type/getTypeParameters"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
- targetPut="Type/setTypeParameters"/>
- <merge:pull
- sourceGet="Type/getSuperclass"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
- targetPut="Type/setSuperclass"/>
- <merge:pull
- sourceGet="Type/getSuperInterfaces"
- sourceTransfer="(\s*@\s*extends|\s*@\s*implements)(.*?)(?:&lt;!--|(?:\n\r?|\r\n?))"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
- targetPut="Type/addSuperInterface"/>
-
- <merge:pull
- sourceGet="Enum/getSuperInterfaces"
- sourceTransfer="(\s*@\s*extends|\s*@\s*implements)(.*?)(?:&lt;!--|(?:\n\r?|\r\n?))"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
- targetPut="Enum/addSuperInterface"/>
-
- <merge:pull
- sourceGet="EnumConstant/getArguments"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$"
- targetPut="EnumConstant/setArguments"/>
- <merge:pull
- sourceGet="EnumConstant/getBody"
- targetMarkup="^lastgen$|^gen$|^modifiable$|^model$$"
- targetPut="EnumConstant/setBody"/>
-
- <merge:pull
- sourceGet="AnnotationTypeMember/getType"
- targetMarkup="^gen$"
- targetPut="AnnotationTypeMember/setType"/>
- <merge:pull
- sourceGet="AnnotationTypeMember/getDefaultValue"
- targetMarkup="^gen$"
- targetPut="AnnotationTypeMember/setDefaultValue"/>
-
- <merge:pull
- sourceGet="Initializer/getBody"
- targetMarkup="^gen$"
- targetPut="Initializer/setBody"/>
-
- <merge:pull
- sourceGet="Field/getType"
- targetMarkup="^gen$"
- targetPut="Field/setType"/>
- <merge:pull
- sourceGet="Field/getInitializer"
- targetMarkup="^gen$"
- targetPut="Field/setInitializer"/>
-
- <merge:pull
- sourceGet="Method/getTypeParameters"
- targetMarkup="^gen$"
- targetPut="Method/setTypeParameters"/>
- <merge:pull
- sourceGet="Method/getReturnType"
- targetMarkup="^gen$|^model$"
- targetPut="Method/setReturnType"/>
- <merge:pull
- sourceGet="Method/getParameters"
- targetMarkup="^gen$"
- targetPut="Method/setParameters"/>
- <merge:pull
- sourceGet="Method/getBody"
- targetMarkup="^gen$"
- targetPut="Method/setBody"/>
- <merge:pull
- sourceGet="Method/getExceptions"
- targetMarkup="^gen$"
- targetPut="Method/addException"/>
-
- <merge:sweep markup="^gen$" select="Member"/>
- <merge:sweep markup="^org.eclipse.emf.ecore.EMetaObject$" select="Import"/>
- <merge:sweep markup="^org.eclipse.emf.ecore.impl.EMetaObjectImpl$" select="Import"/>
- <merge:sweep markup="^org.eclipse.emf.ecore.util.EObjectCompositeEList$" select="Import"/>
- <merge:sweep markup="^org.eclipse.emf.ecore.util.EObjectCompositeWithInverseEList$" select="Import"/>
- <merge:sweep markup="^org.eclipse.emf.common.util.AbstractEnumerator$" select="Import"/>
-
- <merge:sort markup="^ordered$" select="Field"/>
- <merge:sort markup="^ordered$" select="EnumConstant"/>
-
-<!-- Basic Rules
-
- <merge:pull
- sourceGet="CompilationUnit/getHeader"
- targetPut="CompilationUnit/setHeader"/>
-
- <merge:pull
- sourceGet="Package/getName"
- targetPut="Package/setName"/>
-
- <merge:pull
- sourceGet="Member/getFlags"
- targetPut="Member/setFlags"/>
- <merge:pull
- sourceGet="Member/getComment"
- targetPut="Member/setComment"/>
-
- <merge:pull
- sourceGet="Type/getSuperclass"
- targetPut="Type/setSuperclass"/>
- <merge:pull
- sourceGet="Type/getSuperInterfaces"
- targetPut="Type/addSuperInterface"/>
-
- <merge:pull
- sourceGet="Initializer/getBody"
- targetPut="Initializer/setBody"/>
-
- <merge:pull
- sourceGet="Field/getType"
- targetPut="Field/setType"/>
- <merge:pull
- sourceGet="Field/getInitializer"
- targetPut="Field/setInitializer"/>
-
- <merge:pull
- sourceGet="Method/getBody"
- targetPut="Method/setBody"/>
- <merge:pull
- sourceGet="Method/getReturnType"
- targetPut="Method/setReturnType"/>
- <merge:pull
- sourceGet="Method/getExceptions"
- targetPut="Method/addException"/>
--->
-
-<!-- Push Enum Constants only for generated Enums -->
-<!--
- <merge:push targetParentMarkup="^gen$" select="EnumConstant"/>
--->
-
-<!-- Push Annotation Type Members only for generated Annotation Types -->
-<!--
- <merge:push targetParentMarkup="^gen$" select="AnnotationTypeMember"/>
--->
-
-<!-- Sets the content of annotations if the parent is marked with gen -->
-<!--
- <merge:pull
- sourceGet="Annotation/getContents"
- targetParentMarkup="^gen$"
- targetPut="Annotation/setContents"/>
--->
-
-<!-- Remove annotations of generated target nodes if the annotation is not in the source -->
-<!--
- <merge:sweep parentMarkup="^gen$" select="Annotation"/>
--->
-
-<!--
- <merge:pull
- sourceMarkup="^modifiable$"
- sourceGet="Member/getComment"
- targetMarkup="^gen$"
- targetPut="Member/setComment"/>
--->
-
-</merge:options>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/ModelTestSuite.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/ModelTestSuite.javajet
deleted file mode 100644
index 2ac6e0a6b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/ModelTestSuite.javajet
+++ /dev/null
@@ -1,79 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ModelTestSuite" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genModel.getTestSuitePackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b><%=genModel.getModelName()%></b></em>' model.
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genModel.getTestSuiteClassName()%> extends <%=genModel.getImportedName("junit.framework.TestSuite")%>
-{
-<%if (genModel.hasCopyrightField()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-<%}%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args)
- {
- <%=genModel.getImportedName("junit.textui.TestRunner")%>.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static <%=genModel.getImportedName("junit.framework.Test")%> suite()
- {
- <%=genModel.getImportedName("junit.framework.TestSuite")%> suite = new <%=genModel.getTestSuiteClassName()%>("<%=genModel.getModelName()%> Tests");<%=genModel.getNonNLS()%>
-<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
- <%if (genPackage.hasTests()) {%>
- suite.addTest(<%=genModel.getImportedName(genPackage.getImportedTestSuiteClassName())%>.suite());
- <%}%>
-<%}%>
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getTestSuiteClassName()%>(String name)
- {
- super(name);
- }
-
-} //<%=genModel.getTestSuiteClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageExample.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageExample.javajet
deleted file mode 100644
index 7b4607518..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageExample.javajet
+++ /dev/null
@@ -1,205 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="PackageExample" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005-2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel = genPackage.getGenModel();%>
-<%
-String _System = genModel.getImportedName("java.lang.System");
-String _String = genModel.getImportedName("java.lang.String");
-String _RuntimeException = genModel.getImportedName("java.lang.RuntimeException");
-String _File = genModel.getImportedName("java.io.File");
-String _Iterator = null;
-if (!genModel.useGenerics()) {
- _Iterator = genModel.getImportedName("java.util.Iterator");
-}
-String _Diagnostic = genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic");
-String _URI = genModel.getImportedName("org.eclipse.emf.common.util.URI");
-String _EObject = genModel.getImportedName("org.eclipse.emf.ecore.EObject");
-String _Diagnostician = genModel.getImportedName("org.eclipse.emf.ecore.util.Diagnostician");
-String _Resource = genModel.getImportedName("org.eclipse.emf.ecore.resource.Resource");
-String _ResourceSet = genModel.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet");
-String _ResourceSetImpl = genModel.getImportedName("org.eclipse.emf.ecore.resource.impl.ResourceSetImpl");
-%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getTestsPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * A sample utility for the '<em><b><%=genPackage.getPackageName()%></b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getExampleClassName()%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=_String%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * <!-- begin-user-doc -->
- * Load all the argument file paths or URIs as instances of the model.
- * <!-- end-user-doc -->
- * @param args the file paths or URIs.
- * @generated
- */
- public static void main(String[] args)
- {
- // Create a resource set to hold the resources.
- //
- <%=_ResourceSet%> resourceSet = new <%=_ResourceSetImpl%>();
-
-<%if (genPackage.isContentType()) {%>
- // Register the appropriate resource factory to handle the content type.
- //
- resourceSet.getResourceFactoryRegistry().getContentTypeToFactoryMap().put
- (<%=genPackage.getImportedPackageInterfaceName()%>.eCONTENT_TYPE,
- new <%=genModel.getImportedName(genPackage.getQualifiedEffectiveResourceFactoryClassName())%>());
-
- // Register the appropriate content handler for all file extensions and any element from the package's namespace.
- //
- resourceSet.getURIConverter().getContentHandlers().add
- (new <%=genModel.getImportedName("org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl")%>(<%=genPackage.getImportedPackageInterfaceName()%>.eCONTENT_TYPE, null, null, <%if (genPackage.hasTargetNamespace()) {%><%=genPackage.getImportedPackageInterfaceName()%>.eNS_URI<%} else {%>(<%=_String%>)null<%}%>, null));
-<%} else {%>
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
- (Resource.Factory.Registry.DEFAULT_EXTENSION,
- new <%=genModel.getImportedName(genPackage.getQualifiedEffectiveResourceFactoryClassName())%>());
-<%}%>
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put
- (<%=genPackage.getImportedPackageInterfaceName()%>.eNS_URI,
- <%=genPackage.getImportedPackageInterfaceName()%>.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0)
- {
-<%if (genPackage.getRootClass() != null) { GenClass rootClass = genPackage.getRootClass();%>
- System.out.println("Enter a list of file paths or URIs that have content like this:");<%=genModel.getNonNLS()%>
- try
- {
- <%if (genPackage.isContentType()) {%>
- <%=_Resource%> resource = resourceSet.createResource(<%=_URI%>.createURI("http:///My.<%=genPackage.getFileExtension()%>"), <%=genPackage.getImportedPackageInterfaceName()%>.eCONTENT_TYPE);<%=genModel.getNonNLS()%>
- <%} else {%>
- <%=_Resource%> resource = resourceSet.createResource(<%=_URI%>.createURI("http:///My.<%=genPackage.getFileExtension()%>"));<%=genModel.getNonNLS()%>
- <%}%>
- <%if (genPackage.getRootFeature() != null) { GenFeature rootFeature = genPackage.getRootFeature(); GenClass documentRoot = rootFeature.getGenClass();%>
- <%=documentRoot.getImportedInterfaceName()%> documentRoot = <%=genPackage.getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=documentRoot.getName()%>();
- <%=rootClass.getImportedInterfaceName()%> root = <%=rootClass.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=rootClass.getName()%>();
- <%if (documentRoot.isDynamic()) {%>
- documentRoot.eSet(<%=rootFeature.getQualifiedFeatureAccessor()%>, root);
- <%} else {%>
- documentRoot.set<%=rootFeature.getCapName()%>(root);
- <%}%>
- resource.getContents().add(<%if (!documentRoot.isEObjectExtension()){%>(<%=_EObject%>)<%}%>documentRoot);
- <%} else {%>
- <%=rootClass.getImportedInterfaceName()%><%=rootClass.getInterfaceWildTypeArguments()%> root = <%=rootClass.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=rootClass.getName()%>();
- resource.getContents().add(<%if (!rootClass.isEObjectExtension()){%>(<%=_EObject%>)<%}%>root);
- <%}%>
- resource.save(<%=_System%>.out, null);
- }
- catch (<%=genModel.getImportedName("java.io.IOException")%> exception)
- {
- exception.printStackTrace();
- }
-<%} else {%>
- System.out.println("Enter a list of file paths or URIs");
-<%}%>
- }
- else
- {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i)
- {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- <%=_File%> file = new <%=_File%>(args[i]);
- <%=_URI%> uri = file.isFile() ? <%=_URI%>.createFileURI(file.getAbsolutePath()): URI.createURI(args[i]);
-
- try
- {
- // Demand load resource for this file.
- //
- <%=_Resource%> resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);<%=genModel.getNonNLS()%>
-
- // Validate the contents of the loaded resource.
- //
-<%if (genModel.useGenerics()) {%>
- for (<%=_EObject%> eObject : resource.getContents())
-<%} else {%>
- for (<%=_Iterator%> j = resource.getContents().iterator(); j.hasNext(); )
-<%}%>
- {
-<%if (!genModel.useGenerics()) {%>
- <%=_EObject%> eObject = (<%=_EObject%>)j.next();
-<%}%>
- <%=_Diagnostic%> diagnostic = <%=_Diagnostician%>.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK)
- {
- printDiagnostic(diagnostic, "");<%=genModel.getNonNLS()%>
- }
- }
- }
- catch (<%=_RuntimeException%> exception)
- {
- System.out.println("Problem loading " + uri);<%=genModel.getNonNLS()%>
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * Prints diagnostics with indentation.
- * <!-- end-user-doc -->
- * @param diagnostic the diagnostic to print.
- * @param indent the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent)
- {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
-<%if (genModel.useGenerics()) {%>
- for (Diagnostic child : diagnostic.getChildren())
- {
- printDiagnostic(child, indent + " ");<%=genModel.getNonNLS()%>
- }
-<%} else {%>
- for (Iterator i = diagnostic.getChildren().iterator(); i.hasNext(); )
- {
- printDiagnostic((Diagnostic)i.next(), indent + " ");<%=genModel.getNonNLS()%>
- }
-<%}%>
- }
-
-} //<%=genPackage.getExampleClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageTestSuite.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageTestSuite.javajet
deleted file mode 100644
index 051e9cc3e..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/PackageTestSuite.javajet
+++ /dev/null
@@ -1,79 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PackageTestSuite" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel = genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getTestsPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b><%=genPackage.getPackageName()%></b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class <%=genPackage.getTestSuiteClassName()%> extends <%=genModel.getImportedName("junit.framework.TestSuite")%>
-{
-<%if (genModel.hasCopyrightField()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-<%}%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args)
- {
- <%=genModel.getImportedName("junit.textui.TestRunner")%>.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static <%=genModel.getImportedName("junit.framework.Test")%> suite()
- {
- <%=genModel.getImportedName("junit.framework.TestSuite")%> suite = new <%=genPackage.getTestSuiteClassName()%>("<%=genPackage.getPackageName()%> Tests");<%=genModel.getNonNLS()%>
-<%for (GenClass genClass : genPackage.getGenClasses()) {%>
- <%if (!genClass.isExternalInterface() && !genClass.isAbstract() && genClass.hasTests()) {%>
- suite.addTestSuite(<%=genClass.getImportedTestCaseClassName()%>.class);
- <%}%>
-<%}%>
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getTestSuiteClassName()%>(String name)
- {
- super(name);
- }
-
-} //<%=genPackage.getTestSuiteClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/TestCase.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/TestCase.javajet
deleted file mode 100644
index bcd2c461a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/TestCase.javajet
+++ /dev/null
@@ -1,318 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="TestCase" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenClass genClass = (GenClass)argument; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getTestsPackageName()%>;
-
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
- * <!-- end-user-doc -->
-<%if (!genClass.getImplementedGenFeatures().isEmpty()) { boolean first = true;%>
- <%for (GenFeature genFeature : genClass.getImplementedGenFeatures()) {%>
- <%if (genFeature.isTested() && !genFeature.isSuppressedGetVisibility()) {%>
- <%if (first) { first = false;%>
- * <p>
- * The following features are tested:
- * <ul>
- <%}%>
- * <li>{@link <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}</li>
- <%}%>
- <%}%>
- <% if (!first) {%>
- * </ul>
- * </p>
- <%}%>
-<%}%>
-<%if (!genClass.getImplementedGenOperations().isEmpty()) { boolean first = true;%>
- <%for (GenOperation genOperation : genClass.getImplementedGenOperations()) {%>
- <%if (first) { first = false;%>
- * <p>
- * The following operations are tested:
- * <ul>
- <%}%>
- * <li>{@link <%=genOperation.getGenClass().getQualifiedInterfaceName()%>#<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>) <em><%=genOperation.getFormattedName()%></em>}</li>
- <%}%>
- <% if (!first) {%>
- * </ul>
- * </p>
- <%}%>
-<%}%>
- * @generated
- */
-public<%if (genClass.isAbstract()) {%> abstract<%}%> class <%=genClass.getTestCaseClassName()%> extends <%=genClass.isModelRoot() ? genModel.getImportedName("junit.framework.TestCase") : genClass.getClassExtendsGenClass().getImportedTestCaseClassName()%>
-{
-<%if (genModel.hasCopyrightField()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-<%}%>
-<%if (genModel.getDriverNumber() != null) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> mofDriverNumber = "<%=genModel.getDriverNumber()%>";<%=genModel.getNonNLS()%>
-<%}%>
-<%if (genClass.isModelRoot()) {%>
-
- /**
- * The fixture for this <%=genClass.getFormattedName()%> test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%> fixture = null;
-<%}%>
-<%if (!genClass.isAbstract()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args)
- {
- <%=genModel.getImportedName("junit.textui.TestRunner")%>.run(<%=genClass.getTestCaseClassName()%>.class);
- }
-<%}%>
-
- /**
- * Constructs a new <%=genClass.getFormattedName()%> test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genClass.getTestCaseClassName()%>(String name)
- {
- super(name);
- }
-<%if (genClass.isModelRoot()) {%>
-
- /**
- * Sets the fixture for this <%=genClass.getFormattedName()%> test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%> fixture)
- {
- this.fixture = fixture;
- }
-<%}%>
-
- /**
- * Returns the fixture for this <%=genClass.getFormattedName()%> test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (!genClass.isModelRoot() && genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- <%if (genModel.useGenerics()) {%>protected<%} else {%>private<%}%> <%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%> getFixture()
- {
-<%if (genClass.isModelRoot()) {%>
- return fixture;
-<%} else {%>
- return (<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)fixture;
-<%}%>
- }
-<%if (!genClass.isAbstract()) {%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
-<%if (genModel.useGenerics() && genClass.isMapEntry()) {%>
- @SuppressWarnings("unchecked")
-<%}%>
- protected void setUp() throws Exception
- {
- <%if (genClass.isMapEntry()) {%>
- setFixture((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)<%=genPackage.getQualifiedEFactoryInternalInstanceAccessor()%>.create(<%=genClass.getQualifiedClassifierAccessor()%>));
- <%} else {%>
- setFixture(<%=genPackage.getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=genClass.getName()%>());
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
-<%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
-<%}%>
- protected void tearDown() throws Exception
- {
- setFixture(null);
- }
-<%}%>
-<%for (GenFeature genFeature : genClass.getImplementedGenFeatures()) {%>
-<%@ include file="TestCase/implementedGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (genFeature.isTested()) {%>
- <%if (genFeature.isGet() && !genFeature.isSuppressedGetVisibility()) {%>
-<%@ include file="TestCase/getGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-
- /**
- * Tests the '{@link <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' feature getter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%>()
- * @generated
- */
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //TestCase/getGenFeature.annotations.insert.javajetinc%>
-<%@ include file="TestCase/getGenFeature.annotations.insert.javajetinc" fail="silent" %>
- <%}%>
- public void test<%=genModel.capName(genFeature.getGetAccessor())%>()
- {
-<%@ include file="TestCase/getGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this feature getter test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
-<%@ end %><%//TestCase/getGenFeature.todo.override.javajetinc%>
- }
-<%@ end %><%//TestCase/getGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isSet() && !genFeature.isSuppressedSetVisibility()) {%>
-<%@ include file="TestCase/setGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-
- /**
- * Tests the '{@link <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#set<%=genFeature.getAccessorName()%>(<%=genFeature.getRawBoundType()%>) <em><%=genFeature.getFormattedName()%></em>}' feature setter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#set<%=genFeature.getAccessorName()%>(<%=genFeature.getRawBoundType()%>)
- * @generated
- */
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //TestCase/setGenFeature.annotations.insert.javajetinc%>
-<%@ include file="TestCase/setGenFeature.annotations.insert.javajetinc" fail="silent" %>
- <%}%>
- public void testSet<%=genFeature.getAccessorName()%>()
- {
-<%@ include file="TestCase/setGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this feature setter test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
-<%@ end %><%//TestCase/setGenFeature.todo.override.javajetinc%>
- }
-<%@ end %><%//TestCase/setGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isUnset() && !genFeature.isSuppressedUnsetVisibility()) {%>
-<%@ include file="TestCase/unsetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-
- /**
- * Tests the '{@link <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#unset<%=genFeature.getAccessorName()%>() <em>unset<%=genFeature.getAccessorName()%>()</em>}' method.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#unset<%=genFeature.getAccessorName()%>()
- * @generated
- */
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //TestCase/unsetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="TestCase/unsetGenFeature.annotations.insert.javajetinc" fail="silent" %>
- <%}%>
- public void testUnset<%=genFeature.getAccessorName()%>()
- {
-<%@ include file="TestCase/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
-<%@ end %><%//TestCase/unsetGenFeature.todo.override.javajetinc%>
- }
-<%@ end %><%//TestCase/unsetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isIsSet() && !genFeature.isSuppressedIsSetVisibility()) {%>
-<%@ include file="TestCase/isSetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-
- /**
- * Tests the '{@link <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#isSet<%=genFeature.getAccessorName()%>() <em>isSet<%=genFeature.getAccessorName()%>()</em>}' method.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see <%=genFeature.getGenClass().getQualifiedInterfaceName()%>#isSet<%=genFeature.getAccessorName()%>()
- * @generated
- */
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //TestCase/isSetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="TestCase/isSetGenFeature.annotations.insert.javajetinc" fail="silent" %>
- <%}%>
- public void testIsSet<%=genFeature.getAccessorName()%>()
- {
-<%@ include file="TestCase/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
-<%@ end %><%//TestCase/isSetGenFeature.todo.override.javajetinc%>
- }
-<%@ end %><%//TestCase/isSetGenFeature.override.javajetinc%>
- <%}%>
- <%}%>
-<%@ include file="TestCase/implementedGenFeature.insert.javajetinc" fail="silent" %>
-<%@ end %><%//TestCase/implementedGenFeature.override.javajetinc%>
-<%}%>
-<%for (GenOperation genOperation : genClass.getImplementedGenOperations()) {%>
-<%@ include file="TestCase/implementedGenOperation.override.javajetinc" fail="alternative" %>
-<%@ start %>
-
- /**
- * Tests the '{@link <%=genOperation.getGenClass().getQualifiedInterfaceName()%>#<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>) <em><%=genOperation.getFormattedName()%></em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see <%=genOperation.getGenClass().getQualifiedInterfaceName()%>#<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>)
- * @generated
- */
- <%if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //TestCase/genOperation.annotations.insert.javajetinc%>
-<%@ include file="TestCase/genOperation.annotations.insert.javajetinc" fail="silent" %>
- <%}%>
- public void test<%=genClass.getUniqueName(genOperation)%>()
- {
-<%@ include file="TestCase/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
-<%@ end %><%//TestCase/implementedGenOperation.todo.override.javajetinc%>
- }
-<%@ include file="TestCase/implementedGenOperation.insert.javajetinc" fail="silent" %>
-<%@ end %><%//TestCase/implementedGenOperation.override.javajetinc%>
-<%}%>
-
-<%@ include file="TestCase/insert.javajetinc" fail="silent" %>
-} //<%=genClass.getTestCaseClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/build.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/build.propertiesjet
deleted file mode 100644
index 699adb443..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/build.propertiesjet
+++ /dev/null
@@ -1,33 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="org.eclipse.emf.codegen.ecore.genmodel.* java.util.*" class="BuildProperties" version="$Id: build.propertiesjet,v 1.2 2011/02/01 15:54:20 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005-2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<%String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getTestsPluginID()+".jar" : ".";%>
-<%List<String> sourceFolders = genModel.getTestsSourceFolders();%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-bin.includes = <%=pluginClassesLocation%>,\
-<%if (genModel.isBundleManifest()) {%>
- META-INF/,\
-<%} else {%>
- plugin.xml,\
-<%}%>
- plugin.properties
-jars.compile.order = <%=pluginClassesLocation%>
-<% boolean first=true; for (Iterator<String> i = sourceFolders.iterator(); i.hasNext();) { String sourceFolder = i.next(); if (i.hasNext()){sourceFolder +=",\\";} if (first) {%>
-source.<%=pluginClassesLocation%> = <%=sourceFolder%><%first=false;} else {%><%=sourceFolder%><%}}%>
-output.<%=pluginClassesLocation%> = bin/
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/manifest.mfjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/manifest.mfjet
deleted file mode 100644
index 9627f685a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/manifest.mfjet
+++ /dev/null
@@ -1,43 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.2 2011/02/01 15:54:20 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: <%=genModel.getTestsPluginID()%>;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getTestsPluginID()%>.jar<%}else{%>.<%}%>
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-<%}%>
-<%Iterator<String> packagesIterator = genModel.getTestsQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
-Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
- <%=pack%><%}%>
-<%}%>
-<%Iterator<String> requiredPluginIterator = genModel.getTestsRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
-Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
- <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
-<%}%>
-<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
-Eclipse-LazyStart: true
-<%}%>
-Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.propertiesjet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.propertiesjet
deleted file mode 100644
index 89fe531d1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.propertiesjet
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginProperties" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument;%>
-<%@ include file="../Header.propertiesjetinc"%>
-
-pluginName = <%=genModel.getModelName()%> Tests
-providerName = www.example.org
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.xmljet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.xmljet
deleted file mode 100644
index 2172938f4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model.tests/plugin.xmljet
+++ /dev/null
@@ -1,50 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model.tests" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<%@ include file="../Header.xmljetinc"%>
-
-<%if (genModel.isBundleManifest()) {%>
-<plugin>
-<%} else {%>
-<plugin
- name="%pluginName"
- id="<%=genModel.getTestsPluginID()%>"
- version="1.0.0"
- provider-name="%providerName">
-
- <requires>
- <%for (String pluginID : genModel.getTestsRequiredPlugins()) {%>
- <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
- <%}%>
- </requires>
-
- <runtime>
- <%if (genModel.isRuntimeJar()) {%>
- <library name="<%=genModel.getTestsPluginID()%>.jar">
- <%} else {%>
- <library name=".">
- <%}%>
- <export name="*"/>
- </library>
- </runtime>
-
-<%}%>
-</plugin>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/AdapterFactoryClass.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/AdapterFactoryClass.javajet
deleted file mode 100644
index 54662a930..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/AdapterFactoryClass.javajet
+++ /dev/null
@@ -1,172 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="AdapterFactoryClass" version="$Id: AdapterFactoryClass.javajet,v 1.2 2011/02/01 15:54:39 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
-<%@ include file="../Header.javajetinc"%>
-package <%=genPackage.getUtilitiesPackageName()%>;
-
-<%genModel.addImport("org.eclipse.emf.common.notify.Adapter");%>
-<%genModel.addImport("org.eclipse.emf.common.notify.Notifier");%>
-<%genModel.addImport("org.eclipse.emf.common.notify.impl.AdapterFactoryImpl");%>
-<%genModel.addImport("org.eclipse.emf.ecore.EObject");%>
-<%if (!genPackage.hasJavaLangConflict() && !genPackage.getUtilitiesPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");%>
-<%String typeArgument = genModel.useGenerics() ? "<Adapter>" : "";%>
-<%String returnType = genModel.useGenerics() ? "Adapter" : genModel.getImportedName("java.lang.Object");%>
-<%String adapterCast = genModel.useGenerics() ? "" : "(Adapter)";%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>
- * @generated
- */
-public class <%=genPackage.getAdapterFactoryClassName()%> extends AdapterFactoryImpl
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static <%=genPackage.getImportedPackageInterfaceName()%> modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getAdapterFactoryClassName()%>()
- {
- if (modelPackage == null)
- {
- modelPackage = <%=genPackage.getImportedPackageInterfaceName()%>.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @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 <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected <%=genPackage.getSwitchClassName()%><%=typeArgument%> modelSwitch =
- new <%=genPackage.getSwitchClassName()%><%=typeArgument%>()
- {
-<%for (GenClass genClass : genPackage.getAllSwitchGenClasses()) {%>
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public <%=genClass.getTypeParameters()%><%=returnType%> case<%=genPackage.getClassUniqueName(genClass)%>(<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceTypeArguments()%> object)
- {
- return create<%=genPackage.getClassUniqueName(genClass)%>Adapter();
- }
-<%}%>
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public <%=returnType%> defaultCase(EObject object)
- {
- return create<%=genPackage.getClassUniqueName(null)%>Adapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public Adapter createAdapter(Notifier target)
- {
- return <%=adapterCast%>modelSwitch.doSwitch((EObject)target);
- }
-
-<%for (GenClass genClass : genPackage.getAllSwitchGenClasses()) {%>
-
- /**
- * Creates a new adapter for an object of class '{@link <%=genClass.getQualifiedInterfaceName()%> <em><%=genClass.getFormattedName()%></em>}'.
- * <!-- begin-user-doc -->
- * 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.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see <%=genClass.getQualifiedInterfaceName()%>
- * @generated
- */
- public Adapter create<%=genPackage.getClassUniqueName(genClass)%>Adapter()
- {
- return null;
- }
-<%}%>
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter create<%=genPackage.getClassUniqueName(null)%>Adapter()
- {
- return null;
- }
-
-} //<%=genPackage.getAdapterFactoryClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/Class.javajet b/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/Class.javajet
deleted file mode 100644
index 55c9b766b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen.ecore/templates/model/Class.javajet
+++ /dev/null
@@ -1,2335 +0,0 @@
-<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.codegen.util.CodeGenUtil" class="Class" version="$Id: Class.javajet,v 1.4 2011/10/18 14:41:49 sbouchet Exp $" %>
-<%
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- */
-%>
-<%final GenClass genClass = (GenClass)((Object[])argument)[0]; final GenPackage genPackage = genClass.getGenPackage(); final GenModel genModel=genPackage.getGenModel();%>
-<%final boolean isJDK50 = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50;%>
-<%final boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); final boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);%>
-<%final boolean isGWT = genModel.getRuntimePlatform() == GenRuntimePlatform.GWT;%>
-<%final String publicStaticFinalFlag = isImplementation ? "public static final " : "";%>
-<%final String singleWildcard = isJDK50 ? "<?>" : "";%>
-<%final String negativeOffsetCorrection = genClass.hasOffsetCorrection() ? " - " + genClass.getOffsetCorrectionField(null) : "";%>
-<%final String positiveOffsetCorrection = genClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(null) : "";%>
-<%final String negativeOperationOffsetCorrection = genClass.hasOffsetCorrection() ? " - EOPERATION_OFFSET_CORRECTION" : "";%>
-<%final String positiveOperationOffsetCorrection = genClass.hasOffsetCorrection() ? " + EOPERATION_OFFSET_CORRECTION" : "";%>
-<%@ include file="../Header.javajetinc"%>
-<%if (isInterface) {%>
-package <%=genPackage.getInterfacePackageName()%>;
-<%} else {%>
-package <%=genPackage.getClassPackageName()%>;
-<%}%>
-
-<%genModel.markImportLocation(stringBuffer, genPackage);%>
-<%if (isImplementation) { genClass.addClassPsuedoImports(); }%>
-
-<%if (isInterface) {%>
-<%@ include file="Class/interface.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
- * <!-- end-user-doc -->
-<%if (genClass.hasDocumentation()) {%>
- *
- * <!-- begin-model-doc -->
- * <%=genClass.getDocumentation(genModel.getIndentation(stringBuffer))%>
- * <!-- end-model-doc -->
-<%}%>
- *
-<%if (!genClass.getGenFeatures().isEmpty()) {%>
- * <p>
- * The following features are supported:
- * <ul>
-<%for (GenFeature genFeature : genClass.getGenFeatures()) {%>
- <%if (!genFeature.isSuppressedGetVisibility()) {%>
- * <li>{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
- <%}%>
-<%}%>
- * </ul>
- * </p>
-<%}%>
- *
-<%if (!genModel.isSuppressEMFMetaData()) {%>
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genClass.getClassifierAccessorName()%>()
-<%}%>
-<%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
- * @model <%=modelInfo%>
-<%} else {%>
- * <%=modelInfo%>
-<%}} if (first) {%>
- * @model
-<%}}%>
-<%if (genClass.needsRootExtendsInterfaceExtendsTag()) {%>
- * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%>
-<%}%>
- * @generated
- */
-<%@ end %><%//Class/interface.javadoc.override.javajetinc%>
-<%} else {%>
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
- * <!-- end-user-doc -->
- * <p>
-<%if (!genClass.getImplementedGenFeatures().isEmpty()) {%>
- * The following features are implemented:
- * <ul>
-<%for (GenFeature genFeature : genClass.getImplementedGenFeatures()) {%>
- * <li>{@link <%=genClass.getQualifiedClassName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
-<%}%>
- * </ul>
-<%}%>
- * </p>
- *
- * @generated
- */
-<%}%>
-<%if (isImplementation) {%>
-public<%if (genClass.isAbstract()) {%> abstract<%}%> class <%=genClass.getClassName()%><%=genClass.getTypeParameters().trim()%><%=genClass.getClassExtends()%><%=genClass.getClassImplements()%>
-<%} else {%>
-public interface <%=genClass.getInterfaceName()%><%=genClass.getTypeParameters().trim()%><%=genClass.getInterfaceExtends()%>
-<%}%>
-{
-<%if (genModel.hasCopyrightField()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genModel.getDriverNumber() != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> mofDriverNumber = "<%=genModel.getDriverNumber()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genClass.isJavaIOSerializable()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final long serialVersionUID = 1L;
-
-<%}%>
-<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
- <%if (eVirtualValuesField != null) {%>
- /**
- * An array of objects representing the values of non-primitive features.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected Object[] <%=eVirtualValuesField%>;
-
- <%}%>
- <%{ List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());%>
- <%if (!eVirtualIndexBitFields.isEmpty()) {%>
- <%for (String eVirtualIndexBitField : eVirtualIndexBitFields) {%>
- /**
- * A bit field representing the indices of non-primitive feature values.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected int <%=eVirtualIndexBitField%>;
-
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) {%>
- /**
- * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected int <%=genModel.getBooleanFlagsField()%> = 0;
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation()) {%>
- <%for (GenFeature genFeature : genClass.getDeclaredFieldGenFeatures()) {%>
-<%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (genFeature.hasSettingDelegate()) {%>
- /**
- * The cached setting delegate for the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected <%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Internal.SettingDelegate <%=genFeature.getUpperName()%>__ESETTING_DELEGATE = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Internal)<%=genFeature.getQualifiedFeatureAccessor()%>).getSettingDelegate();
-
- <%} else if (genFeature.isListType() || genFeature.isReferenceType()) {%>
- <%if (genClass.isField(genFeature)) {%>
- /**
- * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected <%=genFeature.getImportedInternalType(genClass)%> <%=genFeature.getSafeName()%>;
-
- <%}%>
- <%if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { String rawListItemType = genFeature.getRawListItemType(); int index = rawListItemType.indexOf('['); String head = rawListItemType; String tail = ""; if (index != -1) { head = rawListItemType.substring(0, index); tail = rawListItemType.substring(index); } %>
- /**
- * The empty value for the '{@link #<%=genFeature.getGetArrayAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' array accessor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetArrayAccessor()%>()
- * @generated
- * @ordered
- */
- <%if (genFeature.getQualifiedListItemType(genClass).contains("<")) {%>
- @SuppressWarnings("unchecked")
- <%}%>
- protected static final <%=rawListItemType%>[] <%=genFeature.getUpperName()%>_EEMPTY_ARRAY = new <%=head%> [0]<%=tail%>;
-
- <%}%>
- <%} else {%>
- <%if (genFeature.hasEDefault() && (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable()))) { String staticDefaultValue = genFeature.getStaticDefaultValue();%>
- /**
- * The default value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- <%if (genModel.useGenerics() && genFeature.isListDataType() && genFeature.isSetDefaultValue()) {%>
- @SuppressWarnings("unchecked")
- <%}%>
- protected static final <%=genFeature.getImportedType(genClass)%> <%=genFeature.getEDefault()%><%if ("".equals(staticDefaultValue)) {%>; // TODO The default value literal "<%=genFeature.getEcoreFeature().getDefaultValueLiteral()%>" is not valid.<%} else {%> = <%=staticDefaultValue%>;<%=genModel.getNonNLS(staticDefaultValue)%><%}%>
-
- <%}%>
- <%if (genClass.isField(genFeature)) {%>
- <%if (genClass.isFlag(genFeature)) { int flagIndex = genClass.getFlagIndex(genFeature);%>
- <%if (flagIndex > 31 && flagIndex % 32 == 0) {%>
- /**
- * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected int <%=genClass.getFlagsField(genFeature)%> = 0;
-
- <%}%>
- <%if (genFeature.isEnumType()) {%>
- /**
- * The offset of the flags representing the value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_EFLAG_OFFSET = <%=flagIndex % 32%>;
-
- /**
- * The flags representing the default value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_EFLAG_DEFAULT = <%if (isJDK50) {%><%=genFeature.getEDefault()%>.ordinal()<%} else {%><%=genFeature.getImportedType(genClass)%>.VALUES.indexOf(<%=genFeature.getEDefault()%>)<%}%> << <%=genFeature.getUpperName()%>_EFLAG_OFFSET;
-
- /**
- * The array of enumeration values for '{@link <%=genFeature.getImportedType(genClass)%> <%=genFeature.getTypeGenClassifier().getFormattedName()%>}'
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- private static final <%=genFeature.getImportedType(genClass)%>[] <%=genFeature.getUpperName()%>_EFLAG_VALUES = <%if (isJDK50) {%><%=genFeature.getImportedType(genClass)%>.values()<%} else {%>(<%=genFeature.getImportedType(genClass)%>[])<%=genFeature.getImportedType(genClass)%>.VALUES.toArray(new <%=genFeature.getImportedType(genClass)%>[<%=genFeature.getImportedType(genClass)%>.VALUES.size()])<%}%>;
-
- <%}%>
- /**
- * The flag<%=genClass.getFlagSize(genFeature) > 1 ? "s" : ""%> representing the value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_EFLAG = <%=genClass.getFlagMask(genFeature)%> << <%if (genFeature.isEnumType()) {%><%=genFeature.getUpperName()%>_EFLAG_OFFSET<%} else {%><%=flagIndex % 32%><%}%>;
-
- <%} else {%>
- /**
- * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%><%if (genFeature.hasEDefault()) {%> = <%=genFeature.getEDefault()%><%}%>;
-
- <%}%>
- <%}%>
- <%}%>
- <%if (genClass.isESetField(genFeature)) {%>
- <%if (genClass.isESetFlag(genFeature)) { int flagIndex = genClass.getESetFlagIndex(genFeature);%>
- <%if (flagIndex > 31 && flagIndex % 32 == 0) {%>
- /**
- * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected int <%=genClass.getESetFlagsField(genFeature)%> = 0;
-
- <%}%>
- /**
- * The flag representing whether the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_ESETFLAG = 1 << <%=flagIndex % 32 %>;
-
- <%} else {%>
- /**
- * This is true if the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%if (isGWT) {%>
- @<%=genModel.getImportedName("com.google.gwt.user.client.rpc.GwtTransient")%>
- <%}%>
- protected boolean <%=genFeature.getUncapName()%>ESet;
-
- <%}%>
- <%}%>
-<%@ include file="Class/declaredFieldGenFeature.insert.javajetinc" fail="silent" %>
-<%@ end %><%//Class/declaredFieldGenFeature.override.javajetinc%>
- <%}%>
-<%}%>
-<%if (isImplementation && genClass.hasOffsetCorrection() && !genClass.getImplementedGenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final int <%=genClass.getOffsetCorrectionField(null)%> = <%=genClass.getQualifiedClassifierAccessor()%>.getFeatureID(<%=genClass.getImplementedGenFeatures().get(0).getQualifiedFeatureAccessor()%>) - <%=genClass.getQualifiedFeatureID(genClass.getImplementedGenFeatures().get(0))%>;
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation()) {%>
- <%for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { GenFeature reverseFeature = genFeature.getReverse();%>
- <%if (reverseFeature != null && reverseFeature.getGenClass().hasOffsetCorrection()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final int <%=genClass.getOffsetCorrectionField(genFeature)%> = <%=reverseFeature.getGenClass().getQualifiedClassifierAccessor()%>.getFeatureID(<%=reverseFeature.getQualifiedFeatureAccessor()%>) - <%=reverseFeature.getGenClass().getQualifiedFeatureID(reverseFeature)%>;
-
- <%}%>
- <%}%>
-<%}%>
-<%if (genModel.isOperationReflection() && isImplementation && genClass.hasOffsetCorrection() && !genClass.getImplementedGenOperations().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final int "EOPERATION_OFFSET_CORRECTION" = <%=genClass.getQualifiedClassifierAccessor()%>.getOperationID(<%=genClass.getImplementedGenOperations().get(0).getQualifiedOperationAccessor()%>) - <%=genClass.getQualifiedOperationID(genClass.getImplementedGenOperations().get(0))%>;
-
-<%}%>
-<%if (isImplementation) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.isPublicConstructors()) {%>public<%} else {%>protected<%}%> <%=genClass.getClassName()%>()
- {
- super();
- <%for (GenFeature genFeature : genClass.getFlagGenFeaturesWithDefault()) {%>
- <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG<%if (!genFeature.isBooleanType()) {%>_DEFAULT<%}%>;
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected <%=genModel.getImportedName("org.eclipse.emf.ecore.EClass")%> eStaticClass()
- {
- return <%=genClass.getQualifiedClassifierAccessor()%>;
- }
-
-<%}%>
-<%@ include file="Class/reflectiveDelegation.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isImplementation && (genModel.getFeatureDelegation() == GenDelegationKind.REFLECTIVE_LITERAL || genModel.isDynamicDelegation()) && (genClass.getClassExtendsGenClass() == null || (genClass.getClassExtendsGenClass().getGenModel().getFeatureDelegation() != GenDelegationKind.REFLECTIVE_LITERAL && !genClass.getClassExtendsGenClass().getGenModel().isDynamicDelegation()))) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected int eStaticFeatureCount()
- {
- return <%=genClass.getClassExtendsGenClass() == null ? 0 : genClass.getClassExtendsGenClass().getAllGenFeatures().size()%>;
- }
-
-<%}%>
-<%@ end %><%//Class/reflectiveDelegation.override.javajetinc%>
-<%new Runnable() { public void run() {%>
-<%for (GenFeature genFeature : (isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures())) {%>
-<%@ include file="Class/genFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- <%=genFeature.getListItemType(genClass)%>[] <%=genFeature.getGetArrayAccessor()%>();
-
- <%} else {%>
- public <%=genFeature.getListItemType(genClass)%>[] <%=genFeature.getGetArrayAccessor()%>()
- {
- <%if (genFeature.isVolatile()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%><%=genFeature.getListTemplateArguments(genClass)%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%><%=genFeature.getListTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>();
- if (list.isEmpty()) return <%if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) {%>(<%=genFeature.getListItemType(genClass)%>[])<%}%><%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
- <%} else {%>
- if (<%=genFeature.getSafeName()%> == null || <%=genFeature.getSafeName()%>.isEmpty()) return <%if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) {%>(<%=genFeature.getListItemType(genClass)%>[])<%}%><%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
- <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%><%=genFeature.getListTemplateArguments(genClass)%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%><%=genFeature.getListTemplateArguments(genClass)%>)<%=genFeature.getSafeName()%>;
- <%}%>
- list.shrink();
- return (<%=genFeature.getListItemType(genClass)%>[])list.data();
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- <%=genFeature.getListItemType(genClass)%> get<%=genFeature.getAccessorName()%>(int index);
-
- <%} else {%>
- public <%=genFeature.getListItemType(genClass)%> get<%=genFeature.getAccessorName()%>(int index)
- {
- return <%if (!genModel.useGenerics()) {%>(<%=genFeature.getListItemType(genClass)%>)<%}%><%=genFeature.getGetAccessor()%>().get(index);
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- int get<%=genFeature.getAccessorName()%>Length();
-
- <%} else {%>
- public int get<%=genFeature.getAccessorName()%>Length()
- {
- <%if (genFeature.isVolatile()) {%>
- return <%=genFeature.getGetAccessor()%>().size();
- <%} else {%>
- return <%=genFeature.getSafeName()%> == null ? 0 : <%=genFeature.getSafeName()%>.size();
- <%}%>
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType(genClass)%>[] new<%=genFeature.getCapName()%>);
-
- <%} else {%>
- public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType(genClass)%>[] new<%=genFeature.getCapName()%>)
- {
- ((<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%><%=genFeature.getListTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>()).setData(new<%=genFeature.getCapName()%>.length, new<%=genFeature.getCapName()%>);
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType(genClass)%> element);
-
- <%} else {%>
- public void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType(genClass)%> element)
- {
- <%=genFeature.getGetAccessor()%>().set(index, element);
- }
-
- <%}%>
- <%}%>
- <%if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) {%>
-<%@ include file="Class/getGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
-<%@ include file="Class/getGenFeature.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * Returns the value of the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); %>
- * The key is of type <%if (keyFeature.isListType()) {%>list of {@link <%=keyFeature.getQualifiedListItemType(genClass)%>}<%} else {%>{@link <%=keyFeature.getType(genClass)%>}<%}%>,
- * and the value is of type <%if (valueFeature.isListType()) {%>list of {@link <%=valueFeature.getQualifiedListItemType(genClass)%>}<%} else {%>{@link <%=valueFeature.getType(genClass)%>}<%}%>,
- <%} else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType(genClass)))) {
-String typeName = genFeature.getQualifiedListItemType(genClass); String head = typeName; String tail = ""; int index = typeName.indexOf('<'); if (index == -1) { index = typeName.indexOf('['); }
-if (index != -1) { head = typeName.substring(0, index); tail = typeName.substring(index).replaceAll("<", "&lt;"); }
-%>
- * The list contents are of type {@link <%=head%>}<%=tail%>.
- <%}%>
- <%} else if (genFeature.isSetDefaultValue()) {%>
- * The default value is <code><%=genFeature.getDefaultValue()%></code>.
- <%}%>
- <%if (genFeature.getTypeGenEnum() != null) {%>
- * The literals are from the enumeration {@link <%=genFeature.getTypeGenEnum().getQualifiedName()%>}.
- <%}%>
- <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
- <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
- * It is bidirectional and its opposite is '{@link <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> <em><%=reverseGenFeature.getFormattedName()%></em>}'.
- <%}%>
- <%}%>
-<%@ include file="Class/getGenFeature.javadoc.insert.javajetinc" fail="silent" %>
- * <!-- begin-user-doc -->
- <%if (!genFeature.hasDocumentation()) {%>
- * <p>
- * If the meaning of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> isn't clear,
- * there really should be more of a description here...
- * </p>
- <%}%>
- * <!-- end-user-doc -->
- <%if (genFeature.hasDocumentation()) {%>
- * <!-- begin-model-doc -->
- * <%=genFeature.getDocumentation(genModel.getIndentation(stringBuffer))%>
- * <!-- end-model-doc -->
- <%}%>
- * @return the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.getTypeGenEnum() != null) {%>
- * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- <%}%>
- <%if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getRawImportedBoundType()%>)
- <%}%>
- <%if (!genModel.isSuppressEMFMetaData()) {%>
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genFeature.getFeatureAccessorName()%>()
- <%}%>
- <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
- <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
- * @see <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%>
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
- * @model <%=modelInfo%>
- <%} else {%>
- * <%=modelInfo%>
- <%}} if (first) {%>
- * @model
- <%}}%>
- * @generated
- */
-<%@ end %><%//Class/getGenFeature.javadoc.override.javajetinc%>
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/getGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/getGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
-<%}%>
-<%if (!isImplementation) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getGetAccessor()%>();
-
-<%} else {%>
- <%if (genModel.useGenerics() && ((genFeature.isContainer() || genFeature.isResolveProxies()) && !genFeature.isListType() && !(genModel.isReflectiveDelegation() && genModel.isDynamicDelegation()) && genFeature.isUncheckedCast(genClass) || genFeature.isListType() && !genFeature.isFeatureMapType() && (genModel.isReflectiveDelegation() || genModel.isVirtualDelegation() || genModel.isDynamicDelegation()) || genFeature.isListDataType() && genFeature.hasDelegateFeature() || genFeature.isListType() && genFeature.hasSettingDelegate())) {%>
- @SuppressWarnings("unchecked")
- <%}%>
- public <%=genFeature.getImportedType(genClass)%> <%=genFeature.getGetAccessor()%><%if (genClass.hasCollidingGetAccessorOperation(genFeature)) {%>_<%}%>()
- {
-<%@ include file="Class/getGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isDynamicDelegation()) {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType(genClass)%>)eDynamicGet(<%=genClass.getQualifiedFeatureID(genFeature)%>, <%=genFeature.getQualifiedFeatureAccessor()%>, true, <%=!genFeature.isEffectiveSuppressEMFTypes()%>)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else if (genModel.isReflectiveDelegation()) {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType(genClass)%>)eGet(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else if (genFeature.hasSettingDelegate()) {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType(genClass)%>)<%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> == null)
- {
- <%if (genModel.isVirtualDelegation()) {%>
- eVirtualSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>);
- <%} else {%>
- <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>;
- <%}%>
- }
- return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>;
- <%} else if (genFeature.isContainer()) {%>
- if (eContainerFeatureID() != <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>) return null;
- return (<%=genFeature.getImportedType(genClass)%>)eContainer();
- <%} else {%>
- <%if (genFeature.isResolveProxies()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%><%if (genFeature.hasEDefault()) {%>, <%=genFeature.getEDefault()%><%}%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeNameAsEObject()%>.eIsProxy())
- {
- <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> old<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>;
- <%=genFeature.getSafeName()%> = <%=genFeature.getNonEObjectInternalTypeCast(genClass)%>eResolveProxy(old<%=genFeature.getCapName()%>);
- if (<%=genFeature.getSafeName()%> != old<%=genFeature.getCapName()%>)
- {
- <%if (genFeature.isEffectiveContains()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> new<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>;
- <%if (!genFeature.isBidirectional()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs = old<%=genFeature.getCapName()%>.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, null);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs = old<%=genFeature.getCapName()%>.eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, null);
- <%}%>
- if (new<%=genFeature.getCapName()%>.eInternalContainer() == null)
- {
- <%if (!genFeature.isBidirectional()) {%>
- msgs = new<%=genFeature.getCapName()%>.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, msgs);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- msgs = new<%=genFeature.getCapName()%>.eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- <%}%>
- }
- if (msgs != null) msgs.dispatch();
- <%} else if (genModel.isVirtualDelegation()) {%>
- eVirtualSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%=genFeature.getSafeName()%>);
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.RESOLVE, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, old<%=genFeature.getCapName()%>, <%=genFeature.getSafeName()%>));
- <%}%>
- }
- }
- <%}%>
- <%if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- return (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%><%if (genFeature.hasEDefault()) {%>, <%=genFeature.getEDefault()%><%}%>);
- <%} else if (genClass.isFlag(genFeature)) {%>
- <%if (genFeature.isBooleanType()) {%>
- return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%} else {%>
- return <%=genFeature.getUpperName()%>_EFLAG_VALUES[(<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) >>> <%=genFeature.getUpperName()%>_EFLAG_OFFSET];
- <%}%>
- <%} else {%>
- return <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%} else {//volatile%>
- <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>();
- return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeNameAsEObject()%>.eIsProxy() ? <%=genFeature.getNonEObjectInternalTypeCast(genClass)%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>;
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (genFeature.isFeatureMapType()) {%>
- <%String featureMapEntryTemplateArgument = isJDK50 ? "<" + genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap") + ".Entry>" : "";%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return new <%=genFeature.getImportedEffectiveFeatureMapWrapperClass()%>((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap().<%=featureMapEntryTemplateArgument%>list(<%=genFeature.getQualifiedFeatureAccessor()%>));
- <%} else {%>
- return (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>().<%=featureMapEntryTemplateArgument%>list(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else if (genFeature.isListType()) {%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap().list(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else {%>
- return get<%=delegateFeature.getAccessorName()%>().list(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else {%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%><%if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) {%>(<%=genFeature.getObjectType(genClass)%>)<%}%>((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap().get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%><%if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) {%>(<%=genFeature.getObjectType(genClass)%>)<%}%>get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%}%>
- <%}%>
- <%} else if (genClass.getGetAccessorOperation(genFeature) != null) {%>
- <%=genClass.getGetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))%>
- <%} else {%>
-<%@ include file="Class/getGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- <%if (genFeature.isListType()) {%>
- // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting
- // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.<%if (genFeature.isMapType()) {%>EcoreEMap<%} else if (genFeature.isFeatureMapType()) {%>BasicFeatureMap<%} else {%>EcoreEList<%}%> should be used.
- <%}%>
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/getGenFeature.todo.override.javajetinc%>
- <%}%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/getGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {%>
-<%@ include file="Class/basicGetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/basicGetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/basicGetGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
- public <%=genFeature.getImportedType(genClass)%> basicGet<%=genFeature.getAccessorName()%>()
- {
-<%@ include file="Class/basicGetGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isDynamicDelegation()) {%>
- return (<%=genFeature.getImportedType(genClass)%>)eDynamicGet(<%=genClass.getQualifiedFeatureID(genFeature)%>, <%=genFeature.getQualifiedFeatureAccessor()%>, false, <%=!genFeature.isEffectiveSuppressEMFTypes()%>);
- <%} else if (genFeature.hasSettingDelegate()) {%>
- return <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType(genClass)%>)<%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicGet(this, null, 0, false, false)<%if (!isJDK50 && genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else if (genFeature.isContainer()) {%>
- if (eContainerFeatureID() != <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>) return null;
- return (<%=genFeature.getImportedType(genClass)%>)eInternalContainer();
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- return (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else {%>
- return <%=genFeature.getSafeName()%>;
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return (<%=genFeature.getImportedType(genClass)%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false);
- <%} else {%>
- return (<%=genFeature.getImportedType(genClass)%>)get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false);
- <%}%>
- <%} else {%>
-<%@ include file="Class/basicGetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> do not perform proxy resolution
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicGetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class/basicGetGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {%>
-<%@ include file="Class/basicSetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/basicSetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/basicSetGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedInternalType(genClass)%> new<%=genFeature.getCapName()%>, <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs)
- {
- <%if (genFeature.isContainer()) {%>
-<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %>
- msgs = eBasicSetContainer((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, msgs);
-<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
- return msgs;
- <%} else if (genModel.isDynamicDelegation()) {%>
-<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %>
- msgs = eDynamicInverseAdd((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, msgs);
-<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
- return msgs;
- <%} else if (!genFeature.isVolatile()) {%>
-<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isVirtualDelegation()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, new<%=genFeature.getCapName()%>);
- <%} else {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%>;
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
- <%}%>
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%}%>
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%=genFeature.getUncapName()%>ESet = true;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- {
- <%if (genFeature.isUnsettable()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>ESet<%}%>);
- <%} else {%>
- <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>);
- <%}%>
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- <%}%>
-<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
- return msgs;
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, msgs);
- <%} else {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, msgs);
- <%}%>
- <%} else {%>
-<%@ include file="Class/basicSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to set the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> this method is automatically invoked to keep the containment relationship in synch
- // -> do not modify other features
- // -> return msgs, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicSetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class/basicSetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {%>
-<%@ include file="Class/setGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) { %>
-<%@ include file="Class/setGenFeature.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * Sets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
-<%@ include file="Class/setGenFeature.javadoc.insert.javajetinc" fail="silent" %>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.isEnumType()) {%>
- * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- <%if (!genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- */
-<%@ end %><%//Class/setGenFeature.javadoc.override.javajetinc%>
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/setGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/setGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
-<%}%>
-<%if (!isImplementation) { %>
- void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType(genClass)%> value);
-
-<%} else { GenOperation setAccessorOperation = genClass.getSetAccessorOperation(genFeature);%>
- public void set<%=genFeature.getAccessorName()%><%if (genClass.hasCollidingSetAccessorOperation(genFeature)) {%>_<%}%>(<%=genFeature.getImportedType(genClass)%> <%=setAccessorOperation == null ? "new" + genFeature.getCapName() : setAccessorOperation.getGenParameters().get(0).getName()%>)
- {
-<%@ include file="Class/setGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isDynamicDelegation()) {%>
- eDynamicSet(<%=genClass.getQualifiedFeatureID(genFeature)%>, <%=genFeature.getQualifiedFeatureAccessor()%>, <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType(genClass)%>(<%}%>new<%=genFeature.getCapName()%><%if (!isJDK50 && genFeature.isPrimitiveType()) {%>)<%}%>);
- <%} else if (genModel.isReflectiveDelegation()) {%>
- eSet(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType(genClass)%>(<%}%>new<%=genFeature.getCapName()%><%if (!isJDK50 && genFeature.isPrimitiveType()) {%>)<%}%>);
- <%} else if (genFeature.hasSettingDelegate()) {%>
- <%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicSet(this, null, 0, <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType(genClass)%>(<%}%>new<%=genFeature.getCapName()%><%if (!isJDK50 && genFeature.isPrimitiveType()) {%>)<%}%>);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- if (new<%=genFeature.getCapName()%> != eInternalContainer() || (eContainerFeatureID() != <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%> && new<%=genFeature.getCapName()%> != null))
- {
- if (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.isAncestor(this, <%=genFeature.getEObjectCast()%>new<%=genFeature.getCapName()%>))
- throw new <%=genModel.getImportedName("java.lang.IllegalArgumentException")%>("Recursive containment not allowed for " + toString());<%=genModel.getNonNLS()%>
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (new<%=genFeature.getCapName()%> != null)
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- msgs = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, msgs);
- if (msgs != null) msgs.dispatch();
- }
- <%if (!genModel.isSuppressNotification()) {%>
- else if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>));
- <%}%>
- <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%}%>
- if (new<%=genFeature.getCapName()%> != <%=genFeature.getSafeName()%>)
- {
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs = null;
- if (<%=genFeature.getSafeName()%> != null)
- <%if (!genFeature.isBidirectional()) {%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, msgs);
- if (new<%=genFeature.getCapName()%> != null)
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, msgs);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- if (new<%=genFeature.getCapName()%> != null)
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- <%}%>
- msgs = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, msgs);
- if (msgs != null) msgs.dispatch();
- }
- <%if (genFeature.isUnsettable()) {%>
- else
- {
- <%if (genModel.isVirtualDelegation()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = eVirtualIsSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%=genFeature.getUncapName()%>ESet = true;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>, !old<%=genFeature.getCapName()%>ESet));
- <%}%>
- }
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- else if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>));
- <%}%>
- <%}%>
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%if (genFeature.isBooleanType()) {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%} else {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getUpperName()%>_EFLAG_VALUES[(<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) >>> <%=genFeature.getUpperName()%>_EFLAG_OFFSET];
- <%}%>
- <%}%>
- <%if (genFeature.isBooleanType()) {%>
- if (new<%=genFeature.getCapName()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
- <%} else {%>
- if (new<%=genFeature.getCapName()%> == null) new<%=genFeature.getCapName()%> = <%=genFeature.getUpperName()%>_EDEFAULT;
- <%=genClass.getFlagsField(genFeature)%> = <%=genClass.getFlagsField(genFeature)%> & ~<%=genFeature.getUpperName()%>_EFLAG | <%if (isJDK50) {%>new<%=genFeature.getCapName()%>.ordinal()<%} else {%><%=genFeature.getImportedType(genClass)%>.VALUES.indexOf(new<%=genFeature.getCapName()%>)<%}%> << <%=genFeature.getUpperName()%>_EFLAG_OFFSET;
- <%}%>
- <%} else {%>
- <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%if (genFeature.isEnumType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getEDefault()%> : new<%=genFeature.getCapName()%>;
- <%} else {%>
- <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getEDefault()%> : new<%=genFeature.getCapName()%>;
- <%}%>
- <%} else {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
- <%} else {%>
- <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
- <%}%>
- <%}%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%=genFeature.getSafeName()%>);
- <%}%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%=genFeature.getUncapName()%>ESet = true;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? <%=genFeature.getEDefault()%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>ESet<%}%>));
- <%}%>
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? <%=genFeature.getEDefault()%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>));
- <%}%>
- <%}%>
- <%}%>
-<%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType(genClass)%>(<%}%>new<%=genFeature.getCapName()%><%if (!isJDK50 && genFeature.isPrimitiveType()) {%>)<%}%>);
- <%} else {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (!isJDK50 && genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType(genClass)%>(<%}%>new<%=genFeature.getCapName()%><%if (!isJDK50 && genFeature.isPrimitiveType()) {%>)<%}%>);
- <%}%>
- <%} else if (setAccessorOperation != null) {%>
- <%=setAccessorOperation.getBody(genModel.getIndentation(stringBuffer))%>
- <%} else {%>
-<%@ include file="Class/setGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to set the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/setGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/setGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {%>
-<%@ include file="Class/basicUnsetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/basicUnsetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/basicUnsetGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> basicUnset<%=genFeature.getAccessorName()%>(<%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs)
- {
- <%if (genModel.isDynamicDelegation()) {%>
- return eDynamicInverseRemove((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%if (genFeature.isResolveProxies()) {%>basicGet<%=genFeature.getAccessorName()%><%} else {%><%=genFeature.getGetAccessor()%><%}%>(), <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, msgs);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%if (!genModel.isSuppressNotification()) {%>Object old<%=genFeature.getCapName()%> = <%}%>eVirtualUnset(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%}%>
- <%=genFeature.getSafeName()%> = null;
- <%}%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
- <%}%>
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%=genFeature.getUncapName()%>ESet = false;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- {
- <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>ESet<%}%>);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- <%}%>
- <%} else {%>
-<%@ include file="Class/basicUnsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to unset the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> this method is automatically invoked to keep the containment relationship in synch
- // -> do not modify other features
- // -> return msgs, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicUnsetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class.basicUnsetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {%>
-<%@ include file="Class/unsetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
-<%@ include file="Class/unsetGenFeature.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * Unsets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
-<%@ include file="Class/unsetGenFeature.javadoc.insert.javajetinc" fail="silent" %>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- <%if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getRawImportedBoundType()%>)
- <%}%>
- * @generated
- */
-<%@ end %><%//Class/unsetGenFeature.javadoc.override.javajetinc%>
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/unsetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/unsetGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
-<%}%>
-<%if (!isImplementation) {%>
- void unset<%=genFeature.getAccessorName()%>();
-
-<%} else {%>
- public void unset<%=genFeature.getAccessorName()%><%if (genClass.hasCollidingUnsetAccessorOperation(genFeature)) {%>_<%}%>()
- {
- <%if (genModel.isDynamicDelegation()) {%>
- eDynamicUnset(<%=genClass.getQualifiedFeatureID(genFeature)%>, <%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (genModel.isReflectiveDelegation()) {%>
- eUnset(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (genFeature.hasSettingDelegate()) {%>
- <%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicUnset(this, null, 0);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null) ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable<%=singleWildcard%>)<%=genFeature.getSafeName()%>).unset();
- <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null)
- {
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs = null;
- <%if (!genFeature.isBidirectional()) {%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, msgs);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- <%}%>
- msgs = basicUnset<%=genFeature.getAccessorName()%>(msgs);
- if (msgs != null) msgs.dispatch();
- }
- else
- {
- <%if (genModel.isVirtualDelegation()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = eVirtualIsSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%=genFeature.getUncapName()%>ESet = false;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, null, null, old<%=genFeature.getCapName()%>ESet));
- <%}%>
- }
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%if (genFeature.isBooleanType()) {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%} else {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getUpperName()%>_EFLAG_VALUES[(<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) >>> <%=genFeature.getUpperName()%>_EFLAG_OFFSET];
- <%}%>
- <%}%>
- <%} else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType(genClass)%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- boolean old<%=genFeature.getCapName()%>ESet = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%} else {%>
- boolean old<%=genFeature.getCapName()%>ESet = <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%}%>
- <%if (genFeature.isReferenceType()) {%>
- <%=genFeature.getSafeName()%> = null;
- <%if (!genModel.isVirtualDelegation()) {%>
- <%if (genClass.isESetFlag(genFeature)) {%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%=genFeature.getUncapName()%>ESet = false;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>ESet<%}%>));
- <%}%>
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (genFeature.isBooleanType()) {%>
- if (<%=genFeature.getEDefault()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
- <%} else {%>
- <%=genClass.getFlagsField(genFeature)%> = <%=genClass.getFlagsField(genFeature)%> & ~<%=genFeature.getUpperName()%>_EFLAG | <%=genFeature.getUpperName()%>_EFLAG_DEFAULT;
- <%}%>
- <%} else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%=genFeature.getSafeName()%> = <%=genFeature.getEDefault()%>;
- <%}%>
- <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%if (genClass.isESetFlag(genFeature)) {%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%=genFeature.getUncapName()%>ESet = false;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (eNotificationRequired())
- eNotify(new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? old<%=genFeature.getCapName()%> : <%=genFeature.getEDefault()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%=genFeature.getEDefault()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>ESet<%}%>));
- <%}%>
- <%}%>
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).clear(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).clear(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else if (genClass.getUnsetAccessorOperation(genFeature) != null) {%>
- <%=genClass.getUnsetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))%>
- <%} else {%>
-<%@ include file="Class/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to unset the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/unsetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/unsetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {%>
-<%@ include file="Class/isSetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
-<%@ include file="Class/isSetGenFeature.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * Returns whether the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%> is set.
-<%@ include file="Class/isSetGenFeature.javadoc.insert.javajetinc" fail="silent" %>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> is set.
- <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- <%if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getRawImportedBoundType()%>)
- <%}%>
- * @generated
- */
-<%@ end %><%//Class/isSetGenFeature.javadoc.override.javajetinc%>
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/isSetGenFeature.annotations.insert.javajetinc%>
-<%@ include file="Class/isSetGenFeature.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
-<%}%>
-<%if (!isImplementation) {%>
- boolean isSet<%=genFeature.getAccessorName()%>();
-
-<%} else {%>
- public boolean isSet<%=genFeature.getAccessorName()%><%if (genClass.hasCollidingIsSetAccessorOperation(genFeature)) {%>_<%}%>()
- {
- <%if (genModel.isDynamicDelegation()) {%>
- return eDynamicIsSet(<%=genClass.getQualifiedFeatureID(genFeature)%>, <%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (genModel.isReflectiveDelegation()) {%>
- return eIsSet(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (genFeature.hasSettingDelegate()) {%>
- return <%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicIsSet(this, null, 0);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%}%>
- return <%=genFeature.getSafeName()%> != null && ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable<%=singleWildcard%>)<%=genFeature.getSafeName()%>).isSet();
- <%} else {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- return eVirtualIsSet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- return (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%} else {%>
- return <%=genFeature.getUncapName()%>ESet;
- <%}%>
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else {%>
- return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else if (genClass.getIsSetAccessorOperation(genFeature) != null) {%>
- <%=genClass.getIsSetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))%>
- <%} else {%>
-<%@ include file="Class/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return whether the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/isSetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/isSetGenFeature.override.javajetinc%>
- <%}%>
-<%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %>
-<%@ end %><%//Class/genFeature.override.javajetinc%>
-<%}//for%>
-<%}}.run();%>
-<%for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {%>
-<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (isImplementation) {%>
- <%if (genOperation.isInvariant() && genOperation.hasInvariantExpression()) {%>
- /**
- * The cached validation expression for the '{@link #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>) <em><%=genOperation.getFormattedName()%></em>}' invariant operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>)
- * @generated
- * @ordered
- */
- protected static final <%=genModel.getImportedName("java.lang.String")%> <%=CodeGenUtil.upperName(genClass.getUniqueName(genOperation), genModel.getLocale())%>__EEXPRESSION = "<%=genOperation.getInvariantExpression("\t\t")%>";<%=genModel.getNonNLS()%>
-
- <%} else if (genOperation.hasInvocationDelegate()) {%>
- /**
- * The cached invocation delegate for the '{@link #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>) <em><%=genOperation.getFormattedName()%></em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>)
- * @generated
- * @ordered
- */
- protected static final <%=genModel.getImportedName("org.eclipse.emf.ecore.EOperation")%>.Internal.InvocationDelegate <%=CodeGenUtil.upperName(genClass.getUniqueName(genOperation), genModel.getLocale())%>__EINVOCATION_DELEGATE = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EOperation")%>.Internal)<%=genOperation.getQualifiedOperationAccessor()%>).getInvocationDelegate();
-
- <%}%>
- <%}%>
-<%if (isInterface) {%>
-<%@ include file="Class/genOperation.javadoc.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
-<%@ include file="Class/genOperation.javadoc.insert.javajetinc" fail="silent" %>
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- <%if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) {%>
- * <!-- begin-model-doc -->
- <%if (genOperation.hasDocumentation()) {%>
- * <%=genOperation.getDocumentation(genModel.getIndentation(stringBuffer))%>
- <%}%>
- <%for (GenParameter genParameter : genOperation.getGenParameters()) {%>
- <%if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation("");%>
- <%if (documentation.contains("\n") || documentation.contains("\r")) {%>
- * @param <%=genParameter.getName()%>
- * <%=genParameter.getDocumentation(genModel.getIndentation(stringBuffer))%>
- <%} else {%>
- * @param <%=genParameter.getName()%> <%=genParameter.getDocumentation(genModel.getIndentation(stringBuffer))%>
- <%}%>
- <%}%>
- <%}%>
- * <!-- end-model-doc -->
- <%}%>
- <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
- * @model <%=modelInfo%>
- <%} else {%>
- * <%=modelInfo%>
- <%}} if (first) {%>
- * @model
- <%}}%>
- * @generated
- */
-<%@ end %><%//Class/genOperation.javadoc.override.javajetinc%>
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%if (isJDK50) { //Class/genOperation.annotations.insert.javajetinc%>
-<%@ include file="Class/genOperation.annotations.insert.javajetinc" fail="silent" %>
-<%}%>
-<%}%>
-<%if (!isImplementation) {%>
- <%=genOperation.getTypeParameters(genClass)%><%=genOperation.getImportedType(genClass)%> <%=genOperation.getName()%>(<%=genOperation.getParameters(genClass)%>)<%=genOperation.getThrows(genClass)%>;
-
-<%} else {%>
- <%if (genModel.useGenerics() && !genOperation.hasBody() && !genOperation.isInvariant() && genOperation.hasInvocationDelegate() && genOperation.isUncheckedCast(genClass)) {%>
- @SuppressWarnings("unchecked")
- <%}%>
- public <%=genOperation.getTypeParameters(genClass)%><%=genOperation.getImportedType(genClass)%> <%=genOperation.getName()%>(<%=genOperation.getParameters(genClass)%>)<%=genOperation.getThrows(genClass)%>
- {
- <%if (genOperation.hasBody()) {%>
- <%=genOperation.getBody(genModel.getIndentation(stringBuffer))%>
- <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName();%>
- <%if (genOperation.hasInvariantExpression()) {%>
- return
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.validate
- (<%=genClass.getQualifiedClassifierAccessor()%>,
- this,
- <%=diagnostics%>,
- <%=context%>,
- "<%=genOperation.getValidationDelegate()%>",<%=genModel.getNonNLS()%>
- <%=genOperation.getQualifiedOperationAccessor()%>,
- <%=CodeGenUtil.upperName(genClass.getUniqueName(genOperation), genModel.getLocale())%>__EEXPRESSION,
- <%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>);
- <%} else {%>
- // TODO: implement this method
- // -> specify the condition that violates the invariant
- // -> verify the details of the diagnostic, including severity and message
- // Ensure that you remove @generated or mark it @generated NOT
- if (false)
- {
- if (<%=diagnostics%> != null)
- {
- <%=diagnostics%>.add
- (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
- (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- new Object [] { this }));
- }
- return false;
- }
- return true;
- <%}%>
- <%} else if (genOperation.hasInvocationDelegate()) { int size = genOperation.getGenParameters().size();%>
- try
- {
- <%if (genOperation.isVoid()) {%>
- <%=CodeGenUtil.upperName(genClass.getUniqueName(genOperation), genModel.getLocale())%>__EINVOCATION_DELEGATE.dynamicInvoke(this, <%if (size > 0) {%>new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>.UnmodifiableEList<Object>(<%=size%>, <%=genOperation.getParametersArray(genClass)%>)<%} else {%>null<%}%>);
- <%} else {%>
- return <%if (!isJDK50 && genOperation.isPrimitiveType()) {%>(<%}%>(<%=genOperation.getObjectType(genClass)%>)<%=CodeGenUtil.upperName(genClass.getUniqueName(genOperation), genModel.getLocale())%>__EINVOCATION_DELEGATE.dynamicInvoke(this, <%if (size > 0) {%>new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>.UnmodifiableEList<Object>(<%=size%>, <%=genOperation.getParametersArray(genClass)%>)<%} else {%>null<%}%>)<%if (!isJDK50 && genOperation.isPrimitiveType()) {%>).<%=genOperation.getPrimitiveValueFunction()%>()<%}%>;
- <%}%>
- }
- catch (<%=genModel.getImportedName(isGWT ? "org.eclipse.emf.common.util.InvocationTargetException" : "java.lang.reflect.InvocationTargetException")%> ite)
- {
- throw new <%=genModel.getImportedName("org.eclipse.emf.common.util.WrappedException")%>(ite);
- }
- <%} else {%>
-<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/implementedGenOperation.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ include file="Class/genOperation.insert.javajetinc" fail="silent" %>
-<%@ end %><%//Class/implementedGenOperation.override.javajetinc%>
-<%}//for%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useGenerics()) {%>
- <%for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {%>
- <%if (genFeature.isUncheckedCast(genClass)) {%>
- @SuppressWarnings("unchecked")
- <%break; }%>
- <%}%>
- <%}%>
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> eInverseAdd(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int featureID, <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
-<%for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.isListType()) { String cast = "(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + (!genModel.useGenerics() ? ")" : "<" + genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject") + ">)(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + "<?>)");%>
- <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
- return ((<%=cast%>(<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView<%=genFeature.getImportedMapTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>()).eMap()).basicAdd(otherEnd, msgs);
- <%} else {%>
- return (<%=cast%><%=genFeature.getGetAccessor()%>()).basicAdd(otherEnd, msgs);
- <%}%>
- <%} else if (genFeature.isContainer()) {%>
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- <%if (genFeature.isBasicSet()) {%>
- return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType(genClass)%>)otherEnd, msgs);
- <%} else {%>
- return eBasicSetContainer(otherEnd, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, msgs);
- <%}%>
- <%} else {%>
- <%if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- <%} else if (genFeature.isVolatile() || genClass.getImplementingGenModel(genFeature).isDynamicDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=genFeature.getSafeName()%> = <%if (genFeature.isResolveProxies()) {%>basicGet<%=genFeature.getAccessorName()%><%} else {%><%=genFeature.getGetAccessor()%><%}%>();
- <%}%>
- if (<%=genFeature.getSafeName()%> != null)
- <%if (genFeature.isEffectiveContains()) {%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genClass.getQualifiedFeatureID(genFeature)%><%=negativeOffsetCorrection%>, null, msgs);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- msgs = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
- <%}%>
- return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType(genClass)%>)otherEnd, msgs);
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eInverseAdd(otherEnd, featureID, msgs);
-<%} else {%>
- return eDynamicInverseAdd(otherEnd, featureID, msgs);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> eInverseRemove(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int featureID, <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
-<%for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%><%=singleWildcard%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView<%=genFeature.getImportedMapTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>()).eMap()).basicRemove(otherEnd, msgs);
- <%} else if (genFeature.isWrappedFeatureMapType()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%><%=singleWildcard%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)<%=genFeature.getGetAccessor()%>()).featureMap()).basicRemove(otherEnd, msgs);
- <%} else {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%><%=singleWildcard%>)<%=genFeature.getGetAccessor()%>()).basicRemove(otherEnd, msgs);
- <%}%>
- <%} else if (genFeature.isContainer() && !genFeature.isBasicSet()) {%>
- return eBasicSetContainer(null, <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, msgs);
- <%} else if (genFeature.isUnsettable()) {%>
- return basicUnset<%=genFeature.getAccessorName()%>(msgs);
- <%} else {%>
- return basicSet<%=genFeature.getAccessorName()%>(null, msgs);
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eInverseRemove(otherEnd, featureID, msgs);
-<%} else {%>
- return eDynamicInverseRemove(otherEnd, featureID, msgs);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public <%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> eBasicRemoveFromContainerFeature(<%=genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")%> msgs)
- {
- switch (eContainerFeatureID()<%=negativeOffsetCorrection%>)
- {
-<%for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) {%>
- <%GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(genFeature) : "";%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- return eInternalContainer().eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%><%=reverseOffsetCorrection%>, <%=targetClass.getRawImportedInterfaceName()%>.class, msgs);
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eBasicRemoveFromContainerFeature(msgs);
-<%} else {%>
- return eDynamicBasicRemoveFromContainer(msgs);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
-<%for (GenFeature genFeature : genClass.getEGetGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.isPrimitiveType()) {%>
- <%if (isJDK50) {%>
- return <%=genFeature.getGetAccessor()%>();
- <%} else if (genFeature.isBooleanType()) {%>
- return <%=genFeature.getGetAccessor()%>() ? Boolean.TRUE : Boolean.FALSE;
- <%} else {%>
- return new <%=genFeature.getObjectType(genClass)%>(<%=genFeature.getGetAccessor()%>());
- <%}%>
- <%} else if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
- if (resolve) return <%=genFeature.getGetAccessor()%>();
- return basicGet<%=genFeature.getAccessorName()%>();
- <%} else if (genFeature.isMapType()) {%>
- <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
- if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView<%=genFeature.getImportedMapTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>()).eMap();
- else return <%=genFeature.getGetAccessor()%>();
- <%} else {%>
- if (coreType) return <%=genFeature.getGetAccessor()%>();
- else return <%=genFeature.getGetAccessor()%>().map();
- <%}%>
- <%} else if (genFeature.isWrappedFeatureMapType()) {%>
- if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)<%=genFeature.getGetAccessor()%>()).featureMap();
- return <%=genFeature.getGetAccessor()%>();
- <%} else if (genFeature.isFeatureMapType()) {%>
- if (coreType) return <%=genFeature.getGetAccessor()%>();
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).getWrapper();
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>();
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eGet(featureID, resolve, coreType);
-<%} else {%>
- return eDynamicGet(featureID, resolve, coreType);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useGenerics()) {%>
- <%for (GenFeature genFeature : genClass.getESetGenFeatures()) {%>
- <%if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
- @SuppressWarnings("unchecked")
- <%break; }%>
- <%}%>
- <%}%>
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
- <%for (GenFeature genFeature : genClass.getESetGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)<%=genFeature.getGetAccessor()%>()).featureMap()).set(newValue);
- <%} else if (genFeature.isFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).set(newValue);
- <%} else if (genFeature.isMapType()) {%>
- <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView<%=genFeature.getImportedMapTemplateArguments(genClass)%>)<%=genFeature.getGetAccessor()%>()).eMap()).set(newValue);
- <%} else {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)<%=genFeature.getGetAccessor()%>()).set(newValue);
- <%}%>
- <%} else {%>
- <%=genFeature.getGetAccessor()%>().clear();
- <%=genFeature.getGetAccessor()%>().addAll((<%=genModel.getImportedName("java.util.Collection")%><%if (isJDK50) {%><? extends <%=genFeature.getListItemType(genClass)%>><%}%>)newValue);
- <%}%>
- <%} else if (!isJDK50 && genFeature.isPrimitiveType()) {%>
- set<%=genFeature.getAccessorName()%>(((<%=genFeature.getObjectType(genClass)%>)newValue).<%=genFeature.getPrimitiveValueFunction()%>());
- <%} else {%>
- set<%=genFeature.getAccessorName()%>(<%if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) {%>(<%=genFeature.getObjectType(genClass)%>)<%}%>newValue);
- <%}%>
- return;
- <%}%>
- }
- <%if (genModel.isMinimalReflectiveMethods()) {%>
- super.eSet(featureID, newValue);
- <%} else {%>
- eDynamicSet(featureID, newValue);
- <%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) {%>
-<%@ include file="Class/eUnset.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public void eUnset(int featureID)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
- <%for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)<%=genFeature.getGetAccessor()%>()).featureMap().clear();
- <%} else {%>
- <%=genFeature.getGetAccessor()%>().clear();
- <%}%>
- <%} else if (genFeature.isUnsettable()) {%>
- unset<%=genFeature.getAccessorName()%>();
- <%} else if (!genFeature.hasEDefault()) {%>
- set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType(genClass)%>)null);
- <%} else {%>
- set<%=genFeature.getAccessorName()%>(<%=genFeature.getEDefault()%>);
- <%}%>
- return;
- <%}%>
- }
- <%if (genModel.isMinimalReflectiveMethods()) {%>
- super.eUnset(featureID);
- <%} else {%>
- eDynamicUnset(featureID);
- <%}%>
- }
-
-<%@ end %><%//Class/eUnset.override.javajetinc%>
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) {%>
-<%@ include file="Class/eIsSet.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useGenerics()) {%>
- <%for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) {%>
- <%if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- @SuppressWarnings("unchecked")
- <%break; }%>
- <%}%>
- <%}%>
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public boolean eIsSet(int featureID)
- {
- switch (featureID<%=negativeOffsetCorrection%>)
- {
-<%for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { String safeNameAccessor = genFeature.getSafeName(); if ("featureID".equals(safeNameAccessor)) { safeNameAccessor = "this." + safeNameAccessor; }%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>:
- <%if (genFeature.hasSettingDelegate()) {%>
- <%if (genFeature.isUnsettable()) {%>
- return isSet<%=genFeature.getAccessorName()%>();
- <%} else {%>
- return <%=genFeature.getUpperName()%>__ESETTING_DELEGATE.dynamicIsSet(this, null, 0);
- <%}%>
- <%} else if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- <%if (genFeature.isVolatile()) {%>
- return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)<%=genFeature.getGetAccessor()%>()).featureMap().isEmpty();
- <%} else {%>
- return <%=safeNameAccessor%> != null && !<%=safeNameAccessor%>.featureMap().isEmpty();
- <%}%>
- <%} else {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=safeNameAccessor%> != null && !<%=safeNameAccessor%>.isEmpty();
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=safeNameAccessor%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>);
- return <%=safeNameAccessor%> != null && !<%=safeNameAccessor%>.isEmpty();
- <%} else {%>
- return !<%=genFeature.getGetAccessor()%>().isEmpty();
- <%}%>
- <%}%>
- <%}%>
- <%} else if (genFeature.isUnsettable()) {%>
- return isSet<%=genFeature.getAccessorName()%>();
- <%} else if (genFeature.isResolveProxies()) {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=safeNameAccessor%> != null;
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>) != null;
- <%} else {%>
- return basicGet<%=genFeature.getAccessorName()%>() != null;
- <%}%>
- <%}%>
- <%} else if (!genFeature.hasEDefault()) {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=safeNameAccessor%> != null;
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>) != null;
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>() != null;
- <%}%>
- <%}%>
- <%} else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {%>
- <%if (genClass.isField(genFeature)) {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (genFeature.isBooleanType()) {%>
- return ((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0) != <%=genFeature.getEDefault()%>;
- <%} else {%>
- return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != <%=genFeature.getUpperName()%>_EFLAG_DEFAULT;
- <%}%>
- <%} else {%>
- return <%=safeNameAccessor%> != <%=genFeature.getEDefault()%>;
- <%}%>
- <%} else {%>
- <%if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%=genFeature.getEDefault()%>) != <%=genFeature.getEDefault()%>;
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>() != <%=genFeature.getEDefault()%>;
- <%}%>
- <%}%>
- <%} else {//datatype%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=genFeature.getEDefault()%> == null ? <%=safeNameAccessor%> != null : !<%=genFeature.getEDefault()%>.equals(<%=safeNameAccessor%>);
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType(genClass)%> <%=safeNameAccessor%> = (<%=genFeature.getImportedType(genClass)%>)eVirtualGet(<%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>, <%=genFeature.getEDefault()%>);
- return <%=genFeature.getEDefault()%> == null ? <%=safeNameAccessor%> != null : !<%=genFeature.getEDefault()%>.equals(<%=safeNameAccessor%>);
- <%} else {%>
- return <%=genFeature.getEDefault()%> == null ? <%=genFeature.getGetAccessor()%>() != null : !<%=genFeature.getEDefault()%>.equals(<%=genFeature.getGetAccessor()%>());
- <%}%>
- <%}%>
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eIsSet(featureID);
-<%} else {%>
- return eDynamicIsSet(featureID);
-<%}%>
- }
-
-<%@ end %><%//Class/eIsSet.override.javajetinc%>
-<%}%>
-<%if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) {%>
- <%if (!genClass.getMixinGenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class<%=singleWildcard%> baseClass)
- {
- <%for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {%>
- if (baseClass == <%=mixinGenClass.getRawImportedInterfaceName()%>.class)
- {
- switch (derivedFeatureID<%=negativeOffsetCorrection%>)
- {
- <%for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>: return <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
- <%}%>
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class<%=singleWildcard%> baseClass)
- {
- <%for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {%>
- if (baseClass == <%=mixinGenClass.getRawImportedInterfaceName()%>.class)
- {
- switch (baseFeatureID)
- {
- <%for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {%>
- case <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>: return <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- <%if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) {%>
- if (baseClass == <%=genClass.getRawImportedInterfaceName()%>.class)
- {
- switch (baseFeatureID<%=negativeOffsetCorrection%>)
- {
- <%for (GenFeature genFeature : genClass.getGenFeatures()) {%>
- case <%=genClass.getQualifiedFeatureID(genFeature)%>: return <%=genClass.getQualifiedFeatureID(genFeature)%><%=positiveOffsetCorrection%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
-<%}%>
-<%if (genModel.isOperationReflection() && isImplementation && (!genClass.getMixinGenOperations().isEmpty() || !genClass.getOverrideGenOperations(genClass.getExtendedGenOperations(), genClass.getImplementedGenOperations()).isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenOperations().isEmpty())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- public int eDerivedOperationID(int baseOperationID, Class<%=singleWildcard%> baseClass)
- {
- <%for (GenClass extendedGenClass : genClass.getExtendedGenClasses()) { List<GenOperation> extendedImplementedGenOperations = extendedGenClass.getImplementedGenOperations(); List<GenOperation> implementedGenOperations = genClass.getImplementedGenOperations();%>
- <%if (!genClass.getOverrideGenOperations(extendedImplementedGenOperations, implementedGenOperations).isEmpty()) {%>
- if (baseClass == <%=extendedGenClass.getRawImportedInterfaceName()%>.class)
- {
- switch (baseOperationID)
- {
- <%for (GenOperation genOperation : extendedImplementedGenOperations) { GenOperation overrideGenOperation = genClass.getOverrideGenOperation(genOperation);%>
- <%if (implementedGenOperations.contains(overrideGenOperation)) {%>
- case <%=extendedGenClass.getQualifiedOperationID(genOperation)%>: return <%=genClass.getQualifiedOperationID(overrideGenOperation)%><%=positiveOperationOffsetCorrection%>;
- <%}%>
- <%}%>
- default: return super.eDerivedOperationID(baseOperationID, baseClass);
- }
- }
- <%}%>
- <%}%>
- <%for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {%>
- if (baseClass == <%=mixinGenClass.getRawImportedInterfaceName()%>.class)
- {
- switch (baseOperationID)
- {
- <%for (GenOperation genOperation : mixinGenClass.getGenOperations()) { GenOperation overrideGenOperation = genClass.getOverrideGenOperation(genOperation);%>
- case <%=mixinGenClass.getQualifiedOperationID(genOperation)%>: return <%=genClass.getQualifiedOperationID(overrideGenOperation != null ? overrideGenOperation : genOperation)%><%=positiveOperationOffsetCorrection%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- <%if (genClass.hasOffsetCorrection() && !genClass.getGenOperations().isEmpty()) {%>
- if (baseClass == <%=genClass.getRawImportedInterfaceName()%>.class)
- {
- switch (baseOperationID<%=negativeOperationOffsetCorrection%>)
- {
- <%for (GenOperation genOperation : genClass.getGenOperations()) {%>
- case <%=genClass.getQualifiedOperationID(genOperation)%>: return <%=genClass.getQualifiedOperationID(genOperation)%><%=positiveOperationOffsetCorrection%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- return super.eDerivedOperationID(baseOperationID, baseClass);
- }
-
-<%}%>
-<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
- <%if (eVirtualValuesField != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected Object[] eVirtualValues()
- {
- return <%=eVirtualValuesField%>;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected void eSetVirtualValues(Object[] newValues)
- {
- <%=eVirtualValuesField%> = newValues;
- }
-
- <%}%>
- <%{ List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());%>
- <%if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>());%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected int eVirtualIndexBits(int offset)
- {
- switch (offset)
- {
- <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
- case <%=i%> :
- return <%=allEVirtualIndexBitFields.get(i)%>;
- <%}%>
- default :
- throw new IndexOutOfBoundsException();
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- protected void eSetVirtualIndexBits(int offset, int newIndexBits)
- {
- switch (offset)
- {
- <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
- case <%=i%> :
- <%=allEVirtualIndexBitFields.get(i)%> = newIndexBits;
- break;
- <%}%>
- default :
- throw new IndexOutOfBoundsException();
- }
- }
-
- <%}%>
- <%}%>
-<%}%>
-<%if (genModel.isOperationReflection() && isImplementation && !genClass.getImplementedGenOperations().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (genModel.useClassOverrideAnnotation()) {%>
- @Override
- <%}%>
- <%if (genModel.useGenerics()) {%>
- <%LOOP: for (GenOperation genOperation : (genModel.isMinimalReflectiveMethods() ? genClass.getImplementedGenOperations() : genClass.getAllGenOperations())) {%>
- <%for (GenParameter genParameter : genOperation.getGenParameters()) {%>
- <%if (genParameter.isUncheckedCast()) {%>
- @SuppressWarnings("unchecked")
- <%break LOOP;}%>
- <%}%>
- <%}%>
- <%}%>
- public Object eInvoke(int operationID, <%=genModel.getImportedName("org.eclipse.emf.common.util.EList")%><%=singleWildcard%> arguments) throws <%=genModel.getImportedName(isGWT ? "org.eclipse.emf.common.util.InvocationTargetException" : "java.lang.reflect.InvocationTargetException")%>
- {
- switch (operationID<%=negativeOperationOffsetCorrection%>)
- {
-<%for (GenOperation genOperation : (genModel.isMinimalReflectiveMethods() ? genClass.getImplementedGenOperations() : genClass.getAllGenOperations())) { List<GenParameter> genParameters = genOperation.getGenParameters(); int size = genParameters.size();%>
- case <%=genClass.getQualifiedOperationID(genOperation)%>:
- <%if (genOperation.isVoid()) {%>
- <%=genOperation.getName()%>(<%for (int i = 0; i < size; i++) { GenParameter genParameter = genParameters.get(i);%><%if (!isJDK50 && genParameter.isPrimitiveType()) {%>(<%}%><%if (genParameter.getTypeGenDataType() == null || !genParameter.getTypeGenDataType().isObjectType() || !genParameter.getRawType().equals(genParameter.getType(genClass)