Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
Line Awesome and HighlightJs.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlasov committed Feb 14, 2020
1 parent 8d6c4c5 commit 4330f10
Show file tree
Hide file tree
Showing 17 changed files with 318 additions and 18 deletions.
2 changes: 2 additions & 0 deletions html.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ _UI_StylesheetReference_href_feature = Href
_UI_Script_code_feature = Code
_UI_ScriptResource_location_feature = Location
_UI_ScriptReference_src_feature = Src
_UI_Page_lineAwesome_feature = Line Awesome
_UI_Page_highlightJs_feature = Highlight Js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {

addLanguagePropertyDescriptor(object);
addFontAwesomePropertyDescriptor(object);
addLineAwesomePropertyDescriptor(object);
addJsTreePropertyDescriptor(object);
addGithubMarkdownCssPropertyDescriptor(object);
addHighlightJsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
Expand Down Expand Up @@ -120,6 +122,28 @@ protected void addFontAwesomePropertyDescriptor(Object object) {
}


/**
* This adds a property descriptor for the Line Awesome feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
protected void addLineAwesomePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor(
getResourceLocator(),
getString("_UI_Page_lineAwesome_feature"),
HtmlPackage.Literals.PAGE__LINE_AWESOME,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null,
null));
}


/**
* This adds a property descriptor for the Js Tree feature.
* <!-- begin-user-doc -->
Expand All @@ -146,21 +170,42 @@ protected void addJsTreePropertyDescriptor(Object object) {
* This adds a property descriptor for the Github Markdown Css feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @generated NOT
*/
protected void addGithubMarkdownCssPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
(createItemPropertyDescriptor(
getResourceLocator(),
getString("_UI_Page_githubMarkdownCss_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Page_githubMarkdownCss_feature", "_UI_Page_type"),
HtmlPackage.Literals.PAGE__GITHUB_MARKDOWN_CSS,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null,
null));
}


/**
* This adds a property descriptor for the Highlight Js feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
protected void addHighlightJsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor(
getResourceLocator(),
getString("_UI_Page_highlightJs_feature"),
HtmlPackage.Literals.PAGE__HIGHLIGHT_JS,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null,
null));
}

Expand Down Expand Up @@ -248,8 +293,10 @@ public void notifyChanged(Notification notification) {
switch (notification.getFeatureID(Page.class)) {
case HtmlPackage.PAGE__LANGUAGE:
case HtmlPackage.PAGE__FONT_AWESOME:
case HtmlPackage.PAGE__LINE_AWESOME:
case HtmlPackage.PAGE__JS_TREE:
case HtmlPackage.PAGE__GITHUB_MARKDOWN_CSS:
case HtmlPackage.PAGE__HIGHLIGHT_JS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case HtmlPackage.PAGE__HEAD:
Expand Down
10 changes: 10 additions & 0 deletions html/model/html.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@
<details key="documentation" value="If this attribute is set to true [Font Awesome](https://fontawesome.com/) CDN stylesheet reference is added to the head."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="lineAwesome" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="If this attribute is set to true [Line Awesome](https://icons8.com/line-awesome/) CDN stylesheet reference is added to the head."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="jsTree" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="If this attribute is set to true [jsTree](https://www.jstree.com/) CDN script and stylesheet references are added to the head."/>
Expand All @@ -132,6 +137,11 @@
<details key="documentation" value="If this attribute is set to true [GitHub Markdown CSS](https://github.com/sindresorhus/github-markdown-css) CDN stylesheet reference is added to the head."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="highlightJs" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="If this attribute is set to true [highlight.js](https://highlightjs.org/) CDN script and stylesheet references are added to the head as well as the initialization script in order to provide syntax highlighting in markdown fenced blocks."/>
</eAnnotations>
</eStructuralFeatures>
<eGenericSuperTypes eClassifier="ecore:EClass ../../org.nasdanika.ncore/model/ncore.ecore#//NamedElement"/>
<eGenericSuperTypes eClassifier="ecore:EClass ../../org.nasdanika.ncore/model/ncore.ecore#//ISupplierFactory">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
Expand Down
2 changes: 2 additions & 0 deletions html/model/html.genmodel
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference html.ecore#//Page/builders"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/language"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/fontAwesome"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/lineAwesome"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/jsTree"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/githubMarkdownCss"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute html.ecore#//Page/highlightJs"/>
</genClasses>
<genClasses ecoreClass="html.ecore#//Stylesheet">
<genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute html.ecore#//Stylesheet/code"/>
Expand Down
62 changes: 59 additions & 3 deletions html/src/org/nasdanika/vinci/html/HtmlPackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,23 @@ public interface HtmlPackage extends EPackage {
*/
int PAGE__FONT_AWESOME = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 4;

/**
* The feature id for the '<em><b>Line Awesome</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PAGE__LINE_AWESOME = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 5;

/**
* The feature id for the '<em><b>Js Tree</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PAGE__JS_TREE = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 5;
int PAGE__JS_TREE = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 6;

/**
* The feature id for the '<em><b>Github Markdown Css</b></em>' attribute.
Expand All @@ -481,7 +490,16 @@ public interface HtmlPackage extends EPackage {
* @generated
* @ordered
*/
int PAGE__GITHUB_MARKDOWN_CSS = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 6;
int PAGE__GITHUB_MARKDOWN_CSS = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 7;

