diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.cpp b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.cpp index e0f3cb03d3..d343c8ec35 100755 --- a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.cpp @@ -1,56 +1,61 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "berryQtIconImageDescriptor.h" #include namespace berry { QtIconImageDescriptor::QtIconImageDescriptor(void* img) : icon(static_cast(img)) { } +QtIconImageDescriptor::~QtIconImageDescriptor() +{ + delete icon; +} + void* QtIconImageDescriptor::CreateImage(bool returnMissingImageOnError) { - if (icon) return icon; + if (icon) return new QIcon(*icon); if (returnMissingImageOnError) return GetMissingImageDescriptor()->CreateImage(); return 0; } void QtIconImageDescriptor::DestroyImage(void* img) { QIcon* i = static_cast(img); delete i; } bool QtIconImageDescriptor::operator ==(const Object* o) const { if (const QtIconImageDescriptor* obj = dynamic_cast(o)) { return this->icon == obj->icon; } return false; } } diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.h b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.h index 9afe1a7db5..bbd9a00325 100755 --- a/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.h +++ b/BlueBerry/Bundles/org.blueberry.ui.qt/src/internal/berryQtIconImageDescriptor.h @@ -1,49 +1,50 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef BERRYQTICONIMAGEDESCRIPTOR_H_ #define BERRYQTICONIMAGEDESCRIPTOR_H_ #include class QIcon; namespace berry { class QtIconImageDescriptor : public ImageDescriptor { private: QIcon* icon; public: QtIconImageDescriptor(void* img); + ~QtIconImageDescriptor(); virtual void* CreateImage(bool returnMissingImageOnError = true); virtual void DestroyImage(void* img); virtual bool operator==(const Object* o) const; }; } #endif /* BERRYQTICONIMAGEDESCRIPTOR_H_ */ diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryAbstractUICTKPlugin.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryAbstractUICTKPlugin.cpp index 1226eada36..7b9fdf8870 100644 --- a/BlueBerry/Bundles/org.blueberry.ui/src/berryAbstractUICTKPlugin.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryAbstractUICTKPlugin.cpp @@ -1,253 +1,265 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "berryAbstractUICTKPlugin.h" #include "internal/berryBundleUtility.h" +#include "internal/berryWorkbenchPlugin.h" + #include "berryImageDescriptor.h" #include "berryPlatformUI.h" +#include +#include + namespace berry { const std::string AbstractUICTKPlugin::FN_DIALOG_SETTINGS = "dialog_settings.xml"; AbstractUICTKPlugin::AbstractUICTKPlugin() { } // IDialogSettings getDialogSettings() { // if (dialogSettings == null) { // loadDialogSettings(); // } // return dialogSettings; // } // ImageRegistry getImageRegistry() { // if (imageRegistry == null) { // imageRegistry = createImageRegistry(); // initializeImageRegistry(imageRegistry); // } // return imageRegistry; // } IPreferencesService::Pointer AbstractUICTKPlugin::GetPreferencesService() { // Create the preference store lazily. if (preferencesService == 0) { preferencesService = Platform::GetServiceRegistry().GetServiceById< IPreferencesService> (IPreferencesService::ID); } return preferencesService; } IWorkbench* AbstractUICTKPlugin::GetWorkbench() { return PlatformUI::GetWorkbench(); } // ImageRegistry createImageRegistry() // { // // //If we are in the UI Thread use that // if (Display.getCurrent() != null) // { // return new ImageRegistry(Display.getCurrent()); // } // // if (PlatformUI.isWorkbenchRunning()) // { // return new ImageRegistry(PlatformUI.getWorkbench().getDisplay()); // } // // //Invalid thread access if it is not the UI Thread // //and the workbench is not created. // throw new SWTError(SWT.ERROR_THREAD_INVALID_ACCESS); // } // void initializeImageRegistry(ImageRegistry reg) { // // spec'ed to do nothing // } // void loadDialogSettings() { // dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$ // // // bug 69387: The instance area should not be created (in the call to // // #getStateLocation) if -data @none or -data @noDefault was used // IPath dataLocation = getStateLocationOrNull(); // if (dataLocation != null) { // // try r/w state area in the local file system // String readWritePath = dataLocation.append(FN_DIALOG_SETTINGS) // .toOSString(); // File settingsFile = new File(readWritePath); // if (settingsFile.exists()) { // try { // dialogSettings.load(readWritePath); // } catch (IOException e) { // // load failed so ensure we have an empty settings // dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$ // } // // return; // } // } // // // otherwise look for bundle specific dialog settings // URL dsURL = BundleUtility.find(getBundle(), FN_DIALOG_SETTINGS); // if (dsURL == null) { // return; // } // // InputStream is = null; // try { // is = dsURL.openStream(); // BufferedReader reader = new BufferedReader( // new InputStreamReader(is, "utf-8")); //$NON-NLS-1$ // dialogSettings.load(reader); // } catch (IOException e) { // // load failed so ensure we have an empty settings // dialogSettings = new DialogSettings("Workbench"); //$NON-NLS-1$ // } finally { // try { // if (is != null) { // is.close(); // } // } catch (IOException e) { // // do nothing // } // } // } // void refreshPluginActions() { // // If the workbench is not started yet, or is no longer running, do nothing. // if (!PlatformUI.isWorkbenchRunning()) { // return; // } // // // startup() is not guaranteed to be called in the UI thread, // // but refreshPluginActions must run in the UI thread, // // so use asyncExec. See bug 6623 for more details. // Display.getDefault().asyncExec(new Runnable() { // public void run() { // WWinPluginAction.refreshActionList(); // } // }); // } // void saveDialogSettings() { // if (dialogSettings == null) { // return; // } // // try { // IPath path = getStateLocationOrNull(); // if(path == null) { // return; // } // String readWritePath = path // .append(FN_DIALOG_SETTINGS).toOSString(); // dialogSettings.save(readWritePath); // } catch (IOException e) { // // spec'ed to ignore problems // } catch (IllegalStateException e) { // // spec'ed to ignore problems // } // } void AbstractUICTKPlugin::start(ctkPluginContext* context) { Q_UNUSED(context) // Should only attempt refreshPluginActions() once the bundle // has been fully started. Otherwise, action delegates // can be created while in the process of creating // a triggering action delegate (if UI events are processed during startup). // Also, if the start throws an exception, the bundle will be shut down. // We don't want to have created any delegates if this happens. // See bug 63324 for more details. // bundleListener = new BundleListener() // { // public void bundleChanged(BundleEvent event) // { // if (event.getBundle() == getBundle()) // { // if (event.getType() == BundleEvent.STARTED) // { // // We're getting notified that the bundle has been started. // // Make sure it's still active. It may have been shut down between // // the time this event was queued and now. // if (getBundle().getState() == Bundle.ACTIVE) // { // refreshPluginActions(); // } // fc.removeBundleListener(this); // } // } // } // }; // context.addBundleListener(bundleListener); // bundleListener is removed in stop(BundleContext) } void AbstractUICTKPlugin::stop(ctkPluginContext* context) { Q_UNUSED(context) // try // { // if (bundleListener != null) // { // context.removeBundleListener(bundleListener); // } // saveDialogSettings(); // savePreferenceStore(); // preferenceStore = null; // if (imageRegistry != null) // imageRegistry.dispose(); // imageRegistry = null; //} } SmartPointer AbstractUICTKPlugin::ImageDescriptorFromPlugin( const std::string& pluginId, const std::string& imageFilePath) { if (pluginId.empty() || imageFilePath.empty()) { throw Poco::InvalidArgumentException(); } - // if the bundle is not ready then there is no image - IBundle::Pointer bundle = Platform::GetBundle(pluginId); - if (!BundleUtility::IsReady(bundle)) + // if the plug-in is not ready then there is no image + QSharedPointer plugin = BundleUtility::FindPlugin(QString::fromStdString(pluginId)); + if (!BundleUtility::IsReady(plugin)) { return ImageDescriptor::Pointer(0); } - return ImageDescriptor::CreateFromFile(imageFilePath, pluginId); + QByteArray imgContent = plugin->getResource(QString::fromStdString(imageFilePath)); + QImage image = QImage::fromData(imgContent); + QPixmap pixmap = QPixmap::fromImage(image); + QIcon* icon = new QIcon(pixmap); + if (icon->isNull()) + return ImageDescriptor::Pointer(0); + + return ImageDescriptor::CreateFromImage(icon); } } diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/berryWorkbenchPart.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/berryWorkbenchPart.cpp index 0cc4829509..45a007936c 100644 --- a/BlueBerry/Bundles/org.blueberry.ui/src/berryWorkbenchPart.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui/src/berryWorkbenchPart.cpp @@ -1,313 +1,321 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "berryWorkbenchPart.h" +#include "berryAbstractUIPlugin.h" #include "berryIWorkbenchPartConstants.h" #include "berryImageDescriptor.h" #include #include #include "internal/berryWorkbenchPlugin.h" #include #include namespace berry { class PropChangedRunnable : public SafeRunnable { public: berryObjectMacro(PropChangedRunnable) IPropertyChangeListener::Events::EventType::AbstractDelegate* delegate; PropChangedRunnable(PropertyChangeEvent::Pointer event) : event(event) {} void Run() { delegate->Execute(event); } private: PropertyChangeEvent::Pointer event; }; WorkbenchPart::~WorkbenchPart() { if (m_TitleImage && m_ImageDescriptor) m_ImageDescriptor->DestroyImage(m_TitleImage); } WorkbenchPart::WorkbenchPart() :m_Title(""), m_TitleImage(0), m_ToolTip(""), m_PartName(""), m_ContentDescription("") { } void WorkbenchPart::InternalSetContentDescription( const std::string& description) { //assert(description != 0) //Do not send changes if they are the same if (this->m_ContentDescription == description) { return; } this->m_ContentDescription = description; this->FirePropertyChange(IWorkbenchPartConstants::PROP_CONTENT_DESCRIPTION); } void WorkbenchPart::InternalSetPartName(const std::string& partName) { //partName = Util.safeString(partName); //assert(partName != 0); //Do not send changes if they are the same if (this->m_PartName == partName) { return; } this->m_PartName = partName; this->FirePropertyChange(IWorkbenchPartConstants::PROP_PART_NAME); } // IConfigurationElement* GetConfigurationElement() // { // return m_ConfigElement; // } // protected Image getDefaultImage() { // return PlatformUI.getWorkbench().getSharedImages().getImage( // ISharedImages.IMG_DEF_VIEW); // } void WorkbenchPart::SetSite(IWorkbenchPartSite::Pointer site) { this->CheckSite(site); this->m_PartSite = site; } void WorkbenchPart::CheckSite(IWorkbenchPartSite::Pointer /*site*/) { // do nothing } void WorkbenchPart::SetTitleImage(void* titleImage) { //assert(titleImage == 0 || !titleImage.isDisposed()); //Do not send changes if they are the same if (this->m_TitleImage == titleImage) { return; } m_ImageDescriptor->DestroyImage(m_TitleImage); this->m_TitleImage = titleImage; this->FirePropertyChange(IWorkbenchPartConstants::PROP_TITLE); if (m_ImageDescriptor) { //JFaceResources.getResources().destroyImage(imageDescriptor); m_ImageDescriptor = 0; } } void WorkbenchPart::SetTitleToolTip(const std::string& toolTip) { //toolTip = Util.safeString(toolTip); //Do not send changes if they are the same if (this->m_ToolTip == toolTip) { return; } this->m_ToolTip = toolTip; this->FirePropertyChange(IWorkbenchPartConstants::PROP_TITLE); } void WorkbenchPart::SetPartName(const std::string& partName) { InternalSetPartName(partName); //setDefaultTitle(); } void WorkbenchPart::SetContentDescription(const std::string& description) { InternalSetContentDescription(description); //setDefaultTitle(); } void WorkbenchPart::FirePropertyChanged(const std::string& key, const std::string& oldValue, const std::string& newValue) { ObjectString::Pointer objOldVal(new ObjectString(oldValue)); ObjectString::Pointer objNewVal(new ObjectString(newValue)); Object::Pointer source(this); PropertyChangeEvent::Pointer event( new PropertyChangeEvent(source, key, objOldVal, objNewVal)); typedef IPropertyChangeListener::Events::EventType::ListenerList ListenerList; PropChangedRunnable::Pointer runnable(new PropChangedRunnable(event)); const ListenerList& listeners = partChangeEvents.propertyChange.GetListeners(); for (ListenerList::const_iterator iter = listeners.begin(); iter != listeners.end(); ++iter) { runnable->delegate = *iter; SafeRunner::Run(runnable); } } void WorkbenchPart::FirePropertyChange(int propertyId) { ObjectInt::Pointer val(new ObjectInt(propertyId)); Object::Pointer source(this); PropertyChangeEvent::Pointer event( new PropertyChangeEvent(source, IWorkbenchPartConstants::INTEGER_PROPERTY, val, val)); typedef IPropertyChangeListener::Events::EventType::ListenerList ListenerList; PropChangedRunnable::Pointer runnable(new PropChangedRunnable(event)); const ListenerList& listeners = partChangeEvents.propertyChange.GetListeners(); for (ListenerList::const_iterator iter = listeners.begin(); iter != listeners.end(); ++iter) { runnable->delegate = *iter; SafeRunner::Run(runnable); } } void WorkbenchPart::AddPropertyListener(IPropertyChangeListener::Pointer l) { partChangeEvents.AddListener(l); } void WorkbenchPart::RemovePropertyListener(IPropertyChangeListener::Pointer l) { partChangeEvents.RemoveListener(l); } void WorkbenchPart::SetPartProperty(const std::string& key, const std::string& value) { std::map::iterator iter = partProperties.find( key); std::string oldValue; if (iter != partProperties.end()) oldValue = iter->second; if (value == "") { partProperties.erase(key); } else { partProperties.insert(std::make_pair(key, value)); } this->FirePropertyChanged(key, oldValue, value); } std::string WorkbenchPart::GetPartProperty(const std::string& key) const { std::map::const_iterator itr = partProperties.find(key); if (itr == partProperties.end()) return ""; return itr->second; } const std::map& WorkbenchPart::GetPartProperties() const { return partProperties; } IWorkbenchPartSite::Pointer WorkbenchPart::GetSite() const { return this->m_PartSite; } std::string WorkbenchPart::GetPartName() const { return this->m_PartName; } std::string WorkbenchPart::GetContentDescription() const { return this->m_ContentDescription; } void* WorkbenchPart::GetTitleImage() const { if (this->m_TitleImage != 0) { return this->m_TitleImage; } return 0; //return GetDefaultImage(); } std::string WorkbenchPart::GetTitleToolTip() const { return this->m_ToolTip; } void WorkbenchPart::SetInitializationData(IConfigurationElement::Pointer cfig, const std::string& /*propertyName*/, Object::Pointer /*data*/) { // Save config element. m_ConfigElement = cfig; // Part name and title. cfig->GetAttribute("name", m_PartName); m_Title = m_PartName; // Icon. std::string strIcon; cfig->GetAttribute("icon", strIcon);//$NON-NLS-1$ if (strIcon.empty()) { return; } m_ImageDescriptor = AbstractUICTKPlugin::ImageDescriptorFromPlugin( m_ConfigElement->GetContributor(), strIcon); + if (!m_ImageDescriptor) + { + // try legacy BlueBerry code + m_ImageDescriptor = AbstractUIPlugin::ImageDescriptorFromPlugin( + m_ConfigElement->GetContributor(), strIcon); + } + if (!m_ImageDescriptor) { return; } //titleImage = JFaceResources.getResources().createImageWithDefault(imageDescriptor); m_TitleImage = m_ImageDescriptor->CreateImage(); } } // namespace berry diff --git a/BlueBerry/Bundles/org.blueberry.ui/src/internal/berryViewDescriptor.cpp b/BlueBerry/Bundles/org.blueberry.ui/src/internal/berryViewDescriptor.cpp index 9d3c6b4f80..812541c67a 100644 --- a/BlueBerry/Bundles/org.blueberry.ui/src/internal/berryViewDescriptor.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui/src/internal/berryViewDescriptor.cpp @@ -1,206 +1,214 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "berryViewDescriptor.h" #include "service/berryIConfigurationElement.h" #include "berryPlatformException.h" #include "berryRegistryReader.h" #include "berryWorkbenchRegistryConstants.h" #include "../berryImageDescriptor.h" #include "../berryAbstractUIPlugin.h" +#include "../berryAbstractUICTKPlugin.h" #include "../berryImageDescriptor.h" #include "../handlers/berryIHandlerActivation.h" #include #include namespace berry { ViewDescriptor::ViewDescriptor(IConfigurationElement::Pointer e) : configElement(e) { this->LoadFromExtension(); } IViewPart::Pointer ViewDescriptor::CreateView() { IViewPart::Pointer part(configElement->CreateExecutableExtension ( WorkbenchRegistryConstants::ATT_CLASS)); if (part.IsNull()) { // support legacy BlueBerry extensions part = configElement->CreateExecutableExtension ( WorkbenchRegistryConstants::ATT_CLASS, IViewPart::GetManifestName()); } return part; } const std::vector& ViewDescriptor::GetCategoryPath() const { return categoryPath; } IConfigurationElement::Pointer ViewDescriptor::GetConfigurationElement() const { return configElement; } std::string ViewDescriptor::GetDescription() const { return RegistryReader::GetDescription(configElement); } std::string ViewDescriptor::GetId() const { return id; } bool ViewDescriptor::operator==(const Object* o) const { if (const IViewDescriptor* other = dynamic_cast(o)) return this->GetId() == other->GetId(); return false; } ImageDescriptor::Pointer ViewDescriptor::GetImageDescriptor() const { if (imageDescriptor) { return imageDescriptor; } std::string iconName; configElement->GetAttribute(WorkbenchRegistryConstants::ATT_ICON, iconName); // If the icon attribute was omitted, use the default one if (iconName.empty()) { //TODO default image descriptor //return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_DEF_VIEW); return ImageDescriptor::GetMissingImageDescriptor(); } const IExtension* extension(configElement->GetDeclaringExtension()); const std::string extendingPluginId(extension->GetNamespace()); - imageDescriptor = AbstractUIPlugin::ImageDescriptorFromPlugin( + imageDescriptor = AbstractUICTKPlugin::ImageDescriptorFromPlugin( extendingPluginId, iconName); + if (!imageDescriptor) + { + // Try legacy BlueBerry method + imageDescriptor = AbstractUIPlugin::ImageDescriptorFromPlugin( + extendingPluginId, iconName); + } + // If the icon attribute was invalid, use the error icon if (!imageDescriptor) { imageDescriptor = ImageDescriptor::GetMissingImageDescriptor(); } return imageDescriptor; } std::string ViewDescriptor::GetLabel() const { std::string label; configElement->GetAttribute(WorkbenchRegistryConstants::ATT_NAME, label); return label; } std::string ViewDescriptor::GetAccelerator() const { std::string accel; configElement->GetAttribute(WorkbenchRegistryConstants::ATT_ACCELERATOR, accel); return accel; } bool ViewDescriptor::GetAllowMultiple() const { bool allow = false; configElement->GetBoolAttribute(WorkbenchRegistryConstants::ATT_ALLOW_MULTIPLE, allow); return allow; } bool ViewDescriptor::IsRestorable() const { std::string string; if (configElement->GetAttribute(WorkbenchRegistryConstants::ATT_RESTORABLE, string)) { return Poco::icompare(string, "true") == 0; } else { return true; } } Poco::Any ViewDescriptor::GetAdapter(const std::string& adapter) { if (adapter == IConfigurationElement::GetStaticClassName()) { return Poco::Any(GetConfigurationElement()); } return Poco::Any(); } void ViewDescriptor::ActivateHandler() { //TODO ViewDescriptor handler activation // if (!handlerActivation) // { // IHandler::Pointer handler(new ShowViewHandler(this->GetId())); // IHandlerService::Pointer handlerService( // PlatformUI::GetWorkbench()->GetService(IHandlerService::GetManifestName()).Cast()); // handlerActivation = handlerService // ->ActivateHandler(this->GetId(), handler); // } } void ViewDescriptor::DeactivateHandler() { //TODO ViewDescriptor handler deactivation // if (handlerActivation) // { // IHandlerService::Pointer handlerService( // PlatformUI::GetWorkbench()->GetService(IHandlerService::GetManifestName()).Cast()); // handlerService->DeactivateHandler(handlerActivation); // handlerActivation = 0; // } } void ViewDescriptor::LoadFromExtension() { configElement->GetAttribute(WorkbenchRegistryConstants::ATT_ID, id); // Sanity check. std::string name; if ((configElement->GetAttribute(WorkbenchRegistryConstants::ATT_NAME, name) == false) || (RegistryReader::GetClassValue(configElement, WorkbenchRegistryConstants::ATT_CLASS) == "")) { throw CoreException( "Invalid extension (missing label or class name)", id); } std::string category; if (configElement->GetAttribute(WorkbenchRegistryConstants::TAG_CATEGORY, category)) { Poco::StringTokenizer stok(category, "/", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM); // Parse the path tokens and store them for (Poco::StringTokenizer::Iterator iter = stok.begin(); iter != stok.end(); ++iter) { categoryPath.push_back(*iter); } } } } // namespace berry