[jbosstools-dev] [Fwd: [jbosstools-commits] JBoss Tools SVN: r3757 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view: src/org/jboss/tools/hibernate/ui/view/views and 1 other directory.]
mdryahlenkov at exadel.com
mdryahlenkov at exadel.com
Mon Sep 24 11:32:49 EDT 2007
Hi Michael,
Great that you are trying to fix JBIDE-611.
Got some comments on that:
1) Any way that this could be done in the hibernate tools plugin instead
of the unrelated diagram plugin ? (I don't see you are using any
new plugins for this so should be in the core of hibernate tools imo)
+++
Yes, hibernate tools core is better place for that code but I thougth I
can't change this plugin. If I can't use the original code of core how I
can do it? Should I ask you to make some changes or can I do it myself?
+++
2) Please don't use bogus id's in our plugin.xml like: com.xyz.runXYZ, it
should be something stable and resembling the other id's.
+++
Fixed.
+++
3) This code looks like it is assuming everything are done in mapping
files and with a cfg.xml file; is that correct ? What about annotated
classes?
+++
I remember comment in jira about it. I work with this point now.
+++
4) you have copied a large chunk of code from hibernate tools plugin to
locate the default project; why don't you use the existing code for that ?
+++
You speak about code
ILaunchManager launchManager =
DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType =
launchManager.getLaunchConfigurationType(
"org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType" );
ILaunchConfiguration[] launchConfigurations;
try {
launchConfigurations = launchManager.getLaunchConfigurations(
launchConfigurationType );
for (int i = 0; i < launchConfigurations.length; i++) { // can't
believe there is no look up by name API
ILaunchConfiguration launchConfiguration = launchConfigurations[i];
if(launchConfiguration.getName().equals(consoleConfiguration.getName())) {
proj =
ProjectUtils.findJavaProject(launchConfiguration.getAttribute(IConsoleConfigurationLaunchConstants.PROJECT_NAME,
""));
}
}
} catch (CoreException e1) {
ViewPlugin.getDefault().logError("Can't find java project.", e1);
}
in OpenMappingActionDelegate class. Is that correct?
+++
/max
More information about the jbosstools-dev
mailing list