Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Jastadd2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Jastadd2
Commits
c1f4ed81
Commit
c1f4ed81
authored
6 years ago
by
Johannes Mey
Browse files
Options
Downloads
Plain Diff
Merge commit '
ec7182cf
'
parents
690898d9
ec7182cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/java/org/jastadd/Configuration.java
+4
-3
4 additions, 3 deletions
src/java/org/jastadd/Configuration.java
src/template/flush/Flush.tt
+14
-10
14 additions, 10 deletions
src/template/flush/Flush.tt
with
18 additions
and
13 deletions
src/java/org/jastadd/Configuration.java
+
4
−
3
View file @
c1f4ed81
...
...
@@ -317,7 +317,8 @@ public class Configuration {
.
addAcceptedValue
(
"full"
,
"flushing of all computed values (combines attr, coll, and rewrite)"
)
.
addDefaultValue
(
"attr"
,
"adds flushing of attributes (syn,inh)"
)
.
addDefaultValue
(
"coll"
,
"adds flushing of collection attributes"
)
.
addAcceptedValue
(
"rewrite"
,
"adds flushing of rewrites"
);
.
addAcceptedValue
(
"rewrite"
,
"adds flushing of rewrites"
)
.
addAcceptedValue
(
"api"
,
"flushing is disabled, but generate methods"
);
ValueOption
packageNameOption
=
new
ValueOption
(
"package"
,
"optional package name for generated classes"
);
...
...
@@ -1155,10 +1156,10 @@ public class Configuration {
}
/**
* @return {@code true} if --flush=
none
* @return {@code true} if
not
--flush=
api
*/
public
boolean
flushEnabled
()
{
return
!
flushOption
.
hasValue
(
"
none
"
);
return
!
flushOption
.
hasValue
(
"
api
"
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/template/flush/Flush.tt
+
14
−
10
View file @
c1f4ed81
...
...
@@ -26,10 +26,10 @@
# POSSIBILITY OF SUCH DAMAGE.
ASTNode.flushTreeCacheMethod [[
$if(FlushEnabled)
$if(#isASTNodeDecl)
/** @apilevel low-level */
public void $ASTNode.flushTreeCache() {
$if(FlushEnabled)
flushCache();
if (children != null) {
for (int i = 0; i < children.length; i++) {
...
...
@@ -42,61 +42,65 @@ $if(#isASTNodeDecl)
}
}
}
}
$endif
}
$endif
]]
ASTDecl.flushCacheMethod [[
$if(FlushEnabled)
$if(#isASTNodeDecl)
/** @apilevel low-level */
public void #name.flushCache() {
$if(FlushEnabled)
flushAttrAndCollectionCache();
}
$endif
}
$endif
]]
ASTDecl.flushAttrAndCollectionCacheMethod [[
$if(FlushEnabled)
$if(#isASTNodeDecl)
/** @apilevel internal */
public void #name.flushAttrAndCollectionCache() {
$if(FlushEnabled)
$if(FlushAttr)
flushAttrCache();
$endif
$if(FlushColl)
flushCollectionCache();
$endif
}
$endif
}
$endif
]]
ASTDecl.flushAttrCacheMethod [[
$if(FlushAttr)
/** @apilevel internal */
public void #name.flushAttrCache() {
$if(FlushEnabled)
$if(FlushAttr)
$if(!#isASTNodeDecl)
super.flushAttrCache();
$endif
$FlushAttrCacheBody
}
$endif
$endif
}
]]
ASTDecl.flushCollectionCacheMethod [[
$if(FlushColl)
/** @apilevel internal */
public void #name.flushCollectionCache() {
$if(FlushEnabled)
$if(FlushColl)
$if(!#isASTNodeDecl)
super.flushCollectionCache();
$endif
#flushCollectionCacheCode
}
$endif
$endif
}
]]
# TODO: Figure out if this can be removed
...
...
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