mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Backup
This commit is contained in:
@@ -80,7 +80,8 @@ public class EditorPagerAdapter extends FragmentStatePagerAdapter implements Edi
|
||||
mFragments.add(EditorFragment
|
||||
.newInstance(file, project, selection)
|
||||
.setFileOpenListener(listener)
|
||||
.setJLSRequestor(jlsRequestor));
|
||||
.setJLSRequestor(jlsRequestor)
|
||||
.setModificationStateListener(this));
|
||||
mOpenedFiles.add(file);
|
||||
notifyDataSetChanged();
|
||||
return mFragments.size() - 1;
|
||||
|
||||
@@ -71,15 +71,8 @@ class EditorTextActionModeStarter implements CodeEditor.EditorTextActionPresente
|
||||
android.R.attr.actionModePasteDrawable,
|
||||
});
|
||||
|
||||
List<Diagnostic> diags = mEditor.findDiagnosticsContainingLine(mEditor.getCursor().getLeftLine());
|
||||
if(diags != null && diags.size() > 0) {
|
||||
this.actions = new ArrayList<>();
|
||||
for(Diagnostic d : diags) {
|
||||
if(d != null && d.codeActions != null) {
|
||||
this.actions.addAll(d.codeActions);
|
||||
}
|
||||
}
|
||||
} else actions = null;
|
||||
// TODO: Request code actions on selection change
|
||||
actions = null;
|
||||
|
||||
if(actions != null && actions.size() > 0) {
|
||||
menu.add(0, 8, 0, mEditor.getContext().getString(com.itsaky.androidide.R.string.msg_code_actions))
|
||||
|
||||
@@ -22,7 +22,4 @@ public class Diagnostic {
|
||||
|
||||
@SerializedName("tags")
|
||||
public List<Integer> tags;
|
||||
|
||||
@SerializedName("codeActions")
|
||||
public List<CodeAction> codeActions = new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user