Skip to content

Commit 667d362

Browse files
author
Gary Brown
committed
Further refactoring to make existing plugins protocol specific.
1 parent 331cb0e commit 667d362

File tree

92 files changed

+175
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+175
-172
lines changed

distribution/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</dependency>
4343
<dependency>
4444
<groupId>org.scribble.modules</groupId>
45-
<artifactId>org.scribble.core</artifactId>
45+
<artifactId>org.scribble.common</artifactId>
4646
<version>${scribble.version}</version>
4747
</dependency>
4848
<dependency>

docs/developerguide/src/main/module/architecture.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
There is a generic logging API within the Scribble
7777
framework that can be used for reporting errors,
7878
warnings, information or debuging details.
79-
This API is <emphasis>org.scribble.core.logging.ScribbleLogger</emphasis>.
79+
This API is <emphasis>org.scribble.common.logging.ScribbleLogger</emphasis>.
8080
</para>
8181

8282
<para>
@@ -108,9 +108,9 @@
108108
</para>
109109

110110
<programlisting>
111-
logger.error(org.scribble.core.util.MessageUtil.format(
111+
logger.error(org.scribble.common.util.MessageUtil.format(
112112
java.util.PropertyResourceBundle.getBundle(
113-
"org.scribble.core.validation.rules.Messages"),
113+
"org.scribble.common.validation.rules.Messages"),
114114
"_EXISTING_DECLARATION",
115115
new String[]{elem.getName()}),
116116
obj.getProperties());
@@ -172,20 +172,20 @@ _EXISTING_DECLARATION=Declaration already exists for name '{0}'
172172
</section>
173173

174174
<section>
175-
<title>Validation Manager and Validators</title>
175+
<title>Protocol Validation Manager and Validators</title>
176176

177177
<para>
178178
The validation manager, when used in a OSGi runtime
179179
environment, will listen for the activation of any
180180
implementations of the
181-
<filename>org.scribble.core.validation.Validator</filename>
181+
<filename>org.scribble.protocol.validation.Validator</filename>
182182
interface.
183183
</para>
184184

185185
<para>
186186
This means that the validation of any model can be
187187
performed using the
188-
<emphasis>org.scribble.core.validation.ValidationManager</emphasis>,
188+
<emphasis>org.scribble.protocol.validation.ValidationManager</emphasis>,
189189
rather than having to obtain instances of
190190
multiple implementations of the <filename>Validator</filename>
191191
interface.

docs/developerguide/src/main/module/validator.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
avoids dependency on specific bundles, and instead
116116
just identifies the packages required). For this
117117
example validator, we just need to add the packages
118-
from the <emphasis>org.scribble.core</emphasis> bundle
118+
from the <emphasis>org.scribble.common</emphasis> bundle
119119
which is used by all Scribble plugins. However if
120120
additional packages were required, then they could be
121121
added as imported packages.
@@ -135,12 +135,12 @@
135135
model, but possibly only be interested in certain parts
136136
of it. Therefore usually the validation modules will
137137
define an implementation of the
138-
<filename>org.scribble.core.model.Visitor</filename> interface.
138+
<filename>org.scribble.protocol.model.Visitor</filename> interface.
139139
</para>
140140

141141
<para>
142142
The actual main class within the validator module would
143-
implement the <filename>org.scribble.core.validation.Validator</filename>
143+
implement the <filename>org.scribble.protocol.validation.Validator</filename>
144144
interface.
145145
</para>
146146
</section>

integration/eclipse/features/org.scribble.protocol.feature/feature.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</license>
1919

2020
<plugin
21-
id="org.scribble.core"
21+
id="org.scribble.common"
2222
download-size="0"
2323
install-size="0"
2424
version="0.0.0"

integration/eclipse/plugins/org.scribble.designer/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
1313
org.eclipse.ui.workbench.texteditor,
1414
org.eclipse.ltk.core.refactoring,
1515
org.eclipse.ui.ide,
16-
org.scribble.core,
16+
org.scribble.common,
1717
org.scribble.protocol,
1818
org.scribble.protocol.parser
1919
Bundle-ActivationPolicy: lazy

integration/eclipse/plugins/org.scribble.designer/src/java/org/scribble/designer/logger/EclipseScribbleLogger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import org.eclipse.core.resources.IFile;
2222
import org.eclipse.core.resources.IMarker;
23-
import org.scribble.core.logger.ScribbleLogger;
23+
import org.scribble.common.logger.ScribbleLogger;
2424

