GithubHelp home page GithubHelp logo

louco11 / group-file-template-gft Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 5.0 4.52 MB

The GFT plugin may be useful: Developers who often create groups of files with - similar structure. Development teams who want to unify the style and formatting of their projects. Anyone who wants to increase their productivity when working with an IDE

Home Page: https://github.com/Louco11/Group-File-Template-GFT

Kotlin 98.99% Tcl 1.01%
android android-studio gft idea idea-plugin jetbrains kmm kmp kmp-template plugin templates

group-file-template-gft's People

Contributors

cosic avatar louco11 avatar nikcapko avatar

Stargazers

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

Watchers

 avatar

group-file-template-gft's Issues

Проверяет только первый открытый проект

В Idea есть опция attach при открытии проекта, и с популярностью микросервисов и разбиения кода на несколько репозиториев часто приходится работать в нескольких проектах.
Сейчас плагин ищет папку templates только в первом открытом проекте, хотелось бы чтобы проходил по всем открытым проектам.

Add lower case option for params in StringExt

It would be nice to have support for lower case as part of replaceTemplate.

An example of this is a variable that's used for both a class and package.

param:moduleName
Package: com.example.modulename.data
Class: ModuleNameRepository

The path to the package is specified incorrectly. The Android Studio version is Koala | 2024.1.1.

Greetings!

I ran into a few problems after updating the studio to Koala 2024.1.1

Incorrect creation of package

When creating my templates, I started getting incorrect package mapping. For some reason, the . character in the path is replaced with \

to add a package, I use the following code:

package {package}.{name}[-s]

This used to work perfectly before, and I got the correct packet path in the output:

package com.test.ui.screen.test

However, after the update, I get the wrong package path already:

package com\test\ui\screen.test

Creating Android Resource files is created outside of the res/... package

I created a template that should generate a page fragment layout file. This file is created together with the main fragment. I used your template as an example.

Previously, this template worked correctly. However, after the update, the files are res/... began to be created not in the resource package, but directly in the package with the page code.

For example, previously packages were created like this:

|--java
   |--ui
     |--screen
       |--test
         |--TestFragment.kt
|--res
   |--layout
     |--fragment_test.xml

After the update, I get:

|--java
   |--ui
     |--screen
     | |--test
     |   |--TestFragment.kt
     |--res
        |--layout
           |--fragment_test.xml

My json code for creating a template:

{
  "name": "fragment",
  "description": "Base fragment",
  "path": "/templates/fragment",
  "param": [
    "name"
  ],
  "selectParam": [],
  "addFile": [
    {
      "name": "{name}Fragment.kt",
      "path": "{name}[-s]",
      "fileTemplatePath": "FragmentTemplate.tm"
    },
    {
      "name": "{name}UiState.kt",
      "path": "{name}[-s]",
      "fileTemplatePath": "UiStateTemplate.tm"
    },
    {
      "name": "{name}Event.kt",
      "path": "{name}[-s]",
      "fileTemplatePath": "EventTemplate.tm"
    },
    {
      "name": "{name}ViewModel.kt",
      "path": "{name}[-s]",
      "fileTemplatePath": "ViewModelTemplate.tm"
    },
    {
      "name": "fragment_{name}[-s].xml",
      "path": "res/layout",
      "fileTemplatePath": "layout.tm"
    }
  ]
}

How to modify the base file path?

Today, it only works if the templates are in /templates of the root project. I need to be able to reference the templates in /my-submodule/templates, they are in the same level, but i can`t make it work or show on the list, even if my main.json is correct

what can I do ? is there a way to custumize the base path ?

Can't add a file to the template

  1. can't add a file to the template.
  2. can't create files from a template into MODULE

My IntelliJ IDE
Android Studio Arctic Fox | 2020.3.1 Patch 2
Build #AI-203.7717.56.2031.7678000, built on August 27, 2021

Can you add some features?

  1. some parameter like {YEAR} {MONTH} {DAY} {TIME}, that we can make author template at the same time.
  2. some function like lowercase({name}), because layout's filename is lowercase but java's filename is camelCase.

btw, this plugin is very helpful, thank you very much.

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.