Replies: 2 comments
|
Hello Dimitris, Since we are currently trying to simplify the code. Regarding your second question: I would not manually wrap the descriptor in a RenameRefactoring. For the resource rename case, use RenameResourceDescriptor from org.eclipse.ltk.core.refactoring.resource, create the refactoring context from the descriptor, and execute it via PerformRefactoringOperation. You may have a look at JDT (eclipse for java) refactoring. maybe this helps you to understand the LTK refactoring life cycle: |
|
Thank you for the clarifications and for confirming the dead code find I will open a cleanup PR to delete RenameUpdateFBTypeInterfaceModelEdit. |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I am Dimitris the GSoC 2026 contributor working on the Type Management Refactoring Test Suite with Michael Oberlehner as my mentor. I have been reading through the refactoring code before Phase 1 starts and have a few questions where I want to confirm my understanding.
RenameUpdateFBTypeInterfaceModelEdit does not seem to be instantiated anywhere. The cascade for a DataType rename goes through TypeRefactoringHelper.addModelEditsForType() to DataTypeEditBuilder.createStructuredDataTypeChanges(), which produces DataTypeEdit instances for VarDeclaration objects and UpdateConfigurableFBModelEdit for ConfigurableFB objects. RenameUpdateFBTypeInterfaceModelEdit exists in the rename package with a full implementation but I cannot find it being called anywhere in the production code. My proposal listed it as one of the core assertion targets so I want to clarify if is it intentionally not wired in, because DataTypeEdit already covers FB interface variables since they are also VarDeclaration objects or is it meant to be called somewhere and currently missing?
The second question I have is about the correct headless API to trigger RenameTypeRefactoringParticipant from a JUnit test. Since it extends RenameParticipant it needs to be activated via an LTK RenameRefactoring rather than called directly. Is the right approach to build a RenameResourceDescriptor for the IFile, wrap it in a RenameRefactoring, and run it with PerformRefactoringOperation? The existing tests using FordiacProjectLoader do not perform refactoring operations so I do not have a prior example in the repo to follow.
Thank you in advance for your time and guidance.
All reactions