/**
* The feature id for the '<em><b>Highlight Js</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PAGE__HIGHLIGHT_JS = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 8;

/**
* The number of structural features of the '<em>Page</em>' class.
Expand All @@ -490,7 +508,7 @@ public interface HtmlPackage extends EPackage {
* @generated
* @ordered
*/
int PAGE_FEATURE_COUNT = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 7;
int PAGE_FEATURE_COUNT = NcorePackage.NAMED_ELEMENT_FEATURE_COUNT + 9;

/**
* The number of operations of the '<em>Page</em>' class.
Expand Down Expand Up @@ -1012,6 +1030,17 @@ public interface HtmlPackage extends EPackage {
*/
EAttribute getPage_FontAwesome();

/**
* Returns the meta object for the attribute '{@link org.nasdanika.vinci.html.Page#isLineAwesome <em>Line Awesome</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Line Awesome</em>'.
* @see org.nasdanika.vinci.html.Page#isLineAwesome()
* @see #getPage()
* @generated
*/
EAttribute getPage_LineAwesome();

/**
* Returns the meta object for the attribute '{@link org.nasdanika.vinci.html.Page#isJsTree <em>Js Tree</em>}'.
* <!-- begin-user-doc -->
Expand All @@ -1034,6 +1063,17 @@ public interface HtmlPackage extends EPackage {
*/
EAttribute getPage_GithubMarkdownCss();

/**
* Returns the meta object for the attribute '{@link org.nasdanika.vinci.html.Page#isHighlightJs <em>Highlight Js</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Highlight Js</em>'.
* @see org.nasdanika.vinci.html.Page#isHighlightJs()
* @see #getPage()
* @generated
*/
EAttribute getPage_HighlightJs();

/**
* Returns the meta object for class '{@link org.nasdanika.vinci.html.Stylesheet <em>Stylesheet</em>}'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -1333,6 +1373,14 @@ interface Literals {
*/
EAttribute PAGE__FONT_AWESOME = eINSTANCE.getPage_FontAwesome();

/**
* The meta object literal for the '<em><b>Line Awesome</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute PAGE__LINE_AWESOME = eINSTANCE.getPage_LineAwesome();

/**
* The meta object literal for the '<em><b>Js Tree</b></em>' attribute feature.
* <!-- begin-user-doc -->
Expand All @@ -1349,6 +1397,14 @@ interface Literals {
*/
EAttribute PAGE__GITHUB_MARKDOWN_CSS = eINSTANCE.getPage_GithubMarkdownCss();

/**
* The meta object literal for the '<em><b>Highlight Js</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute PAGE__HIGHLIGHT_JS = eINSTANCE.getPage_HighlightJs();

/**
* The meta object literal for the '{@link org.nasdanika.vinci.html.impl.StylesheetImpl <em>Stylesheet</em>}' class.
* <!-- begin-user-doc -->
Expand Down
52 changes: 52 additions & 0 deletions html/src/org/nasdanika/vinci/html/Page.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
* <li>{@link org.nasdanika.vinci.html.Page#getBuilders <em>Builders</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#getLanguage <em>Language</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#isFontAwesome <em>Font Awesome</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#isLineAwesome <em>Line Awesome</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#isJsTree <em>Js Tree</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#isGithubMarkdownCss <em>Github Markdown Css</em>}</li>
* <li>{@link org.nasdanika.vinci.html.Page#isHighlightJs <em>Highlight Js</em>}</li>
* </ul>
*
* @see org.nasdanika.vinci.html.HtmlPackage#getPage()
Expand Down Expand Up @@ -131,6 +133,31 @@ public interface Page extends NamedElement, SupplierFactory<Object> {
*/
void setFontAwesome(boolean value);

/**
* Returns the value of the '<em><b>Line Awesome</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If this attribute is set to true [Line Awesome](https://icons8.com/line-awesome/) CDN stylesheet reference is added to the head.
* <!-- end-model-doc -->
* @return the value of the '<em>Line Awesome</em>' attribute.
* @see #setLineAwesome(boolean)
* @see org.nasdanika.vinci.html.HtmlPackage#getPage_LineAwesome()
* @model
* @generated
*/
boolean isLineAwesome();

/**
* Sets the value of the '{@link org.nasdanika.vinci.html.Page#isLineAwesome <em>Line Awesome</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Line Awesome</em>' attribute.
* @see #isLineAwesome()
* @generated
*/
void setLineAwesome(boolean value);

/**
* Returns the value of the '<em><b>Js Tree</b></em>' attribute.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -181,4 +208,29 @@ public interface Page extends NamedElement, SupplierFactory<Object> {
*/
void setGithubMarkdownCss(boolean value);

/**
* Returns the value of the '<em><b>Highlight Js</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If this attribute is set to true [highlight.js](https://highlightjs.org/) CDN script and stylesheet references are added to the head as well as the initialization script in order to provide syntax highlighting in markdown fenced blocks.
* <!-- end-model-doc -->
* @return the value of the '<em>Highlight Js</em>' attribute.
* @see #setHighlightJs(boolean)
* @see org.nasdanika.vinci.html.HtmlPackage#getPage_HighlightJs()
* @model
* @generated
*/
boolean isHighlightJs();

/**
* Sets the value of the '{@link org.nasdanika.vinci.html.Page#isHighlightJs <em>Highlight Js</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Highlight Js</em>' attribute.
* @see #isHighlightJs()
* @generated
*/
void setHighlightJs(boolean value);

} // Page
Loading

0 comments on commit 4330f10

Please sign in to comment.