Author: mdryakhlenkov
Date: 2007-09-05 10:51:01 -0400 (Wed, 05 Sep 2007)
New Revision: 3460
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/DiagramEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/AddOrmNatureAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/HBMViewerFilter.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/OrmContentProvider.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/ViewsAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/generateDDL/GenerateDDLPage1.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage3.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage7.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/NamedQueryEditorPage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/QueryResultContentProvider.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizard.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizardPage2.java
Log:
JBIDE-882: Clean out hibernate plugins code
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/DiagramEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/DiagramEditPart.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/DiagramEditPart.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -39,6 +39,7 @@
import org.eclipse.gef.requests.CreateRequest;
import org.jboss.tools.hibernate.core.IDatabaseTable;
import org.jboss.tools.hibernate.core.IPersistentClass;
+import org.jboss.tools.hibernate.veditor.VizualEditorPlugin;
import org.jboss.tools.hibernate.veditor.editors.VizualEditor;
import org.jboss.tools.hibernate.veditor.editors.command.ShapeSetConstraintCommand;
import org.jboss.tools.hibernate.veditor.editors.model.ModelElement;
@@ -95,7 +96,9 @@
if(xy.length>1)
try {
ormShape.setLocation(new
Point(Integer.parseInt(xy[0]),Integer.parseInt(xy[1])));
- } catch (NumberFormatException e) {}
+ } catch (NumberFormatException e) {
+ VizualEditorPlugin.getPluginLog().logError(e.getMessage(),e);
+ }
if(xy.length>2)
if((new Boolean(xy[2])).booleanValue())
ormShape.refreshHiden();
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/AddOrmNatureAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/AddOrmNatureAction.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/AddOrmNatureAction.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -240,8 +240,7 @@
} catch (InvocationTargetException e1) {
ViewPlugin.getPluginLog().logError("PersistentClasses was not
created!",e1);
} catch (InterruptedException e1) {
- //TODO (tau-tau) for Exception
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
if ( ormMapping == null) return false;
@@ -305,8 +304,7 @@
} catch (InvocationTargetException e1) {
ViewPlugin.getPluginLog().logError("Error in order to add Orm Nature",e1);
} catch (InterruptedException e1) {
- //TODO (tau-tau) for Exception
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
return true;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/HBMViewerFilter.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/HBMViewerFilter.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/HBMViewerFilter.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -27,6 +27,7 @@
import org.eclipse.jface.viewers.ViewerFilter;
import org.jboss.tools.hibernate.core.IMappingStorage;
import org.jboss.tools.hibernate.core.exception.ExceptionHandler;
+import org.jboss.tools.hibernate.view.ViewPlugin;
/**
@@ -71,7 +72,7 @@
fSrc.add(pfr[i].getPath().toString());
}
} catch (CoreException e) {
- ExceptionHandler.logThrowableError(e, null);
+ ViewPlugin.getPluginLog().logError(e);
}
}
@@ -93,7 +94,7 @@
}
}
} catch (CoreException e) {
- ExceptionHandler.logThrowableError(e, null);
+ ViewPlugin.getPluginLog().logError(e);
}
return added;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/OrmContentProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/OrmContentProvider.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/OrmContentProvider.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -556,7 +556,7 @@
}
}
} catch (CoreException e) {
- ExceptionHandler.logThrowableError(e, "projectChanged");
+ ViewPlugin.getPluginLog().logError(e);
}
}
return flag;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/ViewsAction.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/ViewsAction.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/view/views/ViewsAction.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -299,7 +299,7 @@
try {
ViewPlugin.getDefault().getWorkbench().showPerspective("org.hibernate.eclipse.console.HibernateConsolePerspective",ViewPlugin.getActiveWorkbenchWindow());
} catch (WorkbenchException e) {
- ExceptionHandler.logThrowableWarning(e,"Show Hibernate
Console");
+ ViewPlugin.getPluginLog().logError("Show Hibernate Console", e);
}
}
};
@@ -356,7 +356,7 @@
try {
project.getProject().getWorkspace().run(runnable, new
NullProgressMonitor());
} catch (CoreException e) {
- ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),null,
"Error in Edit Field Mapping.");
+ ViewPlugin.getPluginLog().logError("Error in Edit Field
Mapping.", e);
}
// add tau 09.11.2005
@@ -415,7 +415,7 @@
try {
project.getProject().getWorkspace().run(runnable, new
NullProgressMonitor());
} catch (CoreException e) {
- ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),null,
"Error in New Field Mapping.");
+ ViewPlugin.getPluginLog().logError("Error in New Field
Mapping.", e);
}
// add tau 09.11.2005
@@ -1422,7 +1422,7 @@
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),packageAutoMappingAction.getText(),
"Error in package Auto Mapping Action.");
} catch (InterruptedException e1) {
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
}
};
@@ -1530,7 +1530,7 @@
refreshMappingSchemaMappingAction.getText(),
"Error in Refresh Mapping.");
} catch (InterruptedException e1) {
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
}
};
@@ -1662,7 +1662,7 @@
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),null, "Error in Reload
Mapping");
} catch (InterruptedException e1) {
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
}
};
@@ -1722,7 +1722,7 @@
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),null, "Error in
Refresh Project.");
} catch (InterruptedException e1) {
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
}
};
@@ -1990,7 +1990,7 @@
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e,ViewPlugin.getActiveWorkbenchShell(),null, "Error in remove
hibernate configuration action.");
} catch (InterruptedException e1) {
- // Cancelled.
+ ViewPlugin.getPluginLog().logError(e1);
}
}
};
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/generateDDL/GenerateDDLPage1.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/generateDDL/GenerateDDLPage1.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/generateDDL/GenerateDDLPage1.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -251,7 +251,7 @@
try {
generator = new HibernateDDLGenerator();
} catch (NoClassDefFoundError e) {
-
+ ViewPlugin.getPluginLog().logError(e);
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage3.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage3.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage3.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -47,6 +47,7 @@
import org.jboss.tools.hibernate.internal.core.hibernate.ComponentMapping;
import org.jboss.tools.hibernate.internal.core.hibernate.PropertyMapping;
import org.jboss.tools.hibernate.internal.core.hibernate.SimpleValueMapping;
+import org.jboss.tools.hibernate.view.ViewPlugin;
/**
@@ -590,7 +591,7 @@
try {
dlg.open();
} catch (IllegalArgumentException e) {
- //TODO (tau-tau) for Exception
+ ViewPlugin.getPluginLog().logError(e);
}
// #changed#
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage7.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage7.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/mappingwizard/MappingWizardPage7.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -407,7 +407,6 @@
((HibernateAutoMapping)mod.getAutoMappingService()).createVersionMapping((ClassMapping)mapping,(HibernateConfiguration)mod.getConfiguration(),SelectedField);
} catch (CoreException e) {
ExceptionHandler.handle(e, getShell(), null, null);
- e.printStackTrace();
}
if (!isCreateField.getSelection())
{
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/NamedQueryEditorPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/NamedQueryEditorPage.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/NamedQueryEditorPage.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -69,6 +69,7 @@
import org.jboss.tools.hibernate.internal.core.properties.ListPropertyDescriptor;
import org.jboss.tools.hibernate.internal.core.properties.PropertyDescriptorsHolder;
import org.jboss.tools.hibernate.internal.core.properties.QLConfiguration;
+import org.jboss.tools.hibernate.view.ViewPlugin;
import org.jboss.tools.hibernate.wizard.classloader.DefaultClassLoaderFactory;
import
org.jboss.tools.hibernate.wizard.hibernateconnection.HibernateConnectionWizardPage2;
@@ -694,7 +695,9 @@
if (session.isConnected()) {
try {
session.disconnect();
- } catch(HibernateException e) {}
+ } catch(HibernateException e) {
+ ViewPlugin.getPluginLog().logError(e);
+ }
}
if (session.isOpen()) {
session.close();
@@ -707,7 +710,7 @@
connection=null;
}
} catch (SQLException e) {
- //TODO (tau-tau) for Exception
+ ViewPlugin.getPluginLog().logError(e);
}
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/QueryResultContentProvider.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/QueryResultContentProvider.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/queries/QueryResultContentProvider.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -28,6 +28,7 @@
import org.jboss.tools.hibernate.internal.core.PersistentField;
import org.jboss.tools.hibernate.internal.core.hibernate.PersistableProperty;
import org.jboss.tools.hibernate.internal.core.util.*;
+import org.jboss.tools.hibernate.view.ViewPlugin;
/**
* @author yan
@@ -274,14 +275,14 @@
if (!field.isAccessible()) field.setAccessible(true);
return field.get(src);
} catch (Exception e) {
- //TODO (tau-tau) for Exception
+ ViewPlugin.getPluginLog().logError(e);
}
try {
Method
method=src.getClass().getDeclaredMethod("get"+name.substring(0,1).toUpperCase()+name.substring(1),new
Class[0]);
if (!method.isAccessible()) method.setAccessible(true);
return method.invoke(src,(Object[])null);
} catch (Exception e) {
- //TODO (tau-tau) for Exception
+ ViewPlugin.getPluginLog().logError(e);
}
throw new NoSuchFieldException(name);
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizard.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizard.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizard.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -160,19 +160,16 @@
try {
doFinish( monitor);
} catch (Exception e) {
- //TODO (tau-tau) for Exception
- e.printStackTrace();
+ ViewPlugin.getPluginLog().logError(e);
}
monitor.done();
}};
try {
getContainer().run(true, false, op);
} catch (InvocationTargetException e) {
- //TODO (tau-tau) for Exception
- e.printStackTrace();
+ ViewPlugin.getPluginLog().logError(e);
} catch (InterruptedException e) {
- //TODO (tau-tau) for Exception
- e.printStackTrace();
+ ViewPlugin.getPluginLog().logError(e);
}
return true;
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizardPage2.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizardPage2.java 2007-09-05
14:00:02 UTC (rev 3459)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.view/src/org/jboss/tools/hibernate/wizard/tablesclasses/TablesClassesWizardPage2.java 2007-09-05
14:51:01 UTC (rev 3460)
@@ -45,6 +45,7 @@
import org.jboss.tools.hibernate.core.exception.ExceptionHandler;
import org.jboss.tools.hibernate.dialog.AutoMappingSetting;
import org.jboss.tools.hibernate.dialog.xpl.CreatePackageDialog;
+import org.jboss.tools.hibernate.view.ViewPlugin;
/**
@@ -359,7 +360,7 @@
}
}
} catch (JavaModelException ex) {
- //TODO (tau-tau) for Exception
+ ViewPlugin.getPluginLog().logError(ex);
}
return result;
}