- 
                Notifications
    You must be signed in to change notification settings 
- Fork 121
Add an option to automatically update the BREE to the highest of all dependencies #1813 #1928
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
base: master
Are you sure you want to change the base?
Conversation
cd98611    to
    b1e3858      
    Compare
  
    | Merge commits cannot be accepted. Please rebase and force push. | 
| @sderazo please squash your changes into one commit locally, rebase on top of the latest master (of this this repo) and force push the resulting commit to the branch of this PR. Please DO NOT create yet another PR. Furthermore please remove all unrelated changes e.g. in the  I assume this addresses: | 
| @merks @HannesWell Thank you for your feedback. I have a meeting scheduled with my Mentor for tomorrow to correct this. I apologize for the current state that this PR is in. I also have a question for the  Thank you for your time. | 
…dependencies eclipse-pde#1813 We added an option to automatically update the BREE to the highest of all dependencies to the Organize Manifests Wizard. It appears on the wizard as "Update required execution environments”. Instead of having to navigate to the manifest of each project to click the quick-fix because one of the dependencies has a higher BREE than declared in the manifest, this feature automatically updates the manifest to many projects. Fixes eclipse-pde#1813 Co-authored-by: Sabrina Diaz-Erazo <[email protected]> Co-authored-by: Jose Rodriguez <[email protected]>
fbd6ac7    to
    d828b90      
    Compare
  
    | 
 addressed in commit d828b90 
 Yes, that is correct | 
36894af    to
    d828b90      
    Compare
  
    | */ | ||
| public class ExecEnvironmentUtils extends JarManifestErrorReporter { | ||
|  | ||
| public ExecEnvironmentUtils(IFile file) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not extend internal JarManifestErrorReporter, just make it a final static utility class
|  | ||
| try { | ||
| if (highestBundleEE != getHighestEE(highestDependencyEE, highestBundleEE)) { | ||
| if (highestBundleEE != ExecEnvironmentUtils.getHighestEE(highestDependencyEE, highestBundleEE)) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good !
| "CDC-1.1/Foundation", "JRE", "J2SE", "JavaSE"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ | ||
|  | ||
| private static final Pattern EE_PATTERN = Pattern.compile("(.*)-(\\d+)\\.?(\\d+)?(.*)?"); //$NON-NLS-1$ | ||
|  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be some failures try adding testcases for regex pattern
| } | ||
| if (eeMatcher2.groupCount() > 2 && eeMatcher2.group(3) != null) { | ||
| eeMinorVersion2 = Integer.valueOf(eeMatcher2.group(3)); | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for need unit tests for malformed inputs and ordering issues
| * given | ||
| */ | ||
| public static String getHighestBREE(String[] executionEnvironments) { | ||
| if (executionEnvironments.length == 0) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure other functions receive empty string or null . Make sure there is uniformity
| } catch (Exception e) { | ||
| PDECore.log(e); | ||
| } | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better not to return array object in the end
This feature is available on the Organize Manifests Wizard as "Update required execution environments".