Giter Club home page Giter Club logo

aemtools's Introduction

AEM Tools - Build Status | Build status | codebeat badge | codecov | downloads

Intellij IDEA plugin containing AEM (Adobe Experience Manager) related features. The goal of the plugin is to make the development of AEM projects faster and more convenient by leveraging features which IDE can provide.

Compatibility

It is compatible with Intellij IDEA 2020.3+ versions. IntelliJ Platform Based Products of Recent IDE Versions.

Latest versions:

Installation

The plugin is available in official JetBrains repository:

Settings... -> Plugins -> Browse Repositories... -> type "AEM Tools" -> install

Features

  1. HTL (Sightly) support

    • Syntax highlighting
    • Versioning (supports v1.3-v1.4)
    • Code Completion
    • Code Navigation
    • Refactoring
    • Documentation
    • Java Use & Sling Models support
  2. OSGi

    • Resolve OSGi (Felix, OSGi R6-R7) configurations
    • Resolve OSGi Properties (Felix, OSGi R6-R7)
    • Metadata property validation
  3. Jackrabbit FileVault xml-content files

    1. Syntax highlighting
    2. dialog.xml completion (Classic UI)
      • Provides the list of all available xtypes (taken from official documentation)
      • After the xtype is chosen proposes fields declared in specified xtype
      • "Quick doc" action triggered on specific field or xtype will show corresponding documentation
    3. cq:Component, cq:editConfig completion and highlighting support
  4. Clientlibs

    • Provides completion for project category name in the clientlibs declaration
    • Provides completion for project category name in the HTL
    • Provides completion/reference provider for clientlibs js.txt and css.txt files
    • Provides short documentation about clientlibs category
    • Provides HTL template support

aemtools's People

Contributors

aretiznyk avatar deeprim avatar deusbit avatar dmitry-cherkas avatar koha26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aemtools's Issues

HTL: Options and values from suggestion list do not have description and icon. Properties from suggestion list do not have type

Options and values from suggestion list do not have description and icon.
Properties from suggestion list do not have type

Steps:

  1. Type any code
  2. Start typing expression after "$" character
  3. Invoke completion
  4. Observe suggestion list

Actual:
Options and values from suggestion list do not have description and icon
Expected:
Options and values from suggestion list have description and icon

HTL: update collections completion

Currently collections as part of call chain aren't resolved properly
e.g.

  • ${bean.collection[1].field} for collection which is inheritor of List here the field should be taken from the type which is the type which parametrizes the collection
  • ${bean.map['key'].field} for map

HTL: Improve completion relevance

  • data-sly-use
    sort completion items to contain more relevant at the top

  • variable completion (${<caret>})
    the most relevant items according to current position should be proposed

Message with detailed information about the error is displayed in inappropriate way

Message with detailed information about the error is displayed in inappropriate way

Steps:

  1. Type any code in editor area
  2. Make any syntactic error
  3. Hover over an error marker
  4. Observe appeared message

Actual:
Message with detailed information about the error is displayed in inappropriate way
Expected:
Message with detailed information about the error is displayed as for other languages supported in Idea

HTL/HTML: Rename refactoring

Rename refactoring should work for following cases:

1: data-sly-use

<div data-sly-use.bean="${'com.package.ClassName'}> // Rename triggered on `ClassName` should rename corresponding class also

<div data-sly-use.bean="com.package.ClassName"> // the same behaviour as above

2: Sly variable rename

${bean.field} // rename of should work for `bean`

3: Model field rename

${bean.field} // rename of `field` should rename the name of corresponding field in underlying java class

4: Model method rename

${bean.method} // rename of `method` should rename the name of corresponding method in underlying java class

HTL: highlight unused variables

Highlight unused Htl variables:

  • data-sly-use.varName="..." // varName should be annotated as unused if it not accessed in current file
  • data-sly-template.template="${@ param}" // param should be annotated if it not used within the template's body
  • data-sly-list.var, data-sly-repeat.var // in both cases var should be annotated if both var and varList aren't used
  • data-sly-test.variable // variable should be annotated if it is not used within current file

AEM Integration: dep finder analysis

Utilize depfinder (/system/console/depfinder) features, given
The project is associated with certain AEM instance(s), (via AEM Selector panel), the "AEM: Analyze dependencies" action available.
The action should collect all dependencies per module and check if they're present in connected AEM instance(s)

Found issues should be printed into log console (TBD)

HTL: quick doc inside EL

<div data-sly-use.bean="${'com.package.BeanClass`}">
  ${bean.field}
</div>
  • The QD action triggered on com.package.BeanClass and on bean should show the class's top level documentation
  • QD on field should show documentation of corresponding "getter" or field

QD = Quick Documentation (ctrl+q)

HTl: Documentation for standard options

"Quick documentation action" triggered on htl options should show description of the option

e.g.

   ${@ context='unsafe'}

