6d90b1
From 227d95901c455a76adf1b4ced3bee85100a3cab8 Mon Sep 17 00:00:00 2001
6d90b1
From: Poruri Sai Rahul <rporuri@enthought.com>
6d90b1
Date: Sun, 3 Feb 2019 14:06:17 +0530
6d90b1
Subject: [PATCH] FIX : update broken imports and usage
6d90b1
6d90b1
	modified:   envisage/developer/charm/charm.py
6d90b1
	modified:   envisage/developer/ui/view/plugin_browser.py
6d90b1
	modified:   envisage/ui/single_project/view/project_view.py
6d90b1
---
6d90b1
 envisage/developer/charm/charm.py               | 2 +-
6d90b1
 envisage/developer/ui/view/plugin_browser.py    | 6 +++---
6d90b1
 envisage/ui/single_project/view/project_view.py | 3 +--
6d90b1
 3 files changed, 5 insertions(+), 6 deletions(-)
6d90b1
6d90b1
diff --git a/envisage/developer/charm/charm.py b/envisage/developer/charm/charm.py
6d90b1
index 174f62f..d943c57 100644
6d90b1
--- a/envisage/developer/charm/charm.py
6d90b1
+++ b/envisage/developer/charm/charm.py
6d90b1
@@ -2,7 +2,7 @@
6d90b1
 
6d90b1
 
6d90b1
 # Enthought library imports.
6d90b1
-from envisage.developer.api import CodeBrowser, Module
6d90b1
+from envisage.developer.code_browser.api import CodeBrowser, Module
6d90b1
 from traits.api import Event, HasTraits, Instance, Str
6d90b1
 
6d90b1
 
6d90b1
diff --git a/envisage/developer/ui/view/plugin_browser.py b/envisage/developer/ui/view/plugin_browser.py
6d90b1
index 671b0cf..1589263 100644
6d90b1
--- a/envisage/developer/ui/view/plugin_browser.py
6d90b1
+++ b/envisage/developer/ui/view/plugin_browser.py
6d90b1
@@ -2,13 +2,13 @@
6d90b1
 
6d90b1
 
6d90b1
 # Enthought library imports.
6d90b1
-from envisage.api import ExtensionPoint, IPlugin
6d90b1
+from envisage.api import ExtensionPoint, IApplication, IExtensionPoint, IPlugin
6d90b1
 from traits.api import Delegate, HasTraits, Instance, List, Property
6d90b1
 from traits.api import Code, Str
6d90b1
 from traitsui.api import Item, TableEditor, View, VGroup
6d90b1
 from traitsui.table_column import ObjectColumn # fixme: non-api!
6d90b1
 
6d90b1
-class ExtensionPointModel(Hastraits):
6d90b1
+class ExtensionPointModel(HasTraits):
6d90b1
     """ A model for browsing an extension point. """
6d90b1
 
6d90b1
     # The plugin that offered the extension point.
6d90b1
@@ -21,7 +21,7 @@ class ExtensionPointModel(Hastraits):
6d90b1
 
6d90b1
 
6d90b1
 
6d90b1
-class ExtensionModel(Hastraits):
6d90b1
+class ExtensionModel(HasTraits):
6d90b1
     """ A model for browsing a contribution to an extension point. """
6d90b1
 
6d90b1
     # The plugin that made the contribution.
6d90b1
diff --git a/envisage/ui/single_project/view/project_view.py b/envisage/ui/single_project/view/project_view.py
6d90b1
index 5aed419..0e93a34 100644
6d90b1
--- a/envisage/ui/single_project/view/project_view.py
6d90b1
+++ b/envisage/ui/single_project/view/project_view.py
6d90b1
@@ -12,7 +12,6 @@
6d90b1
 
6d90b1
 # Standard library imports.
6d90b1
 import logging
6d90b1
-from string import rfind
6d90b1
 
6d90b1
 # Enthought library imports
6d90b1
 from apptools.naming.api import Binding
6d90b1
@@ -262,7 +261,7 @@ def _name_suffix_changed(self, old, new):
6d90b1
         # on the new suffix, if any.
6d90b1
         name = self.name
6d90b1
         if old is not None and len(old) > 0:
6d90b1
-            index = rfind(name, " " + old)
6d90b1
+            index = (" " + old).rfind(name)
6d90b1
             if index > -1:
6d90b1
                 name = name[0:index]
6d90b1
         if new is not None and len(new) > 0: