-
Notifications
You must be signed in to change notification settings - Fork 846
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
include php blade plugin in php cluster #7618
base: master
Are you sure you want to change the base?
Conversation
First of all, thank you for your contribution!
Unfortunately, it's too late. The feature freeze date is July 26th. Please write all features of this module with screenshots here as well. (not only the link) Please add unit tests for features. e.g. code completion, indexer, navigator, parser, lexer, formatter etc. (also see: CslTestBase.java) Did you submit an ICLA? Probably, it takes a lot of time to review this. |
php/php.blade/src/org/netbeans/modules/php/blade/editor/BladeBracesMatcher.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/BladeDeclarationFinder.java
Outdated
Show resolved
Hide resolved
php/php.blade/test/unit/src/org/netbeans/modules/php/blade/syntax/antlr4/BladeUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/test/unit/src/org/netbeans/modules/php/blade/syntax/antlr4/BladeUtils.java
Outdated
Show resolved
Hide resolved
Hi, |
php/php.blade/test/unit/src/org/netbeans/modules/php/blade/syntax/antlr4/BladeUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/ui/options/BladeOptionsPanel.form
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/ui/options/BladeOptionsPanel.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/ui/options/BladeOptionsPanelController.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/ui/options/Bundle.properties
Outdated
Show resolved
Hide resolved
php/php.blade/test/unit/src/data/testfiles/coloring_lexer/issues/issue61/issue61.blade.php
Outdated
Show resolved
Hide resolved
...t/unit/src/org/netbeans/modules/php/blade/syntax/antlr4/BladeAntlrColoringLexerTestBase.java
Outdated
Show resolved
Hide resolved
...t/unit/src/org/netbeans/modules/php/blade/syntax/antlr4/BladeAntlrColoringLexerTestBase.java
Outdated
Show resolved
Hide resolved
How did you generate icons? (Are there icons based on something?) |
php/php.blade/src/org/netbeans/modules/php/blade/editor/ResourceUtilities.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/ResourceUtilities.java
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/EditorStringUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/EditorStringUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/EditorStringUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/indexing/PhpIndexUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/indexing/QueryUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/indexing/QueryUtils.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/indexing/QueryUtils.java
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProposal.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProposal.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProposal.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProvider.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProvider.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProvider.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProvider.java
Outdated
Show resolved
Hide resolved
...p.blade/src/org/netbeans/modules/php/blade/editor/completion/BladePhpCompletionProvider.java
Outdated
Show resolved
Hide resolved
...p.blade/src/org/netbeans/modules/php/blade/editor/completion/BladePhpCompletionProvider.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/components/ComponentElement.java
Outdated
Show resolved
Hide resolved
....blade/src/org/netbeans/modules/php/blade/editor/components/ComponentsCompletionService.java
Outdated
Show resolved
Hide resolved
...blade/src/org/netbeans/modules/php/blade/editor/declaration/ComponentDeclarationService.java
Show resolved
Hide resolved
...blade/src/org/netbeans/modules/php/blade/editor/declaration/ComponentDeclarationService.java
Show resolved
Hide resolved
Please check whether we should translate yourself once for strings of all files. (add |
…mpletion handler, parse, blade typed text interceptor
…ests, added more lexer tests
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.
don't forget to hook the tests into CI so that we can let it run over this PR - just in case there are any surprises.
would look like:
netbeans/.github/workflows/main.yml
Lines 2404 to 2405 in a5fa02d
- name: php.latte | |
run: ant $OPTS -f php/php.latte test |
and someone can trigger the workflow once done
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionItem.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionItem.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/cache/QueryCache.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/completion/BladeCompletionProposal.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/components/ComponentElement.java
Outdated
Show resolved
Hide resolved
public static final List<Integer> TOKENS_WITH_IDENTIFIABLE_PARAM = Arrays.asList(new Integer[]{ | ||
D_EXTENDS, D_INCLUDE, D_INCLUDE_IF, D_INCLUDE_WHEN, | ||
D_INCLUDE_UNLESS, D_EACH, D_SECTION, D_HAS_SECTION, D_SECTION_MISSING, | ||
D_PUSH, D_PUSH_IF, D_PREPEND, D_USE, D_INJECT, D_ASSET_BUNDLER | ||
}); |
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.
List.of
would make this immutable. Should this be a Set? (see next comment)
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.
unfortunately this didn't solve the issue :(
the array and the set are both mutable + you don't seem to use the array anywhere outside of this class.
public static final Set<Integer> TOKENS_WITH_IDENTIFIABLE_PARAM = Set.of(
D_EXTENDS, D_INCLUDE, D_INCLUDE_IF, D_INCLUDE_WHEN,
D_INCLUDE_UNLESS, D_EACH, D_SECTION, D_HAS_SECTION, D_SECTION_MISSING,
D_PUSH, D_PUSH_IF, D_PREPEND, D_USE, D_INJECT, D_ASSET_BUNDLER
);
This would make it immutable.
you are using in many places lines like: new HashSet<>(Arrays.asList(new String[]{directive}));
which could be Set.of(directive)
.
php/php.blade/src/org/netbeans/modules/php/blade/syntax/antlr4/v10/BladeAntlrUtils.java
Outdated
Show resolved
Hide resolved
...p.blade/src/org/netbeans/modules/php/blade/editor/completion/BladePhpCompletionProvider.java
Outdated
Show resolved
Hide resolved
php/php.blade/src/org/netbeans/modules/php/blade/editor/ui/customizer/UiOptionsUtils.java
Outdated
Show resolved
Hide resolved
private static final String _serializedATNSegment0 = | ||
"\u0004\u0000\u00ab\u0b4c\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ | ||
"\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ | ||
"\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ | ||
"\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0002\u0000"+ | ||
"\u0007\u0000\u0002\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003"+ | ||
"\u0007\u0003\u0002\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006"+ |
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.
regarding generated code. I believe we ended up agreeing to try to generate antlr outputs during build but don't commit it to the repo. The reason is because generated antlr code is not very "stable", it produces huge diffs when the version updates and those aren't reviewable anyway. (e.g the marked section)
The second reason would be antlr updates, this makes sure the code fits to the version if someone happens to update the antlr lib at some point.
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.
Ok, I will see how I can add it to .gitignore and have them build before the unit tests.
@junichi11 is it ok for you if I remove the generated antlr parser and lexer files from git ?
97780ce
to
3b74d77
Compare
…ntainer class + refactor
3b74d77
to
052177f
Compare
…list, add license header in form files
ab871b0
to
9649e83
Compare
Laravel is one of the most used frameworks in php, yet it still doesn't have support in Netbeans. (#7531 , #7231).
Mostly the main missing support is for blade templates syntax.
I've started to work on a plugin https://github.com/haidubogdan/netbeans-php-blade-plugin 3 years ago.
After using antlr as a lexer and parser, I found that scaling the plugin was much maintainable.
It's not the cleanest code, but I realized that I will always reach to the 99% finish status if I don't do the first pull request.
Most of the available features to be included are listed at https://github.com/haidubogdan/netbeans-php-blade-plugin.
....
And some are still missing
All feedbacks are welcome, I hope to reach nb 23 deployment :) .
TODO