我有这样的CustomDialogFragment
public class CustomDialogFragment extends DialogFragment {
private LinearLayout containerView;
public static CustomDialogFragment newInstance() {
CustomDialogFragment fragment = new EDActionSheet();
return fragment;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Dialog dialog = new Dialog(getActivity());
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
//MARK - containerView
LinearLayout.LayoutParams containerViewLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
containerView = new LinearLayout(dialog.getContext());
containerView.setLayoutParams(containerViewLayoutParams);
containerView.setOrientation(LinearLayout.VERTICAL);
dialog.setContentView(containerView);
DisplayMetrics displaymetrics = new DisplayMetrics();
dialog.getWindow().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
params.width = (int) (displaymetrics.widthPixels * 0.95);
params.gravity = Gravity.BOTTOM;
dialog.getWindow().setAttributes(params);
return dialog;
}
public void setColor(int …Run Code Online (Sandbox Code Playgroud) 我希望将Java8语法用于antlr时,将“注释”记录到AST中(不做任何事情,而将其存储以备以后复制)。https://github.com/antlr/grammars-v4/blob/master/java8/Java8.g4
IE:我想将Java源代码文件读入AST,然后最终再次输出,但要包括
我想知道是否对语法进行了一个简单的调整以允许它...(或者我是否天真的必须将“注释”集成到每个表达式中的想法是这件事的可悲的事实……)以及是否那是什么
COMMENT
: '/*' .*? '*/' -> skip
;
LINE_COMMENT
: '//' ~[\r\n]* -> skip
;
Run Code Online (Sandbox Code Playgroud) 我正在寻找一个原型,但我很难使创建的 pom.xml 具有我需要的值。
我有:
<properties>
<domain-objects-location> ${groupId}/domain </domain-objects-location>
...
</properties>
Run Code Online (Sandbox Code Playgroud)
在我的 pom.xml 模板中,我得到了 groupID 所在的“com.mycompany.app”。
不过我希望“com/mycompany/app”在那里。
关于如何获得它有什么建议吗?谢谢。
更新:
正如我在下面链接的,有一个特殊的属性可以做到这一点。
<domain-objects-location>${packageInPathFormat}/domain</domain-objects-location>
Run Code Online (Sandbox Code Playgroud)
是什么给了我想要的输出。我不确定为什么这没有出现在https://maven.apache.org/ref/3.0.3/maven-model/maven.html或文档中其他明显的地方。但它确实有效。