-
Notifications
You must be signed in to change notification settings - Fork 55
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
JBIDE-21069 Application wizard: long project display names mess up project selection #948
Conversation
@@ -144,6 +144,16 @@ public void getStyledTextForADeploymentConfig(){ | |||
} | |||
|
|||
@Test | |||
public void getStyledTextForADeploymentConfigWithLongNames(){ | |||
IDeploymentConfig config = givenAResource(IDeploymentConfig.class, ResourceKind.DEPLOYMENT_CONFIG); | |||
Map<String, String> selector = new HashMap<String, String>(); |
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.
new HashMap<>(2)
346285b
to
28be668
Compare
It works but still not really practical http://screencast.com/t/bbN3kyRE Maybe limit to 60 chars? |
@fbricon , I can set different limits for explorer and viewers in wizards/editors. Explorer can show it longer. To compare, Package Explorer and Outline for Java classes shows as long names as I tried. So may it be good 120 for explorer and 60 elsewhere? |
f506496
to
b6cc0be
Compare
Limited by default by 60 chars and added method
|
org.jboss.tools.openshift.common.core.utils.StringUtils.shorten(string, maxlength) already has a similiar method that shortens a given label to a given maximum length. |
b6cc0be
to
02d7023
Compare
@adietish , I agree that each part of the label should be shortened with StringUtils.shorten(), and I still think that shortening is better to distribute between parts so that user could see some of main part and some of qualifier. Do you think method shorten(String[] parts) may be added to StringUtils? |
02d7023
to
15b7b04
Compare
…oject selection Limited length of label text returned by OpenShiftExplorerLabelProvider. This provider is used not only in explorer but in many viewers in wisards. It is not user friendly to display the entire value if its length is unreasonably large. In this solution, ellipses are applied if length exceeds 120 symbols.
15b7b04
to
5810834
Compare
Length of label text returned by OpenShiftExplorerLabelProvider is limited.
This provider is used not only in explorer but in many viewers in wizards.
It is not user friendly to display the entire value if its length is unreasonably large.
In this solution, ellipses are applied if length exceeds 120 symbols.