Blob Blame Raw
From 227d95901c455a76adf1b4ced3bee85100a3cab8 Mon Sep 17 00:00:00 2001
From: Poruri Sai Rahul <rporuri@enthought.com>
Date: Sun, 3 Feb 2019 14:06:17 +0530
Subject: [PATCH] FIX : update broken imports and usage

	modified:   envisage/developer/charm/charm.py
	modified:   envisage/developer/ui/view/plugin_browser.py
	modified:   envisage/ui/single_project/view/project_view.py
---
 envisage/developer/charm/charm.py               | 2 +-
 envisage/developer/ui/view/plugin_browser.py    | 6 +++---
 envisage/ui/single_project/view/project_view.py | 3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/envisage/developer/charm/charm.py b/envisage/developer/charm/charm.py
index 174f62f..d943c57 100644
--- a/envisage/developer/charm/charm.py
+++ b/envisage/developer/charm/charm.py
@@ -2,7 +2,7 @@
 
 
 # Enthought library imports.
-from envisage.developer.api import CodeBrowser, Module
+from envisage.developer.code_browser.api import CodeBrowser, Module
 from traits.api import Event, HasTraits, Instance, Str
 
 
diff --git a/envisage/developer/ui/view/plugin_browser.py b/envisage/developer/ui/view/plugin_browser.py
index 671b0cf..1589263 100644
--- a/envisage/developer/ui/view/plugin_browser.py
+++ b/envisage/developer/ui/view/plugin_browser.py
@@ -2,13 +2,13 @@
 
 
 # Enthought library imports.
-from envisage.api import ExtensionPoint, IPlugin
+from envisage.api import ExtensionPoint, IApplication, IExtensionPoint, IPlugin
 from traits.api import Delegate, HasTraits, Instance, List, Property
 from traits.api import Code, Str
 from traitsui.api import Item, TableEditor, View, VGroup
 from traitsui.table_column import ObjectColumn # fixme: non-api!
 
-class ExtensionPointModel(Hastraits):
+class ExtensionPointModel(HasTraits):
     """ A model for browsing an extension point. """
 
     # The plugin that offered the extension point.
@@ -21,7 +21,7 @@ class ExtensionPointModel(Hastraits):
 
 
 
-class ExtensionModel(Hastraits):
+class ExtensionModel(HasTraits):
     """ A model for browsing a contribution to an extension point. """
 
     # The plugin that made the contribution.
diff --git a/envisage/ui/single_project/view/project_view.py b/envisage/ui/single_project/view/project_view.py
index 5aed419..0e93a34 100644
--- a/envisage/ui/single_project/view/project_view.py
+++ b/envisage/ui/single_project/view/project_view.py
@@ -12,7 +12,6 @@
 
 # Standard library imports.
 import logging
-from string import rfind
 
 # Enthought library imports
 from apptools.naming.api import Binding
@@ -262,7 +261,7 @@ def _name_suffix_changed(self, old, new):
         # on the new suffix, if any.
         name = self.name
         if old is not None and len(old) > 0:
-            index = rfind(name, " " + old)
+            index = (" " + old).rfind(name)
             if index > -1:
                 name = name[0:index]
         if new is not None and len(new) > 0: