Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jetbrains-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
jetbrains-plugin
Commits
73297288
Commit
73297288
authored
3 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
improve formatting (mostly expressions now supported)
parent
0320894b
No related branches found
No related tags found
1 merge request
!2
Feature/autoformat
Pipeline
#11972
passed
3 years ago
Stage: test
Stage: jar
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/jastadd/tooling/aspect/AspectBlock.java
+4
-2
4 additions, 2 deletions
src/main/java/org/jastadd/tooling/aspect/AspectBlock.java
with
4 additions
and
2 deletions
src/main/java/org/jastadd/tooling/aspect/AspectBlock.java
+
4
−
2
View file @
73297288
...
...
@@ -38,6 +38,8 @@ public class AspectBlock extends AbstractBlock {
myInjectedBlockBuilder
.
addInjectedBlocks
(
blocks
,
myNode
,
Wrap
.
createWrap
(
WrapType
.
NONE
,
false
),
null
,
Indent
.
getIndent
(
Indent
.
Type
.
NONE
,
false
,
true
));
}
else
if
(
myNode
.
getPsi
()
instanceof
JastAddAspectBlock
)
{
myInjectedBlockBuilder
.
addInjectedBlocks
(
blocks
,
myNode
,
Wrap
.
createWrap
(
WrapType
.
NONE
,
false
),
null
,
Indent
.
getIndent
(
Indent
.
Type
.
NONE
,
false
,
true
));
}
else
if
(
myNode
.
getPsi
()
instanceof
JastAddAspectExpression
)
{
myInjectedBlockBuilder
.
addInjectedBlocks
(
blocks
,
myNode
,
Wrap
.
createWrap
(
WrapType
.
NONE
,
false
),
null
,
Indent
.
getIndent
(
Indent
.
Type
.
NONE
,
false
,
true
));
}
else
{
ASTNode
child
=
myNode
.
getFirstChildNode
();
while
(
child
!=
null
)
{
...
...
@@ -60,6 +62,8 @@ public class AspectBlock extends AbstractBlock {
return
Indent
.
getNormalIndent
();
}
else
if
(
parentPsi
instanceof
JastAddAspectAspectConstructorDeclaration
&&
(
myNode
.
getPsi
()
instanceof
JastAddAspectExplicitConstructorInvocation
||
myNode
.
getPsi
()
instanceof
JastAddAspectBlockStatement
))
{
return
Indent
.
getNormalIndent
();
}
else
if
(
parentPsi
instanceof
JastAddAspectCollectionAttribute
&&
(
childType
==
AspectTypes
.
LBRACKET
||
childType
==
AspectTypes
.
ROOT
))
{
return
Indent
.
getNormalIndent
();
}
else
if
(
parentPsi
instanceof
JastAddAspectCollectionContribution
&&
(
childType
==
AspectTypes
.
WHEN
||
childType
==
AspectTypes
.
TO
||
childType
==
AspectTypes
.
FOR
))
{
return
Indent
.
getNormalIndent
();
}
...
...
@@ -69,8 +73,6 @@ public class AspectBlock extends AbstractBlock {
}
if
(
nonBlankSuccecssor
!=
null
&&
nonBlankSuccecssor
.
getElementType
()
==
AspectTypes
.
ASSIGN
)
{
return
Indent
.
getContinuationIndent
();
}
else
if
(
nonBlankSuccecssor
!=
null
)
{
//System.out.println(nonBlankSuccecssor.getElementType().getDebugName());
}
}
return
Indent
.
getNoneIndent
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment