This commit was manufactured by cvs2svn to create branch 'EPF1_2_0_x_MAIN'.
diff --git a/org.eclipse.epf.diagram.tests/.classpath b/org.eclipse.epf.diagram.tests/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/org.eclipse.epf.diagram.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.epf.diagram.tests/.cvsignore b/org.eclipse.epf.diagram.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/org.eclipse.epf.diagram.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.epf.diagram.tests/.project b/org.eclipse.epf.diagram.tests/.project
deleted file mode 100644
index 0bdb896..0000000
--- a/org.eclipse.epf.diagram.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.epf.diagram.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.epf.diagram.tests/META-INF/MANIFEST.MF b/org.eclipse.epf.diagram.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 4ad56f0..0000000
--- a/org.eclipse.epf.diagram.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EPF Diagram Tests
-Bundle-SymbolicName: org.eclipse.epf.diagram.tests
-Bundle-Version: 1.2.0
-Bundle-Activator: org.eclipse.epf.diagram.tests.DiagramTestPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
- org.eclipse.epf.common,
- org.eclipse.epf.uma,
- org.eclipse.epf.library,
- org.eclipse.epf.library.xmi,
- org.eclipse.epf.library.tests,
- org.eclipse.epf.diagram.core,
- org.eclipse.epf.diagram.ad,
- org.eclipse.epf.diagram.ui,
- org.eclipse.epf.authoring.ui
-Eclipse-LazyStart: true
diff --git a/org.eclipse.epf.diagram.tests/build.properties b/org.eclipse.epf.diagram.tests/build.properties
deleted file mode 100644
index 34d2e4d..0000000
--- a/org.eclipse.epf.diagram.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestCase.java b/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestCase.java
deleted file mode 100644
index 93471a3..0000000
--- a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.epf.diagram.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.epf.authoring.ui.AuthoringUIPlugin;
-import org.eclipse.epf.library.tests.LibraryTestHelper;
-import org.eclipse.epf.uma.MethodLibrary;
-
-/**
-* The abstract base class for all Diagram JUnit test cases.
-*
-* @author Shilpa Toraskar
-* @since 1.2
-*/
-public abstract class DiagramTestCase extends TestCase {
-
- protected MethodLibrary library;
-
- protected boolean deleteLibraryOnExit = false;
-
- public DiagramTestCase(String name) {
- super(name);
- }
-
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- LibraryTestHelper.createTestMethodLibrary();
-
- // activate the Authoring plugins to initialize something
- // the reason to put it after the library is created is to avoid the Open Library dialog
- AuthoringUIPlugin.getDefault();
-
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
-
- LibraryTestHelper.closeLibrary();
- }
-
-}
diff --git a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestPlugin.java b/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestPlugin.java
deleted file mode 100644
index e5b77df..0000000
--- a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTestPlugin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-//------------------------------------------------------------------------------
-//Copyright (c) 2005, 2006 IBM Corporation and others.
-//All rights reserved. This program and the accompanying materials
-//are made available under the terms of the Eclipse Public License v1.0
-//which accompanies this distribution, and is available at
-//http://www.eclipse.org/legal/epl-v10.html
-//
-//Contributors:
-//IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.diagram.tests;
-
-import org.eclipse.epf.common.plugin.AbstractPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
-* The Tests plug-in class.
-*
-* @author Shilpa Toraskar
-* @since 1.2
-*/
-public class DiagramTestPlugin extends AbstractPlugin {
-
- // The plug-in ID.
- public static final String PLUGIN_ID = DiagramTestPlugin.class.getName();
-
- // The shared plug-in instance.
- private static DiagramTestPlugin plugin;
-
- /**
- * Default constructor.
- */
- public DiagramTestPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation.
- *
- * @see org.eclipse.epf.uma.core.plugin.AbstractPlugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped.
- *
- * @see org.eclipse.epf.uma.core.plugin.AbstractPlugin#start(BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared plug-in instance.
- */
- public static DiagramTestPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTests.java b/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTests.java
deleted file mode 100644
index 89838cc..0000000
--- a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.diagram.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * JUnit test suite for org.eclipse.epf.diagram.
- *
- * @author Shilpa Toraskar
- * @since 1.2
- */
-public class DiagramTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(DiagramTests.class.getPackage().getName());
- //$JUnit-BEGIN$
- suite.addTestSuite(DiagramUIServiceTest.class);
-
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramUIServiceTest.java b/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramUIServiceTest.java
deleted file mode 100644
index 04cea33..0000000
--- a/org.eclipse.epf.diagram.tests/src/org/eclipse/epf/diagram/tests/DiagramUIServiceTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.diagram.tests;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.epf.diagram.core.services.DiagramManager;
-import org.eclipse.epf.diagram.ui.service.DiagramUIService;
-import org.eclipse.epf.diagram.ui.service.IDiagramUIService;
-import org.eclipse.epf.library.tests.LibraryTestHelper;
-import org.eclipse.epf.uma.Activity;
-import org.eclipse.epf.uma.CapabilityPattern;
-import org.eclipse.epf.uma.ContentPackage;
-import org.eclipse.epf.uma.MethodConfiguration;
-import org.eclipse.epf.uma.MethodPlugin;
-import org.eclipse.epf.uma.ProcessComponent;
-import org.eclipse.epf.uma.Task;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Node;
-
-/**
- * JUnit tests for the org.eclipse.epf.diagram.ui.DiagramUIService classes.
- *
- * @author Shilpa Toraskar
- * @since 1.2
- */
-public class DiagramUIServiceTest extends DiagramTestCase {
-
- private IDiagramUIService diagramUIService = null;
-
- /**
- * Creates a new instance.
- */
- public DiagramUIServiceTest(String name) {
- super(name);
- }
-
- /**
- * Tests the DiagamUIService.createDiagram method.
- */
- public void testCreateDiagram() throws Exception {
-
- // create method plugin
- MethodPlugin plugin = LibraryTestHelper
- .createMethodPlugin("Test Plugin");
- ContentPackage pkg = LibraryTestHelper.createContentPackage(plugin,
- "p1");
-
- // create configuration
- MethodConfiguration config = LibraryTestHelper
- .createConfiguration("Test Config");
-
- // create process
- CapabilityPattern cp1 = LibraryTestHelper.createCapabilityPattern(
- plugin, "cp1", config);
-
- // update the configuration
- config.getMethodPluginSelection().add(plugin);
- config.getMethodPackageSelection().add(pkg);
- config.getMethodPackageSelection().add(
- (ProcessComponent) cp1.eContainer());
-
- // create task
- Task task1 = LibraryTestHelper.createTask(pkg, "Task1");
- Task task2 = LibraryTestHelper.createTask(pkg, "Task2");
- Task[] tasks = new Task[] { task1, task2 };
-
- Activity act1 = LibraryTestHelper.createActivity(plugin, cp1, "A1",
- tasks);
- Activity act2 = LibraryTestHelper.createActivity(plugin, cp1, "A2",
- tasks);
-
- diagramUIService = new DiagramUIService();
- DiagramManager mgr = DiagramManager.getInstance(cp1);
- Diagram diagram = null;
- try {
- Transaction tx = mgr.getEditingDomain().startTransaction(false,
- Collections.EMPTY_MAP);
- Resource resource = mgr.getResource();
-
- diagram = diagramUIService.createActivityDiagram(cp1);
-
- Node act1Node = diagramUIService.createNode(diagram, act1);
- Node initialNode = diagramUIService.createNode(diagram, IDiagramUIService.INITIAL_NODE, "initial");
- Node act2Node = diagramUIService.createNode(diagram, act2);
- Node decisionNode = diagramUIService.createNode(diagram, IDiagramUIService.DECISION_NODE, "decision");
- Node endNode = diagramUIService.createNode(diagram, IDiagramUIService.FINAL_NODE, "end");
-
- diagramUIService.createEdge(diagram, initialNode, act1Node, "link1");
- diagramUIService.createEdge(diagram, act1Node, decisionNode, "link2");
- diagramUIService.createEdge(diagram, decisionNode, act2Node, "link3");
- diagramUIService.createEdge(diagram, act2Node, endNode, "link4");
-
- List nodes = diagramUIService.getNodes(diagram, cp1, IDiagramUIService.ACTIVITY_NODE);
- if (!nodes.isEmpty()) {
- System.out.println("****** ACTIVITY Nodes - ");
- for (int i=0; i < nodes.size(); i++)
- System.out.println(nodes.get(i));
- }
-
- nodes = diagramUIService.getNodes(diagram, cp1, IDiagramUIService.INITIAL_NODE);
- if (!nodes.isEmpty()) {
- System.out.println("****** Initial Nodes - ");
- for (int i=0; i < nodes.size(); i++)
- System.out.println(nodes.get(i));
- }
-
- nodes = diagramUIService.getNodes(diagram, cp1, IDiagramUIService.DECISION_NODE);
- if (!nodes.isEmpty()) {
- System.out.println("****** Decision Nodes - ");
- for (int i=0; i < nodes.size(); i++)
- System.out.println(nodes.get(i));
- }
-
- nodes = diagramUIService.getAllNodes(diagram);
- if (!nodes.isEmpty()) {
- System.out.println("****** ALL Nodes - ");
- for (int i=0; i < nodes.size(); i++)
- System.out.println(nodes.get(i));
- }
-
- assertTrue(!nodes.isEmpty());
-
- List edges = diagramUIService.getEdges(diagram);
- if (!edges.isEmpty()) {
- System.out.println("****** ALL Edges - ");
- for (int i=0; i < edges.size(); i++)
- System.out.println(edges.get(i));
- }
-
- assertTrue(!edges.isEmpty());
-
- // save diagram
- resource.getContents().add(diagram.getElement());
- resource.getContents().add(diagram);
- tx.commit();
- resource.save(null);
-
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- if (mgr != null) {
- mgr.release();
- }
- }
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/.classpath b/org.eclipse.epf.richtext.tests/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/org.eclipse.epf.richtext.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.epf.richtext.tests/.project b/org.eclipse.epf.richtext.tests/.project
deleted file mode 100644
index 6456d66..0000000
--- a/org.eclipse.epf.richtext.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.epf.richtext.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.epf.richtext.tests/META-INF/MANIFEST.MF b/org.eclipse.epf.richtext.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index e3e2856..0000000
--- a/org.eclipse.epf.richtext.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EPF RichText Tests Plug-in
-Bundle-SymbolicName: org.eclipse.epf.richtext.tests; singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.epf.richtext.tests.RichTextTestsPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.epf.common,
- org.eclipse.epf.richtext,
- org.eclipse.ui,
- org.junit
-Eclipse-LazyStart: true
-Bundle-Vendor: Eclipse.org
diff --git a/org.eclipse.epf.richtext.tests/build.properties b/org.eclipse.epf.richtext.tests/build.properties
deleted file mode 100644
index 0d3d3a7..0000000
--- a/org.eclipse.epf.richtext.tests/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/
diff --git a/org.eclipse.epf.richtext.tests/icons/sample.gif b/org.eclipse.epf.richtext.tests/icons/sample.gif
deleted file mode 100644
index 34fb3c9..0000000
--- a/org.eclipse.epf.richtext.tests/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.epf.richtext.tests/plugin.xml b/org.eclipse.epf.richtext.tests/plugin.xml
deleted file mode 100644
index 6bf3b65..0000000
--- a/org.eclipse.epf.richtext.tests/plugin.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.views">
- <category
- name="EPF Tests Category"
- id="org.eclipse.epf.richtext.tests">
- </category>
- <view
- name="Rich Text Test View"
- icon="icons/sample.gif"
- category="org.eclipse.epf.richtext.tests"
- class="org.eclipse.epf.richtext.tests.views.RichTextTestView"
- id="org.eclipse.epf.richtext.tests.views.RichTextTestView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <view
- ratio="0.5"
- relative="org.eclipse.ui.views.TaskList"
- relationship="right"
- id="org.eclipse.epf.richtext.tests.views.RichTextTestView">
- </view>
- </perspectiveExtension>
- </extension>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- id="org.eclipse.epf.richtext.tests.editors.HTMLEditor"
- class="org.eclipse.epf.richtext.tests.editors.HTMLEditor"
- contributorClass="org.eclipse.epf.richtext.tests.editors.HTMLEditorActionBarContributor"
- name="HTML Editor"
- extensions="html"
- icon="icons/sample.gif">
- </editor>
- <editor
- id="org.eclipse.epf.richtext.tests.editors.MultiPageHTMLEditor"
- class="org.eclipse.epf.richtext.tests.editors.MultiPageHTMLEditor"
- name="Multi-page HTML Editor"
- extensions="html"
- icon="icons/sample.gif">
- </editor>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTest.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTest.java
deleted file mode 100644
index 90d0ac1..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.epf.common.utils.StrUtil;
-
-/**
- * JUnit tests for the org.eclipse.epf.richtext.RichText classes.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class RichTextTest extends TestCase {
-
- /**
- * Creates a new instance.
- */
- public RichTextTest(String name) {
- super(name);
- }
-
- /**
- * Tests the StrUtil.isNull() method.
- */
- public void testIsNull() throws Exception {
- assertTrue(StrUtil.isNull(null));
- assertTrue(StrUtil.isNull(""));
- assertFalse(StrUtil.isNull("Hello"));
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTests.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTests.java
deleted file mode 100644
index 9027b27..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * JUnit test suite for org.eclipse.epf.common.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class RichTextTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(RichTextTests.class.getPackage().getName());
- //$JUnit-BEGIN$
- //suite.addTestSuite(StrUtilTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTestsPlugin.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTestsPlugin.java
deleted file mode 100644
index 5905699..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/RichTextTestsPlugin.java
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests;
-
-import org.eclipse.epf.common.plugin.AbstractPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The RichText Tests plug-in class.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class RichTextTestsPlugin extends AbstractPlugin {
-
- // The shared plug-in instance.
- private static RichTextTestsPlugin plugin;
-
- /**
- * Creates a new instance.
- */
- public RichTextTestsPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * @see AbstractPlugin#start(BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * @see AbstractPlugin#stop(BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared plug-in instance.
- */
- public static RichTextTestsPlugin getDefault() {
- return plugin;
- }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BlockTagContribution.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BlockTagContribution.java
deleted file mode 100755
index 2f09ba9..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BlockTagContribution.java
+++ /dev/null
@@ -1,89 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//-------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.html.BlockTag;
-import org.eclipse.jface.action.ControlContribution;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Contributes a combo containing HTML block tags to a tool bar.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class BlockTagContribution extends ControlContribution {
-
- /**
- * The Contribution ID.
- */
- public static final String CONTRIBUTION_ID = BlockTagContribution.class
- .getName();
-
- // The rich text control.
- private IRichText richText;
-
- // The block tag combo.
- private static Combo blockTagCombo;
-
- /**
- * Creates a new instance.
- *
- * @param richText
- * The rich text control.
- */
- public BlockTagContribution(IRichText richText) {
- super(CONTRIBUTION_ID);
- this.richText = richText;
- }
-
- /**
- * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
- */
- protected Control createControl(Composite parent) {
- blockTagCombo = new Combo(parent, SWT.READ_ONLY | SWT.FLAT);
- blockTagCombo.add(BlockTag.PARAGRAPH.getName());
- blockTagCombo.add(BlockTag.HEADING_1.getName());
- blockTagCombo.add(BlockTag.HEADING_2.getName());
- blockTagCombo.add(BlockTag.HEADING_3.getName());
- blockTagCombo.add(BlockTag.HEADING_4.getName());
- blockTagCombo.add(BlockTag.HEADING_5.getName());
- blockTagCombo.add(BlockTag.HEADING_6.getName());
- blockTagCombo.add(BlockTag.ADDRESS.getName());
- blockTagCombo.add(BlockTag.PREFORMATTED_TEXT.getName());
- blockTagCombo.setVisibleItemCount(blockTagCombo.getItemCount());
- blockTagCombo.select(0);
- if (richText != null) {
- blockTagCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Object eventSrc = event.getSource();
- if (eventSrc instanceof Combo) {
- Combo combo = (Combo) eventSrc;
- int index = combo.getSelectionIndex();
- String value = BlockTag.getBlockTag(index).getValue();
- richText.executeCommand(RichTextCommand.FORMAT_BLOCK,
- value);
- }
- };
- });
- }
-
- return blockTagCombo;
- }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BoldAction.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BoldAction.java
deleted file mode 100755
index ea2e092..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/BoldAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//--------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.RichTextImages;
-import org.eclipse.epf.richtext.RichTextResources;
-
-/**
- * Toggles the 'bold' attribute of the selected text.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class BoldAction extends RichTextAction {
-
- /**
- * Creates a new instance.
- */
- public BoldAction() {
- super();
- }
-
- /**
- * Initializes the action.
- */
- public void init() {
- setImageDescriptor(RichTextImages.IMG_DESC_BOLD);
- setToolTipText(RichTextResources.boldAction_toolTipText);
- }
-
- public void run() {
- if (editor != null) {
- editor.executeCommand(RichTextCommand.BOLD, null);
- }
-
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontNameContribution.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontNameContribution.java
deleted file mode 100755
index 58e64e4..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontNameContribution.java
+++ /dev/null
@@ -1,82 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.html.FontName;
-import org.eclipse.jface.action.ControlContribution;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Contributes a combo containing HTML font names to a tool bar.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class FontNameContribution extends ControlContribution {
-
- /**
- * The Contribution ID.
- */
- public static final String CONTRIBUTION_ID = FontNameContribution.class.getName();
-
- // The rich text control.
- private IRichText richText;
-
- // The font name combo.
- private static Combo fontNameCombo;
-
- /**
- * Creates a new instance.
- *
- * @param richText The rich text control.
- */
- public FontNameContribution(IRichText richText) {
- super(CONTRIBUTION_ID);
- this.richText = richText;
- }
-
- /**
- * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
- */
- protected Control createControl(Composite parent) {
- fontNameCombo = new Combo(parent, SWT.READ_ONLY | SWT.FLAT);
- fontNameCombo.add(FontName.DEFAULT.getName());
- fontNameCombo.add(FontName.ARIAL.getName());
- fontNameCombo.add(FontName.COURIER_NEW.getName());
- fontNameCombo.add(FontName.TIMES_NEW_ROMAN.getName());
- fontNameCombo.add(FontName.VERDANA.getName());
- fontNameCombo.setVisibleItemCount(fontNameCombo.getItemCount());
- fontNameCombo.select(0);
- if (richText != null) {
- fontNameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Object eventSrc = event.getSource();
- if (eventSrc instanceof Combo) {
- Combo combo = (Combo)eventSrc;
- int index = combo.getSelectionIndex();
- String value = FontName.getFontName(index).getValue();
- richText.executeCommand(RichTextCommand.SET_FONT_NAME, value);
- }
- };
- });
- }
-
- return fontNameCombo;
- }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontSizeContribution.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontSizeContribution.java
deleted file mode 100755
index 57ef01f..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/FontSizeContribution.java
+++ /dev/null
@@ -1,82 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//--------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.jface.action.ControlContribution;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Contributes a combo containing HTML font sizes to a tool bar.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class FontSizeContribution extends ControlContribution {
-
- /**
- * The Contribution ID.
- */
- public static final String CONTRIBUTION_ID = FontSizeContribution.class.getName();
-
- // The rich text control.
- private IRichText richText;
-
- // The font size combo.
- private static Combo fontSizeCombo;
-
- /**
- * Creates a new instance.
- *
- * @param richText The rich text control.
- */
- public FontSizeContribution(IRichText richText) {
- super(CONTRIBUTION_ID);
- this.richText = richText;
- }
-
- /**
- * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
- */
- protected Control createControl(Composite parent) {
- fontSizeCombo = new Combo(parent, SWT.READ_ONLY | SWT.FLAT);
- fontSizeCombo.add("1"); //$NON-NLS-1$
- fontSizeCombo.add("2"); //$NON-NLS-1$
- fontSizeCombo.add("3"); //$NON-NLS-1$
- fontSizeCombo.add("4"); //$NON-NLS-1$
- fontSizeCombo.add("5"); //$NON-NLS-1$
- fontSizeCombo.add("6"); //$NON-NLS-1$
- fontSizeCombo.add("7"); //$NON-NLS-1$
- fontSizeCombo.setVisibleItemCount(fontSizeCombo.getItemCount());
- fontSizeCombo.select(2);
- if (richText != null) {
- fontSizeCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Object eventSrc = event.getSource();
- if (eventSrc instanceof Combo) {
- Combo combo = (Combo)eventSrc;
- int fontSize = combo.getSelectionIndex() + 1;
- richText.executeCommand(RichTextCommand.SET_FONT_SIZE, "" + fontSize); //$NON-NLS-1$
- }
- };
- });
- }
-
- return fontSizeCombo;
- }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/ItalicAction.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/ItalicAction.java
deleted file mode 100755
index 53b92b2..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/ItalicAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//---------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.RichTextImages;
-import org.eclipse.epf.richtext.RichTextResources;
-
-/**
- * Toggles the 'italic' attribute of the selected text.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class ItalicAction extends RichTextAction {
-
- /**
- * Creates a new instance.
- */
- public ItalicAction() {
- super();
- }
-
- /**
- * Initializes the action.
- */
- public void init() {
- setImageDescriptor(RichTextImages.IMG_DESC_ITALIC);
- setToolTipText(RichTextResources.italicAction_toolTipText);
- }
-
- public void run() {
- if (editor != null) {
- editor.executeCommand(RichTextCommand.ITALIC, null);
- }
-
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/RichTextAction.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/RichTextAction.java
deleted file mode 100755
index ca4873f..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/RichTextAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//--------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.tests.editors.HTMLEditor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * The abstract class for all rich text actions.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public abstract class RichTextAction extends Action {
-
- protected HTMLEditor editor = null;
-
- /**
- * Creates a new instance.
- */
- public RichTextAction() {
- super();
- init();
- }
-
- /**
- * Initializes the action.
- */
- public void init() {
- }
-
- /**
- * Sets the active editor.
- *
- * @param activeEditor
- * the active editor
- */
- public void setActiveEditor(IEditorPart activeEditor) {
- if (activeEditor instanceof HTMLEditor) {
- editor = (HTMLEditor) activeEditor;
- }
- }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/SubscriptAction.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/SubscriptAction.java
deleted file mode 100755
index d61a10a..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/SubscriptAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//---------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.RichTextImages;
-import org.eclipse.epf.richtext.RichTextResources;
-
-/**
- * Toggles the 'bold' attribute of the selected text.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class SubscriptAction extends RichTextAction {
-
- /**
- * Creates a new instance.
- */
- public SubscriptAction() {
- super();
- }
-
- /**
- * Initializes the action.
- */
- public void init() {
- setImageDescriptor(RichTextImages.IMG_DESC_BOLD);
- setToolTipText(RichTextResources.boldAction_toolTipText);
- }
-
- public void run() {
- if (editor != null) {
- editor.executeCommand(RichTextCommand.BOLD, null);
- }
-
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/UnderlineAction.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/UnderlineAction.java
deleted file mode 100755
index 5bcf02d..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/actions/UnderlineAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//---------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.actions;
-
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.RichTextImages;
-import org.eclipse.epf.richtext.RichTextResources;
-
-/**
- * Toggles the 'underline' attribute of the selected text.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class UnderlineAction extends RichTextAction {
-
- /**
- * Creates a new instance.
- */
- public UnderlineAction() {
- super();
- }
-
- /**
- * Initializes the action.
- */
- public void init() {
- setImageDescriptor(RichTextImages.IMG_DESC_UNDERLINE);
- setToolTipText(RichTextResources.underlineAction_toolTipText);
- }
-
- public void run() {
- if (editor != null) {
- editor.executeCommand(RichTextCommand.UNDERLINE, null);
- }
-
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditor.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditor.java
deleted file mode 100755
index 6a6480c..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditor.java
+++ /dev/null
@@ -1,117 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//----------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.editors;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichText;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-/**
- * A HTML editor built with a rich text.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class HTMLEditor extends EditorPart {
-
- // The Rich Text control.
- private IRichText richText;
-
- /**
- * Creates a new instance.
- */
- public HTMLEditor() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#init(IEditorSite, IEditorInput)
- */
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
- try {
- setSite(site);
- setInput(input);
- setPartName(input.getName());
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- try {
- richText = new RichText(parent, SWT.NONE);
- } catch (Exception e) {
- richText = null;
- e.printStackTrace();
- }
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- if (richText != null) {
- richText.setFocus();
- }
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#disDirty()
- */
- public boolean isDirty() {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#doSave(IProgressMonitor)
- */
- public void doSave(IProgressMonitor monitor) {
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#doSaveAs()
- */
- public void doSaveAs() {
- }
-
- /**
- * Executes a rich text command.
- *
- * @param command
- * a rich text command string
- * @param params
- * a comma-delimited commands assciated with the command
- */
- public void executeCommand(String command, String params) {
- if (richText != null) {
- richText.executeCommand(command, params);
- }
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditorActionBarContributor.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditorActionBarContributor.java
deleted file mode 100755
index e13f08b..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/HTMLEditorActionBarContributor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2004, 2005 IBM Corporation. All Rights Reserved.
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.editors;
-
-import org.eclipse.epf.richtext.tests.actions.BoldAction;
-import org.eclipse.epf.richtext.tests.actions.ItalicAction;
-import org.eclipse.epf.richtext.tests.actions.UnderlineAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-/**
- * A HTML editor action bar contributor.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class HTMLEditorActionBarContributor extends EditorActionBarContributor {
-
- private IEditorPart editor;
- private BoldAction boldAction;
- private ItalicAction italicAction;
- private UnderlineAction underlineAction;
-
- /**
- * Creates a new instance.
- */
- public HTMLEditorActionBarContributor() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.IEditorActionBarContributor#init(IActionBars, IWorkbenchPage)
- */
- public void init(IActionBars bars, IWorkbenchPage page) {
- super.init(bars, page);
- boldAction = new BoldAction();
- italicAction = new ItalicAction();
- underlineAction = new UnderlineAction();
-
- IToolBarManager toolBar = bars.getToolBarManager();
-
- toolBar.add(boldAction);
- toolBar.add(italicAction);
- toolBar.add(underlineAction);
- toolBar.add(new Separator());
-
- }
-
- /**
- * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
- */
- public void setActiveEditor(IEditorPart activeEditor) {
- editor = activeEditor;
- boldAction.setActiveEditor(editor);
- italicAction.setActiveEditor(editor);
- underlineAction.setActiveEditor(editor);
- }
-
- /**
- * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
- */
- public void dispose() {
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/MultiPageHTMLEditor.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/MultiPageHTMLEditor.java
deleted file mode 100755
index 14c47a3..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/MultiPageHTMLEditor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//-------------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.editors;
-
-/**
- * A multi-page HTML editor built with a rich text control.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichText;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.MultiPageEditorPart;
-
-public class MultiPageHTMLEditor extends MultiPageEditorPart {
-
- // The Rich Text editor.
- private IRichText richTextEditor;
-
- // The HTML source editor.
- private Text htmlEditor;
-
- /**
- * Creates a new instance.
- */
- public MultiPageHTMLEditor() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#init(IEditorSite, IEditorInput)
- */
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(input.getName());
- }
-
- /**
- * @see org.eclipse.ui.part.MultiPageEditorPart#createPage()
- */
- protected void createPages() {
- createRichTextPage();
- createSourcePage();
- }
-
- /**
- * Creates the Rich Text page.
- */
- protected void createRichTextPage() {
- richTextEditor = new RichText(getContainer(), SWT.NONE);
- int index = addPage(richTextEditor.getControl());
- setPageText(index, "Rich Text");
- }
-
- /**
- * Creates the HTML Source page.
- */
- protected void createSourcePage() {
- htmlEditor = new Text(getContainer(), SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- int index = addPage(htmlEditor);
- setPageText(index, "HTML");
- }
-
- /**
- * @see org.eclipse.ui.part.MultiPageEditorPart#pageChange(int)
- */
- protected void pageChange(int newPageIndex) {
- super.pageChange(newPageIndex);
- switch (newPageIndex) {
- case 0:
- richTextEditor.setText(htmlEditor.getText());
- break;
- case 1:
- htmlEditor.setText(richTextEditor.getText());
- break;
- }
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#disDirty()
- */
- public boolean isDirty() {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#doSave(IProgressMonitor)
- */
- public void doSave(IProgressMonitor monitor) {
- }
-
- /**
- * @see org.eclipse.ui.part.EditorPart#doSaveAs()
- */
- public void doSaveAs() {
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/RichTextTestEditor.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/RichTextTestEditor.java
deleted file mode 100755
index 9fcbf70..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/editors/RichTextTestEditor.java
+++ /dev/null
@@ -1,112 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2007 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//--------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.editors;
-
-import org.eclipse.epf.richtext.IRichTextToolBar;
-import org.eclipse.epf.richtext.RichTextEditor;
-import org.eclipse.epf.richtext.actions.AddImageAction;
-import org.eclipse.epf.richtext.actions.AddLineAction;
-import org.eclipse.epf.richtext.actions.AddLinkAction;
-import org.eclipse.epf.richtext.actions.AddOrderedListAction;
-import org.eclipse.epf.richtext.actions.AddTableAction;
-import org.eclipse.epf.richtext.actions.AddUnorderedListAction;
-import org.eclipse.epf.richtext.actions.BlockTagAction;
-import org.eclipse.epf.richtext.actions.BoldAction;
-import org.eclipse.epf.richtext.actions.CopyAction;
-import org.eclipse.epf.richtext.actions.CutAction;
-import org.eclipse.epf.richtext.actions.FontNameAction;
-import org.eclipse.epf.richtext.actions.FontSizeAction;
-import org.eclipse.epf.richtext.actions.FontStyleAction;
-import org.eclipse.epf.richtext.actions.IndentAction;
-import org.eclipse.epf.richtext.actions.ItalicAction;
-import org.eclipse.epf.richtext.actions.JustifyCenterAction;
-import org.eclipse.epf.richtext.actions.JustifyFullAction;
-import org.eclipse.epf.richtext.actions.JustifyLeftAction;
-import org.eclipse.epf.richtext.actions.JustifyRightAction;
-import org.eclipse.epf.richtext.actions.OutdentAction;
-import org.eclipse.epf.richtext.actions.PasteAction;
-import org.eclipse.epf.richtext.actions.SubscriptAction;
-import org.eclipse.epf.richtext.actions.SuperscriptAction;
-import org.eclipse.epf.richtext.actions.TidyActionGroup;
-import org.eclipse.epf.richtext.actions.UnderlineAction;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorSite;
-
-/**
- * Extends the base rich text editor and populates its tool bar with some useful
- * action items.
- *
- * @author Kelvin Low
- * @author Jeff Hardy
- * @since 1.0
- */
-public class RichTextTestEditor extends RichTextEditor {
-
- /**
- * Creates a new instance.
- *
- * @param parent
- * The parent composite.
- * @param style
- * The style for the control.
- * @param basePath
- * The base path used for resolving hyperlinks in the editor
- * content.
- */
- public RichTextTestEditor(Composite parent, int style, IEditorSite editorSite) {
- super(parent, style, editorSite);
- }
-
- /**
- * Fills the Rich Text editor tool bar with action items.
- *
- * @param toolBar
- * The Rich text editor tool bar.
- */
- public void fillToolBar(IRichTextToolBar toolBar) {
- toolBar.addAction(new FontStyleAction(this));
- toolBar.addAction(new BlockTagAction());
- toolBar.addAction(new FontNameAction(this));
- toolBar.addAction(new FontSizeAction(this));
- toolBar.addAction(new CutAction(this));
- toolBar.addAction(new CopyAction(this));
- toolBar.addAction(new PasteAction(this));
- toolBar.addSeparator();
- toolBar.addAction(new BoldAction(this));
- toolBar.addAction(new ItalicAction(this));
- toolBar.addAction(new UnderlineAction(this));
- toolBar.addSeparator();
- toolBar.addAction(new SubscriptAction(this));
- toolBar.addAction(new SuperscriptAction(this));
- toolBar.addSeparator();
- toolBar.addAction(new TidyActionGroup(this));
- toolBar.addSeparator();
- toolBar.addAction(new JustifyLeftAction(this));
- toolBar.addAction(new JustifyCenterAction(this));
- toolBar.addAction(new JustifyRightAction(this));
- toolBar.addAction(new JustifyFullAction(this));
- toolBar.addSeparator();
- toolBar.addAction(new AddOrderedListAction(this));
- toolBar.addAction(new AddUnorderedListAction(this));
- toolBar.addSeparator();
- toolBar.addAction(new OutdentAction(this));
- toolBar.addAction(new IndentAction(this));
- toolBar.addSeparator();
- if (richText.getFindReplaceAction() != null)
- toolBar.addAction(richText.getFindReplaceAction());
- toolBar.addSeparator();
- toolBar.addAction(new AddLineAction(this));
- toolBar.addAction(new AddLinkAction(this));
- toolBar.addAction(new AddImageAction(this));
- toolBar.addAction(new AddTableAction(this));
- }
-
-}
diff --git a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/views/RichTextTestView.java b/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/views/RichTextTestView.java
deleted file mode 100755
index 70f7782..0000000
--- a/org.eclipse.epf.richtext.tests/src/org/eclipse/epf/richtext/tests/views/RichTextTestView.java
+++ /dev/null
@@ -1,245 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.richtext.tests.views;
-
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.RichText;
-import org.eclipse.epf.richtext.RichTextCommand;
-import org.eclipse.epf.richtext.RichTextImages;
-import org.eclipse.epf.richtext.dialogs.AddImageDialog;
-import org.eclipse.epf.richtext.dialogs.AddLinkDialog;
-import org.eclipse.epf.richtext.dialogs.AddTableDialog;
-import org.eclipse.epf.richtext.html.Image;
-import org.eclipse.epf.richtext.html.Link;
-import org.eclipse.epf.richtext.html.Table;
-import org.eclipse.epf.richtext.tests.actions.BlockTagContribution;
-import org.eclipse.epf.richtext.tests.actions.FontNameContribution;
-import org.eclipse.epf.richtext.tests.actions.FontSizeContribution;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * A test view containing a rich text control.
- *
- * @author Kelvin Low
- * @since 1.0
- */
-public class RichTextTestView extends ViewPart {
-
- private IRichText richText;
-
- /**
- * Creates a new instance.
- */
- public RichTextTestView() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new FillLayout());
-
- richText = new RichText(composite, SWT.NONE);
- if (richText == null) {
- return;
- }
-
- richText.setText("<h3>Hello World</h3>");
-
- Action boldAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.BOLD);
- }
- };
- boldAction.setImageDescriptor(RichTextImages.IMG_DESC_BOLD);
-
- Action italicAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.ITALIC);
- }
- };
- italicAction.setImageDescriptor(RichTextImages.IMG_DESC_ITALIC);
-
- Action underlineAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.UNDERLINE);
- }
- };
- underlineAction.setImageDescriptor(RichTextImages.IMG_DESC_UNDERLINE);
-
- Action subscriptAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.SUBSCRIPT);
- }
- };
- subscriptAction.setImageDescriptor(RichTextImages.IMG_DESC_SUBSCRIPT);
-
- Action superscriptAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.SUPERSCRIPT);
- }
- };
- superscriptAction.setImageDescriptor(RichTextImages.IMG_DESC_SUPERSCRIPT);
-
- Action justifyLeftAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.JUSTIFY_LEFT);
- }
- };
- justifyLeftAction.setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_LEFT);
-
- Action justifyCenterAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.JUSTIFY_CENTER);
- }
- };
- justifyCenterAction.setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_CENTER);
-
- Action justifyRightAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.JUSTIFY_RIGHT);
- }
- };
- justifyRightAction.setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_RIGHT);
-
- Action justifyFullAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.JUSTIFY_FULL);
- }
- };
- justifyFullAction.setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_FULL);
-
- Action addOrderedListAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.ADD_ORDERED_LIST);
- }
- };
- addOrderedListAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_ORDERED_LIST);
-
- Action addUnorderedListAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.ADD_UNORDERED_LIST);
- }
- };
- addUnorderedListAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_UNORDERED_LIST);
-
- Action outdentAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.OUTDENT);
- }
- };
- outdentAction.setImageDescriptor(RichTextImages.IMG_DESC_OUTDENT);
-
- Action indentAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.INDENT);
- }
- };
- indentAction.setImageDescriptor(RichTextImages.IMG_DESC_INDENT);
-
- Action addLineAction = new Action() {
- public void run() {
- richText.executeCommand(RichTextCommand.ADD_LINE);
- }
- };
- addLineAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_LINE);
-
- Action addLinkAction = new Action() {
- public void run() {
- AddLinkDialog dialog = new AddLinkDialog(Display.getCurrent().getActiveShell(), null);
- dialog.open();
- Link link = dialog.getLink();
- if (link.getURL().length() > 0) {
- richText.executeCommand(RichTextCommand.ADD_LINK, link.getURL());
- }
- }
- };
- addLinkAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_LINK);
-
- Action addImageAction = new Action() {
- public void run() {
- AddImageDialog dialog = new AddImageDialog(Display.getCurrent().getActiveShell());
- dialog.open();
- Image image = dialog.getImage();
- if (image.getURL().length() > 0) {
- richText.executeCommand(RichTextCommand.ADD_IMAGE, image.getURL());
- }
- }
- };
- addImageAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_IMAGE);
-
- Action addTableAction = new Action() {
- public void run() {
- AddTableDialog dialog = new AddTableDialog(Display.getCurrent().getActiveShell());
- dialog.open();
- Table table = dialog.getTable();
- int rows = table.getRows();
- int cols = table.getColumns();
- String width = table.getWidth();
- if (rows > 0 && cols > 0) {
- richText.executeCommand(RichTextCommand.ADD_TABLE, rows + "', '" + cols + "', '" + width); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- };
- addTableAction.setImageDescriptor(RichTextImages.IMG_DESC_ADD_TABLE);
-
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager toolBarMgr = bars.getToolBarManager();
-
- toolBarMgr.add(new BlockTagContribution(richText));
- toolBarMgr.add(new FontNameContribution(richText));
- toolBarMgr.add(new FontSizeContribution(richText));
-
- toolBarMgr.add(boldAction);
- toolBarMgr.add(italicAction);
- toolBarMgr.add(underlineAction);
- toolBarMgr.add(new Separator());
- toolBarMgr.add(subscriptAction);
- toolBarMgr.add(superscriptAction);
- toolBarMgr.add(new Separator());
- toolBarMgr.add(justifyLeftAction);
- toolBarMgr.add(justifyCenterAction);
- toolBarMgr.add(justifyRightAction);
- toolBarMgr.add(justifyFullAction);
- toolBarMgr.add(new Separator());
- toolBarMgr.add(addOrderedListAction);
- toolBarMgr.add(addUnorderedListAction);
- toolBarMgr.add(new Separator());
- toolBarMgr.add(outdentAction);
- toolBarMgr.add(indentAction);
- toolBarMgr.add(new Separator());
- toolBarMgr.add(addLineAction);
- toolBarMgr.add(addLinkAction);
- toolBarMgr.add(addImageAction);
- toolBarMgr.add(addTableAction);
- toolBarMgr.add(new Separator());
- }
-
- /**
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
- public void setFocus() {
- if (richText != null) {
- richText.setFocus();
- }
- }
-
-}
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index 129a753..0000000
--- a/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This folder is for JUNIT tests.
\ No newline at end of file