savara SVN: r373 - in trunk/tools/plugins: org.jboss.savara.pi4soa.cdm/META-INF and 16 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-27 06:20:28 -0400 (Fri, 27 Aug 2010)
New Revision: 373
Modified:
trunk/tools/plugins/org.jboss.savara.contract.model/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.protocol.contract/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.tools.validator/META-INF/MANIFEST.MF
trunk/tools/plugins/org.jboss.savara.tools.wsdl/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conformance/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.core/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF
Log:
Updated dependency versions on the scribble plugins to ensure when the new version 2 becomes available it does not cause problems if the existing savara plugins are still installed.
Modified: trunk/tools/plugins/org.jboss.savara.contract.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.contract.model/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.contract.model/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -5,7 +5,7 @@
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.jboss.savara.contract.model.osgi.Activator
Bundle-Vendor: www.jboss.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core;bundle-version="0.1.0"
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)"
Export-Package: org.jboss.savara.contract.model
Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -5,20 +5,20 @@
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.jboss.savara.pi4soa.cdm.osgi.Activator
Bundle-Vendor: www.jboss.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.pi4soa.cdl,
org.pi4soa.common,
- org.scribble.core,
- org.scribble.conversation.model,
- org.scribble.conversation.parser,
+ org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.parser;bundle-version="[1.1.0,2.0.0)",
org.eclipse.ui;resolution:=optional,
org.eclipse.core.resources;resolution:=optional,
org.eclipse.core.runtime;resolution:=optional,
org.pi4soa.designer;resolution:=optional,
org.eclipse.ui.views.properties.tabbed;resolution:=optional,
- org.scribble.expression.xpath,
- org.scribble.eclipse;resolution:=optional,
+ org.scribble.expression.xpath;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.eclipse;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.jboss.savara.contract.model
Scribble-Extensions: org.jboss.savara.pi4soa.cdm.parser.CDMTokenizer,
org.jboss.savara.pi4soa.cdm.parser.CDMModelParserRule,
Modified: trunk/tools/plugins/org.jboss.savara.protocol.contract/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.protocol.contract/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.protocol.contract/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -5,10 +5,10 @@
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.jboss.savara.protocol.contract.osgi.Activator
Bundle-Vendor: www.jboss.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model,
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)",
org.jboss.savara.contract.model
Export-Package: org.jboss.savara.protocol.contract,
org.jboss.savara.protocol.contract.impl;x-friends:="org.jboss.savara.protocol.contract.tests"
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,16 +6,16 @@
Bundle-Activator: org.jboss.savara.tools.bpel.osgi.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.scribble.conversation.model,
- org.scribble.core,
- org.scribble.lang.model,
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.lang.model;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.resources,
- org.scribble.eclipse,
+ org.scribble.eclipse;bundle-version="[1.1.0,2.0.0)",
org.eclipse.jdt.core,
org.junit,
- org.scribble.conversation.parser,
+ org.scribble.conversation.parser;bundle-version="[1.1.0,2.0.0)",
org.apache.commons.logging,
- org.scribble.expression.xpath,
+ org.scribble.expression.xpath;bundle-version="[1.1.0,2.0.0)",
org.jboss.savara.pi4soa.cdm;resolution:=optional,
org.jboss.savara.contract.model,
org.jboss.savara.tools.wsdl,
@@ -24,7 +24,7 @@
org.eclipse.wst.common.frameworks,
org.eclipse.wst.common.project.facet.core
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: www.jboss.org
Scribble-Extensions: org.jboss.savara.tools.bpel.parser.BPELTokenizer,
org.jboss.savara.tools.bpel.parser.BPELModelParserRule,
Modified: trunk/tools/plugins/org.jboss.savara.tools.validator/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.validator/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.tools.validator/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -10,5 +10,5 @@
org.pi4soa.common,
org.eclipse.core.resources,
org.pi4soa.cdl
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Modified: trunk/tools/plugins/org.jboss.savara.tools.wsdl/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.wsdl/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.jboss.savara.tools.wsdl/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -4,18 +4,18 @@
Bundle-SymbolicName: org.jboss.savara.tools.wsdl;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.jboss.savara.tools.wsdl.osgi.Activator
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: www.jboss.org
Require-Bundle: javax.wsdl;visibility:=reexport,
org.jboss.savara.contract.model,
org.apache.commons.logging,
- org.scribble.core,
+ org.scribble.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.resources,
org.eclipse.jface,
org.eclipse.ui,
- org.scribble.eclipse,
+ org.scribble.eclipse;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.runtime,
- org.scribble.conversation.model
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Export-Package: org.jboss.savara.tools.wsdl.generator,
org.jboss.savara.tools.wsdl.generator.soap
Bundle-ActivationPolicy: lazy
Modified: trunk/tools/plugins/org.scribble.conformance/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conformance/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conformance/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,7 +6,7 @@
Bundle-Activator: org.scribble.conformance.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.runtime;resolution:=optional,
org.junit;resolution:=optional
Bundle-ActivationPolicy: lazy
@@ -21,4 +21,4 @@
org.scribble.conformance.model.transform.MessageSignatureStatelessTransformationRule,
org.scribble.conformance.model.transform.RoleStatelessTransformationRule,
org.scribble.conformance.model.transform.TypeReferenceStatelessTransformationRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.comparator/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,9 +6,9 @@
Bundle-Activator: org.scribble.conversation.comparator.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model,
- org.scribble.conformance,
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conformance;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.runtime;resolution:=optional,
org.junit;resolution:=optional
Bundle-ActivationPolicy: lazy
@@ -30,4 +30,4 @@
org.scribble.conversation.comparator.model.transform.RunStatelessTransformationRule,
org.scribble.conversation.comparator.model.transform.SpawnStatelessTransformationRule,
org.scribble.conversation.comparator.model.transform.IfStatelessTransformationRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.export.text/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,8 +6,8 @@
Bundle-Activator: org.scribble.conversation.export.text.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Scribble-Extensions: org.scribble.conversation.export.text.ConversationModelTextExportRule,
org.scribble.conversation.export.text.ConversationTextExportRule,
@@ -27,4 +27,4 @@
org.scribble.conversation.export.text.TryEscapeTextExportRule,
org.scribble.conversation.export.text.CatchBlockTextExportRule,
org.scribble.conversation.export.text.InterruptBlockTextExportRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.model/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,8 +6,8 @@
Bundle-Activator: org.scribble.conversation.model.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)"
Eclipse-LazyStart: true
Export-Package: org.scribble.conversation.model
Scribble-Extensions: org.scribble.conversation.model.ConversationNotation
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.parser/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,8 +6,8 @@
Bundle-Activator: org.scribble.conversation.parser.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Scribble-Extensions: org.scribble.conversation.parser.ConversationKeyWordProvider,
org.scribble.conversation.parser.ConversationParserRule,
@@ -28,4 +28,4 @@
org.scribble.conversation.parser.CatchBlockParserRule,
org.scribble.conversation.parser.InterruptBlockParserRule
Export-Package: org.scribble.conversation.parser
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.projector/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,8 +6,8 @@
Bundle-Activator: org.scribble.conversation.projector.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Scribble-Extensions: org.scribble.conversation.projector.ConversationModelProjectorRule,
org.scribble.conversation.projector.IdentityLocatorProjectorRule,
@@ -27,4 +27,4 @@
org.scribble.conversation.projector.InterruptBlockProjectorRule,
org.scribble.conversation.projector.RaiseProjectorRule,
org.scribble.conversation.projector.VariableListProjectorRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.conversation.validation/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,8 +6,8 @@
Bundle-Activator: org.scribble.conversation.validation.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Scribble-Extensions: org.scribble.conversation.validation.ConversationModelValidationRule,
org.scribble.conversation.validation.BehaviourValidationRule,
@@ -23,4 +23,4 @@
org.scribble.conversation.validation.TryEscapeValidationRule,
org.scribble.conversation.validation.RaiseValidationRule,
org.scribble.conversation.validation.ComposeValidationRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.core/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.core/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -94,5 +94,5 @@
org.scribble.export.text.InteractionTextExportRule,
org.scribble.export.text.ModelNameTextExportRule
Require-Bundle: org.scribble.monitor;resolution:=optional
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,7 +6,7 @@
Bundle-Activator: org.scribble.eclipse.osgi.Activator
Bundle-Vendor: www.scribble.org
Require-Bundle: org.eclipse.core.runtime,
- org.scribble.core,
+ org.scribble.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.core.resources,
org.eclipse.swt,
org.eclipse.ui,
@@ -17,4 +17,4 @@
Scribble-Extensions: org.scribble.eclipse.model.admin.OSGIModelRepository
Export-Package: org.scribble.eclipse.model.admin,
org.scribble.eclipse.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.expression.xpath/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -5,10 +5,10 @@
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.scribble.expression.xpath.osgi.Activator
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: www.scribble.org
Scribble-Extensions: org.scribble.expression.xpath.validation.XPathExpressionValidationRule,
org.scribble.expression.xpath.export.text.XPathExpressionTextExportRule,
Modified: trunk/tools/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.lang.comparator/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,10 +6,10 @@
Bundle-Activator: org.scribble.lang.comparator.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.lang.model,
- org.scribble.conversation.model,
- org.scribble.conformance
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.lang.model;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conformance;bundle-version="[1.1.0,2.0.0)"
Eclipse-LazyStart: true
Scribble-Extensions: org.scribble.lang.comparator.LanguageModelComparatorRule
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tools/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF 2010-08-27 09:55:25 UTC (rev 372)
+++ trunk/tools/plugins/org.scribble.lang.model/META-INF/MANIFEST.MF 2010-08-27 10:20:28 UTC (rev 373)
@@ -6,9 +6,9 @@
Bundle-Activator: org.scribble.lang.model.osgi.Activator
Bundle-Vendor: www.scribble.org
Import-Package: org.osgi.framework;version="1.3.0"
-Require-Bundle: org.scribble.core,
- org.scribble.conversation.model
+Require-Bundle: org.scribble.core;bundle-version="[1.1.0,2.0.0)",
+ org.scribble.conversation.model;bundle-version="[1.1.0,2.0.0)"
Eclipse-LazyStart: true
Export-Package: org.scribble.lang.model
Scribble-Extensions: org.scribble.lang.model.JavaLanguageModel
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
13 years, 8 months
savara SVN: r372 - trunk/tools/features/org.jboss.savara.experimental.feature.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-27 05:55:25 -0400 (Fri, 27 Aug 2010)
New Revision: 372
Modified:
trunk/tools/features/org.jboss.savara.experimental.feature/
Log:
Property changes on: trunk/tools/features/org.jboss.savara.experimental.feature
___________________________________________________________________
Name: svn:ignore
+ target
13 years, 8 months
savara SVN: r371 - in trunk/tools: features/org.jboss.savara.experimental.feature and 3 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-27 05:47:54 -0400 (Fri, 27 Aug 2010)
New Revision: 371
Added:
trunk/tools/features/org.jboss.savara.experimental.feature/
trunk/tools/features/org.jboss.savara.experimental.feature/Copyright.txt
trunk/tools/features/org.jboss.savara.experimental.feature/build.properties
trunk/tools/features/org.jboss.savara.experimental.feature/feature.xml
trunk/tools/features/org.jboss.savara.experimental.feature/pom.xml
Modified:
trunk/tools/features/org.jboss.savara.feature/build.properties
trunk/tools/features/org.jboss.savara.feature/feature.xml
trunk/tools/features/org.jboss.savara.feature/pom.xml
trunk/tools/features/org.scribble.protocol.feature/build.properties
trunk/tools/features/org.scribble.protocol.feature/feature.xml
trunk/tools/features/pom.xml
trunk/tools/site/site.xml
Log:
Separate out features in to main and experimental.
Added: trunk/tools/features/org.jboss.savara.experimental.feature/Copyright.txt
===================================================================
--- trunk/tools/features/org.jboss.savara.experimental.feature/Copyright.txt (rev 0)
+++ trunk/tools/features/org.jboss.savara.experimental.feature/Copyright.txt 2010-08-27 09:47:54 UTC (rev 371)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
Added: trunk/tools/features/org.jboss.savara.experimental.feature/build.properties
===================================================================
--- trunk/tools/features/org.jboss.savara.experimental.feature/build.properties (rev 0)
+++ trunk/tools/features/org.jboss.savara.experimental.feature/build.properties 2010-08-27 09:47:54 UTC (rev 371)
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ Copyright.txt
+src.includes = Copyright.txt,\
+ pom.xml,\
+ build.properties,\
+ feature.xml
Added: trunk/tools/features/org.jboss.savara.experimental.feature/feature.xml
===================================================================
--- trunk/tools/features/org.jboss.savara.experimental.feature/feature.xml (rev 0)
+++ trunk/tools/features/org.jboss.savara.experimental.feature/feature.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.savara.experimental.feature"
+ label="JBoss SAVARA Experimental Feature"
+ version="1.1.0.qualifier"
+ provider-name="www.jboss.org">
+
+ <description>
+ The JBoss Tools (Experimental) for Savara.
+ </description>
+
+ <copyright>
+ /*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+ </copyright>
+
+ <license url="http://www.gnu.org/licenses/lgpl-2.1.html">
+ GNU LESSER GENERAL PUBLIC LICENSE
+
+Version 2.1, February 1999
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+ </license>
+
+ <requires>
+ <import feature="org.jboss.savara.feature"/>
+ </requires>
+
+ <plugin
+ id="org.jboss.savara.tap.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.scribble.conformance"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.scribble.conversation.comparator"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.scribble.lang.comparator"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/tools/features/org.jboss.savara.experimental.feature/pom.xml
===================================================================
--- trunk/tools/features/org.jboss.savara.experimental.feature/pom.xml (rev 0)
+++ trunk/tools/features/org.jboss.savara.experimental.feature/pom.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -0,0 +1,16 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.savara.tools</groupId>
+ <artifactId>org.jboss.savara.experimental.feature</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>Savara::Tools::Features::SavaraTools(Experimental)</name>
+
+ <parent>
+ <groupId>org.jboss.savara.tools</groupId>
+ <artifactId>features</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+</project>
+
Modified: trunk/tools/features/org.jboss.savara.feature/build.properties
===================================================================
--- trunk/tools/features/org.jboss.savara.feature/build.properties 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/org.jboss.savara.feature/build.properties 2010-08-27 09:47:54 UTC (rev 371)
@@ -1,6 +1,6 @@
bin.includes = feature.xml,\
Copyright.txt
-src.includes = .project,\
+src.includes = pom.xml,\
Copyright.txt,\
build.properties,\
feature.xml
Modified: trunk/tools/features/org.jboss.savara.feature/feature.xml
===================================================================
--- trunk/tools/features/org.jboss.savara.feature/feature.xml 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/org.jboss.savara.feature/feature.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.jboss.savara.tools.feature"
- label="JBoss SAVARA Tools Feature"
+ id="org.jboss.savara.feature"
+ label="JBoss SAVARA Feature"
version="1.1.0.qualifier"
provider-name="www.jboss.org">
@@ -12,7 +12,7 @@
<copyright>
/*
* JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
@@ -227,4 +227,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.jboss.savara.pi4soa.cdm"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
Modified: trunk/tools/features/org.jboss.savara.feature/pom.xml
===================================================================
--- trunk/tools/features/org.jboss.savara.feature/pom.xml 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/org.jboss.savara.feature/pom.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.savara.tools</groupId>
- <artifactId>org.jboss.savara.tools.feature</artifactId>
+ <artifactId>org.jboss.savara.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<name>Savara::Tools::Features::SavaraTools</name>
Modified: trunk/tools/features/org.scribble.protocol.feature/build.properties
===================================================================
--- trunk/tools/features/org.scribble.protocol.feature/build.properties 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/org.scribble.protocol.feature/build.properties 2010-08-27 09:47:54 UTC (rev 371)
@@ -1,6 +1,6 @@
bin.includes = feature.xml,\
Copyright.txt
-src.includes = .project,\
+src.includes = pom.xml,\
Copyright.txt,\
build.properties,\
feature.xml
Modified: trunk/tools/features/org.scribble.protocol.feature/feature.xml
===================================================================
--- trunk/tools/features/org.scribble.protocol.feature/feature.xml 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/org.scribble.protocol.feature/feature.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -9,26 +9,203 @@
Scribble Protocol Features.
</description>
- <copyright url="http://www.apache.org/licenses/LICENSE-2.0" >
+ <copyright>
+ *
+ * Copyright 2010 www.scribble.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
</copyright>
<license url="http://www.apache.org/licenses/LICENSE-2.0">
- </license>
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
- <plugin
- id="org.scribble.conformance"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- <plugin
- id="org.scribble.conversation.comparator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
+ 1. Definitions.
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+ </license>
+
<plugin
id="org.scribble.conversation.export.text"
download-size="0"
@@ -86,13 +263,6 @@
unpack="false"/>
<plugin
- id="org.scribble.lang.comparator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.scribble.lang.model"
download-size="0"
install-size="0"
Modified: trunk/tools/features/pom.xml
===================================================================
--- trunk/tools/features/pom.xml 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/features/pom.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -15,7 +15,8 @@
<modules>
<module>org.scribble.protocol.feature</module>
- <module>org.jboss.savara.tools.feature</module>
+ <module>org.jboss.savara.feature</module>
+ <module>org.jboss.savara.experimental.feature</module>
</modules>
</project>
Modified: trunk/tools/site/site.xml
===================================================================
--- trunk/tools/site/site.xml 2010-08-27 09:02:00 UTC (rev 370)
+++ trunk/tools/site/site.xml 2010-08-27 09:47:54 UTC (rev 371)
@@ -3,12 +3,15 @@
<description name="Savara Tools Update Site">
This is the update site for the Savara tools.
</description>
- <feature url="features/org.jboss.savara.tools.feature_0.0.0.jar" id="org.jboss.savara.tools.feature" version="0.0.0">
+ <feature url="features/org.jboss.savara.feature_0.0.0.jar" id="org.jboss.savara.feature" version="0.0.0">
<category name="Savara"/>
</feature>
<feature url="features/org.scribble.protocol.feature_0.0.0.jar" id="org.scribble.protocol.feature" version="0.0.0">
<category name="Savara"/>
</feature>
+ <feature url="features/org.jboss.savara.experimental.feature_0.0.0.jar" id="org.jboss.savara.experimental.feature" version="0.0.0">
+ <category name="Savara"/>
+ </feature>
<category-def name="Savara" label="Savara">
<description>
Savara Tools update site
13 years, 8 months
savara SVN: r370 - trunk/tools/features.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-27 05:02:00 -0400 (Fri, 27 Aug 2010)
New Revision: 370
Added:
trunk/tools/features/org.jboss.savara.feature/
Removed:
trunk/tools/features/org.jboss.savara.tools.feature/
Log:
Rename feature
Copied: trunk/tools/features/org.jboss.savara.feature (from rev 369, trunk/tools/features/org.jboss.savara.tools.feature)
13 years, 8 months
savara SVN: r369 - in trunk/validators: jboss and 2 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-26 14:16:29 -0400 (Thu, 26 Aug 2010)
New Revision: 369
Added:
trunk/validators/jboss/esb/
trunk/validators/jboss/pom.xml
Removed:
trunk/validators/jbossesb/
Modified:
trunk/validators/jboss/esb/pom.xml
trunk/validators/jboss/esb/src/main/configs/esb-assembly.xml
trunk/validators/pom.xml
Log:
Refactored jbossesb validator.
Copied: trunk/validators/jboss/esb (from rev 367, trunk/validators/jbossesb)
Modified: trunk/validators/jboss/esb/pom.xml
===================================================================
--- trunk/validators/jbossesb/pom.xml 2010-08-26 15:06:05 UTC (rev 367)
+++ trunk/validators/jboss/esb/pom.xml 2010-08-26 18:16:29 UTC (rev 369)
@@ -6,11 +6,11 @@
<artifactId>savara-validator-jbossesb</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Savara::Validators::JBossESB</name>
+ <name>Savara::Validators::JBoss::ESB</name>
<parent>
- <groupId>org.jboss.savara</groupId>
- <artifactId>validators</artifactId>
+ <groupId>org.jboss.savara.validators</groupId>
+ <artifactId>jboss</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
Modified: trunk/validators/jboss/esb/src/main/configs/esb-assembly.xml
===================================================================
--- trunk/validators/jbossesb/src/main/configs/esb-assembly.xml 2010-08-26 15:06:05 UTC (rev 367)
+++ trunk/validators/jboss/esb/src/main/configs/esb-assembly.xml 2010-08-26 18:16:29 UTC (rev 369)
@@ -20,9 +20,9 @@
<outputDirectory>/lib</outputDirectory>
<includes>
<include>org.jboss.savara.validators:savara-validator-jbossesb</include>
- <include>org.jboss.savara.dependencies.pi4soa:pi4soa-common</include>
- <include>org.jboss.savara.dependencies.pi4soa:pi4soa-cdl</include>
- <include>org.jboss.savara.dependencies.pi4soa:pi4soa-service</include>
+ <include>org.pi4soa:org.pi4soa.common</include>
+ <include>org.pi4soa:org.pi4soa.cdl</include>
+ <include>org.pi4soa:org.pi4soa.service</include>
<include>org.jboss.savara.dependencies.eclipse:emf-common</include>
<include>org.jboss.savara.dependencies.eclipse:emf-ecore</include>
<include>org.jboss.savara.dependencies.eclipse:emf-ecore-xmi</include>
Added: trunk/validators/jboss/pom.xml
===================================================================
--- trunk/validators/jboss/pom.xml (rev 0)
+++ trunk/validators/jboss/pom.xml 2010-08-26 18:16:29 UTC (rev 369)
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.savara.validators</groupId>
+ <artifactId>jboss</artifactId>
+ <packaging>pom</packaging>
+ <name>Savara::Validators::JBoss</name>
+ <version>1.1.0-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.jboss.savara</groupId>
+ <artifactId>validators</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <modules>
+ <module>esb</module>
+ </modules>
+
+</project>
Modified: trunk/validators/pom.xml
===================================================================
--- trunk/validators/pom.xml 2010-08-26 17:56:39 UTC (rev 368)
+++ trunk/validators/pom.xml 2010-08-26 18:16:29 UTC (rev 369)
@@ -17,7 +17,7 @@
</parent>
<modules>
- <module>jbossesb</module>
+ <module>jboss</module>
</modules>
</project>
13 years, 8 months
savara SVN: r368 - in trunk: validators and 1 other directory.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-26 13:56:39 -0400 (Thu, 26 Aug 2010)
New Revision: 368
Added:
trunk/validators/jboss/
Modified:
trunk/tools/plugins/org.jboss.savara.tap.model/
Log:
Property changes on: trunk/tools/plugins/org.jboss.savara.tap.model
___________________________________________________________________
Name: svn:ignore
- target
+ target
bin
13 years, 8 months
savara SVN: r367 - trunk/tools/plugins.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-26 11:06:05 -0400 (Thu, 26 Aug 2010)
New Revision: 367
Removed:
trunk/tools/plugins/org.scribble.conversation.eclipse/
Log:
Remove unnecessary plugin.
13 years, 8 months
savara SVN: r366 - in trunk/tools: plugins and 21 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-26 10:25:07 -0400 (Thu, 26 Aug 2010)
New Revision: 366
Removed:
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java
trunk/tools/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/actions/
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/images/
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/outliner/
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/resolutions/
Modified:
trunk/tools/features/org.scribble.protocol.feature/feature.xml
trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/dialogs/GenerateDialog.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
trunk/tools/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java
trunk/tools/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java
trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java
trunk/tools/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java
trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java
trunk/tools/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java
trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
trunk/tools/plugins/org.scribble.eclipse/plugin.xml
trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java
trunk/tools/plugins/pom.xml
Log:
Removed implicit dependency management used to trigger validation and conformance checking between descriptions. This will be replaced more explicit triggering of validation using the TAP model.
Modified: trunk/tools/features/org.scribble.protocol.feature/feature.xml
===================================================================
--- trunk/tools/features/org.scribble.protocol.feature/feature.xml 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/features/org.scribble.protocol.feature/feature.xml 2010-08-26 14:25:07 UTC (rev 366)
@@ -30,13 +30,6 @@
unpack="false"/>
<plugin
- id="org.scribble.conversation.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.scribble.conversation.export.text"
download-size="0"
install-size="0"
Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -32,7 +32,6 @@
import org.pi4soa.common.util.NamesUtil;
import org.pi4soa.common.xml.XMLUtils;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.jboss.savara.contract.model.*;
import org.scribble.conversation.model.*;
import org.scribble.expression.xpath.model.*;
@@ -245,10 +244,6 @@
protected void defineRoles(ConverterContext context,
final Choreography choreo, Conversation conv) {
- org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
-
org.pi4soa.cdl.interfaces.InterfaceDeriver intfDeriver=
org.pi4soa.cdl.interfaces.InterfaceFactory.getInterfaceDeriver();
@@ -314,7 +309,7 @@
context.setState(role.getName(), role);
- registerRole(context, dm, choreo, conv, roleList, role, pinst);
+ registerRole(context, choreo, conv, roleList, role, pinst);
// Setup interfaces
for (int i=0; i < pinst.getRoleTypes().size(); i++) {
@@ -378,7 +373,7 @@
context.setState(role.getName(), role);
if (choreo.getRoot() == Boolean.TRUE) {
- registerRole(context, dm, choreo, conv, roleList, role, ptype);
+ registerRole(context, choreo, conv, roleList, role, ptype);
// Setup interfaces
for (int i=0; i < ptype.getRoleTypes().size(); i++) {
@@ -561,12 +556,11 @@
}
private void registerRole(ConverterContext context,
- org.scribble.model.admin.DependencyManager dm,
Choreography choreo,
Conversation conv, RoleList roleList,
Role role, CDLType cdlType) {
- if (dm != null && cdlType.getSemanticAnnotations().size() > 0) {
+ if (cdlType.getSemanticAnnotations().size() > 0) {
java.util.Iterator<SemanticAnnotation> iter=
cdlType.getSemanticAnnotations().iterator();
@@ -635,8 +629,8 @@
// sub definition) and the identified
// conversation type
- dm.recordDependency(sref, ref,
- DependencyType.ConformsTo);
+ // GPB: TO REMOVE dm.recordDependency(sref, ref,
+ // DependencyType.ConformsTo);
} else {
logger.warning("Conversation type '"+
Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/FinalizerHandlerConverterRuleImpl.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -27,7 +27,6 @@
import org.pi4soa.common.util.NamesUtil;
import org.pi4soa.common.xml.XMLUtils;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.conversation.model.*;
import org.scribble.expression.xpath.model.*;
@@ -96,10 +95,6 @@
protected void defineRoles(ConverterContext context,
final FinalizerHandler choreo, Conversation conv) {
- org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
-
final java.util.List<ParticipantType> partTypes=new java.util.Vector<ParticipantType>();
final java.util.List<Participant> partInstances=new java.util.Vector<Participant>();
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/dialogs/GenerateDialog.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/dialogs/GenerateDialog.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/dialogs/GenerateDialog.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -29,7 +29,6 @@
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelRepository;
/**
@@ -70,17 +69,13 @@
ModelRepository.class, null);
if (mrep != null) {
- java.util.List<ModelInfo> models=mrep.getModels(ref,
- new DefaultModelListener());
-
- for (int i=0; m_conversationModel == null &&
- i < models.size(); i++) {
- if (models.get(i).getModel() instanceof ConversationModel) {
- m_conversationModel = (ConversationModel)
- models.get(i).getModel();
+ Model model=mrep.getModel(ref,
+ new DefaultModelListener());
+
+ if (model instanceof ConversationModel) {
+ m_conversationModel = (ConversationModel)model;
- m_localModelRefs = m_conversationModel.getLocalModels(ref);
- }
+ m_localModelRefs = m_conversationModel.getLocalModels(ref);
}
}
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -42,7 +42,6 @@
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelRepository;
import org.scribble.model.change.ModelGenerator;
import org.eclipse.core.runtime.*;
@@ -135,17 +134,13 @@
ModelRepository.class, null);
if (mrep != null) {
- java.util.List<ModelInfo> models=mrep.getModels(ref,
+ Model model=mrep.getModel(ref,
new DefaultModelListener());
- for (int i=0; m_conversationModel == null &&
- i < models.size(); i++) {
- if (models.get(i).getModel() instanceof ConversationModel) {
- m_conversationModel = (ConversationModel)
- models.get(i).getModel();
-
- m_localModelRefs = m_conversationModel.getLocalModels(ref);
- }
+ if (model instanceof ConversationModel) {
+ m_conversationModel = (ConversationModel)model;
+
+ m_localModelRefs = m_conversationModel.getLocalModels(ref);
}
}
}
Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.conversation.model.Conversation;
import org.scribble.conversation.model.ConversationNotation;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -838,6 +837,7 @@
ret.getImplements().add(iref);
//ret.getConformsTo().add(iref);
+ /* GPB: TO REMOVE
org.scribble.model.admin.DependencyManager dm=
(org.scribble.model.admin.DependencyManager)
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
@@ -847,6 +847,7 @@
dm.recordDependency(getModel().getModelReference(),
iref, DependencyType.Implements);
}
+ */
} else {
logger.warn("Conversation type does not " +
Modified: trunk/tools/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.jboss.savara.tools.wsdl/src/java/org/jboss/savara/tools/wsdl/actions/GenerateAction.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -45,9 +45,9 @@
import org.scribble.conversation.model.ConversationModel;
import org.scribble.eclipse.util.*;
import org.scribble.extensions.RegistryFactory;
+import org.scribble.model.Model;
import org.scribble.model.ModelReference;
import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelRepository;
/**
@@ -103,17 +103,13 @@
ModelRepository.class, null);
if (mrep != null) {
- java.util.List<ModelInfo> models=mrep.getModels(ref,
+ Model model=mrep.getModel(ref,
new DefaultModelListener());
- for (int i=0; conversationModel == null &&
- i < models.size(); i++) {
- if (models.get(i).getModel() instanceof ConversationModel) {
- conversationModel = (ConversationModel)
- models.get(i).getModel();
+ if (model instanceof ConversationModel) {
+ conversationModel = (ConversationModel)model;
- localModelRefs = conversationModel.getLocalModels(ref);
- }
+ localModelRefs = conversationModel.getLocalModels(ref);
}
}
}
Modified: trunk/tools/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.model/src/java/org/scribble/conversation/model/Compose.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -22,7 +22,6 @@
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelRepository;
/**
@@ -88,7 +87,8 @@
cur = cur.getParent();
}
-
+
+/* GPB: TO REMOVE
} else {
ModelRepository mrep=(ModelRepository)
RegistryFactory.getRegistry().getExtension(
@@ -106,6 +106,7 @@
}
}
}
+*/
}
}
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/CatchBlockParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -135,7 +134,7 @@
context.parse(TypeReference.class, l);
- resolveReference(context, l, typeRef, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, typeRef, DependencyType.Uses);
ret.setType(typeRef);
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/ConversationParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -22,7 +22,6 @@
import org.scribble.extensions.*;
import org.scribble.conversation.model.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -324,7 +323,7 @@
context.parse(ConformanceReference.class, l);
if (ref != null) {
- resolveReference(context, l, ref, DependencyType.ConformsTo);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.ConformsTo);
conversation.getConformsTo().add(ref);
}
@@ -343,7 +342,7 @@
context.parse(ImplementsReference.class, l);
if (ref != null) {
- resolveReference(context, l, ref, DependencyType.Implements);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Implements);
conversation.getImplements().add(ref);
}
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RaiseParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -134,7 +133,7 @@
TypeReference typeRef=(TypeReference)
context.parse(TypeReference.class, l);
- resolveReference(context, l, typeRef, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, typeRef, DependencyType.Uses);
ret.setType(typeRef);
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/RunParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -81,7 +80,7 @@
ConversationReference ref=(ConversationReference)
context.parse(ConversationReference.class, l);
- resolveReference(context, l, ref, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Uses);
ret = new Run();
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/SpawnParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -81,7 +80,7 @@
ConversationReference ref=(ConversationReference)
context.parse(ConversationReference.class, l);
- resolveReference(context, l, ref, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Uses);
ret = new Spawn();
Modified: trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.parser/src/java/org/scribble/conversation/parser/VariableListParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.parser.*;
@@ -79,7 +78,7 @@
TypeReference ref=(TypeReference)
context.parse(TypeReference.class, l);
- resolveReference(context, l, ref, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Uses);
ret = new VariableList();
Modified: trunk/tools/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.conversation.validation/src/java/org/scribble/conversation/validation/ConversationValidationRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -74,6 +74,7 @@
org.scribble.model.admin.ModelRepository.class, null);
// Validate that implemented protocols can be located
+ /* GPB: TO REMOVE
for (int i=0; i < conversation.getImplements().size(); i++) {
ImplementsReference ref=conversation.getImplements().get(i);
@@ -103,6 +104,7 @@
}
}
}
+ */
// Check if conversation is stateless
if (conversation.isStateless()) {
Deleted: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractDependencyManager.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,844 +0,0 @@
-/*
- * Copyright 2007-8 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 8 Nov 2007 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.scribble.extensions.RegistryFactory;
-import org.scribble.model.LocatedName;
-import org.scribble.model.ModelReference;
-import org.scribble.model.Namespace;
-
-/**
- * This class provides a default implementation of the dependency
- * manager.
- */
-public abstract class AbstractDependencyManager implements DependencyManager {
-
- public AbstractDependencyManager() {
- initialize();
- }
-
- protected void initialize() {
-
- // Need to subscribe for model change events
- ModelChangeListener l=new DefaultModelChangeListener() {
-
- /**
- * This method reports a new model has been added.
- *
- * @param ref The reference associated with the model
- */
- public void modelAdded(ModelReference ref) {
- logger.info("Model added: "+ref);
-
- java.util.List<ModelReference> refs=
- getDependents(ref, false);
-
- checkIndirectDependents(ref, refs);
-
- processAdded(refs, ref);
-
- // Check if any unresolved references match the added
- // resource
- java.util.List<ModelReference> tmplist=getUnresolved();
-
- for (int i=0; i < tmplist.size(); i++) {
- ModelReference unresolved=tmplist.get(i);
-
- if (unresolved.getAlias().equals(ref.getLocalpart()) &&
- unresolved.getNotation().equals(ref.getNotation())) {
-
- refs = getDependents(unresolved);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Process dependents for unresolved: "+unresolved);
- }
-
- processAdded(refs, ref);
- }
- }
- }
-
- protected void processAdded(java.util.List<ModelReference> refs,
- ModelReference ref) {
- logger.info("Process additions for: "+ref);
-
- if (refs != null) {
- java.util.List<ModelReference> tmplist=
- new java.util.Vector<ModelReference>(refs);
-
- for (int i=0; i < tmplist.size(); i++) {
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Notify dependency addition: "+tmplist.get(i));
- }
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- tmplist.get(i).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- logger.fine("Notify handler: "+handler);
-
- handler.dependencyAdded(tmplist.get(i), ref);
- }
- }
- }
- }
- }
-
- /**
- * This method reports an update to a model.
- *
- * @param ref The reference associated with the model
- */
- public void modelUpdated(ModelReference ref) {
- logger.info("Model updated: "+ref);
-
- java.util.List<ModelReference> notifyList=
- new java.util.Vector<ModelReference>();
-
- findDependents(ref, notifyList);
-
- checkIndirectDependents(ref, notifyList);
-
- if (notifyList != null && notifyList.size() > 0) {
-
- for (int i=0; i < notifyList.size(); i++) {
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- notifyList.get(i).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- handler.dependencyUpdated(notifyList.get(i), ref);
- }
- }
- }
- }
- }
-
- /**
- * This method reports an existing model has been removed.
- *
- * @param ref The reference associated with the model
- */
- public void modelRemoved(ModelReference ref) {
- logger.info("Model removed: "+ref);
-
- java.util.List<ModelReference> refs=
- getDependents(ref, false);
-
- checkIndirectDependents(ref, refs);
-
- if (refs != null) {
- java.util.List<ModelReference> tmplist=
- new java.util.Vector<ModelReference>(refs);
-
- for (int i=0; i < tmplist.size(); i++) {
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- tmplist.get(i).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- handler.dependencyRemoved(tmplist.get(i), ref);
- }
- }
- }
- }
- }
- };
-
- org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- if (mrep != null) {
- mrep.addModelChangeListener(l);
- }
- }
-
- /**
- * This method recursively finds dependents associated
- * with the supplied reference.
- *
- * @param ref The reference
- * @param dependents The list of dependents
- */
- protected void findDependents(ModelReference ref,
- java.util.List<ModelReference> dependents) {
- java.util.List<ModelReference> refs=
- getDependents(ref);
-
- for (int i=0; i < refs.size(); i++) {
- if (dependents.contains(refs.get(i)) == false) {
- dependents.add(refs.get(i));
-
- findDependents(refs.get(i), dependents);
- }
- }
- }
-
- /**
- * This method recursively finds dependents associated
- * with the supplied reference.
- *
- * @param ref The reference
- * @param type The dependency type
- * @param dependents The list of dependents
- */
- protected void findDependents(ModelReference ref, DependencyType type,
- java.util.List<ModelReference> dependents) {
- java.util.List<ModelReference> refs=
- getDependents(ref, type);
-
- for (int i=0; i < refs.size(); i++) {
- if (dependents.contains(refs.get(i)) == false) {
- dependents.add(refs.get(i));
-
- findDependents(refs.get(i), type, dependents);
- }
- }
- }
-
- /**
- * This method checks whether the supplied reference is a
- * global model, with non-persisted local models that
- * have dependents.
- *
- * @param ref The model reference
- * @param list The list of notifiable model references
- */
- protected void checkIndirectDependents(ModelReference ref,
- java.util.List<ModelReference> list) {
-
- if (ref.getLocatedRole() == null) {
-
- java.util.List<ModelReference> conforms=
- getDependencies(ref, DependencyType.ConformsTo);
-
- for (int i=0; i < conforms.size(); i++) {
- ModelReference conform=conforms.get(i);
-
- // Only check if conformant reference is a projection of this
- // global model, and does not exist (TODO)
- // GPB: 23/6/08 - ignore whether same namespace/localpart
- // for now, as if conforms to another model that does
- // not exist, then this model may effectively represent
- // the behaviour?? May want to check that this conform
- // ref (both local and global) does not exist before
- // checking its implements dependences??
- //if (conform.getNamespace().equals(ref.getNamespace()) &&
- // conform.getLocalpart().equals(ref.getLocalpart()) &&
- // conform.getNotation().equals(ref.getNotation())) {
-
- // Check for dependents on the implements reference
- // GPB: (23/6/08) was 'conformsTo' ref, but was changed to
- // use implements relation for consistency with protocol->conversation
- // relationship
- java.util.List<ModelReference> dependents=
- getDependents(conform, DependencyType.Implements);
-
- // Check that dependent is not the original reference
- // or already in the list
- for (int j=0; j < dependents.size(); j++) {
-
- if (dependents.get(j).equals(ref) == false &&
- list.contains(dependents.get(j)) == false) {
- list.add(dependents.get(j));
- }
- }
- //}
- }
- }
-
- /*
- if (ref.getNotation().equals("java")) {
- java.util.List<ModelReference> impls=
- getDependencies(ref, DependencyType.Implements);
-
- for (int i=0; i < impls.size(); i++) {
- java.util.List<ModelReference> uses=
- getDependents(impls.get(i), DependencyType.Uses);
-
- for (int j=0; j < uses.size(); j++) {
- if (list.contains(uses.get(j)) == false) {
- list.add(uses.get(j));
- }
- }
- }
- }
- */
- }
-
- /**
- * This method indicates that any dependencies recorded
- * for the supplied reference should be cleared.
- *
- * @param ref The reference
- */
- public void clearDependencies(ModelReference ref) {
- logger.info("Clear Dependencies: "+ref);
-
- // Check for any 'interfaces' that this reference implements.
- // These will be used, at the end of this method, to determine
- // if there are any 'uses' of the interface, where the interface
- // does not actually exist. Then we need to notify the 'uses'
- // definitions to revalidate themselves.
- java.util.List<ModelReference> dependencies=
- getDependencies(ref, DependencyType.Implements);
-
- // Clear the model name for ref
- m_modelNames.remove(ref);
-
- // Clear the dependency information
- java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
-
- while (iter.hasNext()) {
- DependencyInfo info=iter.next();
-
- info.clearDependencies(ref);
- }
-
- // Check if there are any interfaces that need to be processed
- // (i.e. uses of the interface revalidated if the interface
- // does not actually exist - so the implementation of the
- // interface is standing in for the interface).
- if (dependencies.size() > 0) {
-
- org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- for (int i=0; i < dependencies.size(); i++) {
- notifyInterfaceDependents(ref, dependencies.get(i), mrep);
- }
- }
- }
-
- /**
- * This method indicates that a dependency should be
- * established between the 'from' model reference to the
- * 'to' model reference. If the 'to' model reference
- * should be changed, then then registered
- * DependencyHandler implementations will be
- * invoked to handle the change.
- *
- * @param from The dependent model reference
- * @param to The model reference representing the dependency
- * @param type The type of dependency
- */
- public void recordDependency(ModelReference from, ModelReference to,
- DependencyType type) {
- java.util.List<ModelResource> refs=null;
- ModelResource fromResource=getResource(from);
- ModelResource toResource=getResource(to);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Record dependency from: "+from+" to: "+to);
- }
-
- // Obtain dependency info for this type
- DependencyInfo info=m_dependencyInfo.get(type);
-
- if (info == null) {
- info = new DependencyInfo(type);
- m_dependencyInfo.put(type, info);
- }
-
- // Record any unresolved references
- if (to.isResolved() == false) {
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Add to unresolved: "+to);
- }
-
- info.getUnresolved().add(to);
- }
-
- // Establish link to dependents
- refs = info.getDependents().get(toResource);
-
- if (refs == null) {
- refs = new java.util.Vector<ModelResource>();
- info.getDependents().put(toResource, refs);
- }
-
- if (refs.contains(fromResource) == false) {
- refs.add(fromResource);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Add dependent: "+from+" : resource="+fromResource+" size="+refs.size());
- }
- }
-
- // Establish reverse relationship
- refs = info.getDependencies().get(fromResource);
-
- if (refs == null) {
- refs = new java.util.Vector<ModelResource>();
- info.getDependencies().put(fromResource, refs);
- }
-
- // Add reference regardless of whether an equivalent
- // reference is already in the list, as each reference
- // may be in a different position in the source file
- refs.add(toResource);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Add dependence: "+to+" : resource="+toResource+" size="+refs.size());
- }
-
- logger.info("Recorded dependency between '"+from+"' and '"+to+"' of type "+type);
-
- // If 'implements', then check if any dependents need
- // to be notified
- if (type == DependencyType.Implements) {
-
- org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- notifyInterfaceDependents(from, to, mrep);
- }
- }
-
- /**
- * This method checks the uses of an interface, to determine if they need
- * to be re-validated when an implementation of that interface is changed.
- *
- * @param from The implementation reference
- * @param to The interface reference
- * @param mrep The model repository
- */
- protected void notifyInterfaceDependents(ModelReference from, ModelReference to,
- org.scribble.model.admin.ModelRepository mrep) {
-
- // Only need to notify if 'interface' does not exist, as
- // the implementation of the interface can be used to
- // stand in for the interface.
- if (mrep.exists(to, null) == false) {
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Notify interface dependents: impl="+from+" intf="+to);
- }
-
- // Check if any unresolved references match the added
- // resource
- DependencyInfo uses=m_dependencyInfo.get(DependencyType.Uses);
-
- if (uses != null) {
- java.util.List<ModelReference> tmplist=uses.getUnresolved();
-
- for (int i=0; i < tmplist.size(); i++) {
- ModelReference unresolved=tmplist.get(i);
-
- if (unresolved.getAlias().equals(to.getLocalpart()) &&
- unresolved.getNotation().equals(to.getNotation())) {
-
- java.util.List<ModelReference> mrs=getDependents(unresolved);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Notify dependents for unresolved: "+unresolved);
- }
-
- for (int k=0; k < mrs.size(); k++) {
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- mrs.get(k).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- handler.dependencyUpdated(mrs.get(k), from);
- }
- }
- }
- }
- }
- }
-
- // Check if dependent on the reference
- java.util.List<ModelReference> notifyList=
- getDependents(to, DependencyType.Uses);
-
- if (notifyList != null && notifyList.size() > 0) {
-
- for (int i=0; i < notifyList.size(); i++) {
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Notify dependent: "+notifyList.get(i));
- }
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- notifyList.get(i).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- handler.dependencyUpdated(notifyList.get(i), to);
- }
- }
- }
- }
-
- // Check if conforms to the reference
- notifyList = getDependents(to, DependencyType.ConformsTo);
-
- if (notifyList != null && notifyList.size() > 0) {
-
- for (int i=0; i < notifyList.size(); i++) {
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Notify dependent: "+notifyList.get(i));
- }
-
- java.util.List<Object> handlers=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.admin.DependencyHandler.class,
- notifyList.get(i).getNotation());
-
- if (handlers != null) {
- for (int j=0; j < handlers.size(); j++) {
- DependencyHandler handler=
- (DependencyHandler)handlers.get(j);
-
- handler.dependencyUpdated(notifyList.get(i), to);
- }
- }
- }
- }
- }
- }
-
- /**
- * This method records the model name against the source description's
- * model reference.
- *
- * @param ref The model reference
- * @param modelName The model name
- */
- public void recordModelName(ModelReference ref, LocatedName modelName) {
- m_modelNames.put(ref, modelName);
- }
-
- /**
- * This method records the namespace against the source description's
- * model reference.
- *
- * @param ref The model reference
- * @param namespace The namespace
- */
- public void recordNamespace(ModelReference ref, Namespace namespace) {
- m_namespaces.put(ref, namespace);
- }
-
- /**
- * This method returns the model name associated with the supplied
- * model reference.
- *
- * @param ref The model reference
- * @return The model name
- */
- public LocatedName getModelName(ModelReference ref) {
- return(m_modelNames.get(ref));
- }
-
- /**
- * This method returns the namespace associated with the supplied
- * model reference.
- *
- * @param ref The model reference
- * @return The namespace
- */
- public Namespace getNamespace(ModelReference ref) {
- return(m_namespaces.get(ref));
- }
-
- /**
- * This method returns the list of unresolved model references.
- *
- * @return The list of unresolved model references
- */
- public java.util.List<ModelReference> getUnresolved() {
- java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
-
- java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
-
- while (iter.hasNext()) {
- DependencyInfo info=iter.next();
-
- java.util.List<ModelReference> refs=info.getUnresolved();
-
- if (refs != null) {
- ret.addAll(refs);
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the implementation of the model resource
- * associated with the supplied model reference.
- *
- * @param ref The model reference
- * @return The resource
- */
- protected abstract ModelResource getResource(ModelReference ref);
-
- /**
- * This method returns the list of model references dependent upon
- * the supplied reference.
- *
- * @param ref The model reference
- * @return The list of model references dependent upon the supplied reference
- */
- public java.util.List<ModelReference> getDependents(ModelReference ref) {
- return(getDependents(ref, true));
- }
-
- /**
- * This method returns the list of model references dependent upon
- * the supplied reference.
- *
- * @param ref The model reference
- * @param useResource Whether to use the resource
- * @return The list of model references dependent upon the supplied reference
- */
- protected java.util.List<ModelReference> getDependents(ModelReference ref,
- boolean useResource) {
- java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
- ModelResource resource=getResource(ref);
- java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
-
- while (iter.hasNext()) {
- DependencyInfo info=iter.next();
-
- java.util.List<ModelResource> refs=info.getDependents().get(
- useResource?resource:ref);
-
- if (refs != null) {
- for (int i=0; i < refs.size(); i++) {
- ret.add(refs.get(i).getReference());
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of model references dependent upon
- * the supplied reference, of the supplied dependency type.
- *
- * @param ref The model reference
- * @param type The type of dependency
- * @return The list of model references dependent upon the supplied reference
- */
- public java.util.List<ModelReference> getDependents(ModelReference ref,
- DependencyType type) {
- java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
- ModelResource resource=getResource(ref);
-
- // Obtain dependency info for this type
- DependencyInfo info=m_dependencyInfo.get(type);
-
- if (info != null) {
- java.util.List<ModelResource> refs=info.getDependents().get(resource);
-
- if (refs != null) {
- for (int i=0; i < refs.size(); i++) {
- ret.add(refs.get(i).getReference());
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of model references that are dependencies for
- * the supplied reference.
- *
- * @param ref The model reference
- * @return The list of model references that are dependencies for
- * the supplied reference
- */
- public java.util.List<ModelReference> getDependencies(ModelReference ref) {
- java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
- ModelResource resource=getResource(ref);
- java.util.Iterator<DependencyInfo> iter=m_dependencyInfo.values().iterator();
-
- while (iter.hasNext()) {
- DependencyInfo info=iter.next();
-
- java.util.List<ModelResource> refs=info.getDependencies().get(resource);
-
- if (refs != null) {
- for (int i=0; i < refs.size(); i++) {
- ret.add(refs.get(i).getReference());
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of model references that are dependencies for
- * the supplied reference, of the supplied dependency type.
- *
- * @param ref The model reference
- * @param type The type of dependency
- * @return The list of model references that are dependencies for
- * the supplied reference
- */
- public java.util.List<ModelReference> getDependencies(ModelReference ref,
- DependencyType type) {
- java.util.List<ModelReference> ret=new java.util.Vector<ModelReference>();
- ModelResource resource=getResource(ref);
-
- // Obtain dependency info for this type
- DependencyInfo info=m_dependencyInfo.get(type);
-
- if (info != null) {
- java.util.List<ModelResource> refs=info.getDependencies().get(resource);
-
- if (refs != null) {
- for (int i=0; i < refs.size(); i++) {
- ret.add(refs.get(i).getReference());
- }
- }
- }
-
- return(ret);
- }
-
- private static Logger logger = Logger.getLogger("org.scribble.model");
-
- private java.util.Map<ModelReference,Namespace> m_namespaces=
- new java.util.Hashtable<ModelReference, Namespace>();
- private java.util.Map<ModelReference,LocatedName> m_modelNames=
- new java.util.Hashtable<ModelReference, LocatedName>();
- private java.util.Map<DependencyType,DependencyInfo> m_dependencyInfo=
- new java.util.Hashtable<DependencyType, DependencyInfo>();
-
- /**
- * This class provides a container for the dependency information
- * associated with a particular dependency type.
- */
- public class DependencyInfo {
-
- public DependencyInfo(DependencyType type) {
- m_type = type;
- }
-
- public java.util.Map<ModelResource,java.util.List<ModelResource>> getDependents() {
- return(m_dependents);
- }
-
- public java.util.Map<ModelResource,java.util.List<ModelResource>> getDependencies() {
- return(m_dependencies);
- }
-
- public java.util.List<ModelReference> getUnresolved() {
- return(m_unresolved);
- }
-
- public void clearDependencies(ModelReference ref) {
- logger.fine("Clearing Dependencies: "+ref+" for type "+m_type);
-
- ModelResource resource=getResource(ref);
-
- java.util.List<ModelResource> refs=m_dependencies.get(resource);
-
- if (refs != null) {
- for (int i=refs.size()-1; i >= 0; i--) {
-
- logger.fine("Clear dependency: "+refs.get(i));
-
- java.util.List<ModelResource> depends=
- m_dependents.get(refs.get(i));
-
- if (depends != null) {
- depends.remove(resource);
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Remove dependent: "+ref+" from list: "+
- depends+" (size="+depends.size()+")");
- }
-
- if (depends.size() == 0) {
- m_dependents.remove(refs.get(i));
- }
- }
-
- if (refs.get(i).getReference().isResolved() == false) {
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Removed from unresolved: "+ref);
- }
-
- m_unresolved.remove(refs.get(i).getReference());
- }
- }
-
- m_dependencies.remove(resource);
- }
- }
-
- private DependencyType m_type=null;
- private java.util.Map<ModelResource,java.util.List<ModelResource>> m_dependents=
- new java.util.Hashtable<ModelResource,java.util.List<ModelResource>>();
- private java.util.Map<ModelResource,java.util.List<ModelResource>> m_dependencies=
- new java.util.Hashtable<ModelResource,java.util.List<ModelResource>>();
- private java.util.List<ModelReference> m_unresolved=new java.util.Vector<ModelReference>();
-
- }
-}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/AbstractModelRepository.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -19,14 +19,11 @@
*/
package org.scribble.model.admin;
+import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelChangeListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
-import org.scribble.parser.Parser;
-import org.scribble.extensions.*;
import java.util.logging.*;
@@ -44,46 +41,17 @@
*/
public AbstractModelRepository() {
}
-
- /**
- * This method determines whether the supplied model reference
- * is associated with an existing Scribble definition. If the
- * optional source reference is specified, then the check will determine
- * whether the supplied model reference is also accessible from the
- * supplied source reference.
- *
- * @param ref The model reference
- * @param source The optional source that is checking the reference
- * @return Whether a definition exists for the model reference, and
- * is accessible from the optional source reference
- */
- public boolean exists(ModelReference ref, ModelReference source) {
- boolean ret=false;
-
- if (source == null || canAccess(source, ref, true)) {
-
- ret = (getInputStream(ref) != null);
- }
-
- return(ret);
- }
/**
- * This method returns the model(s) associated with the supplied
+ * This method returns the model associated with the supplied
* Scribble reference.
*
* @param ref The scribble reference
* @param l The model listener
- * @return The scribble model(s)
+ * @return The scribble model
*/
- public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l) {
- java.util.List<ModelInfo> ret=new java.util.Vector<ModelInfo>();
- java.util.List<java.io.InputStream> instreams=
- new java.util.Vector<java.io.InputStream>();
- java.util.List<ModelReference> parsedRefs=
- new java.util.Vector<ModelReference>();
- ModelReference globalRef=null;
- boolean derived=false;
+ public Model getModel(ModelReference ref, ModelListener l) {
+ Model ret=null;
synchronized(this) {
if (logger.isLoggable(Level.FINEST)) {
@@ -94,186 +62,24 @@
java.io.InputStream is=getInputStream(ref);
if (is != null) {
- instreams.add(is);
- parsedRefs.add(ref);
-
- } else if (ref.getLocatedRole() != null) {
- globalRef = getGlobalModelRef(ref);
-
- // Get input stream for global reference
- is = getInputStream(globalRef);
-
- if (is != null) {
- instreams.add(is);
- parsedRefs.add(globalRef);
-
- // Associate resource with local model reference
- associateGlobalResource(ref, globalRef);
- }
- }
-
- org.scribble.model.admin.DependencyManager dm=(org.scribble.model.admin.DependencyManager)
+ org.scribble.parser.Parser parser=(org.scribble.parser.Parser)
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
-
- // If no input streams found, then check 'conforms to' dependencies
- if (instreams.size() == 0 && dm != null) {
-
- java.util.List<ModelReference> refs=
- dm.getDependents(ref, DependencyType.ConformsTo);
-
- if (refs.size() == 0 && globalRef != null) {
- refs = dm.getDependents(globalRef, DependencyType.ConformsTo);
- }
-
- for (int i=0; i < refs.size(); i++) {
- is = getInputStream(refs.get(i));
-
- if (is != null) {
- instreams.add(is);
- parsedRefs.add(refs.get(i));
- }
- }
-
- derived = true;
- }
-
- for (int i=0; i < instreams.size(); i++) {
- if (dm != null) {
-
- // Clear the dependencies so that they can be
- // re-initialized during the parsing of the model
- dm.clearDependencies(parsedRefs.get(i));
- }
-
- // Obtain a top level model reference (with no sub-definition
- // path), to parse the complete model. If a sub-definition
- // is requested, this will be dealt with by the model repository
- ModelReference parsedRef=new ModelReference(parsedRefs.get(i));
- parsedRef.getSubDefinitionPath().clear();
-
- java.util.List<Object> parsers=
- org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
org.scribble.parser.Parser.class, ref.getNotation());
- for (int j=0; j < parsers.size(); j++) {
- Parser parser=(Parser)parsers.get(j);
-
- Model model=parser.parse(parsedRef,
- instreams.get(i), l);
-
- // TODO:
- // Currently sub-definition path is only used by the Projector, so
- // would not be applied if model did not require projection. Needs
- // to be moved out to the model repository, and applied to any
- // resulting model (whether or not projected).
-
- if (model != null) {
- ModelReference miRef=parsedRefs.get(i);
-
- // Check if model needs to be projected
- if (ref.getLocatedRole() != null &&
- model.isLocated() == false) {
-
- org.scribble.projector.Projector projector =
- (org.scribble.projector.Projector)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.projector.Projector.class, miRef.getNotation());
-
- // Obtain projection for this role
- model = projector.project(
- parsedRefs.get(i), model,
- ref.getSubDefinitionPath(),
- new Role(ref.getLocatedRole()), l);
-
- miRef = getLocalModelRef(parsedRefs.get(i),
- ref.getLocatedRole());
- }
-
- ret.add(new ModelInfo(miRef, model, derived));
+ if (parser != null) {
+ ret=parser.parse(ref, is, l);
+
+ if (ret != null) {
+ ret.initializeURIs();
}
}
}
-
- for (int i=0; i < ret.size(); i++) {
- if (ret.get(i).getModel() != null) {
- ret.get(i).getModel().initializeURIs();
- } else {
- logger.warning("Could not initialize model: "+ret.get(i).getSource());
- }
- }
}
return(ret);
}
/**
- * This method associates any global resource information associated with the
- * supplied global model reference, with the supplied local model reference.
- *
- * @param lref The local model reference
- * @param gref The global model reference
- */
- protected void associateGlobalResource(ModelReference lref, ModelReference gref) {
- }
-
- /**
- * This method takes the supplied global model reference,
- * and a role, and returns a local model reference for the
- * supplied details.
- *
- * @param globalRef The global model reference
- * @param role The role
- * @return The local model reference
- */
- protected ModelReference getLocalModelRef(ModelReference globalRef,
- String role) {
- ModelReference ret=
- new ModelReference(globalRef.getNamespace(),
- globalRef.getLocalpart(),
- role, globalRef.getNotation());
-
- locate(ret, globalRef);
-
- return(ret);
- }
-
- /**
- * This method takes the supplied local model reference and
- * returns a global model reference for the supplied details.
- *
- * @param localRef The local model reference
- * @return The global model reference
- */
- protected ModelReference getGlobalModelRef(ModelReference localRef) {
- ModelReference ret=
- new ModelReference(localRef.getNamespace(),
- localRef.getLocalpart(),
- null, localRef.getNotation());
-
- locate(ret, localRef);
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied notation code is
- * supported by the model repository.
- *
- * @param code The notation code
- * @return Whether the notation is supported
- */
- protected static boolean isNotationSupported(String code) {
- boolean ret=false;
-
- for (int i=0; ret == false && i < m_notations.size(); i++) {
- ret = code.equals(m_notations.get(i).getCode());
- }
-
- return(ret);
- }
-
- /**
* This method updates the model, associated with the
* supplied reference, with the contents of the specified
* model.
@@ -285,35 +91,32 @@
public void updateModel(ModelReference ref, Model model)
throws java.io.IOException {
- if (exists(ref, null)) {
-
- org.scribble.export.Exporter exporter=
- (org.scribble.export.Exporter)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.export.Exporter.class, null);
-
- org.scribble.export.stream.StreamFormatter formatter=
- new org.scribble.export.stream.StreamFormatter();
-
- java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
+ org.scribble.export.Exporter exporter=
+ (org.scribble.export.Exporter)
+ RegistryFactory.getRegistry().getExtension(
+ org.scribble.export.Exporter.class, null);
- formatter.setOutputStream(os);
-
- exporter.export(ref, model, formatter);
+ org.scribble.export.stream.StreamFormatter formatter=
+ new org.scribble.export.stream.StreamFormatter();
- byte[] b=os.toByteArray();
+ java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
+
+ formatter.setOutputStream(os);
- os.close();
+ exporter.export(ref, model, formatter);
+
+ byte[] b=os.toByteArray();
+
+ os.close();
+
+ java.io.ByteArrayInputStream is=
+ new java.io.ByteArrayInputStream(b);
+
+ updateModel(ref, is);
- java.io.ByteArrayInputStream is=
- new java.io.ByteArrayInputStream(b);
-
- updateModel(ref, is);
-
- is.close();
- }
+ is.close();
}
-
+
/**
* This method applies the updated model, defined in the supplied input
* stream, to the repository resource associated with the supplied reference.
@@ -336,79 +139,6 @@
*/
protected abstract java.io.InputStream getInputStream(ModelReference ref);
- /**
- * This method adds a model change listener.
- *
- * @param l The model change listener
- */
- public void addModelChangeListener(ModelChangeListener l) {
- synchronized(m_listeners) {
- m_listeners.add(l);
- }
- }
-
- /**
- * This method removes a model change listener.
- *
- * @param l The model change listener
- */
- public void removeModelChangeListener(ModelChangeListener l) {
- synchronized(m_listeners) {
- m_listeners.remove(l);
- }
- }
-
- /**
- * This method handles an added resource.
- *
- * @param ref The resource
- */
- protected void handleResourceAdded(ModelReference ref) {
-
- // Dispatch resource added notification
- synchronized(m_listeners) {
- for (int i=0; i < m_listeners.size(); i++) {
- ModelChangeListener l=m_listeners.get(i);
-
- l.modelAdded(ref);
- }
- }
- }
-
- /**
- * This method handles an updated resource.
- *
- * @param ref The resource
- */
- protected void handleResourceUpdated(ModelReference ref) {
-
- // Dispatch resource updated notification
- synchronized(m_listeners) {
- for (int i=0; i < m_listeners.size(); i++) {
- ModelChangeListener l=m_listeners.get(i);
-
- l.modelUpdated(ref);
- }
- }
- }
-
- /**
- * This method handles a removed resource.
- *
- * @param ref The resource
- */
- protected void handleResourceRemoved(ModelReference ref) {
-
- // Dispatch resource removed notification
- synchronized(m_listeners) {
- for (int i=0; i < m_listeners.size(); i++) {
- ModelChangeListener l=m_listeners.get(i);
-
- l.modelRemoved(ref);
- }
- }
- }
-
private static Logger logger = Logger.getLogger("org.scribble.model.admin");
private static java.util.List<org.scribble.model.Notation> m_notations=new java.util.Vector<org.scribble.model.Notation>();
Deleted: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyHandler.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,61 +0,0 @@
-/*
- * Copyright 2007 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 8 Nov 2007 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-import org.scribble.model.ModelReference;
-
-/**
- * This interface represents the dependency handler component
- * responsible for processing changes in model reference
- * dependencies.
- */
-public interface DependencyHandler {
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been added.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyAdded(ModelReference dependent,
- ModelReference dependency);
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been updated.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyUpdated(ModelReference dependent,
- ModelReference dependency);
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been removed.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyRemoved(ModelReference dependent,
- ModelReference dependency);
-
-}
Deleted: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyManager.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,134 +0,0 @@
-/*
- * Copyright 2007 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 8 Nov 2007 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-import org.scribble.model.LocatedName;
-import org.scribble.model.ModelReference;
-import org.scribble.model.Namespace;
-
-/**
- * This interface represents the dependency manager component
- * responsible for monitoring changes in Scribble descriptions
- * and triggering actions on the dependent models.
- */
-public interface DependencyManager {
-
- /**
- * This method indicates that any dependencies recorded
- * for the supplied reference should be cleared.
- *
- * @param ref The reference
- */
- public void clearDependencies(ModelReference ref);
-
- /**
- * This method indicates that a dependency should be
- * established between the 'from' model reference to the
- * 'to' model reference. If the 'to' model reference
- * should be changed, then then registered
- * DependencyHandler implementations will be
- * invoked to handle the change.
- *
- * @param from The dependent model reference
- * @param to The model reference representing the dependency
- * @param type The type of dependency
- */
- public void recordDependency(ModelReference from, ModelReference to,
- DependencyType type);
-
- /**
- * This method records the model name against the source description's
- * model reference.
- *
- * @param ref The model reference
- * @param modelName The model name
- */
- public void recordModelName(ModelReference ref, LocatedName modelName);
-
- /**
- * This method records the namespace against the source description's
- * model reference.
- *
- * @param ref The model reference
- * @param namespace The namespace
- */
- public void recordNamespace(ModelReference ref, Namespace namespace);
-
- /**
- * This method returns the model name associated with the supplied
- * model reference.
- *
- * @param ref The model reference
- * @return The model name
- */
- public LocatedName getModelName(ModelReference ref);
-
- /**
- * This method returns the namespace associated with the supplied
- * model reference.
- *
- * @param ref The model reference
- * @return The namespace
- */
- public Namespace getNamespace(ModelReference ref);
-
- /**
- * This method returns the list of model references dependent upon
- * the supplied reference.
- *
- * @param ref The model reference
- * @return The list of model references dependent upon the supplied reference
- */
- public java.util.List<ModelReference> getDependents(ModelReference ref);
-
- /**
- * This method returns the list of model references dependent upon
- * the supplied reference, of the supplied dependency type.
- *
- * @param ref The model reference
- * @param type The type of dependency
- * @return The list of model references dependent upon the supplied reference
- */
- public java.util.List<ModelReference> getDependents(ModelReference ref,
- DependencyType type);
-
- /**
- * This method returns the list of model references that are dependencies for
- * the supplied reference.
- *
- * @param ref The model reference
- * @return The list of model references that are dependencies for
- * the supplied reference
- */
- public java.util.List<ModelReference> getDependencies(ModelReference ref);
-
- /**
- * This method returns the list of model references that are dependencies for
- * the supplied reference, of the supplied dependency type.
- *
- * @param ref The model reference
- * @param type The type of dependency
- * @return The list of model references that are dependencies for
- * the supplied reference
- */
- public java.util.List<ModelReference> getDependencies(ModelReference ref,
- DependencyType type);
-
-}
Deleted: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/DependencyType.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,30 +0,0 @@
-/*
- * Copyright 2007 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 22 Nov 2007 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-/**
- * This enumeration represents the different types of
- * dependency that may be recorded between two models.
- */
-public enum DependencyType {
- Uses, // Usage dependency
- ConformsTo, // Strict conformance dependency
- Implements // Implements as part of wider definition
-}
Deleted: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelInfo.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,88 +0,0 @@
-/*
- * Copyright 2005-8 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 17 Oct 2008 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-import org.scribble.model.Model;
-import org.scribble.model.ModelReference;
-
-/**
- * This class represents a container for information related to
- * a model.
- */
-public class ModelInfo {
-
- /**
- * This constructor initializes the model information.
- *
- * @param srcRef The model reference to the source associated
- * with the model
- * @param model The model
- * @param derived Whether the model info was derived
- */
- public ModelInfo(ModelReference srcRef, Model model, boolean derived) {
- m_sourceReference = srcRef;
- m_model = model;
- m_derived = derived;
- }
-
- /**
- * This method returns the model reference associated with
- * the source resource from which the model was derived.
- *
- * @return The source model reference
- */
- public ModelReference getSource() {
- return(m_sourceReference);
- }
-
- /**
- * This method returns the model.
- *
- * @return The model
- */
- public Model getModel() {
- return(m_model);
- }
-
- /**
- * This method indicates whether the model information has been
- * derived. The information is derived if it was obtained indirectly
- * from the requested model reference.
- *
- * @return Whether the model info is derived
- */
- public boolean isDerived() {
- return(m_derived);
- }
-
- /**
- * This method sets whether the model information has
- * been derived.
- *
- * @param derived Whether the model info is derived
- */
- public void setDerived(boolean derived) {
- m_derived = derived;
- }
-
- private ModelReference m_sourceReference=null;
- private Model m_model=null;
- private boolean m_derived=false;
-}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/admin/ModelRepository.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -32,47 +32,7 @@
public interface ModelRepository {
/**
- * This method locates a new model reference in the
- * environment associated with a base model reference.
- *
- * @param newRef The new model reference
- * @param base The base model reference
- */
- public void locate(ModelReference newRef, ModelReference base);
-
- /**
- * This method determines whether the supplied model reference
- * is associated with an existing Scribble definition. If the
- * optional source reference is specified, then the check will determine
- * whether the supplied model reference is also accessible from the
- * supplied source reference.
- *
- * @param ref The model reference
- * @param source The optional source that is checking the reference
- * @return Whether a definition exists for the model reference, and
- * is accessible from the optional source reference
- */
- public boolean exists(ModelReference ref, ModelReference source);
-
- /**
- * This method determines whether the source reference has
- * access to the target reference. The check for 'self access'
- * determines if access to a target reference should be permitted
- * if the target reference has the same underlying resource
- * as the source.
- *
- * @param srcRef The source reference
- * @param targetRef The target reference
- * @param allowSelfAccess Determines if self access permitted
- * @return Whether the model associated with the source
- * reference has access to the model associated
- * with the target reference
- */
- public boolean canAccess(ModelReference srcRef,
- ModelReference targetRef, boolean allowSelfAccess);
-
- /**
- * This method returns the model(s) associated with the supplied
+ * This method returns the model associated with the supplied
* Scribble reference. A single reference may return multiple
* models, either because the resource content can be interpreted
* differently depending on the model type of interest, or
@@ -81,10 +41,10 @@
*
* @param ref The model reference
* @param l The model listener
- * @return The scribble models
+ * @return The scribble model
*/
- public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l);
-
+ public Model getModel(ModelReference ref, ModelListener l);
+
/**
* This method updates the model, associated with the
* supplied reference, with the contents of the specified
@@ -96,19 +56,5 @@
*/
public void updateModel(ModelReference ref, Model model)
throws java.io.IOException;
-
- /**
- * This method adds a model change listener.
- *
- * @param l The model change listener
- */
- public void addModelChangeListener(ModelChangeListener l);
- /**
- * This method removes a model change listener.
- *
- * @param l The model change listener
- */
- public void removeModelChangeListener(ModelChangeListener l);
-
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/DeleteFromModel.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -26,7 +26,6 @@
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
import org.scribble.model.admin.DefaultResolution;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.change.*;
@@ -82,9 +81,8 @@
// Retrieve source and reference models and identify
// the relevant model objects
- java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+ Model model=mrep.getModel(ref, new DefaultModelListener());
ModelObject refObj=null;
- Model model=null;
// NOTE: Should only really be one model that matches
// the reference - i.e. the source model reference, and
@@ -93,8 +91,7 @@
// is abstract/derived, then it may provide multiple models
// that might incorrectly return a model object for the URI.
- for (int i=0; refObj == null && i < models.size(); i++) {
- model = models.get(i).getModel();
+ if (model != null) {
refObj = model.findModelObject(obj.getModelObjectURI());
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/InsertFromReferencedDescription.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -26,7 +26,6 @@
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
import org.scribble.model.admin.DefaultResolution;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.change.*;
@@ -166,9 +165,8 @@
// Retrieve source and reference models and identify
// the relevant model objects
- java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+ Model model=mrep.getModel(ref, new DefaultModelListener());
ModelObject refObj=null;
- Model model=null;
// NOTE: Should only really be one model that matches
// the reference - i.e. the source model reference, and
@@ -177,17 +175,14 @@
// is abstract/derived, then it may provide multiple models
// that might incorrectly return a model object for the URI.
- for (int i=0; refObj == null && i < models.size(); i++) {
- model = models.get(i).getModel();
+ if (model != null) {
refObj = model.findModelObject(obj.getModelObjectURI());
}
- models = mrep.getModels(modelRef, new DefaultModelListener());
+ Model refModel = mrep.getModel(modelRef, new DefaultModelListener());
ModelObject fromObj=null;
- Model refModel=null;
- for (int i=0; fromObj == null && i < models.size(); i++) {
- refModel = models.get(i).getModel();
+ if (refModel != null) {
fromObj = refModel.findModelObject(sref.getModelObjectURI());
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/model/resolutions/UpdateFromReferencedDescription.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -26,7 +26,6 @@
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
import org.scribble.model.admin.DefaultResolution;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.change.*;
@@ -174,21 +173,17 @@
// is abstract/derived, then it may provide multiple models
// that might incorrectly return a model object for the URI.
- java.util.List<ModelInfo> models=mrep.getModels(ref, new DefaultModelListener());
+ Model model=mrep.getModel(ref, new DefaultModelListener());
ModelObject toObj=null;
- Model model=null;
- for (int i=0; toObj == null && i < models.size(); i++) {
- model = models.get(i).getModel();
+ if (model != null) {
toObj = model.findModelObject(obj.getModelObjectURI());
}
- models = mrep.getModels(modelRef, new DefaultModelListener());
+ Model refModel = mrep.getModel(modelRef, new DefaultModelListener());
ModelObject fromObj=null;
- Model refModel=null;
- for (int i=0; fromObj == null && i < models.size(); i++) {
- refModel = models.get(i).getModel();
+ if (refModel != null) {
fromObj = refModel.findModelObject(sref.getModelObjectURI());
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/osgi/Activator.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -57,9 +57,6 @@
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
org.scribble.model.admin.ModelRepository.class,
null);
-
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
}
/*
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/AbstractParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -23,7 +23,6 @@
import java.util.logging.Logger;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
@@ -180,6 +179,7 @@
* @param l The model listener
* @param ref The model reference to be resolved
*/
+ /* GPB: TO REMOVE
public static void resolveReference(ParserContext context, ModelListener l,
ModelReference ref, DependencyType dependencyType) {
java.util.List<String> namespacesToMonitor=new java.util.Vector<String>();
@@ -205,7 +205,7 @@
(org.scribble.model.admin.ModelRepository)
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
org.scribble.model.admin.ModelRepository.class,
- null/*ref.getNotation()*/);
+ null);
org.scribble.model.admin.DependencyManager dm=
(org.scribble.model.admin.DependencyManager)
@@ -371,6 +371,7 @@
dm.recordDependency(context.getSource(), ref, dependencyType);
}
}
+ */
private static Logger logger = Logger.getLogger("org.scribble.parser");
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/DefaultParser.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -49,11 +49,6 @@
ModelListener l) {
Model ret=null;
- org.scribble.model.admin.DependencyManager dm=
- (org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
-
Tokenizer tokenizer=(Tokenizer)
org.scribble.extensions.RegistryFactory.getRegistry().
getExtension(Tokenizer.class, ref.getNotation());
@@ -63,19 +58,6 @@
ret = (Model)context.parse(Model.class, l);
- // Record model name and namespace
- if (ret != null && dm != null) {
- java.util.List<Definition> defns=ret.getDefinitions();
-
- for (int i=0; i < defns.size(); i++) {
- dm.recordModelName(context.getSource(), defns.get(i).getLocatedName());
- }
-
- if (ret.getNamespace() != null) {
- dm.recordNamespace(context.getSource(), ret.getNamespace());
- }
- }
-
return(ret);
}
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/MessageSignatureParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
@@ -68,7 +67,7 @@
TypeReference ref=(TypeReference)context.parse(TypeReference.class, l);
if (ref != null) {
- resolveReference(context, l, ref, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Uses);
ret = new MessageSignature();
@@ -90,7 +89,7 @@
//if (t.getType() == TokenType.Identifier) {
if (ref != null) {
- resolveReference(context, l, ref, DependencyType.Uses);
+ // GPB: TO REMOVE resolveReference(context, l, ref, DependencyType.Uses);
ret.getTypes().add(ref);
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/parser/RoleListParserRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
@@ -111,6 +110,8 @@
// If outer definition and not a local model,
// then add dependency on a local model for
// this role
+
+/* GPB: TO REMOVE
if (context.getLocatedRole() == null &&
context.isOuterScope()) {
// Establish dependency on the reference
@@ -136,6 +137,7 @@
DependencyType.ConformsTo);
}
}
+*/
}
t = context.lookahead(0);
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/projector/ModelReferenceProjectorRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -76,6 +76,7 @@
}
// Located the reference based on the source
+ /* GPB: TO REMOVE
ModelRepository mrep=(ModelRepository)
RegistryFactory.getRegistry().getExtension(
ModelRepository.class, null);
@@ -83,6 +84,7 @@
if (mrep != null) {
mrep.locate(ret, source);
}
+ */
return(ret);
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidationContext.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -22,7 +22,6 @@
import org.scribble.comparator.Comparator;
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyManager;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
@@ -58,7 +57,6 @@
protected DefaultValidationContext(DefaultValidationContext copy) {
m_modelRepository = copy.getModelRepository();
- m_dependencyManager = copy.getDependencyManager();
m_comparator = copy.getComparator();
m_modelReference = copy.m_modelReference;
@@ -93,30 +91,6 @@
}
/**
- * This method gets the dependency manager.
- *
- * @return The dependency manager
- */
- public DependencyManager getDependencyManager() {
- if (m_dependencyManager == null) {
- m_dependencyManager = (org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
- }
-
- return(m_dependencyManager);
- }
-
- /**
- * This method sets the dependency manager.
- *
- * @param dm The dependency manager
- */
- public void setDependencyManager(DependencyManager dm) {
- m_dependencyManager = dm;
- }
-
- /**
* This method gets the comparator.
*
* @return The comparator
@@ -314,7 +288,6 @@
private static Logger logger = Logger.getLogger("org.scribble.validation");
private ModelRepository m_modelRepository=null;
- private DependencyManager m_dependencyManager=null;
private Comparator m_comparator=null;
private ModelReference m_modelReference=null;
private java.util.List<ValidationRule> m_rules=new java.util.Vector<ValidationRule>();
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/DefaultValidator.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -25,7 +25,6 @@
import org.scribble.extensions.RegistryFactory;
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyManager;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
@@ -61,30 +60,6 @@
}
/**
- * This method gets the dependency manager.
- *
- * @return The dependency manager
- */
- public DependencyManager getDependencyManager() {
- if (m_dependencyManager == null) {
- m_dependencyManager = (org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
- }
-
- return(m_dependencyManager);
- }
-
- /**
- * This method sets the dependency manager.
- *
- * @param dm The dependency manager
- */
- public void setDependencyManager(DependencyManager dm) {
- m_dependencyManager = dm;
- }
-
- /**
* This method gets the comparator.
*
* @return The comparator
@@ -154,7 +129,6 @@
DefaultValidationContext context=new DefaultValidationContext(ref, rules);
context.setModelRepository(getModelRepository());
- context.setDependencyManager(getDependencyManager());
context.setComparator(getComparator());
context.validate(model, l);
@@ -174,7 +148,6 @@
private static Logger logger = Logger.getLogger("org.scribble.validation");
private ModelRepository m_modelRepository=null;
- private DependencyManager m_dependencyManager=null;
private Comparator m_comparator=null;
private static java.util.List<ModelReference> m_inValidation=new java.util.Vector<ModelReference>();
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelReferenceValidationRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
@@ -60,12 +59,13 @@
ModelListener l) {
ModelReference ref=(ModelReference)obj;
+/* GPB: TO REMOVE
if (ref.isInner() == false) {
org.scribble.model.admin.ModelRepository mrep=
(org.scribble.model.admin.ModelRepository)
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
org.scribble.model.admin.ModelRepository.class,
- null/*ref.getNotation()*/);
+ null);
boolean f_exists=mrep.exists(ref, context.getSource());
@@ -113,5 +113,6 @@
new String[]{name,ref.getNotation()})));
}
}
+*/
}
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ModelValidationRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -24,8 +24,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.DependencyType;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelListener;
/**
@@ -65,6 +63,7 @@
Model model=(Model)obj;
ModelReference ref=context.getSource();
+/* GPB: TO REMOVE
java.util.List<ModelReference> refs=context.getDependencyManager().getDependencies(ref,
DependencyType.ConformsTo);
@@ -127,6 +126,7 @@
}
}
}
+ */
}
private static Logger logger = Logger.getLogger("org.scribble.validation");
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/TypeReferenceValidationRule.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.extensions.*;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyType;
import org.scribble.model.admin.ModelIssue;
import org.scribble.model.admin.ModelListener;
@@ -60,12 +59,13 @@
ModelListener l) {
ModelReference ref=(ModelReference)obj;
+/* GPB: TO REMOVE
if (ref.isInner() == false) {
org.scribble.model.admin.ModelRepository mrep=
(org.scribble.model.admin.ModelRepository)
org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
org.scribble.model.admin.ModelRepository.class,
- null/*ref.getNotation()*/);
+ null);
boolean f_exists=mrep.exists(ref, context.getSource());
@@ -113,5 +113,6 @@
new String[]{name,ref.getNotation()})));
}
}
+ */
}
}
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/ValidationContext.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -22,7 +22,6 @@
import org.scribble.comparator.Comparator;
import org.scribble.model.ModelObject;
import org.scribble.model.ModelReference;
-import org.scribble.model.admin.DependencyManager;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
@@ -41,13 +40,6 @@
public ModelRepository getModelRepository();
/**
- * This method gets the dependency manager.
- *
- * @return The dependency manager
- */
- public DependencyManager getDependencyManager();
-
- /**
* This method gets the comparator.
*
* @return The comparator
Modified: trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/java/org/scribble/validation/Validator.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -21,7 +21,6 @@
import org.scribble.comparator.Comparator;
import org.scribble.model.*;
-import org.scribble.model.admin.DependencyManager;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
@@ -45,20 +44,6 @@
public void setModelRepository(ModelRepository mrep);
/**
- * This method gets the dependency manager.
- *
- * @return The dependency manager
- */
- public DependencyManager getDependencyManager();
-
- /**
- * This method sets the dependency manager.
- *
- * @param dm The dependency manager
- */
- public void setDependencyManager(DependencyManager dm);
-
- /**
* This method gets the comparator.
*
* @return The comparator
Deleted: trunk/tools/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/test/org/scribble/model/admin/AbstractDependencyManagerTest.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,263 +0,0 @@
-/*
- * Copyright 2007 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 9 Nov 2007 : Initial version created by gary
- */
-package org.scribble.model.admin;
-
-import org.scribble.model.ModelReference;
-import org.scribble.model.admin.DependencyType;
-
-import junit.framework.TestCase;
-
-public class AbstractDependencyManagerTest extends TestCase {
-
- public void testDependents1() {
-
- org.scribble.extensions.TestSingleExtensionRegistry reg=
- new org.scribble.extensions.TestSingleExtensionRegistry(null);
- org.scribble.extensions.RegistryFactory.setRegistry(reg);
-
- AbstractDependencyManager mgr=new AbstractDependencyManager() {
- @Override
- protected ModelResource getResource(ModelReference ref) {
- return(new TestModelResource(ref));
- }
- };
-
- ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
- ModelReference toRef1=new ModelReference("ns2","lp2",null,"spm");
-
- mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
-
- java.util.List<ModelReference> dependents=mgr.getDependents(toRef1);
-
- if (dependents == null) {
- fail("Should not be empty list");
- }
-
- if (dependents.size() != 1) {
- fail("Should only be 1 entry: "+dependents.size());
- }
-
- if (dependents.get(0) != fromRef1) {
- fail("Expecting single entry to be: "+fromRef1+
- ", but was: "+dependents.get(0));
- }
-
- dependents = mgr.getDependents(toRef1, DependencyType.Uses);
-
- if (dependents == null) {
- fail("Should not be empty list for Uses dependency type");
- }
-
- if (dependents.size() != 1) {
- fail("Should only be 1 entry for Uses: "+dependents.size());
- }
-
- if (dependents.get(0) != fromRef1) {
- fail("Expecting single entry (for Uses) to be: "+fromRef1+
- ", but was: "+dependents.get(0));
- }
-
- dependents = mgr.getDependents(toRef1, DependencyType.ConformsTo);
-
- if (dependents == null) {
- fail("Should not be empty list for ConformsTo dependency type");
- }
-
- if (dependents.size() != 0) {
- fail("Should be 0 entries for ConformsTo: "+dependents.size());
- }
- }
-
- public void testDependents2() {
-
- org.scribble.extensions.TestSingleExtensionRegistry reg=
- new org.scribble.extensions.TestSingleExtensionRegistry(null);
- org.scribble.extensions.RegistryFactory.setRegistry(reg);
-
- AbstractDependencyManager mgr=new AbstractDependencyManager() {
- @Override
- protected ModelResource getResource(ModelReference ref) {
- return(new TestModelResource(ref));
- }
- };
-
- ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
- ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
- ModelReference toRef1=new ModelReference("ns2","lp2",null,"spm");
-
- mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
- mgr.recordDependency(fromRef2, toRef1, DependencyType.ConformsTo);
-
- java.util.List<ModelReference> dependents=
- mgr.getDependents(toRef1);
-
- if (dependents == null) {
- fail("Should not be empty list");
- }
-
- if (dependents.size() != 2) {
- fail("Should only be 2 entry: "+dependents.size());
- }
-
- if (dependents.contains(fromRef1) == false) {
- fail("Expecting list to contain "+fromRef1);
- }
-
- if (dependents.contains(fromRef2) == false) {
- fail("Expecting list to contain "+fromRef2);
- }
-
- dependents = mgr.getDependents(toRef1, DependencyType.Uses);
-
- if (dependents == null) {
- fail("Should not be empty list for Uses dependency type");
- }
-
- if (dependents.size() != 1) {
- fail("Should only be 1 entry for Uses: "+dependents.size());
- }
-
- if (dependents.get(0) != fromRef1) {
- fail("Expecting single entry (for Uses) to be: "+fromRef1+
- ", but was: "+dependents.get(0));
- }
-
- dependents = mgr.getDependents(toRef1, DependencyType.ConformsTo);
-
- if (dependents == null) {
- fail("Should not be empty list for ConformsTo dependency type");
- }
-
- if (dependents.size() != 1) {
- fail("Should only be 1 entry for ConformsTo: "+dependents.size());
- }
-
- if (dependents.get(0) != fromRef2) {
- fail("Expecting single entry (for ConformsTo) to be: "+fromRef2+
- ", but was: "+dependents.get(0));
- }
-
- }
-
- public void testDependents3() {
-
- org.scribble.extensions.TestSingleExtensionRegistry reg=
- new org.scribble.extensions.TestSingleExtensionRegistry(null);
- org.scribble.extensions.RegistryFactory.setRegistry(reg);
-
- AbstractDependencyManager mgr=new AbstractDependencyManager() {
- @Override
- protected ModelResource getResource(ModelReference ref) {
- return(new TestModelResource(ref));
- }
- };
-
- ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
- ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
- ModelReference toRef1=new ModelReference("ns2","lp1",null,"spm");
- ModelReference toRef2=new ModelReference("ns2","lp2",null,"spm");
-
- mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
- mgr.recordDependency(fromRef1, toRef2, DependencyType.Uses);
- mgr.recordDependency(fromRef2, toRef1, DependencyType.Uses);
- mgr.recordDependency(fromRef2, toRef2, DependencyType.Uses);
-
- java.util.List<ModelReference> dependents1=mgr.getDependents(toRef1, DependencyType.Uses);
-
- if (dependents1 == null) {
- fail("Should not be empty list");
- }
-
- if (dependents1.size() != 2) {
- fail("Should only be 2 entry: "+dependents1.size());
- }
-
- if (dependents1.get(0) != fromRef1) {
- fail("Expecting first entry to be: "+fromRef1+
- ", but was: "+dependents1.get(0));
- }
-
- if (dependents1.get(1) != fromRef2) {
- fail("Expecting second entry to be: "+fromRef2+
- ", but was: "+dependents1.get(1));
- }
-
- java.util.List<ModelReference> dependents2=mgr.getDependents(toRef2, DependencyType.Uses);
-
- if (dependents2 == null) {
- fail("Should not be empty list");
- }
-
- if (dependents2.size() != 2) {
- fail("Should only be 2 entry: "+dependents2.size());
- }
-
- if (dependents2.get(0) != fromRef1) {
- fail("Expecting first entry to be: "+fromRef1+
- ", but was: "+dependents2.get(0));
- }
-
- if (dependents2.get(1) != fromRef2) {
- fail("Expecting second entry to be: "+fromRef2+
- ", but was: "+dependents2.get(1));
- }
- }
-
- public void testClearDependencies1() {
-
- org.scribble.extensions.TestSingleExtensionRegistry reg=
- new org.scribble.extensions.TestSingleExtensionRegistry(null);
- org.scribble.extensions.RegistryFactory.setRegistry(reg);
-
- AbstractDependencyManager mgr=new AbstractDependencyManager() {
- @Override
- protected ModelResource getResource(ModelReference ref) {
- return(new TestModelResource(ref));
- }
- };
-
- ModelReference fromRef1=new ModelReference("ns1","lp1",null,"spm");
- ModelReference fromRef2=new ModelReference("ns1","lp2",null,"spm");
- ModelReference toRef1=new ModelReference("ns2","lp1",null,"spm");
- ModelReference toRef2=new ModelReference("ns2","lp2",null,"spm");
-
- mgr.recordDependency(fromRef1, toRef1, DependencyType.Uses);
- mgr.recordDependency(fromRef1, toRef2, DependencyType.Uses);
- mgr.recordDependency(fromRef2, toRef1, DependencyType.Uses);
- mgr.recordDependency(fromRef2, toRef2, DependencyType.Uses);
-
- mgr.clearDependencies(fromRef1);
-
- java.util.List<ModelReference> dependents2=mgr.getDependents(toRef2, DependencyType.Uses);
-
- if (dependents2 == null) {
- fail("Should not be empty list");
- }
-
- if (dependents2.size() != 1) {
- fail("Should only be 1 entry: "+dependents2.size());
- }
-
- if (dependents2.get(0) != fromRef2) {
- fail("Expecting first entry to be: "+fromRef2+
- ", but was: "+dependents2.get(0));
- }
- }
-}
Modified: trunk/tools/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java
===================================================================
--- trunk/tools/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.core/src/test/org/scribble/parser/TestModelRepository.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -22,7 +22,6 @@
import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
import org.scribble.model.admin.ModelChangeListener;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelListener;
import org.scribble.model.admin.ModelRepository;
@@ -39,9 +38,9 @@
return false;
}
- public java.util.List<ModelInfo> getModels(ModelReference ref, ModelListener l) {
+ public Model getModel(ModelReference ref, ModelListener l) {
// TODO Auto-generated method stub
- return(new java.util.Vector<ModelInfo>());
+ return(null);
}
public void locate(ModelReference newRef, ModelReference base) {
Modified: trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.eclipse/META-INF/MANIFEST.MF 2010-08-26 14:25:07 UTC (rev 366)
@@ -14,11 +14,7 @@
org.eclipse.ui.editors,
org.eclipse.jdt.core
Bundle-ActivationPolicy: lazy
-Scribble-Extensions: org.scribble.eclipse.model.admin.OSGIModelRepository,
- org.scribble.eclipse.model.outliner.DefaultModelOutliner,
- org.scribble.eclipse.model.admin.OSGIDependencyManager,
- org.scribble.eclipse.model.admin.ReValidationDependencyHandler
+Scribble-Extensions: org.scribble.eclipse.model.admin.OSGIModelRepository
Export-Package: org.scribble.eclipse.model.admin,
- org.scribble.eclipse.model.outliner,
org.scribble.eclipse.util
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/tools/plugins/org.scribble.eclipse/plugin.xml
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/plugin.xml 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.eclipse/plugin.xml 2010-08-26 14:25:07 UTC (rev 366)
@@ -29,6 +29,7 @@
</markerResolutionGenerator>
</extension>
+<!--
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="org.scribble.contribution.spr"
@@ -81,5 +82,6 @@
</action>
</objectContribution>
</extension>
+-->
</plugin>
Deleted: trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIDependencyManager.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,51 +0,0 @@
-/*
- * Copyright 2007-8 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 14 Feb 2008 : Initial version created by gary
- */
-package org.scribble.eclipse.model.admin;
-
-import org.scribble.extensions.RegistryInfo;
-import org.scribble.model.*;
-import org.scribble.model.admin.AbstractDependencyManager;
-import org.scribble.model.admin.DependencyManager;
-import org.scribble.model.admin.ModelResource;
-
-/**
- * This class provides an OSGI implementation of the dependency
- * manager.
- */
-(a)RegistryInfo(extension=DependencyManager.class)
-public class OSGIDependencyManager extends AbstractDependencyManager {
-
- /**
- * The default constructor.
- */
- public OSGIDependencyManager() {
- }
-
- /**
- * This method returns the implementation of the model resource
- * associated with the supplied model reference.
- *
- * @param ref The model reference
- * @return The resource
- */
- protected ModelResource getResource(ModelReference ref) {
- return(new OSGIModelResource(ref));
- }
-}
Modified: trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/OSGIModelRepository.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -19,20 +19,15 @@
*/
package org.scribble.eclipse.model.admin;
+import org.scribble.extensions.RegistryInfo;
import org.scribble.model.*;
import org.scribble.model.admin.AbstractModelRepository;
-import org.scribble.model.admin.DefaultModelListener;
-import org.scribble.model.admin.DependencyType;
-import org.scribble.model.admin.ModelInfo;
import org.scribble.model.admin.ModelRepository;
-import org.scribble.extensions.*;
-import org.scribble.extensions.RegistryFactory;
import java.util.logging.*;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.IJavaProject;
@@ -52,464 +47,9 @@
* This is the default constructor for the abstract OSGi Model Repository.
*/
public OSGIModelRepository() {
-
- IResourceChangeListener rcl=
- new IResourceChangeListener() {
-
- public void resourceChanged(IResourceChangeEvent evt) {
-
- try {
- evt.getDelta().accept(new IResourceDeltaVisitor() {
-
- public boolean visit(IResourceDelta delta) {
- boolean ret=true;
- IResource res = delta.getResource();
-
- // Only process non-derived resources,
- // as if the resource is copied to the
- // 'classes' folder we only want to
- // process the original
- if (res.isDerived() == false) {
-
- // Determine if the change is relevant
- if (isUpdate(res, delta)) {
- ModelReference ref=createReference(res);
-
- // Validate the resource
- handleResourceUpdated(ref);
-
- } else if (isAddition(res, delta)) {
- ModelReference ref=createReference(res);
-
- handleResourceAdded(ref);
-
- } else if (isDeletion(res, delta)) {
- ModelReference ref=createReference(res);
-
- handleResourceRemoved(ref);
- }
- }
-
- return(ret);
- }
- });
- } catch(Exception e) {
- logger.log(Level.SEVERE,
- "Failed to process resource change event", e);
- }
- }
- };
-
- // Register the resource change listener
- ResourcesPlugin.getWorkspace().addResourceChangeListener(rcl,
- IResourceChangeEvent.POST_CHANGE);
-
- m_modelChangeListener = new org.scribble.model.admin.DefaultModelChangeListener() {
-
- public void modelAdded(ModelReference ref) {
- validateModel(ref);
- }
-
- public void modelUpdated(ModelReference ref) {
- validateModel(ref);
- }
- };
-
- addModelChangeListener(m_modelChangeListener);
-
- new Thread(new Runnable() {
- public void run() {
- initializeDependencies();
- }
- }).start();
}
- protected static void initializeDependencies() {
-
- // Register the notations to be supported
- java.util.List<Object> notations=
- RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.Notation.class, null);
-
- java.util.List<String> notationCodes=new java.util.Vector<String>();
-
- for (int i=0; i < notations.size(); i++) {
- Notation notation=(org.scribble.model.Notation)notations.get(i);
-
- notationCodes.add(notation.getCode());
- }
-
- IProject[] projects=
- org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProjects();
-
- for (int i=0; i < projects.length; i++) {
- if (projects[i].isOpen()) {
- initializeProject(projects[i], notationCodes);
- }
- }
-
- m_initialized = true;
- }
-
- protected static void initializeProject(IProject proj, java.util.List<String> notations) {
- final java.util.List<String> codes=notations;
-
- try {
- // Get the model, which will indirectly parse it
- final org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- proj.accept(new IResourceVisitor() {
-
- public boolean visit(IResource resource) throws CoreException {
-
- // Check if resource is of interest
- // Only non-derived resources, to avoid processing
- // files placed in the 'classes' folder - only
- // want to process original source
- if (resource instanceof IFile &&
- resource.isDerived() == false &&
- (codes.contains(((IFile)resource).getFileExtension()) ||
- codes.contains(((IFile)resource).getName()))) {
-
- logger.info("Initialize: "+resource);
-
- // Derive model reference
- ModelReference ref=
- org.scribble.eclipse.model.admin.OSGIModelRepository.createReference(resource);
-
- // Get the model, which will indirectly parse it
- mrep.getModels(ref, new DefaultModelListener());
- }
-
- return(true);
- }
- });
-
- } catch(Exception e) {
- logger.log(java.util.logging.Level.SEVERE,
- "Failed to initialize dependencies", e);
- }
- }
-
- public static boolean isInitialized() {
- return(m_initialized);
- }
-
/**
- * This method locates a new model reference in the
- * environment associated with a base model reference.
- *
- * @param newRef The new model reference
- * @param base The base model reference
- */
- public void locate(ModelReference newRef, ModelReference base) {
-
- // Transfer the project property
- if (base.hasProperty(PROJECT_PROPERTY)) {
- newRef.setProperty(PROJECT_PROPERTY,
- getProject(base));
- }
-
- // Derive the resource property - just retrieving
- // the file will result in the resource properties
- // being established
- getFile(newRef);
- }
-
- /**
- * This method takes a model reference, and returns the underlying
- * model reference associated with the source that provides
- * the model associated with the supplied reference. If more
- * than one source model reference is available, only the
- * first one will be returned.
- *
- * @param ref The model reference
- * @return The source model reference
- */
- public ModelReference getSource(ModelReference ref) {
- ModelReference ret=ref;
-
- if (getFile(ref) != null) {
- ret = ref;
- } else if (ref.getLocatedRole() != null) {
- ModelReference globalRef=new ModelReference(ref.getNamespace(),
- ref.getLocalpart(), null, ref.getNotation());
-
- locate(globalRef, ref);
-
- if (getFile(globalRef) != null) {
- ret = globalRef;
- } else {
-
- // Get 'conforms to' dependent for reference
- org.scribble.model.admin.DependencyManager dm=
- (org.scribble.model.admin.DependencyManager)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.DependencyManager.class, null);
-
- if (dm != null) {
- java.util.List<ModelReference> refs=
- dm.getDependents(ref, DependencyType.ConformsTo);
-
- // Only use reference if a single dependent exists?
-
- // TODO: Determine if derived model references
- // should link back to their original source implicitly?
-
- if (refs.size() == 1) {
- globalRef = refs.get(0);
-
- if (getFile(globalRef) != null) {
- ret = globalRef;
- }
- }
- }
- }
- } else {
- // TODO: GPB Check 'conforms to' on the provided ref
- }
-
- return(ret);
- }
-
- /**
- * This method explicitly requests the validation of
- * the model associated with the supplied model reference.
- *
- * @param ref The model reference
- */
- public static void validateModel(ModelReference ref) {
- try {
- // Create the validation job
- ValidationJob job=new ValidationJob(ref);
- job.setPriority(Job.DECORATE);
- job.schedule();
-
- } catch(Exception e) {
- logger.log(Level.SEVERE,
- "Failed to schedule validation of scribble description", e);
- }
- }
-
- /**
- * This method determines whether the source reference has
- * access to the target reference. The check for 'self access'
- * determines if access to a target reference should be permitted
- * if the target reference has the same underlying resource
- * as the source.
- *
- * @param srcRef The source reference
- * @param targetRef The target reference
- * @param allowSelfAccess Determines if self access permitted
- * @return Whether the model associated with the source
- * reference has access to the model associated
- * with the target reference
- */
- public boolean canAccess(ModelReference srcRef,
- ModelReference targetRef, boolean allowSelfAccess) {
- boolean ret=false;
-
- ModelReference ssrcRef=getSource(srcRef);
- ModelReference stargetRef=getSource(targetRef);
-
- if (logger.isLoggable(Level.FINEST)) {
- logger.finest("srcRef="+srcRef+" targetRef="+targetRef+" allowSelfAccess="+allowSelfAccess);
- logger.finest("ssrcRef="+ssrcRef+" stargetRef="+stargetRef);
- }
-
- if (ssrcRef != null && stargetRef != null &&
- (allowSelfAccess ||
- ssrcRef.equals(stargetRef) == false)) {
- IProject srcProj=getProject(ssrcRef);
- IProject targetProj=getProject(stargetRef);
-
- if (logger.isLoggable(Level.FINEST)) {
- logger.info("srcProj="+srcProj+" targetProj="+targetProj);
- }
-
- // Should not matter which resource is source or target.
- // If the projects are associated and accessible in one
- // direction, then they should be accessible in both directions.
- if (srcProj != null && targetProj != null &&
- (isProjectAssociated(srcProj, targetProj) ||
- isProjectAssociated(targetProj, srcProj))) {
- ret = true;
- }
- }
-
- if (logger.isLoggable(Level.FINEST)) {
- logger.finest("Can access? "+ret);
- }
-
- return(ret);
- }
-
- protected boolean isProjectAssociated(IProject src, IProject target) {
- boolean ret=false;
-
- if (src == target) {
- ret = true;
- } else {
- try {
- for (int i=0; ret == false &&
- i < src.getReferencedProjects().length; i++) {
- ret = isProjectAssociated(src.getReferencedProjects()[i], target);
- }
- } catch(Exception e) {
- e.printStackTrace();
- }
-
- if (ret == false) {
- try {
- if (src.hasNature(JavaCore.NATURE_ID)) {
-
- // Check if Java projects are related
- IJavaProject jproject=JavaCore.create(src);
-
- String projects[]=jproject.getRequiredProjectNames();
-
- for (int i=0; ret == false && i < projects.length; i++) {
- IProject dependent=
- org.eclipse.core.resources.ResourcesPlugin.getWorkspace().
- getRoot().getProject(projects[i]);
-
- ret = isProjectAssociated(dependent, target);
- }
- }
- } catch(Exception e) {
- logger.severe("Failed to check dependent projects: "+e);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method associates any global resource information associated with the
- * supplied global model reference, with the supplied local model reference.
- *
- * @param lref The local model reference
- * @param gref The global model reference
- */
- @Override
- protected void associateGlobalResource(ModelReference lref, ModelReference gref) {
- lref.setProperty(GLOBAL_RESOURCE_PROPERTY, getFile(gref));
- }
-
- /**
- * This method takes the supplied global model reference,
- * and a role, and returns a local model reference for the
- * supplied details.
- *
- * @param globalRef The global model reference
- * @param role The role
- * @return The local model reference
- */
- @Override
- protected ModelReference getLocalModelRef(ModelReference globalRef,
- String role) {
- ModelReference ret=super.getLocalModelRef(globalRef, role);
-
- // Transfer resource property
- if (globalRef.hasProperty(RESOURCE_PROPERTY)) {
- ret.setProperty(GLOBAL_RESOURCE_PROPERTY,
- globalRef.getProperty(RESOURCE_PROPERTY));
- }
-
- return(ret);
- }
-
- /**
- * This method takes the supplied local model reference and
- * returns a global model reference for the supplied details.
- *
- * @param localRef The local model reference
- * @return The global model reference
- */
- @Override
- protected ModelReference getGlobalModelRef(ModelReference localRef) {
- ModelReference ret=super.getGlobalModelRef(localRef);
-
- // Transfer resource property
- if (localRef.hasProperty(GLOBAL_RESOURCE_PROPERTY)) {
- ret.setProperty(RESOURCE_PROPERTY,
- localRef.getProperty(GLOBAL_RESOURCE_PROPERTY));
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied resource
- * is relevant and has changed.
- *
- * @param res The resource
- * @param deltaFlags The flags
- * @return Whether the change is relevant
- */
- protected boolean isUpdate(IResource res, IResourceDelta delta) {
- boolean ret=false;
-
- // Are the changes associated with the contents?
- if (res != null && res.getFileExtension() != null &&
- (isNotationSupported(res.getFileExtension()) ||
- isNotationSupported(res.getName())) &&
- (delta.getFlags() & IResourceDelta.CONTENT) != 0) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied resource
- * is relevant and has been added.
- *
- * @param res The resource
- * @param deltaFlags The flags
- * @return Whether the change is relevant
- */
- protected boolean isAddition(IResource res, IResourceDelta delta) {
- boolean ret=false;
-
- // Are the changes associated with the contents?
- if (res != null && res.getFileExtension() != null &&
- (isNotationSupported(res.getFileExtension()) ||
- isNotationSupported(res.getName())) &&
- delta.getKind() == IResourceDelta.ADDED) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied resource
- * is relevant and has been removed.
- *
- * @param res The resource
- * @param deltaFlags The flags
- * @return Whether the change is relevant
- */
- protected boolean isDeletion(IResource res, IResourceDelta delta) {
- boolean ret=false;
-
- // Are the changes associated with the contents?
- if (res != null && res.getFileExtension() != null &&
- (isNotationSupported(res.getFileExtension()) ||
- isNotationSupported(res.getName())) &&
- delta.getKind() == IResourceDelta.REMOVED) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
* This method applies the updated model, defined in the supplied input
* stream, to the repository resource associated with the supplied reference.
*
@@ -825,6 +365,7 @@
local = subdefnpath[0];
}
+ /*
// Check if notation is supported
if (isNotationSupported(notation) == false) {
notation = local+"."+notation;
@@ -833,6 +374,7 @@
// TODO: Report error?
}
}
+ */
}
}
@@ -853,256 +395,9 @@
return(ret);
}
- /**
- * This method handles an added resource.
- *
- * @param ref The resource
- */
- @Override
- protected void handleResourceAdded(ModelReference ref) {
- super.handleResourceAdded(ref);
-
- synchronized(m_updateModelNames) {
-
- if (m_updateModelNames.contains(ref)) {
-
- // Need to update the name in this model
- final ModelReference currentRef=ref;
-
- Job job=new Job("Update Renamed Description") {
-
- public IStatus run(IProgressMonitor mon) {
- try {
- java.util.List<ModelInfo> models=getModels(currentRef, new DefaultModelListener());
-
- for (int i=0; i < models.size(); i++) {
- //Model model=models.get(i).getModel();
-
- logger.warning("TO BE IMPLEMENTED");
-
- /*
- if (model != null && model.getModelName() != null) {
- IFile file=getFile(models.get(i).getSource());
- java.io.InputStream is=file.getContents();
-
- byte[] b=new byte[is.available()];
- is.read(b);
-
- StringBuffer buf=new StringBuffer();
- buf.append(new String(b));
-
- String str=currentRef.getLocalpart();
-
- if (currentRef.getLocatedRole() != null) {
- str += ModelReference.LOCATED_REFERENCE_SEPARATOR+
- currentRef.getLocatedRole();
- }
-
- buf.replace(model.getModelName().getSource().getStartPosition(),
- model.getModelName().getSource().getEndPosition(),
- str);
-
- file.setContents(new java.io.ByteArrayInputStream(
- buf.toString().getBytes()), true, true, null);
- }
- */
- }
-
- } catch(Exception e) {
- // Ignore for now
- e.printStackTrace();
- }
-
- logger.info("About to remove update model name");
- synchronized(m_updateModelNames) {
- m_updateModelNames.remove(currentRef);
- }
- logger.info("Removed update model name");
-
- return(Status.OK_STATUS);
- }
- };
-
- job.schedule();
- }
- }
-
- if (m_changedModelName != null) {
-
- // Need to update the name in this model
- final ModelReference currentRef=ref;
-
- Job job=new Job("Update Changed Description") {
-
- public IStatus run(IProgressMonitor mon) {
- try {
- java.util.List<ModelInfo> models=getModels(currentRef, new DefaultModelListener());
-
- for (int i=0; i < models.size(); i++) {
- //Model model=models.get(i).getModel();
-
- logger.warning("TO BE IMPLEMENTED");
-
- /*
- if (model != null && model.getModelName() != null &&
- model.getModelName().getName() != null &&
- model.getModelName().getName().equals(m_changedModelName.getLocalpart())) {
- m_changedModelName = null;
-
- IFile file=getFile(models.get(i).getSource());
- java.io.InputStream is=file.getContents();
-
- byte[] b=new byte[is.available()];
- is.read(b);
-
- StringBuffer buf=new StringBuffer();
- buf.append(new String(b));
-
- String str=currentRef.getLocalpart();
-
- if (currentRef.getLocatedRole() != null) {
- str += ModelReference.LOCATED_REFERENCE_SEPARATOR+
- currentRef.getLocatedRole();
- }
-
- buf.replace(model.getModelName().getSource().getStartPosition(),
- model.getModelName().getSource().getEndPosition(),
- str);
-
- // Update namespace
- int startpos=0;
- int endpos=0;
-
- if (model.getNamespace() != null) {
- startpos = model.getNamespace().getSource().getStartPosition();
- endpos = model.getNamespace().getSource().getEndPosition();
- }
-
- str = "namespace "+currentRef.getNamespace();
-
- buf.replace(startpos, endpos, str);
-
- file.setContents(new java.io.ByteArrayInputStream(
- buf.toString().getBytes()), true, true, null);
- }
- */
- }
- } catch(Exception e) {
- // Ignore for now
- e.printStackTrace();
- }
-
- return(Status.OK_STATUS);
- }
- };
-
- job.schedule();
- }
- }
-
- /**
- * This method indicates when the resource associated
- * with the supplied reference is added, the model name
- * should be updated to be in sync with the file name.
- *
- * @param ref The model reference
- */
- public static void changeModelName(ModelReference ref) {
- m_changedModelName = ref;
- }
-
private static Logger logger = Logger.getLogger("org.scribble.osgi.model");
private static final String PROJECT_PROPERTY = "project";
private static final String RESOURCE_PROPERTY = "resource";
private static final String GLOBAL_RESOURCE_PROPERTY = "globalResource";
-
- private static java.util.List<org.scribble.model.Notation> m_notations=new java.util.Vector<org.scribble.model.Notation>();
- private static java.util.List<ModelReference> m_updateModelNames=new java.util.Vector<ModelReference>();
- private static ModelReference m_changedModelName=null;
- private static boolean m_initialized=false;
-
- private org.scribble.model.admin.ModelChangeListener m_modelChangeListener=null;
-
- static {
- // Register the notations to be supported
- java.util.List<Object> notations=
- org.scribble.extensions.RegistryFactory.getRegistry().getExtensions(
- org.scribble.model.Notation.class, null);
-
- for (int i=0; i < notations.size(); i++) {
- m_notations.add((org.scribble.model.Notation)notations.get(i));
- }
- }
-
- /**
- * This class implements the Scribble validation task.
- */
- static class ValidationJob extends Job {
-
- /**
- * This is the constructor for the Scribble validation job.
- *
- * @param ref The model reference
- */
- public ValidationJob(ModelReference ref) {
- super("Scribble Validation");
-
- m_reference = ref;
-
- if (OSGIModelRepository.getFile(m_reference) == null) {
- logger.severe("Cannot validate model reference without associated resource: "+
- m_reference);
- }
- }
-
- /**
- * This method runs the validation task.
- *
- * @param mon The progress monitor
- * @return The status of the job
- */
- public IStatus run(IProgressMonitor mon) {
-
- OSGIModelListener modelListener=
- new OSGIModelListener(m_reference);
-
- org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- java.util.List<org.scribble.model.admin.ModelInfo> models=
- mrep.getModels(m_reference, modelListener);
-
- boolean f_validated=false;
-
- for (int i=0; i < models.size(); i++) {
- // Invoke validation
- org.scribble.validation.Validator validator=
- (org.scribble.validation.Validator)
- org.scribble.extensions.RegistryFactory.getRegistry().getExtension(
- org.scribble.validation.Validator.class, null);
-
- // Must use the source reference, as comparison between
- // models will only be done if the source reference can
- // access the resources associated with the other models
- // being compared with. If the source reference is not
- // supplied, then access to these other models will be
- // restricted, and therefore no comparisons performed.
- if (validator.validate(models.get(i).getModel(),
- models.get(i).getSource(), modelListener)) {
- f_validated = true;
- }
- }
-
- if (f_validated) {
- modelListener.finished();
- }
-
- return(Status.OK_STATUS);
- }
-
- private ModelReference m_reference=null;
- }
}
Deleted: trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java
===================================================================
--- trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/org.scribble.eclipse/src/java/org/scribble/eclipse/model/admin/ReValidationDependencyHandler.java 2010-08-26 14:25:07 UTC (rev 366)
@@ -1,119 +0,0 @@
-/*
- * Copyright 2007 Pi4 Technologies Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * Change History:
- * 8 Nov 2007 : Initial version created by gary
- */
-package org.scribble.eclipse.model.admin;
-
-import java.util.logging.Logger;
-
-import org.scribble.extensions.RegistryFactory;
-import org.scribble.extensions.RegistryInfo;
-import org.scribble.model.*;
-import org.scribble.model.admin.DependencyHandler;
-
-/**
- * This class provides an implementation of the dependency handler
- * interface for re-validating models that may be affected by
- * added, updated or removed models.
- */
-(a)RegistryInfo(extension=DependencyHandler.class)
-public class ReValidationDependencyHandler implements DependencyHandler {
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been added.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyAdded(ModelReference dependent,
- ModelReference dependency) {
- reValidate(dependent);
- }
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been updated.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyUpdated(ModelReference dependent,
- ModelReference dependency) {
- reValidate(dependent);
- }
-
- /**
- * This method indicates that a model that the 'dependent'
- * model references has been removed.
- *
- * @param dependent The dependent model
- * @param dependency The dependency
- */
- public void dependencyRemoved(ModelReference dependent,
- ModelReference dependency) {
- reValidate(dependent);
- }
-
- /**
- * This method revalidates the model associated with the
- * supplied reference.
- *
- * @param ref The model reference
- */
- protected void reValidate(ModelReference ref) {
-
- if (OSGIModelRepository.isInitialized()) {
- logger.info("ReValidate "+ref);
-
- OSGIModelListener modelListener=new OSGIModelListener(ref);
-
- org.scribble.model.admin.ModelRepository mrep=
- (org.scribble.model.admin.ModelRepository)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.model.admin.ModelRepository.class, null);
-
- java.util.List<org.scribble.model.admin.ModelInfo> models=
- mrep.getModels(ref, modelListener);
-
- org.scribble.validation.Validator validator=
- (org.scribble.validation.Validator)
- RegistryFactory.getRegistry().getExtension(
- org.scribble.validation.Validator.class, null);
-
- boolean f_validated=false;
-
- for (int i=0; i < models.size(); i++) {
-
- // Invoke validation - need to supply source
- // model reference as explained in the
- // OSGIModelRepository ValidationJob
- if (validator.validate(models.get(i).getModel(),
- models.get(i).getSource(), modelListener)) {
- f_validated = true;
- }
- }
-
- if (f_validated) {
- modelListener.finished();
- }
- }
- }
-
- private static Logger logger = Logger.getLogger("org.scribble.eclipse.model.admin");
-}
Modified: trunk/tools/plugins/pom.xml
===================================================================
--- trunk/tools/plugins/pom.xml 2010-08-26 13:57:06 UTC (rev 365)
+++ trunk/tools/plugins/pom.xml 2010-08-26 14:25:07 UTC (rev 366)
@@ -26,7 +26,6 @@
<module>org.jboss.savara.tools.monitor</module>
<module>org.scribble.conformance</module>
<module>org.scribble.conversation.comparator</module>
- <module>org.scribble.conversation.eclipse</module>
<module>org.scribble.conversation.export.text</module>
<module>org.scribble.conversation.model</module>
<module>org.scribble.conversation.parser</module>
13 years, 8 months
savara SVN: r365 - branches/deprecated.
by do-not-reply@jboss.org
Author: objectiser
Date: 2010-08-26 09:57:06 -0400 (Thu, 26 Aug 2010)
New Revision: 365
Added:
branches/deprecated/dependency_management_trunk/
Log:
Version of trunk prior to removing dependency management and associated automated validation including conformance checking. Moving toward explicit dependencies defined in TAP model.
Copied: branches/deprecated/dependency_management_trunk (from rev 364, trunk)
13 years, 8 months