summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkolb2007-12-07 10:39:19 (EST)
committerbkolb2007-12-07 10:39:19 (EST)
commit2d44b836c315f3cb65b5905395e50b293b06be4e (patch)
treed23fbea23631baa869da595668570e79d3f9270e
downloadorg.eclipse.xpand-2d44b836c315f3cb65b5905395e50b293b06be4e.zip
org.eclipse.xpand-2d44b836c315f3cb65b5905395e50b293b06be4e.tar.gz
org.eclipse.xpand-2d44b836c315f3cb65b5905395e50b293b06be4e.tar.bz2
initial after refactoring
-rw-r--r--.cvsignore1
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/.classpath7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/.cvsignore4
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/.project28
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/about.html33
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/about.ini29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/about.mappings6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/about.properties24
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/build.properties20
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/build.xml_README8
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.properties12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.xml12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/EclipseResourceCheckEvaluator.java36
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheck.java38
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheckEvaluator.java57
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheck.java38
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheckEvaluator.java67
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheck.java42
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheckEvaluator.java63
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java48
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheckEvaluator.java101
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheck.java57
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheckEvaluator.java67
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheck.java38
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheckEvaluator.java38
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/plugin/EclipseChecksPlugin.java68
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaClassExistenceQuickFixer.java97
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaSupertypeQuickFixer.java138
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/MethodExistenceQuickFixer.java134
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/PropertyFileExistenceQuickFixer.java92
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/QuickFixer.java52
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/ResourceExistenceQuickFixer.java88
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/.classpath7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/.cvsignore2
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/.project28
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.html33
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.ini29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.mappings6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.properties24
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/build.properties20
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.properties12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.xml9
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsCheck.java44
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsHelper.java42
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileExistenceCheck.java45
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceContentsCheck.java41
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceExistenceCheck.java38
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/DummyCompCheck.java29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/HelloWorldCheck.java32
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleCheck.java36
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleFailingCheck.java41
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/.classpath7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/.cvsignore6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/.project28
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/COPYING513
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/TODO19
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/about.html33
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/about.ini29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/about.properties24
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/build.properties22
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/build.xml_README8
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/.cvsignore1
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/collapseAll.gifbin0 -> 877 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/directParam.gifbin0 -> 843 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/eval.gifbin0 -> 1000 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/evalAll.gifbin0 -> 972 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/failed.gifbin0 -> 928 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/filter.gifbin0 -> 934 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/indirectParam.gifbin0 -> 854 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/ok.gifbin0 -> 874 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFix.gifbin0 -> 373 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFixAll.gifbin0 -> 1090 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeFile.gifbin0 -> 968 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeView.gifbin0 -> 912 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/refresh.gifbin0 -> 943 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/reload.gifbin0 -> 943 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/someChildrenFailed.gifbin0 -> 919 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/icons/undetermined.gifbin0 -> 907 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/plugin.xml48
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/project.properties29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/schema/check.exsd85
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/RecipePlugin.java153
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/TraceLog.java167
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/action/OpenRecipesAction.java65
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/AutoResizeTableLayout.java134
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/EvalJob.java112
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/LoadJob.java71
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/Messages.java22
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeBrowserView.java511
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeViewHelper.java76
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/messages.properties11
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterContentProvider.java56
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterLabelProvider.java89
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/QuickFixerProvider.java61
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeContentProvider.java81
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeLabelProvider.java86
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/ctrl/ViewControlManager.java291
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IMessagesConstants.java97
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/ITraceLog.java68
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IViewControl.java30
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.java51
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.properties63
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/.classpath7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/.cvsignore2
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/.project28
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/about.html33
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/about.ini29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/about.mappings6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/about.properties24
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/build.properties19
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/plugin.properties12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/AbstractExpressionRecipeCreator.java74
-rw-r--r--plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/RecipeCreationComponent.java75
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/.classpath7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/.cvsignore2
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/.project28
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/about.html33
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/about.ini29
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/about.mappings6
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/about.properties24
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/build.properties19
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/plugin.properties12
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/RecipeCheckTask.java75
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/AtomicCheck.java76
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/Check.java140
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckParameter.java59
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckSet.java47
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CompositeCheck.java94
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalStatus.java25
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalTrigger.java22
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvaluationStop.java21
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluationListener.java23
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluator.java81
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/EvaluationContext.java62
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CannotLoadChecksException.java30
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CheckRegistry.java97
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/util/EclipseCheck.java84
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/util/ElementCompositeCheck.java74
-rw-r--r--plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/util/ICheckEvaluator.java23
-rw-r--r--plugins/org.eclipse.xpand.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xpand.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.xpand.ui/.project29
-rw-r--r--plugins/org.eclipse.xpand.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xpand.ui/META-INF/MANIFEST.MF36
-rw-r--r--plugins/org.eclipse.xpand.ui/about.html33
-rw-r--r--plugins/org.eclipse.xpand.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xpand.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xpand.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xpand.ui/build.properties22
-rw-r--r--plugins/org.eclipse.xpand.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xpand.ui/icons/define.gifbin0 -> 193 bytes
-rw-r--r--plugins/org.eclipse.xpand.ui/icons/templatefile.gifbin0 -> 925 bytes
-rw-r--r--plugins/org.eclipse.xpand.ui/messages.properties11
-rw-r--r--plugins/org.eclipse.xpand.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xpand.ui/plugin.xml194
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/XpandEditorPlugin.java144
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/XpandPluginExecutionContext.java66
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/core/IXpandResource.java22
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/core/internal/XpandResourceImpl.java91
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/core/internal/builder/XpandResourceParser.java118
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/debug/XpandPluginAdapter.java222
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/IXpandEditorActionDefinitionIds.java33
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/Messages.java28
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/PreferencesConstants.java47
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/XpandDocumentProvider.java41
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/XpandEditor.java97
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/XpandSourceViewerConfiguration.java115
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/actions/InsertTextAction.java62
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/actions/XpandEditorContributor.java35
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/codeassist/XpandContentAssistProcessor.java166
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/codeassist/XpandProposalFactoryEclipseImpl.java47
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/color/ColorProvider.java56
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/outline/XpandContentOutlinePage.java120
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/AbstractXpandRuleBasedScanner.java73
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/CommentScanner.java35
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/ContentScanner.java35
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/KeywordRule.java59
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/TemplateTagScanner.java67
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/WhitespaceDetector.java29
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/XpandCommentRule.java69
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/editor/scanning/XpandPartitionScanner.java52
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/internal/XpandLog.java47
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/actions/QuickMenuAction.java299
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/actions/RefactorActionGroup.java338
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/actions/RenameDefineAction.java51
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/renamedefine/RenameDefineProcessor.java188
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/renamedefine/RenameDefineRefactoring.java35
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/renamedefine/RenameDefineRefactoringWizard.java35
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/refactoring/renamedefine/RenameDefineRefactoringWizardPage.java57
-rw-r--r--plugins/org.eclipse.xpand.ui/src/org/eclipse/xpand/ui/wizard/NewTemplateFileWizard.java22
-rw-r--r--plugins/org.eclipse.xpand/.antlr-eclipse6
-rw-r--r--plugins/org.eclipse.xpand/.classpath7
-rw-r--r--plugins/org.eclipse.xpand/.cvsignore7
-rw-r--r--plugins/org.eclipse.xpand/.project29
-rw-r--r--plugins/org.eclipse.xpand/META-INF/MANIFEST.MF25
-rw-r--r--plugins/org.eclipse.xpand/about.html33
-rw-r--r--plugins/org.eclipse.xpand/about.ini29
-rw-r--r--plugins/org.eclipse.xpand/about.mappings6
-rw-r--r--plugins/org.eclipse.xpand/about.properties24
-rw-r--r--plugins/org.eclipse.xpand/build.properties19
-rw-r--r--plugins/org.eclipse.xpand/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xpand/plugin.properties12
-rw-r--r--plugins/org.eclipse.xpand/src/org.eclipse.jdt.core.formatterprefs5
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/AbstractDefinition.java181
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/Advice.java90
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/Definition.java34
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java49
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ExpandStatement.java247
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ExpressionStatement.java69
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/FileStatement.java96
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ForEachStatement.java144
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/IfStatement.java109
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ImportDeclaration.java36
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/LetStatement.java72
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ProtectStatement.java117
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/Statement.java61
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/StatementWithBody.java45
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/Template.java176
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/TextStatement.java54
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/XpandAnalyzable.java24
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/XpandEvaluatable.java21
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/ExpandProposalComputer.java51
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/FastAnalyzer.java390
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/KeywordProposalComputer.java78
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/LazyVar.java25
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/NamespaceProposalComputer.java49
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/StackElement.java24
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/StatementProposalComputer.java180
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/XpandPartition.java23
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/codeassist/XpandTokens.java116
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/debug/ExpandSpecial.java147
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/debug/ForEachSpecial.java71
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/debug/IfSpecial.java41
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/debug/XpandElementAdapter.java115
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/debug/XpandModelPresentation.java182
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/model/AdvicedDefinition.java93
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/model/Procedure.java15
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/model/XpandAdvice.java22
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/model/XpandDefinition.java31
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/model/XpandResource.java28
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/Xpand.g469
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/Xpand.tokens97
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/XpandFactory.java168
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/XpandLexer.java5192
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/XpandLocationAddingParser.java319
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/XpandParseFacade.java84
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/XpandParser.java5010
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/parser/Xpand__.g208
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/ProtectedRegion.java38
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/ProtectedRegionResolver.java23
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/ProtectedRegionResolverImpl.java410
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/ProtectedRegionSyntaxException.java32
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/util/BASE64.java277
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/util/FSIO.java163
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/pr/util/GenericFileFilter.java137
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/type/DefinitionType.java101
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/type/IteratorType.java75
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/type/XpandDefinitionImpl.java87
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/type/XpandIterator.java62
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/type/XpandTypesMetaModel.java83
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/Generator.java403
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/GeneratorAdvice.java129
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/NoSuchTemplateException.java24
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/XpandCompilerIssue.java23
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/XpandExecutionContext.java38
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/XpandExecutionContextImpl.java290
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/XpandFacade.java91
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/XpandUtil.java48
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/BlankLineSkippingOutput.java57
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/FileHandle.java31
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/FileHandleImpl.java109
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/JavaBeautifier.java204
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/NoChangesVetoStrategy.java57
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Outlet.java135
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java36
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java169
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/PostProcessor.java36
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/VetoStrategy.java13
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/XmlBeautifier.java231
-rw-r--r--plugins/org.eclipse.xtend.check.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.check.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.xtend.check.ui/.project28
-rw-r--r--plugins/org.eclipse.xtend.check.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.check.ui/META-INF/MANIFEST.MF29
-rw-r--r--plugins/org.eclipse.xtend.check.ui/about.html33
-rw-r--r--plugins/org.eclipse.xtend.check.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.check.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.check.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.check.ui/build.properties21
-rw-r--r--plugins/org.eclipse.xtend.check.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.check.ui/icons/checkfile.gifbin0 -> 345 bytes
-rw-r--r--plugins/org.eclipse.xtend.check.ui/icons/statement.gifbin0 -> 359 bytes
-rw-r--r--plugins/org.eclipse.xtend.check.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.check.ui/plugin.xml45
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/CheckEditorPlugin.java119
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/core/internal/CheckResourceImpl.java61
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/core/internal/builder/CheckResourceParser.java55
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/CheckDocumentProvider.java48
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/CheckEditor.java33
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/CheckSourceViewerConfiguration.java124
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/EditorImages.java139
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/PreferencesConstants.java38
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/codeassist/CheckContentAssistProcessor.java123
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/codeassist/CheckProposalFactoryEclipseImpl.java48
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/codeassist/KeywordProposalComputer.java61
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/color/ColorProvider.java56
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/lang/CheckTokens.java53
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/outline/CheckContentOutlinePage.java89
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/editor/scanning/ContentScanner.java43
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/internal/CheckLog.java47
-rw-r--r--plugins/org.eclipse.xtend.check.ui/src/org/eclipse/xtend/check/ui/wizard/NewCheckFileWizard.java22
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/.cvsignore4
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/.project28
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/META-INF/MANIFEST.MF48
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/about.html33
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/build.properties22
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/alphab_sort_co.gifbin0 -> 153 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/check_error.gifbin0 -> 603 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/check_warning.gifbin0 -> 600 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/extension.gifbin0 -> 361 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/extension_create.gifbin0 -> 580 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/extension_private.gifbin0 -> 590 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/extension_private_create.gifbin0 -> 353 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/genproject.gifbin0 -> 384 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/import.gifbin0 -> 178 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/import_ext.gifbin0 -> 181 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/import_ns.gifbin0 -> 181 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/imports.gifbin0 -> 185 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/nature_ovr.gifbin0 -> 820 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/operation.gifbin0 -> 193 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/package.gifbin0 -> 227 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/perspective.gifbin0 -> 998 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/property.gifbin0 -> 124 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/search_declarations.gifbin0 -> 361 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/search_references.gifbin0 -> 356 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/statement.gifbin0 -> 359 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/staticproperty.gifbin0 -> 142 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/template.gifbin0 -> 155 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/type.gifbin0 -> 208 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/variable.gifbin0 -> 152 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/xpand_around.gifbin0 -> 595 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/xpand_define.gifbin0 -> 193 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/icons/xpand_template.gifbin0 -> 573 bytes
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/plugin.xml165
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/schema/metamodelContributor.exsd112
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/schema/resourceContributor.exsd97
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/Activator.java235
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/MetamodelContainer.java99
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/MetamodelContributor.java25
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/MetamodelContributor2.java8
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributor.java24
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributorBase.java84
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/AbstractResource.java118
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/IModelManager.java34
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/IModelMarker.java23
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/IXtendXpandProject.java69
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/IXtendXpandResource.java43
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/PluginExecutionContext.java17
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/action/AddXtendXpandNatureAction.java43
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/action/RemoveXtendXpandNatureAction.java43
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/action/SelectionDispatchAction.java237
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/builder/XtendXpandBuilder.java217
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/builder/XtendXpandMarkerManager.java145
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/builder/XtendXpandNature.java92
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/builder/XtendXpandNatureUtil.java106
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/builder/XtendXpandProblemHover.java121
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/i18n/Messages.java31
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/internal/JDTUtil.java142
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/internal/ResourceID.java33
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/internal/XtendXpandModelManager.java125
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/internal/XtendXpandProject.java344
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/Contributor.java83
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/MetamodelContributorRegistry.java145
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtMetaModel.java228
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtOperationImpl.java32
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtPropertyImpl.java36
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtStaticPropertyImpl.java31
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtTypeImpl.java225
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/JdtTypeStrategy.java44
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/javabean/JavaBeanMetamodelContributor.java29
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/javabean/JdtJavaBeanTypeStrategy.java141
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/oaw/JdtOawClassicTypeStrategy.java138
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/metamodel/jdt/oaw/OawClassicMetamodelContributor.java31
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/preferences/PreferenceConstants.java26
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/preferences/PreferenceInitializer.java34
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/properties/MetamodelContributorsPropertyAndPreferencePage.java374
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/search/SearchMatch.java65
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/core/search/XtendXpandSearchEngine.java251
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/AbstractXtendXandSourceViewerConfiguration.java82
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/AbstractXtendXpandEditor.java143
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/BreakpointActionGroup.java177
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/EnableDisableBreakpointAction.java110
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/IOawEditorActionDefinitionIds.java183
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/ToggleBreakpointAction.java97
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/navigation/GenericHyperlink.java105
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/navigation/GenericHyperlinkDetector.java138
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/navigation/OpenAction.java84
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/navigation/WordDetector.java49
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/outlineview/AbstractExtXptContentOutlinePage.java276
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/outlineview/OutlineElement.java52
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/outlineview/OutlineElementComparator.java89
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/outlineview/messages.properties3
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/DeclarationsSearchGroup.java143
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/FindAction.java103
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/FindDeclarationsAction.java60
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/FindReferencesAction.java60
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/ReferencesSearchGroup.java139
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/actions/SearchActionGroup.java148
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/query/OawSearchDeclarationsQuery.java45
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/query/OawSearchQuery.java141
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/query/OawSearchReferencesQuery.java44
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/query/OawSearchResult.java133
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/view/EditorOpener.java121
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/view/IFileSearchContentProvider.java25
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/view/OawSearchResultPage.java272
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/editor/search/view/OawTableContentProvider.java111
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/PluginExecutionContextImpl.java67
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/editor/EditorImages.java167
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/editor/codeassist/AbstractExtXptContentAssistProcessor.java75
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/editor/codeassist/ProposalComparator.java26
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/editor/codeassist/ProposalFactoryEclipseImpl.java203
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/expression/editor/codeassist/TextSelectingProposal.java170
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/internal/XtendLog.java59
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/EclipseHelper.java254
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/NewExtXptResourceWizard.java98
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/NewOAWResourcePage.java43
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/OawProjectWizard.java143
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/OawProjectWizardPage.java112
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/Checks.chk9
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/Extensions.ext7
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/GeneratorExtensions.ext10
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/Model.xmi15
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/Template.xpt25
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/generator.oaw34
-rw-r--r--plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/wizards/example/metamodel.ecore22
-rw-r--r--plugins/org.eclipse.xtend.tests/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.tests/.cvsignore1
-rw-r--r--plugins/org.eclipse.xtend.tests/.project28
-rw-r--r--plugins/org.eclipse.xtend.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.xtend.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.tests/META-INF/MANIFEST.MF27
-rw-r--r--plugins/org.eclipse.xtend.tests/about.html33
-rw-r--r--plugins/org.eclipse.xtend.tests/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.tests/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.tests/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.tests/build.properties10
-rw-r--r--plugins/org.eclipse.xtend.tests/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.tests/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.tests/src/checktest/Comments.chk4
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/Advices.ext5
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/AnotherExt.ext8
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/ExtensionAnalyzationTest.java167
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/ExtensionEvaluationTest.java199
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/Extensions.ext2
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/Helper.java43
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/Reexported.ext9
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/Reexporting.ext9
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/XtendComponentTest.java26
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/XtendFacadeTest.java51
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/check/CheckAnalyzationTest.java104
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/check/CheckEvaluationTest.java129
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/check/CheckFastAnalyzerTest.java92
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/check/Helper.java32
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/codeassist/FastAnalyzerTest.java293
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/EvaluationExceptionTest.java18
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ExecutionContextImplTest.java62
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/PolymorphismTest.java62
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ResourceManagerDefaultImplTest.java75
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/Type1.java42
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/Type2.java39
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/Type3.java6
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/TypeNameUtilTest.java56
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/AType.java41
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/AnalyzationTest.java501
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java408
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/TestExtensions.ext1
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/TestMetaModel.java100
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/codeassist/ExpressionProposalComputerTest.java158
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/codeassist/ExtensionImportProposalComputerTest.java22
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/codeassist/ReverseScannerTest.java114
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/codeassist/TypeProposalComputerTest.java35
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/parser/ParserTest.java167
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/parser/ScannerTest.java63
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/templatefile-iso-8859-1.xpt3
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/templatefile-macroman.xpt3
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/templatefile-utf8.xpt3
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/globalvarExt.ext1
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/globalvarTest.oaw7
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/parser/ExtensionParserTest.java187
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/CollectionFeaturesTest.java99
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/ObjectFeaturesTest.java91
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/TypesComparatorTest.java105
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/BooleanTypeTest.java45
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/CollectionTypeTest.java134
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/EnumTest.java45
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/IntegerTypeTest.java57
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/MyClass.java22
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/MyEnum.java5
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/ObjectTypeTest.java37
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/RealTypeTest.java44
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/StringTypeTest.java54
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/baseimpl/types/TypeTypeTest.java49
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/impl/javabeans/JavaBeansMetaType.java23
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/impl/javabeans/JavaBeansStrategyTest.java68
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/impl/javabeans/MyMetaTypeInterface.java6
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/impl/oawclassic/OawClassicMetaType.java31
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/impl/oawclassic/OawClassicStrategyTest.java72
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/JavaTest.java184
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/InterfaceD.java8
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/Mib.java39
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/OAWTypeD.java9
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/TypeA.java39
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/TypeB.java51
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/typesystem/javabeansimpl/test/TypeC.java23
-rw-r--r--plugins/org.eclipse.xtend.tests/src/test/Bean.java76
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/.options1
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/.project28
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/about.html33
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/build.properties21
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/plugin.xml34
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/BuildJob.java36
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/EmfMetamodelContributor.java52
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/EmfToolsPlugin.java285
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/ProjectAnalyzer.java186
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/actions/AbstractCoreModelTransformerAction.java91
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/actions/AddAnnotationsAction.java65
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf.ui/src/org/eclipse/xtend/typesystem/emf/ui/internal/EmfToolsLog.java48
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/.cvsignore6
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/.project28
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/about.html33
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/antbuild.xml67
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/build.properties19
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EClassType.java187
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EDataTypeType.java52
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EEnumType.java60
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EObjectType.java206
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EcoreUtil2.java199
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EmfMetaModel.java56
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/EmfRegistryMetaModel.java355
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/Mapping.java45
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/Setup.java93
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/XmiReader.java115
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/XmiWriter.java165
-rw-r--r--plugins/org.eclipse.xtend.typesystem.emf/src/org/eclipse/xtend/typesystem/emf/package.html10
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/.cvsignore4
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/.project28
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/about.html33
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/build.properties20
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/plugin.xml10
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/src/org/eclipse/xtend/typesystem/uml2/ui/Uml2AdapterLog.java43
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/src/org/eclipse/xtend/typesystem/uml2/ui/Uml2AdapterPlugin.java221
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2.ui/src/org/eclipse/xtend/typesystem/uml2/ui/Uml2MetamodelContributor.java107
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/.cvsignore4
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/.project34
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/.settings/org.openarchitectureware.base.prefs4
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/about.html33
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/build.properties19
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/Setup.java101
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/UML2MetaModel.java21
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/UML2MetaModelBase.java103
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/UML2Util2.java80
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/UML2Writer.java159
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/EnumType.java87
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/MultipleStereotypeType.java76
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/ProfileMetaModel.java285
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/ProfilingExtensions.java145
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/StereotypeType.java260
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/profiling.ext35
-rw-r--r--plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/utils.ext9
-rw-r--r--plugins/org.eclipse.xtend.ui/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.xtend.ui/.project28
-rw-r--r--plugins/org.eclipse.xtend.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.ui/META-INF/MANIFEST.MF34
-rw-r--r--plugins/org.eclipse.xtend.ui/about.html33
-rw-r--r--plugins/org.eclipse.xtend.ui/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.ui/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.ui/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.ui/build.properties21
-rw-r--r--plugins/org.eclipse.xtend.ui/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.ui/icons/extensionfile.gifbin0 -> 228 bytes
-rw-r--r--plugins/org.eclipse.xtend.ui/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.ui/plugin.xml56
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/XtendEditorPlugin.java101
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/core/IXtendResource.java22
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/core/internal/XtendResourceImpl.java83
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/core/internal/builder/PluginExtensionFactory.java41
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/core/internal/builder/PluginJavaExtensionStatement.java101
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/core/internal/builder/XtendResourceParser.java60
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/debug/ExpressionPluginAdapter.java309
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/PreferencesConstants.java43
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/XtendDocumentProvider.java48
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/XtendEditor.java36
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/XtendSourceViewerConfiguration.java113
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/codeassist/XtendContentAssistProcessor.java133
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/color/ColorProvider.java44
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/lang/XtendTokens.java63
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/outline/XtendContentOutlinePage.java101
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/AbstractXtendRuleBasedScanner.java56
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/CommentScanner.java35
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/ContentScanner.java40
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/KeywordRule.java59
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/StringLiteralScanner.java35
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/WhitespaceDetector.java29
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/editor/scanning/XtendPartitionScanner.java52
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/internal/XtendLog.java43
-rw-r--r--plugins/org.eclipse.xtend.ui/src/org/eclipse/xtend/ui/wizard/NewXtendFileWizard.java22
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/.classpath7
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/.cvsignore1
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/.project40
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/META-INF/MANIFEST.MF22
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/about.html33
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/build.properties19
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/eclipse32.pngbin0 -> 683 bytes
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/plugin.properties14
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xpand/util/stdlib/TracingOutput.java27
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/CloningExtensions.java16
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/CounterExtensions.java54
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/DanglingRefFinder.java71
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/DanglingRefFinderComponent.java30
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/DuplicateHelper.java25
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/DynamicEcoreHelper.java89
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/ElementPropertiesExtensions.java30
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/EmfUtils.java26
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/ExtIssueReporter.java59
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/GlobalVarExtensions.java28
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/IOExtensions.java39
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/MessageLogger.java25
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/PlatformHelper.java11
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/PropertiesExtension.java27
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/PropertiesReader.java41
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/SlotCopier.java65
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/SlotListAdder.java78
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/SlotPrinter.java37
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/TraceComponent.java172
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/UIDHelper.java31
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/cloning.ext14
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/codetracing.ext18
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/collections.ext4
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/counter.ext26
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/crossref.ext6
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/elementprops.ext5
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/globalvar.ext16
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/io.ext30
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/issues.ext13
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/mixin.ext23
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/naming.ext49
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/platformhelper.ext3
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/properties.ext8
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/texttest/Failed.java16
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/texttest/FileTestComponent.java60
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/texttest/Handle.java99
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/trace.ecore34
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing.ext24
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/M2CTraceElement.java32
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/M2MTraceElement.java37
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/MapList.java34
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/TraceElement.java38
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/TraceStore.java67
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/templates/html.xpt75
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/tracing/templates/util.ext20
-rw-r--r--plugins/org.eclipse.xtend.util.stdlib/src/org/eclipse/xtend/util/stdlib/uid.ext4
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/.classpath8
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/.cvsignore2
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/.project34
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/about.html33
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/about.ini29
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/about.properties24
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/build.properties20
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/out/entity.ecore29
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/out/entitymmConstraints.chk25
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/out/entitymmNamingUtils.ext36
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/AnnotationBodyCreator.java25
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/ParamChecker.java40
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/TypeMapper.java33
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/Uml2EcoreXmiWriter.java175
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/templates/files.xpt57
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/templates/utils.ext14
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/uml2Constraints.chk24
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/uml2ecore.ext249
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/uml2ecoreWorkflow.oaw93
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/uml2ecoreWorkflowNoWrite.oaw86
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/src/org/eclipse/xtend/util/uml2ecore/uml2ecoreWorkflowUri.oaw97
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/stuff/.cvsignore1
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/stuff/Ecore.ecore357
-rw-r--r--plugins/org.eclipse.xtend.util.uml2ecore/stuff/UML2.ecore4741
-rw-r--r--plugins/org.eclipse.xtend/.classpath7
-rw-r--r--plugins/org.eclipse.xtend/.cvsignore10
-rw-r--r--plugins/org.eclipse.xtend/.project35
-rw-r--r--plugins/org.eclipse.xtend/META-INF/MANIFEST.MF34
-rw-r--r--plugins/org.eclipse.xtend/TODO.txt0
-rw-r--r--plugins/org.eclipse.xtend/about.html33
-rw-r--r--plugins/org.eclipse.xtend/about.ini29
-rw-r--r--plugins/org.eclipse.xtend/about.mappings6
-rw-r--r--plugins/org.eclipse.xtend/about.properties24
-rw-r--r--plugins/org.eclipse.xtend/build.properties19
-rw-r--r--plugins/org.eclipse.xtend/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--plugins/org.eclipse.xtend/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/check/codeassist/CheckFastAnalyzer.java137
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/BooleanLiteral.java41
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/BooleanOperation.java122
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/Case.java45
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/Cast.java117
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/ChainExpression.java62
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/CollectionExpression.java261
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/ConstructorCallExpression.java59
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/DeclaredParameter.java45
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/Expression.java64
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/FeatureCall.java274
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/GlobalVarExpression.java62
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/ISyntaxElement.java26
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/Identifier.java67
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/IfExpression.java97
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/IntegerLiteral.java42
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java76
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/ListLiteral.java89
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/Literal.java39
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/NullLiteral.java42
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/OperationCall.java357
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/RealLiteral.java42
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/StringLiteral.java47
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/SwitchExpression.java107
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/SyntaxElement.java66
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/TypeSelectExpression.java114
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/CharacterScanner.java59
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ExpressionProposalComputer.java481
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ExtensionImportProposalComputer.java42
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/LazyVar.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/Proposal.java23
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ProposalComputer.java23
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ProposalFactory.java62
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ProposalFactoryDefaultImpl.java86
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ProposalImpl.java48
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/ReverseScanner.java72
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/codeassist/TypeProposalComputer.java58
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/BaseSpecialTreatment.java50
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/EvaluatedElementWrapper.java59
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java278
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionModelPresentation.java100
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/NoResourceSpecial.java52
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/parser/ExpressionFactory.java201
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/parser/SyntaxConstants.java44
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/BuiltinMetaModel.java331
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/FeatureImpl.java49
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/OperationImpl.java126
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/PolymorphicResolver.java131
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/PropertyImpl.java74
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/StaticPropertyImpl.java63
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/TypesComparator.java52
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/BooleanTypeImpl.java65
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/BuiltinBaseType.java26
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/CollectionTypeImpl.java330
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/FeatureTypeImpl.java93
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/IntegerTypeImpl.java274
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/ListTypeImpl.java131
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/ObjectTypeImpl.java151
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/OperationTypeImpl.java75
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/PropertyTypeImpl.java71
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/RealTypeImpl.java193
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/SetTypeImpl.java61
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/StaticPropertyTypeImpl.java65
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/StringTypeImpl.java333
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/TypeTypeImpl.java190
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/baseimpl/types/VoidType.java63
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaBeansMetaModel.java10
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaMetaModel.java160
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaOperationImpl.java57
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaPropertyImpl.java64
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaStaticPropertyImpl.java42
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaTypeImpl.java116
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/JavaTypeStrategy.java26
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/TypeFinder.java29
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/java/beans/JavaBeansStrategy.java211
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/type/impl/oawclassic/OAWClassicStrategy.java81
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/Cache.java43
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/DoubleKeyCache.java37
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/EncodingDetector.java51
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/HigherOrder.java54
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/Pair.java76
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/ProfileCollector.java185
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/StringHelper.java273
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/TripleKeyCache.java37
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/Triplet.java87
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetDetector.java568
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetMatch.java286
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecog_2022.java170
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecog_UTF8.java107
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecog_Unicode.java153
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecog_mbcs.java539
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecog_sbcs.java1061
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/util/internal/icu/CharsetRecognizer.java63
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/XtendAdvice.java55
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/XtendFile.java44
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/XtendResourceParser.java31
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/AbstractExtension.java316
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/Around.java109
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/Check.java197
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java95
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/ExpressionExtensionStatement.java115
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/Extension.java51
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/ExtensionFile.java200
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/ImportStatement.java40
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/JavaExtensionStatement.java141
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/codeassist/FastAnalyzer.java272
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/codeassist/Partition.java41
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/ErrorHandler.java5
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/ExtensionFactory.java80
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/ParseException.java8
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/ParseFacade.java110
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/SyntaxError.java33
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/Xtend.g367
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/Xtend.tokens78
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/XtendError.java8
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/XtendLexer.java4061
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/XtendLocationAddingParser.java251
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/XtendParser.java4224
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/parser/Xtend__.g175
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/types/AdviceContext.java54
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/types/AdviceContextType.java66
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/types/XtendMetaModel.java60
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/XtendComponent.java198
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/XtendFacade.java97
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/check/CheckComponent.java131
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/check/CheckFacade.java53
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/check/CheckUtils.java31
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/AbstractExpressionsUsingWorkflowComponent.java240
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/AnalysationIssue.java82
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/Analyzable.java27
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/Evaluatable.java23
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/EvaluationException.java108
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ExceptionHandler.java9
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ExceptionRaisingNullEvaluationHandler.java12
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ExecutionContext.java81
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ExecutionContextImpl.java518
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ExpressionFacade.java71
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/NullEvaluationHandler.java7
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/Resource.java26
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ResourceManager.java24
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ResourceManagerDefaultImpl.java155
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/ResourceParser.java21
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/TypeNameUtil.java174
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/TypeSystem.java76
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/TypeSystemImpl.java338
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/expression/Variable.java80
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/AbstractTypeImpl.java203
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/Callable.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/Feature.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/MetaModel.java67
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/Operation.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/ParameterizedCallable.java27
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/ParameterizedType.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/Property.java25
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/StaticProperty.java23
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/xtend/typesystem/Type.java100
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/.classpath7
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/.project28
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/META-INF/MANIFEST.MF17
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/about.html33
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/about.ini29
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/about.mappings6
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/about.properties24
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/build.properties20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/.cvsignore1
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/.classpath6
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/.project17
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/AClass.classbin0 -> 766 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/ASubclassedClass.classbin0 -> 436 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/ASuperClass.classbin0 -> 416 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnExtendingInterface.classbin0 -> 252 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnExtendingSuperclassAndInterfaceClass.classbin0 -> 586 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnInterface.classbin0 -> 159 bytes
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/bin/org/openarchitectureware/recipe/eclipseChecks/test/impl/test.properties12
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/AClass.java34
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/AClassAnnotation.java24
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/ASubclassedClass.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/ASuperClass.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnExtendingInterface.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnExtendingSuperclassAndInterfaceClass.java21
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/AnInterface.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/junit-workbench-workspace/test/src/org/openarchitectureware/recipe/eclipseChecks/test/impl/test.properties12
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/plugin.properties12
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/AClass.java34
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/AClassAnnotation.java24
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/ASubclassedClass.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/ASuperClass.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/AnExtendingInterface.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/AnExtendingSuperclassAndInterfaceClass.java21
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/AnInterface.java20
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/impl/test.properties12
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/AllTests.java37
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/ClassExistenceTest.java55
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/InterfaceTest.java84
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/MethodExistenceTest.java87
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/PropertiesTest.java86
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/ResourceExistenceTest.java56
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/org/eclipse/m2t/common/recipe/eclipseChecks/test/tests/TestUtil.java60
-rw-r--r--tests/org.eclipse.m2t.common.recipe.ui.tests/src/workflow.oaw11
-rw-r--r--tests/org.eclipse.xpand.tests/.classpath8
-rw-r--r--tests/org.eclipse.xpand.tests/.cvsignore3
-rw-r--r--tests/org.eclipse.xpand.tests/.project28
-rw-r--r--tests/org.eclipse.xpand.tests/.settings/org.eclipse.core.resources.prefs11
-rw-r--r--tests/org.eclipse.xpand.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.xpand.tests/META-INF/MANIFEST.MF15
-rw-r--r--tests/org.eclipse.xpand.tests/about.html33
-rw-r--r--tests/org.eclipse.xpand.tests/about.ini29
-rw-r--r--tests/org.eclipse.xpand.tests/about.mappings6
-rw-r--r--tests/org.eclipse.xpand.tests/about.properties24
-rw-r--r--tests/org.eclipse.xpand.tests/build.properties11
-rw-r--r--tests/org.eclipse.xpand.tests/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--tests/org.eclipse.xpand.tests/plugin.properties12
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/Adviced.xpt6
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/Advices1.xpt10
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/AnotherTemplate.xpt3
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/EvaluateStart.xpt19
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/Extensions.ext5
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/Foreach.xpt5
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/MultiParams.xpt4
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/Protect.xpt4
-rw-r--r--tests/org.eclipse.xpand.tests/resources/org/eclipse/xpand/internal/tests/evaluate/nested/Nested.xpt3
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/GeneratorAdviceTest.java50
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/GeneratorTest.java45
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/analyze/StatementAnalyzationTest.java67
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/codeassist/FastAnalyzerTest.java232
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/codeassist/KeywordProposalComputerTest.java59
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/codeassist/StatementProposalComputerTest.java106
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/evaluate/AopFeatureTest.java82
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/evaluate/OutputStringImpl.java74
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/evaluate/ProtectedRegionsTest.java58
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/evaluate/StatementEvaluatorTest.java205
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/impl/NameUtilTest.java43
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/NoChangesVetoStrategyTest.java45
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/OutputImplTest.java170
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/XmlBeautifierTest.java162
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/bug175488_beautified.xml4
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/bug175488_input.xml3
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/bug193113_input.xml14
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_defaultEncoding.xml1
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_defaultEncoding_beautified.xml4
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_iso-8859-1.xml1
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_iso-8859-1_beautified.xml5
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_iso-8859-1_header.xml1
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_utf8.xml1
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_utf8_beautified.xml5
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/output/test_utf8_header.xml1
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/parser/StatementParserTest.java142
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/parser/XpandLexerTest.java31
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/pr/ProtectedRegionResolverImplTest.java81
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/pr/testbug185493.txt6
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/pr/testfile1.txt17
-rw-r--r--tests/org.eclipse.xpand.tests/src/org/eclipse/xpand/internal/tests/util/InputStreamLogger.java50
-rw-r--r--tests/org.eclipse.xpand.tests/temp.txt1
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/.classpath7
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/.cvsignore1
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/.project28
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/META-INF/MANIFEST.MF26
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/about.html33
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/about.ini29
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/about.mappings6
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/about.properties24
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/build.properties4
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/plugin.properties12
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/mm.ecore9
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/mm1.ecore9
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/PluginTestBase.java68
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/TestEnvironment.java1142
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/core/JdtJavaBeanTest.java83
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/core/JdtOawClassicTest.java77
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/core/metamodel/jdt/JdtMetaModelTest.java122
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/ASTTest.java50
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/Bug155018Test.java69
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/ExtensionInJar.jarbin0 -> 1426 bytes
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/JdtJavaBeanTest.java79
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/OawProjectTest.java104
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/SimpleProjectTest.java164
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/core/XpandCoreTestBase.java41
-rw-r--r--tests/org.eclipse.xtend.shared.ui.test/src/org/eclipse/xtend/shared/ui/test/xpand2/emf/EmfXpandTest.java165
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/.classpath7
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/.project28
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/META-INF/MANIFEST.MF15
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/about.html33
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/about.ini29
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/about.mappings6
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/about.properties24
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/build.properties12
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/eclipse32.pngbin0 -> 974 bytes
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/metamodels/mm1.ecore12
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/metamodels/subdir/mm2.ecore11
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/metamodels/subdir/model.xmi4
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/plugin.properties12
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/GenModel.ecore194
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/log4j.properties29
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/org/eclipse/xtend/typesystem/emf/EmfMetaModelTest.java161
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/org/eclipse/xtend/typesystem/emf/EnumTypeTest.java88
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/ref/referee.ecore7
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/src/test.ecore27
-rw-r--r--tests/org.eclipse.xtend.typesystem.emf.tests/testmodel.xmi4
1068 files changed, 92502 insertions, 0 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..3a4edf6
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1 @@
+.project
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/.classpath b/plugins/org.eclipse.m2t.common.recipe.astChecks/.classpath
new file mode 100644
index 0000000..304e861
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/.cvsignore b/plugins/org.eclipse.m2t.common.recipe.astChecks/.cvsignore
new file mode 100644
index 0000000..e84557f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/.cvsignore
@@ -0,0 +1,4 @@
+bin
+temp.folder
+oaw-recipe-eclipsechecks.jar
+build.xml
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/.project b/plugins/org.eclipse.m2t.common.recipe.astChecks/.project
new file mode 100644
index 0000000..9ec2c6a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2t.common.recipe.astChecks</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.m2t.common.recipe.astChecks/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8e25770
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 07 13:12:39 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/META-INF/MANIFEST.MF b/plugins/org.eclipse.m2t.common.recipe.astChecks/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6ec5b87
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.m2t.common.recipe.astChecks; singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.m2t.common.recipe.astChecks.plugin.EclipseChecksPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.m2t.common.recipe.astChecks.checks,
+ org.eclipse.m2t.common.recipe.astChecks.plugin,
+ org.eclipse.m2t.common.recipe.astChecks.quickFixers
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.m2t.common.recipe,
+ org.eclipse.m2t.common.recipe.ui
+Eclipse-LazyStart: true
+Import-Package: org.eclipse.jface.text,
+ org.eclipse.text.edits
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/about.html b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.html
new file mode 100644
index 0000000..c207d05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.html
@@ -0,0 +1,33 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/about.ini b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.ini
new file mode 100644
index 0000000..2143c4c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/about.mappings b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.mappings
new file mode 100644
index 0000000..a28390a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/about.properties b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.properties
new file mode 100644
index 0000000..cad256a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=openArchitectureWare code generator\\n\\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright openArchitectureWare contributors and others 2000, 2007. All rights reserved.\n\
+Visit http://www.openArchitectureWare.org
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/build.properties b/plugins/org.eclipse.m2t.common.recipe.astChecks/build.properties
new file mode 100644
index 0000000..563b18f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.properties,\
+ about.mappings,\
+ eclipse32.png,\
+ plugin.properties,\
+ plugin.xml
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/build.xml_README b/plugins/org.eclipse.m2t.common.recipe.astChecks/build.xml_README
new file mode 100644
index 0000000..b086108
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/build.xml_README
@@ -0,0 +1,8 @@
+Hint:
+don't check in build.xml.
+It must be created from plugin.xml locally.
+
+right click on plugin.xml
+--> PDE Tools
+ --> Create Ant Build File
+ \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/eclipse32.png b/plugins/org.eclipse.m2t.common.recipe.astChecks/eclipse32.png
new file mode 100644
index 0000000..ded4869
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/eclipse32.png
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.properties b/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.properties
new file mode 100644
index 0000000..1384de8
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+pluginName=openArchitectureWare recipe eclipse dependant checks
+providerName=openArchitectureWare.org
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.xml b/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.xml
new file mode 100644
index 0000000..761231f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ id="myPoint"
+ name="myPoint"
+ point="org.eclipse.m2t.common.recipe.ui.check">
+ <dummy/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/EclipseResourceCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/EclipseResourceCheckEvaluator.java
new file mode 100644
index 0000000..8d0bf94
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/EclipseResourceCheckEvaluator.java
@@ -0,0 +1,36 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Bernd Kolb 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:
+ * Bernd Kolb - implementation
+ *
+ * </copyright>
+ */
+
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.util.ICheckEvaluator;
+
+public abstract class EclipseResourceCheckEvaluator implements ICheckEvaluator {
+
+ public IWorkspace refreshWorkspace(AtomicCheck check) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ try {
+ workspace.getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e1) {
+ check.fail("could not refresh workspace");
+ }
+ return workspace;
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheck.java
new file mode 100644
index 0000000..8e133c1
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheck.java
@@ -0,0 +1,38 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class JavaClassExistenceCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public JavaClassExistenceCheck( String message, String projectName, String className ) {
+ super( "resource exists", message, EvalTrigger.ON_CHANGE );
+ setProjectName( projectName );
+ setClassName( className );
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter( "projectName", projectName );
+ }
+
+ private void setClassName(String className) {
+ setParameter( "className", className );
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheckEvaluator.java
new file mode 100644
index 0000000..8b90cbb
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassExistenceCheckEvaluator.java
@@ -0,0 +1,57 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+
+public class JavaClassExistenceCheckEvaluator extends EclipseResourceCheckEvaluator {
+
+ private IType foundType = null;
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null) {
+ check.fail("Project not found");
+ }
+ try {
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = javaProject.findType(className);
+ if (type != null) {
+ check.ok();
+ } else {
+ check.fail(check.getShortDescription());
+ }
+ } catch (EvaluationStop stop) {
+ throw stop;
+ } catch (JavaModelException e) {
+ check.fail(e.getMessage());
+ }
+ }
+
+ public IType getFoundType() {
+ return foundType;
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheck.java
new file mode 100644
index 0000000..beed937
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheck.java
@@ -0,0 +1,38 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class JavaClassIsAbstractCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public JavaClassIsAbstractCheck( String message, String projectName, String className ) {
+ super( "resource exists", message, EvalTrigger.ON_CHANGE );
+ setProjectName( projectName );
+ setClassName( className );
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter( "projectName", projectName );
+ }
+
+ private void setClassName(String className) {
+ setParameter( "className", className );
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheckEvaluator.java
new file mode 100644
index 0000000..e1e2156
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaClassIsAbstractCheckEvaluator.java
@@ -0,0 +1,67 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+
+public class JavaClassIsAbstractCheckEvaluator extends EclipseResourceCheckEvaluator {
+
+ private IType foundType = null;
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null) {
+ check.fail("Project not found");
+ }
+ try {
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = javaProject.findType(className);
+ if (type != null) {
+ if ( type.isClass() ) {
+ if ( Flags.isAbstract(type.getFlags()) ) {
+ check.ok();
+ } else {
+ check.fail(check.getShortDescription());
+ }
+ } else {
+ check.fail("type "+type.getElementName()+" is not a class!");
+ }
+ check.ok();
+ } else {
+ check.fail(check.getShortDescription());
+ }
+ } catch (EvaluationStop stop) {
+ throw stop;
+ } catch (JavaModelException e) {
+ check.fail(e.getMessage());
+ }
+ }
+
+ public IType getFoundType() {
+ return foundType;
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheck.java
new file mode 100644
index 0000000..7036396
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheck.java
@@ -0,0 +1,42 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class JavaSupertypeCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public JavaSupertypeCheck(String message, String projectName, String className, String superInterfaceName ) {
+ super( "resource exists", message, EvalTrigger.ON_CHANGE );
+ setProjectName( projectName );
+ setClassName( className );
+ setSupertypeName( superInterfaceName );
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter( "projectName", projectName );
+ }
+
+ private void setClassName(String className) {
+ setParameter( "className", className );
+ }
+
+ private void setSupertypeName(String superClassName) {
+ setParameter( "supertypeName", superClassName );
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheckEvaluator.java
new file mode 100644
index 0000000..25c4620
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/JavaSupertypeCheckEvaluator.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Bernd Kolb 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:
+ * Bernd Kolb - implementation
+ *
+ * </copyright>
+ */
+
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+
+public class JavaSupertypeCheckEvaluator extends EclipseResourceCheckEvaluator {
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ String supertypeName = check.getParameterString("supertypeName");
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null) {
+ check.fail("Project not found");
+ }
+ try {
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = javaProject.findType(className);
+ if (type == null) {
+ check.fail("type not found");
+ }
+ IType superType = javaProject.findType(supertypeName);
+ if (superType == null) {
+ check.fail("Supertype not found");
+ }
+ ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
+ if (hierarchy.contains(superType)) {
+ check.ok();
+ return;
+ } else {
+ check.fail(check.getShortDescription());
+ }
+ } catch (EvaluationStop stop) {
+ throw stop;
+ } catch (JavaModelException e) {
+ check.fail(e.getMessage());
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java
new file mode 100644
index 0000000..89eba92
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheck.java
@@ -0,0 +1,48 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class MethodExistenceCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public MethodExistenceCheck(String message, String projectName, String className, String methodName,
+ String commaSeparatedParamTypes) {
+ super("resource exists", message, EvalTrigger.ON_CHANGE);
+ setProjectName(projectName);
+ setClassName(className);
+ setMethodName(methodName);
+ setCommaSeparatedParamTypes(commaSeparatedParamTypes);
+ }
+
+ private void setCommaSeparatedParamTypes(String commaSeparatedParamTypes) {
+ setParameter("commaSeparatedParamTypes", commaSeparatedParamTypes);
+ }
+
+ private void setMethodName(String methodName) {
+ setParameter("methodName", methodName);
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter("projectName", projectName);
+ }
+
+ private void setClassName(String className) {
+ setParameter("className", className);
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheckEvaluator.java
new file mode 100644
index 0000000..e31add0
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/MethodExistenceCheckEvaluator.java
@@ -0,0 +1,101 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+
+public class MethodExistenceCheckEvaluator extends
+ EclipseResourceCheckEvaluator {
+
+ private IType foundType = null;
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null) {
+ check.fail("Project not found");
+ }
+ try {
+ IJavaProject javaProject = JavaCore.create(project);
+ IType type = javaProject.findType(className);
+ if (type == null) {
+ check.fail("Class not found: " + className);
+ }
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setResolveBindings(true);
+ parser.setProject(javaProject);
+ ITypeBinding binding = (ITypeBinding) parser.createBindings(
+ new IJavaElement[] { type }, null)[0];
+ String methodName = check.getParameterString("methodName");
+ String parameters = check
+ .getParameterString("commaSeparatedParamTypes");
+ for (int i = 0; i < binding.getDeclaredMethods().length; i++) {
+ IMethodBinding methodBinding = binding.getDeclaredMethods()[i];
+
+ if (methodBinding.getName().equals(methodName)) {
+ if (parameters == null) {
+ parameters = "";
+ }
+ StringTokenizer st = new StringTokenizer(parameters, ",");
+ ITypeBinding[] parameterTypes = methodBinding
+ .getParameterTypes();
+ if (st.countTokens() != parameterTypes.length) {
+ continue;
+ }
+ if (st.countTokens() == 0) {
+ check.ok();
+ return;
+ }
+ for (int j = 0; j < parameterTypes.length; j++) {
+ ITypeBinding param = parameterTypes[j];
+
+ if(!param.getQualifiedName().equals(st.nextElement())){
+ break;
+ }
+ check.ok();
+ return;
+ }
+ }
+ }
+ check.fail("Method " + methodName + "(" + parameters
+ + ") not found");
+ } catch (EvaluationStop stop) {
+ throw stop;
+ } catch (JavaModelException e) {
+ check.fail(e.getMessage());
+ }
+ }
+
+ public IType getFoundType() {
+ return foundType;
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheck.java
new file mode 100644
index 0000000..0cc5367
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheck.java
@@ -0,0 +1,57 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class PropertyFileExistenceCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public PropertyFileExistenceCheck(String message, String projectName, String resourceName, String propertyName,
+ String propertyVal) {
+ super("property file exists", message, EvalTrigger.ON_CHANGE);
+ setProjectName(projectName);
+ setResourceName(resourceName);
+ setPropertyName(propertyName);
+ setPropertyVal(propertyVal);
+ }
+
+ public PropertyFileExistenceCheck(String message, String projectName, String resourceName, String propertyName) {
+ this(message, projectName, resourceName, propertyName, null);
+ }
+
+ public PropertyFileExistenceCheck(String message, String projectName, String resourceName) {
+ this(message, projectName, resourceName, null);
+ }
+
+ private void setPropertyName(String propertyName) {
+ setParameter("propertyName", propertyName);
+ }
+
+ private void setPropertyVal(String propertyVal) {
+ setParameter("propertyVal", propertyVal);
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter("projectName", projectName);
+ }
+
+ private void setResourceName(String resourceName) {
+ setParameter("propertyFileLoc", resourceName);
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheckEvaluator.java
new file mode 100644
index 0000000..78fd851
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/PropertyFileExistenceCheckEvaluator.java
@@ -0,0 +1,67 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+
+public class PropertyFileExistenceCheckEvaluator extends EclipseResourceCheckEvaluator {
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameter("projectName").getValue().toString();
+ String resourceName = check.getParameter("propertyFileLoc").getValue().toString();
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null)
+ check.fail("project not found: " + projectName);
+ IFile f = workspace.getRoot().getFile(new Path(projectName + "/" + resourceName));
+ if (!f.exists()) {
+ check.fail("resource not found: " + projectName + "/" + resourceName);
+ }
+ Properties p = new Properties();
+ try {
+ p.load(new FileInputStream(f.getLocation().toOSString()));
+ } catch (FileNotFoundException e) {
+ check.fail("File not found");
+ } catch (IOException e) {
+ check.fail("Could not load file");
+ }
+ String propertyName = check.getParameterString("propertyName");
+ if (propertyName != null) {
+ if (p.containsKey(propertyName)) {
+ String propertyVal = check.getParameterString("propertyVal");
+ if (propertyVal != null) {
+ if (p.get(propertyName).equals(propertyVal)) {
+ check.ok();
+ } else {
+ check.fail("Property " + propertyName + " has wrong value");
+ }
+ }
+ check.ok();
+ } else {
+ check.fail("Property does not exist: " + propertyName);
+ }
+ }
+ check.ok();
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheck.java
new file mode 100644
index 0000000..0767e05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheck.java
@@ -0,0 +1,38 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public class ResourceExistenceCheck extends EclipseCheck {
+
+ private static final long serialVersionUID = 2L;
+
+ public ResourceExistenceCheck( String message, String projectName, String resourceName ) {
+ super( "resource exists", message, EvalTrigger.ON_CHANGE );
+ setProjectName( projectName );
+ setResourceName( resourceName );
+ }
+
+ private void setProjectName(String projectName) {
+ setParameter( "projectName", projectName );
+ }
+
+ private void setResourceName(String resourceName) {
+ setParameter( "resourceName", resourceName );
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheckEvaluator.java
new file mode 100644
index 0000000..fc50972
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/checks/ResourceExistenceCheckEvaluator.java
@@ -0,0 +1,38 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.checks;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+
+public class ResourceExistenceCheckEvaluator extends EclipseResourceCheckEvaluator {
+
+ public void evaluate(AtomicCheck check) {
+ String projectName = check.getParameter("projectName").getValue().toString();
+ String resourceName = check.getParameter("resourceName").getValue().toString();
+ IWorkspace workspace = refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project == null)
+ check.fail("project not found: " + projectName);
+ IFile f = workspace.getRoot().getFile(new Path(projectName + "/" + resourceName));
+ if (!f.exists())
+ check.fail("resource not found: " + projectName + "/" + resourceName);
+ check.ok();
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/plugin/EclipseChecksPlugin.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/plugin/EclipseChecksPlugin.java
new file mode 100644
index 0000000..527291d
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/plugin/EclipseChecksPlugin.java
@@ -0,0 +1,68 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.plugin;
+
+import org.eclipse.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class EclipseChecksPlugin extends AbstractUIPlugin {
+
+ //The shared instance.
+ private static EclipseChecksPlugin plugin;
+
+ /**
+ * The constructor.
+ */
+ public EclipseChecksPlugin() {
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static EclipseChecksPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin("recipe.eclipsechecks.plugin", path);
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaClassExistenceQuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaClassExistenceQuickFixer.java
new file mode 100644
index 0000000..6eae08e
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaClassExistenceQuickFixer.java
@@ -0,0 +1,97 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.astChecks.checks.JavaClassExistenceCheck;
+import org.eclipse.m2t.common.recipe.astChecks.checks.JavaClassExistenceCheckEvaluator;
+
+public class JavaClassExistenceQuickFixer extends QuickFixer {
+
+ private static final String DEFAULT_CLASS_LOCATION = "man-src";
+
+ public JavaClassExistenceQuickFixer(JavaClassExistenceCheck check,
+ JavaClassExistenceCheckEvaluator checkEvaluator) {
+ super(check, checkEvaluator);
+ }
+
+ @Override
+ public IStatus quickFix() {
+
+ // we create the class with the jdt as the check wants it to be
+ try {
+ this.createClass();
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void createClass() throws JavaModelException, CoreException {
+
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = checkEvaluator.refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ IJavaProject javaProject = JavaCore.create(project);
+
+ String contents = new StringBuffer().append("\n\npublic class ")
+ .append(className).append(
+ " //TODO: generated class stub\n{\n\n}").toString();
+
+ // Here we first try to put generated classes after quick fixing in
+ // the same package than their respective classes:
+ String relatedSuperclassName = className+JavaSupertypeQuickFixer.DEFAULT_SUPERCLASS_NAME_TAIL;
+ IType relatedSupertype = javaProject.findType(relatedSuperclassName);
+ if (relatedSupertype != null) {
+ relatedSupertype.getPackageFragment().createCompilationUnit(
+ className + ".java", contents, false, null);
+ //relatedSupertype.getPackageFragment().save(null, false);
+ } else {
+
+ // If we can't, then here's a solution involving a default output
+ // location for generated classes after quick fixing:
+
+ IFolder folder = javaProject.getProject().getFolder(
+ JavaClassExistenceQuickFixer.DEFAULT_CLASS_LOCATION);
+ if (!folder.exists()) {
+ folder.create(false, true, null);
+ //javaProject.save(null, false);
+ }
+ IPackageFragment pf = javaProject.findPackageFragment(new Path(
+ javaProject.getPath().toString()
+ + java.io.File.separatorChar
+ + JavaClassExistenceQuickFixer.DEFAULT_CLASS_LOCATION));
+ pf.createCompilationUnit(className + ".java", contents,
+ false, null);
+
+ }
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaSupertypeQuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaSupertypeQuickFixer.java
new file mode 100644
index 0000000..f33d948
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/JavaSupertypeQuickFixer.java
@@ -0,0 +1,138 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.m2t.common.recipe.astChecks.checks.JavaSupertypeCheck;
+import org.eclipse.m2t.common.recipe.astChecks.checks.JavaSupertypeCheckEvaluator;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+public class JavaSupertypeQuickFixer extends QuickFixer {
+
+ public static final String DEFAULT_SUPERCLASS_NAME_TAIL="ImplBase";
+
+ public JavaSupertypeQuickFixer(JavaSupertypeCheck check,JavaSupertypeCheckEvaluator checkEvaluator){
+ super(check,checkEvaluator);
+ }
+
+ @Override
+ public IStatus quickFix() {
+
+ // OPTIMISTIC OR COMPOSITE CHECKS ONLY QUICK FIXING:
+ // these following lines shouldn't even be uncommented
+ // PESSIMISTIC OR ATOMIC (LEAF) CHECKS QUICK FIXING :
+ // uncomment the following lines to be pessimistic
+ // (if the class we have to supertype doesn't exist,
+ // we create it with so we can go on with the fixing:
+ // To achieve this, we look in this check's parent's tree if there's
+ // no Check already there and ready to help.)
+ /*
+ * JavaClassExistenceCheckEvaluator JCECheckEvaluator = new
+ * JavaClassExistenceCheckEvaluator(); for (Check c :
+ * check.getParent().getChildren()) { if (c instanceof
+ * JavaClassExistenceCheck) { JavaClassExistenceCheck JCECheck =
+ * (JavaClassExistenceCheck) c; JCECheckEvaluator.evaluate(JCECheck); if
+ * (JCECheck.getStatus() == EvalStatus.FAILED) { new
+ * JavaClassExistenceQuickFixer(JCECheck).quickFix(); } break;// yes, I
+ * know break;'s bad... } }
+ */
+
+ // then we add the willed supertype to the class
+ // we-are-now-optimisticly-sure-to-exist
+ try {
+ this.addSuperClass();
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+
+ return Status.OK_STATUS;
+
+ }
+
+ private void addSuperClass() throws JavaModelException {
+
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = checkEvaluator.refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IType type = javaProject.findType(className);
+ IType supertype = javaProject.findType(className + JavaSupertypeQuickFixer.DEFAULT_SUPERCLASS_NAME_TAIL);
+
+ try {
+ // creation of a Document
+ ICompilationUnit cu = type.getCompilationUnit();
+ Document document = new Document(cu.getBuffer().getContents());
+
+ // creation of DOM/AST from a ICompilationUnit
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setSource(cu);
+ CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
+
+ // start record of the modifications
+ astRoot.recordModifications();
+
+ // modify the AST
+ AST ast = astRoot.getRoot().getAST();
+ SimpleType t = ast.newSimpleType(ast.newSimpleName(supertype
+ .getElementName()));
+
+ TypeDeclaration typeDeclaration = (TypeDeclaration) astRoot.types()
+ .get(0);
+
+ typeDeclaration.setSuperclassType(t);
+
+ // computation of the text edits
+ TextEdit edits = astRoot.rewrite(document, cu.getJavaProject()
+ .getOptions(true));
+
+ // computation of the new source code
+ try {
+ edits.apply(document);
+ } catch (MalformedTreeException e) {
+ e.printStackTrace();
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ String newSource = document.get();
+
+ // update of the compilation unit
+ cu.getBuffer().setContents(newSource);
+ cu.save(null, false);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/MethodExistenceQuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/MethodExistenceQuickFixer.java
new file mode 100644
index 0000000..e02560b
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/MethodExistenceQuickFixer.java
@@ -0,0 +1,134 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.astChecks.checks.MethodExistenceCheck;
+import org.eclipse.m2t.common.recipe.astChecks.checks.MethodExistenceCheckEvaluator;
+
+public class MethodExistenceQuickFixer extends QuickFixer {
+
+ private static final String DEFAULT_METHOD_MODIFIERS = "public void";
+
+ public MethodExistenceQuickFixer(MethodExistenceCheck check,MethodExistenceCheckEvaluator checkEvaluator){
+ super(check,checkEvaluator);
+ }
+
+ @Override
+ public IStatus quickFix() {
+
+ // OPTIMISTIC OR COMPOSITE CHECKS ONLY QUICK FIXING:
+ // these following lines shouldn't even be uncommented
+ // PESSIMISTIC OR ATOMIC (LEAF) CHECKS QUICK FIXING :
+ // uncomment the following lines to be pessimistic
+ // (if the class we have to supertype doesn't exist,
+ // we create it with so we can go on with the fixing:
+ // To achieve this, we look in this check's parent's tree if there's
+ // no Check already there and ready to help.)
+ /*
+ * JavaClassExistenceCheckEvaluator JCECheckEvaluator = new
+ * JavaClassExistenceCheckEvaluator(); for (Check c :
+ * JSCheck.getParent().getChildren()) { if (c instanceof
+ * JavaClassExistenceCheck) { JavaClassExistenceCheck JCECheck =
+ * (JavaClassExistenceCheck) c; JCECheckEvaluator.evaluate(JCECheck); if
+ * (JCECheck.getStatus() == EvalStatus.FAILED) { new
+ * JavaClassExistenceQuickFixer(JCECheck).quickFix(); } break;// yes, I
+ * know break;'s bad... } }
+ */
+
+ // then we add the willed supertype to the class
+ // we-are-now-optimisticly-sure-to-exist
+ try {
+ this.addEmptyMethod();// equivalent of creating a method
+ // actually...
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+
+ return Status.OK_STATUS;
+
+ }
+
+ private void addEmptyMethod() throws JavaModelException {
+
+ String projectName = check.getParameterString("projectName");
+ String className = check.getParameterString("className");
+ IWorkspace workspace = checkEvaluator.refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IType type = javaProject.findType(className);
+
+ String methodName = check.getParameterString("methodName");
+ String[] parameterTypes = check.getParameterString(
+ "commaSeparatedParamTypes").split(",");
+
+ // let's create the import for the used types
+ for (int i = 0; i < parameterTypes.length; i++) {
+ // except for all java.lang.* packages and primitive types, of
+ // course
+ if (!parameterTypes[i].contains("java.lang")
+ && parameterTypes[i].contains("."))
+ type.getCompilationUnit().createImport(parameterTypes[i], null,
+ null);
+
+ // ...and simplify simplifiable types' names
+ if (parameterTypes[i].contains(".")) {
+ String s = "";
+ // ...by getting the last dot-separated token of the completely
+ // qualified name
+ for (StringTokenizer stk = new StringTokenizer(
+ parameterTypes[i], "."); stk.hasMoreTokens(); s = stk
+ .nextToken())
+ ;
+ parameterTypes[i] = s;
+ }
+ }
+
+ // then we create the method in itself..:
+ StringBuilder sbl = new StringBuilder();
+
+ for (int i = 0; i < parameterTypes.length; i++) {
+ if (0 < i)
+ sbl.append(", ");
+ sbl.append(parameterTypes[i]).append(" arg").append(i);
+ }
+
+ String parametersString = sbl.toString();
+ StringBuffer sbf = new StringBuffer().append(MethodExistenceQuickFixer.DEFAULT_METHOD_MODIFIERS+' ').append(
+ methodName).append("(").append(parametersString).append(
+ "){\n//TODO: generated method stub\n\n}");
+ String contents = sbf.toString();
+
+ try {
+ type.createMethod(contents, null, false, null);
+ } catch (JavaModelException e) {
+ System.out
+ .println("well, the method already exists, so it's not useful to create it...");
+ }
+ type.getCompilationUnit().save(null, false);
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/PropertyFileExistenceQuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/PropertyFileExistenceQuickFixer.java
new file mode 100644
index 0000000..03f44b0
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/PropertyFileExistenceQuickFixer.java
@@ -0,0 +1,92 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.astChecks.checks.PropertyFileExistenceCheck;
+import org.eclipse.m2t.common.recipe.astChecks.checks.PropertyFileExistenceCheckEvaluator;
+
+public class PropertyFileExistenceQuickFixer extends QuickFixer {
+
+ public PropertyFileExistenceQuickFixer(PropertyFileExistenceCheck check,
+ PropertyFileExistenceCheckEvaluator checkEvaluator) {
+ super(check, checkEvaluator);
+ }
+
+ @Override
+ public IStatus quickFix() {
+
+ // we create the class with the jdt as the check wants it to be
+ try {
+ this.createPropertyFile();
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void createPropertyFile() throws IOException, CoreException {
+
+ String projectName = check.getParameterString("projectName");
+ String resourceName = check.getParameter("propertyFileLoc").getValue()
+ .toString();
+ IWorkspace workspace = checkEvaluator.refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+
+ IPath path = new Path(resourceName);
+ IFile f = project.getFile(path);
+ Properties p = new Properties();
+ p.load(new FileInputStream(f.getLocation().toOSString()));
+
+ String propertyName = check.getParameterString("propertyName");
+ String propertyValue = check.getParameterString("propertyVal");
+
+ if (!p.containsKey(propertyName))
+ p.put(propertyName, propertyValue);
+ else
+ p.setProperty(propertyName, propertyValue);
+
+ p.store(new FileOutputStream(f.getLocation().toOSString()),
+ "generated property added");
+
+
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/QuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/QuickFixer.java
new file mode 100644
index 0000000..6c46c2d
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/QuickFixer.java
@@ -0,0 +1,52 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.m2t.common.recipe.astChecks.checks.EclipseResourceCheckEvaluator;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+import org.eclipse.m2t.common.recipe.util.EclipseCheck;
+
+public abstract class QuickFixer {
+
+ //So... QuickFixers are bound to EclipseChecks and EclipseResourceCheckEvaluators
+ protected EclipseCheck check=null;
+ protected EclipseResourceCheckEvaluator checkEvaluator=null;
+
+
+ protected QuickFixer(EclipseCheck check,EclipseResourceCheckEvaluator checkEvaluator){
+ this.check=check;
+ this.checkEvaluator=checkEvaluator;
+ }
+
+ public IStatus quickFixAndEvaluate(){
+
+ if(quickFix().equals(Status.CANCEL_STATUS))
+ return Status.CANCEL_STATUS;
+
+ // then we update the check and consider the work as done
+ try {
+ checkEvaluator.evaluate(check);
+ } catch (EvaluationStop e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+
+ protected abstract IStatus quickFix();
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/ResourceExistenceQuickFixer.java b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/ResourceExistenceQuickFixer.java
new file mode 100644
index 0000000..7dc3397
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.astChecks/src/org/eclipse/m2t/common/recipe/astChecks/quickFixers/ResourceExistenceQuickFixer.java
@@ -0,0 +1,88 @@
+/* <copyright>
+ *
+ * Copyright (c) 2007 OAW Team, SD-mda 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:
+ * Markus Voelter - Initial API and implementation
+ * Jeremie Ratomposon <jratomposon@sdmda.com>
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.astChecks.quickFixers;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2t.common.recipe.astChecks.checks.ResourceExistenceCheck;
+import org.eclipse.m2t.common.recipe.astChecks.checks.ResourceExistenceCheckEvaluator;
+
+public class ResourceExistenceQuickFixer extends QuickFixer {
+
+ public ResourceExistenceQuickFixer(ResourceExistenceCheck check,
+ ResourceExistenceCheckEvaluator checkEvaluator) {
+ super(check, checkEvaluator);
+ }
+
+ @Override
+ public IStatus quickFix() {
+
+ // we create the class with the jdt as the check wants it to be
+ try {
+ this.createResource();
+ } catch (JavaModelException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+
+ return Status.OK_STATUS;
+
+ }
+
+ private void createResource() throws FileNotFoundException, CoreException {
+
+ String projectName = check.getParameterString("projectName");
+ String resourceName = check.getParameterString("resourceName");
+ IWorkspace workspace = checkEvaluator.refreshWorkspace(check);
+ IProject project = workspace.getRoot().getProject(projectName);
+
+ IFile f = project.getFile(resourceName);
+
+ int lastSeparatorIndex = resourceName
+ .lastIndexOf(java.io.File.separatorChar);
+ //if the resource name indicates a folder
+ if (lastSeparatorIndex != -1) {
+ String folderName = resourceName.substring(0, lastSeparatorIndex);
+ IFolder fo = project.getFolder(folderName);
+ //we create the folder if not already present in the current project
+ if (!fo.exists() && !folderName.equals(""))//to avoid user mistakes such as names like messages.properties/ (oops)
+ fo.create(false, true, null);
+ }
+
+ if (!f.exists()) {
+ InputStream source = new ByteArrayInputStream(
+ "#TODO: generated property file stub\n".getBytes());
+ f.create(source, true, null);
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.classpath b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.classpath
new file mode 100644
index 0000000..48c8852
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="build"/>
+</classpath>
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.cvsignore b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.cvsignore
new file mode 100644
index 0000000..9d0b71a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.cvsignore
@@ -0,0 +1,2 @@
+build
+dist
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.project b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.project
new file mode 100644
index 0000000..21b5ceb
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2t.common.recipe.simpleChecks</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..de20e94
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 07 13:12:29 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/META-INF/MANIFEST.MF b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..58c1ccc
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.m2t.common.recipe.simpleChecks;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.m2t.common.recipe,
+ org.eclipse.m2t.common.recipe.ui
+Export-Package: org.eclipse.m2t.common.recipe.simpleChecks.file,
+ org.eclipse.m2t.common.recipe.simpleChecks.java,
+ org.eclipse.m2t.common.recipe.simpleChecks.test
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.html b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.html
new file mode 100644
index 0000000..c207d05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.html
@@ -0,0 +1,33 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.ini b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.ini
new file mode 100644
index 0000000..2143c4c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.mappings b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.mappings
new file mode 100644
index 0000000..a28390a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.properties b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.properties
new file mode 100644
index 0000000..cad256a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=openArchitectureWare code generator\\n\\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright openArchitectureWare contributors and others 2000, 2007. All rights reserved.\n\
+Visit http://www.openArchitectureWare.org
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/build.properties b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/build.properties
new file mode 100644
index 0000000..563b18f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.properties,\
+ about.mappings,\
+ eclipse32.png,\
+ plugin.properties,\
+ plugin.xml
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/eclipse32.png b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/eclipse32.png
new file mode 100644
index 0000000..ded4869
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/eclipse32.png
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.properties b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.properties
new file mode 100644
index 0000000..77890f2
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+pluginName=openArchitectureWare recipe simple checks
+providerName=openArchitectureWare.org
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.xml b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.xml
new file mode 100644
index 0000000..9fb547e
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.m2t.common.recipe.ui.check">
+ <dummy/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsCheck.java
new file mode 100644
index 0000000..208cca3
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsCheck.java
@@ -0,0 +1,44 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.file;
+
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public class FileContentsCheck extends FileExistenceCheck {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2263478102108307800L;
+ private String substring;
+
+ public FileContentsCheck( String message, String absoluteFileName, String substr ) {
+ super( message, absoluteFileName );
+ setSubstring( substr );
+ }
+
+ private void setSubstring(String substr) {
+ this.substring = substr;
+ setParameter( "substring", substring );
+ }
+
+ public void evaluate(EvaluationContext ctx) {
+ super.evaluate(ctx);
+ FileContentsHelper.checkContent( this, absoluteFileName, substring );
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsHelper.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsHelper.java
new file mode 100644
index 0000000..31e62bc
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileContentsHelper.java
@@ -0,0 +1,42 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.file;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+
+public class FileContentsHelper {
+
+ public static void checkContent( AtomicCheck c, String filename, String substring ) {
+ StringBuffer b = new StringBuffer();
+ BufferedReader r;
+ try {
+ r = new BufferedReader(new FileReader(filename));
+ while ( r.ready() ) {
+ b.append( r.readLine() );
+ }
+ if ( b.toString().indexOf(substring) >= 0 ) c.ok();
+ else c.fail( "file does not contain '"+substring+"'");
+ } catch (FileNotFoundException e) {
+ c.fail( "cannot read file: "+filename);
+ } catch (IOException e) {
+ c.fail( "cannot read file: "+filename);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileExistenceCheck.java
new file mode 100644
index 0000000..bf095a4
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/file/FileExistenceCheck.java
@@ -0,0 +1,45 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.file;
+
+import java.io.File;
+
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public class FileExistenceCheck extends AtomicCheck {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2078121954544879502L;
+ protected String absoluteFileName;
+
+ public FileExistenceCheck( String message, String absoluteFileName ) {
+ super( "file exists", message );
+ setAbsoluteFileName( absoluteFileName );
+ }
+
+ protected void setAbsoluteFileName(String fn) {
+ this.absoluteFileName = fn;
+ setParameter( "file name", absoluteFileName );
+ }
+
+ public void evaluate(EvaluationContext ctx) {
+ if ( new File( absoluteFileName ).exists() ) ok();
+ else fail("file not found: "+absoluteFileName);
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceContentsCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceContentsCheck.java
new file mode 100644
index 0000000..443d8a0
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceContentsCheck.java
@@ -0,0 +1,41 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.java;
+
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+import org.eclipse.m2t.common.recipe.simpleChecks.file.FileContentsHelper;
+
+public class ClassSourceContentsCheck extends ClassSourceExistenceCheck {
+
+ private static final long serialVersionUID = -7129376022523632888L;
+
+ private String substring;
+
+ public ClassSourceContentsCheck(String message, String srcDir, String fqClassName, String substr) {
+ super(message, srcDir, fqClassName);
+ setSubstring(substr);
+ }
+
+ private void setSubstring(String substr) {
+ this.substring = substr;
+ setParameter("substring", substring);
+ }
+
+ public void evaluate(EvaluationContext ctx) {
+ super.evaluate(ctx);
+ FileContentsHelper.checkContent(this, absoluteFileName, substring);
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceExistenceCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceExistenceCheck.java
new file mode 100644
index 0000000..cefb935
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/java/ClassSourceExistenceCheck.java
@@ -0,0 +1,38 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.java;
+
+import org.eclipse.m2t.common.recipe.simpleChecks.file.FileExistenceCheck;
+
+public class ClassSourceExistenceCheck extends FileExistenceCheck {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6785439681285163193L;
+
+ public ClassSourceExistenceCheck(String message, String srcDir, String fqClassName) {
+ super(message, "");
+ setParameter("class name", fqClassName);
+ setParameter("src dir", srcDir);
+ setAbsoluteFileName(srcDir + "/" + classNameToFileName(fqClassName));
+ }
+
+ private String classNameToFileName(String fqClassName) {
+ String s = fqClassName.replace('.', '/');
+ return s + ".java";
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/DummyCompCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/DummyCompCheck.java
new file mode 100644
index 0000000..61b5500
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/DummyCompCheck.java
@@ -0,0 +1,29 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.test;
+
+import org.eclipse.m2t.common.recipe.core.CompositeCheck;
+
+public class DummyCompCheck extends CompositeCheck {
+
+ private static final long serialVersionUID = 1L;
+
+ public DummyCompCheck() {
+ super("comp", "a simple comp test" );
+ setParameter("cc", "yy");
+
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/HelloWorldCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/HelloWorldCheck.java
new file mode 100644
index 0000000..f96244d
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/HelloWorldCheck.java
@@ -0,0 +1,32 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.test;
+
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public class HelloWorldCheck extends AtomicCheck {
+
+ private static final long serialVersionUID = 1L;
+
+ public HelloWorldCheck() {
+ super( "hello world", "this check always succeeds" );
+ }
+
+ public void evaluate(EvaluationContext c) {
+ ok();
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleCheck.java
new file mode 100644
index 0000000..f101594
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleCheck.java
@@ -0,0 +1,36 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.test;
+
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public class SimpleCheck extends AtomicCheck {
+
+ private static final long serialVersionUID = 1L;
+
+ public SimpleCheck() {
+ super("test", "a simple test", EvalTrigger.ON_REQUEST);
+ setParameter( "p1", "v1" );
+ setParameter( "p2", "v2" );
+ }
+
+ public void evaluate( EvaluationContext ctx ) {
+ setStatus( EvalStatus.OK );
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleFailingCheck.java b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleFailingCheck.java
new file mode 100644
index 0000000..48140e1
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.simpleChecks/src/org/eclipse/m2t/common/recipe/simpleChecks/test/SimpleFailingCheck.java
@@ -0,0 +1,41 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.simpleChecks.test;
+
+import org.eclipse.m2t.common.recipe.core.AtomicCheck;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public class SimpleFailingCheck extends AtomicCheck {
+
+ private static final long serialVersionUID = 1L;
+
+ public SimpleFailingCheck() {
+ super("test", "a simple failing test", EvalTrigger.ON_REQUEST);
+ setLongDescription( "lfds saj fojroe toe ldxyjfoire utaldsfjoer utlfdjcosa iutoe jfdoure tojdfvsdtoösad htpewoirfadstzwer" );
+ }
+
+ public void evaluate( EvaluationContext ctx ) {
+ try {
+ Thread.sleep(20);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ setStatus( EvalStatus.FAILED );
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/.classpath b/plugins/org.eclipse.m2t.common.recipe.ui/.classpath
new file mode 100644
index 0000000..304e861
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/.cvsignore b/plugins/org.eclipse.m2t.common.recipe.ui/.cvsignore
new file mode 100644
index 0000000..6d28a18
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/.cvsignore
@@ -0,0 +1,6 @@
+temp.folder
+eclipse-plugin_*.zip
+architectureware-eclipsesrc.zip
+bin
+oaw-recipe-eclipse.jar
+build.xml
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/.project b/plugins/org.eclipse.m2t.common.recipe.ui/.project
new file mode 100644
index 0000000..bafb086
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2t.common.recipe.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.m2t.common.recipe.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..15b0af7
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 07 13:12:16 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/COPYING b/plugins/org.eclipse.m2t.common.recipe.ui/COPYING
new file mode 100644
index 0000000..43d4870
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/COPYING
@@ -0,0 +1,513 @@
+
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.m2t.common.recipe.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..02fc50a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.m2t.common.recipe.ui; singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.m2t.common.recipe.ui.RecipePlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.m2t.common.recipe
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.m2t.common.recipe.ui,
+ org.eclipse.m2t.common.recipe.ui.action,
+ org.eclipse.m2t.common.recipe.ui.recipeBrowser,
+ org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers,
+ org.eclipse.m2t.common.recipe.ui.shared.ctrl,
+ org.eclipse.m2t.common.recipe.ui.shared.iface,
+ org.eclipse.m2t.common.recipe.ui.shared.messages
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/TODO b/plugins/org.eclipse.m2t.common.recipe.ui/TODO
new file mode 100644
index 0000000..302b9e3
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/TODO
@@ -0,0 +1,19 @@
+SHORT-TERM:
+* add JavaClassExistenceQuickFixer : -Done- (partial fixing : stub generation only)
+* add JavaSupertypeExistenceQuickFixer : -Done- (complete fixing)
+* add MethodExistenceQuickFixer : -Done- (partial fixing : stub generation)
+* add PropertyFileExistenceQuickFixer : -Done- (complete fixing)
+* add ResourceExistenceQuickFixer : -Done- (partial fixing : stub generation)
+* add more fixes...
+* trigger "open recipe" action on double click and.. :
+* ..remove the NullPointerException happening about that :
+* trigger checks' evaluations from appropriate workspace changes :
+* add monitoring on quick fixing actions :
+* add a description popup instead of the plain anchored panel :
+* change the checks toString() method to a more human-friendly one, instead of the java Object.toString() default one :
+
+LONG-TERM:
+* maybe refactor check classes chaining them by dependencies (like JavaSupertypeCheck depends on JavaClasseExistenceCheck)
+* idem for quickFixers
+* allow creation of recipe creators a non-Java way, for example extending and using the XPAND language
+ \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/about.html b/plugins/org.eclipse.m2t.common.recipe.ui/about.html
new file mode 100644
index 0000000..c207d05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/about.html
@@ -0,0 +1,33 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/about.ini b/plugins/org.eclipse.m2t.common.recipe.ui/about.ini
new file mode 100644
index 0000000..2143c4c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/about.mappings b/plugins/org.eclipse.m2t.common.recipe.ui/about.mappings
new file mode 100644
index 0000000..a28390a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/about.properties b/plugins/org.eclipse.m2t.common.recipe.ui/about.properties
new file mode 100644
index 0000000..cad256a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=openArchitectureWare code generator\\n\\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright openArchitectureWare contributors and others 2000, 2007. All rights reserved.\n\
+Visit http://www.openArchitectureWare.org
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/build.properties b/plugins/org.eclipse.m2t.common.recipe.ui/build.properties
new file mode 100644
index 0000000..a0dcd30
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.properties,\
+ about.mappings,\
+ eclipse32.png,\
+ plugin.properties,\
+ plugin.xml,\
+ icons/
+src.includes = schema/
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/build.xml_README b/plugins/org.eclipse.m2t.common.recipe.ui/build.xml_README
new file mode 100644
index 0000000..b086108
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/build.xml_README
@@ -0,0 +1,8 @@
+Hint:
+don't check in build.xml.
+It must be created from plugin.xml locally.
+
+right click on plugin.xml
+--> PDE Tools
+ --> Create Ant Build File
+ \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/eclipse32.png b/plugins/org.eclipse.m2t.common.recipe.ui/eclipse32.png
new file mode 100644
index 0000000..ded4869
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/eclipse32.png
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/.cvsignore b/plugins/org.eclipse.m2t.common.recipe.ui/icons/.cvsignore
new file mode 100644
index 0000000..32f2eb8
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/.cvsignore
@@ -0,0 +1 @@
+pspbrwse.jbf
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/collapseAll.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/collapseAll.gif
new file mode 100644
index 0000000..b7223f5
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/collapseAll.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/directParam.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/directParam.gif
new file mode 100644
index 0000000..731f12f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/directParam.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/eval.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/eval.gif
new file mode 100644
index 0000000..9ec99aa
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/eval.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/evalAll.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/evalAll.gif
new file mode 100644
index 0000000..c0a2c16
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/evalAll.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/failed.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/failed.gif
new file mode 100644
index 0000000..915d9c3
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/failed.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/filter.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/filter.gif
new file mode 100644
index 0000000..d416eb4
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/filter.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/indirectParam.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/indirectParam.gif
new file mode 100644
index 0000000..ec38919
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/indirectParam.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/ok.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/ok.gif
new file mode 100644
index 0000000..d5573bb
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/ok.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFix.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFix.gif
new file mode 100644
index 0000000..9bdc8b6
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFix.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFixAll.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFixAll.gif
new file mode 100644
index 0000000..13f39e3
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/quickFixAll.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeFile.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeFile.gif
new file mode 100644
index 0000000..50c7484
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeView.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeView.gif
new file mode 100644
index 0000000..936cb3d
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/recipeView.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/refresh.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/refresh.gif
new file mode 100644
index 0000000..f9ab61c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/refresh.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/reload.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/reload.gif
new file mode 100644
index 0000000..192fefd
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/reload.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/someChildrenFailed.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/someChildrenFailed.gif
new file mode 100644
index 0000000..06d9aee
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/someChildrenFailed.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/icons/undetermined.gif b/plugins/org.eclipse.m2t.common.recipe.ui/icons/undetermined.gif
new file mode 100644
index 0000000..80c8051
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/icons/undetermined.gif
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/plugin.properties b/plugins/org.eclipse.m2t.common.recipe.ui/plugin.properties
new file mode 100644
index 0000000..76cc825
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+pluginName=openArchitectureWare recipe plugin
+providerName=openArchitectureWare.org
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/plugin.xml b/plugins/org.eclipse.m2t.common.recipe.ui/plugin.xml
new file mode 100644
index 0000000..daace32
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/plugin.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension-point id="check" name="check" schema="schema/check.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="Recipes"
+ id="recipes">
+ </category>
+ <view
+ name="Recipes"
+ icon="icons/recipeView.gif"
+ category="recipes"
+ class="org.eclipse.m2t.common.recipe.ui.recipeBrowser.RecipeBrowserView"
+ id="org.openarchitectureware.eclipse.recipeBrowser.RecipeBrowserView">
+ </view>
+ </extension>
+
+ <extension point = "org.eclipse.ui.popupMenus">
+ <objectContribution
+ id="org.eclipse.m2t.common.recipe.ui.open"
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.recipes">
+ <action id="org.openarchitectureware.recipe.open.action"
+ label="Open Recipes"
+ icon="icons/recipeView.gif"
+ menubarPath="additions"
+ class="org.eclipse.m2t.common.recipe.ui.action.OpenRecipesAction"
+ enablesFor="1">
+
+ </action>
+ </objectContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.m2t.common.recipe.ui.recipeBrowser.RecipeViewHelper"
+ extensions="recipes"
+ icon="icons/recipeFile.gif"
+ id="org.eclipse.m2t.common.recipe.ui.RecipeFileEditor"
+ name="Recipe File Editor">
+ </editor>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/project.properties b/plugins/org.eclipse.m2t.common.recipe.ui/project.properties
new file mode 100644
index 0000000..8b0ba66
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/project.properties
@@ -0,0 +1,29 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+#------------------------------------------------------------------------------
+# Eclipse settings
+#------------------------------------------------------------------------------
+# path to your Eclipse installation
+eclipse.home = c:/dev/ide/eclipse-3.0
+# Eclipse version. This version number will be referenced to resolve the
+# eclipse plugin directories below
+eclipse.version = 3.0.0
+
+#------------------------------------------------------------------------------
+# compiler settings
+#------------------------------------------------------------------------------
+javacFailOnError = false
+javacDebugInfo = on
+javacVerbose = true
+javacSource = 1.3
+javacTarget = 1.2
+compilerArg =
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/schema/check.exsd b/plugins/org.eclipse.m2t.common.recipe.ui/schema/check.exsd
new file mode 100644
index 0000000..f1f4521
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/schema/check.exsd
@@ -0,0 +1,85 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.m2t.common.recipe.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.m2t.common.recipe.ui" id="check" name="check"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="dummy"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="dummy" type="string">
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/RecipePlugin.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/RecipePlugin.java
new file mode 100644
index 0000000..410f9f9
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/RecipePlugin.java
@@ -0,0 +1,153 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.m2t.common.recipe.ui.shared.iface.ITraceLog;
+import org.eclipse.m2t.common.recipe.ui.shared.messages.DialogMessages;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+/**
+ *
+ * This class manages the initialization for a generator plugin. If the plugin
+ * is run in debug mode (see plugin.properties) then a default logger is
+ * initialized with the settings read from the plugin.properties. It also
+ * manages the reading of images.
+ *
+ */
+public class RecipePlugin extends AbstractUIPlugin implements ITraceLog {
+
+
+ private static final String PLUGIN_ID = "ID: org.openarchitectureware.recipe";
+ /**
+ * The shared instance
+ */
+ private static RecipePlugin cvGeneratorPlugin;
+
+ /**
+ * Creates new Generator plugin. Reads logging information from descriptor
+ * and adds a LogListener if needed
+ *
+ * @see Plugin.properties
+ */
+ public RecipePlugin() {
+ super();
+ cvGeneratorPlugin = this;
+ }
+ /**
+ * Returns the shared instance of GeneratorPlugin
+ */
+ public static RecipePlugin getDefault() {
+ if (cvGeneratorPlugin==null) {
+ IStatus status = new Status(Status.ERROR,getPluginId(),ITraceLog.CRITICAL , "singleton not initialized",new NullPointerException());
+ Platform.getLog(Platform.getBundle(getPluginId())).log(status);
+ }
+ return cvGeneratorPlugin;
+ }
+ /**
+ * Returns an ImageDescriptor for a given name
+ *
+ * @param aName
+ * a name of an image
+ */
+ public ImageDescriptor getImageDescriptor(String aName) {
+ ImageDescriptor imageDesc = null;
+ try {
+ URL url = new URL(getBundle().getEntry("/icons/"), aName);
+ imageDesc = ImageDescriptor.createFromURL(url);
+ } catch (MalformedURLException e) {
+ imageDesc = ImageDescriptor.getMissingImageDescriptor();
+ }
+ return imageDesc;
+ }
+ /**
+ * Returns the unique id associated with the plugin
+ */
+ public static String getPluginId() {
+ return PLUGIN_ID;
+ }
+ /**
+ * Returns a message for a given key
+ *
+ * @param aKey
+ * a key associated with a message
+ */
+ public static String getMessage(String aKey) {
+ return DialogMessages.getMessage(aKey);
+ }
+ /**
+ * Logs a status
+ *
+ * @param aStatus
+ * a status to be logged
+ * @see Plugin.properties
+ */
+ public static void log(IStatus aStatus) {
+ getDefault().getLog().log(aStatus);
+ }
+
+ /**
+ * Logs a message
+ *
+ * @param aMessage
+ * a message to be logged
+ * @see Plugin.properties
+ */
+ public void log(String aMessage) {
+ log(new Status(IStatus.INFO, getPluginId(), INFO, aMessage, null));
+ }
+ /**
+ * Logs a message for a given level
+ *
+ * @param aLevel
+ * a log level for a message
+ * @param aMessage
+ * a message to be logged
+ * @see Plugin.properties
+ */
+ public void log(int aLevel, String aMessage) {
+ log(new Status(IStatus.INFO, getPluginId(), aLevel, aMessage, null));
+ }
+ /**
+ * Logs an Exception
+ *
+ * @param anException
+ * an exception to be logged
+ * @see Plugin.properties
+ */
+ public static void log(Exception anException) {
+ log(new Status(IStatus.ERROR, getPluginId(), EXCEPTION, "EXCEPTION",
+ anException));
+ }
+
+
+ public IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getWorkbench().getActiveWorkbenchWindow();
+ if (window == null)
+ return null;
+ return getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/TraceLog.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/TraceLog.java
new file mode 100644
index 0000000..a3ec685
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/TraceLog.java
@@ -0,0 +1,167 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.sql.Timestamp;
+
+import org.eclipse.m2t.common.recipe.ui.shared.iface.ITraceLog;
+
+public class TraceLog implements ITraceLog {
+ private static PrintWriter pwLog = null;
+ private static int cvLogLevel;
+ private static String cvLogPath;
+ /**
+ * returns the current time format: YYYY-MM-DD hh:mm:ss.fff (String)
+ */
+ private final static String getTime() {
+ // Variablen
+ String time;
+ Timestamp ts = new Timestamp(System.currentTimeMillis());
+ time = ts.toString();
+ // ggf. 1/100 Sekunden auffuellen
+ if (time.length() == 21) {
+ time += "0";
+ }
+ // ggf. 1/1000 Sekunden auffuellen
+ if (time.length() == 22) {
+ time += "0";
+ }
+ return time;
+ }
+ /**
+ * initializes log
+ */
+ private static void initLog() {
+ if (cvLogPath == null)
+ cvLogPath = DEFAULT_LOGPATH;
+ try {
+ pwLog = new PrintWriter(new FileOutputStream(cvLogPath, true));
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ }
+ }
+ /**
+ * Writes a log
+ */
+ private final static void writeLog(String aLog) {
+ initLog();
+ if (pwLog != null) {
+ try {
+ pwLog.write(aLog);
+ pwLog.flush();
+ pwLog.close();
+ pwLog = null;
+ } catch (Exception e) {
+ System.err
+ .println("TraceLog.log(): Fehler: could not write to log file "
+ + aLog);
+ e.printStackTrace(System.err);
+ }
+ } else {
+ System.err.println("TraceLog.log(): Fehler: Log nicht gestartet"
+ + aLog);
+ }
+ }
+ /**
+ * Writes a log with a given level
+ */
+ public final static void log(int aLevel, String aMessage) {
+ if ((aLevel > (CRITICAL | ERROR | INFO | DEBUG | TRACE | EXCEPTION))
+ || (aLevel < 1)) {
+ log(new Exception("TraceLog.log(): Error: invalid Level " + aLevel));
+ } else {
+ if ((cvLogLevel & aLevel) != QUIET) {
+ StringBuffer log = new StringBuffer();
+ String seperator = "-";
+ // Zeitangabe
+ log.append(getTime());
+ log.append(' ');
+ // loglevel CRITICAL
+ if ((aLevel & CRITICAL) != 0) {
+ log.append("CRI");
+ } else {
+ log.append(seperator);
+ }
+ // loglevel ERROR
+ if ((aLevel & ERROR) != 0) {
+ log.append("ERR");
+ } else {
+ log.append(seperator);
+ }
+ // loglevel INFO
+ if ((aLevel & INFO) != 0) {
+ log.append("INF");
+ } else {
+ log.append(seperator);
+ }
+ // loglevel DEBUG
+ if ((aLevel & DEBUG) != 0) {
+ log.append("DEB");
+ } else {
+ log.append(seperator);
+ }
+ // loglevel TRACE
+ if ((aLevel & TRACE) != 0) {
+ log.append("TRC");
+ } else {
+ log.append(seperator);
+ }
+ // loglevel EXCEPTION
+ if ((aLevel & EXCEPTION) != 0) {
+ log.append("EXC");
+ } else {
+ log.append(seperator);
+ }
+ log.append(" ");
+ // Message
+ log.append(aMessage);
+ log.append("\n");
+ writeLog(log.toString());
+ }
+ }
+ }
+ /**
+ * Writes a log with a implicite level "EXCEPTION"
+ */
+ public final static void log(Exception anException) {
+ StringWriter s = new StringWriter();
+ anException.printStackTrace(new PrintWriter(s));
+ log(TraceLog.EXCEPTION, s.toString());
+ }
+ /**
+ * Starts a new logging session with a given log level and a given log file
+ */
+ public final static boolean startLogging(int aLevel, String aPath) {
+ boolean result = true;
+ cvLogLevel = aLevel;
+ cvLogPath = aPath;
+ if (aPath != null) {
+ try {
+ // Versuch eine bestehende Datei zu oeffnen
+ pwLog = new PrintWriter(new FileOutputStream(aPath, true));
+ } catch (IOException e) {
+ e.printStackTrace(System.err);
+ result = false;
+ }
+ log(INFO, "Session started");
+ } else {
+ pwLog = new PrintWriter(System.out);
+ }
+ return result;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/action/OpenRecipesAction.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/action/OpenRecipesAction.java
new file mode 100644
index 0000000..58406bc
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/action/OpenRecipesAction.java
@@ -0,0 +1,65 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.action;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.m2t.common.recipe.ui.RecipePlugin;
+import org.eclipse.m2t.common.recipe.ui.recipeBrowser.RecipeBrowserView;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+public class OpenRecipesAction implements IObjectActionDelegate {
+
+ private IResource selectedResource = null;
+
+ public OpenRecipesAction() {
+ super();
+ }
+
+ public OpenRecipesAction(IFile file) {
+ selectedResource = file;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void run(IAction action) {
+ if (selectedResource instanceof IFile) {
+ RecipeBrowserView v;
+ try {
+ v = (RecipeBrowserView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(RecipeBrowserView.ID);
+ v.openRecipeFile((IFile) selectedResource);
+ } catch (PartInitException e) {
+ RecipePlugin.log(e);
+ }
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (selection != null) {
+ IStructuredSelection sel = (IStructuredSelection) selection;
+ if (sel.getFirstElement() != null) {
+ selectedResource = (IResource) sel.getFirstElement();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/AutoResizeTableLayout.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/AutoResizeTableLayout.java
new file mode 100644
index 0000000..3897cce
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/AutoResizeTableLayout.java
@@ -0,0 +1,134 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnPixelData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+public class AutoResizeTableLayout extends TableLayout implements
+ ControlListener {
+ private final Table table;
+
+ private List<ColumnLayoutData> columns = new ArrayList<ColumnLayoutData>();
+
+ private boolean autosizing = false;
+
+ public AutoResizeTableLayout(Table table) {
+ this.table = table;
+ table.addControlListener(this);
+ }
+
+ public void addColumnData(ColumnLayoutData data) {
+ columns.add(data);
+ super.addColumnData(data);
+ }
+
+ public void controlMoved(ControlEvent e) {
+ }
+
+ public void controlResized(ControlEvent e) {
+ if (autosizing)
+ return;
+ autosizing = true;
+ try {
+ autoSizeColumns();
+ } finally {
+ autosizing = false;
+ }
+ }
+
+ private void autoSizeColumns() {
+ int width = table.getClientArea().width;
+
+ // XXX: Layout is being called with an invalid value
+ // the first time it is being called on Linux.
+ // This method resets the layout to null,
+ // so we run it only when the value is OK.
+ if (width <= 1)
+ return;
+
+ TableColumn[] tableColumns = table.getColumns();
+ int size = Math.min(columns.size(), tableColumns.length);
+ int[] widths = new int[size];
+ int fixedWidth = 0;
+ int numberOfWeightColumns = 0;
+ int totalWeight = 0;
+
+ // First calc space occupied by fixed columns.
+ for (int i = 0; i < size; i++) {
+ ColumnLayoutData col = columns.get(i);
+ if (col instanceof ColumnPixelData) {
+ int pixels = ((ColumnPixelData) col).width;
+ widths[i] = pixels;
+ fixedWidth += pixels;
+ } else if (col instanceof ColumnWeightData) {
+ ColumnWeightData cw = (ColumnWeightData) col;
+ numberOfWeightColumns++;
+ int weight = cw.weight;
+ totalWeight += weight;
+ } else {
+ throw new IllegalStateException("Unknown column layout data");
+ }
+ }
+
+ // Do we have columns that have a weight?
+ if (numberOfWeightColumns > 0) {
+ // Now, distribute the rest
+ // to the columns with weight.
+ int rest = width - fixedWidth;
+ int totalDistributed = 0;
+ for (int i = 0; i < size; i++) {
+ ColumnLayoutData col = columns.get(i);
+ if (col instanceof ColumnWeightData) {
+ ColumnWeightData cw = (ColumnWeightData) col;
+ int weight = cw.weight;
+ int pixels = totalWeight == 0 ? 0 : weight * rest
+ / totalWeight;
+ if (pixels < cw.minimumWidth)
+ pixels = cw.minimumWidth;
+ totalDistributed += pixels;
+ widths[i] = pixels;
+ }
+ }
+
+ // Distribute any remaining pixels
+ // to columns with weight.
+ int diff = rest - totalDistributed;
+ for (int i = 0; diff > 0; i++) {
+ if (i == size)
+ i = 0;
+ ColumnLayoutData col = columns.get(i);
+ if (col instanceof ColumnWeightData) {
+ ++widths[i];
+ --diff;
+ }
+ }
+ }
+
+ for (int i = 0; i < size; i++) {
+ if (tableColumns[i].getWidth() != widths[i])
+ tableColumns[i].setWidth(widths[i]);
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/EvalJob.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/EvalJob.java
new file mode 100644
index 0000000..0589e07
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/EvalJob.java
@@ -0,0 +1,112 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.eval.CheckEvaluationListener;
+import org.eclipse.m2t.common.recipe.eval.CheckEvaluator;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+
+public class EvalJob extends Job implements CheckEvaluationListener {
+
+ private IProgressMonitor monitor;
+
+ private CheckSet set = null;
+
+ private Check check = null;
+
+ private TreeViewer treeViewer;
+
+ private IWorkbenchSiteProgressService siteService;
+
+ private EvaluationContext context;
+
+ public EvalJob(CheckSet set, TreeViewer v, IWorkbenchSiteProgressService ss, EvaluationContext ctx) {
+ super("Evaluating Recipes");
+ this.set = set;
+ this.treeViewer = v;
+ this.siteService = ss;
+ this.context = ctx;
+ }
+
+ public EvalJob(Check check, TreeViewer v, IWorkbenchSiteProgressService ss) {
+ super("Evaluating Recipes");
+ this.check = check;
+ this.treeViewer = v;
+ this.siteService = ss;
+ context = new EvaluationContext();
+ context.setBatchOnly(false);
+ context.setEvaluateAll(true);
+ context.setTrigger(EvalTrigger.ON_REQUEST);
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ if (check == null && set == null)
+ return Status.OK_STATUS;
+ this.monitor = monitor;
+ int count = 0;
+ CheckEvaluator e = null;
+ if (set != null) {
+ count = set.getCheckCount();
+ e = new CheckEvaluator(context);
+ } else {
+ count = check.getCheckCount();
+ e = new CheckEvaluator(context);
+ }
+ monitor.beginTask("Evaluating Recipes", count);
+ e.addListener(this);
+ if (set != null)
+ e.evaluate(set);
+ if (check != null)
+ e.evaluate(check);
+ monitor.done();
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if (!treeViewer.getControl().isDisposed()) {
+ if (set != null) {
+ treeViewer.refresh();
+ } else {
+ treeViewer.refresh(check);
+ List<Check> nodes = new ArrayList<Check>();
+ check.collectParents(nodes);
+ check.collectChildren(nodes);
+ for (Iterator<Check> iter = nodes.iterator(); iter.hasNext();) {
+ treeViewer.refresh(iter.next());
+ }
+ }
+ }
+ siteService.warnOfContentChange();
+ }
+ });
+ return Status.OK_STATUS;
+ }
+
+ public void evaluated(Check check, boolean evaluated) {
+ monitor.worked(check.getCheckCount());
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/LoadJob.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/LoadJob.java
new file mode 100644
index 0000000..66a6c9b
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/LoadJob.java
@@ -0,0 +1,71 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+import org.eclipse.m2t.common.recipe.io.CannotLoadChecksException;
+import org.eclipse.m2t.common.recipe.io.CheckRegistry;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+
+public class LoadJob extends Job {
+
+ private TreeViewer treeViewer;
+ private boolean evaluate;
+ private IWorkbenchSiteProgressService siteService;
+
+ public LoadJob( TreeViewer treeViewer, IWorkbenchSiteProgressService ss, boolean evaluate ) {
+ super("Loading Recipe File");
+ this.treeViewer = treeViewer;
+ this.evaluate = evaluate;
+ this.siteService = ss;
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask( "Evaluating Recipes", IProgressMonitor.UNKNOWN );
+ try {
+ CheckRegistry.loadFromFile();
+ } catch (final CannotLoadChecksException e) {
+ Display.getDefault().asyncExec( new Runnable() {
+ public void run() {
+ MessageDialog.openError( null, "Error loading recipe file", "Reason: "+e.getMessage() );
+ }
+ });
+ }
+ Display.getDefault().asyncExec( new Runnable() {
+ public void run() {
+ treeViewer.setInput( CheckRegistry.getChecks() );
+ siteService.warnOfContentChange();
+ }
+ });
+ monitor.done();
+ if ( evaluate ) {
+ EvaluationContext ctx = new EvaluationContext();
+ ctx.setEvaluateAll( true );
+ ctx.setTrigger( EvalTrigger.ON_REQUEST );
+ siteService.schedule(new EvalJob(CheckRegistry.getChecks(), treeViewer, siteService, ctx ), 0 , true );
+ }
+ return Status.OK_STATUS;
+ }
+
+}
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/Messages.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/Messages.java
new file mode 100644
index 0000000..79483ba
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/Messages.java
@@ -0,0 +1,22 @@
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.openarchitectureware.eclipse.recipeBrowser.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeBrowserView.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeBrowserView.java
new file mode 100644
index 0000000..1e2a585
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeBrowserView.java
@@ -0,0 +1,511 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ColumnPixelData;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckParameter;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+import org.eclipse.m2t.common.recipe.io.CheckRegistry;
+import org.eclipse.m2t.common.recipe.ui.RecipePlugin;
+import org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers.ParameterContentProvider;
+import org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers.ParameterLabelProvider;
+import org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers.RecipeContentProvider;
+import org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers.RecipeLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+
+public class RecipeBrowserView extends ViewPart implements IResourceChangeListener, ISelectionChangedListener {
+
+ public static final String ID = "org.openarchitectureware.eclipse.recipeBrowser.RecipeBrowserView"; //$NON-NLS-1$
+
+ private Table parameterTable;
+
+ private TableViewer tableViewer;
+
+ private RecipeContentProvider contentProvider;
+
+ private RecipeLabelProvider labelProvider;
+
+ private TreeViewer treeViewer;
+
+ private ViewerFilter okFilter = null;
+
+ private Text descriptionText;
+
+ private IWorkbenchSiteProgressService siteService = null;
+
+ private Label statusLabel;
+
+ private IFile currentFileResource;
+
+ public static final long NOT_SET = -1;
+
+ private long lastEventTimestamp = NOT_SET;
+
+ private WatcherThread watcherThread;
+
+ public void createPartControl(Composite parent) {
+ siteService = (IWorkbenchSiteProgressService) this.getSite().getAdapter(IWorkbenchSiteProgressService.class);
+ GridLayout layout = new GridLayout(1, false);
+ parent.setLayout(layout);
+ SashForm s = new SashForm(parent, SWT.HORIZONTAL);
+ s.setLayoutData(new GridData(GridData.FILL_BOTH));
+ createLeftSide(s);
+ createRightSide(s);
+ statusLabel = new Label(parent, SWT.NONE);
+ statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ createFilter();
+ update();
+
+ // FIXME: add fix me again
+ // addButton(new QuickFixAllCmd());
+ addButton(new CollapseAllCmd());
+ addButton(new EvaluateCmd());
+ addButton(new HideOkCmd());
+ // addMenuSeparator();
+ addMenuItem(new EvaluateAllCmd());
+ addMenuItem(new ReloadCmd());
+
+ watcherThread = new WatcherThread();
+ watcherThread.start();
+ }
+
+ public void setFocus() {
+ treeViewer.getControl().setFocus();
+ }
+
+ private void createRightSide(SashForm parent) {
+ SashForm s = new SashForm(parent, SWT.VERTICAL);
+ createTable(s);
+ createTableViewer();
+ descriptionText = new Text(s, SWT.MULTI | SWT.WRAP);
+ }
+
+ private void createTableViewer() {
+ tableViewer = new TableViewer(parameterTable);
+ tableViewer.setContentProvider(new ParameterContentProvider());
+ tableViewer.setLabelProvider(new ParameterLabelProvider());
+ tableViewer.setInput(null);
+ tableViewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(org.eclipse.jface.viewers.DoubleClickEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) tableViewer.getSelection();
+ if (sel != null) {
+ CheckParameter p = (CheckParameter) sel.getFirstElement();
+ Clipboard clipboard = new Clipboard(Display.getCurrent());
+ clipboard.setContents(new String[] { p.getValue().toString() }, new Transfer[] { TextTransfer.getInstance() });
+ }
+ };
+ });
+ }
+
+ private void createTable(Composite parent) {
+ parameterTable = new Table(parent, SWT.MULTI | SWT.FULL_SELECTION);
+ AutoResizeTableLayout autoResizeTableLayout = new AutoResizeTableLayout(parameterTable);
+ parameterTable.setLayout(autoResizeTableLayout);
+ parameterTable.setHeaderVisible(true);
+ parameterTable.setLinesVisible(true);
+ TableColumn iconC = new TableColumn(parameterTable, SWT.LEFT);
+ iconC.setText(""); //$NON-NLS-1$
+ autoResizeTableLayout.addColumnData(new ColumnPixelData(20, true));
+ TableColumn typeC = new TableColumn(parameterTable, SWT.LEFT);
+ typeC.setText(Messages.getString("RecipeBrowserView.Name")); //$NON-NLS-1$
+ autoResizeTableLayout.addColumnData(new ColumnPixelData(100, true));
+ TableColumn valueC = new TableColumn(parameterTable, SWT.LEFT);
+ valueC.setText(Messages.getString("RecipeBrowserView.Value")); //$NON-NLS-1$
+ autoResizeTableLayout.addColumnData(new ColumnPixelData(200, true));
+ }
+
+ private void createFilter() {
+ okFilter = new ViewerFilter() {
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ Check c = (Check) element;
+ return c.getStatus() != EvalStatus.OK;
+ }
+ };
+ }
+
+ private void reload(boolean evaluate) {
+ siteService.schedule(new LoadJob(treeViewer, siteService, evaluate), 0, true);
+ }
+
+ private void evaluate(EvaluationContext ctx) {
+ siteService.schedule(new EvalJob(CheckRegistry.getChecks(), treeViewer, siteService, ctx), 0, true);
+ }
+
+ // This thread has the role to refresh the checks' state
+ class WatcherThread extends Thread {
+ // the longer the timeout's value is, the safer, but also...the longer!
+ private static final int TIMEOUT = 2000;
+
+ public void run() {
+ while (true) {
+ if ((lastEventTimestamp < (System.currentTimeMillis() - TIMEOUT)) && (lastEventTimestamp != NOT_SET)) {
+ EvaluationContext ctx = new EvaluationContext();
+ ctx.setEvaluateAll(true);
+ ctx.setTrigger(EvalTrigger.ON_CHANGE);
+ evaluate(ctx);
+ lastEventTimestamp = NOT_SET;
+ } else {
+ try {
+ sleep(3000);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+ }
+ }
+
+ public void update() {
+ if (CheckRegistry.getChecks() != null) {
+ treeViewer.setInput(CheckRegistry.getChecks());
+ }
+ }
+
+ private void createLeftSide(Composite parent) {
+ contentProvider = new RecipeContentProvider();
+ labelProvider = new RecipeLabelProvider();
+ treeViewer = new TreeViewer(parent);
+ treeViewer.setLabelProvider(labelProvider);
+ treeViewer.setContentProvider(contentProvider);
+ MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager manager) {
+
+ Check c = (Check) ((IStructuredSelection) treeViewer.getSelection()).getFirstElement();
+
+ // To programmatically avoid
+ // !MESSAGE Context menu missing standard group
+ // 'org.eclipse.ui.IWorkbenchActionConstants.MB_ADDITIONS'.
+ // (menu ids =
+ // [org.openarchitectureware.eclipse.recipeBrowser.RecipeBrowserView])
+ // part id =
+ // org.openarchitectureware.eclipse.recipeBrowser.RecipeBrowserView)
+ // error messages in the .log file :
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+
+ manager.add(new EvalCmd(c));
+
+ // here we add a quick fix option in the contextual menu
+ // but only for failed checks, that's of course !
+ // we get the (first) element of a selection (in the case of a
+ // multiple selection, like clicking and holding ctrl)
+ // ... and we only fix composite checks (nodes, no
+ // leaves) to ensure that the implicit dependance chain between
+ // checks (which is the same as for quick fixers) is respected.
+
+ // FIXME: add fix me again
+ // if ((c instanceof CompositeCheck && c.getStatus() ==
+ // EvalStatus.SOMECHILDRENFAILED))
+ // manager.add(new QuickFixCmd(c));
+ }
+ });
+
+ Menu menu = menuMgr.createContextMenu(treeViewer.getControl());
+ treeViewer.getControl().setMenu(menu);
+ // Be sure to register it so that other plug-ins can add actions.
+ getSite().registerContextMenu(menuMgr, treeViewer);
+ treeViewer.addSelectionChangedListener(contentProvider);
+ treeViewer.addSelectionChangedListener(this);
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (event.getSelection() != null) {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ if (sel.getFirstElement() != null) {
+ if (sel.getFirstElement() instanceof Check) {
+ Check c = (Check) sel.getFirstElement();
+ updateParameters(c);
+ updateDescription(c);
+ updateStatus(c);
+ }
+ }
+ }
+
+ }
+
+ private void updateParameters(Check c) {
+ ((ParameterLabelProvider) tableViewer.getLabelProvider()).setCurrentCheck(c);
+ tableViewer.setInput(c);
+ }
+
+ private void updateDescription(Check c) {
+ if (c.getLongDescription() != null) {
+ descriptionText.setText(c.getLongDescription());
+ } else {
+ descriptionText.setText(""); //$NON-NLS-1$
+ }
+ }
+
+ private void updateStatus(Check c) {
+ if (c.getStatusMessage() != null) {
+ statusLabel.setText(" " + c.getStatusMessage()); //$NON-NLS-1$
+ } else {
+ statusLabel.setText(""); //$NON-NLS-1$
+ }
+ }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ handleDeltaForReload(event.getDelta());
+ lastEventTimestamp = System.currentTimeMillis();
+ }
+
+ private void handleDeltaForReload(IResourceDelta delta) {
+ // In some cases (e.g. closing a project) delta can be null
+ if (delta==null) return;
+
+ if (delta.getResource().equals(currentFileResource)) {
+ EvaluationContext ctx = new EvaluationContext();
+ ctx.setEvaluateAll(true);
+ reload(true);
+ } else {
+ for (int i = 0; i < delta.getAffectedChildren().length; i++) {
+ IResourceDelta d = delta.getAffectedChildren()[i];
+ handleDeltaForReload(d);
+ }
+ }
+ }
+
+ public void openRecipeFile(IFile file) {
+ if (currentFileResource != null) {
+ currentFileResource.getWorkspace().removeResourceChangeListener(this);
+ }
+ currentFileResource = file;
+ if (currentFileResource != null) {
+ currentFileResource.getWorkspace().addResourceChangeListener(this);
+ }
+
+ if (file.getLocation() == null) {
+ CheckRegistry.setChecksFileName(file.getFullPath().makeAbsolute().toFile().getAbsolutePath());
+ } else {
+ CheckRegistry.setChecksFileName(file.getLocation().toOSString());
+ }
+ reload(true);
+ }
+
+ protected ActionContributionItem addButton(Action cmd) {
+ ActionContributionItem item = new ActionContributionItem(cmd);
+ IToolBarManager m = getViewSite().getActionBars().getToolBarManager();
+ m.add(item);
+ return item;
+ }
+
+ protected void addButtonSeparator() {
+ IToolBarManager m = getViewSite().getActionBars().getToolBarManager();
+ m.add(new Separator());
+ }
+
+ protected void addMenuItem(Action cmd) {
+ IMenuManager m = getViewSite().getActionBars().getMenuManager();
+ m.add(cmd);
+ }
+
+ protected void addMenuSeparator() {
+ IMenuManager m = getViewSite().getActionBars().getMenuManager();
+ m.add(new Separator());
+ }
+
+ // ---------------------------------------------
+ // COMMANDS
+
+ class UpdateDumpCmd extends Action {
+ public UpdateDumpCmd() {
+ super(Messages.getString("RecipeBrowserView.Update"), RecipePlugin.getDefault().getImageDescriptor( //$NON-NLS-1$
+ "refresh.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ update();
+ }
+ }
+
+ class EvaluateCmd extends Action {
+ public EvaluateCmd() {
+ super(Messages.getString("RecipeBrowserView.evaluateFailedLabel"), RecipePlugin.getDefault() //$NON-NLS-1$
+ .getImageDescriptor("eval.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ evaluate(new EvaluationContext());
+ }
+ }
+
+ class EvaluateAllCmd extends Action {
+ public EvaluateAllCmd() {
+ super(Messages.getString("RecipeBrowserView.reevaluateAllLabel"), RecipePlugin.getDefault() //$NON-NLS-1$
+ .getImageDescriptor("evalAll.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ EvaluationContext ctx = new EvaluationContext();
+ ctx.setEvaluateAll(true);
+ evaluate(ctx);
+ }
+ }
+
+ class ReloadCmd extends Action {
+ public ReloadCmd() {
+ super(Messages.getString("RecipeBrowserView.reloadRecipeFileLabel"), RecipePlugin.getDefault() //$NON-NLS-1$
+ .getImageDescriptor("refresh.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ reload(true);
+ }
+ }
+
+ class HideOkCmd extends Action {
+ public HideOkCmd() {
+ super(Messages.getString("RecipeBrowserView.filterLabel"), IAction.AS_CHECK_BOX); //$NON-NLS-1$
+ setImageDescriptor(RecipePlugin.getDefault().getImageDescriptor("filter.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ if (treeViewer.getFilters().length > 0) { // has Filter!
+ treeViewer.removeFilter(okFilter);
+ } else {
+ treeViewer.addFilter(okFilter);
+ }
+ }
+ }
+
+ class CollapseAllCmd extends Action {
+ public CollapseAllCmd() {
+ super(Messages.getString("RecipeBrowserView.collapseAllLabel"), RecipePlugin.getDefault().getImageDescriptor( //$NON-NLS-1$
+ "collapseAll.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+ treeViewer.collapseAll();
+ }
+ }
+
+ class EvalCmd extends Action {
+ private Check check;
+
+ public EvalCmd(Check c) {
+ super(Messages.getString("RecipeBrowserView.evalAllLabel"), RecipePlugin.getDefault().getImageDescriptor( //$NON-NLS-1$
+ "evalAll.gif")); //$NON-NLS-1$
+ this.check = c;
+ }
+
+ public void run() {
+ new EvalJob(check, treeViewer, siteService).schedule();
+ }
+ }
+
+ /*
+ * This inner class has the purpose to fix as many trivial composite checks
+ * as possible
+ */
+ class QuickFixAllCmd extends Action {
+
+ public QuickFixAllCmd() {
+ // super(Messages.getString("RecipeBrowserView.quickFixAllLabel"),
+ // RecipePlugin.getDefault().getImageDescriptor("quickFixAll.gif"));
+ // //$NON-NLS-1$
+ super(Messages.getString("RecipeBrowserView.quickFixAllLabel"), RecipePlugin.getDefault().getImageDescriptor("quickFixAll.gif")); //$NON-NLS-1$
+ }
+
+ public void run() {
+
+ // OPTIMISTIC :
+ // We assume that the LoadJob has done its job so that
+ // CheckRegistry.getChecks() won't return null (if ever checks
+ // hasn't be loaded from .recipes file yet)
+ // PESSIMISTIC would be to check if CheckRegistry.getChecks() is
+ // null, if so then queue a new Load job using the private method
+ // RecipeBrowserView#reload and open a dialog saying to user that
+ // massive quick fixing is impossible since checks haven't been
+ // loaded from file yet, and else launch the atomic quick fixes
+ // normally.
+ // However, to obtain the NullPointerException that could
+ // justify this pessimistic functionning, the execution has to be
+ // slow enough to allow the user to click the massive quick fix
+ // action button before the LoadJob completes its task.
+ CheckSet checkSet = CheckRegistry.getChecks();
+
+ // TODO: it may be better (safer) to retrieve checks from the
+ // Treeviewer.. to be surer all checks have been loaded from file
+ // before the user could be able to launch a massive quick fix
+ // command...to this day functionning is OPTIMISTIC (see
+ // RecipeBrowserViex#QuickFixAll) like this :
+ //
+ // CheckSet checkSet=new CheckSet();
+ // List<Check> listChecks = ((IStructuredSelection)
+ // this.treeViewer.getSelection()).toList();
+ // for (Check c:listChecks) checkSet.add(c);
+
+ for (Check check : checkSet.getChecks()) {
+ if (check.getStatus() == EvalStatus.SOMECHILDRENFAILED) {
+ // IProgressMonitor
+ // pm=Job.getJobManager().createProgressGroup();
+ // q.setProgressGroup(pm, IProgressMonitor.UNKNOWN);
+ // q.schedule();
+ }
+ }
+
+ reload(true);
+
+ }
+
+ }
+
+ public void dispose() {
+ super.dispose();
+ // watcherThread.stop();
+ watcherThread = null;
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeViewHelper.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeViewHelper.java
new file mode 100644
index 0000000..19390b6
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/RecipeViewHelper.java
@@ -0,0 +1,76 @@
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.m2t.common.recipe.ui.RecipePlugin;
+import org.eclipse.m2t.common.recipe.ui.action.OpenRecipesAction;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.progress.UIJob;
+
+public class RecipeViewHelper extends EditorPart {
+
+ public RecipeViewHelper() {
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+
+ }
+
+ @Override
+ public void doSaveAs() {
+
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ setSite(site);
+ setInput(input);
+ }
+
+ @Override
+ public boolean isDirty() {
+ return false;
+ }
+
+ @Override
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ if (getEditorInput() instanceof IPathEditorInput) {
+ IPathEditorInput pei = (IPathEditorInput) getEditorInput();
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(pei.getPath());
+ new OpenRecipesAction(file).run(null);
+ try {
+ getSite().getPage().showView("org.openarchitectureware.eclipse.recipeBrowser.RecipeBrowserView");
+ } catch (PartInitException e) {
+ RecipePlugin.log(e.getStatus());
+ }
+ }
+ new UIJob("Close editor") {
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ getSite().getPage().closeEditor(RecipeViewHelper.this, false);
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ }
+
+ @Override
+ public void setFocus() {
+
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/messages.properties b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/messages.properties
new file mode 100644
index 0000000..b96f1e3
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/messages.properties
@@ -0,0 +1,11 @@
+RecipeBrowserView.Name=Name
+RecipeBrowserView.Value=Value
+RecipeBrowserView.Update=Update
+RecipeBrowserView.evaluateFailedLabel=Evaluate Failed
+RecipeBrowserView.reevaluateAllLabel=Reevaluate All
+RecipeBrowserView.reloadRecipeFileLabel=Reload Recipe File
+RecipeBrowserView.filterLabel=Hide ok recipes
+RecipeBrowserView.collapseAllLabel=Collapse All
+RecipeBrowserView.evalAllLabel=Evaluate
+RecipeBrowserView.quickFixLabel=Quick Fix
+RecipeBrowserView.quickFixAllLabel=Quick Fix All
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterContentProvider.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterContentProvider.java
new file mode 100644
index 0000000..324a47c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterContentProvider.java
@@ -0,0 +1,56 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckParameter;
+
+public class ParameterContentProvider implements IStructuredContentProvider {
+
+ public Object[] getElements(Object inputElement) {
+ //return filterAndSort( ((Check)inputElement).getParameters() ).toArray();
+ List<CheckParameter> l = new ArrayList<CheckParameter>();
+ l.addAll( ((Check)inputElement).getParameters() );
+ l.addAll( ((Check)inputElement).getIndirectParameters() );
+ return filterAndSort(l).toArray();
+ }
+
+ private List<CheckParameter> filterAndSort(List<CheckParameter> l) {
+ Collections.sort( l, new Comparator<CheckParameter>() {
+ public int compare(CheckParameter o1, CheckParameter o2) {
+ String k1 = o1.getKey();
+ String k2 = o2.getKey();
+ return k1.compareTo(k2);
+ }
+ } );
+ return l;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if ( newInput == null ) return;
+ viewer.refresh();
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterLabelProvider.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterLabelProvider.java
new file mode 100644
index 0000000..e66fd52
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/ParameterLabelProvider.java
@@ -0,0 +1,89 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckParameter;
+import org.eclipse.m2t.common.recipe.ui.RecipePlugin;
+import org.eclipse.swt.graphics.Image;
+
+public class ParameterLabelProvider implements ITableLabelProvider {
+
+ private Check currentCheck = null;
+
+ private Map<String, Image> map = new HashMap<String, Image>();
+
+ public void setCurrentCheck( Check c ) {
+ this.currentCheck = c;
+ }
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ CheckParameter p = (CheckParameter) element;
+ if ( columnIndex == 0 ) {
+ if ( currentCheck != p.getOwner() ) return getIcon("indirectParam");
+ return getIcon("directParam");
+ }
+ return null;
+ }
+
+ private Image getIcon(String string) {
+ if (map.get(string) == null) {
+ ImageDescriptor imageDescriptor = RecipePlugin.getDefault().getImageDescriptor(string+".gif");
+ map.put(string, imageDescriptor.createImage());
+ }
+ return map.get(string);
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ CheckParameter p = (CheckParameter) element;
+ switch (columnIndex) {
+ case 0:
+ return "";
+ case 1:
+ return (String)p.getKey();
+ case 2:
+ return p.getValue().toString();
+ }
+ return null;
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ for (Iterator<Image> iter = map.values().iterator(); iter.hasNext();) {
+ Image image = iter.next();
+ image.dispose();
+ }
+ map.clear();
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/QuickFixerProvider.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/QuickFixerProvider.java
new file mode 100644
index 0000000..edc3631
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/QuickFixerProvider.java
@@ -0,0 +1,61 @@
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.m2t.common.recipe.core.Check;
+
+public class QuickFixerProvider {
+
+ // public QuickFixer getQuickFixer(Check check) {
+ public Object getQuickFixer(Check check) {
+
+ // The policy for QuickFixers is intentionnally the same
+ // than for Checks, that is to say at the total opposite of a possible
+ // chained structure we might think of.
+ // IMPORTANT NOTICE : However the possibility of the optimistic
+ // functionning of the quickFixers is only allowed because of
+ // the choice to quick fix COMPOSITE CHECKS ONLY, since their list of
+ // ATOMIC CHECKS HAPPENS TO BE IN THE GOOD RESOLUTION ORDER ! (no
+ // more...no less.)
+ // ...maybe one would one day want to change it, and that wouldn't be a
+ // bad idea at all !
+
+ String problemNature = check.getClass().getSimpleName().split("Check")[0];
+
+ String pack = check.getClass().getName().split(problemNature)[0];
+ String quickFixerClassName = pack + problemNature + "QuickFixer";
+ quickFixerClassName = quickFixerClassName.replaceAll("checks", "quickFixers");
+ String checkEvaluatorClassName = pack + problemNature + "CheckEvaluator";
+
+ try {
+ Class<?> checkEvaluatorClass = this.resolveClass(checkEvaluatorClassName);
+ return this.resolveClass(quickFixerClassName).getConstructor(check.getClass(), checkEvaluatorClass).newInstance(check.getClass().cast(check),
+ checkEvaluatorClass.newInstance());
+
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+
+ MessageDialog.openError(null, "Error getting a QuickFixer", "Reason: QuickFixer not found for Check " + check.toString());
+ return null;
+
+ }
+
+ private Class<?> resolveClass(String className) throws ClassNotFoundException {
+ return Class.forName(className);
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeContentProvider.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeContentProvider.java
new file mode 100644
index 0000000..8723c84
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeContentProvider.java
@@ -0,0 +1,81 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+import org.eclipse.m2t.common.recipe.core.CompositeCheck;
+
+public class RecipeContentProvider implements ITreeContentProvider, ISelectionChangedListener {
+
+ private Map<Object, Object> parents = new HashMap<Object, Object>();;
+
+ public Object[] getChildren(Object parent) {
+ Collection<Check> c = getChildrenInternal( parent );
+ if ( c == null ) return new Object[]{};
+ for (Iterator<?> iter = c.iterator(); iter.hasNext();) {
+ Object o = (Object) iter.next();
+ parents.put( o, parent );
+ }
+ return c.toArray();
+ }
+
+ public Collection<Check> getChildrenInternal(Object parent) {
+ if ( parent instanceof CheckSet ) {
+ return ((CheckSet)parent).getChecks();
+ }
+ if ( parent instanceof CompositeCheck ) {
+ return ((CompositeCheck)parent).getChildren();
+ }
+ return null;
+ }
+
+ public Object getParent(Object element) {
+ return parents.get( element );
+ }
+
+ public boolean hasChildren(Object element) {
+ if ( getChildren(element) == null ) return false;
+ return getChildren(element).length > 0;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if ( newInput == null ) return;
+ parents = new HashMap<Object, Object>();
+ viewer.refresh();
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ }
+
+}
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeLabelProvider.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeLabelProvider.java
new file mode 100644
index 0000000..76bd67f
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/recipeBrowser/providers/RecipeLabelProvider.java
@@ -0,0 +1,86 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.recipeBrowser.providers;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.ui.RecipePlugin;
+import org.eclipse.swt.graphics.Image;
+
+public class RecipeLabelProvider implements ILabelProvider {
+
+ private Map<String, Image> map = new HashMap<String, Image>();
+
+ public Image getImage(Object dataObject) {
+ if ( dataObject instanceof Check ) {
+ Check c = (Check)dataObject;
+ if ( c.getStatus() == EvalStatus.OK ) return getIcon("ok");
+ if ( c.getStatus() == EvalStatus.SOMECHILDRENFAILED ) return getIcon("someChildrenFailed");
+ if ( c.getStatus() == EvalStatus.FAILED ) return getIcon("failed");
+ return getIcon("undetermined");
+ }
+ return null;
+ }
+
+ private Image getIcon(String string) {
+ if (map.get(string) == null) {
+ ImageDescriptor imageDescriptor = RecipePlugin.getDefault().getImageDescriptor(string+".gif");
+ map.put(string, imageDescriptor.createImage());
+ }
+ return map.get(string);
+ }
+
+ public String getText(Object dataObject) {
+ if ( dataObject instanceof CheckSet ) {
+ return "set";
+ }
+ if ( dataObject instanceof Check ) {
+ Check c = (Check)dataObject;
+ return c.getShortDescription();
+ }
+ return dataObject.toString();
+ }
+
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ for (Iterator<Image> iter = map.values().iterator(); iter.hasNext();) {
+ Image image = iter.next();
+ image.dispose();
+ }
+ map.clear();
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
+
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/ctrl/ViewControlManager.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/ctrl/ViewControlManager.java
new file mode 100644
index 0000000..c692111
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/ctrl/ViewControlManager.java
@@ -0,0 +1,291 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.shared.ctrl;
+
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.m2t.common.recipe.ui.shared.iface.IViewControl;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class ViewControlManager {
+ private ViewControlManager() {
+ }
+
+ /**
+ * Creates a ViewControl.
+ * A ViewControl is dependent on an object.
+ * This implementation ignores a dependent object.
+ * Later implementation should consider this object
+ *
+ * @param anObject A dependent object
+ */
+ public static IViewControl createViewControl(Object anObject) {
+ IViewControl ctrl = new DefaultViewControl();
+
+ return ctrl;
+ }
+}
+
+class DefaultViewControl implements IViewControl {
+ private IStatus ivStatus;
+
+ public DefaultViewControl() {
+ ivStatus = null;
+ }
+ public void setup(IStatus aStatus) {
+ ivStatus = aStatus;
+ }
+
+ public void finish() {
+ ExceptionDialog dialog = new ExceptionDialog(new Shell(), ivStatus);
+ dialog.open();
+ }
+}
+
+class ExceptionDialog extends Dialog {
+ private Button detailsButton;
+ private IStatus status;
+ private boolean togle = true;
+
+ private boolean textCreated = false;
+
+ private static final int NUM_OF_LINES = 10;
+
+ private Text text = null;
+
+ public ExceptionDialog(Shell parentShell, IStatus aStatus) {
+ super(parentShell);
+ status = aStatus;
+
+ setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
+ }
+
+ /**
+ *
+ */
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("Problems");
+ }
+
+ /**
+ *
+ */
+ protected void buttonPressed(int id) {
+ if (id == IDialogConstants.DETAILS_ID) {
+ // was the details button pressed?
+ toggleDetailsArea();
+ } else {
+ super.buttonPressed(id);
+ }
+ }
+
+ /*
+ * Method declared on Dialog.
+ */
+ protected void createButtonsForButtonBar(Composite parent) {
+ // create OK and Details buttons
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ if (status.getException() != null)
+ detailsButton =
+ createButton(
+ parent,
+ IDialogConstants.DETAILS_ID,
+ IDialogConstants.SHOW_DETAILS_LABEL,
+ false);
+ }
+
+ /**
+ *
+ */
+ protected Control createMessageArea(Composite composite) {
+ // create image
+ Image image = this.dialogArea.getDisplay().getSystemImage(SWT.ICON_ERROR);
+ if (image != null) {
+ Label label = new Label(composite, 0);
+ image.setBackground(label.getBackground());
+ label.setImage(image);
+ label.setLayoutData(
+ new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));
+ }
+
+ // create message
+ Label label = new Label(composite, SWT.WRAP);
+ label.setText(status.getMessage());
+ GridData data =
+ new GridData(
+ GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+
+ label.setLayoutData(data);
+ label.setFont(composite.getFont());
+
+ return composite;
+ }
+
+ /**
+ *
+ */
+ protected Control createButtonBar(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+
+ // create a layout with spacing and margins appropriate for the font size.
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 0; // this is incremented by createButton
+ layout.makeColumnsEqualWidth = true;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ layout.horizontalSpacing =
+ convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+
+ composite.setLayout(layout);
+
+ GridData data =
+ new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER);
+ data.horizontalSpan = 2;
+ composite.setLayoutData(data);
+
+ composite.setFont(parent.getFont());
+
+ // Add the buttons to the button bar.
+ createButtonsForButtonBar(composite);
+
+ return composite;
+ }
+
+ /**
+ *
+ */
+ protected Control createDialogArea(Composite parent) {
+ createMessageArea(parent);
+
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing =
+ convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ GridData childData = new GridData(GridData.FILL_BOTH);
+ childData.horizontalSpan = 2;
+ composite.setLayoutData(childData);
+ composite.setFont(parent.getFont());
+ return composite;
+ }
+
+ /**
+ *
+ */
+ protected Control createContents(Composite parent) {
+ // initialize the dialog units
+ initializeDialogUnits(parent);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing =
+ convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ layout.makeColumnsEqualWidth = false;
+ parent.setLayout(layout);
+ parent.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // create the dialog area and button bar
+ createDialogArea(parent);
+ createButtonBar(parent);
+
+ return parent;
+ }
+
+ /**
+ *
+ */
+ protected Text createText(Composite parent) {
+ // create the text
+ text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
+
+ // fill the text
+ populateText(text);
+
+ text.setEditable(false);
+
+ GridData data =
+ new GridData(
+ GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL
+ | GridData.VERTICAL_ALIGN_FILL
+ | GridData.GRAB_VERTICAL);
+ data.heightHint = text.getLineHeight() * NUM_OF_LINES;
+ data.horizontalSpan = 2;
+ text.setLayoutData(data);
+ textCreated = true;
+ return text;
+ }
+
+ /**
+ *
+ */
+ private void populateText(Text text) {
+ java.io.StringWriter writer = new java.io.StringWriter();
+
+ status.getException().printStackTrace(new java.io.PrintWriter(writer));
+ text.append(writer.getBuffer().toString());
+ // now, move the cursor position to the beginning of text
+ text.setSelection(0, 0);
+ }
+
+ /**
+ *
+ */
+ private void toggleDetailsArea() {
+ Point windowSize = getShell().getSize();
+ Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+
+ if (textCreated) {
+ text.dispose();
+ textCreated = false;
+ detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
+ } else {
+ text = createText((Composite) getContents());
+ ;
+ detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
+ }
+
+ Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+
+ getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
+
+ togle = !togle;
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IMessagesConstants.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IMessagesConstants.java
new file mode 100644
index 0000000..db797d2
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IMessagesConstants.java
@@ -0,0 +1,97 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.shared.iface;
+
+/**
+ * @author lom
+ *
+ * This interface contains constants for reading messages.
+ *
+ */
+public interface IMessagesConstants {
+ // new project page
+ public static final String WIZARD_PROJECT_WINDOW_TITLE = "wizard.project.windowtitle";
+
+ public static final String WIZARD_PROJECT_TITLE = "wizard.project.title";
+
+ public static final String WIZARD_PROJECT_DESCRIPTION = "wizard.project.description";
+
+ // Meta project page
+ public static final String WIZARD_METAPROJECT_TITLE = "wizard.metaproject.metatitle";
+
+ public static final String WIZARD_METAPROJECT_DESCRIPTION =
+ "wizard.metaproject.metadescription";
+
+ public static final String WIZARD_METAPROJECT_LABEL_PROJECTPATH =
+ "wizard.metaproject.label.projectpath";
+
+ public static final String WIZARD_METAPROJECT_LABEL_SUBFOLDER =
+ "wizard.metaproject.label.subfolder";
+
+ public static final String WIZARD_METAPROJECT_LABEL_USEDEFAULTTEMPLATE =
+ "wizard.metaproject.label.usedefaulttemplate";
+
+ public static final String WIZARD_METAPROJECT_LABEL_TEMPLATE =
+ "wizard.metaproject.label.template";
+
+ public static final String WIZARD_METAPROJECT_LABEL_METAMODEL =
+ "wizard.metaproject.label.metamodel";
+
+ public static final String WIZARD_METAPROJECT_LABEL_USEDEFAULTMETACORE =
+ "wizard.metaproject.label.usedefaultmetacore";
+
+ public static final String WIZARD_METAPROJECT_LABEL_LOCATIONGENFW =
+ "wizard.metaproject.label.locationgenfw";
+
+ public static final String WIZARD_METAPROJECT_LABEL_LOCATIONMETACORE =
+ "wizard.metaproject.label.locationmetacore";
+
+ // Java project page
+ public static final String WIZARD_JAVAPROJECT_TITLE = "wizard.project.javatitle";
+
+ public static final String WIZARD_JAVAPROJECT_DESCRIPTION = "wizard.project.javadescription";
+
+ public static final String WIZARD_PROJECT_IMAGE = "wizard.project.image";
+
+ public static final String WIZARD_PROJECT_BROWSE = "wizard.project.browse";
+
+ public static final String PREFERENCES_XPANDEDITOR_LABEL_TABCOLOR =
+ "preferences.xpandeditor.label.tabcolor";
+
+ public static final String PREFERENCES_XPANDEDITOR_LABEL_DESCRIPTION =
+ "preferences.xpandeditor.label.description";
+
+ public static final String PREFERENCES_XPANDEDITOR_LABEL_TABINDENTATION =
+ "preferences.xpandeditor.label.tabindent";
+
+ public static final String ERROR_FILE_NOT_EXISTS_LABEL = "error.filenotexists.label";
+
+ public static final String STATUS_INFO_METACLASSS_USECLASS = "status.metaclass.useclass";
+
+ public static final String STATUS_INFO_METACLASSS_NOTFOUND = "status.metaclass.notfound";
+
+ public static final String STATUS_INFO_METACLASSS_PROPERTY_NOTFOUND =
+ "status.metaclass.property.notfound";
+
+ public static final String STATUS_INFO_METACLASSS_EXCEPTION = "status.metaclass.exception";
+
+ public static final String ACTION_GENERATE_EXEC_COMMAND = "action.generate.exec.command";
+
+ public static final String ACTION_GENERATE_BUTTON_TEXT = "action.generate.button.text";
+
+ public static final String ACTION_GENERATE_BUTTON_TOOLTIP = "action.generate.button.tooltip";
+
+ public static final String CONTENTOUTLINE_IMAGE = "contentoutline.image";
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/ITraceLog.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/ITraceLog.java
new file mode 100644
index 0000000..1c6da5b
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/ITraceLog.java
@@ -0,0 +1,68 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.shared.iface;
+
+public interface ITraceLog
+{
+ /**
+ * Trace level <code>CRITICAL</code>.
+ */
+ public static final int CRITICAL = 1;
+
+ /**
+ * Trace level <code>ERROR</code>.
+ */
+ public static final int ERROR = 2;
+
+ /**
+ * Trace level <code>INFO</code>.
+ */
+ public static final int INFO = 4;
+
+ /**
+ * Trace level <code>DEBUG</code>.
+ */
+ public static final int DEBUG = 8;
+
+ /**
+ * Trace level <code>TRACE</code>.
+ */
+ public static final int TRACE = 16;
+
+ /**
+ * Trace level <code>EXCEPTION</code>.
+ */
+ public static final int EXCEPTION = 32;
+
+ /**
+ * Trace level <code>QUIET</code>.
+ */
+ public static final int QUIET = 0;
+
+ /**
+ * Trace level <code>ALL</code>.
+ */
+ public static final int VERBOSE = 63;
+
+ /**
+ * <code>DEFAULT_LOGLEVEL</code>. Identifies to log all by default.
+ */
+ public static final int DEFAULT_LOGLEVEL = VERBOSE;
+
+ /**
+ * <code>DEFAULT_LOGPATH</code>. Identifies the default path to log to.
+ */
+ public static final String DEFAULT_LOGPATH = "Trace.log";
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IViewControl.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IViewControl.java
new file mode 100644
index 0000000..043f543
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/iface/IViewControl.java
@@ -0,0 +1,30 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.shared.iface;
+
+import org.eclipse.core.runtime.IStatus;
+
+public interface IViewControl
+{
+ /**
+ * Setups the view control
+ */
+ public void setup (IStatus aStatus);
+
+ /**
+ * Marks that the view control is ready to take control
+ */
+ public void finish ();
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.java b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.java
new file mode 100644
index 0000000..3565da2
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.java
@@ -0,0 +1,51 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.ui.shared.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author lom
+ *
+ * This class manages reading messages.
+ * Messages are stored in DialogMessages.properties
+ *
+ */
+public class DialogMessages
+{
+ /**
+ * A ResourceBundle that contains messages
+ */
+ private static ResourceBundle cvResourceBundle= ResourceBundle.getBundle (DialogMessages.class.getName ());
+
+ /**
+ * Gets a message from ResourceBundle
+ *
+ * @param aKey A key associated with a message
+ * @return A message for a given key. If an exception occured, a given key is returned
+ */
+ public static String getMessage (String aKey)
+ {
+ try
+ {
+ return cvResourceBundle.getString (aKey);
+ }
+ catch (MissingResourceException e)
+ {
+ return aKey;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.properties b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.properties
new file mode 100644
index 0000000..1b77b14
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.ui/src/org/eclipse/m2t/common/recipe/ui/shared/messages/DialogMessages.properties
@@ -0,0 +1,63 @@
+##################################################
+# Title: Eclipse Generator Plugin
+# Copyright: (C)opyright 2002 b+m Informatik AG
+##################################################
+
+wizard.project.windowtitle = New Meta-Project
+
+wizard.project.title = Meta-Project
+
+wizard.project.description = Create new Meta-Project
+
+wizard.metaproject.metatitle = Subfolder settings
+
+wizard.metaproject.metadescription = Create subfolder...
+
+wizard.project.javatitle = Java Settings for Implementation of Meta Model
+
+wizard.project.javadescription = Define the Java build settings
+
+wizard.metaproject.label.projectpath = Project directory:
+
+wizard.metaproject.label.subfolder = Subfolder:
+
+wizard.metaproject.label.usedefaulttemplate = Use default template directory
+
+wizard.metaproject.label.template = Templates:
+
+wizard.metaproject.label.metamodel = Metamodel:
+
+wizard.metaproject.label.usedefaultmetacore = Use default metacore.jar
+
+wizard.metaproject.label.locationgenfw = Location of genfw.jar:
+
+wizard.metaproject.label.locationmetacore = Location of metacore.jar:
+
+wizard.project.image = icons/bm_IconA_NEU2.gif
+
+wizard.project.browse = Browse...
+
+preferences.xpandeditor.label.description = Xpand-Editor settings:
+
+preferences.xpandeditor.label.tabcolor = Colors
+
+preferences.xpandeditor.label.tabindent = Auto Indentation
+
+error.filenotexists.label = File does not exists:
+
+status.metaclass.useclass = Use Meta class {0}
+
+status.metaclass.notfound = Meta class {0} not found
+
+status.metaclass.property.notfound = Property {0} not found
+
+status.metaclass.exception = Can not reflect meta classes
+
+action.generate.exec.command = c:\\generate.bat
+
+action.generate.button.text = Generate
+
+action.generate.button.tooltip = Generate
+
+contentoutline.image = icons/togglepresentation.gif
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/.classpath b/plugins/org.eclipse.m2t.common.recipe.workflow/.classpath
new file mode 100644
index 0000000..48c8852
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="build"/>
+</classpath>
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/.cvsignore b/plugins/org.eclipse.m2t.common.recipe.workflow/.cvsignore
new file mode 100644
index 0000000..9d0b71a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/.cvsignore
@@ -0,0 +1,2 @@
+build
+dist
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/.project b/plugins/org.eclipse.m2t.common.recipe.workflow/.project
new file mode 100644
index 0000000..0992906
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2t.common.recipe.workflow</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.m2t.common.recipe.workflow/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..3a5ae06
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 07 13:11:50 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/META-INF/MANIFEST.MF b/plugins/org.eclipse.m2t.common.recipe.workflow/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b6844f4
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.m2t.common.recipe.workflow
+Bundle-Version: 0.7.0.qualifier
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.emf.mwe.core,
+ org.eclipse.m2t.common.recipe,
+ org.eclipse.xtend,
+ org.apache.commons.logging
+Export-Package: org.eclipse.m2t.common.recipe.workflow
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/about.html b/plugins/org.eclipse.m2t.common.recipe.workflow/about.html
new file mode 100644
index 0000000..c207d05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/about.html
@@ -0,0 +1,33 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/about.ini b/plugins/org.eclipse.m2t.common.recipe.workflow/about.ini
new file mode 100644
index 0000000..2143c4c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/about.mappings b/plugins/org.eclipse.m2t.common.recipe.workflow/about.mappings
new file mode 100644
index 0000000..a28390a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/about.properties b/plugins/org.eclipse.m2t.common.recipe.workflow/about.properties
new file mode 100644
index 0000000..cad256a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=openArchitectureWare code generator\\n\\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright openArchitectureWare contributors and others 2000, 2007. All rights reserved.\n\
+Visit http://www.openArchitectureWare.org
+
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/build.properties b/plugins/org.eclipse.m2t.common.recipe.workflow/build.properties
new file mode 100644
index 0000000..42b9852
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.properties,\
+ about.mappings,\
+ eclipse32.png,\
+ plugin.properties
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/eclipse32.png b/plugins/org.eclipse.m2t.common.recipe.workflow/eclipse32.png
new file mode 100644
index 0000000..ded4869
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/eclipse32.png
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/plugin.properties b/plugins/org.eclipse.m2t.common.recipe.workflow/plugin.properties
new file mode 100644
index 0000000..d7f2ac2
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+pluginName=openArchitectureWare recipe workflow component
+providerName=openArchitectureWare.org
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/AbstractExpressionRecipeCreator.java b/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/AbstractExpressionRecipeCreator.java
new file mode 100644
index 0000000..cf393b9
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/AbstractExpressionRecipeCreator.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.m2t.common.recipe.workflow;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.xtend.expression.ExecutionContextImpl;
+import org.eclipse.xtend.expression.ExpressionFacade;
+import org.eclipse.xtend.expression.Resource;
+import org.eclipse.xtend.expression.Variable;
+import org.eclipse.xtend.typesystem.MetaModel;
+
+public abstract class AbstractExpressionRecipeCreator extends RecipeCreationComponent {
+
+ private List<String> extensions = new ArrayList<String>();
+ private List<String> imports = new ArrayList<String>();
+ private List<MetaModel> metamodels = new ArrayList<MetaModel>();
+
+ public void addMetaModel(MetaModel metamodel) {
+ this.metamodels.add(metamodel);
+ }
+
+ public void addExtension(String extension) {
+ this.extensions.add(extension);
+ }
+
+ public void addImport(String imp) {
+ this.imports.add(imp);
+ }
+
+
+ protected Collection<Check> createRecipes(Object model, String project) {
+ ExecutionContextImpl ctx = new ExecutionContextImpl();
+ for (MetaModel mm : metamodels) {
+ ctx.registerMetaModel(mm);
+ }
+ ctx = (ExecutionContextImpl) ctx.cloneWithVariable(new Variable("this",model));
+ ctx = (ExecutionContextImpl) ctx.cloneWithResource(new Resource() {
+
+ public String getFullyQualifiedName() {
+ return "recipe-creation";
+ }
+
+ public String[] getImportedExtensions() {
+ return extensions.toArray(new String[extensions.size()]);
+ }
+
+ public String[] getImportedNamespaces() {
+ return imports.toArray(new String[imports.size()]);
+ }
+
+ public void setFullyQualifiedName(String arg0) {
+
+ }});
+ ExpressionFacade facade = new ExpressionFacade(ctx);
+
+ return internalCreateRecipes(facade,project);
+ }
+
+ protected abstract Collection<Check> internalCreateRecipes(ExpressionFacade facade, String project);
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/RecipeCreationComponent.java b/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/RecipeCreationComponent.java
new file mode 100644
index 0000000..f20a464
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe.workflow/src/org/eclipse/m2t/common/recipe/workflow/RecipeCreationComponent.java
@@ -0,0 +1,75 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.workflow;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.emf.mwe.core.WorkflowComponentHelper;
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent;
+import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.io.CheckRegistry;
+
+public abstract class RecipeCreationComponent extends AbstractWorkflowComponent {
+
+ private org.apache.commons.logging.Log log = LogFactory.getLog(getClass());
+ private String recipeFileName;
+ private String appProject;
+ private String modelSlot;
+
+ public String getLogMessage() {
+ return "recipes => '"+recipeFileName+"'";
+ }
+
+ public final void setRecipeFile( String recipeFile ) {
+ this.recipeFileName = recipeFile;
+ }
+
+ public final void setAppProject( String pname ) {
+ this.appProject = pname;
+ }
+
+ public final void setModelSlot( String s ) {
+ this.modelSlot = s;
+ }
+
+ protected final void checkConfigurationInternal(Issues issues) {
+ if ( !WorkflowComponentHelper.isParamSet( recipeFileName )) issues.addError( this, "no recipeFile specified. " );
+ if ( !WorkflowComponentHelper.isParamSet( appProject )) issues.addError( this, "no appProjectName specified. " );
+ if ( !WorkflowComponentHelper.isParamSet( modelSlot )) issues.addError( this, "no modelSlot specified. " );
+ }
+
+ protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
+ Object modelSlotContent = ctx.get(modelSlot);
+ Collection<Check> l = createRecipes(modelSlotContent, appProject);
+ if ( l == null ) return;
+ for (Iterator<Check> iter = l.iterator(); iter.hasNext();) {
+ Check c = (Check) iter.next();
+ CheckRegistry.addCheck( c );
+ }
+ CheckRegistry.setChecksFileName( recipeFileName );
+ log.info( "writing recipes to "+recipeFileName);
+ CheckRegistry.dumpToFile();
+ }
+
+ protected abstract Collection<Check> createRecipes(Object modelSlotContent, String appProject2);
+
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/.classpath b/plugins/org.eclipse.m2t.common.recipe/.classpath
new file mode 100644
index 0000000..48c8852
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="build"/>
+</classpath>
diff --git a/plugins/org.eclipse.m2t.common.recipe/.cvsignore b/plugins/org.eclipse.m2t.common.recipe/.cvsignore
new file mode 100644
index 0000000..9d0b71a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/.cvsignore
@@ -0,0 +1,2 @@
+build
+dist
diff --git a/plugins/org.eclipse.m2t.common.recipe/.project b/plugins/org.eclipse.m2t.common.recipe/.project
new file mode 100644
index 0000000..d0e22de
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.m2t.common.recipe</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.m2t.common.recipe/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.m2t.common.recipe/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2fe3161
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Dec 07 13:13:06 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe/META-INF/MANIFEST.MF b/plugins/org.eclipse.m2t.common.recipe/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..991d4a7
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.m2t.common.recipe
+Bundle-Version: 0.7.0.qualifier
+Bundle-Localization: plugin
+Require-Bundle: org.apache.ant,
+ org.eclipse.emf.ecore,
+ org.apache.commons.logging
+Export-Package: org.eclipse.m2t.common.recipe,
+ org.eclipse.m2t.common.recipe.core,
+ org.eclipse.m2t.common.recipe.eval,
+ org.eclipse.m2t.common.recipe.io,
+ org.eclipse.m2t.common.recipe.util
+Bundle-Vendor: %providerName
+Eclipse-BuddyPolicy: dependent
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.m2t.common.recipe/about.html b/plugins/org.eclipse.m2t.common.recipe/about.html
new file mode 100644
index 0000000..c207d05
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/about.html
@@ -0,0 +1,33 @@
+<!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>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content 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 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>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Source Code</h3>
+<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
+agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
+src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.m2t.common.recipe/about.ini b/plugins/org.eclipse.m2t.common.recipe/about.ini
new file mode 100644
index 0000000..2143c4c
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/plugins/org.eclipse.m2t.common.recipe/about.mappings b/plugins/org.eclipse.m2t.common.recipe/about.mappings
new file mode 100644
index 0000000..a28390a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/plugins/org.eclipse.m2t.common.recipe/about.properties b/plugins/org.eclipse.m2t.common.recipe/about.properties
new file mode 100644
index 0000000..cad256a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=openArchitectureWare code generator\\n\\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright openArchitectureWare contributors and others 2000, 2007. All rights reserved.\n\
+Visit http://www.openArchitectureWare.org
+
diff --git a/plugins/org.eclipse.m2t.common.recipe/build.properties b/plugins/org.eclipse.m2t.common.recipe/build.properties
new file mode 100644
index 0000000..42b9852
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ about.ini,\
+ about.properties,\
+ about.mappings,\
+ eclipse32.png,\
+ plugin.properties
diff --git a/plugins/org.eclipse.m2t.common.recipe/eclipse32.png b/plugins/org.eclipse.m2t.common.recipe/eclipse32.png
new file mode 100644
index 0000000..ded4869
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/eclipse32.png
Binary files differ
diff --git a/plugins/org.eclipse.m2t.common.recipe/plugin.properties b/plugins/org.eclipse.m2t.common.recipe/plugin.properties
new file mode 100644
index 0000000..f1c4378
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2006 openArchitectureWare commiters 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:
+# openArchitectureWare commiters - initial API and implementation
+###############################################################################
+pluginName=openArchitectureWare recipe core
+providerName=openArchitectureWare.org
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/RecipeCheckTask.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/RecipeCheckTask.java
new file mode 100644
index 0000000..3f57886
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/RecipeCheckTask.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 committers of openArchitectureWare 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.m2t.common.recipe;
+
+
+import java.io.File;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CompositeCheck;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.eval.CheckEvaluationListener;
+import org.eclipse.m2t.common.recipe.eval.CheckEvaluator;
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+import org.eclipse.m2t.common.recipe.io.CannotLoadChecksException;
+import org.eclipse.m2t.common.recipe.io.CheckRegistry;
+
+public class RecipeCheckTask extends Task implements CheckEvaluationListener {
+
+ static Log logger = LogFactory.getLog(RecipeCheckTask.class);
+ private String recipeFileName;
+
+ public void execute() throws BuildException {
+ File f = new File( recipeFileName );
+ if ( !f.exists() ) {
+ logger.error("recipe file not found: "+recipeFileName);
+ return;
+ }
+ logger.info("checking recipes from file: "+recipeFileName);
+ CheckRegistry.setChecksFileName( recipeFileName );
+ try {
+ CheckRegistry.loadFromFile();
+ } catch (CannotLoadChecksException e1) {
+ logger.error("cannot load recipe file: "+recipeFileName);
+ return;
+ }
+ EvaluationContext ctx = new EvaluationContext();
+ ctx.setBatchOnly(true);
+ CheckEvaluator e = new CheckEvaluator(ctx);
+ e.addListener( this );
+ e.evaluate( CheckRegistry.getChecks() );
+
+ }
+
+ public void evaluated(Check c, boolean actuallyChecked) {
+ if ( c instanceof CompositeCheck ) return;
+ if ( c.getStatus() == EvalStatus.OK ) {
+ logger.debug( "[ok] "+c.getName() + " -- "+c.getShortDescription() );
+ }
+ if ( c.getStatus() == EvalStatus.SKIPPED ) {
+ logger.debug( "[skipped] "+c.getName()+" -- "+c.getStatusMessage() );
+ }
+ if ( c.getStatus() == EvalStatus.FAILED ) {
+ logger.error( "[error] "+c.getShortDescription()+" -- "+c.getStatusMessage() );
+ }
+ }
+
+ public void setRecipeFile( String recipeFileName ) {
+ this.recipeFileName = recipeFileName;
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/AtomicCheck.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/AtomicCheck.java
new file mode 100644
index 0000000..c031b6a
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/AtomicCheck.java
@@ -0,0 +1,76 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+
+public abstract class AtomicCheck extends Check {
+
+ private static final long serialVersionUID = 1L;
+ private int status = EvalStatus.UNDETERMINED;
+ private String statusMessage = null;
+ private int trigger = EvalTrigger.ON_REQUEST;
+
+
+ public AtomicCheck( String name, String description, int trigger ) {
+ super(name, description);
+ setTrigger( trigger );
+ }
+
+ public AtomicCheck( String name, String description ) {
+ this(name, description, EvalTrigger.ON_REQUEST);
+ }
+
+ public int getCheckCount() {
+ return 1;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ protected void setStatusMessage(String message) {
+ this.statusMessage = message;
+ }
+
+ protected void setStatus( int s ) {
+ this.status = s;
+ }
+
+ public void ok() {
+ setStatus( EvalStatus.OK );
+ setStatusMessage(null);
+ }
+
+ public void fail( String reason ) {
+ setStatus( EvalStatus.FAILED );
+ setStatusMessage(reason);
+ throw new EvaluationStop();
+ }
+
+ public int getTrigger() {
+ return trigger;
+ }
+
+ protected void setTrigger( int trigger ) {
+ this.trigger = trigger;
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/Check.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/Check.java
new file mode 100644
index 0000000..aac37a4
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/Check.java
@@ -0,0 +1,140 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+public abstract class Check implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private CompositeCheck parent;
+ private String name;
+ private String shortDescription;
+ private String longDescription;
+ private Map<String, CheckParameter> params = null;
+
+ public Check( String name, String description ) {
+ this.name = name;
+ this.shortDescription = description;
+ setParameter( "_type", getClass().getName() );
+ }
+
+ public void setParameter( String name, Serializable value ) {
+ if ( params == null ) params = new HashMap<String, CheckParameter>();
+ params.put( name, new CheckParameter( this, name, value ) );
+ }
+
+ public Collection<CheckParameter> getParameters() {
+ if ( params == null ) params = new HashMap<String, CheckParameter>();
+ return params.values();
+ }
+
+ public CheckParameter getParameter( String name ) {
+ CheckParameter ret = null;
+ if ( params != null ) {
+ ret = params.get(name);
+ if ( ret != null ) return ret;
+ }
+ Map<String, CheckParameter> m = getIndirectParameterMap();
+ return m.get(name);
+ }
+
+ public String getParameterString( String name ) {
+ CheckParameter p = getParameter(name);
+ if ( p.getValue() != null ) return p.getValue().toString();
+ return null;
+ }
+
+ private Map<String, CheckParameter> getIndirectParameterMap() {
+ List<Check> l = new ArrayList<Check>();
+ collectParents(l);
+ Map<String, CheckParameter> map = new HashMap<String, CheckParameter>();
+ Collections.reverse(l);
+ for (Iterator<Check> iter = l.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ for (Iterator<CheckParameter> iterator = c.getParameters().iterator(); iterator.hasNext();) {
+ CheckParameter p = iterator.next();
+ map.put( p.getKey(), p );
+ }
+ }
+ return map;
+ }
+
+ public Collection<CheckParameter> getIndirectParameters() {
+ return getIndirectParameterMap().values();
+ }
+
+ public void setParent( CompositeCheck c ) {
+ parent = c;
+ }
+
+ public CompositeCheck getParent() {
+ return parent;
+ }
+
+ public void collectParents( List<Check> l ) {
+ if ( getParent() != null ) {
+ l.add( getParent() );
+ getParent().collectParents( l );
+ }
+ }
+
+ public void collectChildren( List<Check> l ) {
+ }
+
+ public abstract void evaluate( EvaluationContext c );
+
+ public abstract int getStatus();
+
+ public String getStatusMessage() {
+ return null;
+ }
+
+ public String getShortDescription() {
+ return shortDescription;
+ }
+
+ public String getLongDescription() {
+ return longDescription;
+ }
+
+ public void setLongDescription( String d ) {
+ longDescription = d;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public abstract int getTrigger();
+
+ public abstract int getCheckCount();
+
+ public boolean isInteractive() {
+ return false;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckParameter.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckParameter.java
new file mode 100644
index 0000000..07d00c0
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckParameter.java
@@ -0,0 +1,59 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+import java.io.Serializable;
+
+public class CheckParameter implements Serializable {
+
+ private static final long serialVersionUID = -8611695933417502115L;
+
+ private String key;
+
+ private Serializable value;
+
+ private Check owner;
+
+ public CheckParameter(Check owner, String key, Serializable value) {
+ this.owner = owner;
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public Serializable getValue() {
+ return value;
+ }
+
+ public void setValue(Serializable value) {
+ this.value = value;
+ }
+
+ public Check getOwner() {
+ return owner;
+ }
+
+ public String toString() {
+ return getKey() + ": " + getValue().toString();
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckSet.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckSet.java
new file mode 100644
index 0000000..6bad19d
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CheckSet.java
@@ -0,0 +1,47 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class CheckSet implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private List<Check> checks = new ArrayList<Check>();
+
+ public void add( Check c ) {
+ checks.add( c );
+ }
+
+ public List<Check> getChecks() {
+ return checks;
+ }
+
+ public int getCheckCount() {
+ int count = 0;
+ for (Iterator<Check> iter = checks.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ count += c.getCheckCount();
+ }
+ return count;
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CompositeCheck.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CompositeCheck.java
new file mode 100644
index 0000000..65b2859
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/CompositeCheck.java
@@ -0,0 +1,94 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.m2t.common.recipe.eval.EvaluationContext;
+
+
+public class CompositeCheck extends Check {
+
+ private static final long serialVersionUID = 1L;
+
+ private List<Check> children = new ArrayList<Check>();
+
+ public CompositeCheck( String name, String description ) {
+ super(name, description );
+ }
+
+ public void evaluate( EvaluationContext ctx ) {
+ if ( children == null ) return;
+ for (Iterator<Check> iter = children.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ try {
+ ctx.getEvaluator().evaluate( c );
+ } catch ( EvaluationStop ignore ) {}
+ }
+ }
+
+ public int getStatus() {
+ int stat = EvalStatus.OK;
+ for (Iterator<Check> iter = children.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ int s = c.getStatus();
+ if ( s == EvalStatus.FAILED ) stat = EvalStatus.SOMECHILDRENFAILED;
+ if ( s == EvalStatus.SOMECHILDRENFAILED ) stat = EvalStatus.SOMECHILDRENFAILED;
+ if ( s == EvalStatus.UNDETERMINED ) stat = EvalStatus.SOMECHILDRENFAILED;
+ }
+ return stat;
+ }
+
+ public List<Check> getChildren() {
+ return children;
+ }
+
+ public void addChild(Check c) {
+ children.add( c );
+ c.setParent( this );
+ }
+
+ public boolean hasChildren() {
+ return children != null;
+ }
+
+ public void collectChildren( List<Check> l ) {
+ for (Iterator<Check> iter = children.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ l.add( c );
+ c.collectChildren(l);
+ }
+ }
+
+ public int getCheckCount() {
+ int count = 0;
+ for (Iterator<Check> iter = children.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ count += c.getCheckCount();
+ }
+ return count;
+ }
+
+ public int getTrigger() {
+ for (Iterator<Check> iter = children.iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ if ( c.getTrigger() == EvalTrigger.ON_CHANGE ) return EvalTrigger.ON_CHANGE;
+ }
+ return EvalTrigger.ON_REQUEST;
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalStatus.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalStatus.java
new file mode 100644
index 0000000..0749df6
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalStatus.java
@@ -0,0 +1,25 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+public class EvalStatus {
+
+ public static final int UNDETERMINED = 0;
+ public static final int OK = 1;
+ public static final int FAILED = 2;
+ public static final int SOMECHILDRENFAILED = 3;
+ public static final int SKIPPED = 4;
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalTrigger.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalTrigger.java
new file mode 100644
index 0000000..fb96543
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvalTrigger.java
@@ -0,0 +1,22 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+public class EvalTrigger {
+
+ public static final int ON_REQUEST = 0;
+ public static final int ON_CHANGE = 1;
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvaluationStop.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvaluationStop.java
new file mode 100644
index 0000000..35d2262
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/core/EvaluationStop.java
@@ -0,0 +1,21 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.core;
+
+public class EvaluationStop extends RuntimeException {
+
+ private static final long serialVersionUID = 5177576932833787205L;
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluationListener.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluationListener.java
new file mode 100644
index 0000000..ffdbbf9
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluationListener.java
@@ -0,0 +1,23 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.eval;
+
+import org.eclipse.m2t.common.recipe.core.Check;
+
+public interface CheckEvaluationListener {
+
+ public void evaluated( Check c, boolean actuallyChecked );
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluator.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluator.java
new file mode 100644
index 0000000..41df685
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/CheckEvaluator.java
@@ -0,0 +1,81 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.eval;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+import org.eclipse.m2t.common.recipe.core.EvalStatus;
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+import org.eclipse.m2t.common.recipe.core.EvaluationStop;
+
+public class CheckEvaluator {
+
+ private List<CheckEvaluationListener> listeners;
+ private EvaluationContext context;
+
+ public CheckEvaluator( EvaluationContext c ) {
+ this.context = c;
+ }
+
+ public void addListener( CheckEvaluationListener l ) {
+ if ( listeners == null ) listeners = new ArrayList<CheckEvaluationListener>();
+ listeners.add( l );
+ }
+
+ protected void notify( Check c, boolean checked ) {
+ if ( listeners == null ) return;
+ for (Iterator<CheckEvaluationListener> iter = listeners.iterator(); iter.hasNext();) {
+ CheckEvaluationListener l = iter.next();
+ l.evaluated(c, checked);
+ }
+ }
+
+ public void evaluate( CheckSet checks ) {
+ context.setCheckEvaluator(this);
+ if ( checks != null ) {
+ for (Iterator<Check> iter = checks.getChecks().iterator(); iter.hasNext();) {
+ Check c = iter.next();
+ evaluate( c );
+ }
+ }
+ }
+
+ public void evaluate( Check c ) {
+ context.setCheckEvaluator(this);
+ if ( ( c.getTrigger() == EvalTrigger.ON_CHANGE && context.evaluateOnChangeTriggeredCheck() ) ||
+ ( c.getTrigger() == EvalTrigger.ON_REQUEST && context.evaluateOnRequestTriggeredCheck() ) ) {
+ if ( context.reevaluateAlreadyEvaluated() ) {
+ try {
+ c.evaluate( context );
+ } catch ( EvaluationStop ignore ) {}
+ notify(c, true);
+ } else {
+ if ( c.getStatus() != EvalStatus.OK ) {
+ try {
+ c.evaluate( context );
+ } catch ( EvaluationStop ignore ) {}
+ notify(c, true);
+ } else {
+ notify(c,false);
+ }
+ }
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/EvaluationContext.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/EvaluationContext.java
new file mode 100644
index 0000000..361be61
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/eval/EvaluationContext.java
@@ -0,0 +1,62 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.eval;
+
+import org.eclipse.m2t.common.recipe.core.EvalTrigger;
+
+public class EvaluationContext {
+
+ private boolean evaluateAll = false;
+ private int trigger = EvalTrigger.ON_REQUEST;
+ private boolean batchOnly = false;
+ private CheckEvaluator evaluator;
+
+ public void setCheckEvaluator( CheckEvaluator e ) {
+ this.evaluator = e;
+ }
+
+ public CheckEvaluator getEvaluator() {
+ return evaluator;
+ }
+
+ public void setEvaluateAll( boolean b ) {
+ this.evaluateAll = b;
+ }
+
+ public void setTrigger( int trigger ) {
+ this.trigger = trigger;
+ }
+
+ public void setBatchOnly( boolean b ) {
+ this.batchOnly = b;
+ }
+
+ public boolean reevaluateAlreadyEvaluated() {
+ return evaluateAll;
+ }
+
+ public boolean evaluateOnRequestTriggeredCheck() {
+ return trigger == EvalTrigger.ON_REQUEST;
+ }
+
+ public boolean evaluateOnChangeTriggeredCheck() {
+ return trigger == EvalTrigger.ON_REQUEST ||
+ trigger == EvalTrigger.ON_CHANGE;
+ }
+
+ public boolean evaluateBatchOnly() {
+ return batchOnly;
+ }
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CannotLoadChecksException.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CannotLoadChecksException.java
new file mode 100644
index 0000000..adfdcbf
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CannotLoadChecksException.java
@@ -0,0 +1,30 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.io;
+
+public class CannotLoadChecksException extends Exception {
+
+ private static final long serialVersionUID = -3320322651465524260L;
+
+ public CannotLoadChecksException() {
+ super();
+ }
+
+ public CannotLoadChecksException( Exception ex ) {
+ super( ex );
+ }
+
+
+}
diff --git a/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CheckRegistry.java b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CheckRegistry.java
new file mode 100644
index 0000000..c5123ba
--- /dev/null
+++ b/plugins/org.eclipse.m2t.common.recipe/src/org/eclipse/m2t/common/recipe/io/CheckRegistry.java
@@ -0,0 +1,97 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Markus Voelter 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:
+ * Markus Voelter - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.m2t.common.recipe.io;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.m2t.common.recipe.core.Check;
+import org.eclipse.m2t.common.recipe.core.CheckSet;
+
+public class CheckRegistry {
+
+ private static Log logger = LogFactory.getLog( CheckRegistry.class );
+
+ private static String checksFileName = null;
+ private static CheckSet checks = null;
+
+ public static boolean hasChecksFile() {
+ return checksFileName != null;
+ }
+
+ public static void addCheck( Check c ) {
+ if ( checks == null ) {
+ checks = new CheckSet();
+ }
+ checks.add( c );
+ }
+
+ public static CheckSet getChecks() {
+ return checks;
+ }
+
+ public static void setChecksFileName( String n ) {
+ checksFileName = n;
+ }
+
+ public static void dumpToFile() {
+ if ( hasChecksFile() ) {
+ FileOutputStream fos = null;
+ ObjectOutputStream oos = null;
+ try {
+ fos = new FileOutputStream( checksFileName );
+ oos = new ObjectOutputStream(fos);
+ oos.writeObject( checks );
+ oos.flush();
+ } catch ( Exception ex ) {
+ logger.warn("c