This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
update style generation code for new style spec enum values docs #6508
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
66557b2
bump style spec and properly iterate enum values
incanus e9be66b
iOS code gen updates for enum values docs
incanus f560286
Android code gen updates for enum values docs
incanus 57420c9
document the actual enum definitions on Darwin
incanus 0c8cc78
remove JNI enum docs since unnecessary
incanus b0c7392
Merge remote-tracking branch 'origin/master' into style-spec-enum-docs
incanus c58f90a
document individual properties & enum values in Java
incanus 6c906e2
snake case Java headings
incanus caeee4f
fix some Android indentation
incanus e08bc5a
format references to peer properties and values other than the current
incanus 1325127
better format symbols in Android enum property docs
incanus 4da521e
bump in-progress style spec
incanus 357f6a8
[android] flip comment style & [ios, android] update visibility doc
incanus 80da0f3
nicer spacing
incanus bb12581
Merge remote-tracking branch 'origin/master' into style-spec-enum-docs
incanus 3f1b13b
bump style spec to one that eventually got merged
incanus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,9 @@ | |
*/ | ||
public abstract class Property<T> { | ||
|
||
//visibility | ||
/** | ||
* Layer visibility | ||
*/ | ||
public static final String VISIBLE = "visible"; | ||
public static final String NONE = "none"; | ||
|
||
|
@@ -22,9 +24,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface VISIBILITY {} | ||
|
||
//line-cap | ||
/** | ||
* `line-cap`: The display of line endings. | ||
*/ | ||
//A cap with a squared-off end which is drawn to the exact endpoint of the line. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here. I would invert this, start the header with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
public static final String LINE_CAP_BUTT = "butt"; | ||
//A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. | ||
public static final String LINE_CAP_ROUND = "round"; | ||
//A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. | ||
public static final String LINE_CAP_SQUARE = "square"; | ||
|
||
@StringDef({ | ||
|
@@ -35,9 +42,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface LINE_CAP {} | ||
|
||
//line-join | ||
/** | ||
* `line-join`: The display of lines when joining. | ||
*/ | ||
//A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. | ||
public static final String LINE_JOIN_BEVEL = "bevel"; | ||
//A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. | ||
public static final String LINE_JOIN_ROUND = "round"; | ||
//A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet. | ||
public static final String LINE_JOIN_MITER = "miter"; | ||
|
||
@StringDef({ | ||
|
@@ -48,8 +60,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface LINE_JOIN {} | ||
|
||
//symbol-placement | ||
/** | ||
* `symbol-placement`: Label placement relative to its geometry. | ||
*/ | ||
//The label is placed at the point where the geometry is located. | ||
public static final String SYMBOL_PLACEMENT_POINT = "point"; | ||
//The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. | ||
public static final String SYMBOL_PLACEMENT_LINE = "line"; | ||
|
||
@StringDef({ | ||
|
@@ -59,9 +75,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface SYMBOL_PLACEMENT {} | ||
|
||
//icon-rotation-alignment | ||
/** | ||
* `icon-rotation-alignment`: In combination with `symbol-placement`, determines the rotation behavior of icons. | ||
*/ | ||
//When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line. | ||
public static final String ICON_ROTATION_ALIGNMENT_MAP = "map"; | ||
//Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. | ||
public static final String ICON_ROTATION_ALIGNMENT_VIEWPORT = "viewport"; | ||
//When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`. | ||
public static final String ICON_ROTATION_ALIGNMENT_AUTO = "auto"; | ||
|
||
@StringDef({ | ||
|
@@ -72,10 +93,16 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface ICON_ROTATION_ALIGNMENT {} | ||
|
||
//icon-text-fit | ||
/** | ||
* `icon-text-fit`: Scales the icon to fit around the associated text. | ||
*/ | ||
//The icon is displayed at its intrinsic aspect ratio. | ||
public static final String ICON_TEXT_FIT_NONE = "none"; | ||
//The icon is scaled in the x-dimension to fit the width of the text. | ||
public static final String ICON_TEXT_FIT_WIDTH = "width"; | ||
//The icon is scaled in the y-dimension to fit the height of the text. | ||
public static final String ICON_TEXT_FIT_HEIGHT = "height"; | ||
//The icon is scaled in both x- and y-dimensions. | ||
public static final String ICON_TEXT_FIT_BOTH = "both"; | ||
|
||
@StringDef({ | ||
|
@@ -87,9 +114,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface ICON_TEXT_FIT {} | ||
|
||
//text-pitch-alignment | ||
/** | ||
* `text-pitch-alignment`: Orientation of text when map is pitched. | ||
*/ | ||
//The text is aligned to the plane of the map. | ||
public static final String TEXT_PITCH_ALIGNMENT_MAP = "map"; | ||
//The text is aligned to the plane of the viewport. | ||
public static final String TEXT_PITCH_ALIGNMENT_VIEWPORT = "viewport"; | ||
//Automatically matches the value of `text-rotation-alignment`. | ||
public static final String TEXT_PITCH_ALIGNMENT_AUTO = "auto"; | ||
|
||
@StringDef({ | ||
|
@@ -100,9 +132,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_PITCH_ALIGNMENT {} | ||
|
||
//text-rotation-alignment | ||
/** | ||
* `text-rotation-alignment`: In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text. | ||
*/ | ||
//When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line. | ||
public static final String TEXT_ROTATION_ALIGNMENT_MAP = "map"; | ||
//Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. | ||
public static final String TEXT_ROTATION_ALIGNMENT_VIEWPORT = "viewport"; | ||
//When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`. | ||
public static final String TEXT_ROTATION_ALIGNMENT_AUTO = "auto"; | ||
|
||
@StringDef({ | ||
|
@@ -113,9 +150,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_ROTATION_ALIGNMENT {} | ||
|
||
//text-justify | ||
/** | ||
* `text-justify`: Text justification options. | ||
*/ | ||
//The text is aligned to the left. | ||
public static final String TEXT_JUSTIFY_LEFT = "left"; | ||
//The text is centered. | ||
public static final String TEXT_JUSTIFY_CENTER = "center"; | ||
//The text is aligned to the right. | ||
public static final String TEXT_JUSTIFY_RIGHT = "right"; | ||
|
||
@StringDef({ | ||
|
@@ -126,15 +168,26 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_JUSTIFY {} | ||
|
||
//text-anchor | ||
/** | ||
* `text-anchor`: Part of the text placed closest to the anchor. | ||
*/ | ||
//The center of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_CENTER = "center"; | ||
//The left side of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_LEFT = "left"; | ||
//The right side of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_RIGHT = "right"; | ||
//The top of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_TOP = "top"; | ||
//The bottom of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_BOTTOM = "bottom"; | ||
//The top left corner of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_TOP_LEFT = "top-left"; | ||
//The top right corner of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_TOP_RIGHT = "top-right"; | ||
//The bottom left corner of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_BOTTOM_LEFT = "bottom-left"; | ||
//The bottom right corner of the text is placed closest to the anchor. | ||
public static final String TEXT_ANCHOR_BOTTOM_RIGHT = "bottom-right"; | ||
|
||
@StringDef({ | ||
|
@@ -151,9 +204,14 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_ANCHOR {} | ||
|
||
//text-transform | ||
/** | ||
* `text-transform`: Specifies how to capitalize text, similar to the CSS `text-transform` property. | ||
*/ | ||
//The text is not altered. | ||
public static final String TEXT_TRANSFORM_NONE = "none"; | ||
//Forces all letters to be displayed in uppercase. | ||
public static final String TEXT_TRANSFORM_UPPERCASE = "uppercase"; | ||
//Forces all letters to be displayed in lowercase. | ||
public static final String TEXT_TRANSFORM_LOWERCASE = "lowercase"; | ||
|
||
@StringDef({ | ||
|
@@ -164,8 +222,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_TRANSFORM {} | ||
|
||
//fill-translate-anchor | ||
/** | ||
* `fill-translate-anchor`: Controls the translation reference point. | ||
*/ | ||
//The fill is translated relative to the map. | ||
public static final String FILL_TRANSLATE_ANCHOR_MAP = "map"; | ||
//The fill is translated relative to the viewport. | ||
public static final String FILL_TRANSLATE_ANCHOR_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
@@ -175,8 +237,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface FILL_TRANSLATE_ANCHOR {} | ||
|
||
//line-translate-anchor | ||
/** | ||
* `line-translate-anchor`: Controls the translation reference point. | ||
*/ | ||
//The line is translated relative to the map. | ||
public static final String LINE_TRANSLATE_ANCHOR_MAP = "map"; | ||
//The line is translated relative to the viewport. | ||
public static final String LINE_TRANSLATE_ANCHOR_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
@@ -186,8 +252,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface LINE_TRANSLATE_ANCHOR {} | ||
|
||
//icon-translate-anchor | ||
/** | ||
* `icon-translate-anchor`: Controls the translation reference point. | ||
*/ | ||
//Icons are translated relative to the map. | ||
public static final String ICON_TRANSLATE_ANCHOR_MAP = "map"; | ||
//Icons are translated relative to the viewport. | ||
public static final String ICON_TRANSLATE_ANCHOR_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
@@ -197,8 +267,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface ICON_TRANSLATE_ANCHOR {} | ||
|
||
//text-translate-anchor | ||
/** | ||
* `text-translate-anchor`: Controls the translation reference point. | ||
*/ | ||
//The text is translated relative to the map. | ||
public static final String TEXT_TRANSLATE_ANCHOR_MAP = "map"; | ||
//The text is translated relative to the viewport. | ||
public static final String TEXT_TRANSLATE_ANCHOR_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
@@ -208,8 +282,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TEXT_TRANSLATE_ANCHOR {} | ||
|
||
//circle-translate-anchor | ||
/** | ||
* `circle-translate-anchor`: Controls the translation reference point. | ||
*/ | ||
//The circle is translated relative to the map. | ||
public static final String CIRCLE_TRANSLATE_ANCHOR_MAP = "map"; | ||
//The circle is translated relative to the viewport. | ||
public static final String CIRCLE_TRANSLATE_ANCHOR_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
@@ -219,8 +297,12 @@ public abstract class Property<T> { | |
@Retention(RetentionPolicy.SOURCE) | ||
public @interface CIRCLE_TRANSLATE_ANCHOR {} | ||
|
||
//circle-pitch-scale | ||
/** | ||
* `circle-pitch-scale`: Controls the scaling behavior of the circle when the map is pitched. | ||
*/ | ||
//Circles are scaled according to their apparent distance to the camera. | ||
public static final String CIRCLE_PITCH_SCALE_MAP = "map"; | ||
//Circles are not scaled. | ||
public static final String CIRCLE_PITCH_SCALE_VIEWPORT = "viewport"; | ||
|
||
@StringDef({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@incanus If you document in this way, it is only applied to the first constant
VISIBLE
. The//
I used don't show up at all in javadoc. I use those more as you'd use#pragma mark
, to organize the source, not to document. If you apply javadoc, you need to do it on all constants I'm afraid.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.
357f6a8