Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Refactoring improvement and EMFComprare previews for renamings #131

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

TerraBAS
Copy link

@TerraBAS TerraBAS commented May 16, 2024

This change updates the rename refactoring preview to add more logical grouping and replaces searches with the new search implementation. An EMFcompare preview is also included for structs and FBs, however this will cause a crash when viewing multiple changes - hence this MR in DRAFT state. See https://www.eclipse.org/forums/index.php/t/1115097/ for more information regarding the exception caused by an EMFcompare internal bug.

final InstanceSearch structMemberSearch = StructDataTypeSearch
.createStructMemberSearch((StructuredType) oldTypeEntry.getTypeEditable());

final Set<INamedElement> search = InstanceSearch.performProjectSearch(this.file.getProject(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the new search:

org.eclipse.fordiac.ide.model.search.types.BlockTypeInstanceSearch
or
org.eclipse.fordiac.ide.model.search.types.DataTypeInstanceSearch

The old one is not working, they are deprecated and will be removed in the future

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new search you will hopefully can delete lin 68-73

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed

}

private List<FBNetworkElement> searchAffectedStructuredType() {
final InstanceSearch structMemberSearch = StructDataTypeSearch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here you can use the new search

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed

}

private List<FBType> searchAffectedFBs() {
final InstanceSearch search = StructDataTypeSearch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here ;-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed

@@ -0,0 +1,76 @@
package org.eclipse.fordiac.ide.typemanagement.refactoring.rename;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to add/update the mandatory copyright-header (taking this file as example, applies to all .java-files)

ernstblechaPT added a commit to ernstblechaPT/4diac-ide that referenced this pull request Jul 23, 2024
In eclipse-4diac#131 the memset was removed, this results in random values showing up on the event counters
ernstblechaPT pushed a commit to ernstblechaPT/4diac-ide that referenced this pull request Jul 23, 2024
@@ -19,17 +19,10 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ltk.ui.refactoring,
org.eclipse.fordiac.ide.model.search,
org.eclipse.fordiac.ide.model.commands,
<<<<<<< HEAD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are merge conflicts that did not get resolved automatically

@@ -72,12 +72,8 @@ RenameElementRefactoringProcessor_Name=Rename element to {0}
RenameElementRefactoringProcessor_RenamePinInType=Rename Pin in type: {0}
RenameElementRefactoringWizardPage_Name=Name
RenameType_Name=Rename IEC 61499 Type
<<<<<<< HEAD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are merge conflicts that did not get resolved automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants