Skip to content

Replace PROJECT_OPEN_NEW_PERSPECTIVE Constant with IDE.Preferences Equivalent #2971

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elsazac
Copy link
Member

@elsazac elsazac commented May 12, 2025

The PROJECT_OPEN_NEW_PERSPECTIVE constant in the IWorkbenchPreferenceConstants interface is deprecated and marked for removal. It should be replaced with the equivalent PROJECT_OPEN_NEW_PERSPECTIVE constant available in IDE.Preferences

in IWorkbenchPreferenceConstants interface is deprecated and marked for
removal and hence it can be replaced with public static final String
PROJECT_OPEN_NEW_PERSPECTIVE = "PROJECT_OPEN_NEW_PERSPECTIVE" present in
IDE.Preferences.
@@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.swt;bundle-version="[3.128.0,4.0.0)";visibility:=reexport,
org.eclipse.jface;bundle-version="[3.34.0,4.0.0)";visibility:=reexport,
org.eclipse.ui.workbench;bundle-version="[3.130.0,4.0.0)";visibility:=reexport,
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
org.eclipse.ui.ide;bundle-version="3.22.600"
Copy link
Member

Choose a reason for hiding this comment

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

This adds cyclic dependency

Copy link
Member Author

@elsazac elsazac May 12, 2025

Choose a reason for hiding this comment

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

Is the presence of cyclic dependencies discouraged ?; is it okay to add the bundle requirement in the Import-Package instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we would want to make an IDE-independent part depend on the IDE all of a sudden, even if it were allowed (and it's not allowed.)

Copy link
Member Author

Choose a reason for hiding this comment

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

@merks Do you have any suggestions to go about this fix?

Copy link
Contributor

Test Results

0 files   -  1 824  0 suites   - 1 824   0s ⏱️ - 1h 35m 43s
0 tests  -  7 918  0 ✅  -  7 690  0 💤  - 228  0 ❌ ±0 
0 runs   - 23 841  0 ✅  - 23 093  0 💤  - 748  0 ❌ ±0 

Results for commit 00fd063. ± Comparison against base commit 0368ee5.

@merks
Copy link
Contributor

merks commented May 12, 2025

Maybe the deprecated addition (from 2004) should finally be removed from the preferences initializer?

image

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