2525
public class EclipseScribbleLogger implements ScribbleLogger {
2626

modules/org.scribble.command/META-INF/MANIFEST.MF

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Bundle-Version: 1.0.0
55
Bundle-Activator: org.scribble.command.osgi.Activator
66
Export-Package: org.scribble.command
77
Import-Package: org.osgi.framework,
8-
org.scribble.conformance,
9-
org.scribble.core.logger,
10-
org.scribble.protocol.validation,
8+
org.scribble.common.logger,
9+
org.scribble.protocol.conformance,
1110
org.scribble.protocol.model,
12-
org.scribble.protocol.parser
11+
org.scribble.protocol.parser,
12+
org.scribble.protocol.validation
1313
Bundle-SymbolicName: org.scribble.command

modules/org.scribble.command/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</dependency>
2222
<dependency>
2323
<groupId>org.scribble.modules</groupId>
24-
<artifactId>org.scribble.core</artifactId>
24+
<artifactId>org.scribble.common</artifactId>
2525
<version>${scribble.version}</version>
2626
</dependency>
2727
<dependency>
@@ -31,7 +31,7 @@
3131
</dependency>
3232
<dependency>
3333
<groupId>org.scribble.modules</groupId>
34-
<artifactId>org.scribble.conformance</artifactId>
34+
<artifactId>org.scribble.protocol.conformance</artifactId>
3535
<version>${scribble.version}</version>
3636
</dependency>
3737
<dependency>

modules/org.scribble.command/src/main/java/org/scribble/command/conforms/ConformsCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
package org.scribble.command.conforms;
1818

19-
import org.scribble.conformance.Conformer;
20-
import org.scribble.core.logger.ScribbleLogger;
19+
import org.scribble.common.logger.ScribbleLogger;
20+
import org.scribble.protocol.conformance.Conformer;
2121
import org.scribble.protocol.model.Protocol;
2222
import org.scribble.protocol.parser.ProtocolParser;
2323

modules/org.scribble.command/src/main/java/org/scribble/command/osgi/Activator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import org.scribble.command.parse.ParseCommand;
2929
import org.scribble.command.validate.ValidateCommand;
3030
import org.scribble.command.*;
31-
import org.scribble.conformance.Conformer;
32-
import org.scribble.core.logger.ScribbleLogger;
31+
import org.scribble.common.logger.ScribbleLogger;
32+
import org.scribble.protocol.conformance.Conformer;
3333
import org.scribble.protocol.parser.ProtocolParser;
3434
import org.scribble.protocol.validation.ValidationManager;
3535

modules/org.scribble.command/src/main/java/org/scribble/command/parse/ParseCommand.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.scribble.command.parse;
1818

19-
import org.scribble.core.logger.ScribbleLogger;
19+
import org.scribble.common.logger.ScribbleLogger;
2020
import org.scribble.protocol.parser.ProtocolParser;
2121

2222
public class ParseCommand implements org.scribble.command.Command {

modules/org.scribble.command/src/main/java/org/scribble/command/validate/ValidateCommand.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.scribble.command.validate;
1818

19-
import org.scribble.core.logger.*;
19+
import org.scribble.common.logger.*;
2020
import org.scribble.protocol.model.Protocol;
2121
import org.scribble.protocol.parser.ProtocolParser;
2222
import org.scribble.protocol.validation.ValidationManager;

modules/org.scribble.core/.classpath modules/org.scribble.common/.classpath

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
55
<classpathentry kind="src" path="src/main/java"/>
66
<classpathentry kind="src" path="src/test/java"/>
7-
<classpathentry kind="src" path="src/main/resources"/>
87
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.framework/2.0.1/org.apache.felix.framework-2.0.1.jar"/>
98
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
109
<classpathentry kind="output" path="bin"/>

modules/org.scribble.core/.project modules/org.scribble.common/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>org.scribble.core</name>
3+
<name>org.scribble.common</name>
44
<comment></comment>
55
<projects>
66
</projects>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Scribble Common
4+
Bundle-SymbolicName: org.scribble.common
5+
Bundle-Version: 1.0.0.qualifier
6+
Bundle-Activator: org.scribble.common.osgi.Activator
7+
Bundle-Vendor: www.scribble.org
8+
Import-Package: org.osgi.framework,
9+
org.osgi.util.tracker
10+
Export-Package: org.scribble.common.logger,
11+
org.scribble.common.util

modules/org.scribble.core/pom.xml modules/org.scribble.common/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.scribble.modules</groupId>
5-
<artifactId>org.scribble.core</artifactId>
5+
<artifactId>org.scribble.common</artifactId>
66
<packaging>jar</packaging>
77
<version>1.0-SNAPSHOT</version>
8-
<name>Scribble::Modules::Core</name>
8+
<name>Scribble::Modules::Common</name>
99

1010
<parent>
1111
<groupId>org.scribble</groupId>

modules/org.scribble.core/src/main/java/org/scribble/core/logger/CachedScribbleLogger.java modules/org.scribble.common/src/main/java/org/scribble/common/logger/CachedScribbleLogger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.logger;
17+
package org.scribble.common.logger;
1818

1919
import java.io.Serializable;
2020
import java.util.Map;

modules/org.scribble.core/src/main/java/org/scribble/core/logger/ConsoleScribbleLogger.java modules/org.scribble.common/src/main/java/org/scribble/common/logger/ConsoleScribbleLogger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.logger;
17+
package org.scribble.common.logger;
1818

1919
import java.io.Serializable;
2020

modules/org.scribble.core/src/main/java/org/scribble/core/logger/IssueType.java modules/org.scribble.common/src/main/java/org/scribble/common/logger/IssueType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.logger;
17+
package org.scribble.common.logger;
1818

1919
public enum IssueType {
2020
Debug,

modules/org.scribble.core/src/main/java/org/scribble/core/logger/ScribbleLogger.java modules/org.scribble.common/src/main/java/org/scribble/common/logger/ScribbleLogger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.logger;
17+
package org.scribble.common.logger;
1818

1919
import java.io.Serializable;
2020

modules/org.scribble.core/src/main/java/org/scribble/core/osgi/Activator.java modules/org.scribble.common/src/main/java/org/scribble/common/osgi/Activator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.osgi;
17+
package org.scribble.common.osgi;
1818

1919
import org.osgi.framework.BundleActivator;
2020
import org.osgi.framework.BundleContext;

modules/org.scribble.core/src/main/java/org/scribble/core/util/MessageUtil.java modules/org.scribble.common/src/main/java/org/scribble/common/util/MessageUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.util;
17+
package org.scribble.common.util;
1818

1919
/**
2020
* This class provides utility functions related to

modules/org.scribble.core/src/test/java/org/scribble/core/logger/TestScribbleLogger.java modules/org.scribble.common/src/test/java/org/scribble/common/logger/TestScribbleLogger.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.logger;
17+
package org.scribble.common.logger;
1818

1919
import java.io.Serializable;
2020
import java.util.Map;
2121

22+
import org.scribble.common.logger.ScribbleLogger;
23+
2224
import static org.junit.Assert.*;
2325

2426
public class TestScribbleLogger implements ScribbleLogger {

modules/org.scribble.core/src/test/java/org/scribble/core/util/MessageUtilTest.java modules/org.scribble.common/src/test/java/org/scribble/common/util/MessageUtilTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.core.util;
17+
package org.scribble.common.util;
1818

1919
import static org.junit.Assert.*;
2020

21+
import org.scribble.common.util.MessageUtil;
22+
2123
public class MessageUtilTest {
2224

2325
@org.junit.Test

modules/org.scribble.conformance/META-INF/MANIFEST.MF

-12
This file was deleted.

modules/org.scribble.core/META-INF/MANIFEST.MF

-11
This file was deleted.

modules/org.scribble.conformance/.project modules/org.scribble.protocol.conformance/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>org.scribble.conformance</name>
3+
<name>org.scribble.protocol.conformance</name>
44
<comment></comment>
55
<projects>
66
</projects>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Scribble Protocol Conformance
4+
Bundle-SymbolicName: org.scribble.protocol.conformance
5+
Bundle-Version: 1.0.0.qualifier
6+
Bundle-Activator: org.scribble.protocol.conformance.osgi.Activator
7+
Bundle-Vendor: www.scribble.org
8+
Import-Package: org.osgi.framework;version="1.3.0",
9+
org.scribble.common.logger,
10+
org.scribble.common.util,
11+
org.scribble.protocol.model
12+
Export-Package: org.scribble.protocol.conformance

modules/org.scribble.conformance/pom.xml modules/org.scribble.protocol.conformance/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.scribble.modules</groupId>
5-
<artifactId>org.scribble.conformance</artifactId>
5+
<artifactId>org.scribble.protocol.conformance</artifactId>
66
<packaging>jar</packaging>
77
<version>1.0-SNAPSHOT</version>
8-
<name>Scribble::Modules::Conformance</name>
8+
<name>Scribble::Modules::Protocol::Conformance</name>
99

1010
<parent>
1111
<groupId>org.scribble</groupId>
@@ -16,7 +16,7 @@
1616
<dependencies>
1717
<dependency>
1818
<groupId>org.scribble.modules</groupId>
19-
<artifactId>org.scribble.core</artifactId>
19+
<artifactId>org.scribble.common</artifactId>
2020
<version>${scribble.version}</version>
2121
</dependency>
2222
<dependency>

modules/org.scribble.conformance/src/main/java/org/scribble/conformance/BehaviourList.java modules/org.scribble.protocol.conformance/src/main/java/org/scribble/protocol/conformance/BehaviourList.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
package org.scribble.conformance;
17+
package org.scribble.protocol.conformance;
1818

1919
import org.scribble.protocol.model.*;
2020

0 commit comments

Comments
 (0)