Author: dgeraskov
Date: 2009-10-14 06:33:37 -0400 (Wed, 14 Oct 2009)
New Revision: 18077
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationEntityResolverChange.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeMoveParticipant.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeRenameParticipant.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationNamingStrategyChange.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4780
Added rename and move refactoring changes for NamingStrategy and EntityResolver of console
configuration.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2009-10-14
05:55:10 UTC (rev 18076)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2009-10-14
10:33:37 UTC (rev 18077)
@@ -75,6 +75,7 @@
org.eclipse.datatools.connectivity.ui,
org.eclipse.datatools.connectivity,
org.eclipse.jpt.core,
- org.eclipse.jpt.db
+ org.eclipse.jpt.db,
+ org.eclipse.jdt
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-10-14
05:55:10 UTC (rev 18076)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-10-14
10:33:37 UTC (rev 18077)
@@ -641,27 +641,22 @@
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.renameParticipants">
- <!--renameParticipant
-
class="org.hibernate.eclipse.launch.core.refactoring.RenameProjectParticipant"
-
id="org.hibernate.eclipse.launch.core.refactoring.RenameProjectParticipant"
- name="Launch Configurations projectrename updates">
+ <renameParticipant
+
class="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeRenameParticipant"
+ name="Console Configuration IType Participant"
+
id="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeRenameParticipant">
<enablement>
- <with variable="element">
- <instanceof
value="org.eclipse.jdt.core.IJavaProject"/>
- </with>
+ <with variable="affectedNatures">
+ <iterate operator="or">
+ <equals value="org.eclipse.jdt.core.javanature"/>
+ </iterate>
+ </with>
+ <with variable="element">
+ <instanceof value="org.eclipse.jdt.core.IType"/>
+ </with>
</enablement>
</renameParticipant>
<renameParticipant
-
class="org.hibernate.eclipse.launch.core.refactoring.RenamePackageParticipant"
-
id="org.hibernate.eclipse.launch.core.refactoring.RenamePackageParticipant"
- name="Launch Configurations package rename updates">
- <enablement>
- <with variable="element">
- <instanceof
value="org.eclipse.jdt.core.IPackageFragment"/>
- </with>
- </enablement>
- </renameParticipant-->
- <renameParticipant
class="org.hibernate.eclipse.launch.core.refactoring.RenameResourceParticipant"
id="org.hibernate.eclipse.launch.core.refactoring.RenameResourceParticipant"
name="Launch Configurations resource rename updates">
@@ -711,16 +706,21 @@
</with>
</enablement>
</moveParticipant>
- <!--moveParticipant
-
class="org.hibernate.eclipse.launch.core.refactoring.MovePackageParticipant"
-
id="org.hibernate.eclipse.launch.core.refactoring.MovePackageParticipant"
- name="Launch Configurations resource move updates">
- <enablement>
- <with variable="element">
- <instanceof
value="org.eclipse.jdt.core.IPackageFragment"/>
- </with>
+ <moveParticipant
+
class="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeMoveParticipant"
+ name="Console Configuration IType Participant"
+
id="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeMoveParticipant">
+ <enablement>
+ <with variable="affectedNatures">
+ <iterate operator="or">
+ <equals value="org.eclipse.jdt.core.javanature"/>
+ </iterate>
+ </with>
+ <with variable="element">
+ <instanceof value="org.eclipse.jdt.core.IType"/>
+ </with>
</enablement>
- </moveParticipant-->
+ </moveParticipant>
</extension>
<extension
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-10-14
05:55:10 UTC (rev 18076)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -488,6 +488,9 @@
public static String
LaunchConfigurationResourceNameChange_update_resource_path_in_launch_cfg;
public static String MoveResourceParticipant_launch_configurations_updates;
public static String RenameResourceParticipant_launch_configurations_updates;
+
+ public static String ConsoleConfigurationITypeRenameParticipant_update;
+ public static String ConsoleConfigurationITypeRenameParticipant_update_names;
//
public static String
HibernateNature_error_while_performing_background_reading_of_database_schema;
public static String HibernateNature_exception_when_trying_to_locate_hibernate_nature;
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-10-14
05:55:10 UTC (rev 18076)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-10-14
10:33:37 UTC (rev 18077)
@@ -492,6 +492,9 @@
MoveResourceParticipant_launch_configurations_updates=Launch Configurations updates
RenameResourceParticipant_launch_configurations_updates=Launch Configurations updates
+ConsoleConfigurationITypeRenameParticipant_update=Console configuration participant
+ConsoleConfigurationITypeRenameParticipant_update_names=Console configuration update time
names
+
HibernateNature_error_while_performing_background_reading_of_database_schema=Error while
performing background reading of database schema
HibernateNature_exception_when_trying_to_locate_hibernate_nature=Exception when trying to
locate Hibernate Nature
HibernateNature_reading_database_metadata=Reading database metadata
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationEntityResolverChange.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationEntityResolverChange.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationEntityResolverChange.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleConfigurationEntityResolverChange extends Change {
+
+ private ILaunchConfiguration fLaunchConfiguration;
+ private String fNewEntityResolverName;
+ private String fOldEntityResolverTypeName;
+
+ public ConsoleConfigurationEntityResolverChange(ILaunchConfiguration
launchConfiguration, String newEntityResolverName) throws CoreException {
+ fLaunchConfiguration = launchConfiguration;
+ fNewEntityResolverName = newEntityResolverName;
+ fOldEntityResolverTypeName =
fLaunchConfiguration.getAttribute(IConsoleConfigurationLaunchConstants.NAMING_STRATEGY,
(String) null);
+ }
+
+ @Override
+ public Object getModifiedElement() {
+ return fLaunchConfiguration;
+ }
+
+ @Override
+ public String getName() {
+ return
HibernateConsoleMessages.ConsoleConfigurationITypeRenameParticipant_update_names;
+ }
+
+ @Override
+ public void initializeValidationData(IProgressMonitor pm) { }
+
+ @Override
+ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ @Override
+ public Change perform(IProgressMonitor pm) throws CoreException {
+ final ILaunchConfigurationWorkingCopy wc = fLaunchConfiguration.getWorkingCopy();
+ String oldEntityResolverTypeName = fOldEntityResolverTypeName;
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.ENTITY_RESOLVER,
fNewEntityResolverName);
+
+ fLaunchConfiguration = wc.doSave();
+
+ // create the undo change
+ return new ConsoleConfigurationEntityResolverChange(fLaunchConfiguration,
oldEntityResolverTypeName);
+ }
+}
Property changes on:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationEntityResolverChange.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeMoveParticipant.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeMoveParticipant.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeMoveParticipant.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleConfigurationITypeMoveParticipant extends MoveParticipant {
+
+ private IType fType;
+ private IJavaElement fDestination;
+
+ protected boolean initialize(Object element) {
+ fType= (IType) element;
+ Object destination= getArguments().getDestination();
+ if (destination instanceof IPackageFragment || destination instanceof IType) {
+ fDestination= (IJavaElement) destination;
+ return true;
+ }
+ return false;
+ }
+
+ public String getName() {
+ return HibernateConsoleMessages.ConsoleConfigurationITypeRenameParticipant_update;
+ }
+
+ public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext
context) {
+ return new RefactoringStatus();
+ }
+
+ public Change createChange(IProgressMonitor pm) throws CoreException {
+ return HibernateRefactoringUtil.createChangesForTypeMove(fType, fDestination);
+ }
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeMoveParticipant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeRenameParticipant.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeRenameParticipant.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeRenameParticipant.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -0,0 +1,34 @@
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+
+public class ConsoleConfigurationITypeRenameParticipant extends
+ RenameParticipant {
+
+ private IType fType;
+
+ protected boolean initialize(Object element) {
+ fType= (IType) element;
+ return true;
+ }
+
+ public String getName() {
+ return HibernateConsoleMessages.ConsoleConfigurationITypeRenameParticipant_update;
+ }
+
+ public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext
context) {
+ return new RefactoringStatus();
+ }
+
+ public Change createChange(IProgressMonitor pm) throws CoreException {
+ return HibernateRefactoringUtil.createChangesForTypeRename(fType,
getArguments().getNewName());
+ }
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationITypeRenameParticipant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationNamingStrategyChange.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationNamingStrategyChange.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationNamingStrategyChange.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleConfigurationNamingStrategyChange extends Change {
+
+ private ILaunchConfiguration fLaunchConfiguration;
+ private String fNewNamingStrategyName;
+ private String fOldNamingStrategyTypeName;
+
+ public ConsoleConfigurationNamingStrategyChange(ILaunchConfiguration
launchConfiguration, String newNamingStrategyName) throws CoreException {
+ fLaunchConfiguration = launchConfiguration;
+ fNewNamingStrategyName = newNamingStrategyName;
+ fOldNamingStrategyTypeName =
fLaunchConfiguration.getAttribute(IConsoleConfigurationLaunchConstants.NAMING_STRATEGY,
(String) null);
+ }
+
+ @Override
+ public Object getModifiedElement() {
+ return fLaunchConfiguration;
+ }
+
+ @Override
+ public String getName() {
+ return
HibernateConsoleMessages.ConsoleConfigurationITypeRenameParticipant_update_names;
+ }
+
+ @Override
+ public void initializeValidationData(IProgressMonitor pm) { }
+
+ @Override
+ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ @Override
+ public Change perform(IProgressMonitor pm) throws CoreException {
+ final ILaunchConfigurationWorkingCopy wc = fLaunchConfiguration.getWorkingCopy();
+ String oldNamingStrategyTypeName = fOldNamingStrategyTypeName;
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.NAMING_STRATEGY,
fNewNamingStrategyName);
+
+ fLaunchConfiguration = wc.doSave();
+
+ // create the undo change
+ return new ConsoleConfigurationNamingStrategyChange(fLaunchConfiguration,
oldNamingStrategyTypeName);
+ }
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigurationNamingStrategyChange.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-10-14
05:55:10 UTC (rev 18076)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-10-14
10:33:37 UTC (rev 18077)
@@ -37,6 +37,9 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
@@ -380,4 +383,64 @@
return new CompositeChange(name, changes.toArray(new Change[changes.size()]));
}
}
+
+ public static Change createChangesForTypeRename(IType type, String newName) {
+ IType dtype = type.getDeclaringType();
+ String newfqname = newName;
+ if (dtype == null) {
+ IPackageFragment packageFragment = type.getPackageFragment();
+ if (!packageFragment.isDefaultPackage()) {
+ newfqname = packageFragment.getElementName() + '.' + newName;
+ }
+ }
+ else {
+ newfqname = dtype.getFullyQualifiedName() + '$' + newName;
+ }
+ return createChangesForTypeChange(type, newfqname);
+ }
+
+ public static Change createChangesForTypeMove(IType type, IJavaElement destination) {
+ String newfqname = type.getElementName();
+ if (destination instanceof IType) {
+ newfqname = ((IType)destination).getFullyQualifiedName() + '$' +
type.getElementName();
+ }
+ else if (destination instanceof IPackageFragment) {
+ if (!((IPackageFragment) destination).isDefaultPackage()) {
+ newfqname = destination.getElementName() + '.' + type.getElementName();
+ }
+ }
+ return createChangesForTypeChange(type, newfqname);
+ }
+
+ protected static Change createChangesForTypeChange(IType type, String newfqname) {
+ List<Change> changes = new ArrayList<Change>();
+ String pname = type.getJavaProject().getElementName();
+ String typename = type.getFullyQualifiedName();
+ ILaunchConfiguration[] configs = null;
+ try {
+ configs = LaunchHelper.findHibernateLaunchConfigs();
+ String nsName, ername;
+ for(int i = 0; i < configs.length && configs[i].exists(); i++) {
+ String attrib =
configs[i].getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
(String)null);
+ if(attrib != null) {
+ if(attrib.equals(pname)) {
+ nsName =
configs[i].getAttribute(IConsoleConfigurationLaunchConstants.NAMING_STRATEGY,
(String)null);
+ ername =
configs[i].getAttribute(IConsoleConfigurationLaunchConstants.ENTITY_RESOLVER,
(String)null);
+ if (typename.equals(nsName) ) {
+ changes.add(new ConsoleConfigurationNamingStrategyChange(configs[i], newfqname));
+ }
+ if (typename.equals(ername)) {
+ changes.add(new ConsoleConfigurationEntityResolverChange(configs[i], newfqname));
+ }
+ }
+ }
+ }
+ } catch(CoreException e) {
+ configs = new ILaunchConfiguration[0];
+ HibernateConsolePlugin.getDefault().logErrorMessage( ERROR_MESS, e );
+ }
+ return createChangesFromList(changes,
HibernateConsoleMessages.ConsoleConfigurationITypeRenameParticipant_update);
+ }
+
+
}