Author: dgeraskov
Date: 2008-04-08 05:29:15 -0400 (Tue, 08 Apr 2008)
New Revision: 7397
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1839
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2008-04-08
09:09:03 UTC (rev 7396)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2008-04-08
09:29:15 UTC (rev 7397)
@@ -63,7 +63,7 @@
*/
public class KnownConfigurationsView extends ViewPart {
- public static final String ID =
"org.hibernate.eclipse.console.views.KnownConfigurationsView";
+ public static final String ID =
"org.hibernate.eclipse.console.views.KnownConfigurationsView"; //$NON-NLS-1$
TreeViewer viewer;
@@ -110,7 +110,7 @@
private void createContextMenu ()
{
- MenuManager menuMgr = new MenuManager("#PopupMenu");
+ MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
@@ -162,13 +162,13 @@
}
} else if (selection instanceof TreeSelection){
TreePath path = ((TreeSelection)selection).getPaths()[0];
- Object first = path.getFirstSegment();
+ Object last = path.getLastSegment();
ConsoleConfiguration consoleConfiguration =
(ConsoleConfiguration)(path.getSegment(0));
- if (first instanceof PersistentClass || first.getClass() == Property.class){
+ if (last instanceof PersistentClass || last.getClass() == Property.class){
try {
OpenMappingAction.run(path, consoleConfiguration);
} catch (Exception e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("Can't find mapping
file.", e);
+ HibernateConsolePlugin.getDefault().logErrorMessage("Can't find mapping
file.", e); //$NON-NLS-1$
}
}
}