Author: dazarov
Date: 2009-05-21 04:54:20 -0400 (Thu, 21 May 2009)
New Revision: 15384
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-21
08:45:34 UTC (rev 15383)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-21
08:54:20 UTC (rev 15384)
@@ -8,6 +8,8 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamProject;
@@ -122,12 +124,16 @@
content = FileUtil.readStream(file.getContents());
assertNotSame(changeStructure.getText(),
content.substring(changeStructure.getOffset(),
changeStructure.getOffset()+changeStructure.getLength()));
}
+
+ if(component.getJavaDeclaration() == null)
+ fail("Component 'test' does not have java declaration");
// Rename Seam Component
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
- Change change = processor.createChange(new NullProgressMonitor());
- change.perform(new NullProgressMonitor());
+ CompositeChange rootChange = (CompositeChange)processor.createChange(new
NullProgressMonitor());
+
+ rootChange.perform(new NullProgressMonitor());
JobUtils.waitForIdle();
// Test results