"Quick documentation action" triggered on context should show description of context (should be taken from here: https://docs.adobe.com/docs/en/htl/docs/getting-started.html?wcmmode=disabled)

The list of standard options:

"join",
            "i18n", "context", "format", "locale",
            "type", "timezone", "scheme", "domain",
            "path", "prependPath", "appendPath",
            "selectors", "addSelectors", "removeSelectors",
            "extension", "suffix", "prependSuffix", "appendSuffix",
            "query", "addQuery", "removeQuery", "fragment"

HTL: data-sly-call completion

Add completion for data-sly-call

  data-sly-call="${<caret>}" // here should be list of all templates available in current scope, including those spawned by `data-sly-use`
  data-sly-call="${template @ <caret>}" // here should list of parameters declared in template

HTL: variable names clash issue

Variable type isn't resolved properly for following cases:

   <div data-sly-list="${list1}">
   </div>
   <div data-sly-list="${list2}">
        ${item.<caret>} // variants from list1 will be proposed
   </div>

HTL: data-sly-resource completion

Add completions for data-sly-resource

    data-sly-resource="${'path' @ <caret>}" // the "resourceType" should be proposed as first variant for completion
    data-sly-resource="${'path' @ resourceType="<caret>"} // list of all resource types declared in the current project should be proposed

HTL: Resolve component's properties

All htl files within a component should receive component's properties declared in component's dialog (for Touch UI)
given:

/jcr_root/apps/app_name/components/test/_cq_dialog/.content.xml

Has properties with names property1 and property2
then all htl files under
/jcr_root/apps/app_name/components/test/
Should have aforementioned properties proposed in following case:

    ${properties.<caret>} // -> `property1` and `property2` should be present among other variants

The variants declared in dialog should be marked as "dialog property" (via type text)

Go to declaration action will be implemented in separate ticket: #90

HTL: template resolution

All HTL/HTML files containing data-sly-template attributes should be proposed as a variants for data-sly-use
Templates declared in current directory should have higher priority

HTL: Propose common variants for context objects

Propose common variants for context objects:

{
  "properties": [
    "jcr:title",
    "jcr:description",
    "jcr:primaryType",
    "jcr:mixinTypes",
    "jcr:createdBy",
    "cq:lastReplicationAction",
    "cq:lastReplicatedBy",
    "jcr:lastModifiedBy",
    "jcr:lastModified",
    "cq:lastReplicated"
  ],
  "pageProperties": [
    "jcr:title",
    "jcr:description",
    "jcr:primaryType",
    "jcr:mixinTypes",
    "jcr:createdBy",
    "cq:lastReplicationAction",
    "cq:lastReplicatedBy",
    "jcr:lastModifiedBy",
    "jcr:lastModified",
    "cq:lastReplicated"
  ],
  "inheritedPageProperties": [
    "jcr:title",
    "jcr:description",
    "jcr:primaryType",
    "jcr:mixinTypes",
    "jcr:createdBy",
    "cq:lastReplicationAction",
    "cq:lastReplicatedBy",
    "jcr:lastModifiedBy",
    "jcr:lastModified",
    "cq:lastReplicated"
  ]
}

The above variants should be proposed in for nested objects too, e.g.:

   <div data-sly-list="${currentPage.listChildren}">
        ${item.<caret>} // variants for Page should be proposed 
   </div>

HTL: Reference on inherited methods of model does not working

I have model

@Model
class MyModel {
   protected String getName() {
        return "str";
   }
}

and have inherited class from this model

@Model
class MyChildModel extends MyModel {
}

and in html file I define MyChildModel and I want use inherited method

<sly data-sly-use.model="MyChildModel">
    <p>model.name</p>
</sly>

Action: I try go to defining of method via Ctrl + Click on name.

Expected: I go to declaration of this method.
Actual: Nothing happens

HTML: Filter out duplicate attributes

  • Filter out data-sly-unwrap in case if it is already present in tag's attributes or if the tag's name is "sly"
  • Filter out data-sly-list
  • Filter out data-sly-repeat

Check other attributes. In case if some attribute doesn't make sense to be present multiple times within one tag, filter it out

HTL: template variables resolution

<div data-sly-template.templateName="${@ param1, param2}">
    ${<caret>}
</div>

In given example param1 and param2 should be present among other completion variants

HTL: completion don't work for option value

The completion for following case doesn't work:

  ${variable @ option=<caret>}

Here the list of context objects and file variables should be shown.

  ${@ context=<caret>} --> the list of context values will be showed

The list of context values should be shown in that case ${@ context='<caret>'}

HTL: Brace matching

Implement brace matching for HTL

  ${someProperty} // if cursor is after '}' the opening brace should highlighted
  ${ ['1', '2', '3'] } // the same for the array

HTL: data-sly-include completion

Propose variants for data-sly-include

   data-sly-include="<caret>" // the list of HTL files from the same directory as the edited file should be proposed

HTL: navigate to action in EL

Ability to open class by ctrl+click


<div data-sly-use.bean="${'com.package.BeanClass'}">
    ${bean.field}
</div>

  • Click on com.package.BeanClass should navigate to class declaration
  • Click on bean should navigate to bean declaration within same file (to data-sly-use.bean)
  • Click on field should navigate to corresponding "getter" method (or field) within the class

HTL: Inject HTL only under jcr_root folder

The HTL should be injected only under jcr_root folder.
Also, the HTL files should be provided with custom icon to make it easier to distinguish them from ordinary HTML files

HTL: data-sly-use smart completion

Add support of smart completion for data-sly-use value.

  1. From Use classes and Sling models should be proposed those which have name similar to the component's
  2. Should be proposed html files containing data-sly-template elements from the same directory

HTML: Enchance Insertion handling

Currently standard XmlAttributeInsertHandler is used to handle insertion of Htl attributes, it simply adds ="" after insertion and puts the caret inside.

The behaviour should be tuned to make it more convenient to insert different types of attributes

  • data-sly-test -> data-sly-test.="${}"
  • data-sly-use -> data-sly-use.=""
  • data-sly-list -> data-sly-list="${}"
  • data-sly-repeat -> data-sly-repeat="${}" (I think that it is more convenient to omit the variable name in list and repeat attributes as it is not mandatory)
  • data-sly-attribute -> data-sly-attribute.="${}"
  • data-sly-element -> ???
  • data-sly-call -> ???
  • data-sly-include -> ???
  • data-sly-uwrap -> data-sly-unwrap
  • data-sly-text -> data-sly-text="${}" (check if the attribute has name?)
  • data-sly-resource -> ???

the first position of the caret.
the second position of the caret.
??? -> requires additional investigation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.