Author: dazarov
Date: 2009-05-26 14:03:53 -0400 (Tue, 26 May 2009)
New Revision: 15519
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4262
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-26
17:07:23 UTC (rev 15518)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-26
18:03:53 UTC (rev 15519)
@@ -51,6 +51,8 @@
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart editor = HandlerUtil.getActiveEditor(event);
Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ saveAndBuild();
IEditorInput input = editor.getEditorInput();
if (input instanceof IFileEditorInput) {
@@ -79,15 +81,8 @@
}
public static void invokeRenameWizard(ISeamComponent component, Shell activeShell) {
- if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
- return;
+ saveAndBuild();
- try {
- Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
- } catch (InterruptedException e) {
- // do nothing
- }
-
RenameComponentProcessor processor = new RenameComponentProcessor(component);
RenameComponentRefactoring refactoring = new RenameComponentRefactoring(processor);
RenameComponentWizard wizard = new RenameComponentWizard(refactoring, component);
@@ -99,4 +94,15 @@
// operation was canceled
}
}
+
+ private static void saveAndBuild(){
+ if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
+ return;
+
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+ }
}