Author: bobtarling Date: 2010-05-03 14:17:15-0700 New Revision: 18360 Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java
Log: Remove deprecated and redundant code Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java?view=diff&pathrev=18360&r1=18359&r2=18360 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java 2010-05-03 14:17:15-0700 @@ -83,8 +83,6 @@ */ private static final Logger LOG = Logger.getLogger(TabProps.class); - private static boolean cachePanels = false; - private JPanel blankPanel = new JPanel(); private Hashtable<Class, JPanel> panels = new Hashtable<Class, JPanel>(); @@ -99,11 +97,6 @@ private Object target; /** - * @deprecated this is only temporary for dev phase of 0.29 - */ - public static boolean replace = true; - - /** * The list with targetlisteners, these are the property panels * managed by TabProps. * It should only contain one listener at a time. @@ -262,26 +255,7 @@ private JPanel findPanelFor(Object trgt) { // TODO: No test coverage for this or createPropPanel? - tfm - /* 1st attempt: get a panel that we created before: */ - JPanel panel; - if (cachePanels) { - // TODO: Once XML Property panels are live we should no longer be - // caching panels, this code and the panels HashTable can go. - panel = panels.get(trgt.getClass()); - if (panel != null) { - if (LOG.isDebugEnabled()) { - LOG.debug("Getting prop panel for: " - + trgt.getClass().getName() - + ", " + "found (in cache?) " + panel); - } - return panel; - } - } - - /* 2nd attempt: If we didn't find the panel then - * use the factory to create a new one - */ - panel = createPropPanel(trgt); + JPanel panel = createPropPanel(trgt); if (panel != null) { LOG.debug("Factory created " + panel.getClass().getName() + " for " + trgt.getClass().getName()); @@ -455,15 +429,4 @@ } } } - - /** - * This method is introduced as deprecated it should be removed from the - * code before release 0.30. It is currently used by the - * XML Property Panel module only and should not be used elsewhere. - */ - @Deprecated - public static void disableCache() { - cachePanels = false; - } - } /* end class TabProps */ ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2602114 To unsubscribe from this discussion, e-mail: [[email protected]].
