Commit 7f4d8044 authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Fixed #289 as far as I can tell.



This was completely hosed. plugin.xml was missing from the
build.properties file. The schema was incorrectly defined. The
XMLPersistenceProvider was not pulling from the extension points
correctly. I fixed this and tested it with a clean build.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent d17ef622
...@@ -2,7 +2,7 @@ output.. = bin/ ...@@ -2,7 +2,7 @@ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
.,\ .,\
schema/,\ schema/,\
,\ plugin.xml,\
OSGI-INF/ OSGI-INF/
src.includes = META-INF/,\ src.includes = META-INF/,\
src/ src/
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?> <?eclipse version="3.4"?>
<plugin> <plugin>
<extension-point id="org.eclipse.ice.datastructures.jaxbClassProvider" name="JAXB Class Provider" schema="schema/jaxbClassProvider.exsd"/> <extension-point id="jaxbClassProvider" name="JAXB Class Provider" schema="schema/jaxbClassProvider.exsd"/>
<extension <extension
id="iceJAXBClassProvider" id="iceJAXBClassProvider"
name="ICE JAXB Class Provider" name="ICE JAXB Class Provider"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<schema targetNamespace="org.eclipse.ice.datastructures" xmlns="http://www.w3.org/2001/XMLSchema"> <schema targetNamespace="org.eclipse.ice.datastructures" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation> <annotation>
<appinfo> <appinfo>
<meta.schema plugin="org.eclipse.ice.datastructures" id="JAXBClassProvider" name="JAXB Class Provider"/> <meta.schema plugin="org.eclipse.ice.datastructures" id="jaxbClassProvider" name="JAXB Class Provider"/>
</appinfo> </appinfo>
<documentation> <documentation>
This Extension Point can be used by clients to automatically provide a class to ICE&apos;s JAXB-based persistence services. Extensions must realize the IJAXBProvider interface from org.eclipse.ice.datastructures.jaxbclassprovider. This Extension Point can be used by clients to automatically provide a class to ICE&apos;s JAXB-based persistence services. Extensions must realize the IJAXBProvider interface from org.eclipse.ice.datastructures.jaxbclassprovider.
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<attribute name="class" type="string"> <attribute name="class" type="string">
<annotation> <annotation>
<documentation> <documentation>
A class that implements the IJAXBClassProvider interface (or extends one of its implementations) to provide new classes to Eclipse ICE&apos;s XML persistence API.
</documentation> </documentation>
<appinfo> <appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.ice.datastructures.jaxbclassprovider.IJAXBClassProvider"/> <meta.attribute kind="java" basedOn=":org.eclipse.ice.datastructures.jaxbclassprovider.IJAXBClassProvider"/>
......
...@@ -40,8 +40,7 @@ public interface ItemBuilder { ...@@ -40,8 +40,7 @@ public interface ItemBuilder {
* This operation returns the short name of the Item that can be constructed * This operation returns the short name of the Item that can be constructed
* by this ItemBuilder. * by this ItemBuilder.
* *
* @return * @return The name
* The name
*/ */
public String getItemName(); public String getItemName();
...@@ -49,8 +48,7 @@ public interface ItemBuilder { ...@@ -49,8 +48,7 @@ public interface ItemBuilder {
* This operation returns the type of Item that can be built by the * This operation returns the type of Item that can be built by the
* ItemBuilder. * ItemBuilder.
* *
* @return * @return The type
* The type
*/ */
public ItemType getItemType(); public ItemType getItemType();
...@@ -70,8 +68,7 @@ public interface ItemBuilder { ...@@ -70,8 +68,7 @@ public interface ItemBuilder {
* *
* @param projectSpace * @param projectSpace
* The Eclipse project that the Item should use for storage. * The Eclipse project that the Item should use for storage.
* @return * @return The newly created Item.
* The newly created Item.
*/ */
public Item build(IProject projectSpace); public Item build(IProject projectSpace);
...@@ -89,7 +86,6 @@ public interface ItemBuilder { ...@@ -89,7 +86,6 @@ public interface ItemBuilder {
* Logger for handling event messages and other information. * Logger for handling event messages and other information.
*/ */
Logger logger = LoggerFactory.getLogger(ItemBuilder.class); Logger logger = LoggerFactory.getLogger(ItemBuilder.class);
ItemBuilder[] builders = null; ItemBuilder[] builders = null;
String id = "org.eclipse.ice.item.itemBuilder"; String id = "org.eclipse.ice.item.itemBuilder";
IExtensionPoint point = Platform.getExtensionRegistry() IExtensionPoint point = Platform.getExtensionRegistry()
......
...@@ -98,7 +98,7 @@ public class XMLPersistenceProviderTester { ...@@ -98,7 +98,7 @@ public class XMLPersistenceProviderTester {
try { try {
// Start the service // Start the service
xmlpp.start(); xmlpp.start();
} catch (JAXBException e) { } catch (JAXBException | CoreException e) {
e.printStackTrace(); e.printStackTrace();
fail(); fail();
} }
...@@ -367,8 +367,8 @@ public class XMLPersistenceProviderTester { ...@@ -367,8 +367,8 @@ public class XMLPersistenceProviderTester {
// Check the list // Check the list
Item listItem = items.get(0); Item listItem = items.get(0);
// Look for the correct name and item id // Look for the correct name and item id
assertEquals(listItem.getName(),MOOSEModelBuilder.name); assertEquals(listItem.getName(), MOOSEModelBuilder.name);
assertEquals(listItem.getId(),3); assertEquals(listItem.getId(), 3);
// Delete the item // Delete the item
assertTrue(xmlpp.deleteItem(item)); assertTrue(xmlpp.deleteItem(item));
...@@ -387,9 +387,9 @@ public class XMLPersistenceProviderTester { ...@@ -387,9 +387,9 @@ public class XMLPersistenceProviderTester {
assertTrue(xmlpp.persistItem(vibeItem)); assertTrue(xmlpp.persistItem(vibeItem));
pause(2); pause(2);
items = xmlpp.loadItems(); items = xmlpp.loadItems();
assertEquals(1,items.size()); assertEquals(1, items.size());
listItem = items.get(0); listItem = items.get(0);
assertEquals(vibeItem.getName(),listItem.getName()); assertEquals(vibeItem.getName(), listItem.getName());
// Delete the Item // Delete the Item
xmlpp.deleteItem(vibeItem); xmlpp.deleteItem(vibeItem);
......
...@@ -15,6 +15,7 @@ package org.eclipse.ice.persistence.xml; ...@@ -15,6 +15,7 @@ package org.eclipse.ice.persistence.xml;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -75,12 +76,14 @@ import org.slf4j.LoggerFactory; ...@@ -75,12 +76,14 @@ import org.slf4j.LoggerFactory;
* @author Jay Jay Billings * @author Jay Jay Billings
* *
*/ */
public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, IReader, IWriter { public class XMLPersistenceProvider
implements IPersistenceProvider, Runnable, IReader, IWriter {
/** /**
* Logger for handling event messages and other information. * Logger for handling event messages and other information.
*/ */
private static final Logger logger = LoggerFactory.getLogger(XMLPersistenceProvider.class); private static final Logger logger = LoggerFactory
.getLogger(XMLPersistenceProvider.class);
/** /**
* An atomic boolean used to manage the event loop. It is set to true when * An atomic boolean used to manage the event loop. It is set to true when
...@@ -122,7 +125,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -122,7 +125,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* The blocking queue that holds all of the persistence tasks that are left * The blocking queue that holds all of the persistence tasks that are left
* to be processed. * to be processed.
*/ */
ArrayBlockingQueue<QueuedTask> taskQueue = new ArrayBlockingQueue<QueuedTask>(1024); ArrayBlockingQueue<QueuedTask> taskQueue = new ArrayBlockingQueue<>(1024);
/** /**
* A private thread on which the event loop is run. The runnable for this * A private thread on which the event loop is run. The runnable for this
...@@ -141,14 +144,14 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -141,14 +144,14 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* with the persistence provider by calling addBuilder(). These Items are * with the persistence provider by calling addBuilder(). These Items are
* used to create the list of classes passed to the JAXBContext. * used to create the list of classes passed to the JAXBContext.
*/ */
private ArrayList<Item> referenceItems = new ArrayList<Item>(); private ArrayList<Item> referenceItems = new ArrayList<>();
/** /**
* A map of the ids of the Items that have persisted as its keys and the * A map of the ids of the Items that have persisted as its keys and the
* file names of those Items as values. This is used when loading Items off * file names of those Items as values. This is used when loading Items off
* of disk and updated when Items are persisted. * of disk and updated when Items are persisted.
*/ */
private Hashtable<Integer, String> itemIdMap = new Hashtable<Integer, String>(); private Hashtable<Integer, String> itemIdMap = new Hashtable<>();
/** /**
* The list of IJAXBClassProviders to be used in the construction of the * The list of IJAXBClassProviders to be used in the construction of the
...@@ -166,7 +169,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -166,7 +169,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* Default constructor. * Default constructor.
*/ */
public XMLPersistenceProvider() { public XMLPersistenceProvider() {
classProviders = new ArrayList<IJAXBClassProvider>(); classProviders = new ArrayList<>();
} }
/** /**
...@@ -177,7 +180,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -177,7 +180,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* The project space that should be used instead of the default. * The project space that should be used instead of the default.
*/ */
public XMLPersistenceProvider(IProject projectSpace) { public XMLPersistenceProvider(IProject projectSpace) {
classProviders = new ArrayList<IJAXBClassProvider>(); classProviders = new ArrayList<>();
project = projectSpace; project = projectSpace;
} }
...@@ -206,7 +209,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -206,7 +209,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
// Local Declarations // Local Declarations
int id; int id;
ArrayList<String> names = new ArrayList<String>(); ArrayList<String> names = new ArrayList<>();
IResource[] members; IResource[] members;
try { try {
...@@ -216,8 +219,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -216,8 +219,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
// Only add the resources that are xml files with the format // Only add the resources that are xml files with the format
// that we expect. This uses a regular expression that checks // that we expect. This uses a regular expression that checks
// for <itemName>_<itemId>.xml. // for <itemName>_<itemId>.xml.
if (resource.getType() == IResource.FILE if (resource.getType() == IResource.FILE && resource.getName()
&& resource.getName().matches("^[a-zA-Z0-9_\\-]*_\\d+\\.xml$")) { .matches("^[a-zA-Z0-9_\\-]*_\\d+\\.xml$")) {
names.add(resource.getName()); names.add(resource.getName());
} }
} }
...@@ -225,13 +228,15 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -225,13 +228,15 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
// Get the ids of all of the items from the file names and map them // Get the ids of all of the items from the file names and map them
// to the names. // to the names.
for (String name : names) { for (String name : names) {
logger.info("XMLPersistenceProvider Message: " + "Found persisted Item at " + name); logger.info("XMLPersistenceProvider Message: "
+ "Found persisted Item at " + name);
// Remove the file extension // Remove the file extension
String[] nameParts = name.split("\\."); String[] nameParts = name.split("\\.");
String nameMinusExt = nameParts[0]; String nameMinusExt = nameParts[0];
// Get the id from the end // Get the id from the end
String[] nameMinusExtParts = nameMinusExt.split("_"); String[] nameMinusExtParts = nameMinusExt.split("_");
String idString = nameMinusExtParts[nameMinusExtParts.length - 1]; String idString = nameMinusExtParts[nameMinusExtParts.length
- 1];
id = Integer.valueOf(idString); id = Integer.valueOf(idString);
// Put the info in the map // Put the info in the map
itemIdMap.put(id, name); itemIdMap.put(id, name);
...@@ -252,20 +257,28 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -252,20 +257,28 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* @throws JAXBException * @throws JAXBException
* An exception indicating that the JAXB Context could not be * An exception indicating that the JAXB Context could not be
* created. * created.
* @throws CoreException
*/ */
private void createJAXBContext() throws JAXBException { private void createJAXBContext() throws JAXBException, CoreException {
// Make an array to store the class list of registered Items // Make an array to store the class list of registered Items
ArrayList<Class> classList = new ArrayList<Class>(); ArrayList<Class> classList = new ArrayList<>();
Class[] classArray = {}; Class[] classArray = {};
// Create the list of classes for the JAXBContext // Create the list of classes for the JAXBContext
for (Item refItem : referenceItems) { for (Item refItem : referenceItems) {
classList.add(refItem.getClass()); classList.add(refItem.getClass());
} }
// We need to explicitly add some classes to the list so that they will
// be handled appropriately. For example, Material does not have a // Pull any class providers registered through extension points and add
// component so it will not get added to the class list when the Form is // them to the list.
// read from all of the Items above. IJAXBClassProvider[] extensionProviders = IJAXBClassProvider
// classList.add(Material.class); .getJAXBProviders();
if (extensionProviders != null && extensionProviders.length > 0) {
classProviders.addAll(Arrays.asList(extensionProviders));
logger.debug("Providers found at IJAXBClassProvider "
+ "extension point.");
} else {
logger.debug("No extensions found for IJAXBClassProviders.");
}
// Now add all Classes provided by the registered // Now add all Classes provided by the registered
// IJAXBClassProviders if they are available. // IJAXBClassProviders if they are available.
...@@ -273,6 +286,9 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -273,6 +286,9 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
for (IJAXBClassProvider provider : classProviders) { for (IJAXBClassProvider provider : classProviders) {
classList.addAll(provider.getClasses()); classList.addAll(provider.getClasses());
} }
} else {
logger.debug("No IJAXBClassProvider instances found! "
+ "Persistence will be disabled.");
} }
// Create new JAXB class context and unmarshaller // Create new JAXB class context and unmarshaller
...@@ -287,8 +303,9 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -287,8 +303,9 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* @throws JAXBException * @throws JAXBException
* An exception indicating that the JAXB Context could not be * An exception indicating that the JAXB Context could not be
* created. * created.
* @throws CoreException
*/ */
public void start() throws JAXBException { public void start() throws JAXBException, CoreException {
// Debug information // Debug information
logger.info("XMLPersistenceProvider Message: " + "Starting Provider!"); logger.info("XMLPersistenceProvider Message: " + "Starting Provider!");
...@@ -361,7 +378,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -361,7 +378,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
*/ */
public void addBuilder(ItemBuilder builder) { public void addBuilder(ItemBuilder builder) {
logger.info("XMLPersistenceProvider Message: " + "Item " + builder.getItemName() + " registered."); logger.info("XMLPersistenceProvider Message: " + "Item "
+ builder.getItemName() + " registered.");
// Build an Item from this builder and store it so that we can get its // Build an Item from this builder and store it so that we can get its
// class info later. // class info later.
...@@ -389,12 +407,14 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -389,12 +407,14 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
Marshaller marshaller; Marshaller marshaller;
try { try {
marshaller = context.createMarshaller(); marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
Boolean.TRUE);
marshaller.marshal(obj, outputStream); marshaller.marshal(obj, outputStream);
} catch (JAXBException e) { } catch (JAXBException e) {
// Complain // Complain
logger.error(getClass().getName() + " Exception!", e); logger.error(getClass().getName() + " Exception!", e);
logger.info("XMLPersistenceProvider Message: " + "Failed to execute persistence task for " + obj); logger.info("XMLPersistenceProvider Message: "
+ "Failed to execute persistence task for " + obj);
} }
return outputStream; return outputStream;
} }
...@@ -411,7 +431,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -411,7 +431,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
// Create an output stream containing the XML. // Create an output stream containing the XML.
ByteArrayOutputStream outputStream = createXMLStream(obj); ByteArrayOutputStream outputStream = createXMLStream(obj);
// Convert it to an input stream so it can be pushed to file // Convert it to an input stream so it can be pushed to file
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray()); ByteArrayInputStream inputStream = new ByteArrayInputStream(
outputStream.toByteArray());
try { try {
// Update the output file if it already exists // Update the output file if it already exists
if (file.exists()) { if (file.exists()) {
...@@ -443,9 +464,11 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -443,9 +464,11 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
// Handle the task if it is available // Handle the task if it is available
if (currentTask != null) { if (currentTask != null) {
// Get the file name if this is a persist or delete // Get the file name if this is a persist or delete
if ("persist".equals(currentTask.task) || "delete".equals(currentTask.task)) { if ("persist".equals(currentTask.task)
|| "delete".equals(currentTask.task)) {
// Setup the file name // Setup the file name
name = currentTask.item.getName().replaceAll("\\s+", "_") + ".xml"; name = currentTask.item.getName().replaceAll("\\s+", "_")
+ ".xml";
// Get the file from the project registered with the Item. // Get the file from the project registered with the Item.
// This may change depending on whether or not this Item was // This may change depending on whether or not this Item was
// created in the default project. // created in the default project.
...@@ -476,16 +499,20 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -476,16 +499,20 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
} else if ("rename".equals(currentTask.task)) { } else if ("rename".equals(currentTask.task)) {
String oldFile = itemIdMap.get(currentTask.item.getId()); String oldFile = itemIdMap.get(currentTask.item.getId());
if (oldFile != null) { if (oldFile != null) {
itemIdMap.put(currentTask.item.getId(), currentTask.file.getName()); itemIdMap.put(currentTask.item.getId(),
currentTask.file.getName());
// Sleep for a bit to let the platform delete if it wants // Sleep for a bit to let the platform delete if it
// wants
Thread.currentThread(); Thread.currentThread();
Thread.sleep(1000); Thread.sleep(1000);
IProject project = currentTask.item.getProject(); IProject project = currentTask.item.getProject();
IFile oldFileHandle = project.getFile(oldFile); IFile oldFileHandle = project.getFile(oldFile);
if (oldFileHandle.exists()) { if (oldFileHandle.exists()) {
oldFileHandle.move(currentTask.file.getProjectRelativePath(), true, null); oldFileHandle.move(
currentTask.file.getProjectRelativePath(),
true, null);
} }
} }
...@@ -537,7 +564,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -537,7 +564,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
*/ */
@Override @Override
public void renameItem(Item item, String newName) { public void renameItem(Item item, String newName) {
IFile newFile = item.getProject().getFile(newName+".xml"); IFile newFile = item.getProject().getFile(newName + ".xml");
submitTask(item, "rename", item.getForm(), newFile); submitTask(item, "rename", item.getForm(), newFile);
return; return;
} }
...@@ -555,7 +582,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -555,7 +582,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
* @return True if the task was submitted, false if there was some exception * @return True if the task was submitted, false if there was some exception
* or the Item was null. * or the Item was null.
*/ */
private boolean submitTask(Item item, String taskName, Form form, IFile file) { private boolean submitTask(Item item, String taskName, Form form,
IFile file) {
// Local Declarations // Local Declarations
boolean retVal = true; boolean retVal = true;
...@@ -663,7 +691,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -663,7 +691,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
@Override @Override
public Item loadItem(IResource itemResource) { public Item loadItem(IResource itemResource) {
// If the IResource is an IFile, load it and otherwise return null. // If the IResource is an IFile, load it and otherwise return null.
return (itemResource instanceof IFile) ? loadItem((IFile) itemResource) : null; return (itemResource instanceof IFile) ? loadItem((IFile) itemResource)
: null;
} }
/** /**
...@@ -709,7 +738,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -709,7 +738,7 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
public ArrayList<Item> loadItems() { public ArrayList<Item> loadItems() {
// Local Declarations // Local Declarations
ArrayList<Item> items = new ArrayList<Item>(); ArrayList<Item> items = new ArrayList<>();
Set<Integer> keys = itemIdMap.keySet(); Set<Integer> keys = itemIdMap.keySet();
Item item = null; Item item = null;
...@@ -745,7 +774,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -745,7 +774,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
public void replace(IFile file, String regex, String value) { public void replace(IFile file, String regex, String value) {
try { try {
throw new OperationNotSupportedException( throw new OperationNotSupportedException(
"XMLPersistenceProvider Error: " + "IWriter.replace() is not supported."); "XMLPersistenceProvider Error: "
+ "IWriter.replace() is not supported.");
} catch (OperationNotSupportedException e) { } catch (OperationNotSupportedException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
logger.error(getClass().getName() + " Exception!", e); logger.error(getClass().getName() + " Exception!", e);
...@@ -798,7 +828,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I ...@@ -798,7 +828,8 @@ public class XMLPersistenceProvider implements IPersistenceProvider, Runnable, I
public ArrayList<IEntry> findAll(IFile file, String regex) { public ArrayList<IEntry> findAll(IFile file, String regex) {
try { try {
throw new OperationNotSupportedException( throw new OperationNotSupportedException(
"XMLPersistenceProvider Error: " + "IReader.findAll() is not supported."); "XMLPers