对于大多数文件,尾随空格的强力自动剥离是一个很好的功能,除了Markdown。
AFAIK,在Markdown中添加换行符(相当于 public class TheRecyclerAdapter extends RecyclerView.Adapter<TheRecyclerAdapter.TheViewHolder> {
private Context mContext;
private List<TheData> theDataList;
public class TheViewHolder extends RecyclerView.ViewHolder{
TextView theHiddenView;
public TheViewHolder(View itemView) {
super(itemView);
theHiddenView = (TextView) itemView.findViewById(R.id.hiddenView);
}
}
public TheRecyclerAdapter(Context context, List<TheData> theDatalist){
this.mContext = context;
this.theDataList = theDatalist;
}
@Override
public TheViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.custom_view_adapter, parent, false);
return new TheViewHolder(itemView);
}
@Override
public void onBindViewHolder(final TheViewHolder holder, int position) {
TheData theData = theDataList.get(position);
holder.theHiddenView.setTag(theData.getHiddenTag()); //Set the TAG of Hidden View here
}
@Override
public int getItemCount() {
return theDataList.size();
}
public void deletePosition(int position){
theDataList.remove(position);
notifyItemRemoved(position);
notifyItemRangeChanged(position,theDataList.size());
}
public void removeTheItem(){
deletePosition(getPositionBaseOnTag("my_tag"));
}
/***Here where I want to return the position of that Item base on TAG**/
public int getPositionBaseOnTag(String theTag){
int itemPosition;
//Find the View base on TAG
//Get the Position
//Done
return itemPosition;
}
}
而不是<br>
)的唯一方法是end a line with two or more spaces。
在IntelliJ中,我可以在<p>
部分的Editor > General
下通过将Other
设置为Strip trailing spaces on Save
来配置 - 但我找不到设置此方法的方法例如,仅None
个文件的None
和*.md
或Modified Lines
文件的All
/ *.scala
。
我正在使用IntelliJ Community Edition 2016.1